Skip to content

docs: bump mdbook version#6556

Open
MegaRedHand wants to merge 3 commits intomainfrom
docs/bump-mdbook-version
Open

docs: bump mdbook version#6556
MegaRedHand wants to merge 3 commits intomainfrom
docs/bump-mdbook-version

Conversation

@MegaRedHand
Copy link
Copy Markdown
Collaborator

Motivation

mdbook recently released a new major version 0.5

Description

This PR bumps the mdbook version to the latest (0.5.2), fixes some warnings when running make docs, and also fixes a 404 error when loading the roadmap page.

One of the major changes from 0.5 is adding support for admonitions, so the mdbook-alerts plugin is no longer needed and was removed.

Copilot AI review requested due to automatic review settings May 1, 2026 01:35
@MegaRedHand MegaRedHand requested a review from a team as a code owner May 1, 2026 01:35
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🤖 Kimi Code Review

This PR updates the documentation toolchain to mdBook 0.5.2 and removes deprecated preprocessors. Overall, the changes are correct and well-structured.

Security & Stability

  • Line 3 in Makefile: Using mdbook-katex version 0.10.0-alpha is acceptable given mdBook 0.5.x breaking API changes, but consider pinning to a stable release once available or adding a comment explaining the necessity of the alpha version.

Correctness

  • Line 1 in docs/roadmap.md: The symlink docs/roadmap.md -> ROADMAP.md correctly resolves the path issue for mdBook while keeping the source file at the repository root. Verify that Windows CI runners (if any) handle symlinks properly, though this is typically only relevant for local Windows development.
  • Line 30 in book.toml: The redirect /ROADMAP.html/roadmap.html is good for preserving external links, assuming the previous mdBook version generated uppercase HTML filenames. If the previous version also generated lowercase, this redirect is harmless but redundant.

Documentation Formatting

  • Lines 208, 212, 216 in docs/developers/l1/dashboards.md: The bracket escaping (\[...\]) is correct to prevent mdbook-katex from interpreting these as LaTeX citations or MathJax delimiters.
  • Lines 210, 233 in docs/l2/stages.md: Dollar sign escaping (\$1.9B) is necessary to prevent KaTeX from entering math mode on currency values. This is a common issue when using mdbook-katex.

Configuration

  • Lines 10-15 (removed) in book.toml: Removing the mdbook-alerts preprocessor is correct because mdBook 0.5.2 natively supports GitHub-style alerts (> [!NOTE], > [!WARNING], etc.) without external preprocessors. Ensure no custom alert syntax was used that requires the old preprocessor.

Minor

  • Line 208 in Makefile: The mdbook-linkcheck2 upgrade from 0.9.1 to 0.12.0 is significant; verify in CI that no new broken links are reported due to stricter checking in newer versions.

Acknowledgment
The migration path is sensible: using a symlink for the roadmap preserves the root-level ROADMAP.md (conventional for GitHub rendering) while allowing mdBook to include it in the book structure. The escaping fixes prevent rendering regressions with the updated KaTeX version.


Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 1, 2026

Greptile Summary

This PR bumps mdbook from 0.4.51 to 0.5.2, removes the now-redundant mdbook-alerts plugin (admonitions are built into 0.5), updates plugin versions, escapes characters that triggered warnings, and adds a redirect + symlink to fix the roadmap 404.

  • The new symlink docs/roadmap.md has target ROADMAP.md, which resolves to docs/ROADMAP.md — a file that doesn't exist. The target should be ../ROADMAP.md to point to the repository-root ROADMAP.md, otherwise the roadmap page will still 404 at build time.

Confidence Score: 3/5

Not safe to merge as-is — the roadmap symlink is broken and the page it claims to fix will still 404.

One P1 finding: the symlink docs/roadmap.md -> ROADMAP.md resolves to docs/ROADMAP.md which doesn't exist, defeating the stated goal of fixing the roadmap 404. One P2 finding: mdbook-katex is pinned to an alpha pre-release.

docs/roadmap.md — broken symlink target

Important Files Changed

Filename Overview
docs/roadmap.md New symlink to ROADMAP.md — but target is ROADMAP.md (resolves to docs/ROADMAP.md), not ../ROADMAP.md; symlink is broken
Makefile Removes mdbook-alerts dep; bumps mdbook-katex to alpha pre-release (0.10.0-alpha), mdbook-linkcheck2 to 0.12.0, mdbook-mermaid to 0.17.0
.github/workflows/pr-main_mdbook.yml Bumps mdbook version from 0.4.51 to 0.5.2 in CI workflow
book.toml Removes mdbook-alerts preprocessor config; adds ROADMAP redirect
docs/SUMMARY.md Updates Roadmap link from ../ROADMAP.md to ./roadmap.md (new symlink)
docs/developers/l1/dashboards.md Escapes square brackets to suppress mdbook 0.5 incomplete-link warnings
docs/l2/stages.md Escapes dollar signs to prevent mdbook-katex from parsing $1.9B as math

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["docs/SUMMARY.md<br/>./roadmap.md"] --> B["docs/roadmap.md<br/>(symlink)"]
    B -->|"target: ROADMAP.md (relative)"| C["❌ docs/ROADMAP.md<br/>(does not exist)"]
    B -.->|"intended: ../ROADMAP.md"| D["✅ ROADMAP.md<br/>(repo root)"]
    E["book.toml redirect<br/>/ROADMAP.html → /roadmap.html"] --> F["Built roadmap page"]
    D --> F
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
docs/roadmap.md:1
**Broken symlink — roadmap page will still 404**

The symlink `docs/roadmap.md` has a relative target of `ROADMAP.md`. Since symlinks are resolved relative to the directory containing the symlink, the OS looks for `docs/ROADMAP.md`, which doesn't exist — only `ROADMAP.md` at the repository root does. The correct target should be `../ROADMAP.md` to traverse up one directory from `docs/`.

### Issue 2 of 2
Makefile:208
**Alpha pre-release dependency in CI**

`mdbook-katex` is pinned to `0.10.0-alpha`, a pre-release version, while the other dependencies use stable releases. Alpha versions can have undocumented breaking changes or be yanked from crates.io. Consider using the latest stable release of `mdbook-katex` instead.

Reviews (1): Last reviewed commit: "docs: fix roadmap 404 error" | Re-trigger Greptile

Comment thread docs/roadmap.md
@@ -0,0 +1 @@
ROADMAP.md No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Broken symlink — roadmap page will still 404

The symlink docs/roadmap.md has a relative target of ROADMAP.md. Since symlinks are resolved relative to the directory containing the symlink, the OS looks for docs/ROADMAP.md, which doesn't exist — only ROADMAP.md at the repository root does. The correct target should be ../ROADMAP.md to traverse up one directory from docs/.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/roadmap.md
Line: 1

Comment:
**Broken symlink — roadmap page will still 404**

The symlink `docs/roadmap.md` has a relative target of `ROADMAP.md`. Since symlinks are resolved relative to the directory containing the symlink, the OS looks for `docs/ROADMAP.md`, which doesn't exist — only `ROADMAP.md` at the repository root does. The correct target should be `../ROADMAP.md` to traverse up one directory from `docs/`.

How can I resolve this? If you propose a fix, please make it concise.

Comment thread Makefile
cargo install --version 0.9.1 mdbook-linkcheck2
cargo install --version 0.8.0 mdbook-alerts
cargo install --version 0.15.0 mdbook-mermaid
cargo install --version 0.10.0-alpha mdbook-katex
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Alpha pre-release dependency in CI

mdbook-katex is pinned to 0.10.0-alpha, a pre-release version, while the other dependencies use stable releases. Alpha versions can have undocumented breaking changes or be yanked from crates.io. Consider using the latest stable release of mdbook-katex instead.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Makefile
Line: 208

Comment:
**Alpha pre-release dependency in CI**

`mdbook-katex` is pinned to `0.10.0-alpha`, a pre-release version, while the other dependencies use stable releases. Alpha versions can have undocumented breaking changes or be yanked from crates.io. Consider using the latest stable release of `mdbook-katex` instead.

How can I resolve this? If you propose a fix, please make it concise.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🤖 Claude Code Review

Now I have everything I need. Here is the full review:


PR Review: docs: bump mdbook version (#6556)

Overview

This PR upgrades mdBook from 0.4.51 to 0.5.2, removes the now-redundant mdbook-alerts plugin (admonitions are native in 0.5), updates related plugin versions, and attempts to fix a 404 error on the roadmap page. The diff is entirely documentation tooling — no Rust code is touched.


Potential Bug: Broken Symlink Target

File: docs/roadmap.md (new symlink)

The new symlink is created as:

docs/roadmap.md -> ROADMAP.md

Because this is a relative symlink, the OS resolves it relative to the symlink's containing directory (docs/), yielding docs/ROADMAP.md. That file does not exist — the actual roadmap lives at the repo root as ROADMAP.md.

Verification: book.toml sets src = "docs", and there is no docs/ROADMAP.md in the repository. The old SUMMARY.md entry used ../ROADMAP.md precisely to escape the docs/ directory.

The symlink target should be ../ROADMAP.md:

# correct creation
ln -s ../ROADMAP.md docs/roadmap.md

Without this fix, mdBook will fail to read the symlink target and the roadmap page will 404, which is the opposite of what the PR intends. The rest of the fix (the ./roadmap.md reference in SUMMARY.md and the /ROADMAP.html/roadmap.html redirect) is correct and only needs this one change to complete the chain.


Minor Concern: Alpha Version Dependency

File: Makefile, line docs-deps

cargo install --version 0.10.0-alpha mdbook-katex

The previous pin was 0.9.4 (stable). Using an alpha release in a CI toolchain introduces some risk: alpha crates can have breaking API changes or regressions before their stable release. Consider monitoring for a stable 0.10.x release and pinning to that instead, or document the reason for the alpha pin (e.g. required for mdBook 0.5 compatibility) so future maintainers know it is intentional.


Correct and Well-Done Changes

  • mdbook-alerts removal — Native admonition support in mdBook 0.5 makes this plugin redundant; removing it reduces tooling surface area.
  • \$1.9B escaping in docs/l2/stages.md — Correct fix; without escaping, $...$ would be interpreted as an inline math block by KaTeX.
  • \[need proper instance labels\] escaping in docs/developers/l1/dashboards.md — Prevents mdBook from warning about bare [...] constructs that look like incomplete Markdown links.
  • /ROADMAP.html redirect in book.toml — Necessary backward-compatibility entry since the page URL case changes from /ROADMAP.html to /roadmap.html.
  • CI workflow version bump — Aligns the peaceiris/actions-mdbook@v2 pin with the new version consistently.

Summary

One likely bug: the symlink target ROADMAP.md resolves to the non-existent docs/ROADMAP.md; it should be ../ROADMAP.md. Everything else looks correct. Once the symlink target is fixed and the alpha pin is either accepted as intentional or replaced with a stable version, this PR is ready to merge.


Automated review by Claude (Anthropic) · sonnet · custom prompt

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the documentation toolchain to mdBook 0.5.2, removes the now-unneeded alerts plugin, and adjusts docs content/links to eliminate build warnings and fix the roadmap page link/redirects.

Changes:

  • Bump CI mdBook version to 0.5.2 and update installed mdBook plugins (dropping mdbook-alerts).
  • Fix mdBook warnings by escaping $ (KaTeX) and [] (incomplete link/reference parsing) in docs pages.
  • Fix the roadmap navigation link and add an HTML redirect for legacy roadmap URLs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/l2/stages.md Escapes $ amounts to avoid KaTeX/math parsing warnings.
docs/developers/l1/dashboards.md Escapes [] text to avoid link/reference warnings.
docs/SUMMARY.md Points “Roadmap” to the in-book docs/roadmap.md page.
book.toml Removes alerts preprocessor config and adds redirect for legacy /ROADMAP.html.
Makefile Updates docs plugin versions and removes mdbook-alerts from docs-deps.
.github/workflows/pr-main_mdbook.yml Bumps CI mdBook version to 0.5.2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
cargo install --version 0.9.1 mdbook-linkcheck2
cargo install --version 0.8.0 mdbook-alerts
cargo install --version 0.15.0 mdbook-mermaid
cargo install --version 0.10.0-alpha mdbook-katex
Comment thread Makefile
Comment on lines +208 to +210
cargo install --version 0.10.0-alpha mdbook-katex
cargo install --version 0.12.0 mdbook-linkcheck2
cargo install --version 0.17.0 mdbook-mermaid
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🤖 Codex Code Review

  1. Blocker: docs/roadmap.md:1 is a broken symlink. Symlink targets are resolved relative to the link location, so ROADMAP.md resolves to docs/ROADMAP.md, not repo-root ROADMAP.md. In a checkout, that target does not exist, so the new Roadmap entry in docs/SUMMARY.md points at a missing page. This should be ../ROADMAP.md or an actual copied file under docs/.

  2. Medium: pr-main_mdbook.yml still only triggers on docs/**. After wiring the published page to repo-root ROADMAP.md, edits to ROADMAP.md alone will not run the docs build/deploy workflow, so docs.ethrex.xyz/roadmap.html can drift from source. ROADMAP.md should be added to both push.paths and pull_request.paths.

  3. Low: Makefile removes mdbook-alerts, but docs/CONTRIBUTING_DOCS.md still tells contributors that make docs-deps installs/uses it. That doc should be updated in the same PR to keep local docs setup accurate.

Assumption: I’m assuming mdbook 0.5.2 now renders the existing GitHub-style callouts ([!NOTE], [!WARNING], etc.). If not, removing the alerts preprocessor will regress a lot of pages. I couldn’t verify that locally because mdbook is not installed in this environment.

No Ethereum execution, consensus, trie, RLP, or gas-accounting code is touched here; the review concerns are limited to docs build correctness and CI coverage.


Automated review by OpenAI Codex · gpt-5.4 · custom prompt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants