// @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: "IGNITE® CLI Docs", tagline: "IGNITE® CLI Docs", url: "https://docs.ignite.com", baseUrl: "/", onBrokenLinks: "warn", onBrokenMarkdownLinks: "warn", favicon: "img/favicon-svg.svg", trailingSlash: false, // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: "ignite", projectName: "ignite docs", // Even if you don't use internalization, you can use this field to set useful // metadata like html lang. For example, if your site is Chinese, you may want // to replace "en" with "zh-Hans". i18n: { defaultLocale: "en", locales: ["en"], }, headTags: [ { tagName: "script", attributes: { type: "text/javascript", }, innerHTML: ` var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src='https://cdn.matomo.cloud/aibignite.matomo.cloud/container_py6JfPnv.js'; s.parentNode.insertBefore(g,s); })(); `, }, { tagName: "script", attributes: { type: "text/javascript", }, innerHTML: ` var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src='https://cdn.matomo.cloud/aibignite.matomo.cloud/container_215cMJxo.js'; s.parentNode.insertBefore(g,s); })(); `, }, ], presets: [ [ "@docusaurus/preset-classic", /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { versions: { current: { label: "nightly", path: "nightly", badge: true, banner: "unreleased", // put 'none' to remove }, }, sidebarPath: require.resolve("./sidebars.js"), routeBasePath: "/", }, theme: { customCss: require.resolve("./src/css/custom.css"), }, }), ], ], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ image: "img/og-image.jpg", announcementBar: { content: '← Back to IGNITE®', isCloseable: false, }, docs: { sidebar: { autoCollapseCategories: true, }, }, navbar: { hideOnScroll: true, logo: { alt: "IGNITE® Logo", src: "img/header-logo-docs.svg", srcDark: "img/header-logo-docs-dark.svg", }, items: [ { href: "https://github.com/ignite/cli", html: ` `, position: "right", }, { href: "https://ignite.com", className: "ignt-backlink", label: `Back to IGNITE®`, position: "right", }, { type: "docsVersionDropdown", position: "left", dropdownActiveClassDisabled: true, }, ], }, footer: { links: [ { items: [ { html: ` `, }, ], }, { title: "Products", items: [ { label: "IGNITE® CLI", href: "https://ignite.com/cli", }, { label: "IGNITE® Apps", href: "https://ignite.com/marketplace", }, ], }, { title: "Company", items: [ { label: "About IGNITE®", href: "https://ignite.com/about", }, { label: "Careers", href: "https://ignite.com/careers", }, { label: "Blog", href: "https://ignite.com/blog", }, ], }, { title: "Contact", items: [ { label: "Business Inquiries", href: "mailto:business@ignite.com", }, ], }, { title: "Social", items: [ { label: "Discord", href: "https://discord.com/invite/ignitecli", }, { label: "Twitter", href: "https://x.com/ignite", }, { label: "Linkedin", href: "https://www.linkedin.com/company/allinbits", }, { label: "YouTube", href: "https://www.youtube.com/ignitehq", }, ], }, ], copyright: `
© IGNITE® ${new Date().getFullYear()}
Privacy PolicyTerms of Use
`, }, prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, additionalLanguages: ["protobuf", "go-module"], // https://prismjs.com/#supported-languages magicComments: [ // Remember to extend the default highlight class name as well! { className: "theme-code-block-highlighted-line", line: "highlight-next-line", block: { start: "highlight-start", end: "highlight-end" }, }, { className: "code-block-removed-line", line: "remove-next-line", block: { start: "remove-start", end: "remove-end" }, }, ], }, zoom: { selector: ".markdown :not(em) > img", config: { // options you can specify via https://github.com/francoischalifour/medium-zoom#usage background: { light: "rgb(255, 255, 255)", dark: "rgb(50, 50, 50)", }, }, }, algolia: { appId: "VVETP7QCVE", apiKey: "167213b8ce51cc7ff9a804df130657e5", indexName: "ignite-cli", contextualSearch: true, schedule: "every 1 day at 3:00 pm", }, }), plugins: [ [ "@docusaurus/plugin-client-redirects", { createRedirects(existingPath) { if (existingPath.includes("/welcome")) { /* If the link received contains the path /guide, this will change to /welcome. */ return [existingPath.replace("/welcome", "/guide")]; } // The following is done for backwards compatibility // with the previous path structure of the versioned docs. if (existingPath.includes("/v28")) { return [existingPath.replace("/v28", "/v28.0.0")]; } if (existingPath.includes("/v0.27")) { return [existingPath.replace("/v0.27", "/v0.27.2")]; } if (existingPath.includes("/v0.26")) { return [existingPath.replace("/v0.26", "/v0.26.1")]; } if (existingPath.includes("/v0.25")) { return [existingPath.replace("/v0.25", "/v0.25.2")]; } return; // No redirect created if it doesn't contain /guide }, }, ], async function myPlugin(context, options) { return { name: "docusaurus-tailwindcss", configurePostCss(postcssOptions) { postcssOptions.plugins.push(require("postcss-import")); postcssOptions.plugins.push(require("tailwindcss/nesting")); postcssOptions.plugins.push(require("tailwindcss")); postcssOptions.plugins.push(require("autoprefixer")); return postcssOptions; }, }; }, require.resolve("docusaurus-plugin-image-zoom"), ], }; module.exports = config;