Building should fail if important files are outdated
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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