docs/.vitepress/configs/constants.ts

8f23b2af7b8d974765e00d5e774757de0bb45071
wotaku/docs/.vitepress/configs/constants.ts

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