rust-lang / rust-lang/mdBook

Is there a way to automatically add the title text in summary.md when adding new files in /content folder?

Open
#2,976 1 comment 0 reactions 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

For example, when I create a new file in /content/, the file name is newfile.md and the H1 title inside is # this is my file, and the summary.md can automatically add -[ "This is my file" ] (/content/newfile.md) somewhere.

Thanks.

Proposed Solution

No response

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 reading how mdBook handles files in /content/ and how summary.md is parsed or generated. Define the expected behavior for a new Markdown file and its H1 title, then verify that the resulting summary.md contains a correctly formatted link to /content/newfile.md.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, rust
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.