Clean metaInfo SEO (#40)

* Clean metaInfo SEO

* fix path

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag
2022-12-22 16:25:17 +05:30
committed by GitHub
parent 549506ab8f
commit 286b82b3ce
27 changed files with 128 additions and 156 deletions

22
resources/js/mixins/seo-meta.js vendored Normal file
View File

@@ -0,0 +1,22 @@
export default {
metaInfo () {
const title = this.metaTitle ?? 'OpnForm'
const description = this.metaDescription ?? "Create beautiful forms for free. Unlimited fields, unlimited submissions. It's free and it takes less than 1 minute to create your first form."
const image = this.metaImage ?? this.asset('img/social-preview.jpg')
return {
title: title,
titleTemplate: '%s · OpnForm',
meta: [
...(this.metaTags ?? []),
{ vmid: 'og:title', property: 'og:title', content: title },
{ vmid: 'twitter:title', property: 'twitter:title', content: title },
{ vmid: 'description', name: 'description', content: description },
{ vmid: 'og:description', property: 'og:description', content: description },
{ vmid: 'twitter:description', property: 'twitter:description', content: description },
{ vmid: 'twitter:image', property: 'twitter:image', content: image },
{ vmid: 'og:image', property: 'og:image', content: image }
]
}
}
}