From 1572c068e9961b7fa923b55bd162a74b43b10d4d Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 6 Jan 2026 10:43:50 +0100 Subject: [PATCH] WIP --- src/helpers/stackableOperatorBranch.js | 9 +++++++++ src/partials/main.hbs | 1 + 2 files changed, 10 insertions(+) create mode 100644 src/helpers/stackableOperatorBranch.js diff --git a/src/helpers/stackableOperatorBranch.js b/src/helpers/stackableOperatorBranch.js new file mode 100644 index 0000000..085dd42 --- /dev/null +++ b/src/helpers/stackableOperatorBranch.js @@ -0,0 +1,9 @@ +// This is so we can map `nightly` (from the release dropdown) to the `main` +// branch, and `YY.M` -> `release-YY.M`. +// We did consider using the `page-origin-branch` attribute, but that appears to +// point to the branch where the page lives, which is not always what we want. + +module.exports = (pageInfo) => { + console.log(pageInfo) + return pageInfo.version === 'nightly' ? 'main' : `release-${pageInfo.version}` +} diff --git a/src/partials/main.hbs b/src/partials/main.hbs index d3e2411..8acafdd 100644 --- a/src/partials/main.hbs +++ b/src/partials/main.hbs @@ -1,4 +1,5 @@
+{{stackableOperatorBranch}} {{> toolbar}}
{{#if (eq page.layout '404')}}