rust-lang / rust-lang/mdBook

FIgure out what to do with `chapter_titles`

Open
#2,769 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-API
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

RenderContext::chapter_titles and Preprocessor::chapter_titles provide a way for the custom chapter titles (provided by {{# title}}) to be ferried to the HTML renderer. This creates some awkwardness:

  • This is an internal field that unfortunately gets publicly exposed.
  • Slightly awkward with the serde skip (since it is a field the user can't really use).
  • It's not documented terribly well.

I'm not sure what, if anything to do here.

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 RenderContext::chapter_titles and Preprocessor::chapter_titles carry values from {{# title}} to the HTML renderer. Review their public exposure and serde skip behavior, then examine the existing documentation. Done means the project has an agreed resolution for this internal API and the relevant implementation or documentation reflects it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Refactor
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.