Advanced

Migrating from hugo-theme-relearn

Compat-alias table, front-matter mapping, and what you gain by switching.

The theme ships drop-in aliases for the most-used relearn shortcodes, so most workshop content moves over unchanged. This page is the explicit checklist — what’s compatible, what isn’t, and the new affordances you pick up after the swap.

Drop-in aliases #

These shortcodes exist with relearn-compatible names so your existing markdown keeps working:

Relearn shortcodeThis themeNotes
noticenoticeIdentical API: {{< notice tip "Title" >}}. Full param surface — style, title, icon, color, expanded, groupid.
expandexpand{{% expand "Click me" %}} — title is positional or title=
detailsdetailsSame as expand but uses summary= argument name
cards + cardcards + cardSame API. href preferred over url (both accepted)
tabs + tabtabs + tabSupports groupid= for synchronized cross-page tabs
relrefrelrefErrors loudly on missing target — typos won’t silently link to #
siteparamsiteparamAccepts name= or positional
attachmentsattachmentsLists every non-markdown file in a page bundle
resourcesresourcesFilter with pattern=
treetreeRecursive page tree
highlighthighlightWraps Hugo’s built-in highlighter with copy-to-clipboard
mathmathKaTeX, lazy-loaded only when a page uses it
mermaidmermaidRe-renders on light/dark toggle
buttonbuttonhref=, icon=, style=primary|ghost, target=
iconiconInline SVG icon by name
childrenchildrenstyle=cards|list|h2, depth=, sort=

Front-matter mapping #

Most relearn front-matter keys are honored as-is. Differences:

Relearn keyThis themeNotes
weightweightSame — controls ordering everywhere
descriptiondescriptionSame — renders as lead paragraph + meta description
hiddenhiddenSame — excludes from sidebar, search, pager, children listings
chapteruse layout = "chapter"Triggers the gradient weight-number hero
head(not supported)Override layouts/partials/head.html in your own site instead
menuPre / menuPost(not supported)Customise the sidebar via your own layouts/partials/sidebar.html
disableTocshowToc = false (theme param) or nopager = true (page-level pager only)TOC is a theme-wide param; pager can be suppressed per page

For full front-matter coverage on this theme see Authoring › Front matter .

What changes visually #

What you gain #

The reason to switch — beyond what relearn already does — is the workshop-pedagogy shortcode layer:

Plus the hero gradient bloom, the JSON-indexed fuzzy search, keyboard navigation between pages ( / ), and a presenter mode designed around live workshops rather than self-paced docs.

Migration steps #

  1. Vendor or pin the theme. See Getting started › Install for Hugo Modules, submodule, and direct-download options.
  2. Swap the theme = value in your site’s hugo.toml.
  3. Run the dev server. hugo server should build without errors. Any failures are usually one of:
    • A relref to a renamed page → fix the path (the new theme errors instead of silently linking to #)
    • A heading anchor that no longer exists → update the link
    • A custom partial you’d overridden → reapply against the new partial
  4. Rebrand. Copy the [params] block from this theme’s hugo.toml and adjust colors/fonts/logos. The five Splunk colors (colorAccent etc.) and the four fonts (fontDisplay, fontBody, fontMono, fontUrl) cover most needs.
  5. Adopt the workshop shortcodes incrementally. There’s no rush — relearn-compat keeps your old content working while you migrate page-by-page to step, exercise, checkpoint, etc.

Things that don’t transfer #

If any of these are dealbreakers, open an issue — most are tractable.

Last Modified ·