posit-dev / posit-dev/open-source-website
Create Hugo shortcodes for tabsets, callouts, and code filenames
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 55
- Forks
- 24
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 17
Description
Tabsets, callouts, and code filenames are currently implemented as Quarto Lua filters that emit HTML and CSS directly. This means they only work in .qmd posts.
To support these features in .md posts too, each should follow the same pattern used for videos:
- Create a Hugo shortcode that owns the rendering logic (HTML + CSS)
- Simplify the Lua filter to just translate Quarto's native syntax into calls to the shortcode
This gives .md authors access to these features via shortcode syntax, while .qmd authors keep using the native Quarto syntax they already know.
Features
- Tabsets — Quarto's
::: {.panel-tabset}→{{</* tabset */>}}shortcode - Callouts — Quarto's
::: {.callout-note}etc. →{{</* callout */>}}shortcode - Code filenames — Quarto's
{filename="doc.qmd"}→ shortcode or render hook that adds a filename label
Related
- #134 — Style filename labels on code blocks
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
Find the existing video shortcode and the Lua filters that currently implement tabsets, callouts, and code filenames. Read how the video pattern separates Hugo rendering from syntax translation, then apply that pattern to each feature. Done means all three work in .md posts through shortcodes while .qmd authors retain the native Quarto syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- hugo, lua
- Domain
- content, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100