undocs 0.2.26 → 0.2.28
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.vue +7 -0
- package/app/nuxt.config.ts +1 -1
- package/app/server/plugins/content.ts +2 -2
- package/app/tailwind.config.ts +14 -2
- package/app/utils/seo.ts +16 -13
- package/package.json +16 -16
- package/app/public/fonts/nunito-latin-400-italic-Daxm5UzsKq.woff2 +0 -0
- package/app/public/fonts/nunito-latin-400-normal-nPlM7mbm0W.woff2 +0 -0
- package/app/public/fonts/nunito-latin-500-italic-IlVtAGJo00.woff2 +0 -0
- package/app/public/fonts/nunito-latin-500-normal-zkQUyo5lvz.woff2 +0 -0
- package/app/public/fonts/nunito-latin-600-normal-IMulf98v4m.woff2 +0 -0
- package/app/public/fonts/nunito-latin-700-normal-irPkzGnT0r.woff2 +0 -0
package/app/app.vue
CHANGED
package/app/nuxt.config.ts
CHANGED
|
@@ -12,7 +12,7 @@ export default defineNuxtConfig({
|
|
|
12
12
|
modules: ['@nuxt/fonts', '@nuxt/content', isProd && '@nuxtjs/plausible', '@nuxt/ui'],
|
|
13
13
|
ui: {},
|
|
14
14
|
fonts: {
|
|
15
|
-
families: [{ name: '
|
|
15
|
+
families: [{ name: 'Inter' }],
|
|
16
16
|
defaults: {
|
|
17
17
|
weights: [400, 500, 600, 700],
|
|
18
18
|
},
|
|
@@ -26,7 +26,7 @@ export default defineNitroPlugin((nitroApp) => {
|
|
|
26
26
|
transformGithubAlert(node)
|
|
27
27
|
transformStepsList(node)
|
|
28
28
|
transformCodeGroups(idx, file.body?.children)
|
|
29
|
-
transformJSDocs(idx, file.body?.children)
|
|
29
|
+
// transformJSDocs(idx, file.body?.children)
|
|
30
30
|
}
|
|
31
31
|
})
|
|
32
32
|
})
|
|
@@ -215,7 +215,7 @@ function _isNamedCodeBlock(children: ContentNode): boolean {
|
|
|
215
215
|
|
|
216
216
|
// --- transform automd jsdocs ---
|
|
217
217
|
|
|
218
|
-
function transformJSDocs(currChildIdx: number, children: ContentNode[] = []) {
|
|
218
|
+
export function transformJSDocs(currChildIdx: number, children: ContentNode[] = []) {
|
|
219
219
|
if (!children?.length || !_isJSDocBlock(children[currChildIdx])) {
|
|
220
220
|
return
|
|
221
221
|
}
|
package/app/tailwind.config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Config } from 'tailwindcss'
|
|
2
|
-
import defaultTheme from 'tailwindcss/defaultTheme'
|
|
2
|
+
// import defaultTheme from 'tailwindcss/defaultTheme'
|
|
3
3
|
|
|
4
4
|
export default <Partial<Config>>{
|
|
5
5
|
// Without empty content block, first build without `.nuxt` dir fails
|
|
@@ -9,7 +9,19 @@ export default <Partial<Config>>{
|
|
|
9
9
|
theme: {
|
|
10
10
|
extend: {
|
|
11
11
|
fontFamily: {
|
|
12
|
-
sans: [
|
|
12
|
+
sans: [
|
|
13
|
+
// Inspired from Vitpress theme
|
|
14
|
+
'Inter',
|
|
15
|
+
'ui-sans-serif',
|
|
16
|
+
'system-ui',
|
|
17
|
+
'sans-serif',
|
|
18
|
+
'Apple Color Emoji',
|
|
19
|
+
'Segoe UI Emoji',
|
|
20
|
+
'Segoe UI Symbol',
|
|
21
|
+
'Noto Color Emoji',
|
|
22
|
+
],
|
|
23
|
+
mono: ['ui-monospace', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', 'monospace'],
|
|
24
|
+
custom: ['Inter'],
|
|
13
25
|
},
|
|
14
26
|
colors: {
|
|
15
27
|
yellow: {
|
package/app/utils/seo.ts
CHANGED
|
@@ -5,13 +5,18 @@ export interface PageMeta {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export function usePageSEO(page: PageMeta) {
|
|
8
|
-
if (!import.meta.server && !import.meta.dev) {
|
|
9
|
-
return
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
const route = useRoute()
|
|
13
9
|
const appConfig = useAppConfig()
|
|
14
10
|
|
|
11
|
+
useSeoMeta({
|
|
12
|
+
title: page.title,
|
|
13
|
+
description: page.description,
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
if (!(import.meta.server || import.meta.dev || import.meta.prerender)) {
|
|
17
|
+
return
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
const path = route.path === '/' ? '/_index' : route.path
|
|
16
21
|
const canonicalURL = import.meta.dev ? useRequestURL() : appConfig.site.url
|
|
17
22
|
const ogURL = new URL(`/_og${path}.png`, canonicalURL)
|
|
@@ -20,16 +25,7 @@ export function usePageSEO(page: PageMeta) {
|
|
|
20
25
|
ogURL.searchParams.set('title', page.ogTitle || page.title || appConfig.site.name)
|
|
21
26
|
ogURL.searchParams.set('description', page.description || appConfig.site.description || '')
|
|
22
27
|
|
|
23
|
-
if (import.meta.prerender) {
|
|
24
|
-
prerenderRoutes(ogURL.pathname + ogURL.search)
|
|
25
|
-
ogURL.searchParams.delete('name')
|
|
26
|
-
ogURL.searchParams.delete('title')
|
|
27
|
-
ogURL.searchParams.delete('description')
|
|
28
|
-
}
|
|
29
|
-
|
|
30
28
|
useSeoMeta({
|
|
31
|
-
title: page.title,
|
|
32
|
-
description: page.description,
|
|
33
29
|
ogImage: {
|
|
34
30
|
url: ogURL.href,
|
|
35
31
|
width: 1200,
|
|
@@ -44,4 +40,11 @@ export function usePageSEO(page: PageMeta) {
|
|
|
44
40
|
alt: page.description || appConfig.site.description,
|
|
45
41
|
},
|
|
46
42
|
})
|
|
43
|
+
|
|
44
|
+
if (import.meta.prerender) {
|
|
45
|
+
prerenderRoutes(ogURL.pathname + ogURL.search)
|
|
46
|
+
ogURL.searchParams.delete('name')
|
|
47
|
+
ogURL.searchParams.delete('title')
|
|
48
|
+
ogURL.searchParams.delete('description')
|
|
49
|
+
}
|
|
47
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "undocs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.28",
|
|
4
4
|
"repository": "unjs/undocs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,44 +30,44 @@
|
|
|
30
30
|
"undocs": "./cli/main.mjs"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@headlessui/vue": "^1.7.
|
|
33
|
+
"@headlessui/vue": "^1.7.23",
|
|
34
34
|
"@iconify-json/logos": "^1.2.0",
|
|
35
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
35
|
+
"@iconify-json/simple-icons": "^1.2.2",
|
|
36
36
|
"@nuxt/content": "^2.13.2",
|
|
37
|
-
"@nuxt/fonts": "^0.
|
|
38
|
-
"@nuxt/ui-pro": "^1.4.
|
|
37
|
+
"@nuxt/fonts": "^0.8.0",
|
|
38
|
+
"@nuxt/ui-pro": "^1.4.2",
|
|
39
39
|
"@nuxtjs/plausible": "^1.0.2",
|
|
40
40
|
"@nuxtjs/tailwindcss": "^6.12.1",
|
|
41
41
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
42
42
|
"automd": "^0.3.8",
|
|
43
|
-
"c12": "^1.11.
|
|
43
|
+
"c12": "^1.11.2",
|
|
44
44
|
"citty": "^0.1.6",
|
|
45
45
|
"consola": "^3.2.3",
|
|
46
46
|
"defu": "^6.1.4",
|
|
47
47
|
"is-buffer": "^2.0.5",
|
|
48
48
|
"nitropack": "^2.9.7",
|
|
49
49
|
"nuxi": "^3.13.1",
|
|
50
|
-
"nuxt": "^3.13.
|
|
50
|
+
"nuxt": "^3.13.1",
|
|
51
51
|
"nuxt-build-cache": "^0.1.1",
|
|
52
52
|
"pkg-types": "^1.2.0",
|
|
53
53
|
"scule": "^1.3.0",
|
|
54
|
-
"tailwindcss": "^3.4.
|
|
54
|
+
"tailwindcss": "^3.4.11",
|
|
55
55
|
"unctx": "^2.3.1",
|
|
56
|
-
"unstorage": "^1.
|
|
57
|
-
"vue": "^3.4
|
|
58
|
-
"vue-router": "^4.4.
|
|
56
|
+
"unstorage": "^1.12.0",
|
|
57
|
+
"vue": "^3.5.4",
|
|
58
|
+
"vue-router": "^4.4.4"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@nuxt/eslint-config": "^0.5.
|
|
61
|
+
"@nuxt/eslint-config": "^0.5.7",
|
|
62
62
|
"@nuxt/image": "^1.8.0",
|
|
63
|
-
"@types/node": "^22.5.
|
|
63
|
+
"@types/node": "^22.5.4",
|
|
64
64
|
"changelogen": "^0.5.5",
|
|
65
|
-
"eslint": "^9.
|
|
65
|
+
"eslint": "^9.10.0",
|
|
66
66
|
"eslint-config-unjs": "^0.3.2",
|
|
67
67
|
"jiti": "^1.21.6",
|
|
68
68
|
"prettier": "^3.3.3",
|
|
69
|
-
"typescript": "^5.
|
|
70
|
-
"vue-tsc": "^2.1.
|
|
69
|
+
"typescript": "^5.6.2",
|
|
70
|
+
"vue-tsc": "^2.1.6"
|
|
71
71
|
},
|
|
72
72
|
"packageManager": "bun@1.1.24"
|
|
73
73
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|