-
Notifications
You must be signed in to change notification settings - Fork 121
/
histoire.config.ts
106 lines (104 loc) · 2.43 KB
/
histoire.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import { HstVue } from '@histoire/plugin-vue'
import { defineConfig } from 'histoire'
import resolveConfig from 'tailwindcss/resolveConfig'
import tailwindConfig from './tailwind.config.js'
const fullConfig = resolveConfig(tailwindConfig)
export default defineConfig({
setupFile: './histoire.setup.ts',
plugins: [HstVue()],
theme: {
title: 'Frappe UI',
defaultColorScheme: 'light',
hideColorSchemeSwitch: false,
storeColorScheme: false,
favicon: 'frappe-ui-square.png',
logo: {
square: './frappe-ui-square.png',
light: './frappe-ui.svg',
dark: './frappe-ui.svg',
},
colors: {
gray: {
50: '#f8f8f8',
100: '#f3f3f3',
200: '#ededed',
300: '#e2e2e2',
400: '#c7c7c7',
500: '#999999',
600: '#7c7c7c',
700: 'rgb(23 23 23)',
750: 'rgb(20 20 20)',
800: '#383838',
900: '#171717',
},
primary: {
50: '#f8f8f8',
100: '#f3f3f3',
200: '#ededed',
300: '#e2e2e2',
400: '#c7c7c7',
500: '#999999',
600: '#7c7c7c',
700: '#525252',
800: '#383838',
900: '#171717',
},
},
},
tree: {
order(a, b) {
let maintainOrder = [
'Introduction',
'Getting Started',
'Resource',
'List Resource',
'Document Resource',
'Utilities',
'Directives',
]
let aIndex = maintainOrder.indexOf(a)
let bIndex = maintainOrder.indexOf(b)
if (aIndex > -1 && bIndex > -1) {
return aIndex - bIndex
} else if (aIndex > -1) {
return -1
} else if (bIndex > -1) {
return 1
} else {
return a.localeCompare(b)
}
},
groups: [
{
id: 'top',
title: '',
include: (file) => {
return (
file.path.includes('docs/') &&
!file.path.includes('docs/resources/') &&
!file.path.includes('docs/other/')
)
},
},
{
id: 'resources',
title: 'Data Fetching',
include: (file) => {
return file.path.includes('docs/resources/')
},
},
{
id: 'components',
title: 'Components',
include: (file) => {
return !file.path.includes('docs/')
},
},
{
id: 'other',
title: 'Other',
include: (file) => true,
},
],
},
})