Shortcodes have been removed
Accent used to expand [shortcode] syntax before the markdown parser ran.
That syntax no longer exists. A page still containing it renders the brackets
as ordinary text.
Declared components replace it and do the
same job with one addition that matters: a component declares what it takes, so
a misspelled attribute or a value outside an enum is reported by
accent validate instead of rendering as nothing.
[infobox type="prereq" title="Setup"] ← gone Body text. [/infobox] {% infobox type="prereq" title="Setup" %} ← the same thing Body text. {% /infobox %}
Move your content across
accent migrate shortcodes does the rewriting. It reports first and changes
nothing until you pass --write:
accent migrate shortcodes --config config.yaml # report accent migrate shortcodes --config config.yaml --write # apply
It rewrites a shortcode only when your theme declares a component of that name and it can verify the result, and it leaves everything else exactly as you wrote it with the file, the line, and the reason. Shortcodes inside fenced code blocks are never touched, so pages that document the old syntax stay intact.
The command has not been removed with the syntax it reads. Upgrading late is not a mistake that should cost you a manual rewrite.
See Declared components for the full migration walkthrough, including how to tell the command what a positional argument meant.
What happened to each built-in
Seven built-ins were pure markup and are now components your theme owns, which means you can change what they look like:
| Was | Now |
|---|---|
[infobox type="x" title="y" collapsible=true] | {% infobox type="x" title="y" collapsible=true %} |
[alert type="x"] | {% callout type="x" %} |
[tabs group="g"] / [tab label="l"] | {% tabs group="g" %} / {% tab label="l" %} |
[button primary href="/x"] | {% button variant="primary" href="/x" %} |
[details summary="s"] | {% accordion summary="s" %} |
[edition standard/] | {% edition edition="standard" /%} |
The default theme ships a manifest and a template for each of them, in
themes/default/shortcodes/. Copy them into your own theme, or write your own
– they are ordinary Jinja templates with a YAML file beside them.
Five built-ins reached into parts of Accent a theme template cannot – the diagram dispatcher, media resolution, the active search backend – so no theme component can replace them. Three are tags again, as builtin components Accent renders itself; the other two keep another way in:
| Was | Use instead |
|---|---|
[diagram] | the {% diagram %} tag, a fenced ```mermaid block, or the diagram() template function |
[pdf] | the {% download %} tag, which covers any file, or the pdf_card() template function |
[iframe] | an <iframe> element written directly in the page, or the {% video %} tag for a video beside the page |
[figure] | markdown image syntax, or a raw <figure> element |
[search] | the {% search %} tag, or the search_form() template function |
No theme ships a figure component and {% figure %} is not a tag, because
markdown already says what [figure] said:
 <figure> <img src="/img/photo.jpg" alt="A photo"> <figcaption>My photo</figcaption> </figure>
alert and details are now callout and accordion
[alert] used to be a deprecated alias that rendered as [infobox], and it
won ahead of any alert template a theme declared – so a theme that shipped
its own alert never saw it render.
The default theme now declares the
canonical components that
every conforming theme implements: callout for what alert and infobox
did, and accordion for what details did. It keeps infobox too, for pages
that already use it.
accent migrate shortcodes still rewrites the old names, because the new
manifests list them under migrate.from. [alert warning] becomes
{% callout type="warning" %}, and [details summary="More"] becomes
{% accordion summary="More" %}. The callout manifest renames alert’s
variant attribute to type, so [alert type="info"] and
[alert variant="info"] both become {% callout type="info" %}.