docs/.vitepress/configs/constants.ts

00eef3fe2aacf8c794b27f4c61d785bf374464b6
wotaku/docs/.vitepress/configs/constants.ts

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