mirror of
https://github.com/nuxt/ui.git
synced 2026-09-14 19:51:10 +08:00
docs: consistent canonical and markdown alternate across pages
This commit is contained in:
@@ -75,6 +75,8 @@ useSeoMeta({
|
||||
|
||||
const path = computed(() => route.path.replace(/\/$/, ''))
|
||||
|
||||
useCanonical(computed(() => `/raw${path.value}.md`))
|
||||
|
||||
if (import.meta.server) {
|
||||
if (route.path.startsWith('/docs/components/')) {
|
||||
defineOgImage('Component.takumi', {
|
||||
@@ -106,8 +108,6 @@ if (import.meta.server) {
|
||||
])
|
||||
}
|
||||
|
||||
useCanonical(computed(() => `${path.value}.md`))
|
||||
|
||||
const { open, ask } = useChat()
|
||||
const studioIcons = useStudioIcons()
|
||||
|
||||
|
||||
+11
-13
@@ -44,9 +44,18 @@ const pills = computed(() => presets.map(preset => ({
|
||||
apply: () => applyPreset(preset)
|
||||
})))
|
||||
|
||||
if (import.meta.server) {
|
||||
prerenderRoutes(['/raw/index.md'])
|
||||
useSeoMeta({
|
||||
titleTemplate: '%s - Nuxt UI',
|
||||
title: page.value.title,
|
||||
description: page.value.description,
|
||||
ogTitle: `${page.value.title} - Nuxt UI`,
|
||||
ogDescription: page.value.description,
|
||||
ogImage: joinURL(url, '/og-image.png')
|
||||
})
|
||||
|
||||
useCanonical('/raw/index.md')
|
||||
|
||||
if (import.meta.server) {
|
||||
useSchemaOrg([
|
||||
defineSoftwareApp({
|
||||
name: 'Nuxt UI',
|
||||
@@ -56,17 +65,6 @@ if (import.meta.server) {
|
||||
})
|
||||
])
|
||||
}
|
||||
|
||||
useCanonical('/raw/index.md')
|
||||
|
||||
useSeoMeta({
|
||||
titleTemplate: '%s - Nuxt UI',
|
||||
title: page.value.title,
|
||||
description: page.value.description,
|
||||
ogTitle: `${page.value.title} - Nuxt UI`,
|
||||
ogDescription: page.value.description,
|
||||
ogImage: joinURL(url, '/og-image.png')
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
+2
-2
@@ -433,8 +433,8 @@ export default defineNuxtConfig({
|
||||
domain: 'https://ui.nuxt.com',
|
||||
title: 'Nuxt UI',
|
||||
description: 'A comprehensive Vue UI component library (Nuxt optional) with 125+ accessible, production-ready, Tailwind CSS components for building modern web applications.',
|
||||
// Disable content module's built-in raw markdown route - we use our own custom handler
|
||||
// in server/routes/raw/[...slug].md.get.ts that applies MDC transformations
|
||||
// Disable content module's built-in raw markdown route, `/raw/**` is served
|
||||
// by nuxt-agent-discovery through the adapter in server/plugins/agent-discovery.ts
|
||||
contentRawMarkdown: false,
|
||||
full: {
|
||||
title: 'Nuxt UI Full Documentation',
|
||||
|
||||
Reference in New Issue
Block a user