Update SEO and meta tags in index.html, enhance robots.txt for better crawling control, and improve sitemap.xml priorities. Refactor blog routes to include SEO metadata and adjust blog view for canonical URLs. Implement blog URL generation in BlogListView and apply SEO dynamically in BlogView.

This commit is contained in:
Torsten Schulz (local)
2026-03-18 22:02:44 +01:00
parent 971e09a72a
commit 59869e077e
14 changed files with 759 additions and 81 deletions

View File

@@ -6,8 +6,52 @@ export default [
{ path: '/blogs/create', name: 'BlogCreate', component: BlogEditorView, meta: { requiresAuth: true } },
{ path: '/blogs/:id/edit', name: 'BlogEdit', component: BlogEditorView, props: true, meta: { requiresAuth: true } },
// Slug-only route first so it doesn't get captured by the :id route
{ path: '/blogs/:slug', name: 'BlogSlug', component: BlogView, props: route => ({ slug: route.params.slug }) },
{
path: '/blogs/:slug',
name: 'BlogSlug',
component: BlogView,
props: route => ({ slug: route.params.slug }),
meta: {
seo: {
title: 'Blogs auf YourPart',
description: 'Oeffentliche Blogs, Beitraege und Community-Inhalte auf YourPart.',
},
},
},
// Id-constrained route (numeric id only) with optional slug for canonical links
{ path: '/blogs/:id(\\d+)/:slug?', name: 'Blog', component: BlogView, props: true },
{ path: '/blogs', name: 'BlogList', component: BlogListView },
{
path: '/blogs/:id(\\d+)/:slug?',
name: 'Blog',
component: BlogView,
props: true,
meta: {
seo: {
title: 'Blogs auf YourPart',
description: 'Oeffentliche Blogs, Beitraege und Community-Inhalte auf YourPart.',
},
},
},
{
path: '/blogs',
name: 'BlogList',
component: BlogListView,
meta: {
seo: {
title: 'Blogs auf YourPart - Community-Beitraege und Themen',
description: 'Entdecke oeffentliche Blogs auf YourPart mit Community-Beitraegen, Gedanken, Erfahrungen und Themen aus verschiedenen Bereichen.',
keywords: 'Blogs, Community Blog, Artikel, Beitraege, YourPart',
canonicalPath: '/blogs',
jsonLd: [
{
'@context': 'https://schema.org',
'@type': 'CollectionPage',
name: 'Blogs auf YourPart',
url: 'https://www.your-part.de/blogs',
description: 'Oeffentliche Blogs und Community-Beitraege auf YourPart.',
inLanguage: 'de',
},
],
},
},
},
];