diff --git a/.gitignore b/.gitignore index 0708bfd31..3b3c04c36 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,8 @@ node_modules /frontend/webpack-stats.json /frontend/src/translations.json /frontend/.__mf__temp/ -.vitepress/ +doc-ng/.vitepress/cache/ +doc-ng/.vitepress/dist/ # TOX stuff test_project/modoboa.db diff --git a/doc-ng/.vitepress/config.mjs b/doc-ng/.vitepress/config.mjs new file mode 100644 index 000000000..94fe5832b --- /dev/null +++ b/doc-ng/.vitepress/config.mjs @@ -0,0 +1,107 @@ +import { defineConfig } from 'vitepress' + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + // Use Canonical URL, but only the path and with no trailing / + // End result is like: `/en/latest` + // https://docs.readthedocs.com/platform/stable/intro/vitepress.html#using-the-proper-base-path + base: process.env.READTHEDOCS_CANONICAL_URL ? new URL(process.env.READTHEDOCS_CANONICAL_URL).pathname.replace(/\/$/, "") : "", + title: "Modoboa Documentation ", + titleTemplate: ':title', + description: "Modoboa documentation", + srcExclude: ['public/**/*.md'], + ignoreDeadLinks: [ + /^https?:\/\/localhost:*/, + ], + metaChunk: true, + themeConfig: { + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: 'Home', link: '/' }, + { text: 'Installation', items: [ + { text: 'Requirements', link: '/installation/requirements'}, + { text: 'Manual Installation', link: '/installation/manual'}, + { text: 'Modoboa Installer', link: '/installation/installer' }, + { text: 'Upgrade Instance', link: '/installation/upgrade' }, + { text: 'Configuration', link: '/configuration' }, + ]}, + { text: 'Contributing', items: [ + { text: 'Getting Start', link: '/contributing/getting_start'}, + { text: 'Write Plugin', link: '/contributing/plugin_api'}, + { text: 'Translate', link: '/contributing/translation'}, + { text: 'Contributor', link: '/contributors'}, + ]} + ], + + sidebar: { + "/installation/": [{ + text: 'Manual', + items: [ + { text: 'Modoboa', link: '/installation/modoboa' }, + { text: 'WebServer', link: '/installation/webserver' }, + { text: 'Dovecot', link: '/installation/dovecot' }, + { text: 'Postfix', link: '/installation/postfix' }, + { text: 'OpenDKIM', link: '/installation/opendkim' }, + { text: 'Radicale', link: '/installation/radicale' }, + { text: 'Amavis', link: '/installation/amavis' }, + ] + }, + { + text: 'Automatic', + items: [ + { text: 'Modoboa Installer', link: '/installation/installer' }, + ] + }], + "/contributing/": [ + { text: 'Getting Start', link: '/contributing/getting_start'}, + { text: 'Write Plugin', link: '/contributing/plugin_api'}, + { text: 'Translate', link: '/contributing/translate'}, + ] + } , + socialLinks: [ + { icon: 'github', link: 'https://github.com/modoboa/modoboa' }, + { icon: 'discord', link: 'https://discord.gg/WuQ3v3PXGR'}, + { icon: 'twitter', link: 'https://modoboa.org/'}, + { icon: { + svg: ` + Transifex + + ` + }, link: 'https://app.transifex.com/tonio/modoboa/dashboard/' }, + { icon: 'linkedin', link: 'https://www.linkedin.com/company/102575109'}, + ], + footer: { + message: 'Build with Vitepress', + copyright: `Copyright © 2010-${new Date().getUTCFullYear()} Antoine Nguyen` + }, + outline: { + label: "Summmary" + }, + docFooter: { + prev: false, + next: false + }, + search: { + provider: 'local', + }, + lastUpdated: { + text: 'Update at', + formatOptions: { + dateStyle: 'full', + timeStyle: 'short' + } + } + }, + sitemap: { + hostname: 'https://modoboa.readthedocs.io/en/latest' + }, + markdown: { + lineNumbers: true, + image: { + lazyLoading: true + } + }, + cleanUrls: true, + outDir: './dist', + lastUpdated: true, +})