docs/.vitepress/configs/constants.ts
343 lines · 9921 bytes
1import type { DefaultTheme } from 'vitepress'
2import { x } from 'tinyexec'
3
4export const hostname: string = 'https://wotaku.wiki'
5export const excludedFiles = ['t.md']
6export const GIT_COMMIT =
7 /** Github actions commit hash */
8 process.env.GITHUB_SHA ??
9 /** Commit hash from git */
10 (await x('git', ['rev-parse', 'HEAD']).then((result) =>
11 result.stdout.trim()
12 )) ??
13 'dev'
14
15// @unocss-include
16export const nav: DefaultTheme.NavItem[] = [
17 {
18 text: 'Pages',
19 items: [
20 { text: 'Quick Start', link: '/qs' },
21 { text: 'FAQs', link: '/faq' },
22 { text: 'Websites', link: '/websites' },
23 { text: 'Software', link: '/software' },
24 { text: 'Misc-sites', link: '/misc' },
25 { text: 'Tools', link: '/tools' },
26 { text: 'Art', link: '/art' },
27 { text: 'Music', link: '/music' },
28 { text: 'Games', link: '/games' },
29 { text: 'Non-English', link: '/nonen' },
30 { text: 'NSFW', link: '/nsfw' },
31 { text: 'Merch', link: '/merch' },
32 { text: 'Scanlation', link: '/scanlation' },
33 { text: 'VTuber', link: '/vtuber' },
34 { text: 'Communities', link: '/comms' }
35 ]
36 },
37 {
38 text: 'Japan',
39 items: [
40 { text: 'Language', link: '/japan/language' },
41 { text: 'Immersion', link: '/japan/immersion' },
42 { text: 'Software', link: '/japan/software' },
43 { text: 'Culture', link: '/japan/culture' }
44 ]
45 },
46 {
47 text: 'Glossary',
48 items: [
49 { text: 'General', link: '/glossary/general' },
50 { text: 'Anime', link: '/glossary/anime' },
51 { text: 'Manga', link: '/glossary/manga' },
52 { text: 'Audio', link: '/glossary/audio' },
53 { text: 'NSFW', link: '/glossary/nsfw' }
54 ]
55 },
56 {
57 text: 'Torrenting',
58 // @ts-expect-error
59 collapsed: true,
60 items: [
61 { text: 'Getting Started', link: '/torrenting/start' },
62 { text: 'FAQs', link: '/torrenting/faq' },
63 { text: 'Glossary', link: '/torrenting/glossary' },
64 { text: 'qBittorrent', link: '/torrenting/qbit' },
65 { text: `Trackers`, link: '/torrenting/trackers' }
66 ]
67 },
68 {
69 text: 'Guides',
70 // @ts-expect-error
71 collapsed: true,
72 items: [
73 {
74 text: 'Anime',
75 items: [
76 { text: 'Disc Ripping', link: '/guides/anime/discrip' },
77 { text: 'Network Streaming', link: '/guides/anime/ns' }
78 ]
79 },
80 {
81 text: 'Manga',
82 items: [
83 { text: 'Digital Comic Info', link: '/guides/manga/comicinfo' },
84 { text: 'JXL Manga Readers', link: '/guides/manga/jxl' },
85 { text: 'Madokami', link: '/guides/manga/madokami' },
86 { text: 'Manga Image Editing', link: '/guides/manga/imagedit' }
87 ]
88 },
89 {
90 text: 'Extension Repos',
91 collapsed: true,
92 items: [
93 { text: 'Mihon & Aniyomi', link: '/guides/ext/mihon' },
94 { text: 'Mangayomi', link: '/guides/ext/mangayomi' },
95 { text: 'Other Android Apps', link: '/guides/ext/misc' },
96 { text: 'iOS apps', link: '/guides/ext/ios' }
97 ]
98 },
99 {
100 text: 'Music',
101 items: [
102 { text: 'FB2K Synced Lyrics', link: '/guides/music/fb2klyrics' },
103 { text: 'Squidify', link: '/guides/music/squidify' },
104 { text: 'Transcoding Audio', link: '/guides/music/transcoding' }
105 ]
106 },
107 {
108 text: 'Technical',
109 items: [
110 { text: 'Blocking Ads', link: '/guides/tech/adblock' },
111 { text: 'IRC & XDCC', link: '/guides/tech/irc' },
112 { text: 'JDL2 Ad-removal', link: '/guides/tech/jdl' }
113 ]
114 }
115 ]
116 },
117 {
118 text: 'Preferences',
119 items: [
120 {
121 component: 'PreferenceRadio',
122 props: {
123 text: 'Floating Takodachi',
124 group: 'takodachi',
125 options: ['Enable', 'Disable'],
126 defaultOption: 'Disable'
127 }
128 }
129 ]
130 }
131]
132
133export const sidebar: DefaultTheme.Sidebar = [
134 {
135 text: '<span class="i-lucide:zap"></span> Quick Start',
136 link: '/qs'
137 },
138 {
139 text: '<span class="i-lucide:message-circle-question"></span> FAQs',
140 link: '/faq'
141 },
142 {
143 text: '<span class="i-lucide:earth"></span> Websites',
144 link: '/websites'
145 },
146 {
147 text: '<span class="i-lucide:box"></span> Software',
148 link: '/software'
149 },
150 {
151 text: '<span class="i-lucide:folder-open"></span> Misc-sites',
152 link: '/misc'
153 },
154 {
155 text: '<span class="i-lucide:wrench"></span> Tools',
156 link: '/tools'
157 },
158 {
159 text: '<span class="i-lucide:brush"></span> Art',
160 link: '/art'
161 },
162 {
163 text: '<span class="i-lucide:music"></span> Music',
164 link: '/music'
165 },
166 {
167 text: '<span class="i-lucide:gamepad-2"></span> Games',
168 link: '/games'
169 },
170 {
171 text: '<span class="i-lucide:map"></span> Non-English',
172 link: '/nonen'
173 },
174 {
175 text: '<span class="i-lucide:ban"></span> NSFW',
176 link: '/nsfw'
177 },
178 {
179 text: '<span class="i-lucide:package-2"></span> Merch',
180 link: '/merch'
181 },
182 {
183 text: '<span class="i-lucide:scroll-text"></span> Scanlation',
184 link: '/scanlation'
185 },
186 {
187 text: '<span class="i-twemoji-comet"></span> VTuber',
188 link: '/vtuber'
189 },
190 {
191 text: '<span class="i-uil:letter-japanese-a"></span> Japan',
192 collapsed: true,
193 items: [
194 { text: 'Language', link: '/japan/language' },
195 { text: 'Immersion', link: '/japan/immersion' },
196 { text: 'Software', link: '/japan/software' },
197 { text: 'Culture', link: '/japan/culture' }
198 ]
199 },
200 {
201 text: '<span class="i-lucide:book-open"></span> Glossary',
202 collapsed: true,
203 items: [
204 { text: 'General', link: '/glossary/general' },
205 { text: 'Anime', link: '/glossary/anime' },
206 { text: 'Manga', link: '/glossary/manga' },
207 { text: 'Audio', link: '/glossary/audio' },
208 { text: 'NSFW', link: '/glossary/nsfw' }
209 ]
210 },
211 {
212 text: '<span class="i-lucide:magnet"></span> Torrenting',
213 collapsed: true,
214 items: [
215 { text: 'Getting Started', link: '/torrenting/start' },
216 { text: 'FAQs', link: '/torrenting/faq' },
217 { text: 'Glossary', link: '/torrenting/glossary' },
218 { text: 'qBittorrent', link: '/torrenting/qbit' },
219 { text: `Trackers`, link: '/torrenting/trackers' }
220 ]
221 },
222 {
223 text: '<span class="i-lucide:book-key"></span> Guides',
224 collapsed: true,
225 items: [
226 {
227 text: 'Anime',
228 collapsed: true,
229 items: [
230 { text: 'Disc Ripping', link: '/guides/anime/discrip' },
231 { text: 'Network Streaming', link: '/guides/anime/ns' }
232 ]
233 },
234 {
235 text: 'Manga',
236 collapsed: true,
237 items: [
238 { text: 'Digital Comic Info', link: '/guides/manga/comicinfo' },
239 { text: 'JXL Manga Readers', link: '/guides/manga/jxl' },
240 { text: 'Madokami', link: '/guides/manga/madokami' },
241 { text: 'Manga Image Editing', link: '/guides/manga/imagedit' }
242 ]
243 },
244 {
245 text: 'Extension Repos',
246 collapsed: true,
247 items: [
248 { text: 'Mihon & Aniyomi', link: '/guides/ext/mihon' },
249 { text: 'Mangayomi', link: '/guides/ext/mangayomi' },
250 { text: 'Other Android Apps', link: '/guides/ext/misc' },
251 { text: 'iOS apps', link: '/guides/ext/ios' }
252 ]
253 },
254 {
255 text: 'Music',
256 collapsed: true,
257 items: [
258 { text: 'FB2K Synced Lyrics', link: '/guides/music/fb2klyrics' },
259 { text: 'Squidify', link: '/guides/music/squidify' },
260 { text: 'Transcoding Audio', link: '/guides/music/transcoding' }
261 ]
262 },
263 {
264 text: 'Technical',
265 collapsed: true,
266 items: [
267 { text: 'Blocking Ads', link: '/guides/tech/adblock' },
268 { text: 'IRC & XDCC', link: '/guides/tech/irc' },
269 { text: 'JDL2 Ad-removal', link: '/guides/tech/jdl' }
270 ]
271 }
272 ]
273 },
274 {
275 text: '<span class="i-lucide:messages-square"></span> Communities',
276 link: '/comms'
277 },
278 {
279 text: '<span class="i-lucide:heart-handshake"></span> Credits',
280 link: '/credits'
281 },
282 {
283 text: '<span class="i-lucide:goal"></span> Getting Started',
284 link: '/start'
285 }
286]
287
288export const siteConfig = {
289 title: 'Wotaku',
290 description:
291 'Wotaku, the one-stop-shop for all your otaku interests. Here you can find websites for Anime, Manga, Light Novels, Music, Soundtracks, Games and Hentai. Our japanese learning section has books and videos about language, history and culture.',
292 lang: 'en-US',
293 lastUpdated: true,
294 cleanUrls: true,
295 ignoreDeadLinks: true,
296 appearance: true,
297 titleTemplate: ':title • Wotaku.wiki by Duck',
298 head: [
299 ['meta', { name: 'theme-color', content: '#56b4fc' }],
300 ['meta', { name: 'og:type', content: 'website' }],
301 ['meta', { name: 'og:locale', content: 'en' }],
302 ['link', { rel: 'icon', href: '/asset/fav.png' }],
303 // PWA
304 ['link', { rel: 'icon', href: '/asset/fav.png', type: 'image/svg+xml' }],
305 ['link', { rel: 'alternate icon', href: '/asset/fav.png' }],
306 ['link', { rel: 'mask-icon', href: '/asset/fav.png', color: '#56b4fc' }],
307 // prettier-ignore
308 [
309 'meta',
310 {
311 name: 'keywords',
312 content:
313 'Anime, Anime Piracy, Manga, Manga Piracy, VTuber, Hentai, JPOP, Music, Japan, Learning Japanese, Weeb, Otaku'
314 }
315 ],
316 [
317 'link',
318 {
319 rel: 'apple-touch-icon',
320 href: '/asset/fav.png',
321 sizes: '192x192'
322 }
323 ],
324 [
325 'script',
326 { id: 'restore-banner-preference' },
327 `
328(() => {
329 const restore = (key, cls, def = false) => {
330 const saved = localStorage.getItem(key);
331 if (saved) {
332 document.documentElement.classList.add(cls);
333 }
334 };
335 restore('ackDomainChange', 'banner-dismissed');
336})();`
337 ]
338 ],
339 srcExclude: ['README.md', 'sandbox/**/*.md'],
340 sitemap: {
341 hostname: hostname
342 }
343}