Skip to content
Snippets Groups Projects
docusaurus.config.js 5.65 KiB
/** @type {import('@docusaurus/types').DocusaurusConfig} */
const gitBranch = process.env.GIT_BRANCH || 'main'

const baseUrl = process.env.DOCUSAURUS_BASE_URL || '/'

module.exports = {
  title: 'FIT-Connect',
  url: 'https://docs.fitko.de',
  baseUrl,
  onBrokenLinks: 'throw',
  onBrokenMarkdownLinks: 'throw',
  favicon: 'favicon.png',
  i18n: {
    defaultLocale: 'de',
    locales: ['de'],
  },
  themeConfig: {
    announcementBar: {
      id: 'under-construction',
      content:
        '🚧 Die Dokumentation ist aktuell noch in stetigem Wandel. Kontaktmöglichkeiten für Fragen, Probleme und Feedback haben wir <a href="https://docs.fitko.de/fit-connect/contact">auf der Kontakt-Seite</a> zusammengestellt.',
      backgroundColor: '#FFC819',
      textColor: '#000000',
      isCloseable: true,
    },
    colorMode: {
      disableSwitch: true,
    },
    docs: {
      sidebar: {
        hideable: true,
      },
    },
    prism: {
      additionalLanguages: ['java', 'csharp'],
    },
    navbar: {
      /* title: 'FIT-Connect', */
      logo: {
          alt: 'FIT-Connect-Logo',
          src: '/images/FIT-Connect-logo.svg',
          srcDark: '/images/FIT-Connect-logo.svg',
          /* href: 'https://www.fitko.de/projektmanagement/fit-connect', */
          /* href: 'https://docs.fitko.de/fit-connect/docs/', */
          href: '/',
          target: '_self',
          width: 250,
          height: 30,        
        },
      items: [
        {
          type: 'html',
          value: `<a href="/"><img src="${baseUrl}icons/chevron-left.svg" alt="Zurück" /></a>`,
          position: 'left',
          className: 'fitko-navbar-icon--back',
        },
        {
          type: 'html',
          value: `<a href="/"><img src="${baseUrl}icons/chevron-left.svg" alt="Zurück" /></a>`,
          position: 'left',
          className: 'fitko-navbar-icon--back',
        },
        {to: '/docs/startseite', label: 'Startseite', position: 'left'},         {
          type: 'dropdown',
          label: 'API',
          items: [
            {
              type: 'doc',
              label: 'Submission-API',
              docId: 'apis/submission-api'
            },
            {
              type: 'doc',
              label: 'Routing-API',
              docId: 'apis/routing-api'
            },
            {
              type: 'doc',
              label: 'Self-Service API',
              docId: 'apis/self-service-api'
            }
          ]
        },
        {
          type: 'dropdown',
          label: 'Schemata',
          items: [
            {
              type: 'doc',
              label: 'Metadatenschema',
              docId: 'metadata/overview',
            },
            {
              type: 'doc',
              label: 'Security Event Token',
              docId: 'set-schema/overview'
            }
          ]
        },
        {to: '/faq', label: 'FAQ'},  
        {
          type: 'dropdown',
          label: 'Kontakt',
          items: [
            {
              type: 'doc',
              label: 'Support / Anregungen',
              docId: 'contact/contact'
            },
            {
              type: 'doc',
              label: 'Newsletter',
              docId: 'contact/newsletter'
            }
          ]
        },
        /*
        {
          type: 'dropdown',
          label: 'Tools',
          items: [
            {
              type: 'doc',
              label: '🚧 JWK Generator',
              docId: 'tools/jwk-gen'
            }
          ]
        },
        */
        {to: '/termine', label: 'Termine'},   
        {
          type: 'dropdown',
          position: 'right',
          label: 'Self-Service-Portal',
          items: [
            /*
            {
              label: 'Produktion',
              href: 'https://portal.auth-prod.fit-connect.fitko.net/'
            },
            {
              label: 'Referenz-Umgebung',
              href: 'https://portal.auth-refz.fit-connect.fitko.net/'
            },
             */
            {
              label: 'Testumgebung',
              href: 'https://portal.auth-testing.fit-connect.fitko.dev/'
            },
          ],
        }
      ],
    },
    footer: {
      style: 'light',
      logo: {
        alt: 'FIT-Connect-Logo',
        src: '/images/FIT-Connect-logo.svg',
        href: 'https://www.fitko.de/projektmanagement/fit-connect',
        width: 250,
        height: 30,        
      },
      copyright: `Copyright © ${new Date().getFullYear()} FITKO (Föderale IT-Kooperation) | Zum Gottschalkhof 3 | 60594 Frankfurt am Main | E-Mail: poststelle@fitko.de | https://www.fitko.de | Die FITKO ist eine Anstalt des öffentlichen Rechts. Sie wird vertreten durch die Präsidentin Frau Dr. Annette Schmidt.`,
    },
  },
  presets: [
    [
      '@docusaurus/preset-classic',
      {
        theme: {
          customCss: require.resolve('./src/css/style.scss'),
        },
        docs: {
          sidebarPath: require.resolve('./sidebar.js'),
          editUrl: ({ version, versionDocsDirPath, docPath }) =>
            `https://git.fitko.de/-/ide/project/fit-connect/docs/edit/${gitBranch}/-/${versionDocsDirPath}/${docPath}`,
          routeBasePath: 'docs',
          breadcrumbs: false,
        },
      },
    ],
  ],
  plugins: [
    [
      require.resolve("@cmfcmf/docusaurus-search-local"),
      {
        indexBlog: false,
      }
    ],
    'docusaurus-plugin-sass',
    'docusaurus-tailwindcss',
    '@docusaurus/plugin-client-redirects',
    require.resolve('./plugins/webpack'),
    [
      'docusaurus-node-polyfills',
      {
        excludeAliases: [
          'console',
        ],
      },
    ],
  ],
  scripts: [ {
      src: `${baseUrl}js/custom.js`,
      async: false,
    },
  ],
}