|
1 | | -import { createRequire } from 'module' |
2 | | -import { defineConfig } from 'vitepress' |
| 1 | +import { createRequire } from "module"; |
| 2 | +import { defineConfig } from "vitepress"; |
| 3 | +import { repositories } from "../../data/repositories"; |
3 | 4 |
|
4 | | -const require = createRequire(import.meta.url) |
5 | | -const pkg = require('vitepress/package.json') |
| 5 | +const require = createRequire(import.meta.url); |
| 6 | +const pkg = require("vitepress/package.json"); |
6 | 7 |
|
7 | 8 | export default defineConfig({ |
8 | | - lang: 'en-US', |
9 | | - description: 'Build your own modules repository', |
| 9 | + lang: "en-US", |
| 10 | + description: "Build your own modules repository", |
10 | 11 |
|
11 | 12 | themeConfig: { |
12 | 13 | nav: nav(), |
13 | 14 |
|
14 | | - lastUpdatedText: 'last Updated', |
| 15 | + lastUpdatedText: "last Updated", |
15 | 16 |
|
16 | 17 | sidebar: { |
17 | | - '/guide/': sidebarGuide(), |
18 | | - '/legal/': sidebarLegal() |
| 18 | + "/guide/": sidebarGuide(), |
| 19 | + "/repository/": sidebarRepositories(), |
| 20 | + "/legal/": sidebarLegal(), |
19 | 21 | }, |
20 | 22 |
|
21 | 23 | socialLinks: [ |
22 | | - { icon: 'github', link: 'https://github.com/MMRLApp/MMRL' }, |
23 | | - { icon: 'googleplay', link: 'https://play.google.com/store/apps/details?id=com.dergoogler.mmrl' } |
| 24 | + { icon: "github", link: "https://github.com/MMRLApp/MMRL" }, |
| 25 | + { |
| 26 | + icon: "googleplay", |
| 27 | + link: "https://play.google.com/store/apps/details?id=com.dergoogler.mmrl", |
| 28 | + }, |
24 | 29 | ], |
25 | 30 |
|
26 | 31 | footer: { |
27 | | - message: 'Released under the GPL3 License.', |
28 | | - copyright: 'Copyright © 2022-present Der_Googler and its contributors' |
| 32 | + message: "Released under the GPL3 License.", |
| 33 | + copyright: "Copyright © 2022-present Der_Googler and its contributors", |
29 | 34 | }, |
30 | 35 |
|
31 | 36 | editLink: { |
32 | | - pattern: 'https://github.com/MMRLApp/MMRLApp.github.io/edit/master/docs/:path', |
33 | | - text: 'Edit this page on GitHub' |
34 | | - } |
35 | | - } |
36 | | -}) |
| 37 | + pattern: |
| 38 | + "https://github.com/MMRLApp/MMRLApp.github.io/edit/master/docs/:path", |
| 39 | + text: "Edit this page on GitHub", |
| 40 | + }, |
| 41 | + }, |
| 42 | +}); |
37 | 43 |
|
38 | 44 | function nav() { |
39 | 45 | return [ |
40 | | - { text: 'Guide', link: '/guide' }, |
41 | | - { text: 'Legal', link: '/legal/privacy' }, |
42 | | - ] |
| 46 | + { text: "Guide", link: "/guide" }, |
| 47 | + { text: "Repositories", link: "/repository/gmr" }, |
| 48 | + { text: "Legal", link: "/legal/privacy" }, |
| 49 | + ]; |
43 | 50 | } |
44 | 51 |
|
45 | 52 | function sidebarGuide() { |
46 | 53 | return [ |
47 | 54 | { |
48 | | - text: 'Guide', |
| 55 | + text: "Guide", |
49 | 56 | items: [ |
50 | | - { text: 'What is MMRL', link: '/guide/' }, |
51 | | - { text: 'Anti-Features', link: '/guide/antifeatures' }, |
52 | | - { text: 'Installer API', link: '/guide/installer' }, |
53 | | - { text: 'Repositories', link: '/guide/repositories' }, |
| 57 | + { text: "What is MMRL", link: "/guide/" }, |
| 58 | + { text: "Anti-Features", link: "/guide/antifeatures" }, |
| 59 | + { text: "Installer API", link: "/guide/installer" }, |
54 | 60 | { |
55 | | - text: 'WebUI', |
| 61 | + text: "WebUI", |
56 | 62 | collapsed: true, |
57 | 63 | items: [ |
58 | | - { text: 'Getting Started', link: '/guide/webui/' }, |
| 64 | + { text: "Getting Started in WebUI", link: "/guide/webui/" }, |
59 | 65 | { |
60 | | - text: 'API', |
| 66 | + text: "API", |
| 67 | + collapsed: true, |
61 | 68 | items: [ |
62 | | - { text: 'FileSystem', link: '/guide/webui/api/filesystem' }, |
63 | | - { text: 'MMRLInterface', link: '/guide/webui/api/mmrlinterface' }, |
64 | | - { text: 'Toast', link: '/guide/webui/api/toast' }, |
65 | | - { text: 'VersionInterface', link: '/guide/webui/api/versioninterface' }, |
66 | | - ] |
| 69 | + { text: "FileSystem", link: "/guide/webui/api/filesystem" }, |
| 70 | + { |
| 71 | + text: "MMRLInterface", |
| 72 | + link: "/guide/webui/api/mmrlinterface", |
| 73 | + }, |
| 74 | + { text: "Toast", link: "/guide/webui/api/toast" }, |
| 75 | + { |
| 76 | + text: "VersionInterface", |
| 77 | + link: "/guide/webui/api/versioninterface", |
| 78 | + }, |
| 79 | + ], |
67 | 80 | }, |
68 | | - ] |
| 81 | + ], |
69 | 82 | }, |
70 | 83 | { |
71 | | - text: 'MMRL-Util', |
| 84 | + text: "MMRL-Util", |
72 | 85 | collapsed: true, |
73 | 86 | items: [ |
74 | | - { text: 'Getting Started', link: '/guide/mmrl-util/' }, |
75 | | - { text: 'repo.json', link: '/guide/mmrl-util/repo-json' }, |
76 | | - { text: 'track.json', link: '/guide/mmrl-util/track-json' }, |
77 | | - { text: 'config.json', link: '/guide/mmrl-util/config-json' }, |
78 | | - ] |
| 87 | + { text: "Getting Started", link: "/guide/mmrl-util/" }, |
| 88 | + { text: "repo.json", link: "/guide/mmrl-util/repo-json" }, |
| 89 | + { text: "track.json", link: "/guide/mmrl-util/track-json" }, |
| 90 | + { text: "config.json", link: "/guide/mmrl-util/config-json" }, |
| 91 | + ], |
79 | 92 | }, |
80 | | - { text: 'FAQ', link: '/guide/faq' }, |
81 | | - ] |
82 | | - } |
83 | | - ] |
| 93 | + { text: "FAQ", link: "/guide/faq" }, |
| 94 | + ], |
| 95 | + }, |
| 96 | + ]; |
84 | 97 | } |
85 | 98 |
|
86 | | - |
87 | 99 | function sidebarLegal() { |
88 | 100 | return [ |
89 | 101 | { |
90 | | - text: 'Legal', |
| 102 | + text: "Legal", |
91 | 103 | items: [ |
92 | | - { text: 'Privacy Policy', link: '/legal/privacy' }, |
93 | | - { text: 'Chat Rules', link: '/legal/chat-rules' }, |
94 | | - ] |
95 | | - } |
96 | | - ] |
| 104 | + { text: "Privacy Policy", link: "/legal/privacy" }, |
| 105 | + { text: "Chat Rules", link: "/legal/chat-rules" }, |
| 106 | + ], |
| 107 | + }, |
| 108 | + ]; |
| 109 | +} |
| 110 | + |
| 111 | +function repos() { |
| 112 | + return repositories.map((repo) => ({ |
| 113 | + text: repo.name, |
| 114 | + link: `/repository/${repo.slug}`, |
| 115 | + })); |
| 116 | +} |
| 117 | + |
| 118 | +function sidebarRepositories() { |
| 119 | + return [ |
| 120 | + { |
| 121 | + text: "Repositories", |
| 122 | + items: repos(), |
| 123 | + }, |
| 124 | + ]; |
97 | 125 | } |
0 commit comments