github.com/kubeshop/testkube@v1.17.23/docs/docusaurus.config.js (about) 1 // @ts-check 2 // Note: type annotations allow type checking and IDEs autocompletion 3 4 const lightCodeTheme = require("./src/themes/prism-testkube-light"); 5 const darkCodeTheme = require("./src/themes/prism-testkube-dark"); 6 const redirects = require("./redirects"); 7 8 /** @type {import('@docusaurus/types').Config} */ 9 const config = { 10 title: "Testkube Documentation", 11 tagline: 12 "Your somewhat opinionated and friendly Kubernetes testing framework", 13 url: "https://docs.testkube.io", 14 baseUrl: "/", 15 onBrokenLinks: "throw", 16 onBrokenMarkdownLinks: "warn", 17 favicon: "img/logo.svg", 18 19 // GitHub pages deployment config. 20 // If you aren't using GitHub pages, you don't need these. 21 organizationName: "kubeshop", // Usually your GitHub org/user name. 22 projectName: "testkube", // Usually your repo name. 23 24 // Even if you don't use internalization, you can use this field to set useful 25 // metadata like html lang. For example, if your site is Chinese, you may want 26 // to replace "en" with "zh-Hans". 27 i18n: { 28 defaultLocale: "en", 29 locales: ["en"], 30 }, 31 scripts: [ 32 { 33 src: "https://app.usercentrics.eu/browser-ui/latest/loader.js", 34 id: "usercentrics-cmp", 35 "data-settings-id": "WQ2gSqnsK", 36 async: true, 37 }, 38 ], 39 presets: [ 40 [ 41 "classic", 42 /** @type {import('@docusaurus/preset-classic').Options} */ 43 { 44 docs: { 45 routeBasePath: "/", 46 sidebarPath: require.resolve("./sidebars.js"), 47 // Please change this to your repo. 48 // Remove this to remove the "edit this page" links. 49 editUrl: "https://github.com/kubeshop/testkube/tree/develop/docs", 50 }, 51 blog: false, 52 theme: { 53 customCss: require.resolve("./src/css/custom.css"), 54 }, 55 gtag: { 56 trackingID: "G-G7HWN1EDK5", 57 }, 58 googleTagManager: { 59 containerId: "GTM-PQK4DKN", 60 }, 61 }, 62 ], 63 [ 64 "redocusaurus", 65 { 66 // Plugin Options for loading OpenAPI files 67 specs: [ 68 { 69 spec: "https://raw.githubusercontent.com/kubeshop/testkube/main/api/v1/testkube.yaml", 70 route: "/openapi", 71 }, 72 ], 73 theme: { 74 primaryColor: "#818cf8", 75 }, 76 }, 77 ], 78 ], 79 80 themeConfig: 81 /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ 82 { 83 navbar: { 84 logo: { 85 alt: "Testkube", 86 src: "img/logo.large.bright.svg", 87 srcDark: "img/logo.large.svg", 88 href: "/", 89 }, 90 items: [ 91 { 92 type: "html", 93 position: "right", 94 value: `<iframe src="https://ghbtns.com/github-btn.html?user=kubeshop&repo=testkube&type=star&count=true&color=dark" style='margin-top: 6px' frameborder="0" scrolling="0" width="110" height="20" title="GitHub"></iframe>`, 95 }, 96 { 97 type: "search", 98 position: "left", 99 }, 100 ], 101 }, 102 103 announcementBar: { 104 id: "join-testkube-pro", 105 content: '<strong>New to Testkube?</strong> Unleash the power of cloud native testing in Kubernetes with Testkube. <a id="sign_cloud_docs" href="https://app.testkube.io/?utm_source=docs" target="_blank">Get Started ></a>', 106 backgroundColor: "#8951ff", 107 textColor: "#fff", 108 }, 109 110 footer: { 111 style: "dark", 112 links: [ 113 { 114 title: "Community", 115 items: [ 116 { 117 label: "Slack", 118 href: "https://testkubeworkspace.slack.com/join/shared_invite/zt-2arhz5vmu-U2r3WZ69iPya5Fw0hMhRDg#/shared-invite/email", 119 }, 120 { 121 label: "Twitter", 122 href: "https://twitter.com/Testkube_io", 123 }, 124 { 125 label: "GitHub", 126 href: "https://github.com/kubeshop/testkube", 127 }, 128 ], 129 }, 130 ], 131 copyright: `Copyright © ${new Date().getFullYear()} Kubeshop.`, 132 }, 133 prism: { 134 theme: lightCodeTheme, 135 darkTheme: darkCodeTheme, 136 }, 137 algolia: { 138 // The application ID provided by Algolia 139 appId: "QRREOKFLDE", 140 141 // Public API key: it is safe to commit it 142 apiKey: "97a76158bf582346aa0c2605cbc593f6", 143 indexName: "testkube", 144 145 // Optional: see doc section below 146 contextualSearch: false, 147 148 // Optional: path for search page that enabled by default (`false` to disable it) 149 searchPagePath: false, 150 151 //... other Algolia params 152 }, 153 colorMode: { 154 defaultMode: "dark", 155 disableSwitch: false, 156 respectPrefersColorScheme: true, 157 }, 158 }, 159 plugins: [ 160 [ 161 "@docusaurus/plugin-client-redirects", 162 { 163 redirects: redirects, 164 createRedirects(existingPath) { 165 if (existingPath.includes("/cli")) { 166 // Redirect from /cli-reference and /reference/cli (old links) to /cli 167 return [existingPath.replace('/cli', "/cli-reference"), existingPath.replace('/cli', "/reference/cli")]; 168 } 169 170 return undefined; // Return a falsy value: no redirect created 171 }, 172 }, 173 ], 174 ], 175 }; 176 177 module.exports = config;