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