|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | + |
| 3 | +const repositoryName = process.env.GITHUB_REPOSITORY?.split('/')[1] |
| 4 | +const isGitHubActions = process.env.GITHUB_ACTIONS === 'true' |
| 5 | +const isUserSite = repositoryName?.endsWith('.github.io') |
| 6 | +const base = isGitHubActions && repositoryName && !isUserSite |
| 7 | + ? `/${repositoryName}/` |
| 8 | + : '/' |
| 9 | + |
| 10 | +// https://vitepress.dev/reference/site-config |
| 11 | +export default defineConfig({ |
| 12 | + base, |
| 13 | + title: "CJIT", |
| 14 | + description: "C, Just in Time!", |
| 15 | + themeConfig: { |
| 16 | + // https://vitepress.dev/reference/default-theme-config |
| 17 | + nav: [ |
| 18 | + { text: 'CJIT Tutorial', link: '/' }, |
| 19 | + { text: 'About Dyne.org', link: 'https://dyne.org' } |
| 20 | + ], |
| 21 | + |
| 22 | + sidebar: [ |
| 23 | + { |
| 24 | + text: 'Tutorial', |
| 25 | + items: [ |
| 26 | + { text: 'Get started', link: '/tutorial' }, |
| 27 | + { text: 'Graphics', link: '/graphics' }, |
| 28 | + { text: 'Sound', link: '/sound' }, |
| 29 | + { text: 'Filesystem', link: '/filesystem' }, |
| 30 | + { text: 'Terminal UI', link: '/tui' }, |
| 31 | + { text: 'Manpage', link: '/manpage' }, |
| 32 | + { text: 'FAQs', link: '/faq' } |
| 33 | + ] |
| 34 | + } |
| 35 | + ], |
| 36 | + |
| 37 | + socialLinks: [ |
| 38 | + { icon: 'github', link: 'https://github.com/dyne/cjit' } |
| 39 | + ] |
| 40 | + } |
| 41 | +}) |
0 commit comments