Document toc.md and toc.html and make toc.md a reserved file
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- PR merge metrics
- PR metrics pending
Description
Problem
In normal circumstances mdbook will generate a file called toc.html that will contain the Table of Contents`. It is used as the TOC for people (and bots) who don't run JavaScript.
If the user creates a file called src/toc.md and references it in SUMMARY.md then mdbook will use it to generated the toc.html file replacing the normally generated one.
Proposed Solution
IMHO this should be avoided.
- If there is a an
toc.mdfile the build process should stop with an errortoc.md is reserved for internal use. - Regardless of 1. being implemented or not, the behaviour should be described in the documentation so people can search for either
toc.html,toc.mdortocand find it.
Notes
See also #3047
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 reading the build handling for src/toc.md and the SUMMARY.md entry that can cause toc.html to be replaced. Review issue #3047 and the existing documentation for toc.html, toc.md, and toc, then add the reserved-file error and document the behavior. Done means the conflict is rejected and users can find the behavior in the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100