website/docusaurus.config.js

152 lines
3.8 KiB
JavaScript

// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'EcoDash',
tagline: 'Let your users see how much your server consumes at a glance.',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://ecodash.xyz',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/card.jpg',
navbar: {
title: 'EcoDash',
logo: {
alt: 'EcoDash Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
position: 'left',
label: 'Docs',
docId: "index",
},
{
type: 'doc',
position: 'left',
label: 'Support',
docId: "support",
},
{
href: 'https://git.massivebox.net/ecodash/ecodash',
label: 'Source code',
position: 'left',
},
{
href: '/contribute',
label: 'Contribute',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Introduction',
to: '/docs',
},
{
label: 'Install',
to: '/docs/install',
},
],
},
{
title: 'Community',
items: [
{
label: 'Matrix',
href: 'https://matrix.to/#/#ecodash-support:massivebox.net',
},
{
label: 'Telegram',
href: 'https://t.me/ecodash_support',
},
{
label: 'Forgejo issues',
href: 'https://git.massivebox.net/ecodash/ecodash/issues',
},
],
},
{
title: 'Source code',
items: [
{
label: 'Website',
href: 'https://git.massivebox.net/ecodash/website'
},
{
label: 'EcoDash',
href: 'https://git.massivebox.net/ecodash/ecodash',
}
]
},
{
title: 'More',
items: [
{
label: 'Privacy Policy',
href: '/privacy',
},
{
label: 'Contribute',
href: '/contribute',
}
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} <a href="https://massivebox.net">MassiveBox</a>.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;