rust-lang / rust-lang/mdBook

Building should fail if important files are outdated

Open
#2,584 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

Currently index.hbs gets updated relatively often. Project maintainers then need to check the commit history (there is usually no note about this in the changelog) and manually update that file which has caused a number of bug reports because of broken nesting, sidebars, etc. because someone did not know that step is needed.
So far I only ran into issues with index.hbs being outdated but, to be honest, I have no idea which other files to keep track of that also could cause issues when outdated.

Proposed Solution

It would probably good to have some sort of versioning system for files that are part of the final book and are not updated when updating mdbook. That way mdbook could recognize the outdated files and fail or warn when building.
For highly customized projects that check could be disabled via a setting or the version of the file can be manually updated.

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how mdBook builds the final book and how index.hbs is handled. Identify which generated-book files need freshness tracking, then define how builds should fail or warn and how customized projects can disable or override the check.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.