feat(threads): add SEO metadata, sitemap, and structured data

Include /threads in sitemap and set canonical paths
Generate DiscussionForumPosting structured data for thread details
Add dynamic SEO updates for thread navigation and server-side rendering
This commit is contained in:
2026-05-07 13:46:08 +08:00
parent 520d988589
commit 4a7309027a
8 changed files with 92 additions and 8 deletions

View File

@@ -1,8 +1,14 @@
<script setup lang="ts">
import type { RouteLocationNormalizedLoaded } from 'vue-router';
import ThreadsView from '../../src/views/ThreadsView.vue';
definePageMeta({
title: 'Threads'
name: 'thread-detail',
seo: {
titleKey: 'pages.threads.title',
descriptionKey: 'seo.threadsDescription',
canonicalPath: (route: RouteLocationNormalizedLoaded) => `/threads/${String(route.params.id)}`
}
});
</script>

View File

@@ -2,7 +2,8 @@
import ThreadsView from '../../src/views/ThreadsView.vue';
definePageMeta({
title: 'Threads'
name: 'threads',
seo: { titleKey: 'pages.threads.title', descriptionKey: 'seo.threadsDescription', canonicalPath: '/threads' }
});
</script>