clean-hugo theme: blog formatting and shortcode reference

Jan 1, 2019 • Community

A living reference for every shortcode and formatting option available in the clean-hugo theme — figures, admonitions, admonition quotes, blockquotes, pull quotes, feature quotes, buttons, YouTube embeds, and more.

This post is a living reference for the clean-hugo theme. Every shortcode and content-formatting option available in the theme is demonstrated here with a working example and the code that produces it. Use this post to test that a theme change has not broken existing content, and as a copy-paste resource when writing new blog posts.

Figures

The figure shortcode renders images with optional captions and automatic WebP support. It generates a <picture> element with a WebP <source> and a fallback <img>. If a .webp file exists alongside the source image, modern browsers use it automatically.

Usage:

{{< figure
  src="images/pyopensci-general/pyopensci-timeline2019-2024.png"
  alt="Descriptive alt text."
  caption="Optional caption with **Markdown** support."
  link="images/pyopensci-general/pyopensci-timeline2019-2024.png"
>}}

Rendered:

A timeline showing the growth of pyOpenSci from 2019 to 2024.
Growth of pyOpenSci from 2019 to 2024. The link param makes the image click-to-enlarge.

Parameters:

ParamRequiredDescription
srcyesImage path (static or page bundle)
altyesAlt text — always required for accessibility
captionnoCaption text, supports Markdown
linknoURL the image links to (defaults to src)

Admonitions

The admonition shortcode creates highlighted callout boxes. Five types are available. An optional title param adds a heading inside the box.

Usage:

{{< admonition type="info" title="Optional title" >}}
Content with **Markdown** support.
{{< /admonition >}}

All five types rendered:

Rendered:

Note (default)
Use type="note" for general supplementary information. This is the default type if you omit the type param.
Info
Use type="info" for helpful context or background detail that readers may want but don’t strictly need.
Warning
Use type="warning" to flag something that could cause problems if overlooked — a deprecation, a known issue, a prerequisite.
Danger
Use type="danger" for destructive or irreversible actions, or for critical requirements that must be met before proceeding.
Success
Use type="success" to confirm a completed step, highlight a positive outcome, or call attention to a best practice.

Without a title:

Omit the title param and the header row is hidden entirely.

Admonition quotes

The admonition-quote shortcode renders a quotation inside an admonition-style callout box. It uses the same type variants as admonition, with a single opening quote mark at the top (no closing quote). Optional title, author, and event params are supported.

Same quote text in each example so you can compare styles.

Note:

{{< admonition-quote type="note" title="Note quote" author="Anonymous" event="AGU 2019 Townhall" >}}
Good research software is built for the people who use it.
{{< /admonition-quote >}}

Rendered:

Note quote
Good research software is built for the people who use it.
~ Anonymous, AGU 2019 Townhall

Info:

{{< admonition-quote type="info" >}}
Good research software is built for the people who use it.
{{< /admonition-quote >}}

Rendered:

Good research software is built for the people who use it.

Warning:

{{< admonition-quote type="warning" title="A community reminder" >}}
Good research software is built for the people who use it.
{{< /admonition-quote >}}

Rendered:

A community reminder
Good research software is built for the people who use it.

Success:

{{< admonition-quote type="success" author="pyOpenSci community member" >}}
Good research software is built for the people who use it.
{{< /admonition-quote >}}

Rendered:

Good research software is built for the people who use it.
~ pyOpenSci community member

Danger:

{{< admonition-quote type="danger" >}}
Good research software is built for the people who use it.
{{< /admonition-quote >}}

Rendered:

Good research software is built for the people who use it.

Parameters:

ParamDefaultDescription
typenoteAdmonition variant: note, info, warning, danger, success
titleOptional heading above the quote
authorAttribution name (optional)
eventEvent or source (optional)

Blockquotes

Plain Markdown blockquotes are for inline citations in the flow of a post — a left border, light background, and Lora italic body text. No shortcode is required.

Use a pull quote when you want the same quote typography with a decorative opening mark and no sidebar box. Use a feature quote for compact sidebar-style quotes (home page project block, two-column layouts). Use an admonition quote when the quote should sit inside a colored callout box.

Single paragraph:

> Good research software is built for the people who use it.

Good research software is built for the people who use it.

With attribution (written in Markdown):

> Good research software is built for the people who use it.
>
> — **pyOpenSci community member**, *Peer review guide*

Good research software is built for the people who use it.

pyOpenSci community member, Peer review guide

Multi-line quote:

> Good research software is built for the people who use it.
>
> Quotes can span multiple paragraphs when you need more room.

Good research software is built for the people who use it.

Quotes can span multiple paragraphs when you need more room.

Nested in a list (blockquote inside list item):

* Before you submit, read the packaging guide.
* Remember the goal of review:

  > Good research software is built for the people who use it.

* Then open your submission issue on GitHub.
  • Before you submit, read the packaging guide.

  • Remember the goal of review:

    Good research software is built for the people who use it.

  • Then open your submission issue on GitHub.

Pull quotes

The pullquote shortcode uses the same Lora quote text as blockquotes, with a decorative opening mark above and no left border or background. Three accent colors are available for the mark. Optional author and event params add attribution.

Same quote text in each example so you can compare colors.

Teal (default):

{{< pullquote color="teal" author="Anonymous" event="AGU 2019 Townhall" >}}
Good research software is built for the people who use it.
{{< /pullquote >}}

Rendered:

Good research software is built for the people who use it.

Magenta:

{{< pullquote color="magenta" >}}
Good research software is built for the people who use it.
{{< /pullquote >}}

Rendered:

Good research software is built for the people who use it.

Purple:

{{< pullquote color="purple" author="pyOpenSci community member" >}}
Good research software is built for the people who use it.
{{< /pullquote >}}

Rendered:

Good research software is built for the people who use it.

Parameters:

ParamDefaultDescription
colortealColor variant: teal, magenta, or purple
authorAttribution name (optional)
eventEvent or source (optional, requires author)

Feature quotes

The feature-quote shortcode renders a compact quote with a Font Awesome opening mark and Nunito Sans italic text at 1.3rem — no left border or gray background. This is the same style used in the home page Current project block. Three accent colors match the pull quote palette.

Purple (default):

{{< feature-quote cite="Eliot Robson" >}}
Gen AI solutions remind us that the centerpiece of open-source software is
building a community around solving a specific problem.
{{< /feature-quote >}}

Rendered:

Gen AI solutions remind us that the centerpiece of open-source software is building a community around solving a specific problem.
— Eliot Robson

Teal:

{{< feature-quote color="teal" cite="Anonymous" >}}
Good research software is built for the people who use it.
{{< /feature-quote >}}

Rendered:

Good research software is built for the people who use it.
— Anonymous

Magenta:

{{< feature-quote color="magenta" >}}
Good research software is built for the people who use it.
{{< /feature-quote >}}

Rendered:

Good research software is built for the people who use it.

Parameters:

ParamDefaultDescription
colorpurpleAccent for the mark and quote text: purple, teal, or magenta
citeAttribution name (optional)
authorAlias for cite

Buttons

The button shortcode renders a styled CTA link. Variants use pyOpenSci brand colors. Default and large (size="lg") sizes are supported.

Dark purple:

{{< button href="/blog/" variant="dark-purple" >}}
Dark purple
{{< /button >}}

Rendered:

Dark purple

White:

{{< button href="/blog/" variant="white" >}}
White
{{< /button >}}

Rendered:

White

Green:

{{< button href="/blog/" variant="green" >}}
Green
{{< /button >}}

Rendered:

Green

Light purple:

{{< button href="/blog/" variant="light-purple" >}}
Light purple
{{< /button >}}

Rendered:

Light purple

Outline:

{{< button href="/blog/" variant="outline" >}}
Outline
{{< /button >}}

Rendered:

Outline

Large:

{{< button href="/blog/" variant="dark-purple" size="lg" >}}
Large button
{{< /button >}}

Rendered:

Large button

With icon (right):

{{< button href="/blog/" variant="dark-purple" icon="arrow-right" iconPosition="right" >}}
Continue reading
{{< /button >}}

Rendered:

Continue reading

With icon (left):

{{< button href="https://github.com/pyOpenSci" variant="outline" icon="github" target="_blank" >}}
View on GitHub
{{< /button >}}

Rendered:

View on GitHub

Parameters:

ParamDefaultDescription
href#Link URL
variantdark-purpledark-purple, white, green, light-purple, outline
sizelg (optional)
iconFont Awesome icon name (without fa-)
iconPositionleftleft or right
target_blank for external links

YouTube

The youtube shortcode embeds a YouTube video in a responsive 16:9 container. Pass the video ID from the URL (the part after v=).

Usage:

{{< youtube id="n9IZGT4DxDs" >}}

Rendered:

Blog list

The blog-list shortcode pulls the most recent blog posts and renders them as listing cards. Use it on any page to surface recent content.

Usage:

{{< blog-list title="Recent posts" limit=3 >}}

Rendered:

Recent posts

View more on the blog

Parameters:

ParamDefaultDescription
titleRecent ThoughtsSection heading
limit3Number of posts to display

Impact card grid

The impact-cards shortcode renders a responsive card grid from the page cards: front matter. Card types include image highlights, white icon cards, and large text_only headline cards. Set cards_layout: wide in front matter for a three-column desktop grid.

Usage (front matter + shortcode):

cards:
  - text_only: true
    title: "Large text card"
  - modifier: "card--white"
    icon: "fa-solid fa-mobile-screen"
    title: "White card with icon"
    excerpt: "Icon, title, and body text."
  - title: "Teal highlight card"
    icon: "fa-solid fa-code"
    excerpt: "Default modifier uses primary-light background."
{{< impact-cards >}}

Rendered (uses the demo cards: on this page):

Large text card

White card with icon

Icon, title, and body text on a white background.

Teal highlight card

Default styling uses the primary-light background.

Feature row

Side-by-side image and text with an optional button. Use on landing pages inside swoosh sections.

Usage:

{{< feature-row layout="left"
    title="Feature row title"
    image="/images/landing-pages/scipy-sprint-working.png"
    alt="Descriptive alt text."
    buttonUrl="/about-peer-review/"
    buttonLabel="Learn more" >}}
Markdown body copy with **formatting** support.
{{< /feature-row >}}

Rendered:

Person working at a laptop during a pyOpenSci sprint.

Feature row example

Markdown body copy with formatting support. Layout can be left, right, or center.

About peer review

Swoosh section

Full-width band with optional curved dividers. When nesting other shortcodes inside, use Hugo’s HTML shortcode form (angle brackets), not the markdown shortcode form (percent signs).

Usage:

{{< swoosh_section background="purple" swoosh="bottom" >}}
{{< section-heading title="Inside a swoosh" >}}
{{< /swoosh_section >}}

Rendered:

Inside a swoosh section

Purple background • optional top or bottom curve

Intro section

Renders intro_section.text from page front matter — typically placed below a hero on splash pages.

Usage:

intro_section:
  text: "Lead paragraph shown in the intro band."
{{< intro-section >}}

Rendered:

Intro sections render a short lead paragraph from page front matter — used below heroes on landing pages.

Connect with pyOpenSci

Admonition-style callout with community links and social follow list.

Usage:

{{< connect-with-pyos >}}

Rendered:

Connect with us!

There are many ways to get involved if you're interested!

Follow us:

If you are on LinkedIn, check out and subscribe to our newsletter.

Recent contributors

Grid of the most recently added people from data/contributors.yml.

Usage:

{{< recent-contributors limit="2" >}}

Rendered:

pyOpenSci has a diverse and vibrant community of pythonistas! To date, 392 wonderful people have contributed to pyOpenSci.

Recent packages

Grid of recently accepted packages from data/packages.yml.

Usage:

{{< recent-packages limit="2" >}}

Rendered:

Recently accepted Python packages

lintquarto

Amy Heather

Package for running linters, static type checkers and code analysis tools on python code in quarto (.qmd) files.

tda-mapper

Luca Simi

A Python library implementing the Mapper algorithm for Topological Data Analysis.

View all accepted packages

Upcoming events

Event cards from content/events/ (upcoming dates only).

Usage:

{{< upcoming-events limit="2" >}}

Rendered:

Training feature

Home-page training strip — reads training_feature from page front matter.

Usage:

training_feature:
  eyebrow: "Training"
  badge: "New cohort"
  title: "Course title"
  excerpt: "Short description."
  button_label: "Learn more"
  button_url: "/events/"
  image:
    src: "images/landing-pages/scipy-sprint-2026.png"
    alt: "Alt text."
{{< training-feature >}}

Rendered:

Demo

Reference

Training feature strip

Side-by-side image and CTA — used on the home page.

Browse events

Hands on keyboard at a laptop during a sprint.

Current project

Full-width quote band used on the home page — reads current_project from front matter.

Usage:

current_project:
  eyebrow: "Current project"
  title: "Headline"
  excerpt: "Supporting text."
  quote: "Quote text."
  cite: "Attribution"
  button_label: "Get involved"
  button_url: "/events/"
{{< current-project >}}

Rendered:

Demo

Current project band

Full-width quote block used on the home page.
Good research software is built for the people who use it.
— Demo attribution

Editorial board

People grids for editorial board and emeritus editors from data/contributors.yml. Used on program landing pages.

Usage:

{{< editorial-board >}}

Rendered:

Meet our editorial board

The pyOpenSci software peer review process is led by a volunteer team of editors from the scientific Python community. Editors do the following things:

  • They find reviewers from diverse backgrounds who have a mixture of scientific domain and Python experience.
  • They oversee the entire review process for a package ensuring it runs in a timely and efficient manner.
  • They support the submitting authors and reviewers in answering questions related to the review.
  • They determine whether that package should be accepted into the pyOpenSci ecosystem once the review has wrapped up.

Learn more about the editor role at pyOpenSci in our peer review guide.

GitHub photo of Filipe

Filipe

Advisory Council, Editor
GitHub photo of Eliot Robson

Eliot Robson

Peer Review Lead, Editor, Emeritus Editor in Chief
UIUC
GitHub photo of Romain Caneill

Romain Caneill

Editor
Institut des Géosciences de l'Environnement
GitHub photo of Lauren Yee

Lauren Yee

Editor, Editor in Chief
GitHub photo of David Nicholson

David Nicholson

Emeritus Editor in Chief, Editor
GitHub photo of Tom Russell

Tom Russell

Editor
University of Oxford
GitHub photo of C. Titus Brown

C. Titus Brown

Editor
University of California, Davis
GitHub photo of Tetsuo Koyama

Tetsuo Koyama

@ark-info-sys
GitHub photo of Avik Basu

Avik Basu

Editor
Intuit
GitHub photo of Jonas Eschle

Jonas Eschle

Editor
CERN

Emeritus & guest editors

We are deeply grateful for those served on our editorial board previously!

GitHub photo of Ivan Ogasawara

Ivan Ogasawara

Advisory Council, Emeritus editor
xmnlab
GitHub photo of Chiara Marmo

Chiara Marmo

Emeritus Editor in Chief, Emeritus Editor, Peer review triage
GitHub photo of Luiz Irber

Luiz Irber

Emeritus editor
GitHub photo of Ben Cook

Ben Cook

Guest editor
GitHub photo of Leah Wasser

Leah Wasser

Executive Director & Founder, Emeritus editor
pyOpenSci
GitHub photo of Alex Batisse

Alex Batisse

Emeritus Editor in Chief, EmeritusEditor
GitHub photo of Jonny Saunders

Jonny Saunders

Emeritus Editor
GitHub photo of Meenal Jhajharia

Meenal Jhajharia

Emeritus Editor
\varnothing
GitHub photo of Isabel Zimmerman

Isabel Zimmerman

Emeritus Editor in Chief, Emeritus Editor
@rstudio
GitHub photo of Nima Sarajpoor

Nima Sarajpoor

Emeritus Editor
GitHub photo of Ariane Sasso

Ariane Sasso

Emeritus Editor
@hpi-dhc
GitHub photo of Jenny Palomino

Jenny Palomino

Emeritus Editor
Google
GitHub photo of Anita Graser

Anita Graser

Emeritus Editor

Landing-page shortcodes (reference only)

These shortcodes are used on specific splash pages and require matching front matter or site data. They are listed here for completeness; see CONTRIBUTING.md for layout details.

ShortcodeTypical pageNotes
home-programs-fullHomeWraps impact-cards with section heading
partnership-cardsPartnersReads partnership_cards from front matter
partnership_tableWays to giveStyled sponsorship tier comparison table
university-testimonialsLearn — universitiesTestimonial carousel
university-benefits-listLearn — universitiesBenefits list partial
packaging-guide-gridPython packaging resourcesStatic guide links grid
tutorial-gridPython packaging resourcesTutorial cards grid

Section heading

The section-heading shortcode renders a large centred heading with an optional subtitle. Useful at the top of long posts to establish visual hierarchy.

Usage:

{{< section-heading
  title="Section title"
  subtitle="Optional subtitle • With separators"
>}}

Rendered:

Section heading example

Optional subtitle text • Can use • separators

Metrics bar

The metrics-bar shortcode renders a row of key statistics with large numbers. Use it to highlight impact data.

Usage:

{{< metrics-bar
  stat1="**128** blog posts"
  stat2="**500+** community members"
  stat3="**100+** reviewed packages"
  stat4="**WCAG AA** accessible"
>}}

Rendered:

128 blog posts migrated
500+ community members
100+ reviewed packages
WCAG AA accessible

Cards

Three card shortcodes are available for structured content blocks.

Two-card row

Usage:

{{< two-card-row >}}
{{< card title="Card one" icon="fa-solid fa-star" >}}
Content for the first card with **Markdown** support.
{{< /card >}}
{{< card title="Card two" icon="fa-solid fa-bolt" >}}
Content for the second card.
{{< /card >}}
{{< /two-card-row >}}

Rendered:

Peer review

pyOpenSci runs an open, community-driven peer review process for scientific Python packages. Packages that pass review are listed in our ecosystem.

Packaging guidance

Our Python Packaging Guide covers everything from creating your first package to publishing on PyPI — with tutorials written for scientists.

Single card wide

Usage:

{{< single-card-wide title="Wide card" icon="fa-solid fa-users" >}}
Full-width card content here.
{{< /single-card-wide >}}

Rendered:

Join the pyOpenSci community

pyOpenSci is a diverse, welcoming community of scientists, developers, and open source enthusiasts. Whether you want to submit a package for review, volunteer as a reviewer, or contribute to our guides — **there is a place for you here**.

Standard Markdown elements

These are not shortcodes — they are standard Markdown rendered by Hugo. Include them here so a full blog post render covers all common content types.

Code blocks

Inline: python3 -m pip install pyopensci

Fenced block with syntax highlighting:

import pyopensci

# Submit a package for review
package = pyopensci.Package(
    name="mypackage",
    version="1.0.0",
    github_url="https://github.com/example/mypackage",
)
package.submit()
hugo serve --buildDrafts --disableFastRender

Blockquotes

See Blockquotes above for full examples. Quick render check:

> Good research software is built for the people who use it.

Good research software is built for the people who use it.

Tables

Default Markdown tables render with basic styling. For sponsorship tier tables (and similar comparison layouts), use the partnership_table shortcode so the table matches the live site: light purple header row, horizontal row dividers, and bold purple tier names in the first column.

{{< partnership_table >}}
| Tier | Example focus | Example visibility & benefits |
| --- | --- | --- |
| **Ecosystem catalyst** | Companies ready to lead in supporting open source research software | Premier placement across channels; tailored activations such as mentored sprints and dedicated office hours |
| **Momentum driver** | Teams growing their scientific Python footprint | Sustained visibility on the website and in mailings; alignment with webinars and community programs |
| **Foundation builder** | Organizations beginning to invest in open science education | Recognition alongside training materials; support for scholarships and learner access |
{{< /partnership_table >}}

Rendered:

TierExample focusExample visibility & benefits
Ecosystem catalystCompanies ready to lead in supporting open source research softwarePremier placement across channels; tailored activations such as mentored sprints and dedicated office hours
Momentum driverTeams growing their scientific Python footprintSustained visibility on the website and in mailings; alignment with webinars and community programs
Foundation builderOrganizations beginning to invest in open science educationRecognition alongside training materials; support for scholarships and learner access

Plain table (no wrapper):

Column AColumn BColumn C
Value 1Value 2Value 3
Value 4Value 5Value 6

Lists

Unordered:

  • First item
  • Second item
    • Nested item
    • Another nested item
  • Third item

Ordered:

  1. Step one
  2. Step two
  3. Step three

Last modified: