docus 3.0.5-20250630-154143-16b60a9 → 3.0.5-20250630-154807-1588c45
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.config.ts +3 -0
- package/app/app/components/docs/DocsAsideRightBottom.vue +4 -4
- package/app/app/components/docs/DocsPageHeaderLinks.vue +38 -54
- package/app/app/layouts/docs.vue +0 -1
- package/app/app/pages/[...slug].vue +22 -4
- package/app/nuxt.config.ts +9 -0
- package/app/nuxt.schema.ts +17 -16
- package/package.json +1 -1
package/app/app/app.config.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const appConfig = useAppConfig()
|
|
3
|
+
</script>
|
|
4
|
+
|
|
1
5
|
<template>
|
|
2
6
|
<div
|
|
3
7
|
v-if="appConfig.toc?.bottom?.links?.length"
|
|
@@ -11,7 +15,3 @@
|
|
|
11
15
|
/>
|
|
12
16
|
</div>
|
|
13
17
|
</template>
|
|
14
|
-
|
|
15
|
-
<script setup lang="ts">
|
|
16
|
-
const appConfig = useAppConfig()
|
|
17
|
-
</script>
|
|
@@ -1,43 +1,9 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<UButtonGroup>
|
|
3
|
-
<UButton
|
|
4
|
-
label="Copy page"
|
|
5
|
-
:icon="copyStatus === 'copied' ? 'i-lucide-copy-check' : 'i-lucide-copy'"
|
|
6
|
-
color="neutral"
|
|
7
|
-
variant="outline"
|
|
8
|
-
:loading="copyStatus === 'copying'"
|
|
9
|
-
size="xs"
|
|
10
|
-
:ui="{
|
|
11
|
-
leadingIcon: [copyStatus === 'copied' ? 'text-primary' : 'text-neutral', 'size-3.5'],
|
|
12
|
-
}"
|
|
13
|
-
@click="copyPage"
|
|
14
|
-
/>
|
|
15
|
-
<UDropdownMenu
|
|
16
|
-
size="sm"
|
|
17
|
-
:items="items"
|
|
18
|
-
:content="{
|
|
19
|
-
align: 'end',
|
|
20
|
-
side: 'bottom',
|
|
21
|
-
sideOffset: 8,
|
|
22
|
-
}"
|
|
23
|
-
:ui="{
|
|
24
|
-
content: 'w-48',
|
|
25
|
-
}"
|
|
26
|
-
>
|
|
27
|
-
<UButton
|
|
28
|
-
icon="i-lucide-chevron-down"
|
|
29
|
-
size="sm"
|
|
30
|
-
color="neutral"
|
|
31
|
-
variant="outline"
|
|
32
|
-
/>
|
|
33
|
-
</UDropdownMenu>
|
|
34
|
-
</UButtonGroup>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
1
|
<script setup lang="ts">
|
|
2
|
+
import { useClipboard } from '@vueuse/core'
|
|
3
|
+
|
|
38
4
|
const route = useRoute()
|
|
39
5
|
const toast = useToast()
|
|
40
|
-
const
|
|
6
|
+
const { copy, copied } = useClipboard()
|
|
41
7
|
|
|
42
8
|
const markdownLink = computed(() => `${window?.location?.origin}/raw${route.path}.md`)
|
|
43
9
|
|
|
@@ -46,7 +12,8 @@ const items = [
|
|
|
46
12
|
label: 'Copy Markdown link',
|
|
47
13
|
icon: 'i-lucide-link',
|
|
48
14
|
onSelect() {
|
|
49
|
-
|
|
15
|
+
copy(markdownLink.value)
|
|
16
|
+
|
|
50
17
|
toast.add({
|
|
51
18
|
title: 'Markdown link copied to clipboard',
|
|
52
19
|
icon: 'i-lucide-check-circle',
|
|
@@ -73,21 +40,38 @@ const items = [
|
|
|
73
40
|
to: `https://claude.ai/new?q=${encodeURIComponent(`Read ${markdownLink.value} so I can ask questions about it.`)}`,
|
|
74
41
|
},
|
|
75
42
|
]
|
|
43
|
+
</script>
|
|
76
44
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
45
|
+
<template>
|
|
46
|
+
<UButtonGroup size="sm">
|
|
47
|
+
<UButton
|
|
48
|
+
label="Copy page"
|
|
49
|
+
:icon="copied ? 'i-lucide-copy-check' : 'i-lucide-copy'"
|
|
50
|
+
color="neutral"
|
|
51
|
+
variant="outline"
|
|
52
|
+
:ui="{
|
|
53
|
+
leadingIcon: [copied ? 'text-primary' : 'text-neutral', 'size-3.5'],
|
|
54
|
+
}"
|
|
55
|
+
@click="copy(markdownLink)"
|
|
56
|
+
/>
|
|
86
57
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
58
|
+
<UDropdownMenu
|
|
59
|
+
size="sm"
|
|
60
|
+
:items="items"
|
|
61
|
+
:content="{
|
|
62
|
+
align: 'end',
|
|
63
|
+
side: 'bottom',
|
|
64
|
+
sideOffset: 8,
|
|
65
|
+
}"
|
|
66
|
+
:ui="{
|
|
67
|
+
content: 'w-48',
|
|
68
|
+
}"
|
|
69
|
+
>
|
|
70
|
+
<UButton
|
|
71
|
+
icon="i-lucide-chevron-down"
|
|
72
|
+
color="neutral"
|
|
73
|
+
variant="outline"
|
|
74
|
+
/>
|
|
75
|
+
</UDropdownMenu>
|
|
76
|
+
</UButtonGroup>
|
|
77
|
+
</template>
|
package/app/app/layouts/docs.vue
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { ContentNavigationItem } from '@nuxt/content'
|
|
3
2
|
import { kebabCase } from 'scule'
|
|
4
|
-
import {
|
|
3
|
+
import type { ContentNavigationItem } from '@nuxt/content'
|
|
5
4
|
import { findPageHeadline } from '@nuxt/content/utils'
|
|
5
|
+
import { addPrerenderPath } from '../utils/prerender'
|
|
6
6
|
|
|
7
7
|
definePageMeta({
|
|
8
8
|
layout: 'docs',
|
|
@@ -44,7 +44,18 @@ defineOgImageComponent('Docs', {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
const editLink = computed(() => {
|
|
47
|
-
|
|
47
|
+
if (!appConfig.github) {
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return [
|
|
52
|
+
appConfig.github.url,
|
|
53
|
+
'edit',
|
|
54
|
+
appConfig.github.branch,
|
|
55
|
+
appConfig.github.rootDir,
|
|
56
|
+
'content',
|
|
57
|
+
`${page.value?.stem}.${page.value?.extension}`,
|
|
58
|
+
].filter(Boolean).join('/')
|
|
48
59
|
})
|
|
49
60
|
</script>
|
|
50
61
|
|
|
@@ -53,13 +64,19 @@ const editLink = computed(() => {
|
|
|
53
64
|
<UPageHeader
|
|
54
65
|
:title="page.title"
|
|
55
66
|
:description="page.description"
|
|
56
|
-
:links="page.links"
|
|
57
67
|
:headline="headline"
|
|
58
68
|
:ui="{
|
|
59
69
|
wrapper: 'flex-row items-center flex-wrap justify-between',
|
|
60
70
|
}"
|
|
61
71
|
>
|
|
62
72
|
<template #links>
|
|
73
|
+
<UButton
|
|
74
|
+
v-for="(link, index) in page.links"
|
|
75
|
+
:key="index"
|
|
76
|
+
size="sm"
|
|
77
|
+
v-bind="link"
|
|
78
|
+
/>
|
|
79
|
+
|
|
63
80
|
<DocsPageHeaderLinks />
|
|
64
81
|
</template>
|
|
65
82
|
</UPageHeader>
|
|
@@ -106,6 +123,7 @@ const editLink = computed(() => {
|
|
|
106
123
|
#right
|
|
107
124
|
>
|
|
108
125
|
<UContentToc
|
|
126
|
+
highlight
|
|
109
127
|
:title="appConfig.toc?.title || 'Table of Contents'"
|
|
110
128
|
:links="page.body?.toc?.links"
|
|
111
129
|
>
|
package/app/nuxt.config.ts
CHANGED
|
@@ -26,6 +26,15 @@ export default defineNuxtConfig({
|
|
|
26
26
|
enabled: dev,
|
|
27
27
|
},
|
|
28
28
|
css: ['../app/assets/css/main.css'],
|
|
29
|
+
content: {
|
|
30
|
+
build: {
|
|
31
|
+
markdown: {
|
|
32
|
+
highlight: {
|
|
33
|
+
langs: ['bash', 'diff', 'json', 'js', 'ts', 'html', 'css', 'vue', 'shell', 'mdc', 'md', 'yaml'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
29
38
|
future: {
|
|
30
39
|
compatibilityVersion: 4,
|
|
31
40
|
},
|
package/app/nuxt.schema.ts
CHANGED
|
@@ -189,13 +189,27 @@ export default defineNuxtSchema({
|
|
|
189
189
|
github: group({
|
|
190
190
|
title: 'GitHub',
|
|
191
191
|
description: 'GitHub configuration.',
|
|
192
|
-
icon: 'i-
|
|
192
|
+
icon: 'i-simple-icons-github',
|
|
193
193
|
fields: {
|
|
194
194
|
url: field({
|
|
195
195
|
type: 'string',
|
|
196
196
|
title: 'URL',
|
|
197
197
|
description: 'GitHub URL.',
|
|
198
|
-
icon: 'i-
|
|
198
|
+
icon: 'i-simple-icons-github',
|
|
199
|
+
default: '',
|
|
200
|
+
}),
|
|
201
|
+
branch: field({
|
|
202
|
+
type: 'string',
|
|
203
|
+
title: 'Branch',
|
|
204
|
+
description: 'GitHub branch.',
|
|
205
|
+
icon: 'i-lucide-git-branch',
|
|
206
|
+
default: 'main',
|
|
207
|
+
}),
|
|
208
|
+
rootDir: field({
|
|
209
|
+
type: 'string',
|
|
210
|
+
title: 'Root Directory',
|
|
211
|
+
description: 'Root directory of the GitHub repository.',
|
|
212
|
+
icon: 'i-lucide-folder',
|
|
199
213
|
default: '',
|
|
200
214
|
}),
|
|
201
215
|
},
|
|
@@ -210,20 +224,6 @@ declare module '@nuxt/schema' {
|
|
|
210
224
|
title: string
|
|
211
225
|
description: string
|
|
212
226
|
}
|
|
213
|
-
ui: {
|
|
214
|
-
colors: {
|
|
215
|
-
primary: string
|
|
216
|
-
neutral: string
|
|
217
|
-
}
|
|
218
|
-
icons: {
|
|
219
|
-
search: string
|
|
220
|
-
dark: string
|
|
221
|
-
light: string
|
|
222
|
-
external: string
|
|
223
|
-
chevron: string
|
|
224
|
-
hash: string
|
|
225
|
-
} & Record<string, string>
|
|
226
|
-
}
|
|
227
227
|
header: {
|
|
228
228
|
title: string
|
|
229
229
|
logo: {
|
|
@@ -250,6 +250,7 @@ declare module '@nuxt/schema' {
|
|
|
250
250
|
name: string
|
|
251
251
|
url: string
|
|
252
252
|
branch: string
|
|
253
|
+
rootDir?: string
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
256
|
}
|