Skip to content

Commit 5ee109a

Browse files
authored
doc: fix version picker duplication (#1173)
* doc: fix version picker duplication * pin cargo deny 0.18.4 uses a version of rust greater than we currently use, causing errors.
1 parent 1f526bb commit 5ee109a

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.github/workflows/publish-rust-library.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ env:
77
RUST_BACKTRACE: short
88
RUSTFLAGS: "-D warnings -W unreachable-pub -W bare-trait-objects"
99
RUSTUP_MAX_RETRIES: 10
10+
# update RUST_CHANNEL and CARGO_DENY in sync
11+
# version 0.18.4 of cargo-deny requires rustc 1.88.0 breaks our current version on 1.87
1012
RUST_CHANNEL: '1.87.0'
13+
CARGO_DENY_VERSION: '0.18.3'
1114

1215
on:
1316
workflow_dispatch:
@@ -48,7 +51,7 @@ jobs:
4851
key: ${{ env.RUST_CHANNEL }}
4952

5053
- name: Install cargo-deny
51-
run: cargo install --locked cargo-deny
54+
run: cargo install --locked cargo-deny --version ${{ env.CARGO_DENY_VERSION }}
5255

5356
- name: Check
5457
if: github.event_name == 'push'

.github/workflows/rust-ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ env:
2525
RUST_BACKTRACE: short
2626
RUSTFLAGS: "-D warnings -W unreachable-pub -W bare-trait-objects"
2727
RUSTUP_MAX_RETRIES: 10
28+
# update RUST_CHANNEL and CARGO_DENY in sync
29+
# version 0.18.4 of cargo-deny requires rustc 1.88.0 breaks our current version on 1.87
2830
RUST_CHANNEL: '1.87.0'
31+
CARGO_DENY_VERSION: '0.18.3'
2932

3033
jobs:
3134
rust-ci:
@@ -115,7 +118,7 @@ jobs:
115118

116119
- name: Install cargo-deny
117120
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm'
118-
run: cargo install --locked cargo-deny
121+
run: cargo install --locked cargo-deny --version ${{ env.CARGO_DENY_VERSION }}
119122

120123
# Basic checks that run for all pull requests (including external)
121124
- name: Check formatting

docs/docs/scripts/readthedocs.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,11 @@ ${ config.versions.active.map(
2020
</ul>
2121
</div>`;
2222

23-
document.querySelector(".md-header__topic").insertAdjacentHTML("beforeend", versioning);
24-
});
23+
// Check if we already added versions and remove them if so
24+
// from https://github.com/readthedocs/readthedocs.org/pull/12142
25+
const currentVersions = document.querySelector(".md-version");
26+
if (currentVersions !== null) {
27+
currentVersions.remove();
28+
}
29+
document.querySelector(".md-header__topic").insertAdjacentHTML("beforeend", versioning);
30+
});

docs/mkdocs.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ theme:
4646
name: Switch to light mode
4747

4848
features:
49-
# instant causes duplicated version dropdown
50-
# see: https://github.com/readthedocs/readthedocs.org/issues/12032
51-
# - navigation.instant
52-
# - navigation.instant.prefetch
53-
# - navigation.instant.progress
49+
- navigation.instant
50+
- navigation.instant.prefetch
51+
- navigation.instant.progress
5452
- navigation.tracking
5553
- navigation.indexes
5654
- navigation.footer

0 commit comments

Comments
 (0)