Collapsible Admonitions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- PR merge metrics
- PR metrics pending
Description
Problem
Would be nice to have collapsible admonitions :) Personally I like to hide technical details in them, so the page is cleaner overall.
I am aware of mdbook-admonish and using it, but since it is not compatible with mdbook 0.5
I would like to use the integrated features instead.
Proposed Solution
Use - to mark an admonition as collapsible, like:
> [!NOTE]-
> General information or additional context.
Notes
With that, custom headers (#2975) and the possibility to add custum admonitions with css like in mdbook-admonish would make it feature complete for me.
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 reviewing mdBook's existing admonition handling and the proposed syntax in this issue, then compare the custom-header work in #2975 and the mdbook-admonish custom-block behavior. Done means the > admonition form with a trailing - renders as collapsible while preserving the requested header and CSS customization considerations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, markdown, rust
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100