feature: Add chapther numbers to search result breadcrumbs
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start in src/renderer/html_handlebars/search.rs around the linked search-result generation, then read issue #631 for the proposed chapter hierarchy changes. Determine how optional chapter numbers should appear in breadcrumbs and whether the architecture work is required first. Done means search-result breadcrumbs can show chapter numbers in the requested cases without breaking the existing format.
Written by the indexing model from the issue text.
Description
This would make the search results easier to scan is some cases (e.g. when the book is big (like The Book).
Before:

After:

It could be implemented as an optional thing.
Here's where they're being generated:
https://github.com/rust-lang-nursery/mdBook/blob/77af889a2e5331c11345ddef935caccb0305cd34/src/renderer/html_handlebars/search.rs#L92
May be better to first make some architecture changes that would make it easier to implement
A quote from #631:
The idea is a nested chapter can have links back to its parent (and maybe siblings?), making things like section numbers and breadcrumbs a lot easier to implement.
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 12
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.
More from rust-lang/mdBook
-
C-bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
C-enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
C-enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
C-enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in rust-lang/mdBook
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100