// @ts-check // Note: type annotations allow type checking and IDEs autocompletion import { Highlight, themes } from "prism-react-renderer"; const lightCodeTheme = themes.github; const darkCodeTheme = themes.dracula; /** @type {import('@docusaurus/types').Config} */ const config = { title: "IBC-Go", tagline: "Documentation for IBC-Go", favicon: "img/white-cosmos-icon.svg", // Set the production url of your site here // for local production tests, set to http://localhost:3000/ url: "https://ibc.cosmos.network", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: "/", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: "cosmos", // Usually your GitHub org/user name. projectName: "ibc-go", // Usually your repo name. deploymentBranch: "gh-pages", trailingSlash: true, onBrokenLinks: "log", onBrokenMarkdownLinks: "log", // 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"], }, presets: [ [ "classic", /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { sidebarPath: require.resolve("./sidebars.js"), // Routed the docs to the root path routeBasePath: "/", // Exclude template markdown files from the docs exclude: ["**/*.template.md"], // Select the latest version lastVersion: "v10.1.x", // Assign banners to specific versions versions: { current: { path: "main", banner: "unreleased", }, "v10.1.x": { path: "v10", banner: "none", }, "v8.5.x": { path: "v8", banner: "none", }, "v7.8.x": { path: "v7", banner: "none", }, "v6.3.x": { path: "v6", banner: "none", }, "v5.4.x": { path: "v5", banner: "none", }, "v4.6.x": { path: "v4", banner: "none", }, }, }, theme: { customCss: require.resolve("./src/css/custom.css"), }, gtag: { trackingID: "G-HP8ZXWVLJG", anonymizeIP: true, }, sitemap: { changefreq: "weekly", priority: 0.5, filename: "sitemap.xml", }, }), ], ], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ image: "img/ibc-go-docs-social-card.png", navbar: { logo: { alt: "IBC Logo", src: "img/black-ibc-logo.svg", srcDark: "img/white-ibc-logo.svg", href: "/", }, items: [ { type: "docSidebar", sidebarId: "defaultSidebar", position: "left", label: "Documentation", }, { type: "doc", position: "left", docId: "README", docsPluginId: "adrs", label: "Architecture Decision Records", }, { type: "docsVersionDropdown", position: "right", dropdownActiveClassDisabled: true, }, { href: "https://github.com/cosmos/ibc-go", html: ` `, position: "right", }, ], }, footer: { links: [ { items: [ { html: `Cosmos Logo`, }, ], }, { title: "Documentation", items: [ { label: "Hermes Relayer", href: "https://hermes.informal.systems/", }, { label: "Cosmos Hub", href: "https://hub.cosmos.network", }, { label: "CometBFT", href: "https://docs.cometbft.com", }, ], }, { title: "Community", items: [ { label: "Discord", href: "https://discord.com/invite/interchain", }, { label: "Twitter", href: "https://twitter.com/interchain_io", }, { label: "YouTube", href: "https://www.youtube.com/@interchain_io", }, ], }, { title: "Other Tools", items: [ { label: "Go Relayer", href: "https://github.com/cosmos/relayer", }, { label: "ibc-rs", href: "https://github.com/cosmos/ibc-rs", }, { label: "interchaintest", href: "https://github.com/cosmos/interchaintest", }, { label: "CosmWasm", href: "https://cosmwasm.com/", }, ], }, { title: "More", items: [ { label: "GitHub", href: "https://github.com/cosmos/ibc-go", }, { label: "IBC Protocol Website", href: "https://www.ibcprotocol.dev/", }, { label: "Privacy Policy", href: "https://v1.cosmos.network/privacy", }, ], }, ], logo: { alt: "Large IBC Logo", src: "img/black-large-ibc-logo.svg", srcDark: "img/white-large-ibc-logo.svg", width: 275, }, copyright: `

The development of IBC-Go is led primarily by Interchain GmbH. Funding for this development comes primarily from the Interchain Foundation, a Swiss non-profit.

`, }, prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, additionalLanguages: ["protobuf", "go", "go-module", "yaml", "toml", "diff"], 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-minus-diff-line', line: 'minus-diff-line', block: { start: 'minus-diff-start', end: 'minus-diff-end' }, }, { className: 'code-block-plus-diff-line', line: 'plus-diff-line', block: { start: 'plus-diff-start', end: 'plus-diff-end' }, }, ], }, }), themes: ["docusaurus-theme-github-codeblock"], plugins: [ [ 'docusaurus-pushfeedback', { project: '3mpmaho4fa', buttonPosition: 'center-right', modalPosition: 'sidebar-right', buttonStyle: 'dark', } ], [ "@docusaurus/plugin-content-docs", { id: "adrs", path: "architecture", routeBasePath: "architecture", sidebarPath: require.resolve("./sidebars.js"), exclude: ["**/*.template.md"], }, ], [ "@docusaurus/plugin-content-docs", { id: "events", path: "events", routeBasePath: "events", sidebarPath: false, exclude: ["**/*.template.md"], }, ], [ "@docusaurus/plugin-content-docs", { id: "params", path: "params", routeBasePath: "params", sidebarPath: false, exclude: ["**/*.template.md"], }, ], [ "@docusaurus/plugin-client-redirects", { // makes the default page next in production redirects: [ { from: ["/master", "/next"], to: "/main/", }, { from: ["/", "/docs"], to: "/v10/", } ], }, ], [ "@gracefullight/docusaurus-plugin-microsoft-clarity", { projectId: "idk9udvhuu" }, ], [ require.resolve("@easyops-cn/docusaurus-search-local"), { indexBlog: false, docsRouteBasePath: ["/", "architecture"], highlightSearchTermsOnTargetPage: true, }, ], 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; }, }; }, ], scripts: [ { src: "https://widget.kapa.ai/kapa-widget.bundle.js", "data-website-id": "33cd677e-ea9e-437e-a3c1-dbacbe03afc1", "data-project-name": "Interchain", "data-user-analytics-fingerprint-enabled": "true", "data-project-color": "#1878FF", "data-modal-title": "IBC Docs AI", "data-modal-disclaimer": "This is a custom LLM for the Interchain Stack with access to developer documentation and resources across the core Cosmos components. Please note that answers are generated by an AI so please use your best judgement before implementing.", "data-modal-ask-ai-input-placeholder": "Ask me a question about IBC...", "data-modal-disclaimer-text-color": "#000000", "data-modal-disclaimer-font-size": "14px", "data-modal-image": "/img/black-ibc-logo-400x400.svg", "data-project-logo": "/img/spirograph-white.svg", async: true, }, ], }; module.exports = config;