/ docs / docusaurus.config.ts
docusaurus.config.ts
  1  import { readFileSync } from "fs";
  2  import { join } from "path";
  3  import { themes as prismThemes } from "prism-react-renderer";
  4  import type { Config } from "@docusaurus/types";
  5  import type * as Preset from "@docusaurus/preset-classic";
  6  
  7  // This runs in Node.js - Don't use client-side code here
  8  // https://docusaurus.io/docs/configuration
  9  
 10  const versionContent = readFileSync(join(__dirname, '..','cli','__init__.py'), 'utf-8');
 11  const version = versionContent.match(/__version__ = "([^"]+)"/)[1];
 12  
 13  const config: Config = {
 14    title: "Solace Agent Mesh",
 15    favicon: "/img/logo.png",
 16    url: "https://solacelabs.github.io",
 17    baseUrl: "/solace-agent-mesh",
 18    organizationName: "SolaceLabs",
 19    projectName: "solace-agent-mesh", 
 20  
 21    onBrokenLinks: "throw",
 22    onBrokenMarkdownLinks: "throw",
 23  
 24    i18n: {
 25      defaultLocale: "en",
 26      locales: ["en"],
 27    },
 28  
 29    presets: [
 30      [
 31        "classic",
 32        {
 33          docs: {
 34            sidebarPath: "./sidebars.ts",
 35            editUrl: "https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs",
 36          },
 37        } satisfies Preset.Options,
 38      ],
 39    ],
 40  
 41    themeConfig: {
 42      image: "img/logo.png",
 43      colorMode: {
 44        defaultMode: 'dark',
 45        disableSwitch: false,
 46        respectPrefersColorScheme: true,
 47      },
 48  
 49      navbar: {
 50        title: "Solace Agent Mesh",
 51        logo: {
 52          alt: "Solace Agent Mesh Logo",
 53          src: "img/logo.png",
 54          href: "/docs/documentation/getting-started",
 55        },
 56        items: [
 57          {
 58            type: "docSidebar",
 59            sidebarId: "docSidebar",
 60            position: "left",
 61          },
 62          {
 63            href: "https://github.com/SolaceLabs/solace-agent-mesh/",
 64            label: "GitHub",
 65            position: "right",
 66          },
 67        ],
 68      },
 69      docs: {
 70        sidebar: {
 71          hideable: false,
 72          autoCollapseCategories: false,
 73        },
 74      },
 75      footer: {
 76        style: "dark",
 77        links: [
 78          {
 79            title: "Solace Agent Mesh",
 80            items: [
 81              {
 82                label: "Documentation",
 83                to: "/docs/documentation/getting-started",
 84              },
 85              {
 86                label: "GitHub",
 87                href: "https://github.com/SolaceLabs/solace-agent-mesh/",
 88              },
 89              {
 90                label: "Official Plugins",
 91                href: "https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/",
 92              }
 93            ],
 94          },
 95          {
 96            title: "Company",
 97            items: [
 98              {
 99                label: "Products",
100                href: "https://solace.com/products/",
101              },
102              {
103                label: "Contact",
104                href: "https://solace.com/contact/",
105              },
106              {
107                label: "Support",
108                href: "https://solace.com/support/",
109              },
110              {
111                label: "Privacy and Legal",
112                href: "https://solace.com/legal/",
113              },
114            ],
115          },
116          {
117            title: "Community",
118            items: [
119              {
120                label: "LinkedIn",
121                href: "https://www.linkedin.com/company/solacedotcom/",
122              },
123              {
124                label: "GitHub",
125                href: "https://github.com/SolaceLabs",
126              },
127              {
128                label: "YouTube",
129                href: "https://www.youtube.com/SolaceSystems",
130              },
131              {
132                label: "X",
133                href: "https://twitter.com/solacedotcom",
134              },
135            ],
136          },
137        ],
138        copyright: `Solace Agent Mesh. Copyright © ${new Date().getFullYear()} Solace. Version: ${version}`,
139        logo: {
140          alt: 'Solace Logo',
141          src: 'img/solace-logo.png',
142          width: "10%",
143          height: "10%",
144        },
145      },
146      prism: {
147        theme: prismThemes.github,
148        darkTheme: prismThemes.dracula,
149      },
150    } satisfies Preset.ThemeConfig,
151  
152    markdown: {
153      mermaid: true
154    },
155    themes: ['@docusaurus/theme-mermaid'],
156  
157    plugins: [require.resolve('docusaurus-lunr-search')],
158  };
159  
160  export default config;