docus 3.0.1-20250613-165811-26be282 → 3.0.1-20250616-151653-2de5ffe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/app/pages/[...slug].vue +10 -7
- package/package.json +2 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { ContentNavigationItem } from '@nuxt/content'
|
|
3
|
+
import { kebabCase } from 'scule'
|
|
3
4
|
import { findPageHeadline } from '#ui-pro/utils/content'
|
|
4
5
|
|
|
5
6
|
definePageMeta({
|
|
@@ -10,17 +11,19 @@ const route = useRoute()
|
|
|
10
11
|
const appConfig = useAppConfig()
|
|
11
12
|
const navigation = inject<Ref<ContentNavigationItem[]>>('navigation')
|
|
12
13
|
|
|
13
|
-
const { data: page }
|
|
14
|
+
const [{ data: page }, { data: surround }] = await Promise.all([
|
|
15
|
+
useAsyncData(kebabCase(route.path), () => queryCollection('docs').path(route.path).first()),
|
|
16
|
+
useAsyncData(`${kebabCase(route.path)}-surround`, () => {
|
|
17
|
+
return queryCollectionItemSurroundings('docs', route.path, {
|
|
18
|
+
fields: ['description'],
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
])
|
|
22
|
+
|
|
14
23
|
if (!page.value) {
|
|
15
24
|
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
|
|
16
25
|
}
|
|
17
26
|
|
|
18
|
-
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => {
|
|
19
|
-
return queryCollectionItemSurroundings('docs', route.path, {
|
|
20
|
-
fields: ['description'],
|
|
21
|
-
})
|
|
22
|
-
})
|
|
23
|
-
|
|
24
27
|
const title = page.value.seo?.title || page.value.title
|
|
25
28
|
const description = page.value.seo?.description || page.value.description
|
|
26
29
|
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/nuxtlabs/docus"
|
|
7
7
|
},
|
|
8
8
|
"private": false,
|
|
9
|
-
"version": "3.0.1-
|
|
9
|
+
"version": "3.0.1-20250616-151653-2de5ffe",
|
|
10
10
|
"keywords": [],
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"bin": {
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"nuxt-llms": "^0.1.3",
|
|
50
50
|
"nuxt-og-image": "^5.1.6",
|
|
51
51
|
"pkg-types": "^2.1.0",
|
|
52
|
+
"scule": "^1.3.0",
|
|
52
53
|
"tailwindcss": "^4.1.8",
|
|
53
54
|
"ufo": "^1.6.1",
|
|
54
55
|
"unctx": "^2.4.1"
|