Skip to content
Snippets Groups Projects
Commit fd7c3ac0 authored by Ilya Zhukov's avatar Ilya Zhukov
Browse files

Update docusaurus.config.ts

parent dfda7208
Branches
Tags
No related merge requests found
Pipeline #222299 failed
......@@ -2,6 +2,10 @@ 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];
const url = branchName === 'main' ? '/intro2sc-handson' :`/intro2sc-handson/${branchSuffix}/`; // Adjust as needed
const config: Config = {
title: 'Introduction to Supercomputing at JSC',
tagline: 'Hands-On',
......@@ -11,7 +15,7 @@ const config: Config = {
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: '/intro2sc-handson/',
baseUrl: url,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment