Skip to content

Commit 0eaa47f

Browse files
author
Documenter.jl
committed
build based on f6ac3c8
1 parent cf0067c commit 0eaa47f

9 files changed

Lines changed: 98 additions & 36 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-13T21:47:19","documenter_version":"1.16.1"}}
1+
{"documenter":{"documenter_version":"1.17.0","generation_timestamp":"2026-04-20T14:43:16","julia_version":"1.12.6"}}

dev/assets/documenter.js

Lines changed: 28 additions & 22 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
}

dev/devnotes/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
user &lt;--- |state.buffer1| &lt;--- &lt;stream.codec&gt; &lt;--- |state.buffer2| &lt;--- stream
44

55
When writing data (`state.mode == :write`):
6-
user ---&gt; |state.buffer1| ---&gt; &lt;stream.codec&gt; ---&gt; |state.buffer2| ---&gt; stream</code></pre><p>In the read mode, a user pull out data from <code>state.buffer1</code> and pre-transcoded data are filled in <code>state.buffer2</code>. In the write mode, a user will push data into <code>state.buffer1</code> and transcoded data are filled in <code>state.buffer2</code>. The default buffer size is 16KiB for each.</p><p><code>State</code> (defined in src/state.jl) has five fields:</p><ul><li><code>mode</code>: current stream mode (<code>&lt;:Symbol</code>)</li><li><code>code</code>: return code of the last codec&#39;s method call (<code>&lt;:Symbol</code>)</li><li><code>error</code>: exception returned by the codec (<code>&lt;:Error</code>)</li><li><code>buffer1</code>: data buffer that is closer to the user (<code>&lt;:Buffer</code>)</li><li><code>buffer2</code>: data buffer that is farther to the user (<code>&lt;:Buffer</code>)</li><li><code>bytes_written_out</code>: number of bytes written to the underlying stream (<code>&lt;:Int64</code>)</li></ul><p>The <code>mode</code> field may be one of the following value:</p><ul><li><code>:idle</code> : initial and intermediate mode, no buffered data</li><li><code>:read</code> : being ready to read data, data may be buffered</li><li><code>:write</code>: being ready to write data, data may be buffered</li><li><code>:stop</code> : transcoding is stopped after read, data may be buffered</li><li><code>:close</code>: closed, no buffered data</li><li><code>:panic</code>: an exception has been thrown in codec, data may be buffered but we cannot do anything</li></ul><p>Note that <code>mode=:stop</code> does not mean there is no data available in the stream. This is because transcoded data may be left in the buffer.</p><p>The initial mode is <code>:idle</code> and mode transition happens as shown in the following diagram: <img src="../assets/modes.svg" alt="Mode transition"/></p><p>Modes surrounded by a bold circle are a state in which the transcoding stream has released resources by calling <code>finalize(codec)</code>. The mode transition should happen in the <code>changemode!(stream, newmode)</code> function in src/stream.jl. Trying an undefined transition will thrown an exception.</p><p>A transition happens according to internal or external events of the transcoding stream. The status code and the error object returned by codec methods are internal events, and user&#39;s method calls are external events. For example, calling <code>read(stream)</code> will change the mode from <code>:init</code> to <code>:read</code> and then calling <code>close(stream)</code> will change the mode from <code>:read</code> to <code>:close</code>. When data processing fails in the codec, a codec will return <code>:error</code> and the stream will result in <code>:panic</code>.</p><h2 id="Shared-buffers"><a class="docs-heading-anchor" href="#Shared-buffers">Shared buffers</a><a id="Shared-buffers-1"></a><a class="docs-heading-anchor-permalink" href="#Shared-buffers" title="Permalink"></a></h2><p>Adjacent transcoding streams may share their buffers. This will reduce memory allocation and eliminate data copy between buffers.</p><p>If <code>buffer2</code> is shared it is considered to be owned by the underlying stream by the <code>stats</code> and <code>position</code> functions.</p><p><code>readdata!(input::IO, output::Buffer)</code> and <code>flush_buffer2(stream::TranscodingStream)</code> do the actual work of read/write data from/to the underlying stream. These methods have a special pass for shared buffers.</p><h2 id="Noop-codec"><a class="docs-heading-anchor" href="#Noop-codec"><code>Noop</code> codec</a><a id="Noop-codec-1"></a><a class="docs-heading-anchor-permalink" href="#Noop-codec" title="Permalink"></a></h2><p><code>Noop</code> (<code>NoopStream</code>) is a codec that does <em>nothing</em>. It works as a buffering layer on top of the underlying stream. Since <code>NoopStream</code> does not need to have two distinct buffers, <code>buffer1</code> and <code>buffer2</code> in the <code>State</code> object are shared and some specialized methods are defined for the type. All of these are defined in src/noop.jl.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../migrating/">« Migration</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.16.1 on <span class="colophon-date" title="Friday 13 February 2026 21:47">Friday 13 February 2026</span>. Using Julia version 1.12.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
6+
user ---&gt; |state.buffer1| ---&gt; &lt;stream.codec&gt; ---&gt; |state.buffer2| ---&gt; stream</code></pre><p>In the read mode, a user pull out data from <code>state.buffer1</code> and pre-transcoded data are filled in <code>state.buffer2</code>. In the write mode, a user will push data into <code>state.buffer1</code> and transcoded data are filled in <code>state.buffer2</code>. The default buffer size is 16KiB for each.</p><p><code>State</code> (defined in src/state.jl) has five fields:</p><ul><li><code>mode</code>: current stream mode (<code>&lt;:Symbol</code>)</li><li><code>code</code>: return code of the last codec&#39;s method call (<code>&lt;:Symbol</code>)</li><li><code>error</code>: exception returned by the codec (<code>&lt;:Error</code>)</li><li><code>buffer1</code>: data buffer that is closer to the user (<code>&lt;:Buffer</code>)</li><li><code>buffer2</code>: data buffer that is farther to the user (<code>&lt;:Buffer</code>)</li><li><code>bytes_written_out</code>: number of bytes written to the underlying stream (<code>&lt;:Int64</code>)</li></ul><p>The <code>mode</code> field may be one of the following value:</p><ul><li><code>:idle</code> : initial and intermediate mode, no buffered data</li><li><code>:read</code> : being ready to read data, data may be buffered</li><li><code>:write</code>: being ready to write data, data may be buffered</li><li><code>:stop</code> : transcoding is stopped after read, data may be buffered</li><li><code>:close</code>: closed, no buffered data</li><li><code>:panic</code>: an exception has been thrown in codec, data may be buffered but we cannot do anything</li></ul><p>Note that <code>mode=:stop</code> does not mean there is no data available in the stream. This is because transcoded data may be left in the buffer.</p><p>The initial mode is <code>:idle</code> and mode transition happens as shown in the following diagram: <img src="../assets/modes.svg" alt="Mode transition"/></p><p>Modes surrounded by a bold circle are a state in which the transcoding stream has released resources by calling <code>finalize(codec)</code>. The mode transition should happen in the <code>changemode!(stream, newmode)</code> function in src/stream.jl. Trying an undefined transition will thrown an exception.</p><p>A transition happens according to internal or external events of the transcoding stream. The status code and the error object returned by codec methods are internal events, and user&#39;s method calls are external events. For example, calling <code>read(stream)</code> will change the mode from <code>:init</code> to <code>:read</code> and then calling <code>close(stream)</code> will change the mode from <code>:read</code> to <code>:close</code>. When data processing fails in the codec, a codec will return <code>:error</code> and the stream will result in <code>:panic</code>.</p><h2 id="Shared-buffers"><a class="docs-heading-anchor" href="#Shared-buffers">Shared buffers</a><a id="Shared-buffers-1"></a><a class="docs-heading-anchor-permalink" href="#Shared-buffers" title="Permalink"></a></h2><p>Adjacent transcoding streams may share their buffers. This will reduce memory allocation and eliminate data copy between buffers.</p><p>If <code>buffer2</code> is shared it is considered to be owned by the underlying stream by the <code>stats</code> and <code>position</code> functions.</p><p><code>readdata!(input::IO, output::Buffer)</code> and <code>flush_buffer2(stream::TranscodingStream)</code> do the actual work of read/write data from/to the underlying stream. These methods have a special pass for shared buffers.</p><h2 id="Noop-codec"><a class="docs-heading-anchor" href="#Noop-codec"><code>Noop</code> codec</a><a id="Noop-codec-1"></a><a class="docs-heading-anchor-permalink" href="#Noop-codec" title="Permalink"></a></h2><p><code>Noop</code> (<code>NoopStream</code>) is a codec that does <em>nothing</em>. It works as a buffering layer on top of the underlying stream. Since <code>NoopStream</code> does not need to have two distinct buffers, <code>buffer1</code> and <code>buffer2</code> in the <code>State</code> object are shared and some specialized methods are defined for the type. All of these are defined in src/noop.jl.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../migrating/">« Migration</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Monday 20 April 2026 14:43">Monday 20 April 2026</span>. Using Julia version 1.12.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)