|
| 1 | +import type * as Preset from "@docusaurus/preset-classic"; |
| 2 | +import type { Config } from "@docusaurus/types"; |
| 3 | + |
| 4 | +import { themes as prismThemes } from "prism-react-renderer"; |
| 5 | + |
| 6 | +const config: Config = { |
| 7 | + title: "<projectName> Documentation", |
| 8 | + favicon: "images/<your logo>.png", |
| 9 | + |
| 10 | + // Set the production url of your site here |
| 11 | + url: "https://sassoftware.github.io", |
| 12 | + // Set the /<baseUrl>/ pathname under which your site is served |
| 13 | + // For GitHub pages deployment, it is often '/<projectName>/' |
| 14 | + baseUrl: "/<projectName>/", |
| 15 | + |
| 16 | + // GitHub pages deployment config. |
| 17 | + // If you aren't using GitHub pages, you don't need these. |
| 18 | + organizationName: "sassoftware", // Usually your GitHub org/user name. |
| 19 | + projectName: "<projectName>", // Usually your repo name. |
| 20 | + |
| 21 | + onBrokenLinks: "throw", |
| 22 | + onBrokenMarkdownLinks: "throw", |
| 23 | + |
| 24 | + // Even if you don't use internationalization, you can use this field to set |
| 25 | + // useful metadata like html lang. For example, if your site is Chinese, you |
| 26 | + // may want to replace "en" with "zh-Hans". |
| 27 | + i18n: { |
| 28 | + defaultLocale: "en", |
| 29 | + locales: ["en"], |
| 30 | + }, |
| 31 | + |
| 32 | + presets: [ |
| 33 | + [ |
| 34 | + "classic", |
| 35 | + { |
| 36 | + docs: { |
| 37 | + routeBasePath: "/", |
| 38 | + // Remove this to remove the "edit this page" links. |
| 39 | + editUrl: |
| 40 | + "https://github.com/sassoftware/<projectName>/tree/main/website/", |
| 41 | + }, |
| 42 | + blog: false, |
| 43 | + theme: { |
| 44 | + customCss: ["./src/css/custom.css"], |
| 45 | + }, |
| 46 | + } satisfies Preset.Options, |
| 47 | + ], |
| 48 | + ], |
| 49 | + |
| 50 | + themeConfig: { |
| 51 | + docs: { |
| 52 | + sidebar: { |
| 53 | + hideable: true, |
| 54 | + }, |
| 55 | + }, |
| 56 | + navbar: { |
| 57 | + title: "<projectName> Documentation", |
| 58 | + logo: { |
| 59 | + alt: "SAS", |
| 60 | + src: "images/<your logo>.png", |
| 61 | + }, |
| 62 | + items: [ |
| 63 | + { |
| 64 | + href: "https://github.com/sassoftware/<projectName>", |
| 65 | + className: "header-github-link", |
| 66 | + title: "GitHub repository", |
| 67 | + position: "right", |
| 68 | + }, |
| 69 | + ], |
| 70 | + }, |
| 71 | + footer: { |
| 72 | + style: "dark", |
| 73 | + links: [ |
| 74 | + { |
| 75 | + title: "Support", |
| 76 | + items: [ |
| 77 | + { |
| 78 | + label: "GitHub Repository", |
| 79 | + href: "https://github.com/sassoftware/<projectName>", |
| 80 | + }, |
| 81 | + ], |
| 82 | + }, |
| 83 | + ], |
| 84 | + copyright: `Copyright © ${new Date().getFullYear()}, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. Built with Docusaurus.`, |
| 85 | + }, |
| 86 | + prism: { |
| 87 | + theme: prismThemes.github, |
| 88 | + darkTheme: prismThemes.dracula, |
| 89 | + // uncomment below to add language support |
| 90 | + // additionalLanguages: ["bash", "json"], |
| 91 | + }, |
| 92 | + } satisfies Preset.ThemeConfig, |
| 93 | + |
| 94 | + // uncomment below for mermaid support |
| 95 | + // markdown: { |
| 96 | + // mermaid: true, |
| 97 | + // }, |
| 98 | + |
| 99 | + themes: [ |
| 100 | + [ |
| 101 | + "@easyops-cn/docusaurus-search-local", |
| 102 | + { |
| 103 | + docsRouteBasePath: "/", |
| 104 | + explicitSearchResultPath: true, |
| 105 | + hashed: true, |
| 106 | + highlightSearchTermsOnTargetPage: true, |
| 107 | + }, |
| 108 | + ], |
| 109 | + // uncomment below for mermaid support |
| 110 | + // "@docusaurus/theme-mermaid", |
| 111 | + ], |
| 112 | +}; |
| 113 | + |
| 114 | +export default config; |
0 commit comments