@clarify-labs/templates 0.10.2 → 0.11.0
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/complete/clarify.ts +32 -32
- package/complete/source/en-US/guides/navigation.mdx +27 -23
- package/complete/source/en-US/reference/configuration.mdx +4 -4
- package/complete/source/zh-CN/guides/navigation.mdx +27 -23
- package/complete/source/zh-CN/reference/configuration.mdx +3 -3
- package/package.json +1 -1
- package/standard/clarify.ts +23 -23
- package/standard/source/guides/navigation.mdx +28 -24
package/complete/clarify.ts
CHANGED
|
@@ -2,26 +2,10 @@ import { defineConfig } from '@clarify-labs/cli'
|
|
|
2
2
|
import demoSlotsPlugin from './source/plugins/index.js'
|
|
3
3
|
|
|
4
4
|
export default defineConfig({
|
|
5
|
-
plugins: [demoSlotsPlugin],
|
|
6
5
|
title: 'Clarify Docs',
|
|
7
6
|
description: 'A full-featured documentation starter powered by Clarify.',
|
|
8
7
|
logo: '/logo.svg',
|
|
9
8
|
favicon: '/favicon.svg',
|
|
10
|
-
banner: {
|
|
11
|
-
content: {
|
|
12
|
-
'en-US': 'Edit this starter in {{contentDir}} and ship your docs with Clarify.',
|
|
13
|
-
'zh-CN': '在 {{contentDir}} 中编辑这个多语言模板,并使用 Clarify 发布文档。',
|
|
14
|
-
},
|
|
15
|
-
dismissible: true,
|
|
16
|
-
},
|
|
17
|
-
i18n: {
|
|
18
|
-
defaultLocale: 'en-US',
|
|
19
|
-
missing: 'fallback',
|
|
20
|
-
locales: [
|
|
21
|
-
{ code: 'en-US', label: 'English' },
|
|
22
|
-
{ code: 'zh-CN', label: '简体中文' },
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
9
|
theme: {
|
|
26
10
|
preset: 'default',
|
|
27
11
|
tokens: {
|
|
@@ -35,26 +19,14 @@ export default defineConfig({
|
|
|
35
19
|
},
|
|
36
20
|
},
|
|
37
21
|
},
|
|
38
|
-
|
|
22
|
+
navigation: {
|
|
39
23
|
links: [
|
|
40
24
|
{ label: { 'en-US': 'Guides', 'zh-CN': '指南' }, href: '/guides/writing-content' },
|
|
41
25
|
{ label: { 'en-US': 'API', 'zh-CN': '接口' }, href: '/api' },
|
|
42
26
|
{ label: 'GitHub', href: 'https://github.com/taicode-labs/clarify', external: true },
|
|
43
27
|
],
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
copyright: '© 2026 Your Company. Built with Clarify.',
|
|
47
|
-
links: [
|
|
48
|
-
{ label: { 'en-US': 'Get started', 'zh-CN': '开始使用' }, href: '/' },
|
|
49
|
-
{ label: { 'en-US': 'Configuration', 'zh-CN': '配置' }, href: '/reference/configuration' },
|
|
50
|
-
{ label: { 'en-US': 'API reference', 'zh-CN': 'API 参考' }, href: '/api' },
|
|
51
|
-
],
|
|
52
|
-
socials: {
|
|
53
|
-
GitHub: 'https://github.com/taicode-labs/clarify',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
tabs: [
|
|
57
|
-
{
|
|
28
|
+
tabs: [
|
|
29
|
+
{
|
|
58
30
|
tab: { 'en-US': 'Docs', 'zh-CN': '文档' },
|
|
59
31
|
icon: 'BookOpen',
|
|
60
32
|
pages: [
|
|
@@ -91,6 +63,34 @@ export default defineConfig({
|
|
|
91
63
|
],
|
|
92
64
|
},
|
|
93
65
|
],
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
banner: {
|
|
70
|
+
content: {
|
|
71
|
+
'en-US': 'Edit this starter in {{contentDir}} and ship your docs with Clarify.',
|
|
72
|
+
'zh-CN': '在 {{contentDir}} 中编辑这个多语言模板,并使用 Clarify 发布文档。',
|
|
94
73
|
},
|
|
95
|
-
|
|
74
|
+
dismissible: true,
|
|
75
|
+
},
|
|
76
|
+
footer: {
|
|
77
|
+
copyright: '© 2026 Your Company. Built with Clarify.',
|
|
78
|
+
links: [
|
|
79
|
+
{ label: { 'en-US': 'Get started', 'zh-CN': '开始使用' }, href: '/' },
|
|
80
|
+
{ label: { 'en-US': 'Configuration', 'zh-CN': '配置' }, href: '/reference/configuration' },
|
|
81
|
+
{ label: { 'en-US': 'API reference', 'zh-CN': 'API 参考' }, href: '/api' },
|
|
82
|
+
],
|
|
83
|
+
socials: {
|
|
84
|
+
GitHub: 'https://github.com/taicode-labs/clarify',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
locales: {
|
|
88
|
+
default: 'en-US',
|
|
89
|
+
missing: 'fallback',
|
|
90
|
+
locales: [
|
|
91
|
+
{ code: 'en-US', label: 'English' },
|
|
92
|
+
{ code: 'zh-CN', label: '简体中文' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
plugins: [demoSlotsPlugin],
|
|
96
96
|
})
|
|
@@ -11,22 +11,24 @@ Clarify navigation is configured in `clarify.ts`. The starter uses explicit tabs
|
|
|
11
11
|
|
|
12
12
|
```ts title="clarify.ts"
|
|
13
13
|
export default defineConfig({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
navigation: {
|
|
15
|
+
tabs: [
|
|
16
|
+
{
|
|
17
|
+
tab: 'Docs',
|
|
18
|
+
icon: 'BookOpen',
|
|
19
|
+
pages: [
|
|
20
|
+
{
|
|
21
|
+
group: 'Start here',
|
|
22
|
+
icon: 'Rocket',
|
|
23
|
+
pages: [
|
|
24
|
+
{ page: 'index', title: 'Overview', icon: 'Sparkles' },
|
|
25
|
+
{ page: 'guides/writing-content', title: 'Writing content', icon: 'PenLine' },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
30
32
|
})
|
|
31
33
|
```
|
|
32
34
|
|
|
@@ -36,12 +38,14 @@ For smaller docs, use `FileTree` and let Clarify derive navigation from files.
|
|
|
36
38
|
|
|
37
39
|
```ts title="clarify.ts"
|
|
38
40
|
export default defineConfig({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
navigation: {
|
|
42
|
+
tabs: [
|
|
43
|
+
{
|
|
44
|
+
tab: 'Docs',
|
|
45
|
+
pages: 'FileTree',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
45
49
|
})
|
|
46
50
|
```
|
|
47
51
|
|
|
@@ -49,7 +53,7 @@ export default defineConfig({
|
|
|
49
53
|
|
|
50
54
|
```ts title="clarify.ts"
|
|
51
55
|
export default defineConfig({
|
|
52
|
-
|
|
56
|
+
navigation: {
|
|
53
57
|
links: [
|
|
54
58
|
{ label: 'Guides', href: '/guides/writing-content' },
|
|
55
59
|
{ label: 'GitHub', href: 'https://github.com/taicode-labs/clarify', external: true },
|
|
@@ -61,11 +61,11 @@ theme: {
|
|
|
61
61
|
}
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
##
|
|
64
|
+
## Locales example
|
|
65
65
|
|
|
66
66
|
```ts title="clarify.ts"
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
locales: {
|
|
68
|
+
default: 'en-US',
|
|
69
69
|
missing: 'fallback',
|
|
70
70
|
locales: [
|
|
71
71
|
{ code: 'en-US', label: 'English', dir: 'ltr' },
|
|
@@ -74,4 +74,4 @@ i18n: {
|
|
|
74
74
|
}
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
When
|
|
77
|
+
When locales are enabled, place content under locale folders such as `{{contentDir}}/en-US/index.mdx` and `{{contentDir}}/zh-CN/index.mdx`.
|
|
@@ -11,22 +11,24 @@ Clarify 的导航在 `clarify.ts` 中配置。这个完整模板使用显式标
|
|
|
11
11
|
|
|
12
12
|
```ts title="clarify.ts"
|
|
13
13
|
export default defineConfig({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
navigation: {
|
|
15
|
+
tabs: [
|
|
16
|
+
{
|
|
17
|
+
tab: 'Docs',
|
|
18
|
+
icon: 'BookOpen',
|
|
19
|
+
pages: [
|
|
20
|
+
{
|
|
21
|
+
group: 'Start here',
|
|
22
|
+
icon: 'Rocket',
|
|
23
|
+
pages: [
|
|
24
|
+
{ page: 'index', title: 'Overview', icon: 'Sparkles' },
|
|
25
|
+
{ page: 'guides/writing-content', title: 'Writing content', icon: 'PenLine' },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
30
32
|
})
|
|
31
33
|
```
|
|
32
34
|
|
|
@@ -36,12 +38,14 @@ export default defineConfig({
|
|
|
36
38
|
|
|
37
39
|
```ts title="clarify.ts"
|
|
38
40
|
export default defineConfig({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
navigation: {
|
|
42
|
+
tabs: [
|
|
43
|
+
{
|
|
44
|
+
tab: 'Docs',
|
|
45
|
+
pages: 'FileTree',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
45
49
|
})
|
|
46
50
|
```
|
|
47
51
|
|
|
@@ -49,7 +53,7 @@ export default defineConfig({
|
|
|
49
53
|
|
|
50
54
|
```ts title="clarify.ts"
|
|
51
55
|
export default defineConfig({
|
|
52
|
-
|
|
56
|
+
navigation: {
|
|
53
57
|
links: [
|
|
54
58
|
{ label: 'Guides', href: '/guides/writing-content' },
|
|
55
59
|
{ label: 'GitHub', href: 'https://github.com/taicode-labs/clarify', external: true },
|
package/package.json
CHANGED
package/standard/clarify.ts
CHANGED
|
@@ -5,10 +5,6 @@ export default defineConfig({
|
|
|
5
5
|
description: 'A documentation starter powered by Clarify.',
|
|
6
6
|
logo: '/logo.svg',
|
|
7
7
|
favicon: '/favicon.svg',
|
|
8
|
-
banner: {
|
|
9
|
-
content: 'Edit this starter in {{contentDir}} and ship your docs with Clarify.',
|
|
10
|
-
dismissible: true,
|
|
11
|
-
},
|
|
12
8
|
theme: {
|
|
13
9
|
preset: 'default',
|
|
14
10
|
tokens: {
|
|
@@ -18,12 +14,34 @@ export default defineConfig({
|
|
|
18
14
|
},
|
|
19
15
|
},
|
|
20
16
|
},
|
|
21
|
-
|
|
17
|
+
navigation: {
|
|
22
18
|
links: [
|
|
23
19
|
{ label: 'Guides', href: '/guides/writing-content' },
|
|
24
20
|
{ label: 'Changelog', href: '/changelog' },
|
|
25
21
|
{ label: 'GitHub', href: 'https://github.com/taicode-labs/clarify', external: true },
|
|
26
22
|
],
|
|
23
|
+
tabs: [
|
|
24
|
+
{
|
|
25
|
+
tab: 'Docs',
|
|
26
|
+
icon: 'BookOpen',
|
|
27
|
+
pages: [
|
|
28
|
+
{
|
|
29
|
+
group: 'Start here',
|
|
30
|
+
icon: 'Rocket',
|
|
31
|
+
pages: [
|
|
32
|
+
{ page: 'index', title: 'Overview', icon: 'Sparkles' },
|
|
33
|
+
{ page: 'guides/writing-content', title: 'Writing content', icon: 'PenLine' },
|
|
34
|
+
{ page: 'guides/navigation', title: 'Navigation', icon: 'PanelLeft' },
|
|
35
|
+
{ page: 'changelog', title: 'Changelog', icon: 'History' },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
banner: {
|
|
43
|
+
content: 'Edit this starter in {{contentDir}} and ship your docs with Clarify.',
|
|
44
|
+
dismissible: true,
|
|
27
45
|
},
|
|
28
46
|
footer: {
|
|
29
47
|
copyright: '© 2026 Your Company. Built with Clarify.',
|
|
@@ -36,22 +54,4 @@ export default defineConfig({
|
|
|
36
54
|
GitHub: 'https://github.com/taicode-labs/clarify',
|
|
37
55
|
},
|
|
38
56
|
},
|
|
39
|
-
tabs: [
|
|
40
|
-
{
|
|
41
|
-
tab: 'Docs',
|
|
42
|
-
icon: 'BookOpen',
|
|
43
|
-
pages: [
|
|
44
|
-
{
|
|
45
|
-
group: 'Start here',
|
|
46
|
-
icon: 'Rocket',
|
|
47
|
-
pages: [
|
|
48
|
-
{ page: 'index', title: 'Overview', icon: 'Sparkles' },
|
|
49
|
-
{ page: 'guides/writing-content', title: 'Writing content', icon: 'PenLine' },
|
|
50
|
-
{ page: 'guides/navigation', title: 'Navigation', icon: 'PanelLeft' },
|
|
51
|
-
{ page: 'changelog', title: 'Changelog', icon: 'History' },
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
57
|
})
|
|
@@ -11,23 +11,25 @@ Clarify navigation is configured in `clarify.ts`. The starter uses explicit tabs
|
|
|
11
11
|
|
|
12
12
|
```ts title="clarify.ts"
|
|
13
13
|
export default defineConfig({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
navigation: {
|
|
15
|
+
tabs: [
|
|
16
|
+
{
|
|
17
|
+
tab: 'Docs',
|
|
18
|
+
icon: 'BookOpen',
|
|
19
|
+
pages: [
|
|
20
|
+
{
|
|
21
|
+
group: 'Start here',
|
|
22
|
+
icon: 'Rocket',
|
|
23
|
+
pages: [
|
|
24
|
+
{ page: 'index', title: 'Overview', icon: 'Sparkles' },
|
|
25
|
+
{ page: 'guides/writing-content', title: 'Writing content', icon: 'PenLine' },
|
|
26
|
+
{ page: 'changelog', title: 'Changelog', icon: 'History' },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
31
33
|
})
|
|
32
34
|
```
|
|
33
35
|
|
|
@@ -37,12 +39,14 @@ For smaller docs, use `FileTree` and let Clarify derive navigation from files.
|
|
|
37
39
|
|
|
38
40
|
```ts title="clarify.ts"
|
|
39
41
|
export default defineConfig({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
navigation: {
|
|
43
|
+
tabs: [
|
|
44
|
+
{
|
|
45
|
+
tab: 'Docs',
|
|
46
|
+
pages: 'FileTree',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
46
50
|
})
|
|
47
51
|
```
|
|
48
52
|
|
|
@@ -50,7 +54,7 @@ export default defineConfig({
|
|
|
50
54
|
|
|
51
55
|
```ts title="clarify.ts"
|
|
52
56
|
export default defineConfig({
|
|
53
|
-
|
|
57
|
+
navigation: {
|
|
54
58
|
links: [
|
|
55
59
|
{ label: 'Guides', href: '/guides/writing-content' },
|
|
56
60
|
{ label: 'Changelog', href: '/changelog' },
|