Summary
Support tabbed content blocks — a common pattern in documentation for showing the same example in multiple languages or package managers side by side.
Proposed syntax
::: tabs
@tab Go
\`\`\`go
import "github.com/example/lib"
\`\`\`
@tab Python
\`\`\`python
import example_lib
\`\`\`
:::
Implementation notes
- Implement as an extension to the existing admonition block parser in
internal/parser/admonitions.go, or as a separate goldmark extension
- Renders to HTML with
<div class="tabs"> + <button role="tab"> + <div role="tabpanel"> structure
- Tab switching handled in
assets/main.js — no extra dependency
- Tab state should be remembered in
localStorage keyed by tab label (so switching "Go/Python" persists across pages)
- Consider: should all tab groups with the same labels sync? (e.g. switching to "Python" in one block switches all "Python" tabs on the page)
Summary
Support tabbed content blocks — a common pattern in documentation for showing the same example in multiple languages or package managers side by side.
Proposed syntax
Implementation notes
internal/parser/admonitions.go, or as a separate goldmark extension<div class="tabs">+<button role="tab">+<div role="tabpanel">structureassets/main.js— no extra dependencylocalStoragekeyed by tab label (so switching "Go/Python" persists across pages)