Skip to content

Commit 2f291b6

Browse files
committed
docs: move to /docs
1 parent 8c0693b commit 2f291b6

40 files changed

+51
-54
lines changed

docs/app/app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ const links = computed(() => {
3737
return [{
3838
label: 'Docs',
3939
icon: 'i-lucide-book',
40-
to: '/getting-started',
41-
active: route.path.startsWith('/getting-started') || route.path.startsWith('/components'),
40+
to: '/docs/getting-started',
41+
active: route.path.startsWith('/docs'),
4242
}].filter(Boolean)
4343
})
4444

docs/app/error.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const props = defineProps<{
66
error: NuxtError
77
}>()
88
9+
const route = useRoute()
910
const appConfig = useAppConfig()
1011
const colorMode = useColorMode()
1112
@@ -14,6 +15,15 @@ const { data: files } = await useAsyncData('files', () => queryCollectionSearchS
1415
1516
const color = computed(() => colorMode.value === 'dark' ? colors[appConfig.ui.colors.neutral as keyof typeof colors][900] : 'white')
1617
18+
const links = computed(() => {
19+
return [{
20+
label: 'Docs',
21+
icon: 'i-lucide-book',
22+
to: '/docs/getting-started',
23+
active: route.path.startsWith('/docs'),
24+
}].filter(Boolean)
25+
})
26+
1727
useHead({
1828
meta: [
1929
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },

docs/app/layouts/docs.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { ContentNavigationItem } from '@nuxt/content'
33
44
const nav = inject<Ref<ContentNavigationItem[]>>('navigation')
55
6-
const navigation = computed(() => nav?.value.filter(item => !item._path.startsWith('/pro')))
6+
const navigation = computed(() => nav?.value.find(item => item.path === '/docs')?.children || [])
77
</script>
88

99
<template>

docs/app/pages/roadmap.vue

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/content.config.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1-
import { defineCollection } from '@nuxt/content'
1+
import { defineCollection, z } from '@nuxt/content'
22

33
export const collections = {
44
docs: defineCollection({
55
type: 'page',
6-
source: '**',
6+
source: {
7+
path: 'docs/**',
8+
prefix: '/docs',
9+
},
10+
schema: z.object({
11+
links: z.array(z.object({
12+
label: z.string(),
13+
icon: z.string(),
14+
avatar: z.object({
15+
src: z.string(),
16+
alt: z.string(),
17+
}).optional(),
18+
to: z.string(),
19+
target: z.string().optional(),
20+
})).optional(),
21+
}),
722
}),
823
}

docs/content/1.getting-started/.navigation.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/content/3.api/.navigation.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
title: Getting Started
2+
icon: i-lucide-square-play

docs/content/1.getting-started/1.index.md renamed to docs/content/docs/1.getting-started/1.index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ The new collections system provides automatic TypeScript types for all your data
4242
:hr
4343

4444
We're excited for you to explore these new capabilities. Dive into our documentation to learn more about integrating the module and implementing best practices in your next project.
45+
46+
## Content V2 Migration
47+
48+
Learn how to migrate from Content v2 to v3 in the [migration guide](/docs/getting-started/migration).

0 commit comments

Comments
 (0)