Skip to content

Commit 7584094

Browse files
committed
doc: detect the theme CSS paths used in docs.rs
E.g., <https://docs.rs/ayu-20220314-1.61.0-nightly-285fa7ecd.css> Fixes the theme detection and adaption on docs.rs.
1 parent e76da48 commit 7584094

File tree

11 files changed

+26
-1
lines changed

11 files changed

+26
-1
lines changed

src/r3/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Fixed
1111

1212
- Upgrade `svgbobdoc` to `^0.3.0` to fix build failures in documentation build
13+
- Improve rustdoc theme detection on docs.rs
1314

1415
## [0.2.0] - 2022-03-15
1516

src/r3/src/common.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function initThemeMonitor() {
152152
document.body.classList.add(currentClassName);
153153
}
154154

155-
var match = themeStyle.href.match(/([a-z]+)\.css$/);
155+
var match = themeStyle.href.match(/\/([a-z]+)(-[-a-zA-Z0-9.]*)?\.css$/);
156156
var currentStyle = (match && match[1]) || "light";
157157
onApplyTheme(currentStyle);
158158

src/r3_core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Fixed
1111

1212
- Upgrade `svgbobdoc` to `^0.3.0` to fix build failures in documentation build
13+
- Improve rustdoc theme detection on docs.rs
1314

1415
## 0.1.0 - 2022-03-15
1516

src/r3_kernel/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Fixed
1111

1212
- Upgrade `svgbobdoc` to `^0.3.0` to fix build failures in documentation build
13+
- Improve rustdoc theme detection on docs.rs
1314

1415
## 0.1.0 - 2022-03-15
1516

src/r3_port_arm/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Improve rustdoc theme detection on docs.rs
13+
1014
## [0.2.0] - 2022-03-15
1115

1216
### Changed

src/r3_port_arm_m/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Improve rustdoc theme detection on docs.rs
13+
1014
## [0.3.0] - 2022-03-15
1115

1216
### Changed

src/r3_port_riscv/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Fixed
1111

1212
- Upgrade `svgbobdoc` to `^0.3.0` to fix build failures in documentation build
13+
- Improve rustdoc theme detection on docs.rs
1314

1415
## [0.2.0] - 2022-03-15
1516

src/r3_port_std/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Improve rustdoc theme detection on docs.rs
13+
1014
## [0.2.0] - 2022-03-15
1115

1216
### Changed

src/r3_portkit/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### Fixed
1111

1212
- Upgrade `svgbobdoc` to `^0.3.0` to fix build failures in documentation build
13+
- Improve rustdoc theme detection on docs.rs
1314

1415
## [0.2.0] - 2022-03-15
1516

src/r3_support_rp2040/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Improve rustdoc theme detection on docs.rs
13+
1014
## [0.2.0] - 2022-03-15
1115

1216
### Changed

0 commit comments

Comments
 (0)