/ .vitepress / config.mts
config.mts
  1  // import { defineConfig } from 'vitepress'
  2  import mdFootnote from 'markdown-it-footnote'
  3  import { withMermaid } from 'vitepress-plugin-mermaid'
  4  // const { BASE: base = '/' } = process.env;
  5  
  6  // https://vitepress.dev/reference/site-config
  7  export default withMermaid({
  8    lang: 'en-US',
  9    title: 'Codex Docs',
 10    description: 'Decentralised data storage platform',
 11    lastUpdated: true,
 12    cleanUrls: true,
 13    ignoreDeadLinks: false,
 14    appearance: true,
 15  
 16    markdown: {
 17      math: true,
 18      config: (md) => {
 19        md.use(mdFootnote)
 20      },
 21    },
 22    //  base: base,
 23  
 24    mermaid:{
 25      //mermaidConfig !theme here works for ligth mode since dark theme is forced in dark mode
 26    },
 27  
 28    // lite-youtube-embed
 29    vue: {
 30      template: {
 31        compilerOptions: {
 32          isCustomElement: (tag) => tag === 'lite-youtube',
 33        },
 34      },
 35    },
 36  
 37    head: [
 38      [
 39        'link', { rel: 'icon', href: '/favicons/favicon.svg', type: 'image/svg+xml' }
 40      ]
 41    ],
 42  
 43    srcExclude: ['README.md'],
 44  
 45    outDir: './.vitepress/dist',
 46    assetsDir: 'assets',
 47  
 48    themeConfig: {
 49      // https://vitepress.dev/reference/default-theme-config
 50      nav: [
 51        { text: 'Whitepaper', link: '/learn/whitepaper' },
 52        { text: 'Tokenomics Litepaper', link: '/learn/tokenomics-litepaper' },
 53        {
 54          text: 'Codex',
 55          items: [
 56            { text: 'About', link: '/codex/about' },
 57            { text: 'Security', link: '/codex/security' },
 58            { text: 'Privacy Policy', link: '/codex/privacy-policy' },
 59            { text: 'Terms of Use', link: '/codex/terms-of-use' }
 60          ]
 61        }
 62      ],
 63  
 64      search: {
 65        provider: 'local',
 66        options: {
 67          detailedView: true,
 68        },
 69      },
 70  
 71      editLink: {
 72        pattern: 'https://github.com/codex-storage/codex-docs/edit/master/:path',
 73        text: 'Edit this page on GitHub',
 74      },
 75  
 76      logo: {
 77        alt: 'Codex • Docs',
 78        light: '/codex-mark-primary-black-resized.png',
 79        dark: '/codex-mark-primary-white-resized.png',
 80      },
 81  
 82      siteTitle: 'Codex • Docs',
 83  
 84      logoLink: '/learn/what-is-codex',
 85  
 86      sidebar: [
 87        {
 88          text: 'Introduction',
 89          collapsed: false,
 90          items: [
 91            { text: 'What is Codex?', link: '/learn/what-is-codex' },
 92            { text: 'Architecture', link: '/learn/architecture' },
 93            { text: 'Whitepaper', link: '/learn/whitepaper' },
 94            { text: 'Tokenomics Litepaper', link: '/learn/tokenomics-litepaper' }
 95          ]
 96        },
 97        {
 98          text: 'Setup Codex with Installer',
 99          collapsed: false,
100          items: [
101            { text: 'Disclaimer', link: '/codex/installer-disclaimer' },
102            { text: 'Requirements', link: '/learn/installer/requirements' },
103            { text: 'Install and Run Codex', link: '/learn/installer/install-and-run' },
104            { text: 'Upload/Download', link: '/learn/installer/upload-and-download' },
105          ]
106        },
107        {
108          text: 'Setup Codex Manually',
109          collapsed: false,
110          items: [
111            { text: 'Disclaimer', link: '/codex/disclaimer' },
112            { text: 'Quick start', link: '/learn/quick-start' },
113            { text: 'Build Codex', link: '/learn/build' },
114            { text: 'Run Codex', link: '/learn/run' },
115            { text: 'Using Codex', link: '/learn/using' },
116            { text: 'Local Two Client Test', link: '/learn/local-two-client-test' },
117            { text: 'Local Marketplace', link: '/learn/local-marketplace' },
118            { text: 'Download Flow', link: '/learn/download-flow' },
119            { text: 'Troubleshoot', link: '/learn/troubleshoot' }
120          ]
121        },
122        {
123          text: 'Developers',
124          collapsed: false,
125          items: [
126            { text: 'API', link: '/developers/api' }
127          ]
128        },
129        {
130          text: 'Codex',
131          collapsed: false,
132          items: [
133            { text: 'About', link: '/codex/about' },
134            { text: 'Security', link: '/codex/security' },
135            { text: 'Privacy Policy', link: '/codex/privacy-policy' },
136            { text: 'Terms of Use', link: '/codex/terms-of-use' }
137          ]
138        }
139      ],
140  
141      socialLinks: [
142        { icon: 'github', link: 'https://github.com/codex-storage/codex-docs' },
143        { icon: 'twitter', link: 'https://twitter.com/Codex_storage' },
144        { icon: 'youtube', link: 'https://www.youtube.com/@CodexStorage' },
145        { icon: 'discord', link: 'https://discord.gg/codex-storage' }
146      ]
147    },
148  
149    // Internationalization - https://vitepress.dev/guide/i18n
150    locales: {
151      root: {
152        label: 'English',
153        lang: 'en'
154      },
155      // Russian
156      ru: {
157        label: 'Русский',
158        lang: 'ru-RU',
159        link: '/ru',
160        themeConfig: {
161          nav: [
162            { text: 'Whitepaper', link: '/ru/learn/whitepaper' },
163            { text: 'Tokenomics Litepaper', link: '/ru/learn/tokenomics-litepaper' },
164            {
165              text: 'Codex',
166              items: [
167                { text: 'О проекте', link: '/ru/codex/about' },
168                { text: 'Безопасность', link: '/ru/codex/security' },
169                { text: 'Политика конфиденциальности', link: '/ru/codex/privacy-policy' },
170                { text: 'Условия использования', link: '/ru/codex/terms-of-use' }
171              ]
172            }
173          ],
174          editLink: {
175            pattern: 'https://github.com/codex-storage/codex-docs/edit/master/:path',
176            text: 'Редактировать эту страницу на GitHub',
177          },
178          siteTitle: 'Codex • Документация',
179          logoLink: '/ru/learn/what-is-codex',
180          sidebar: [
181            {
182              text: 'Введение',
183              collapsed: false,
184              items: [
185                { text: 'Что такое Codex?', link: '/ru/learn/what-is-codex' },
186                { text: 'Архитектура', link: '/ru/learn/architecture' },
187                { text: 'Whitepaper', link: '/ru/learn/whitepaper' },
188                { text: 'Tokenomics Litepaper', link: '/ru/learn/tokenomics-litepaper' }
189              ]
190            },
191            {
192              text: 'Установка Codex с помощью установщика',
193              collapsed: false,
194              items: [
195                { text: 'Отказ от ответственности', link: '/ru/codex/installer-disclaimer' },
196                { text: 'Требования', link: '/ru/learn/installer/requirements' },
197                { text: 'Установка и запуск Codex', link: '/ru/learn/installer/install-and-run' },
198                { text: 'Загрузка/Скачивание', link: '/ru/learn/installer/upload-and-download' },
199              ]
200            },
201            {
202              text: 'Установка Codex вручную',
203              collapsed: false,
204              items: [
205                { text: 'Отказ от ответственности', link: '/ru/codex/disclaimer' },
206                { text: 'Быстрый старт', link: '/ru/learn/quick-start' },
207                { text: 'Сборка Codex', link: '/ru/learn/build' },
208                { text: 'Запуск Codex', link: '/ru/learn/run' },
209                { text: 'Использование Codex', link: '/ru/learn/using' },
210                { text: 'Локальное тестирование с двумя клиентами', link: '/ru/learn/local-two-client-test' },
211                { text: 'Локальный маркетплейс', link: '/ru/learn/local-marketplace' },
212                { text: 'Поток загрузки', link: '/ru/learn/download-flow' },
213                { text: 'Устранение неполадок', link: '/ru/learn/troubleshoot' }
214              ]
215            },
216            {
217              text: 'Сети Codex',
218              collapsed: false,
219              items: [
220                { text: 'Devnet', link: '/ru/networks/devnet' },
221                { text: 'Testnet', link: '/ru/networks/testnet' }
222              ]
223            },
224            {
225              text: 'Разработчики',
226              collapsed: false,
227              items: [
228                { text: 'API', link: '/ru/developers/api' }
229              ]
230            },
231            {
232              text: 'Codex',
233              collapsed: false,
234              items: [
235                { text: 'О проекте', link: '/ru/codex/about' },
236                { text: 'Безопасность', link: '/ru/codex/security' },
237                { text: 'Политика конфиденциальности', link: '/ru/codex/privacy-policy' },
238                { text: 'Условия использования', link: '/ru/codex/terms-of-use' }
239              ]
240            }
241          ],
242        }
243      },
244      // Korean
245      ko: {
246        label: '한국어',
247        lang: 'ko-KP',
248        link: '/ko',
249        themeConfig: {
250          nav: [
251            { text: '백서', link: '/ko/learn/whitepaper' },
252            { text: 'Tokenomics Litepaper', link: '/ko/learn/tokenomics-litepaper' },
253            {
254              text: 'Codex',
255              items: [
256                { text: '소개', link: '/ko/codex/about' },
257                { text: '보안', link: '/ko/codex/security' },
258                { text: '개인정보 처리방침', link: '/ko/codex/privacy-policy' },
259                { text: '이용 약관', link: '/ko/codex/terms-of-use' }
260              ]
261            }
262          ],
263          editLink: {
264            pattern: 'https://github.com/codex-storage/codex-docs/edit/master/:path',
265            text: 'Edit this page on GitHub',
266          },
267          siteTitle: 'Codex • 문서',
268          logoLink: '/ko/learn/what-is-codex',
269          sidebar: [
270            {
271              text: 'Introduction',
272              collapsed: false,
273              items: [
274                { text: 'Codex란 무엇인가?', link: '/ko/learn/what-is-codex' },
275                { text: '아키텍처', link: '/ko/learn/architecture' },
276                { text: '백서', link: '/ko/learn/whitepaper' },
277                { text: 'Tokenomics Litepaper', link: '/ko/learn/tokenomics-litepaper' }
278              ]
279            },
280            {
281              text: 'Setup Codex with Installer',
282              collapsed: false,
283              items: [
284                { text: '면책 조항', link: '/ko/codex/installer-disclaimer' },
285                { text: 'Requirements', link: '/ko/learn/installer/requirements' },
286                { text: 'Install and Run Codex', link: '/ko/learn/installer/install-and-run' },
287                { text: 'Upload/Download', link: '/ko/learn/installer/upload-and-download' },
288              ]
289            },
290            {
291              text: 'Setup Codex Manually',
292              collapsed: false,
293              items: [
294                { text: '면책 조항', link: '/ko/codex/disclaimer' },
295                { text: '빠른 시작', link: '/ko/learn/quick-start' },
296                { text: 'Build Codex', link: '/ko/learn/build' },
297                { text: 'Run Codex', link: '/ko/learn/run' },
298                { text: '사용하기', link: '/ko/learn/using' },
299                { text: 'Local Two Client Test', link: '/ko/learn/local-two-client-test' },
300                { text: 'Local Marketplace', link: '/ko/learn/local-marketplace' },
301                { text: 'Download Flow', link: '/ko/learn/download-flow' },
302                { text: '문제 해결', link: '/ko/learn/troubleshoot' }
303              ]
304            },
305            {
306              text: 'Developers',
307              collapsed: false,
308              items: [
309                { text: 'API', link: '/developers/api' }
310              ]
311            },
312            {
313              text: 'Codex',
314              collapsed: false,
315              items: [
316                { text: '소개', link: '/ko/codex/about' },
317                { text: '보안', link: '/ko/codex/security' },
318                { text: '개인정보 처리방침', link: '/ko/codex/privacy-policy' },
319                { text: '이용 약관', link: '/ko/codex/terms-of-use' }
320              ]
321            }
322          ],
323        }
324      },
325      // Spanish
326      es: {
327        label: 'Español',
328        lang: 'es-ES',
329        link: '/es',
330        themeConfig: {
331          nav: [
332            { text: 'Whitepaper', link: '/es/learn/whitepaper' },
333            { text: 'Tokenomics Litepaper', link: '/es/learn/tokenomics-litepaper' },
334            {
335              text: 'Codex',
336              items: [
337                { text: 'Acerca de Codex', link: '/es/codex/about' },
338                { text: 'Seguridad', link: '/es/codex/security' },
339                { text: 'Política de privacidad', link: '/es/codex/privacy-policy' },
340                { text: 'Términos de uso', link: '/es/codex/terms-of-use' }
341              ]
342            }
343          ],
344          editLink: {
345            pattern: 'https://github.com/codex-storage/codex-docs/edit/master/:path',
346            text: 'Redactar esta página en GitHub',
347          },
348          siteTitle: 'Codex • Documentación',
349          logoLink: '/es/learn/what-is-codex',
350          sidebar: [
351            {
352              text: 'Introducción',
353              collapsed: false,
354              items: [
355                { text: '¿Qué es Codex?', link: '/es/learn/what-is-codex' },
356                { text: 'Arquitectura', link: '/es/learn/architecture' },
357                { text: 'Whitepaper', link: '/es/learn/whitepaper' },
358                { text: 'Tokenomics Litepaper', link: '/es/learn/tokenomics-litepaper' }
359              ]
360            },
361            {
362              text: 'Instalar Codex manualmente',
363              collapsed: false,
364              items: [
365                { text: 'Descargo de responsabilidad', link: '/es/codex/disclaimer' },
366                { text: 'Inicio rápido', link: '/es/learn/quick-start' },
367                { text: 'Compilar Codex', link: '/es/learn/build' },
368                { text: 'Ejecutar Codex', link: '/es/learn/run' },
369                { text: 'Usar Codex', link: '/es/learn/using' },
370                { text: 'Prueba local de dos clientes', link: '/es/learn/local-two-client-test' },
371                { text: 'Mercado local', link: '/es/learn/local-marketplace' },
372                { text: 'Flujo de descarga', link: '/es/learn/download-flow' },
373                { text: 'Solucionar problemas', link: '/es/learn/troubleshoot' }
374              ]
375            },
376            {
377              text: 'Redes Codex',
378              collapsed: false,
379              items: [
380                { text: 'Devnet', link: '/es/networks/devnet' },
381                { text: 'Testnet', link: '/es/networks/testnet' }
382              ]
383            },
384            {
385              text: 'Desarrolladores',
386              collapsed: false,
387              items: [
388                { text: 'API', link: '/developers/api' }
389              ]
390            },
391            {
392              text: 'Codex',
393              collapsed: false,
394              items: [{ text: 'Acerca de', link: '/es/codex/about' },
395                { text: 'Seguridad', link: '/es/codex/security' },
396                { text: 'Política de privacidad', link: '/es/codex/privacy-policy' },
397                { text: 'Términos de uso', link: '/es/codex/terms-of-use' }
398              ]
399            }
400          ],
401        }
402      }
403    }
404  })