forked from Vaskivskyi/docs-asusrouter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar.ts
80 lines (76 loc) · 2.05 KB
/
navbar.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
import type { NavbarConfig } from "@vuepress/theme-default"
import { resolve } from "path";
import { readdirSync } from "fs";
export function getFiles(dir: string, exclude: string[] = []) {
let base = resolve(__dirname, "docs");
return readdirSync(resolve(base, dir))
.filter(file => file.endsWith(".md") && file !== "README.md" && !exclude.includes(file))
.map(file => `/${ dir }/${ file }`);
}
export function getFilesRev(dir: string) {
let files = getFiles(dir);
return files.reverse();
}
export function getFilesPushFront(dir: string, push: string[] = []){
let files = getFiles(dir, push);
push.forEach(function(file) {
files.unshift(`/${ dir }/${ file }`);
});
return files;
}
export const navbar: NavbarConfig = [
{
text: "Guide",
children: [
"/guide/getting-started/",
"/guide/configuration/",
"/guide/faq/",
]
},
{
text: "Features",
link: "/features/"
},
{
text: "Devices",
link: "/devices/"
},
{
text: 'Support',
children: [
{
text: "Issues",
link: "https://github.com/Vaskivskyi/ha-asusrouter/issues",
},
{
text: "Community forum",
link: "https://community.home-assistant.io/t/custom-component-asusrouter-integration/416111",
},
{
text: "Ghange Log",
link: "/log/"
},
{
text: "Credits",
link: "/credits/"
},
],
},
{
text: "Donate",
children: [
{
text: "Buy Me a Coffee",
link: "https://www.buymeacoffee.com/Vaskivskyi",
},
{
text: "GitHub Sponsors",
link: "https://github.com/sponsors/Vaskivskyi",
},
{
text: "Patreon",
link: "https://www.patreon.com/Vaskivskyi",
},
]
},
]