diff --git a/app.vue b/app.vue index 6ad20c8..7aa6591 100644 --- a/app.vue +++ b/app.vue @@ -6,10 +6,13 @@ const route = useRoute() function initSeoMeta() { useSeo({ title: route.meta.title as string, - ogTitle: route.meta.ogTitle as string, + ogTitle: route.meta.title as string, description: route.meta.description as string, - ogDescription: route.meta.ogDescription as string, - ogImage: route.meta.ogImage as string, + ogDescription: route.meta.description as string, + ogImageUrl: route.meta.image as string, + twitterTitle: route.meta.title as string, + twitterDescription: route.meta.description as string, + twitterImage: route.meta.image as string, }) } diff --git a/composables/useSeo.ts b/composables/useSeo.ts index eb3f136..4bf5737 100644 --- a/composables/useSeo.ts +++ b/composables/useSeo.ts @@ -1,19 +1,26 @@ import { useSeoMeta } from '#imports' +// NB: It's important to change the default value of every metadata here. export function useSeo({ title = 'Default Title', - ogTitle = 'Default OG Title', description = 'This is the default description, let me tell you all about it.', - ogDescription = 'This is my amazing site, let me tell you all about it.', - ogImage = 'https://example.com/image.png', + ogTitle = 'Default Title', + ogDescription = 'This is the default description, let me tell you all about it.', + ogImageUrl = 'https://example.com/image.png', + twitterTitle = 'Default Title', + twitterDescription = 'This is the default description, let me tell you all about it.', + twitterImage = 'https://example.com/image.png', } = {}) { useSeoMeta({ title, - ogTitle, description, + ogTitle, ogDescription, - ogImage, + ogImageUrl, + twitterTitle, twitterCard: 'summary_large_image', + twitterDescription, + twitterImage, mobileWebAppCapable: 'yes', }) } diff --git a/layouts/base.vue b/layouts/base.vue index 9c7267c..6bc62c5 100644 --- a/layouts/base.vue +++ b/layouts/base.vue @@ -1,5 +1,5 @@