Skip to content

Commit eb26571

Browse files
committed
feat(antora-ui): BOOSTLOOK_BRANCH option
1 parent c418afe commit eb26571

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/publish.yml

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ jobs:
7878
shell: bash
7979
run: |
8080
set -x
81+
BOOSTLOOK_BRANCH="${{ (startsWith(github.ref, 'refs/heads/develop') && 'develop') || 'master' }}"
82+
export BOOSTLOOK_BRANCH
8183
./build.sh
8284
8385
- name: Setup Ninja

antora-ui/README.adoc

+13-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ When the command completes successfully, the UI bundle will be available at `bui
122122

123123
This project uses the Boost color scheme and typography available from `https://github.com/cppalliance/boostlook`.
124124

125-
In the build step, the `boostlook` stylesheet is included in the bundle and used in the UI. When working on the Antora content, the `boostlook` stylesheet is updated every hour to ensure the latest version is used.
125+
In the build step, the `boostlook` stylesheet is included in the bundle and used in the UI.
126+
When working on the Antora content, the `boostlook` stylesheet is updated every hour to ensure the latest version is used.
126127

127128
If you're working on the `boostlook.css` file and don't want the build step to include the latest version, you can use the `--skip-boostlook` to ensure the task does not attempt to fetch the latest version.
128129

@@ -138,3 +139,14 @@ or in preview mode:
138139
gulp preview --skip-boostlook
139140
----
140141

142+
By default, the `boostlook` stylesheet is downloaded from the `master` branch of the `cppalliance/boostlook` repository.
143+
The `BOOSTLOOK_BRANCH` environment variable can be set to use a different branch.
144+
145+
[source,bash]
146+
----
147+
BOOSTLOOK_BRANCH=develop
148+
export BOOSTLOOK_BRANCH
149+
gulp bundle
150+
----
151+
152+
In CI, the `develop` branch is used to ensure the latest version is included in the bundle unless the current branch is `master`.

antora-ui/gulp.d/tasks/build.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ async function fetchBoostlookCss () {
240240
const skipBoostlook = process.argv.includes('--skip-boostlook')
241241
const cssDir = ospath.join(__dirname, '..', '..', 'src', 'css')
242242
const cssFilePath = ospath.join(cssDir, 'boostlook.css')
243-
const url = 'https://raw.githubusercontent.com/boostorg/boostlook/master/boostlook.css'
243+
const boostlookBranch = process.env.BOOSTLOOK_BRANCH || 'master'
244+
const url = `https://raw.githubusercontent.com/cppalliance/boostlook/${boostlookBranch}/boostlook.css`
244245

245246
if (skipBoostlook) {
246247
log('Skipping boostlook.css download due to --skip-boostlook flag.')

0 commit comments

Comments
 (0)