diff --git a/websitev2/docusaurus.config.js b/websitev2/docusaurus.config.js index 430b6d0c05..c5f36f3240 100644 --- a/websitev2/docusaurus.config.js +++ b/websitev2/docusaurus.config.js @@ -1,109 +1,121 @@ /** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = { - title: "Unleash", - tagline: "The enterprise ready feature toggle service", - url: "https://docs.getunleash.io", - baseUrl: "/", - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", - favicon: "img/favicon.ico", - organizationName: "Unleash", // Usually your GitHub org/user name. - projectName: "unleash.github.io", // Usually your repo name. + title: 'Unleash', + tagline: 'The enterprise ready feature toggle service', + url: 'https://docs.getunleash.io', + baseUrl: '/', + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'warn', + favicon: 'img/favicon.ico', + organizationName: 'Unleash', // Usually your GitHub org/user name. + projectName: 'unleash.github.io', // Usually your repo name. + trailingSlash: false, themeConfig: { defaultMode: 'light', disableSwitch: true, respectPrefersColorScheme: false, algolia: { - apiKey: '9772249a7262b377ac876853d32bd760', - indexName: 'getunleash', + apiKey: '9772249a7262b377ac876853d32bd760', + indexName: 'getunleash', }, navbar: { - title: "Unleash", + title: 'Unleash', logo: { - alt: "Unleash logo", - src: "img/logo.svg" + alt: 'Unleash logo', + src: 'img/logo.svg', }, items: [ - { to: "/", label: "Documentation", activeBaseRegex: '(user_guide|sdks|addons|advanced)', }, - { to: "deploy/getting_started", label: "Deploy and manage" }, - { to: "integrations/integrations", label: "Integrations" }, - { to: "/api", label: "API" }, - { href: "https://www.getunleash.io/plans", label: "Unleash Enterprise", position: 'right' }, + { + to: '/', + label: 'Documentation', + activeBaseRegex: '(user_guide|sdks|addons|advanced)', + }, + { to: 'deploy/getting_started', label: 'Deploy and manage' }, + { to: 'integrations/integrations', label: 'Integrations' }, + { to: '/api', label: 'API' }, + { + href: 'https://www.getunleash.io/plans', + label: 'Unleash Enterprise', + position: 'right', + }, { href: 'https://github.com/Unleash/unleash', position: 'right', className: 'header-github-link', 'aria-label': 'GitHub repository', }, - ] + ], }, prism: { additionalLanguages: ['java', 'swift', 'ruby', 'csharp', 'kotlin'], - }, + }, footer: { - style: "dark", + style: 'dark', links: [ { - title: "Product", + title: 'Product', items: [ { - label: "Docs", - to: "/" + label: 'Docs', + to: '/', }, { - label: "Open-Source", - href: "https://github.com/Unleash/unleash" + label: 'Open-Source', + href: 'https://github.com/Unleash/unleash', }, { - label: "Roadmap", - href: "https://github.com/orgs/Unleash/projects/5" - } - ] + label: 'Roadmap', + href: 'https://github.com/orgs/Unleash/projects/5', + }, + ], }, { - title: "Community", + title: 'Community', items: [ { - label: "Stack Overflow", - href: "https://stackoverflow.com/questions/tagged/unleash" + label: 'Stack Overflow', + href: + 'https://stackoverflow.com/questions/tagged/unleash', }, { - label: "Slack", - href: "https://join.slack.com/t/unleash-community/shared_invite/zt-8b6l1uut-LL67kLpIXm9bcN3~6RVaRQ" + label: 'Slack', + href: + 'https://join.slack.com/t/unleash-community/shared_invite/zt-8b6l1uut-LL67kLpIXm9bcN3~6RVaRQ', }, { - label: "Twitter", - href: "https://twitter.com/getunleash" - } - ] - } + label: 'Twitter', + href: 'https://twitter.com/getunleash', + }, + ], + }, ], copyright: `Copyright © ${new Date().getFullYear()} Unleash. Built with Docusaurus.`, logo: { src: 'img/logo.svg', - alt: 'Unleash logo' - } + alt: 'Unleash logo', + }, }, gtag: { - trackingID: "UA-134882379-1" + trackingID: 'UA-134882379-1', }, - image: 'img/logo.png' + image: 'img/logo.png', }, presets: [ [ - "@docusaurus/preset-classic", + '@docusaurus/preset-classic', { docs: { - sidebarPath: require.resolve("./sidebars.js"), + sidebarPath: require.resolve('./sidebars.js'), // Please change this to your repo. - editUrl: "https://github.com/Unleash/unleash/edit/master/websitev2/", - routeBasePath: "/" + editUrl: + 'https://github.com/Unleash/unleash/edit/master/websitev2/', + routeBasePath: '/', }, theme: { - customCss: require.resolve("./src/css/custom.css") - } - } - ] + customCss: require.resolve('./src/css/custom.css'), + }, + }, + ], ], plugins: [ [ @@ -113,27 +125,34 @@ module.exports = { redirects: [ { to: '/sdks', +<<<<<<< HEAD from: ['/user_guide/client-sdk', '/client-sdk', '/user_guide/connect_sdk'] +======= + from: ['/user_guide/client-sdk', '/client-sdk'], +>>>>>>> 014f5003 (fix: remove trailing slashes) }, { to: '/user_guide/api-token', - from: '/deploy/user_guide/api-token' + from: '/deploy/user_guide/api-token', }, { to: '/sdks/unleash-proxy', - from: '/user_guide/native_apps/' + from: '/user_guide/native_apps/', }, { to: '/advanced/toggle_variants', - from: '/toggle_variants' - } + from: '/toggle_variants', + }, ], - createRedirects: function (toPath) { - if (toPath.indexOf("/docs/") === -1 && toPath.indexOf("index.html") === -1) { - return `/docs/${toPath}` + createRedirects: function(toPath) { + if ( + toPath.indexOf('/docs/') === -1 && + toPath.indexOf('index.html') === -1 + ) { + return `/docs/${toPath}`; } - } - } - ] - ] + }, + }, + ], + ], };