docus 3.0.3-20250617-182953-de4d23b → 3.0.3-20250620-102800-e35b7aa

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/app.vue CHANGED
@@ -2,7 +2,9 @@
2
2
  const { seo } = useAppConfig()
3
3
  const site = useSiteConfig()
4
4
 
5
- const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'))
5
+ const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'), {
6
+ transform: data => data.find(item => item.path === '/docs')?.children || data || [],
7
+ })
6
8
  const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('docs'), {
7
9
  server: false,
8
10
  })
@@ -43,7 +43,7 @@ const items = [
43
43
  label: 'Copy Markdown link',
44
44
  icon: 'i-lucide-link',
45
45
  onSelect() {
46
- navigator.clipboard.writeText(`${window.location.origin}/raw${route.path}.md`)
46
+ copyToClipboard(`${window.location.origin}/raw${route.path}.md`)
47
47
  },
48
48
  },
49
49
  {
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import type { ContentNavigationItem } from '@nuxt/content'
3
3
  import { kebabCase } from 'scule'
4
+ import { addPrerenderPath } from '../utils/prerender'
4
5
  import { findPageHeadline } from '#ui-pro/utils/content'
5
6
 
6
7
  definePageMeta({
@@ -24,6 +25,9 @@ if (!page.value) {
24
25
  throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
25
26
  }
26
27
 
28
+ // Add the page path to the prerender list
29
+ addPrerenderPath(`/raw${route.path}.md`)
30
+
27
31
  const title = page.value.seo?.title || page.value.title
28
32
  const description = page.value.seo?.description || page.value.description
29
33
 
@@ -32,6 +32,5 @@ else {
32
32
  <ContentRenderer
33
33
  v-if="page"
34
34
  :value="page"
35
- :prose="false"
36
35
  />
37
36
  </template>
@@ -0,0 +1,12 @@
1
+ export const addPrerenderPath = (path: string) => {
2
+ const event = useRequestEvent()
3
+ if (event) {
4
+ event.node.res.setHeader(
5
+ 'x-nitro-prerender',
6
+ [
7
+ event.node.res.getHeader('x-nitro-prerender'),
8
+ path,
9
+ ].filter(Boolean).join(','),
10
+ )
11
+ }
12
+ }
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.3-20250617-182953-de4d23b",
9
+ "version": "3.0.3-20250620-102800-e35b7aa",
10
10
  "keywords": [],
11
11
  "license": "MIT",
12
12
  "bin": {