|
| 1 | +// @ts-check |
| 2 | +import { themes as prismThemes } from "prism-react-renderer"; |
| 3 | +import remarkMath from "remark-math"; |
| 4 | +import rehypeKatex from "rehype-katex"; |
| 5 | + |
| 6 | +/** @type {import('@docusaurus/types').Config} */ |
| 7 | +const config = { |
| 8 | + title: "FEAScript Documentation", |
| 9 | + tagline: "Finite element simulation library built in JavaScript", |
| 10 | + favicon: "img/favicon.ico", |
| 11 | + |
| 12 | + url: "https://doc.feascript.com", |
| 13 | + baseUrl: "/", |
| 14 | + |
| 15 | + organizationName: "FEAScript", |
| 16 | + projectName: "FEAScript-documentation", |
| 17 | + trailingSlash: false, |
| 18 | + |
| 19 | + onBrokenLinks: "throw", |
| 20 | + markdown: { |
| 21 | + hooks: { |
| 22 | + onBrokenMarkdownLinks: "throw", |
| 23 | + }, |
| 24 | + }, |
| 25 | + |
| 26 | + i18n: { |
| 27 | + defaultLocale: "en", |
| 28 | + locales: ["en"], |
| 29 | + }, |
| 30 | + |
| 31 | + presets: [ |
| 32 | + [ |
| 33 | + "classic", |
| 34 | + /** @type {import('@docusaurus/preset-classic').Options} */ |
| 35 | + ({ |
| 36 | + docs: { |
| 37 | + routeBasePath: "/", |
| 38 | + sidebarPath: "./sidebars.js", |
| 39 | + editUrl: "https://github.com/FEAScript/FEAScript-documentation/tree/main/", |
| 40 | + remarkPlugins: [remarkMath], |
| 41 | + rehypePlugins: [rehypeKatex], |
| 42 | + // "current" holds the unreleased docs; released versions are snapshots (see README) |
| 43 | + lastVersion: "current", |
| 44 | + versions: { |
| 45 | + current: { label: "Next (0.3.0-RC)" }, |
| 46 | + }, |
| 47 | + }, |
| 48 | + blog: false, |
| 49 | + theme: { |
| 50 | + customCss: "./src/css/custom.css", |
| 51 | + }, |
| 52 | + }), |
| 53 | + ], |
| 54 | + ], |
| 55 | + |
| 56 | + stylesheets: [ |
| 57 | + { |
| 58 | + href: "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css", |
| 59 | + type: "text/css", |
| 60 | + crossorigin: "anonymous", |
| 61 | + }, |
| 62 | + ], |
| 63 | + |
| 64 | + themes: [ |
| 65 | + [ |
| 66 | + "@easyops-cn/docusaurus-search-local", |
| 67 | + /** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */ |
| 68 | + ({ |
| 69 | + hashed: true, |
| 70 | + indexBlog: false, |
| 71 | + docsRouteBasePath: "/", |
| 72 | + }), |
| 73 | + ], |
| 74 | + ], |
| 75 | + |
| 76 | + themeConfig: |
| 77 | + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ |
| 78 | + ({ |
| 79 | + navbar: { |
| 80 | + title: "FEAScript", |
| 81 | + logo: { alt: "FEAScript Logo", src: "img/logo.svg" }, |
| 82 | + items: [ |
| 83 | + { |
| 84 | + type: "docSidebar", |
| 85 | + sidebarId: "docsSidebar", |
| 86 | + position: "left", |
| 87 | + label: "Docs", |
| 88 | + }, |
| 89 | + { type: "docsVersionDropdown", position: "right" }, |
| 90 | + { href: "https://feascript.com", label: "Website", position: "right" }, |
| 91 | + { |
| 92 | + href: "https://github.com/FEAScript/FEAScript-core", |
| 93 | + label: "GitHub", |
| 94 | + position: "right", |
| 95 | + }, |
| 96 | + ], |
| 97 | + }, |
| 98 | + footer: { |
| 99 | + style: "dark", |
| 100 | + links: [ |
| 101 | + { |
| 102 | + title: "FEAScript", |
| 103 | + items: [ |
| 104 | + { label: "Website", href: "https://feascript.com" }, |
| 105 | + { label: "Studio", href: "https://studio.feascript.com" }, |
| 106 | + { label: "Blog", href: "https://blog.feascript.com" }, |
| 107 | + ], |
| 108 | + }, |
| 109 | + { |
| 110 | + title: "Community", |
| 111 | + items: [ |
| 112 | + { label: "GitHub", href: "https://github.com/FEAScript" }, |
| 113 | + { label: "Contributing", href: "https://github.com/FEAScript/FEAScript-core/blob/main/CONTRIBUTING.md" }, |
| 114 | + ], |
| 115 | + }, |
| 116 | + ], |
| 117 | + copyright: `Documentation licensed under CC-BY 4.0. The FEAScript core library is MIT licensed.`, |
| 118 | + }, |
| 119 | + prism: { |
| 120 | + theme: prismThemes.github, |
| 121 | + darkTheme: prismThemes.dracula, |
| 122 | + additionalLanguages: ["bash"], |
| 123 | + }, |
| 124 | + }), |
| 125 | +}; |
| 126 | + |
| 127 | +export default config; |
0 commit comments