Skip to content
Snippets Groups Projects
Commit 79a2aa44 authored by Emmanuel Salomon's avatar Emmanuel Salomon :fist:
Browse files

fix: meta tag for home + og image

parent 901748d9
No related branches found
No related tags found
No related merge requests found
......@@ -60,31 +60,46 @@ export function reduceResults(results) {
* @return {Object} An object with meta good for SEO :)
*/
export function headDocument() {
const title = this.document.title || this.$config.site_title
const content = this.document.description || this.$config.site_description
const image =
this.document.image || `${this.$config.site_url}/img/og-home.jpeg`
return {
title: this.document.title,
title,
meta: [
{
hid: 'description',
name: 'description',
content: this.document.description,
content,
},
// Open Graph
{ hid: 'og:title', property: 'og:title', content: this.document.title },
{ hid: 'og:title', property: 'og:title', content: title },
{
hid: 'og:description',
property: 'og:description',
content: this.document.description,
content,
},
{
hid: 'og:image',
property: 'og:image',
content: image,
},
// Twitter Card
{
hid: 'twitter:title',
name: 'twitter:title',
content: this.document.title,
content: title,
},
{
hid: 'twitter:description',
name: 'twitter:description',
content: this.document.description,
content,
},
{
hid: 'twitter:image',
name: 'twitter:image',
content: image,
},
],
}
......
......@@ -42,6 +42,8 @@
</template>
<script>
import { headDocument as head } from '~/libs/helpers'
export default {
name: 'HomePage',
async asyncData({ $content }) {
......@@ -55,6 +57,15 @@ export default {
sections,
}
},
data() {
return {
// for head meta tags
document: {
title: "Repenser la création monétaire...et l'expérimenter !",
},
}
},
head,
}
</script>
......
static/img/og-home.jpeg

145 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment