From b801cd4c99fc92b7b788e40d5f81ec404df1d025 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Nov 2025 17:20:09 +0100 Subject: [PATCH] [FEAT] SEO best practices --- src/components/Breadcrumbs.vue | 19 ++-- src/composables/useSEO.ts | 16 +-- src/composables/useStructuredData.ts | 123 +++++++++++---------- src/views/AboutUs.vue | 4 +- src/views/BlogDetail.vue | 154 ++++++++++++++++++--------- src/views/BlogOverview.vue | 24 +---- src/views/Contact.vue | 24 ++++- src/views/HomeView.seo.ts | 47 ++++---- src/views/PrivacyPolicy.vue | 4 +- 9 files changed, 222 insertions(+), 193 deletions(-) diff --git a/src/components/Breadcrumbs.vue b/src/components/Breadcrumbs.vue index 03611b5..14e7a22 100644 --- a/src/components/Breadcrumbs.vue +++ b/src/components/Breadcrumbs.vue @@ -11,17 +11,15 @@ } const breadcrumbs = computed(() => { - const items: BreadcrumbItem[] = [ - { name: 'Home', path: '/' } - ]; + const items: BreadcrumbItem[] = [{ name: 'Home', path: '/' }]; // Map route names to breadcrumb labels const routeLabels: Record = { 'blog-overview': 'Blog', 'blog-detail': 'Blog', - 'about': 'About Us', - 'contact': 'Contact', - 'privacy-policy': 'Privacy Policy' + about: 'About Us', + contact: 'Contact', + 'privacy-policy': 'Privacy Policy', }; if (route.name && route.name !== 'home') { @@ -32,7 +30,7 @@ items.push({ name: 'Blog', path: '/blog' }); // Get the post title from route meta or params if available - const postTitle = route.meta.title as string || 'Article'; + const postTitle = (route.meta.title as string) || 'Article'; items.push({ name: postTitle, path: route.path }); } else if (routeLabels[routeName]) { items.push({ name: routeLabels[routeName], path: route.path }); @@ -51,12 +49,7 @@