-
Notifications
You must be signed in to change notification settings - Fork 0
Tabbed content blocks for multi-language examples #7
Copy link
Copy link
Open
Labels
contentContent authoring featuresContent authoring featuresenhancementNew feature or requestNew feature or request
Description
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
localStoragekeyed 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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
contentContent authoring featuresContent authoring featuresenhancementNew feature or requestNew feature or request