rust-lang / rust-lang/mdBook

Avoid the need to duplicate page titles

Open
#2,763 0 comments 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

Right now, if I am not mistaken I have to include the title of each page both in the SUMMARY.md and in the markdown file of the page itself with a #.

That means if I change the title of a page I also have to remember to update it in the other place.

Proposed Solution

I think it would be nice if I could leave the title of the page empty in the `SUMMARY.md

[](./page.md)

and mdbook would use the title from the page.md file in the table of contents as well.

Notes

mdbook v0.4.51

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 reads SUMMARY.md entries and obtains page titles from page.md files. Check the existing parsing and rendering tests if available. Done means an empty link label such as produces a table-of-contents entry using the linked page's title without requiring duplication.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, rust
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.