diff --git a/src/App.vue b/src/App.vue index 7e7d1f0..8b47575 100644 --- a/src/App.vue +++ b/src/App.vue @@ -36,6 +36,7 @@ Blog About Us Contact + FAQ Privacy Policy Sitemap diff --git a/src/composables/useStructuredData.ts b/src/composables/useStructuredData.ts index 5e8748e..068f5e2 100644 --- a/src/composables/useStructuredData.ts +++ b/src/composables/useStructuredData.ts @@ -18,6 +18,11 @@ export interface BreadcrumbItem { url: string; } +export interface FAQItem { + question: string; + answer: string; +} + export function useStructuredData() { // Organization Schema const addOrganizationSchema = () => { @@ -159,11 +164,37 @@ export function useStructuredData() { }); }; + // FAQ Schema + const addFAQSchema = (faqs: FAQItem[]) => { + const schema = { + '@context': 'https://schema.org', + '@type': 'FAQPage', + mainEntity: faqs.map(faq => ({ + '@type': 'Question', + name: faq.question, + acceptedAnswer: { + '@type': 'Answer', + text: faq.answer, + }, + })), + }; + + useHead({ + script: [ + { + type: 'application/ld+json', + children: JSON.stringify(schema), + }, + ], + }); + }; + return { addOrganizationSchema, addWebSiteSchema, addBlogPostSchema, addBreadcrumbSchema, addBlogListSchema, + addFAQSchema, }; } diff --git a/src/router/index.ts b/src/router/index.ts index 3b70437..5a1447a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -24,6 +24,11 @@ const router = createRouter({ name: 'privacy-policy', component: () => import('../views/PrivacyPolicy.vue'), }, + { + path: '/faq', + name: 'faq', + component: () => import('../views/FAQ.vue'), + }, { path: '/blog', name: 'blog-overview', diff --git a/src/views/FAQ.vue b/src/views/FAQ.vue new file mode 100644 index 0000000..eb6238b --- /dev/null +++ b/src/views/FAQ.vue @@ -0,0 +1,80 @@ + + + + +