Skip to content

Create Hugo shortcodes for tabsets, callouts, and code filenames #158

@cwickham

Description

@cwickham

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:

  1. Create a Hugo shortcode that owns the rendering logic (HTML + CSS)
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions