Shortcode Showcase

JournalTheme Demo1 December 2025
Creative tools and typography arranged as a flat lay

This page demonstrates every shortcode available in the First Folio theme. Use it as a visual reference.

Callout

Four built-in types plus custom styling:

Tip
This is a tip callout — use it for helpful suggestions.
Info
This is an info callout — use it for informational notes.
Alert
This is an alert callout — use it for critical information.
Warning
This is a warning callout — use it for cautionary notes.
Custom Callout
This callout has a custom title and background colour.

With float positioning:

Tip
This callout floats to the right of the content.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. The callout sits alongside this paragraph text, demonstrating the float position parameter.

center

This text is centred using the `center` shortcode.

Colorbold

Inline highlighted text in the theme’s secondary accent colour:

This recipe calls for really good butter — the kind from a farmers’ market.

Without the underline: no underline here.

Details

Collapsible content using the HTML <details> element:

Click to expand this section

This content is hidden by default. It can contain bold text, italic text, code, and other Markdown formatting.

  • List items work too
  • As do other block elements

Dialogue

For plays and screenplays — character name in small caps with optional parenthetical:

ELENA

Have you seen the forecast?

MARCUS (checking his phone)

Rain again. Third day running.

ELENA (sighing)

At least the garden is happy.

Direction

Stage directions for dramatic scripts:

The cafe. Morning light through rain-streaked windows. ELENA and MARCUS at a corner table.

Pause. The sound of rain intensifies.

Displays page image resources as a responsive grid with lightbox:

Img

The img shortcode embeds a page resource image with positioning, caption, and optional blur:

Purple gradient demo image
A demo image

This paragraph demonstrates the img shortcode floated to the right. The image sits alongside the text, wrapping naturally. The shortcode generates responsive thumbnails with WebP support, matching the gallery behaviour.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

With the noborder parameter to remove the accent border:

Blue gradient demo image

Poem

Preserves line breaks exactly as written — essential for verse:

The rain falls soft on Connacht stone, on field and wall and empty lane, on everything I've ever known and some things I won't know again.

Popquote

Expandable quote with a summary line:

The best time to plant a tree was twenty years ago…

The best time to plant a tree was twenty years ago. The second best time is now.

This shortcode is useful for long quotations that would interrupt the flow of an article. The reader can choose to expand it.

Quote

Pull-quote with decorative quotation marks. Two paths: the back-compat attribution= for a single-line credit, and the structured-fields path for richer testimonial layouts (name, role, organisation, photo, featured modifier).

Back-compat — single-line attribution

Be yourself; everyone else is already taken.
Oscar Wilde

Unattributed

A quote without attribution still gets the decorative marks.

Structured — name only

There and back again, and many adventures along the way.
Frodo Baggins

Structured — name and role

When you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Sherlock HolmesConsulting Detective

Structured — name and organisation

Books! And cleverness! There are more important things — friendship and bravery.
Hermione GrangerMinistry of Magic

Structured — photo from site-root path

All we have to decide is what to do with the time that is given us.
GandalfGandalfWizard

Structured — photo from absolute URL

It’s a dangerous business, going out your door.
Bilbo BagginsBilbo BagginsHobbit of the Shire

Edge case — unresolvable photo emits a build warning and omits the <img>

The filename intentionally-missing-file.jpg below does not exist in the page bundle; it’s the demo for the unresolvable-photo path. Running hugo or hugo server will print a WARN line on stderr referencing the filename. The <img> element is omitted from the rendered HTML — the attribution still renders, just without a photo. This warning is intentional and exercises RT-54.11 in the theme’s regression suite.

Hey dol! Merry dol! Ring a dong dillo!
Tom BombadilMaster of Wood, Water and Hill

Back-compat precedence — attribution= set alongside structured fields uses attribution=

When both are set on the same shortcode, attribution= wins and the structured fields (including any photo) are ignored. Sites migrating from the legacy form can leave both during the transition.

The truth is rarely pure and never simple.
Oscar Wilde

Raw HTML

Passes HTML through without Markdown processing:

This is raw HTML passed through the rawhtml shortcode.

Section List

Renders navigation links to site sections:

With a limit parameter to show recent items per section:

Side-by-Side

Places two items side by side on desktop, stacked on mobile:

Purple gradient
Blue gradient

Stats

A pair of shortcodes for portfolio / consultancy “stats rows” — a number paired with a short label. Use stat standalone, or wrap several in stats for a responsive grid.

Standalone

A single stat block, used inline:

80
Countries

Prefix and suffix

Optional prefix and suffix add small adornments around the number:

~20+
Years

Wrapped — auto-fit responsive grid

The default {{< stats >}} wrapper lays children out with auto-fit columns. The layout reflows to fewer columns as the viewport narrows:

40
Years experience
80
Countries advised
200+
Parties advised

Wrapped — fixed columns

Pass columns=N to fix the column count regardless of viewport. Useful when the row would otherwise reflow to a layout that looks unbalanced:

£500k
Saved
12
Awards
4.7/5
Score
99.9%
Uptime

Video

Embeds a local video file with HTML5 player controls:

{{< video "/videos/sample.mp4" >}}

(Place a video file at static/videos/sample.mp4 to see this in action.)

Contact Form

Self-hosted contact form with Cloudflare Turnstile CAPTCHA:

{{< contactform newsletter="true" >}}

(Requires Cloudflare Worker configuration. See docs/contactform.md for setup.)

Formspree

A simpler contact form using Formspree as the backend:

{{< formspree id="your-form-id" >}}

(Replace with your actual Formspree form ID.)