Repository navigation
Support tabsets in quarto articles - #3026
Open
roaldarbol wants to merge 1 commit into
Open
roaldarbol wants to merge 1 commit into
roaldarbol wants to merge 1 commit into
Conversation
Quarto's `::: {.panel-tabset}` produces markup for tabby.js, which pkgdown doesn't include. `tweak_tabsets()` matched any class *containing* `tabset`, so it picked up `.panel-tabset` and mangled it into a single broken tab. Now:
* `tweak_tabsets()` matches the `tabset` class exactly, on a `<div>` (R Markdown) or `<section>` (Quarto), so `## Heading {.tabset}` also works in quarto articles.
* New `tweak_panel_tabset()` converts Quarto panel tabsets to Bootstrap 5 tabs, respecting the default tab (`data-tabby-default`) and `.nav-pills`.
Fixes r-lib#2951.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quarto renders
::: {.panel-tabset}as markup for tabby.js, which pkgdown doesn’t include.tweak_tabsets()matched any class containingtabset, so it also picked up.panel-tabsetand turned it into a single broken tab.This PR:
tabsetclass exactly, on<div>or<section>,so## Heading {.tabset}now also works in quarto articles;.nav-pills;Grouped tabsets (
group=) display as independent tabsets; syncing them would need JS and could be a follow-up. @BjarkeHautop has a related post-processing approach in quartofix.This PR was made with AI assistance (Claude Code); I have reviewed the changes.
Fixes #2951