diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-08-04 16:40:44 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-13 16:15:59 +0200 |
| commit | fdc3200ef4718eb98bd8a713f956222a9bf85ac9 (patch) | |
| tree | 4fa8e5998bd4ee59397b26222846c554b73abe4e /site/docusaurus.config.js | |
| parent | 8a94318aad4b4fa188ac49e887d564867a00111e (diff) | |
docs: Add initial version of Docusaurus based docs
This change updates the repository with a new Docusaurus-based
documentation website. This allows us to create our documentation using
Markdown, MDX and React. This will serve as the main entry point for
users visiting https://opendc.org. The actual OpenDC application will be
moved to https://app.opendc.org.
Diffstat (limited to 'site/docusaurus.config.js')
| -rw-r--r-- | site/docusaurus.config.js | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/site/docusaurus.config.js b/site/docusaurus.config.js new file mode 100644 index 00000000..2e72615f --- /dev/null +++ b/site/docusaurus.config.js @@ -0,0 +1,147 @@ +// @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: "OpenDC", + tagline: "Collaborative Datacenter Simulation and Exploration for Everybody", + url: "https://opendc.org", + baseUrl: "/", + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", + favicon: "img/favicon.ico", + organizationName: "atlarge-research", + projectName: "opendc", + + i18n: { + defaultLocale: "en", + locales: ["en"] + }, + + presets: [ + [ + "classic", + /** @type {import("@docusaurus/preset-classic").Options} */ + ({ + docs: { + sidebarPath: require.resolve("./sidebars.js"), + editUrl: "https://github.com/atlarge-research/opendc/tree/master/site/" + }, + theme: { + customCss: require.resolve("./src/css/custom.css") + } + }) + ] + ], + + plugins: [ + [ + "content-docs", + /** @type {import("@docusaurus/plugin-content-docs").Options} */ + ({ + id: "community", + path: "community", + routeBasePath: "community", + editUrl: "https://github.com/atlarge-research/opendc/tree/master/site/", + sidebarPath: require.resolve("./sidebars.js") + }) + ] + ], + + themeConfig: + /** @type {import("@docusaurus/preset-classic").ThemeConfig} */ + ({ + navbar: { + title: "OpenDC", + logo: { + alt: "OpenDC logo", + src: "img/logo.svg" + }, + items: [ + { + type: "doc", + docId: "intro", + position: "left", + label: "Learn" + }, + { + to: "/community/support", + label: "Community", + position: "left", + activeBaseRegex: `/community/` + }, + { + href: "https://app.opendc.org", + html: "Log In", + position: "right", + className: "header-app-link button button--outline button--primary", + "aria-label": "OpenDC web application", + }, + { + href: "https://github.com/atlarge-research/opendc", + position: "right", + className: "header-github-link", + "aria-label": "GitHub repository", + }, + ] + }, + footer: { + style: "dark", + links: [ + { + title: "Learn", + items: [ + { + label: "Getting Started", + to: "/docs/category/getting-started" + }, + { + label: "Tutorials", + to: "/docs/category/tutorials" + }, + { + label: "Advanced Guides", + to: "/docs/category/advanced-guides" + } + ] + }, + { + title: "Community", + items: [ + { + label: "Support", + to: "/community/support" + }, + { + label: "Team", + to: "/community/team" + }, + { + label: "GitHub Discussions", + href: "https://github.com/atlarge-research/opendc/discussions" + } + ] + }, + { + title: "More", + items: [ + { + label: "GitHub", + href: "https://github.com/atlarge-research/opendc" + } + ] + } + ], + copyright: `Copyright © ${new Date().getFullYear()} AtLarge Research. Built with Docusaurus.` + }, + prism: { + theme: lightCodeTheme, + darkTheme: darkCodeTheme + } + }) +}; + +module.exports = config; |
