Skip to content
Snippets Groups Projects
docusaurus.config.ts 5.87 KiB
Newer Older
import type * as Preset from '@docusaurus/preset-classic'
import type { Config } from '@docusaurus/types'
import { themes as prismThemes } from 'prism-react-renderer'

const simplePlantUML = require('@akebifiky/remark-simple-plantuml')

const config: Config = {
  title: 'Self-Data Documentation',
  tagline:
    'This documentation covers the technical aspects of projects developed by the Grandlyon',
  favicon: 'img/favicon.ico',

  // Set the production url of your site here
  url: 'https://doc-self-data.apps.grandlyon.com/',
  // Set the /<baseUrl>/ pathname under which your site is served
  // For GitHub pages deployment, it is often '/<projectName>/'
  baseUrl: '/',

  // GitHub pages deployment config.
  // If you aren't using GitHub pages, you don't need these.
  organizationName: 'Métropole de Lyon', // Usually your GitHub org/user name.
  projectName: 'self-data-doc', // Usually your repo name.

  onBrokenLinks: 'throw',
  onBrokenMarkdownLinks: 'warn',

  // Even if you don't use internationalization, 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'],
  },
  plugins: [require.resolve('docusaurus-lunr-search')],
  presets: [
    [
      'classic',
      {
        docs: {
          sidebarPath: './sidebars.ts',
          // Please change this to your repo.
          // Remove this to remove the "edit this page" links.
          editUrl:
            'https://forge.grandlyon.com/web-et-numerique/factory/llle_project/self-data-technical-doc/-/blob/master/',
          showLastUpdateTime: true,
          remarkPlugins: [simplePlantUML],
        },
        theme: {
          customCss: './src/css/custom.css',
        },
      } satisfies Preset.Options,
    ],
  ],
  themeConfig: {
    // Replace with your project's social card
    image: 'img/docusaurus-social-card.jpg',
    navbar: {
      title: 'Self-Data Documentation',
      logo: {
        alt: 'Self-data logo',
        src: 'img/docshome.png',
      },
      items: [
        { to: '/', label: 'Intro' },
        // {
        //   type: 'docSidebar',
        //   // sidebarId: 'ecolyoSidebar',
        //   position: 'left',
        //   label: 'Ecolyo',
        // },
        { to: '/docs/ecolyo/', label: 'Ecolyo' },
        { to: '/docs/ecolyo-agent/', label: 'Ecolyo Agent' },
        { to: '/docs/konnectors/introduction', label: 'Konnectors' },
        { to: '/docs/getting-started/setup', label: 'Getting started' },
        {
          type: 'dropdown',
          label: 'Infra',
          items: [
            { to: '/docs/openshift', label: 'Openshift' },
            { to: '/docs/proxy/description', label: 'Proxy' },
          ],
        },
        {
          type: 'dropdown',
          label: 'Cozy',
          items: [
            { to: '/docs/cozystack', label: 'Cozystack' },
            { to: '/docs/easycozy/configuration', label: 'EasyCozy' },
          ],
        },

        // RIGHT LINKS
        {
          type: 'dropdown',
          label: 'Archive',
          position: 'right',
          items: [{ to: '/docs/pilote', label: 'Pilote' }],
        },
        {
          href: 'https://forge.grandlyon.com/web-et-numerique/factory/llle_project/self-data-technical-doc',
          label: 'Forge',
          position: 'right',
        },
      ],
    },
    footer: {
      style: 'dark',
      links: [
        {
          title: 'Links',
          items: [
            {
              label: '📁 Self-data repositories',
              href: 'https://forge.grandlyon.com/web-et-numerique/factory/llle_project',
            },
            {
              label: '⌨ Factory Board',
              href: 'https://forge.grandlyon.com/groups/web-et-numerique/factory/-/boards?milestone_title=Any',
            },
            {
              label: '🗂 Milestones',
              href: 'https://forge.grandlyon.com/groups/web-et-numerique/factory/-/milestones',
            },
            {
              label: '🛠️ Merge requests',
              href: 'https://forge.grandlyon.com/groups/web-et-numerique/factory/-/merge_requests?scope=all&state=opened&not[author_username]=Renovate-Bot&reviewer_id=None&draft=no',
            },
            {
              label: '📊 Indicateurs',
              href: 'https://factory.self-data.alpha.grandlyon.com/',
            },
            {
              label: 'Whimsical',
              href: 'https://whimsical.com/factory-J5YyG3BQk3AGF6j9rXMfLy',
            },
          ],
        },
        {
          title: 'Tools',
          items: [
            { label: 'Sentry', href: 'https://grandlyon.errors.cozycloud.cc/' },
            { label: 'Matomo', href: 'https://statweb.grandlyon.com/' },
            {
              label: 'SonarQube',
              href: 'https://sonarqube.forge.grandlyon.com/',
            },
            { label: 'Metabase', href: 'https://stats.cozycloud.cc/' },
          ],
        },
        {
          title: 'More',
          items: [
            {
              label: '🦖 Docusaurus guide',
              to: 'https://docusaurus.io/docs/category/guides',
            },
            {
              label: 'Contact us',
              href: 'mailto:snudev@grandlyon.com',
            },
            {
              label: 'Mattermost with cozy',
              href: 'https://mattermost.cozycloud.cc',
            },
            {
              label: 'Factory wikis',
              href: 'https://forge.grandlyon.com/web-et-numerique/factory/wiki_web_num/-/wikis/home',
            },
          ],
        },
      ],
      copyright: `Copyright © ${new Date().getFullYear()} Self-Data docs, Inc. Built with Docusaurus.`,
      logo: {
        src: '/img/docshome.png',
      },
    },
    prism: {
      theme: prismThemes.github,
      darkTheme: prismThemes.dracula,
    },
  } satisfies Preset.ThemeConfig,
}

export default config