Skip to content

Commit a471a56

Browse files
author
Documenter.jl
committed
build based on 9750141
1 parent 15e8afe commit a471a56

8 files changed

Lines changed: 97 additions & 35 deletions

File tree

dev/.documenter-siteinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.12.5","generation_timestamp":"2026-02-12T01:11:17","documenter_version":"1.16.1"}}
1+
{"documenter":{"julia_version":"1.12.5","generation_timestamp":"2026-02-27T14:55:21","documenter_version":"1.17.0"}}

dev/AbstractVectorOfArrayInterface/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dev/array_types/index.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

dev/assets/Manifest.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ version = "0.9.5"
145145

146146
[[deps.Documenter]]
147147
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"]
148-
git-tree-sha1 = "b37458ae37d8bdb643d763451585cd8d0e5b4a9e"
148+
git-tree-sha1 = "56e9c37b5e7c3b4f080ab1da18d72d5c290e184a"
149149
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
150-
version = "1.16.1"
150+
version = "1.17.0"
151151

152152
[[deps.Downloads]]
153153
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
@@ -298,9 +298,9 @@ version = "1.11.0"
298298

299299
[[deps.MarkdownAST]]
300300
deps = ["AbstractTrees", "Markdown"]
301-
git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899"
301+
git-tree-sha1 = "93c718d892e73931841089cdc0e982d6dd9cc87b"
302302
uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391"
303-
version = "0.1.2"
303+
version = "0.1.3"
304304

305305
[[deps.MozillaCACerts_jll]]
306306
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
@@ -354,9 +354,9 @@ version = "1.3.3"
354354

355355
[[deps.Preferences]]
356356
deps = ["TOML"]
357-
git-tree-sha1 = "522f093a29b31a93e34eaea17ba055d850edea28"
357+
git-tree-sha1 = "8b770b60760d4451834fe79dd483e318eee709c4"
358358
uuid = "21216c6a-2e73-6563-6e65-726566657250"
359-
version = "1.5.1"
359+
version = "1.5.2"
360360

361361
[[deps.Printf]]
362362
deps = ["Unicode"]
@@ -450,9 +450,9 @@ version = "1.4.4"
450450

451451
[[deps.StructUtils]]
452452
deps = ["Dates", "UUIDs"]
453-
git-tree-sha1 = "9297459be9e338e546f5c4bedb59b3b5674da7f1"
453+
git-tree-sha1 = "28145feabf717c5d65c1d5e09747ee7b1ff3ed13"
454454
uuid = "ec057cc2-7a8d-4b58-b3b3-92acb9f63b42"
455-
version = "2.6.2"
455+
version = "2.6.3"
456456

457457
[deps.StructUtils.extensions]
458458
StructUtilsMeasurementsExt = ["Measurements"]

dev/assets/documenter.js

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/assets/warner.js

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,40 @@ function maybeAddWarning() {
3737
closer.addEventListener("click", function () {
3838
document.body.removeChild(div);
3939
});
40-
const href = window.documenterBaseURL + "/../" + window.DOCUMENTER_STABLE;
40+
var target_href =
41+
window.documenterBaseURL + "/../" + window.DOCUMENTER_STABLE;
42+
43+
// try to stay on the same page when linking to the stable version
44+
// get the current page path relative to the version root
45+
var current_page = window.location.pathname;
46+
47+
// resolve the documenterBaseURL to an absolute path
48+
// documenterBaseURL is a relative path (usually "."), so we need to resolve it
49+
var base_url_absolute = new URL(documenterBaseURL, window.location.href)
50+
.pathname;
51+
if (!base_url_absolute.endsWith("/")) {
52+
base_url_absolute = base_url_absolute + "/";
53+
}
54+
55+
// extract the page path after the version directory
56+
// e.g., if we're on /stable/man/guide.html, we want "man/guide.html"
57+
var page_path = "";
58+
if (current_page.startsWith(base_url_absolute)) {
59+
page_path = current_page.substring(base_url_absolute.length);
60+
}
61+
62+
// construct the target URL with the same page path
63+
var target_url = target_href;
64+
if (page_path && page_path !== "" && page_path !== "index.html") {
65+
// ensure target_href ends with a slash before appending page path
66+
if (!target_url.endsWith("/")) {
67+
target_url = target_url + "/";
68+
}
69+
target_url = target_url + page_path;
70+
}
71+
72+
// preserve the anchor (hash) from the current page
73+
var current_hash = window.location.hash;
4174

4275
// Determine if this is a development version or an older release
4376
let warningMessage = "";
@@ -51,12 +84,35 @@ function maybeAddWarning() {
5184
"This documentation is for an <strong>older version</strong> that may be missing recent changes.<br>";
5285
}
5386

54-
warningMessage +=
55-
'<a href="' +
56-
href +
57-
'">Click here to go to the documentation for the latest stable release.</a>';
87+
// Create the link element with same-page navigation
88+
const link = document.createElement("a");
89+
link.href = target_url + current_hash;
90+
link.textContent =
91+
"Click here to go to the documentation for the latest stable release.";
92+
93+
// If we're trying to stay on the same page, verify it exists first
94+
if (page_path && page_path !== "" && page_path !== "index.html") {
95+
link.addEventListener("click", function (e) {
96+
e.preventDefault();
97+
// check if the target page exists, fallback to homepage if it doesn't
98+
fetch(target_url, { method: "HEAD" })
99+
.then(function (response) {
100+
if (response.ok) {
101+
window.location.href = target_url + current_hash;
102+
} else {
103+
// page doesn't exist in the target version, go to homepage
104+
window.location.href = target_href;
105+
}
106+
})
107+
.catch(function (error) {
108+
// network error or other failure - use homepage
109+
window.location.href = target_href;
110+
});
111+
});
112+
}
58113

59114
div.innerHTML = warningMessage;
115+
div.appendChild(link);
60116
div.appendChild(closer);
61117
document.body.appendChild(div);
62118
}

0 commit comments

Comments
 (0)