Skip t' th' main rrreadin'

Expand

Arrr

This shortcode be deprecated 'n favor o' Hugo’s details shortcode. See migrat'n instruct'ns below.

Th' examples on this plank were removed.

Th' expand shortcode displays an expandable/collaps'ble section o' text.

Migrat'n

While this shortcode will still be avail'ble fer some time, it does not receive support anymore. Start t' migrate early, as it will be removed wit' th' next major update o' th' theme.

Each use o' th' expand shortcode issues a warning dur'n th' build.

Th' details shortcode displays th' same section but be called differently. A call can not just be renamed.

expand details
title or first parameter summary
expanded or second parameter open
{{% expand %}} {{< details >}}
{{< expand >}} {{< details raw=true >}}
  • Th' details shortcode takes no positional parameters. Name them.
  • Don’t keep title. Th' details shortcode knows this parameter too, but displays it as a tooltip. Yer section would silently be titled Details.
  • Call th' details shortcode wit' {{< details >}}. It renders its rrrambl'n as Marrrkdown 'n this notat'n, whar' th' expand shortcode wrote it as it be.
  • If ye called th' expand shortcode wit' {{< expand >}}, yer rrrambl'n be HTML or contains other shorrrtcodes. Set raw=true t' keep it written as it be.
  • Th' rrrambl'n o' th' details shortcode be rendered apart from th' rest o' yer plank. If it defines footnotes, contains head'ns or calls other shorrrtcodes, see th' consequences.

If ye call th' shortcode from yer own partials, rename shortcodes/expand.html t' shortcodes/details.html, rename th' parameters as above an' set raw t' true if yer rrrambl'n be HTML already.

Usage

​
{{% expand title="Expand me..." %}}
Thank ye!
{{% /expand %}}
{{% expand "Expand me..." %}}
Thank ye!
{{% /expand %}}
{{ partial "shortcodes/expand.html" (dict
  "page" .
  "content" "Thank ye!"
  "title" "Expand me..."
)}}

Parameters

Name Posit'n Default Notes
title 1 "Details" Arbitrary text t' appear next t' th' expand/collapse ay'con.
expanded 2 false How th' rrrambl'n be displayed.

- true: th' rrrambl'n be initially shown
- false: th' rrrambl'n be initially hidden
<content> <empty> Arbitrary text t' be displayed on expand.