Skip to content
Snippets Groups Projects
Select Git revision
  • af53db32913f1a3cad4df50c49d7dabc77d12ee1
  • main default protected
  • instances/2025_05
  • instances/2024_11
4 results

docusaurus.config.ts

Blame
  • docusaurus.config.ts 5.84 KiB
    import {themes as prismThemes} from 'prism-react-renderer';
    import type {Config} from '@docusaurus/types';
    import type * as Preset from '@docusaurus/preset-classic';
    
    const branchName = process.env.CI_COMMIT_REF_NAME || 'main'; // Default to 'main' if undefined
    const branchSuffix = branchName.match(/^instances\/(.*)$/)?.[1] || 'main';
    const url = branchName === 'main' ? '/intro2sc-handson' :`/intro2sc-handson/${branchSuffix}/`; // Adjust as needed
    
    const config: Config = {
      title: 'Introduction to Supercomputing at JSC',
      tagline: 'Hands-On',
      favicon: 'img/logo.ico',
    
      // Set the production url of your site here
      url: 'https://your-docusaurus-site.example.com',
      // Set the /<baseUrl>/ pathname under which your site is served
      // For GitHub pages deployment, it is often '/<projectName>/'
      baseUrl: url,
    
      // GitHub pages deployment config.
      // If you aren't using GitHub pages, you don't need these.
      //organizationName: 'facebook', // Usually your GitHub org/user name.
      //projectName: 'docusaurus', // Usually your repo name.
    
      onBrokenLinks: 'throw',
      onBrokenMarkdownLinks: 'warn',
    
      //plugins
      plugins: [require.resolve('docusaurus-lunr-search')],
    
      // 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'],
      },
    
      presets: [
        [
          'classic',
          {
            docs: {
              sidebarPath: './sidebars.ts',
              // Please change this to your repo.
              // Remove this to remove the "edit this page" links.
              //editUrl:
              //  'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
            },
        /*    blog: {
              showReadingTime: true,
              // Please change this to your repo.
              // Remove this to remove the "edit this page" links.
              editUrl:
                'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
            },*/
            theme: {
              customCss: './src/css/custom.css',
            },
          } satisfies Preset.Options,
        ],
      ],
    
      themes: [
        // ... Your other themes.
      ],
    
      themeConfig: {
        colorMode: {
          defaultMode: 'light',
          disableSwitch: true,
     //     respectPrefersColorScheme: false,
        },
    
        // Replace with your project's social card
        //image: 'img/docusaurus.png',
        navbar: {
          title: 'Home',
    /*      logo: {
            alt: 'My Site Logo',
            src: 'img/logo.svg',
          },*/
          items: [
            {
              type: 'docSidebar',
              sidebarId: 'tutorialSidebar',
              position: 'left',
              label: 'Hands-On',
            },
            {to: '/blog', label: 'Blog', position: 'left'},
          ],
        },
        footer: {
          style: 'dark',
          links: [
       /*     {
              title: 'Docs',
              items: [
                {
                  label: 'Tutorial',
                  to: '/docs/intro',
                },
              ],
            },*/
            {
              title: 'Quiz',
              items: [
                {
                  label: 'Day 1',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/114',
                },
                {
                  label: 'Day 2',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/110',
                },
                {
                  label: 'Day 3',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/109',
                },
              ],
            },
            {
              title: 'Surveys',
              items: [
                {
                  label: 'Day 1 Talks',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/115',
                },
                {
                  label: 'Day 2 Talks',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/108',
                },
                {
                  label: 'Day 3 Talks',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/111',
                },
                {
                  label: 'Day 4 Talks',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/112',
                },
                {
                  label: 'Event in total',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/surveys/113',
                },
              ],
            },
            {
              title: 'Communication',
              items: [
                {
                  label: 'Zoom',
                  href: 'https://fz-juelich-de.zoom.us/j/64190088739?pwd=bS0O4mnE4TP8FV3TUr3foxYmN7TIDm.1',
                },
                {
                  label: 'Slack',
                  href: 'https://join.slack.com/t/introtoscnov2024/shared_invite/zt-2ttce2cf7-coGYeoy0dFQRpl8_0Wa0ow',
                },
              ],
            },
            {
              title: 'Useful Links',
              items: [
                {
                  label: 'Hands-On',
                  to: '/docs/intro',
                },
                {
                  label: 'Agenda',
                  href: 'https://indico3-jsc.fz-juelich.de/event/201/timetable/#all',
                },
                {
                  label: 'Reservations',
                  href: '/reservations',
                },
                {
                  label: 'Attendance list',
                  href: 'https://gitlab.jsc.fz-juelich.de/hedgedoc/bPd5FSZwQt6e68Fh5NEE4g',
                },
                {
                  label: 'Past course materials',
                  href: 'https://www.fz-juelich.de/en/ias/jsc/news/events/training-courses/2024/supercomputing-1',
                },
              ],
            },
            {
              title: 'More',
              items: [
                {
                  label: 'Authors',
                  href: '/authors',
                },
              ],
            },
          ],
          copyright: `Copyright © ${new Date().getFullYear()} Forschungszentrum Jülich`,
        },
        prism: {
          theme: prismThemes.github,
          darkTheme: prismThemes.dracula,
        },
      } satisfies Preset.ThemeConfig,
    };
    
    export default config;