docs/.vitepress/configs/constants.ts
351 lines · 10437 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: 'Cubari guide', link: '/guides/manga/cubari' },
84 { text: 'Digital Comic Info', link: '/guides/manga/comicinfo' },
85 { text: 'Downloading Manga', link: '/guides/manga/mdl' },
86 { text: 'JXL Manga Readers', link: '/guides/manga/jxl' },
87 { text: 'Madokami', link: '/guides/manga/madokami' },
88 { text: 'Manga Image Editing', link: '/guides/manga/imagedit' },
89 { text: 'OPDS to E-reader', link: '/guides/manga/opds' }
90 ]
91 },
92 {
93 text: 'Extension Repos',
94 collapsed: true,
95 items: [
96 { text: 'Mihon & Aniyomi', link: '/guides/ext/mihon' },
97 { text: 'Mangayomi', link: '/guides/ext/mangayomi' },
98 { text: 'Other Android Apps', link: '/guides/ext/misc' },
99 { text: 'iOS apps', link: '/guides/ext/ios' }
100 ]
101 },
102 {
103 text: 'Music',
104 items: [
105 { text: 'Echo', link: '/guides/music/echo' },
106 { text: 'FB2K Synced Lyrics', link: '/guides/music/fb2klyrics' },
107 { text: 'Squidify', link: '/guides/music/squidify' },
108 { text: 'Transcoding Audio', link: '/guides/music/transcoding' }
109 ]
110 },
111 {
112 text: 'Technical',
113 items: [
114 { text: 'Blocking Ads', link: '/guides/tech/adblock' },
115 { text: 'IRC & XDCC', link: '/guides/tech/irc' },
116 { text: 'JDL2 Ad-removal', link: '/guides/tech/jdl' }
117 ]
118 }
119 ]
120 },
121 {
122 text: 'Preferences',
123 items: [
124 {
125 component: 'PreferenceRadio',
126 props: {
127 text: 'Floating Takodachi',
128 group: 'takodachi',
129 options: ['Enable', 'Disable'],
130 defaultOption: 'Disable'
131 }
132 }
133 ]
134 }
135]
136
137export const sidebar: DefaultTheme.Sidebar = [
138 {
139 text: '<span class="i-lucide:zap"></span> Quick Start',
140 link: '/qs'
141 },
142 {
143 text: '<span class="i-lucide:message-circle-question"></span> FAQs',
144 link: '/faq'
145 },
146 {
147 text: '<span class="i-lucide:earth"></span> Websites',
148 link: '/websites'
149 },
150 {
151 text: '<span class="i-lucide:box"></span> Software',
152 link: '/software'
153 },
154 {
155 text: '<span class="i-lucide:folder-open"></span> Misc-sites',
156 link: '/misc'
157 },
158 {
159 text: '<span class="i-lucide:wrench"></span> Tools',
160 link: '/tools'
161 },
162 {
163 text: '<span class="i-lucide:brush"></span> Art',
164 link: '/art'
165 },
166 {
167 text: '<span class="i-lucide:music"></span> Music',
168 link: '/music'
169 },
170 {
171 text: '<span class="i-lucide:gamepad-2"></span> Games',
172 link: '/games'
173 },
174 {
175 text: '<span class="i-lucide:map"></span> Non-English',
176 link: '/nonen'
177 },
178 {
179 text: '<span class="i-lucide:ban"></span> NSFW',
180 link: '/nsfw'
181 },
182 {
183 text: '<span class="i-lucide:package-2"></span> Merch',
184 link: '/merch'
185 },
186 {
187 text: '<span class="i-lucide:scroll-text"></span> Scanlation',
188 link: '/scanlation'
189 },
190 {
191 text: '<span class="i-twemoji-comet"></span> VTuber',
192 link: '/vtuber'
193 },
194 {
195 text: '<span class="i-uil:letter-japanese-a"></span> Japan',
196 collapsed: true,
197 items: [
198 { text: 'Language', link: '/japan/language' },
199 { text: 'Immersion', link: '/japan/immersion' },
200 { text: 'Software', link: '/japan/software' },
201 { text: 'Culture', link: '/japan/culture' }
202 ]
203 },
204 {
205 text: '<span class="i-lucide:book-open"></span> Glossary',
206 collapsed: true,
207 items: [
208 { text: 'General', link: '/glossary/general' },
209 { text: 'Anime', link: '/glossary/anime' },
210 { text: 'Manga', link: '/glossary/manga' },
211 { text: 'Audio', link: '/glossary/audio' },
212 { text: 'NSFW', link: '/glossary/nsfw' }
213 ]
214 },
215 {
216 text: '<span class="i-lucide:magnet"></span> Torrenting',
217 collapsed: true,
218 items: [
219 { text: 'Getting Started', link: '/torrenting/start' },
220 { text: 'FAQs', link: '/torrenting/faq' },
221 { text: 'Glossary', link: '/torrenting/glossary' },
222 { text: 'qBittorrent', link: '/torrenting/qbit' },
223 { text: `Trackers`, link: '/torrenting/trackers' }
224 ]
225 },
226 {
227 text: '<span class="i-lucide:book-key"></span> Guides',
228 collapsed: true,
229 items: [
230 {
231 text: 'Anime',
232 collapsed: true,
233 items: [
234 { text: 'Disc Ripping', link: '/guides/anime/discrip' },
235 { text: 'Network Streaming', link: '/guides/anime/ns' }
236 ]
237 },
238 {
239 text: 'Manga',
240 collapsed: true,
241 items: [
242 { text: 'Cubari guide', link: '/guides/manga/cubari' },
243 { text: 'Digital Comic Info', link: '/guides/manga/comicinfo' },
244 { text: 'Downloading Manga', link: '/guides/manga/mdl' },
245 { text: 'JXL Manga Readers', link: '/guides/manga/jxl' },
246 { text: 'Madokami', link: '/guides/manga/madokami' },
247 { text: 'Manga Image Editing', link: '/guides/manga/imagedit' },
248 { text: 'OPDS to E-reader', link: '/guides/manga/opds' }
249 ]
250 },
251 {
252 text: 'Extension Repos',
253 collapsed: true,
254 items: [
255 { text: 'Mihon & Aniyomi', link: '/guides/ext/mihon' },
256 { text: 'Mangayomi', link: '/guides/ext/mangayomi' },
257 { text: 'Other Android Apps', link: '/guides/ext/misc' },
258 { text: 'iOS apps', link: '/guides/ext/ios' }
259 ]
260 },
261 {
262 text: 'Music',
263 collapsed: true,
264 items: [
265 { text: 'Echo', link: '/guides/music/echo' },
266 { text: 'FB2K Synced Lyrics', link: '/guides/music/fb2klyrics' },
267 { text: 'Squidify', link: '/guides/music/squidify' },
268 { text: 'Transcoding Audio', link: '/guides/music/transcoding' }
269 ]
270 },
271 {
272 text: 'Technical',
273 collapsed: true,
274 items: [
275 { text: 'Blocking Ads', link: '/guides/tech/adblock' },
276 { text: 'IRC & XDCC', link: '/guides/tech/irc' },
277 { text: 'JDL2 Ad-removal', link: '/guides/tech/jdl' }
278 ]
279 }
280 ]
281 },
282 {
283 text: '<span class="i-lucide:messages-square"></span> Communities',
284 link: '/comms'
285 },
286 {
287 text: '<span class="i-lucide:heart-handshake"></span> Credits',
288 link: '/credits'
289 },
290 {
291 text: '<span class="i-lucide:goal"></span> Getting Started',
292 link: '/start'
293 }
294]
295
296export const siteConfig = {
297 title: 'Wotaku',
298 description:
299 '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.',
300 lang: 'en-US',
301 lastUpdated: true,
302 cleanUrls: true,
303 ignoreDeadLinks: true,
304 appearance: true,
305 titleTemplate: ':title • Wotaku.wiki by Duck',
306 head: [
307 ['meta', { name: 'theme-color', content: '#56b4fc' }],
308 ['meta', { name: 'og:type', content: 'website' }],
309 ['meta', { name: 'og:locale', content: 'en' }],
310 ['link', { rel: 'icon', href: '/asset/fav.png' }],
311 // PWA
312 ['link', { rel: 'icon', href: '/asset/fav.png', type: 'image/svg+xml' }],
313 ['link', { rel: 'alternate icon', href: '/asset/fav.png' }],
314 ['link', { rel: 'mask-icon', href: '/asset/fav.png', color: '#56b4fc' }],
315 // prettier-ignore
316 [
317 'meta',
318 {
319 name: 'keywords',
320 content:
321 'Anime, Anime Piracy, Manga, Manga Piracy, VTuber, Hentai, JPOP, Music, Japan, Learning Japanese, Weeb, Otaku'
322 }
323 ],
324 [
325 'link',
326 {
327 rel: 'apple-touch-icon',
328 href: '/asset/fav.png',
329 sizes: '192x192'
330 }
331 ],
332 [
333 'script',
334 { id: 'restore-banner-preference' },
335 `
336(() => {
337 const restore = (key, cls, def = false) => {
338 const saved = localStorage.getItem(key);
339 if (saved) {
340 document.documentElement.classList.add(cls);
341 }
342 };
343 restore('ackDomainChange', 'banner-dismissed');
344})();`
345 ]
346 ],
347 srcExclude: ['README.md', 'sandbox/**/*.md'],
348 sitemap: {
349 hostname: hostname
350 }
351}