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:
@@ -1,4 +1,4 @@
|
||||
import { resolvedSeoHead, resolveSeo, type SeoConfig } from '../src/seo';
|
||||
import { resolvedSeoHead, resolveSeo, threadSeoConfig, type SeoConfig } from '../src/seo';
|
||||
import { api } from '../src/services/api';
|
||||
|
||||
export default defineNuxtPlugin(async () => {
|
||||
@@ -68,6 +68,11 @@ async function detailSeo(
|
||||
image: recipe.item.image?.url
|
||||
};
|
||||
}
|
||||
|
||||
if (routeName === 'thread-detail') {
|
||||
const thread = await api.thread(routeId);
|
||||
return threadSeoConfig(thread, t);
|
||||
}
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user