1
1
import { createRequire } from 'module'
2
- import { defineConfig } from 'vitepress'
2
+ import { defineConfig , type DefaultTheme } from 'vitepress'
3
3
4
4
const require = createRequire ( import . meta. url )
5
5
const pkg = require ( '../../package.json' )
@@ -27,6 +27,14 @@ export default defineConfig({
27
27
type : 'module' ,
28
28
src : 'https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module'
29
29
}
30
+ ] ,
31
+ [
32
+ 'script' ,
33
+ {
34
+ async : '' ,
35
+ type : 'module' ,
36
+ src : 'https://kicanvas.org/kicanvas/kicanvas.js'
37
+ }
30
38
]
31
39
] ,
32
40
@@ -42,8 +50,16 @@ export default defineConfig({
42
50
43
51
// https://vitepress.dev/reference/default-theme-config
44
52
nav : [
45
- { text : 'Guide' , link : '/guide/what-is-doorman' } ,
46
- { text : 'Creators' , link : '/creators' } ,
53
+ {
54
+ text : 'Guide' ,
55
+ link : '/guide/what-is-doorman' ,
56
+ activeMatch : '/guide/'
57
+ } ,
58
+ {
59
+ text : 'Reference' ,
60
+ link : '/reference/entities' ,
61
+ activeMatch : '/reference/'
62
+ } ,
47
63
{
48
64
text : pkg . version ,
49
65
items : [
@@ -64,56 +80,76 @@ export default defineConfig({
64
80
provider : 'local'
65
81
} ,
66
82
67
- sidebar : [
68
- {
69
- text : 'Introduction' ,
70
- items : [
71
- { text : 'What is Doorman?' , link : '/guide/what-is-doorman' } ,
72
- { text : 'Getting Started' , link : '/guide/getting-started' } ,
73
- ]
74
- } ,
75
- {
76
- text : 'Compatibility' ,
77
- items : [
78
- { text : 'Can I use Doorman?' , link : '/compatibility/hardware-compatibility' } ,
79
- { text : 'Doorman PCB' , link : '/compatibility/specifications' }
80
- ]
81
- } ,
82
- {
83
- text : 'Firmware' ,
84
- items : [
85
- { text : 'Stock Firmware' , link : '/firmware/stock-firmware' } ,
86
- { text : 'Nuki Bridge Firmware' , link : '/firmware/nuki-bridge-firmware' } ,
87
- { text : 'Custom Firmware' , link : '/firmware/custom-firmware' }
88
- ]
89
- } ,
90
- {
91
- text : 'Automations' ,
92
- items : [
93
- { text : 'Pattern Events' , link : '/automation/pattern-events' } ,
94
- { text : 'Ring To Open' , link : '/automation/ring-to-open' } ,
95
- { text : 'Blueprints' , link : '/automation/blueprints' }
96
- ]
97
- } ,
98
- {
99
- text : 'Enclosure' ,
100
- items : [
101
- { text : '3D printing' , link : '/enclosure/3d-printing' }
102
- ]
103
- } ,
104
- {
105
- text : 'Support' ,
106
- link : '/support/support' ,
107
- collapsed : true ,
108
- items : [
109
- { text : 'Troubleshooting' , link : '/support/troubleshooting' }
110
- ]
111
- }
112
- ] ,
83
+ sidebar : {
84
+ '/guide/' : { base : '/guide/' , items : sidebarGuide ( ) } ,
85
+ '/reference/' : { base : '/reference/' , items : sidebarReference ( ) }
86
+ } ,
113
87
114
88
socialLinks : [
115
89
{ icon : 'github' , link : 'https://github.com/AzonInc/Doorman' } ,
116
90
{ icon : 'discord' , link : 'https://discord.gg/t2d34dvmBf' }
117
- ]
91
+ ] ,
92
+
93
+ footer : {
94
+ message : 'Released under the GPL 3.0 License.' ,
95
+ copyright : 'Made with ❤️ by the <a href="creators">Creators</a> of Doorman.'
96
+ }
118
97
}
119
98
} )
99
+
100
+ function sidebarGuide ( ) : DefaultTheme . SidebarItem [ ] {
101
+ return [
102
+ {
103
+ text : 'Introduction' ,
104
+ items : [
105
+ { text : 'What is Doorman?' , link : 'what-is-doorman' } ,
106
+ { text : 'Getting Started' , link : 'getting-started' } ,
107
+ { text : 'Can I use Doorman?' , link : 'hardware-compatibility' }
108
+ ]
109
+ } ,
110
+ {
111
+ text : 'Firmware' ,
112
+ items : [
113
+ { text : 'Stock Firmware' , link : 'stock-firmware' , base : '/guide/firmware/' } ,
114
+ { text : 'Nuki Bridge Firmware' , link : 'nuki-bridge-firmware' , base : '/guide/firmware/' } ,
115
+ { text : 'Custom Firmware' , link : 'custom-firmware' , base : '/guide/firmware/' }
116
+ ]
117
+ } ,
118
+ {
119
+ text : 'Automations' ,
120
+ items : [
121
+ { text : 'Pattern Events' , link : 'pattern-events' , base : '/guide/automation/' } ,
122
+ { text : 'Ring To Open' , link : 'ring-to-open' , base : '/guide/automation/' } ,
123
+ { text : 'Blueprints' , link : 'blueprints' , base : '/guide/automation/' }
124
+ ]
125
+ } ,
126
+ {
127
+ text : 'Enclosure' ,
128
+ items : [
129
+ { text : '3D printing' , link : '3d-printing' , base : '/guide/enclosure/' }
130
+ ]
131
+ } ,
132
+ {
133
+ text : 'Support' ,
134
+ link : 'support' ,
135
+ base : '/guide/support/' ,
136
+ collapsed : true ,
137
+ items : [
138
+ { text : 'Troubleshooting' , link : 'troubleshooting' , base : '/guide/support/' } ,
139
+ ]
140
+ }
141
+ ] ;
142
+ }
143
+
144
+ function sidebarReference ( ) : DefaultTheme . SidebarItem [ ] {
145
+ return [
146
+ {
147
+ text : 'Reference' ,
148
+ items : [
149
+ { text : 'Entities' , link : 'entities' } ,
150
+ { text : 'GPIO Pinout' , link : 'gpio' } ,
151
+ { text : 'Schematics' , link : 'schematics' }
152
+ ]
153
+ }
154
+ ] ;
155
+ }
0 commit comments