docus 2.1.0 → 3.0.0-20250612-122343-26b92a7
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/LICENSE +1 -1
- package/README.md +33 -9
- package/app/app/app.config.ts +33 -0
- package/app/app/app.vue +54 -0
- package/app/app/assets/css/main.css +5 -0
- package/app/app/components/IconMenuToggle.vue +81 -0
- package/app/app/components/OgImage/OgImageDocs.vue +76 -0
- package/app/app/components/OgImage/OgImageLanding.vue +73 -0
- package/app/app/components/app/AppFooter.vue +40 -0
- package/app/app/components/app/AppHeader.vue +57 -0
- package/app/app/components/app/AppHeaderBody.vue +13 -0
- package/{dist/runtime/app/components/prose/ProseHr.vue → app/app/components/app/AppHeaderCTA.vue} +1 -1
- package/app/app/components/app/AppHeaderCenter.vue +6 -0
- package/app/app/components/app/AppHeaderLogo.vue +16 -0
- package/{dist/runtime/app/components/prose/ProseParagraph.vue → app/app/components/docs/DocsAsideLeftTop.vue} +1 -1
- package/app/app/components/docs/DocsAsideRightBottom.vue +17 -0
- package/app/app/components/docs/DocsPageHeaderLinks.vue +91 -0
- package/app/app/error.vue +42 -0
- package/app/app/layouts/docs.vue +25 -0
- package/app/app/pages/[...slug].vue +111 -0
- package/app/app/pages/index.vue +37 -0
- package/app/content.config.ts +31 -0
- package/app/nuxt.config.ts +41 -0
- package/app/nuxt.schema.ts +255 -0
- package/app/server/routes/raw/[...slug].md.get.ts +24 -0
- package/dist/main.mjs +238 -0
- package/package.json +61 -78
- package/dist/index.cjs +0 -549
- package/dist/index.d.ts +0 -25
- package/dist/index.mjs +0 -523
- package/dist/runtime/app/components/DocusContent.vue +0 -215
- package/dist/runtime/app/components/DocusContent.vue.d.ts +0 -25
- package/dist/runtime/app/components/Error.vue +0 -19
- package/dist/runtime/app/components/Error.vue.d.ts +0 -9
- package/dist/runtime/app/components/Markdown.vue +0 -56
- package/dist/runtime/app/components/Markdown.vue.d.ts +0 -25
- package/dist/runtime/app/components/Page.vue +0 -29
- package/dist/runtime/app/components/Page.vue.d.ts +0 -2
- package/dist/runtime/app/components/Props.vue +0 -130
- package/dist/runtime/app/components/Props.vue.d.ts +0 -80
- package/dist/runtime/app/components/prose/ProseA.vue +0 -41
- package/dist/runtime/app/components/prose/ProseA.vue.d.ts +0 -23
- package/dist/runtime/app/components/prose/ProseBlockquote.vue +0 -5
- package/dist/runtime/app/components/prose/ProseCode.vue +0 -5
- package/dist/runtime/app/components/prose/ProseCodeInline.vue +0 -5
- package/dist/runtime/app/components/prose/ProseEm.vue +0 -5
- package/dist/runtime/app/components/prose/ProseH1.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH2.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH3.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH4.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH5.vue +0 -3
- package/dist/runtime/app/components/prose/ProseH6.vue +0 -3
- package/dist/runtime/app/components/prose/ProseImg.vue +0 -32
- package/dist/runtime/app/components/prose/ProseImg.vue.d.ts +0 -21
- package/dist/runtime/app/components/prose/ProseLi.vue +0 -3
- package/dist/runtime/app/components/prose/ProseOl.vue +0 -5
- package/dist/runtime/app/components/prose/ProseStrong.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTable.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTbody.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTd.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTh.vue +0 -5
- package/dist/runtime/app/components/prose/ProseThead.vue +0 -5
- package/dist/runtime/app/components/prose/ProseTr.vue +0 -5
- package/dist/runtime/app/components/prose/ProseUl.vue +0 -5
- package/dist/runtime/app/composables/helpers.d.ts +0 -4
- package/dist/runtime/app/composables/helpers.js +0 -66
- package/dist/runtime/app/composables/helpers.mjs +0 -40
- package/dist/runtime/app/composables/index.d.ts +0 -90
- package/dist/runtime/app/composables/index.js +0 -108
- package/dist/runtime/app/composables/index.mjs +0 -63
- package/dist/runtime/app/composables/navigation.d.ts +0 -37
- package/dist/runtime/app/composables/navigation.js +0 -227
- package/dist/runtime/app/composables/navigation.mjs +0 -148
- package/dist/runtime/app/composables/store.d.ts +0 -7
- package/dist/runtime/app/composables/store.js +0 -52
- package/dist/runtime/app/composables/store.mjs +0 -35
- package/dist/runtime/app/composables/style.d.ts +0 -11
- package/dist/runtime/app/composables/style.js +0 -117
- package/dist/runtime/app/composables/style.mjs +0 -71
- package/dist/runtime/app/composables/theme-colors.d.ts +0 -30
- package/dist/runtime/app/composables/theme-colors.js +0 -80
- package/dist/runtime/app/composables/theme-colors.mjs +0 -48
- package/dist/runtime/app/composables/websocket.d.ts +0 -3
- package/dist/runtime/app/composables/websocket.js +0 -79
- package/dist/runtime/app/composables/websocket.mjs +0 -63
- package/dist/runtime/app/layouts/default.vue +0 -5
- package/dist/runtime/app/layouts/error.vue +0 -33
- package/dist/runtime/app/layouts/error.vue.d.ts +0 -21
- package/dist/runtime/app/pages/_.vue +0 -222
- package/dist/runtime/app/pages/_.vue.d.ts +0 -2
- package/dist/runtime/context.d.ts +0 -1
- package/dist/runtime/context.js +0 -17
- package/dist/runtime/context.mjs +0 -5
- package/dist/runtime/database/Query.d.ts +0 -18
- package/dist/runtime/database/Query.js +0 -68
- package/dist/runtime/database/Query.mjs +0 -49
- package/dist/runtime/database/index.d.ts +0 -4
- package/dist/runtime/database/index.js +0 -45
- package/dist/runtime/database/index.mjs +0 -25
- package/dist/runtime/database/providers/local/Query.d.ts +0 -14
- package/dist/runtime/database/providers/local/Query.js +0 -85
- package/dist/runtime/database/providers/local/Query.mjs +0 -60
- package/dist/runtime/database/providers/local/index.d.ts +0 -3
- package/dist/runtime/database/providers/local/index.js +0 -63
- package/dist/runtime/database/providers/local/index.mjs +0 -39
- package/dist/runtime/database/providers/local/operations.d.ts +0 -2
- package/dist/runtime/database/providers/local/operations.js +0 -83
- package/dist/runtime/database/providers/local/operations.mjs +0 -53
- package/dist/runtime/database/providers/local/utils.d.ts +0 -8
- package/dist/runtime/database/providers/local/utils.js +0 -28
- package/dist/runtime/database/providers/local/utils.mjs +0 -17
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.js +0 -44
- package/dist/runtime/index.mjs +0 -3
- package/dist/runtime/navigation.d.ts +0 -4
- package/dist/runtime/navigation.js +0 -176
- package/dist/runtime/navigation.mjs +0 -137
- package/dist/runtime/server/api/get.d.ts +0 -10
- package/dist/runtime/server/api/get.js +0 -24
- package/dist/runtime/server/api/get.mjs +0 -13
- package/dist/runtime/server/api/list.d.ts +0 -9
- package/dist/runtime/server/api/list.js +0 -34
- package/dist/runtime/server/api/list.mjs +0 -18
- package/dist/runtime/server/api/navigation.d.ts +0 -7
- package/dist/runtime/server/api/navigation.js +0 -20
- package/dist/runtime/server/api/navigation.mjs +0 -10
- package/dist/runtime/server/api/preview.d.ts +0 -3
- package/dist/runtime/server/api/preview.js +0 -54
- package/dist/runtime/server/api/preview.mjs +0 -31
- package/dist/runtime/server/api/reload.d.ts +0 -6
- package/dist/runtime/server/api/reload.js +0 -27
- package/dist/runtime/server/api/reload.mjs +0 -11
- package/dist/runtime/server/api/search.d.ts +0 -6
- package/dist/runtime/server/api/search.js +0 -27
- package/dist/runtime/server/api/search.mjs +0 -13
- package/dist/runtime/server/content.d.ts +0 -46
- package/dist/runtime/server/content.js +0 -175
- package/dist/runtime/server/content.mjs +0 -114
- package/dist/runtime/server/socket.d.ts +0 -9
- package/dist/runtime/server/socket.js +0 -33
- package/dist/runtime/server/socket.mjs +0 -20
- package/dist/runtime/server/utils/cache.d.ts +0 -19
- package/dist/runtime/server/utils/cache.js +0 -110
- package/dist/runtime/server/utils/cache.mjs +0 -75
- package/dist/runtime/server/utils/index.d.ts +0 -4
- package/dist/runtime/server/utils/index.js +0 -18
- package/dist/runtime/server/utils/index.mjs +0 -8
- package/dist/runtime/transformers/index.d.ts +0 -1
- package/dist/runtime/transformers/index.js +0 -26
- package/dist/runtime/transformers/index.mjs +0 -11
- package/dist/runtime/transformers/json.d.ts +0 -3
- package/dist/runtime/transformers/json.js +0 -15
- package/dist/runtime/transformers/json.mjs +0 -5
- package/dist/runtime/transformers/markdown/index.d.ts +0 -8
- package/dist/runtime/transformers/markdown/index.js +0 -25
- package/dist/runtime/transformers/markdown/index.mjs +0 -16
- package/dist/runtime/transformers/utils/index.d.ts +0 -1
- package/dist/runtime/transformers/utils/index.js +0 -18
- package/dist/runtime/transformers/utils/index.mjs +0 -1
- package/dist/runtime/transformers/utils/path.d.ts +0 -26
- package/dist/runtime/transformers/utils/path.js +0 -88
- package/dist/runtime/transformers/utils/path.mjs +0 -56
- package/dist/runtime/utils/index.d.ts +0 -1
- package/dist/runtime/utils/index.js +0 -18
- package/dist/runtime/utils/index.mjs +0 -1
- package/dist/runtime/utils/log.d.ts +0 -1
- package/dist/runtime/utils/log.js +0 -14
- package/dist/runtime/utils/log.mjs +0 -2
- package/dist/runtime/utils/object.d.ts +0 -9
- package/dist/runtime/utils/object.js +0 -22
- package/dist/runtime/utils/object.mjs +0 -4
- package/dist/templates/content.mjs +0 -50
- package/dist/templates/docus.mjs +0 -13
- package/dist/templates/hot.mjs +0 -16
- package/dist/templates/i18n.mjs +0 -23
- package/dist/templates/options.mjs +0 -46
- package/shims.d.ts +0 -24
- package/types.d.ts +0 -397
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
[](https://docus.dev)
|
|
2
|
+
|
|
3
|
+
# Docus
|
|
4
|
+
|
|
5
|
+
Documentation Theme and CLI to write beautiful docs with Markdown.
|
|
6
|
+
|
|
7
|
+
Ship fast, flexible, and SEO-optimized documentation with beautiful design out of the box. Docus brings together the best of the Nuxt ecosystem:
|
|
8
|
+
- [Nuxt 3](https://nuxt.com)
|
|
9
|
+
- [Nuxt Content](https://content.nuxt.com/)
|
|
10
|
+
- [Nuxt UI](https://ui.nuxt.com/)
|
|
11
|
+
- [Nuxt Image](https://image.nuxt.com/)
|
|
12
|
+
- [Nuxt LLMs](https://github.com/nuxtlabs/nuxt-llms)
|
|
13
|
+
- [UnJS ecosystem](https://unjs.io/)
|
|
14
|
+
- [Nuxt Studio](https://content.nuxt.com/studio)
|
|
15
|
+
|
|
16
|
+
## Contribution
|
|
17
|
+
|
|
18
|
+
<details>
|
|
19
|
+
<summary>Local development</summary>
|
|
20
|
+
|
|
21
|
+
- Clone this repository
|
|
22
|
+
- Install the latest LTS version of [Node.js](https://nodejs.org/en/)
|
|
23
|
+
- Install dependencies using `pnpm install`
|
|
24
|
+
- Run prepare command using `pnpm run dev:prepare`
|
|
25
|
+
- Run dev documentation built on top of Docus using `pnpm run dev`
|
|
26
|
+
|
|
27
|
+
</details>
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
Published under the [MIT](https://github.com/unjs/undocs/blob/main/LICENSE) license.
|
|
32
|
+
|
|
33
|
+
Docus v3 has been entirely rewritten from scratch and is inspired and copied from [undocs](https://github.com/unjs/undocs) made by [@pi0](https://github.com/pi0) 💚
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default defineAppConfig({
|
|
2
|
+
ui: {
|
|
3
|
+
colors: {
|
|
4
|
+
primary: 'emerald',
|
|
5
|
+
neutral: 'zinc',
|
|
6
|
+
},
|
|
7
|
+
},
|
|
8
|
+
uiPro: {
|
|
9
|
+
contentNavigation: {
|
|
10
|
+
slots: {
|
|
11
|
+
linkLeadingIcon: 'size-4 mr-1',
|
|
12
|
+
listWithChildren: 'border-(--ui-bg-elevated)',
|
|
13
|
+
linkTrailing: 'hidden',
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
active: {
|
|
17
|
+
false: {
|
|
18
|
+
link: 'text-toned hover:after:bg-accented',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
pageLinks: {
|
|
24
|
+
slots: {
|
|
25
|
+
linkLeadingIcon: 'size-4',
|
|
26
|
+
linkLabelExternalIcon: 'size-2.5',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
toc: {
|
|
31
|
+
title: 'On this page',
|
|
32
|
+
},
|
|
33
|
+
})
|
package/app/app/app.vue
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { seo } = useAppConfig()
|
|
3
|
+
const site = useSiteConfig()
|
|
4
|
+
|
|
5
|
+
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'))
|
|
6
|
+
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('docs'), {
|
|
7
|
+
server: false,
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
useHead({
|
|
11
|
+
meta: [
|
|
12
|
+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
13
|
+
],
|
|
14
|
+
link: [
|
|
15
|
+
{ rel: 'icon', href: '/favicon.ico' },
|
|
16
|
+
],
|
|
17
|
+
htmlAttrs: {
|
|
18
|
+
lang: 'en',
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
useSeoMeta({
|
|
23
|
+
titleTemplate: seo.titleTemplate,
|
|
24
|
+
title: seo.title,
|
|
25
|
+
description: seo.description,
|
|
26
|
+
ogSiteName: site.name,
|
|
27
|
+
twitterCard: 'summary_large_image',
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
provide('navigation', navigation)
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<UApp>
|
|
35
|
+
<NuxtLoadingIndicator color="var(--ui-primary)" />
|
|
36
|
+
|
|
37
|
+
<AppHeader />
|
|
38
|
+
|
|
39
|
+
<UMain>
|
|
40
|
+
<NuxtLayout>
|
|
41
|
+
<NuxtPage />
|
|
42
|
+
</NuxtLayout>
|
|
43
|
+
</UMain>
|
|
44
|
+
|
|
45
|
+
<AppFooter />
|
|
46
|
+
|
|
47
|
+
<ClientOnly>
|
|
48
|
+
<LazyUContentSearch
|
|
49
|
+
:files="files"
|
|
50
|
+
:navigation="navigation"
|
|
51
|
+
/>
|
|
52
|
+
</ClientOnly>
|
|
53
|
+
</UApp>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { motion } from 'motion-v'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
open: boolean
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const lineVariants = {
|
|
9
|
+
normal: {
|
|
10
|
+
rotate: 0,
|
|
11
|
+
y: 0,
|
|
12
|
+
opacity: 1,
|
|
13
|
+
},
|
|
14
|
+
close: (custom: number) => ({
|
|
15
|
+
rotate: custom === 1 ? 45 : custom === 3 ? -45 : 0,
|
|
16
|
+
y: custom === 1 ? 6 : custom === 3 ? -6 : 0,
|
|
17
|
+
opacity: custom === 2 ? 0 : 1,
|
|
18
|
+
transition: {
|
|
19
|
+
type: 'spring',
|
|
20
|
+
stiffness: 260,
|
|
21
|
+
damping: 20,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const state = computed(() => {
|
|
27
|
+
return props.open ? 'close' : 'normal'
|
|
28
|
+
})
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<UButton
|
|
33
|
+
size="sm"
|
|
34
|
+
variant="ghost"
|
|
35
|
+
color="neutral"
|
|
36
|
+
class="-me-1.5"
|
|
37
|
+
square
|
|
38
|
+
>
|
|
39
|
+
<svg
|
|
40
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
+
class="size-5"
|
|
42
|
+
viewBox="0 0 24 24"
|
|
43
|
+
fill="none"
|
|
44
|
+
stroke="currentColor"
|
|
45
|
+
stroke-width="2"
|
|
46
|
+
stroke-linecap="round"
|
|
47
|
+
stroke-linejoin="round"
|
|
48
|
+
>
|
|
49
|
+
<motion.line
|
|
50
|
+
x1="4"
|
|
51
|
+
y1="6"
|
|
52
|
+
x2="20"
|
|
53
|
+
y2="6"
|
|
54
|
+
:variants="lineVariants"
|
|
55
|
+
:animate="state"
|
|
56
|
+
:custom="1"
|
|
57
|
+
class="outline-none"
|
|
58
|
+
/>
|
|
59
|
+
<motion.line
|
|
60
|
+
x1="4"
|
|
61
|
+
y1="12"
|
|
62
|
+
x2="20"
|
|
63
|
+
y2="12"
|
|
64
|
+
:variants="lineVariants"
|
|
65
|
+
:animate="state"
|
|
66
|
+
:custom="2"
|
|
67
|
+
class="outline-none"
|
|
68
|
+
/>
|
|
69
|
+
<motion.line
|
|
70
|
+
x1="4"
|
|
71
|
+
y1="18"
|
|
72
|
+
x2="20"
|
|
73
|
+
y2="18"
|
|
74
|
+
:variants="lineVariants"
|
|
75
|
+
:animate="state"
|
|
76
|
+
:custom="3"
|
|
77
|
+
class="outline-none"
|
|
78
|
+
/>
|
|
79
|
+
</svg>
|
|
80
|
+
</UButton>
|
|
81
|
+
</template>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const props = withDefaults(defineProps<{ title?: string, description?: string, headline?: string }>(), {
|
|
3
|
+
title: 'title',
|
|
4
|
+
description: 'description',
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const title = computed(() => (props.title || '').slice(0, 60))
|
|
8
|
+
const description = computed(() => (props.description || '').slice(0, 200))
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div class="w-full h-full flex flex-col justify-center bg-neutral-900">
|
|
13
|
+
<svg
|
|
14
|
+
class="absolute right-0 top-0 opacity-50"
|
|
15
|
+
width="629"
|
|
16
|
+
height="593"
|
|
17
|
+
viewBox="0 0 629 593"
|
|
18
|
+
fill="none"
|
|
19
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
+
>
|
|
21
|
+
<g filter="url(#filter0_f_199_94966)">
|
|
22
|
+
<path
|
|
23
|
+
d="M628.5 -578L639.334 -94.4223L806.598 -548.281L659.827 -87.387L965.396 -462.344L676.925 -74.0787L1087.69 -329.501L688.776 -55.9396L1160.22 -164.149L694.095 -34.9354L1175.13 15.7948L692.306 -13.3422L1130.8 190.83L683.602 6.50012L1032.04 341.989L668.927 22.4412L889.557 452.891L649.872 32.7537L718.78 511.519L628.5 36.32L538.22 511.519L607.128 32.7537L367.443 452.891L588.073 22.4412L224.955 341.989L573.398 6.50012L126.198 190.83L564.694 -13.3422L81.8734 15.7948L562.905 -34.9354L96.7839 -164.149L568.224 -55.9396L169.314 -329.501L580.075 -74.0787L291.604 -462.344L597.173 -87.387L450.402 -548.281L617.666 -94.4223L628.5 -578Z"
|
|
24
|
+
fill="white"
|
|
25
|
+
/>
|
|
26
|
+
</g>
|
|
27
|
+
<defs>
|
|
28
|
+
<filter
|
|
29
|
+
id="filter0_f_199_94966"
|
|
30
|
+
x="0.873535"
|
|
31
|
+
y="-659"
|
|
32
|
+
width="1255.25"
|
|
33
|
+
height="1251.52"
|
|
34
|
+
filterUnits="userSpaceOnUse"
|
|
35
|
+
color-interpolation-filters="sRGB"
|
|
36
|
+
>
|
|
37
|
+
<feFlood
|
|
38
|
+
flood-opacity="0"
|
|
39
|
+
result="BackgroundImageFix"
|
|
40
|
+
/>
|
|
41
|
+
<feBlend
|
|
42
|
+
mode="normal"
|
|
43
|
+
in="SourceGraphic"
|
|
44
|
+
in2="BackgroundImageFix"
|
|
45
|
+
result="shape"
|
|
46
|
+
/>
|
|
47
|
+
<feGaussianBlur
|
|
48
|
+
stdDeviation="40.5"
|
|
49
|
+
result="effect1_foregroundBlur_199_94966"
|
|
50
|
+
/>
|
|
51
|
+
</filter>
|
|
52
|
+
</defs>
|
|
53
|
+
</svg>
|
|
54
|
+
|
|
55
|
+
<div class="pl-[100px]">
|
|
56
|
+
<p
|
|
57
|
+
v-if="headline"
|
|
58
|
+
class="uppercase text-[24px] text-emerald-500 mb-4 font-semibold"
|
|
59
|
+
>
|
|
60
|
+
{{ headline }}
|
|
61
|
+
</p>
|
|
62
|
+
<h1
|
|
63
|
+
v-if="title"
|
|
64
|
+
class="m-0 text-[75px] font-semibold mb-4 text-white flex items-center"
|
|
65
|
+
>
|
|
66
|
+
<span>{{ title }}</span>
|
|
67
|
+
</h1>
|
|
68
|
+
<p
|
|
69
|
+
v-if="description"
|
|
70
|
+
class="text-[32px] text-neutral-300 leading-tight w-[700px]"
|
|
71
|
+
>
|
|
72
|
+
{{ description }}
|
|
73
|
+
</p>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const props = withDefaults(defineProps<{ title?: string, description?: string, headline?: string }>(), {
|
|
3
|
+
title: 'title',
|
|
4
|
+
description: 'description',
|
|
5
|
+
})
|
|
6
|
+
|
|
7
|
+
const title = computed(() => (props.title || '').slice(0, 60))
|
|
8
|
+
const description = computed(() => (props.description || '').slice(0, 200))
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div class="w-full h-full flex items-center justify-center bg-neutral-900">
|
|
13
|
+
<svg
|
|
14
|
+
class="absolute right-0 top-0 opacity-50 "
|
|
15
|
+
width="629"
|
|
16
|
+
height="593"
|
|
17
|
+
viewBox="0 0 629 593"
|
|
18
|
+
fill="none"
|
|
19
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
+
>
|
|
21
|
+
<g filter="url(#filter0_f_199_94966)">
|
|
22
|
+
<path
|
|
23
|
+
d="M628.5 -578L639.334 -94.4223L806.598 -548.281L659.827 -87.387L965.396 -462.344L676.925 -74.0787L1087.69 -329.501L688.776 -55.9396L1160.22 -164.149L694.095 -34.9354L1175.13 15.7948L692.306 -13.3422L1130.8 190.83L683.602 6.50012L1032.04 341.989L668.927 22.4412L889.557 452.891L649.872 32.7537L718.78 511.519L628.5 36.32L538.22 511.519L607.128 32.7537L367.443 452.891L588.073 22.4412L224.955 341.989L573.398 6.50012L126.198 190.83L564.694 -13.3422L81.8734 15.7948L562.905 -34.9354L96.7839 -164.149L568.224 -55.9396L169.314 -329.501L580.075 -74.0787L291.604 -462.344L597.173 -87.387L450.402 -548.281L617.666 -94.4223L628.5 -578Z"
|
|
24
|
+
fill="white"
|
|
25
|
+
/>
|
|
26
|
+
</g>
|
|
27
|
+
<defs>
|
|
28
|
+
<filter
|
|
29
|
+
id="filter0_f_199_94966"
|
|
30
|
+
x="0.873535"
|
|
31
|
+
y="-659"
|
|
32
|
+
width="1255.25"
|
|
33
|
+
height="1251.52"
|
|
34
|
+
filterUnits="userSpaceOnUse"
|
|
35
|
+
color-interpolation-filters="sRGB"
|
|
36
|
+
>
|
|
37
|
+
<feFlood
|
|
38
|
+
flood-opacity="0"
|
|
39
|
+
result="BackgroundImageFix"
|
|
40
|
+
/>
|
|
41
|
+
<feBlend
|
|
42
|
+
mode="normal"
|
|
43
|
+
in="SourceGraphic"
|
|
44
|
+
in2="BackgroundImageFix"
|
|
45
|
+
result="shape"
|
|
46
|
+
/>
|
|
47
|
+
<feGaussianBlur
|
|
48
|
+
stdDeviation="40.5"
|
|
49
|
+
result="effect1_foregroundBlur_199_94966"
|
|
50
|
+
/>
|
|
51
|
+
</filter>
|
|
52
|
+
</defs>
|
|
53
|
+
</svg>
|
|
54
|
+
|
|
55
|
+
<div class="flex flex-col justify-center p-8">
|
|
56
|
+
<div class="flex justify-center mb-8">
|
|
57
|
+
<AppHeaderLogo white />
|
|
58
|
+
</div>
|
|
59
|
+
<h1
|
|
60
|
+
v-if="title"
|
|
61
|
+
class="flex justify-center m-0 text-5xl font-semibold mb-4 text-white"
|
|
62
|
+
>
|
|
63
|
+
<span>{{ title }}</span>
|
|
64
|
+
</h1>
|
|
65
|
+
<p
|
|
66
|
+
v-if="description"
|
|
67
|
+
class="text-center text-2xl text-neutral-300 leading-tight"
|
|
68
|
+
>
|
|
69
|
+
{{ description }}
|
|
70
|
+
</p>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const appConfig = useAppConfig()
|
|
3
|
+
|
|
4
|
+
const links = computed(() => [
|
|
5
|
+
...Object.entries(appConfig.socials || {}).map(([key, url]) => ({
|
|
6
|
+
'icon': `i-simple-icons-${key}`,
|
|
7
|
+
'to': url,
|
|
8
|
+
'target': '_blank',
|
|
9
|
+
'aria-label': `${key} social link`,
|
|
10
|
+
})),
|
|
11
|
+
appConfig.github?.url && {
|
|
12
|
+
'icon': 'i-simple-icons-github',
|
|
13
|
+
'to': appConfig.github.url,
|
|
14
|
+
'target': '_blank',
|
|
15
|
+
'aria-label': 'GitHub repository',
|
|
16
|
+
},
|
|
17
|
+
].filter(Boolean))
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<UFooter>
|
|
22
|
+
<template #left>
|
|
23
|
+
<div class="text-sm text-muted">
|
|
24
|
+
Copyright © {{ new Date().getFullYear() }}
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<template #right>
|
|
29
|
+
<template v-if="links.length">
|
|
30
|
+
<UButton
|
|
31
|
+
v-for="(link, index) of links"
|
|
32
|
+
:key="index"
|
|
33
|
+
size="sm"
|
|
34
|
+
v-bind="{ color: 'neutral', variant: 'ghost', ...link }"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
<UColorModeButton />
|
|
38
|
+
</template>
|
|
39
|
+
</UFooter>
|
|
40
|
+
</template>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const appConfig = useAppConfig()
|
|
3
|
+
const site = useSiteConfig()
|
|
4
|
+
|
|
5
|
+
const links = computed(() => appConfig.github?.url
|
|
6
|
+
? [
|
|
7
|
+
{
|
|
8
|
+
'icon': 'i-simple-icons-github',
|
|
9
|
+
'to': appConfig.github.url,
|
|
10
|
+
'target': '_blank',
|
|
11
|
+
'aria-label': 'GitHub',
|
|
12
|
+
},
|
|
13
|
+
]
|
|
14
|
+
: [])
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<UHeader
|
|
19
|
+
:ui="{ center: 'flex-1' }"
|
|
20
|
+
to="/"
|
|
21
|
+
:title="appConfig.header?.title || site.name"
|
|
22
|
+
>
|
|
23
|
+
<AppHeaderCenter />
|
|
24
|
+
|
|
25
|
+
<template #title>
|
|
26
|
+
<AppHeaderLogo class="h-6 w-auto shrink-0" />
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<template #right>
|
|
30
|
+
<AppHeaderCTA />
|
|
31
|
+
|
|
32
|
+
<UContentSearchButton class="lg:hidden" />
|
|
33
|
+
|
|
34
|
+
<UColorModeButton />
|
|
35
|
+
|
|
36
|
+
<template v-if="links?.length">
|
|
37
|
+
<UButton
|
|
38
|
+
v-for="(link, index) of links"
|
|
39
|
+
:key="index"
|
|
40
|
+
v-bind="{ color: 'neutral', variant: 'ghost', ...link }"
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<template #toggle="{ open, toggle }">
|
|
46
|
+
<IconMenuToggle
|
|
47
|
+
:open="open"
|
|
48
|
+
class="lg:hidden"
|
|
49
|
+
@click="toggle"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<template #body>
|
|
54
|
+
<AppHeaderBody />
|
|
55
|
+
</template>
|
|
56
|
+
</UHeader>
|
|
57
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ContentNavigationItem } from '@nuxt/content'
|
|
3
|
+
|
|
4
|
+
const navigation = inject<Ref<ContentNavigationItem[]>>('navigation')
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<UContentNavigation
|
|
9
|
+
highlight
|
|
10
|
+
variant="link"
|
|
11
|
+
:navigation="navigation"
|
|
12
|
+
/>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const appConfig = useAppConfig()
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<UColorModeImage
|
|
7
|
+
v-if="appConfig.header?.logo?.dark || appConfig.header?.logo?.light"
|
|
8
|
+
:light="appConfig.header?.logo?.light || appConfig.header?.logo?.dark"
|
|
9
|
+
:dark="appConfig.header?.logo?.dark || appConfig.header?.logo?.light"
|
|
10
|
+
:alt="appConfig.header?.logo?.alt || appConfig.header?.title"
|
|
11
|
+
class="h-6 w-auto shrink-0"
|
|
12
|
+
/>
|
|
13
|
+
<span v-else>
|
|
14
|
+
{{ appConfig.header?.title || '{appConfig.header.title}' }}
|
|
15
|
+
</span>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="appConfig.toc?.bottom?.links?.length"
|
|
4
|
+
class="hidden lg:block space-y-6"
|
|
5
|
+
>
|
|
6
|
+
<USeparator type="dashed" />
|
|
7
|
+
|
|
8
|
+
<UPageLinks
|
|
9
|
+
:title="appConfig.toc?.bottom?.title || 'Links'"
|
|
10
|
+
:links="appConfig.toc?.bottom?.links"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
const appConfig = useAppConfig()
|
|
17
|
+
</script>
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
<script setup lang="ts">
|
|
38
|
+
const route = useRoute()
|
|
39
|
+
const copyStatus = ref<'idle' | 'copying' | 'copied'>('idle')
|
|
40
|
+
|
|
41
|
+
const items = [
|
|
42
|
+
{
|
|
43
|
+
label: 'Copy Markdown link',
|
|
44
|
+
icon: 'i-lucide-link',
|
|
45
|
+
onSelect() {
|
|
46
|
+
navigator.clipboard.writeText(`${window.location.origin}/raw${route.path}.md`)
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'View as Markdown',
|
|
51
|
+
icon: 'i-simple-icons:markdown',
|
|
52
|
+
target: '_blank',
|
|
53
|
+
onSelect() {
|
|
54
|
+
window.open(`${window.location.origin}/raw${route.path}.md`, '_blank')
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Open in ChatGPT',
|
|
59
|
+
icon: 'i-simple-icons:openai',
|
|
60
|
+
target: '_blank',
|
|
61
|
+
onSelect() {
|
|
62
|
+
window.open(`https://chatgpt.com/?hints=search&q=${encodeURIComponent(`Read ${window.location.origin}/raw${route.path}.md so I can ask questions about it.`)}`, '_blank')
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: 'Open in Claude',
|
|
67
|
+
icon: 'i-simple-icons:anthropic',
|
|
68
|
+
target: '_blank',
|
|
69
|
+
onSelect() {
|
|
70
|
+
window.open(`https://claude.ai/new?q=${encodeURIComponent(`Read ${window.location.origin}/raw${route.path}.md so I can ask questions about it.`)}`, '_blank')
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
async function copyPage() {
|
|
76
|
+
copyStatus.value = 'copying'
|
|
77
|
+
const markdown = await $fetch<string>(`${window.location.origin}/raw${route.path}.md`)
|
|
78
|
+
copyToClipboard(markdown)
|
|
79
|
+
copyStatus.value = 'copied'
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
copyStatus.value = 'idle'
|
|
82
|
+
}, 2000)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function copyToClipboard(text: string) {
|
|
86
|
+
// Fix for iOS Safari: https://stackoverflow.com/questions/62327358/javascript-clipboard-api-safari-ios-notallowederror-message
|
|
87
|
+
setTimeout(async () => {
|
|
88
|
+
await navigator.clipboard.writeText(text)
|
|
89
|
+
}, 0)
|
|
90
|
+
}
|
|
91
|
+
</script>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NuxtError } from '#app'
|
|
3
|
+
|
|
4
|
+
defineProps<{
|
|
5
|
+
error: NuxtError
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
useHead({
|
|
9
|
+
htmlAttrs: {
|
|
10
|
+
lang: 'en',
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
useSeoMeta({
|
|
15
|
+
title: 'Page not found',
|
|
16
|
+
description: 'We are sorry but this page could not be found.',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('docs'))
|
|
20
|
+
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('docs'), {
|
|
21
|
+
server: false,
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
provide('navigation', navigation)
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<UApp>
|
|
29
|
+
<AppHeader />
|
|
30
|
+
|
|
31
|
+
<UError :error="error" />
|
|
32
|
+
|
|
33
|
+
<AppFooter />
|
|
34
|
+
|
|
35
|
+
<ClientOnly>
|
|
36
|
+
<LazyUContentSearch
|
|
37
|
+
:files="files"
|
|
38
|
+
:navigation="navigation"
|
|
39
|
+
/>
|
|
40
|
+
</ClientOnly>
|
|
41
|
+
</UApp>
|
|
42
|
+
</template>
|