Skip to content

Commit 3a8c080

Browse files
authored
Merge pull request #116 from ethdebug/environmental-baseurl
Allow overriding Docusaurus baseUrl
2 parents df0a8b7 + 23a3237 commit 3a8c080

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: yarn install --frozen-lockfile
2020

2121
- name: Build website
22-
run: yarn build
22+
run: BASE_URL='/format/' yarn build
2323
working-directory: ./packages/web
2424

2525
- name: Deploy to GitHub Pages

packages/web/docusaurus.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import type {Config} from '@docusaurus/types';
44
import type * as Preset from '@docusaurus/preset-classic';
55
import type { Configuration } from "webpack";
66

7+
const baseUrl = process.env["BASE_URL"] || "/";
8+
79
const config: Config = {
810
title: 'ethdebug format',
911
tagline: 'Debugging data format for smart contracts',
@@ -14,7 +16,7 @@ const config: Config = {
1416

1517
// Set the /<baseUrl>/ pathname under which your site is served
1618
// For GitHub pages deployment, it is often '/<projectName>/'
17-
baseUrl: '/format/',
19+
baseUrl,
1820

1921
// GitHub pages deployment config.
2022
// If you aren't using GitHub pages, you don't need these.

0 commit comments

Comments
 (0)