Skip to content

Commit b7116b4

Browse files
committed
Fix dropdown
1 parent 8c72640 commit b7116b4

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/_docs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
run: |
1717
export REPOSITORY_NAME=${GITHUB_REPOSITORY#*/} # just the repo, as opposed to org/repo
1818
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_ENV
19+
echo "DOCS_VERSION=${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}" >> $GITHUB_ENV
1920
2021
- name: Checkout the code
2122
uses: actions/checkout@v5
@@ -42,9 +43,6 @@ jobs:
4243
name: ${{ env.REPOSITORY_NAME }}-docs
4344
path: docs/build/html/
4445

45-
- name: Sanitize ref name for docs version
46-
run: echo "DOCS_VERSION=${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}" >> $GITHUB_ENV
47-
4846
- name: Move to versioned directory
4947
run: mv docs/build/html .github/pages/$DOCS_VERSION
5048

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
html_theme_options = {
148148
"switcher": {
149149
"json_url": "https://bluesky.github.io/blop/switcher.json",
150-
"version_match": version,
150+
"version_match": os.environ.get("DOCS_VERSION", "main"),
151151
},
152152
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
153153
}

0 commit comments

Comments
 (0)