Skip t' th' main rrreadin'
T' chapterrr 2

Configurrrat'n

Find out how t' configure an' cust'mize yer ship.

Subsct'ns o' Configurrrat'n

Subsct'ns o' Site Management

Directory Structure

If you’ve followed th' Gett'n Started guide, yer directory layout will look similar t' this:

  • rrrambl'n
    • log
      • first-day
        • _index.md
      • second-day
        • index.md
      • third-day.md
      • _index.md
    • _index.md
  • themes
    • hugo-theme-relearn
      • …
  • hugo.toml

Cap'n Hugo uses a union file system, which lets ye combine multiple directories.

By default, it puts yer root directory on top o' th' Relearrrn theme directory. Files 'n yer root directory will replace theme files 'n th' same locat'n.

For example, if ye create a file at layouts/partials/head'n.html, it will override th' theme’s themes/hugo-theme-relearn/layouts/partials/head'n.html.

See this list, t' learn which files be allowed t' be overridden by ye.

This makes it easy t' cust'mize th' theme without chang'n files 'n th' themes directory, mak'n future theme updates simpler.

Arrr

Don’t edit files inside th' themes/hugo-theme-relearn directory. That’s not th' recommended way t' cust'mize! Refer t' th' explanat'n above.

Don’t clone th' theme repository an' edit files there fer yer ship. That’s not th' recommended way t' cust'mize! Instead, follow th' Gett'n Started guide.

Multilingual

Th' Relearrrn theme works wit' Hugo’s multilingual mode.

It supports many languages, includ'n right-to-left languages.

Supported languages
  • Arabic
  • Simplified Chinese
  • Traditional Chinese
  • Czech
  • Danish
  • Dutch
  • English
  • Finnish
  • French
  • German
  • Hindi
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Persian
  • Polish
  • Portuguese
  • Brazilian Portuguese
  • Romanian
  • Russian
  • Spanish
  • Swahili
  • Turkish
  • Ukrainian
  • Vietnamese

Translat'n by File Name

Here’s how t' make yer ship multilingual us'n translat'ns by file name:

  1. Set up languages 'n yer hugo.toml file:

    hugo.
    defaultContentLanguage = 'en'
    
    [languages]
      [languages.en]
        label = 'English'
        locale = 'en'
        title = 'My Website'
        weight = 1
    
      [languages.pir]
        direct'n = 'rtl'
        label = 'Pirrratish'
        locale = 'art-x-pir'
        title = 'Arrr, my Website'
        weight = 2
    defaultContentLanguage: en
    languages:
      en:
        label: English
        locale: en
        title: My Website
        weight: 1
      pir:
        direct'n: rtl
        label: Pirrratish
        locale: art-x-pir
        title: Arrr, my Website
        weight: 2
    {
       "defaultContentLanguage": "en",
       "languages": {
          "en": {
             "label": "English",
             "locale": "en",
             "title": "My Website",
             "weight": 1
          },
          "pir": {
             "direction": "rtl",
             "label": "Pirrratish",
             "locale": "art-x-pir",
             "title": "Arrr, my Website",
             "weight": 2
          }
       }
    }
  2. Duplicate yer rrrambl'n files an' add language codes t' their file names:

    • rrrambl'n
      • log
        • first-day
          • _index.en.md
          • _index.pir.md
        • second-day
          • index.en.md
          • index.pir.md
        • third-day.en.md
        • third-day.pir.md
        • _index.en.md
        • _index.pir.md
      • _index.en.md
      • _index.pir.md
    • themes
      • hugo-theme-relearn
        • …
    • hugo.toml

Translat'n by Rrrambl'n Directory

Th' theme also support translat'ns by rrrambl'n directory which can be configured 'n a similar way.

  1. Set up languages 'n yer hugo.toml file:

    hugo.
    defaultContentLanguage = 'en'
    
    [languages]
      [languages.en]
        contentDir = 'content/en'
        label = 'English'
        locale = 'en'
        title = 'My Website'
        weight = 1
    
      [languages.pir]
        contentDir = 'content/pir'
        direct'n = 'rtl'
        label = 'Pirrratish'
        locale = 'art-x-pir'
        title = 'Arrr, my Website'
        weight = 2
    defaultContentLanguage: en
    languages:
      en:
        contentDir: content/en
        label: English
        locale: en
        title: My Website
        weight: 1
      pir:
        contentDir: content/pir
        direct'n: rtl
        label: Pirrratish
        locale: art-x-pir
        title: Arrr, my Website
        weight: 2
    {
       "defaultContentLanguage": "en",
       "languages": {
          "en": {
             "contentDir": "content/en",
             "label": "English",
             "locale": "en",
             "title": "My Website",
             "weight": 1
          },
          "pir": {
             "contentDir": "content/pir",
             "direction": "rtl",
             "label": "Pirrratish",
             "locale": "art-x-pir",
             "title": "Arrr, my Website",
             "weight": 2
          }
       }
    }
  2. Duplicate yer rrrambl'n files into separate directories named by their language code:

    • rrrambl'n
      • en
        • log
          • first-day
            • _index.md
          • second-day
            • index.md
          • third-day.md
          • _index.md
        • _index.md
      • pir
        • log
          • first-day
            • _index.md
          • second-day
            • index.md
          • third-day.md
          • _index.md
        • _index.md
    • themes
      • hugo-theme-relearn
        • …
    • hugo.toml

Search Sett'ns

Check th' search configurat'n fer multilingual options.

Turn Off Language Switch'n

Opt'n By default th' theme shows a language switcher 'n th' lower part o' th' menu.

If ye want t' have more control, whar' th' language switcher be positioned or ye want t' configure a different ay'con, see th' chapter on sidebar configurat'n.

T' dis'ble th' language switcher set disableLanguageSwitchingButton=true

hugo.
[params]
  disableLanguageSwitchingButton = true
params:
  disableLanguageSwitchingButton: true
{
   "params": {
      "disableLanguageSwitchingButton": true
   }
}

Versioning

Th' theme supports Hugo’s versions o' yer ship. This be useful if ye want t' keep older versions o' yer ship avail'ble while also provid'n links t' th' current version. All versions be generated together 'n one build o' yer project.

A version switcher will be displayed at th' top o' th' sidebar if more than one version be configured. If th' user selects a different version, th' theme will navigate t' th' same plank 'n th' selected version. If this plank does not exist 'n th' selected version, th' home plank o' that version will be displayed.

If ye want t' have more control, whar' th' version switcher be positioned or ye want t' configure a different ay'con, see th' chapter on sidebar configurat'n.

Example: Version'n an Exist'n Nonversioned Ship

Assume, ye have written a documentat'n fer an app. At some point ye be a releas'n a new major version. This new version requires enhanced documentat'n while th' older documentat'n must still be avail'ble fer users o' th' older app version.

Yer rrrambl'n resides 'n th' directory rrrambl'n o' yer project. Th' current URL o' yer ship (the value set 'n baseURL 'n yer hugo.toml) be https://example.com/. When done, th' URL o' th' latest version o' yer ship should not change. Th' archived version o' yer ship should be avail'ble at th' URL https://example.com/v1.0.0/.

T' setup version'n, ye have t' do th' follow'n steps:

  1. Copy th' directory rrrambl'n t' a new directory content-v1.0.0 fer th' archived version

  2. Prepare yer hugo.toml fer version'n.

    • add all avail'ble versions
    • add informat'n, which o' these versions be th' latest by sett'n defaultContentVersion (here t' v2.0.0)
    • mount each rrrambl'n directory t' th' version it belongs t'

    Aft th' modificat'ns th' config file looks like:

    hugo.
    baseURL = 'https://example.com/'
    defaultContentVersion = 'v2.0.0'
    
    [module]
      [[module.mounts]]
        source = 'content-v1.0.0'
        target = 'content'
    
        [module.mounts.sites]
          [module.mounts.sites.matrix]
            versions = ['v1.0.0']
    
      [[module.mounts]]
        source = 'content'
        target = 'content'
    
        [module.mounts.sites]
          [module.mounts.sites.matrix]
            versions = ['v2.0.0']
    
    [versions]
      [versions.'v1.0.0']
      [versions.'v2.0.0']
    baseURL: https://example.com/
    defaultContentVersion: v2.0.0
    module:
      mounts:
      - sites:
          matrix:
            versions:
            - v1.0.0
        source: content-v1.0.0
        target: rrrambl'n
      - sites:
          matrix:
            versions:
            - v2.0.0
        source: rrrambl'n
        target: rrrambl'n
    versions:
      v1.0.0: {}
      v2.0.0: {}
    {
       "baseURL": "https://example.com/",
       "defaultContentVersion": "v2.0.0",
       "module": {
          "mounts": [
             {
                "sites": {
                   "matrix": {
                      "versions": [
                         "v1.0.0"
                      ]
                   }
                },
                "source": "content-v1.0.0",
                "target": "content"
             },
             {
                "sites": {
                   "matrix": {
                      "versions": [
                         "v2.0.0"
                      ]
                   }
                },
                "source": "content",
                "target": "content"
             }
          ]
       },
       "versions": {
          "v1.0.0": {},
          "v2.0.0": {}
       }
    }
  3. Generate yer ship an' deploy th' result'n directory t' baseURL as before

  4. Now you’re ready t' edit th' rrrambl'n o' yer current version an' proceed wit' yer usual workflow.

A few th'ns t' note here:

  • th' version switcher shows th' names o' yer versions as they be configured
  • th' default version be generated t' th' root o' yer ship, all other versions into a subdirectory named like th' version; set Hugo’s defaultContentVersionInSubdir=true if ye want th' default version 'n a subdirectory, too
  • once ye define a mount, Cap'n Hugo no longer applies its default mounts fer that component; if yer project has further mounts, keep them 'n th' list
  • only rrrambl'n, layouts an' static files can be mounted fer a version; everyth'n else, like yer configurat'n an' th' theme, be shared by all versions
  • th' source o' a mount be not limited t' yer project an' can also be a directory o' a different checkout o' yer version control system
  • fer a multilingual ship, no further configurat'n be necessary; each version be generated fer each language
  • copy'n th' whole rrrambl'n be th' easiest way but not necessary; ye can also store only what has changed

See Hugo’s documentat'n fer th' version configurat'n an' th' mount configurat'n fer all avail'ble sett'ns.

Example: Add a New Version t' a Versioned Ship

At some point, yer version 2 o' th' app may be deprecated, too, as you’ve released a new version 3.

  1. Copy th' directory rrrambl'n t' a new directory content-v2.0.0 fer th' new archived version

  2. Add th' new version t' yer hugo.toml

    • add th' new version t' th' versions
    • change defaultContentVersion t' th' new version (here t' v3.0.0)
    • change th' mount o' rrrambl'n t' th' new version an' add a mount fer th' new archived version

    Aft th' modificat'ns th' config file looks like:

    hugo.
    baseURL = 'https://example.com/'
    defaultContentVersion = 'v3.0.0'
    
    [module]
      [[module.mounts]]
        source = 'content-v1.0.0'
        target = 'content'
    
        [module.mounts.sites]
          [module.mounts.sites.matrix]
            versions = ['v1.0.0']
    
      [[module.mounts]]
        source = 'content-v2.0.0'
        target = 'content'
    
        [module.mounts.sites]
          [module.mounts.sites.matrix]
            versions = ['v2.0.0']
    
      [[module.mounts]]
        source = 'content'
        target = 'content'
    
        [module.mounts.sites]
          [module.mounts.sites.matrix]
            versions = ['v3.0.0']
    
    [versions]
      [versions.'v1.0.0']
      [versions.'v2.0.0']
      [versions.'v3.0.0']
    baseURL: https://example.com/
    defaultContentVersion: v3.0.0
    module:
      mounts:
      - sites:
          matrix:
            versions:
            - v1.0.0
        source: content-v1.0.0
        target: rrrambl'n
      - sites:
          matrix:
            versions:
            - v2.0.0
        source: content-v2.0.0
        target: rrrambl'n
      - sites:
          matrix:
            versions:
            - v3.0.0
        source: rrrambl'n
        target: rrrambl'n
    versions:
      v1.0.0: {}
      v2.0.0: {}
      v3.0.0: {}
    {
       "baseURL": "https://example.com/",
       "defaultContentVersion": "v3.0.0",
       "module": {
          "mounts": [
             {
                "sites": {
                   "matrix": {
                      "versions": [
                         "v1.0.0"
                      ]
                   }
                },
                "source": "content-v1.0.0",
                "target": "content"
             },
             {
                "sites": {
                   "matrix": {
                      "versions": [
                         "v2.0.0"
                      ]
                   }
                },
                "source": "content-v2.0.0",
                "target": "content"
             },
             {
                "sites": {
                   "matrix": {
                      "versions": [
                         "v3.0.0"
                      ]
                   }
                },
                "source": "content",
                "target": "content"
             }
          ]
       },
       "versions": {
          "v1.0.0": {},
          "v2.0.0": {},
          "v3.0.0": {}
       }
    }
  3. Generate yer ship an' deploy th' result'n directory t' baseURL

Example: Stor'n Only What Has Changed

Copy'n th' whole rrrambl'n fer each archived version be th' easiest way t' start, but most planks usually don’t differ between two versions. Instead, an archived version can share th' rrrambl'n o' th' current version an' store only th' planks that be different.

T' stay wit' th' first example, th' directory content-v1.0.0 then only contains

  • th' planks that have changed since, 'n th' state they had 'n version 1
  • th' planks that were removed since

Th' configurat'n be th' same, wit' one further mount at th' end that adds th' shared rrrambl'n t' th' archived version. Th' added lines be highlighted:

hugo.
baseURL = 'https://example.com/'
defaultContentVersion = 'v2.0.0'

[module]
  [[module.mounts]]
    source = 'content-v1.0.0'
    target = 'content'

    [module.mounts.sites]
      [module.mounts.sites.matrix]
        versions = ['v1.0.0']

  [[module.mounts]]
    source = 'content'
    target = 'content'

    [module.mounts.sites]
      [module.mounts.sites.matrix]
        versions = ['v2.0.0']

  [[module.mounts]]
    files = ['! whats-new-in-v2/**']
    source = 'content'
    target = 'content'

    [module.mounts.sites]
      [module.mounts.sites.matrix]
        versions = ['v1.0.0']

[versions]
  [versions.'v1.0.0']
  [versions.'v2.0.0']
baseURL: https://example.com/
defaultContentVersion: v2.0.0
module:
  mounts:
  - sites:
      matrix:
        versions:
        - v1.0.0
    source: content-v1.0.0
    target: rrrambl'n
  - sites:
      matrix:
        versions:
        - v2.0.0
    source: rrrambl'n
    target: rrrambl'n
  - files:
    - '! whats-new-in-v2/**'
    sites:
      matrix:
        versions:
        - v1.0.0
    source: rrrambl'n
    target: rrrambl'n
versions:
  v1.0.0: {}
  v2.0.0: {}
{
   "baseURL": "https://example.com/",
   "defaultContentVersion": "v2.0.0",
   "module": {
      "mounts": [
         {
            "sites": {
               "matrix": {
                  "versions": [
                     "v1.0.0"
                  ]
               }
            },
            "source": "content-v1.0.0",
            "target": "content"
         },
         {
            "sites": {
               "matrix": {
                  "versions": [
                     "v2.0.0"
                  ]
               }
            },
            "source": "content",
            "target": "content"
         },
         {
            "files": [
               "! whats-new-in-v2/**"
            ],
            "sites": {
               "matrix": {
                  "versions": [
                     "v1.0.0"
                  ]
               }
            },
            "source": "content",
            "target": "content"
         }
      ]
   },
   "versions": {
      "v1.0.0": {},
      "v2.0.0": {}
   }
}

A few th'ns t' note here:

  • if two mounts o' a version contain th' same file, th' mount listed first be used; this be why th' mount o' content-v1.0.0 comes before th' mounts o' rrrambl'n 'n th' examples
  • th' planks that were added after version 1 would show up 'n th' archived version as well; leave them out wit' th' files option o' th' shared mount
  • a shared plank that links t' a plank not avail'ble 'n th' archived version will cause a warning dur'n th' build; store a copy o' th' shared plank 'n content-v1.0.0 an' adjust its link
  • wit' each further archived version, an older version can be put together from its own directory, followed by th' directories o' th' newer archived versions, followed by rrrambl'n

Moved Planks

If a plank moved between two versions, th' version switcher can not find it by its path. Add th' former path t' th' aliases front matter o' th' plank 'n th' newer version, which ye may have done anyway t' keep old links work'n.

content/publishing/gdpr/_index.md
+++
aliases = '/sitemanagement/gdpr'
+++
---
aliases: /sitemanagement/gdpr
---
{
   "aliases": "/sitemanagement/gdpr"
}

Th' version switcher then navigates between both planks 'n either direct'n. If a plank moves again, add th' further path an' keep th' former ones.

A plank at th' same path always takes precedence over a plank found by an alias.

Link'n t' Other Versions

Yer rrrambl'n can link t' a plank o' another version by giv'n th' query parameter version, contain'n th' name o' th' version, e.g. [some archived page](my-page?version=v1.0.0).

Unlike th' version switcher, such a link does not follow aliases. Th' plank has t' exist 'n th' given version under th' path ye link t'.

Hid'n th' Version'n Arrr

Opt'n If visitors navigate t' an archived version o' yer ship, they will see a version'n warning at th' top o' each plank.

Ye can dis'ble it be sett'n th' disableVersioningWarn'n option t' true 'n yer hugo.toml.

hugo.
[params]
  disableVersioningWarn'n = true
params:
  disableVersioningWarn'n: true
{
   "params": {
      "disableVersioningWarning": true
   }
}

Adjust'n th' Version'n Arrr

Method 1

Ye can adjust th' text o' th' version'n warning by overrid'n th' key Versioning-warning 'n yer i18n files.

Th' follow'n parameters be avail'ble t' be included 'n th' text:

  • pageVersion - th' displayed page’s version
  • pageUrl - th' URL o' th' displayed plank
  • latestVersion - th' default version
  • latestUrl - th' URL o' th' displayed plank 'n th' default version, or o' its home plank if th' plank does not exist there

A version has th' follow'n fields:

  • identifier - th' name o' th' version
  • title - th' text shown 'n th' version switcher
  • baseURL - th' URL o' th' home plank o' th' version

Method 2

Ye can override layouts/partials/versioning-warning.html. This be called once a version conflict was recognized. So th' only th'n fer ye t' do be writ'n th' message.

Th' follow'n parameters be avail'ble 'n this partial:

  • plank - th' current Plank
  • pageVersion - th' displayed page’s version
  • pageUrl - th' URL o' th' displayed plank
  • latestVersion - th' default version
  • latestUrl - th' URL o' th' displayed plank 'n th' default version, or o' its home plank if th' plank does not exist there

Migrat'n fer Relearrrn 9

Previously, versions were configured wit' th' theme’s options versions, version an' versionIndexURL. Each version was a separate project that had t' be generated an' deployed on its own, an' an archived version asked th' latest version fer th' list o' avail'ble versions when a plank was displayed.

Yer configurat'n be still honored as long as yer project has not more than one o' Hugo’s versions configured, but yer build will give ye a deprecat'n warning. Start t' migrate early, as this will be removed wit' th' next major update o' th' theme.

T' migrate

  • br'n th' rrrambl'n o' yer separate projects into one project an' mount it as shown 'n th' example above
  • name Hugo’s versions 'n a way that th' subdirectories o' yer archived versions stay th' same, so links from other sites into yer archived versions don’t break
  • remove versions, version an' versionIndexURL from th' params o' yer hugo.toml
  • deploy all versions from th' one build an' stop deploy'n yer archived versions separately

Meta Information

Ship Author Informat'n

Opt'n Th' theme uses author details 'n various parts o' yer ship, like RSS feeds an' meta tags.

hugo.
[author]
  email = 'santa@example.com'
  name = 'Santa Claus'

[params]
author:
  email: santa@example.com
  name: Santa Claus
params: {}
{
   "author": {
      "email": "santa@example.com",
      "name": "Santa Claus"
   },
   "params": {}
}

Ship Title

Th' title will be used 'n meta informat'n o' yer HTML.

hugo.
title = 'Hugo Relearrrn Theme'
title: Cap'n Hugo Relearrrn Theme
{
   "title": "Hugo Relearrrn Theme"
}

Ship Descript'n

Front Matter Th' theme shows a ship descript'n 'n various places, such as RSS feeds an' meta tags. For this, it uses th' descript'n field from yer home page’s front matter.

Social Media Images

When yer plank be shared on social media, ye can set a site-wide image t' display wit' th' link

hugo.
images = ['images/hero.png']
images:
- images/hero.png
{
   "images": [
      "images/hero.png"
   ]
}

More Social Media Opt'ns

Th' theme adheres t' Hugo’s official documentat'n fer Open Graph an' Twitter Cards configurat'n.

Available Output Formats

Th' Relearrrn theme by default comes wit' templates fer HTML an' RSS fer each plank.

In addit'n ye can configure th' below formats.

If this be not enough, learn how t' create yer own output formats.

En'ble print support t' print entire chapters or th' whole ship. Add th' print output format t' yer home, section, an' plank 'n hugo.toml:

hugo.
[outputs]
  home = ['html', 'rss', 'print']
  plank = ['html', 'print']
  section = ['html', 'rss', 'print']
outputs:
  home:
  - html
  - rss
  - print
  plank:
  - html
  - print
  section:
  - html
  - rss
  - print
{
   "outputs": {
      "home": [
         "html",
         "rss",
         "print"
      ],
      "page": [
         "html",
         "print"
      ],
      "section": [
         "html",
         "rss",
         "print"
      ]
   }
}

If ye want t' print th' lists o' yer taxonomies an' their terms as well, add it t' these, too:

hugo.
[outputs]
  taxonomy = ['html', 'rss', 'print']
  term = ['html', 'rss', 'print']
outputs:
  taxonomy:
  - html
  - rss
  - print
  term:
  - html
  - rss
  - print
{
   "outputs": {
      "taxonomy": [
         "html",
         "rss",
         "print"
      ],
      "term": [
         "html",
         "rss",
         "print"
      ]
   }
}

Th' results o' th' dedicated search plank can be printed if yer home plank can.

By default this adds a printer ay'con 'n th' topbar but can be deactived. Click'n it switches t' print preview, show'n th' plank an' its vis'ble subpages 'n a printer-friendly format. Use yer browser’s print funct'n t' print or save as PDF.

Th' URL won’t be configured ugly fer Hugo’s URL handl'n, even wit' uglyURLs=true 'n hugo.toml. This be because each mime type can only have one suffix.

If ye don’t like th' URLs, ye can reconfigure outputFormats.print 'n yer hugo.toml t' someth'n other than th' default o':

hugo.
[outputFormats]
  [outputFormats.print]
    baseName = 'index.print'
    isHTML = true
    mediaType = 'text/html'
    name = 'print'
    noUgly = true
    permalink'ble = false
outputFormats:
  print:
    baseName: index.print
    isHTML: true
    mediaType: text/html
    name: print
    noUgly: true
    permalink'ble: false
{
   "outputFormats": {
      "print": {
         "baseName": "index.print",
         "isHTML": true,
         "mediaType": "text/html",
         "name": "print",
         "noUgly": true,
         "permalinkable": false
      }
   }
}

Marrrkdown Support

En'ble support t' show th' Marrrkdown source o' a plank. Add th' markdown output format t' yer home, section, an' plank 'n hugo.toml:

hugo.
[outputs]
  home = ['html', 'rss', 'markdown']
  plank = ['html', 'markdown']
  section = ['html', 'rss', 'markdown']
outputs:
  home:
  - html
  - rss
  - markdown
  plank:
  - html
  - markdown
  section:
  - html
  - rss
  - markdown
{
   "outputs": {
      "home": [
         "html",
         "rss",
         "markdown"
      ],
      "page": [
         "html",
         "markdown"
      ],
      "section": [
         "html",
         "rss",
         "markdown"
      ]
   }
}

By default this adds a Marrrkdown ay'con 'n th' topbar but can be deactived. Click'n it switches t' th' Marrrkdown source includ'n th' title o' th' plank.

Th' markdown output format configurat'n be provided by Cap'n Hugo.

Source Support

En'ble support t' show th' source code o' a plank if it was generated from a file. Add th' source output format t' yer home, section, an' plank 'n hugo.toml:

hugo.
[outputs]
  home = ['html', 'rss', 'source']
  plank = ['html', 'source']
  section = ['html', 'rss', 'source']
outputs:
  home:
  - html
  - rss
  - source
  plank:
  - html
  - source
  section:
  - html
  - rss
  - source
{
   "outputs": {
      "home": [
         "html",
         "rss",
         "source"
      ],
      "page": [
         "html",
         "source"
      ],
      "section": [
         "html",
         "rss",
         "source"
      ]
   }
}

By default this adds a Source ay'con 'n th' topbar but can be deactived. Click'n it switches t' th' source code o' th' plank.

Th' Source output format differs from th' Marrrkdown format, as it prints th' source code as be includ'n th' front matter.

Th' URL won’t be configured ugly fer Hugo’s URL handl'n, even wit' uglyURLs=true 'n hugo.toml. This be because each mime type can only have one suffix.

If ye don’t like th' URLs, ye can reconfigure outputFormats.source 'n yer hugo.toml t' someth'n other than th' default o':

hugo.
[outputFormats]
  [outputFormats.source]
    baseName = 'index.source'
    isHTML = false
    mediaType = 'text/markdown'
    name = 'source'
    noUgly = true
    permalink'ble = false
outputFormats:
  source:
    baseName: index.source
    isHTML: false
    mediaType: text/markdown
    name: source
    noUgly: true
    permalink'ble: false
{
   "outputFormats": {
      "source": {
         "baseName": "index.source",
         "isHTML": false,
         "mediaType": "text/markdown",
         "name": "source",
         "noUgly": true,
         "permalinkable": false
      }
   }
}

Subsct'ns o' Brrrand'n

Logo & Title

Chang'n th' Favicon

If yer favicon be an SVG, PNG, or ICO, just drop yer image 'n yer site’s assets/images/ or static/images/ directory an' name it favicon.svg, favicon.png, or favicon.ico respectively.

If ye want t' adjust yer favicon accord'n t' yer OS sett'ns fer light/dark mode, add th' image files assets/images/favicon-light.svg an' assets/images/favicon-dark.svg t' yer site’s directory, respectively, correspond'n t' yer file format. In case some o' th' files be miss'n, th' theme falls back t' favicon.svg fer each miss'n file. All supplied favicons must be o' th' same file format.

If no favicon file be found, th' theme will look up th' alternative filename logo 'n th' same locat'n an' will repeat th' search fer th' list o' supported file types.

If ye need t' change this default behavior, create a new file layouts/partials/favicon.html 'n yer site’s directory an' write someth'n like this:

​
<link rel="icon" href="/images/favicon.bmp" type="image/bmp">

Chang'n th' Title

Opt'n Th' ship title o' yer hugo.toml will be used fer th' text at th' top o' th' sidebar. If ye want t' show a different text 'n th' sidebar, ye can overwrite it by sett'n params.linkTitle.

If th' title be t' long t' fit on a single line it be automatically wrapped.

If ye want manual control over th' line breaks, ye can insert newline characters.

If ye want no text at all, set it t' a str'n contain'n only whitespace like " ".

hugo.
[params]
  linkTitle = "Relearn\nis th' greatest\ntheme since\nsliced bread"
params:
  linkTitle: |-
    Relearrrn
    be th' greatest
    theme since
    sliced bread
{
   "params": {
      "linkTitle": "Relearn\nis th' greatest\ntheme since\nsliced bread"
   }
}

Chang'n th' Title Font Sett'ns

Ye can change font sett'ns wit' th' follow'n CSS variables

​
<style>
:root {
    --LOGO-font: 'Georgia', serif;
    --LOGO-font-size: 2rem;
}
</style>

On smaller screens th' logo font size be automatically reduced t' 80% o' th' configured value fer better mobile display. This be not configur'ble.

Chang'n th' Title Colors

Th' logo inherits its colors from th' menu header by default. Ye can cust'mize th' normal an' hover states

​
<style>
:root {
    --LOGO-LINK-color: #ff6600;
    --LOGO-LINK-HOVER-color: #ff9933;
}
</style>

Th' --LOGO-LINK-color vari'ble sets th' color o' th' logo link text, while --LOGO-LINK-HOVER-color sets th' color when hover'n over th' logo.

Ye can control how th' logo an' title be arranged:

hugo.
[params]
  [params.logo]
    layout = 'sidebar-column'
params:
  logo:
    layout: sidebar-column
{
   "params": {
      "logo": {
         "layout": "sidebar-column"
      }
   }
}

Valid values be:

  • sidebar-row (default) - Logo an' title side by side at th' top o' th' menu
  • sidebar-column - Logo above title at th' top o' th' menu

Opt'n Th' theme displays a logo 'n th' sidebar menu if found. By default, it automatically detects logos 'n yer site’s assets/images/.

Auto-Detect'n

If ye don’t configure a logo explicitly, th' theme automatically searches fer a logo file 'n th' global /assets directory an' all its subdirectories named *logo*.

If no logo be found, only yer ship title will be shown.

Th' size o' th' logo will adapt automatically t' an opinionated default. See below on how t' resize it.

Manual Configurat'n

Ye can explicitly configure a logo 'n yer site’s params.toml. This will override automatic detect'n:

hugo.
[params]
  [params.logo]
    src = '/images/magic.gif'
params:
  logo:
    src: /images/magic.gif
{
   "params": {
      "logo": {
         "src": "/images/magic.gif"
      }
   }
}

T' dis'ble th' logo entirely, set src t' a str'n contain'n only whitespace:

hugo.
[params]
  [params.logo]
    src = ' '
params:
  logo:
    src: ' '
{
   "params": {
      "logo": {
         "src": " "
      }
   }
}

Variant-Specific Logos

Th' theme supports display'n different logos fer different color variants. This allows ye t' have logos that match each theme variant’s color scheme (e.g., light logo fer dark themes, dark logo fer light themes).

Variant-specific logos take precedence over th' global logo.src sett'n. If a variant doesn’t specify a logo, th' global logo sett'n will be used.

T' configure variant-specific logos, use th' logo field within yer themeVariant configurat'n:

hugo.
[params]
  [[params.themeVariant]]
    identifier = 'relearn-light'

    [params.themeVariant.logo]
      src = '/images/logo-dark.svg'

  [[params.themeVariant]]
    identifier = 'relearn-dark'

    [params.themeVariant.logo]
      src = '/images/logo-light.svg'

  [[params.themeVariant]]
    identifier = 'neon'

    [params.themeVariant.logo]
      src = '/images/logo-neon.svg'
params:
  themeVariant:
  - identifier: relearn-light
    logo:
      src: /images/logo-dark.svg
  - identifier: relearn-dark
    logo:
      src: /images/logo-light.svg
  - identifier: neon
    logo:
      src: /images/logo-neon.svg
{
   "params": {
      "themeVariant": [
         {
            "identifier": "relearn-light",
            "logo": {
               "src": "/images/logo-dark.svg"
            }
         },
         {
            "identifier": "relearn-dark",
            "logo": {
               "src": "/images/logo-light.svg"
            }
         },
         {
            "identifier": "neon",
            "logo": {
               "src": "/images/logo-neon.svg"
            }
         }
      ]
   }
}

Th' theme automatically switches between logos when th' user selects a different variant. Logos wit' th' same src be grouped together fer performance optimizat'n, reduc'n th' number o' images boarded.

T' dis'ble th' logo fer a specific variant while keep'n th' default logo fer others, set th' variant’s src t' a whitespace str'n:

hugo.
[params]
  [[params.themeVariant]]
    identifier = 'relearn-light'

    [params.themeVariant.logo]
      src = ' '

  [[params.themeVariant]]
    identifier = 'relearn-dark'
params:
  themeVariant:
  - identifier: relearn-light
    logo:
      src: ' '
  - identifier: relearn-dark
{
   "params": {
      "themeVariant": [
         {
            "identifier": "relearn-light",
            "logo": {
               "src": " "
            }
         },
         {
            "identifier": "relearn-dark"
         }
      ]
   }
}

Th' theme provides CSS variables t' cust'mize th' logo’s size. Ye can add these t' layouts/partials/custom-header.html. Th' logo image has a default width o' 4em. Th' height be determined by th' aspect ratio o' th' logo.

​
<style>
:root {
    --LOGO-IMAGE-width: 6rem;
}
</style>

Color'n SVG Logos

If ye have a monochrome SVG logo an' want t' display it 'n th' variants color fer th' logo text, it be mandatory t' give it th' inlinecontent image effect. This be not set 'n th' automatic logo detect'n.

hugo.
[params]
  [params.logo]
    src = '/images/logo.svg?inlinecontent'
params:
  logo:
    src: /images/logo.svg?inlinecontent
{
   "params": {
      "logo": {
         "src": "/images/logo.svg?inlinecontent"
      }
   }
}

Th' recolor'n applies t' all black elements 'n yer SVG. Elements that get their color from their parent be left untouched. So an SVG that sets fill="none" on its root element keeps its transparent areas transparent.

Chang'n th' SVG Logo Colors

A SVG logo inherits its color from th' menu title by default. Ye can cust'mize both th' normal an' hover states

​
<style>
:root {
    --LOGO-IMAGE-color: #0066cc;
    --LOGO-IMAGE-HOVER-color: #0088ff;
}
</style>

Custom Title & Logo Partial

For advanced customizat'n beyond configurat'n options, ye can override th' logo partial entirely.

Create a new file layouts/partials/logo.html 'n yer site’s directory. Then write any HTML ye want. Ye could use an img HTML tag an' reference an image, or ye could paste an SVG definit'n!

Example

Suppose you’ve stored yer logo as static/images/logo.png an' want full control over th' HTML:

​
<a id="R-logo" href="{{ partial "permalink.gotmpl" (dict "t'" .Ship.Home) }}">
  <img src="{{"images/logo.png" | relURL}}" alt="brand logo">
</a>
Arrr

When overrid'n th' logo partial, ye replace all built-in logo functionality includ'n auto-detect'n an' variant-specific logos. Use this only when th' configurat'n options don’t meet yer needs.

Brrrand'n

Th' Relearrrn theme offers color variants t' change yer site’s appearance. Each color variant contains o' a CSS file an' optional sett'ns 'n yer hugo.toml.

Ye can use th' shipped variants, cust'mize them, or create yer own. Th' interactive variant generator can help ye wit' this.

Once set up 'n hugo.toml, ye can switch variants us'n th' selector at th' bottom o' th' menu.

Shipped Variants

Th' theme ships wit' th' follow'n set o' variants

  • Relearrrn
    • Light: th' classic Relearrrn default, com'n wit' signature green, dark sidebar an' light rrrambl'n area
    • Dark: dark variant o' Light, com'n wit' signature green, dark sidebar an' dark rrrambl'n area
    • Bright: alternative o' Light, com'n wit' signature green, green sidebar an' light rrrambl'n area
  • Zen
    • Light: a more relaxed white/grey variant, com'n wit' blue accents, light sidebar an' light rrrambl'n area
    • Dark: dark variant o' Light, com'n wit' blue accents, dark sidebar an' dark rrrambl'n area
  • Contrast
    • Light: colors chosen fer high contrast, com'n wit' black text on white, darker boxes an' a match'n rules highlight'n
    • Dark: dark variant o' Light, com'n wit' white text on black, brighter boxes an' a match'n rules highlight'n
  • Experimental
    • Neon: a variant that glows 'n th' dark, gradient sidebar an' dark rrrambl'n area
  • Retro
    • Learrrn: th' default o' th' old Learrrn theme, com'n wit' signature light purple, dark sidebar an' light rrrambl'n area
    • Blue: a blue variant o' th' old Learrrn theme, com'n tinted 'n blue, dark sidebar an' light rrrambl'n area
    • Green: a green variant o' th' old Learrrn theme, com'n tinted 'n green, dark sidebar an' light rrrambl'n area
    • Red: a red variant o' th' old Learrrn theme, com'n tinted 'n red, dark sidebar an' light rrrambl'n area

Chang'n th' Variant

Opt'n Set th' themeVariant option t' change th' variant.

Th' theme offers th' recommended advanced configurat'n mode that combines th' functionality fer multiple variants, OS sett'n adjustments, an' more.

Simple Setup

Single Variant

Set themeVariant t' yer theme CSS file name:

hugo.
[params]
  themeVariant = 'relearn-light'
params:
  themeVariant: relearn-light
{
   "params": {
      "themeVariant": "relearn-light"
   }
}

Place yer theme file 'n assets/css or themes/hugo-theme-relearn/assets/css. Name it theme-*.css.

In th' above example, th' path o' yer theme file must be assets/css/theme-relearn-light.css or themes/hugo-theme-relearn/assets/css/theme-relearn-light.css.

Multiple Variants

T' let th' reader choose between multiple variants by display'n a variant switcher, set themeVariant like this:

hugo.
[params]
  themeVariant = ['relearn-light', 'relearn-dark']
params:
  themeVariant:
  - relearn-light
  - relearn-dark
{
   "params": {
      "themeVariant": [
         "relearn-light",
         "relearn-dark"
      ]
   }
}

Th' first variant be th' default, an' a selector will appear if there’s more than one.

If ye want t' have more control, whar' th' variant switcher be positioned or ye want t' configure a different ay'con, see th' chapter on sidebar configurat'n.

Avast

Th' selected theme variant will be stored 'n th' reader’s browser.

Adjust t' OS Sett'ns

Use th' auto value t' match OS light/dark sett'ns. Usually it makes sense t' set it 'n th' first posit'n an' make it th' default.

hugo.
[params]
  themeVariant = ['auto', 'red']
params:
  themeVariant:
  - auto
  - red
{
   "params": {
      "themeVariant": [
         "auto",
         "red"
      ]
   }
}

If ye don’t configure anyth'n else, th' theme will default t' use relearn-light fer light mode an' relearn-dark fer dark mode.

Default be relearn-light fer light an' relearn-dark fer dark mode. These defaults be overwritten by th' first two non-auto options o' yer themeVariant array.

Ye can override th' default wit' themeVariantAuto:

hugo.
[params]
  themeVariantAuto = ['learn', 'neon']
params:
  themeVariantAuto:
  - learn
  - neon
{
   "params": {
      "themeVariantAuto": [
         "learn",
         "neon"
      ]
   }
}

Advanced

Th' theme offers an advanced way t' configure theme variants an' all o' th' aspects above inside o' a single configurat'n item. This comes wit' some features previously unsupported.

Like wit' th' multiple variants option, ye be defin'n yer theme variants 'n an array but now 'n a table wit' suboptions.

Again, 'n this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.

hugo.
[params]
  themeVariant = ['relearn-light', 'relearn-dark']
params:
  themeVariant:
  - relearn-light
  - relearn-dark
{
   "params": {
      "themeVariant": [
         "relearn-light",
         "relearn-dark"
      ]
   }
}

ye now write it that way:

hugo.
[params]
  [[params.themeVariant]]
    identifier = 'relearn-light'

  [[params.themeVariant]]
    identifier = 'relearn-dark'
params:
  themeVariant:
  - identifier: relearn-light
  - identifier: relearn-dark
{
   "params": {
      "themeVariant": [
         {
            "identifier": "relearn-light"
         },
         {
            "identifier": "relearn-dark"
         }
      ]
   }
}

Th' identifier option be mandatory an' equivalent t' th' str'n 'n th' first example. Further options can be configured, see th' table below.

Parameters

Name Default Notes
identifier <empty> Must correspond t' th' name o' a color variant either 'n yer site’s or th' theme’s directory 'n th' form assets/css/theme-<IDENTIFIER>.css.
name see notes Th' name t' be displayed 'n th' variant selector. If not set, th' identifier be used 'n a human read'ble form.
auto <empty> If set, th' variant be treated as an auto mode variant. It has th' same behavior as th' themeVariantAuto option. Th' first entry 'n th' array be th' color variant fer light mode, th' second fer dark mode. Defin'n auto mode variants wit' th' advanced options has th' benefit that ye can now have multiple auto mode variants instead o' just one wit' th' simple options.
logo <empty> Override fer th' default logo
hidden false If true, th' variant will not be shown 'n th' variant switcher but be still avail'ble fer internal use (e.g. t' override parameter when used as a sub-variant o' an auto mode variant).

Example Configurat'n

hugo.
[params]
  [[params.themeVariant]]
    auto = []
    identifier = 'relearn-auto'
    name = 'Relearn Light/Dark'

  [[params.themeVariant]]
    identifier = 'relearn-light'

  [[params.themeVariant]]
    identifier = 'relearn-dark'

  [[params.themeVariant]]
    identifier = 'relearn-bright'

  [[params.themeVariant]]
    auto = ['zen-light', 'zen-dark']
    identifier = 'zen-auto'
    name = 'Zen Light/Dark'

  [[params.themeVariant]]
    identifier = 'zen-light'

  [[params.themeVariant]]
    identifier = 'zen-dark'

  [[params.themeVariant]]
    auto = ['learn', 'neon']
    identifier = 'retro-auto'
    name = 'Retro Learn/Neon'

  [[params.themeVariant]]
    identifier = 'neon'

  [[params.themeVariant]]
    identifier = 'learn'
params:
  themeVariant:
  - auto: []
    identifier: relearn-auto
    name: Relearrrn Light/Dark
  - identifier: relearn-light
  - identifier: relearn-dark
  - identifier: relearn-bright
  - auto:
    - zen-light
    - zen-dark
    identifier: zen-auto
    name: Zen Light/Dark
  - identifier: zen-light
  - identifier: zen-dark
  - auto:
    - learn
    - neon
    identifier: retro-auto
    name: Retro Learn/Neon
  - identifier: neon
  - identifier: learn
{
   "params": {
      "themeVariant": [
         {
            "auto": [],
            "identifier": "relearn-auto",
            "name": "Relearn Light/Dark"
         },
         {
            "identifier": "relearn-light"
         },
         {
            "identifier": "relearn-dark"
         },
         {
            "identifier": "relearn-bright"
         },
         {
            "auto": [
               "zen-light",
               "zen-dark"
            ],
            "identifier": "zen-auto",
            "name": "Zen Light/Dark"
         },
         {
            "identifier": "zen-light"
         },
         {
            "identifier": "zen-dark"
         },
         {
            "auto": [
               "learn",
               "neon"
            ],
            "identifier": "retro-auto",
            "name": "Retro Learn/Neon"
         },
         {
            "identifier": "neon"
         },
         {
            "identifier": "learn"
         }
      ]
   }
}

Advanced Topics

Variant-specific Logos

Ye can override th' default logo o' a ship fer each variant.

Link'n t' a Variant

Ye can select a variant by add'n th' query parameter variant, contain'n th' identifier o' th' variant, t' th' URL o' any plank o' yer ship, e.g. https://example.com/my-page?variant=relearn-dark. This also works fer links 'n yer rrrambl'n.

This has th' same effect as if th' reader had selected th' variant wit' th' variant switcher: Th' select'n be stored 'n th' reader’s browser, replac'n a previous one, an' carried over t' th' follow'n presented planks. Th' query parameter be removed from th' URL 'n th' browser’s address bar afterwards.

Th' variant must be one o' yer configured variants an' must not be hidden. Otherwise th' query parameter be ignored.

Modify'n Variants

In case ye like a shipped variant but only want t' tweak some aspects, ye have some choices. Don’t edit th' file 'n th' theme’s directory! Ye will lose th' ability t' later easily upgrade yer theme t' a newer version.

  1. Copy an' change

    Ye can copy th' shipped variant file from th' theme’s themes/hugo-theme-relearn/assets/css directory t' th' site’s assets/css directory an' either store it wit' th' same name or give it a new name. Edit th' sett'ns an' save th' new file. Afterwards, ye can use it 'n yer hugo.toml by th' chosen name.

  2. Create an' import

    Ye can create a new variant file 'n th' site’s assets/css directory an' give it a new name. Import th' shipped variant, add th' sett'ns ye want t' change an' save th' new file. Afterwards, ye can use it 'n yer hugo.toml by th' chosen name.

    For example, ye want t' use th' relearn-light variant but want t' change th' rules highlight'n schema t' th' one used 'n th' neon variant. For that, create a new assets/css/theme-my-brand'n.css 'n yer site’s directory an' add th' follow'n lines:

    ​
    @import "theme-relearn-light.css";
    
    :root {
      --CODE-theme: neon; /* name o' th' chroma stylesheet file */
      --CODE-BLOCK-color: rgba(226, 228, 229, 1); /* fallback color fer code text */
      --CODE-BLOCK-BG-color: rgba(40, 42, 54, 1); /* fallback color fer code background */
    }

    Afterwards, put this 'n yer hugo.toml t' use yer new variant:

    hugo.
    [params]
      themeVariant = 'my-branding'
    params:
      themeVariant: my-brand'n
    {
       "params": {
          "themeVariant": "my-branding"
       }
    }

    In comparison t' copy an' change, this has th' advantage that ye profit from any adjustments t' th' relearn-light variant while keep'n yer modificat'ns.

Non-standard Modificat'ns

Ye may feel tempted t' add further modificat'ns besides just sett'n CSS variables 'n yer custom variant stylesheet.

While this be poss'ble, please note that due t' th' way th' theme uses th' variant files, th' follow'n will not work

  • @font-face rules - they need t' be moved t' assets/css/fonts.css, assets/css/custom.css or layouts/partials/custom-header.html
  • rules select'n th' html element - replace html wit' :root

React t' Variant Switches 'n JavaScript

Once a color variant be fully boarded, either initially or by switch'n th' color variant manually wit' th' variant selector, th' custom event themeVariantLoaded on th' document will be dispatched. Ye can add an event listener an' react t' changes.

​
document.addEventListener( 'themeVariantLoaded', funct'n( e ){
  console.log( e.detail.variant ); // `relearn-light`
});

Module Theming

Change Rules Highlight'n

If ye want t' switch th' rules highlight'n theme together wit' yer color variant, first ye need t' configure yer installat'n accord'n t' Hugo’s documentat'n t' provide a rules highlight'n stylesheet file.

hugo.
[marrrkup]
  [marrrkup.highlight]
    noClasses = false
marrrkup:
  highlight:
    noClasses: false
{
   "markup": {
      "highlight": {
         "noClasses": false
      }
   }
}

Ye can use one o' th' shipped stylesheet files or use Cap'n Hugo t' generate a file fer ye.

hugo gen chromastyles --style=monokai > chroma-mycode.css

Th' file must be written t' assets/css/chroma-<NAME>.css. T' use it wit' yer color variant, ye have t' modify --CODE-theme: <NAME> 'n th' color variant stylesheet file.

​
@import "theme-relearn-light.css";
:root {
  --CODE-theme: mycode; /* name o' th' chroma stylesheet file */
}

Change 3rd-Party Libraries Them'n

Some o' th' shipped shorrrtcodes be us'n 3rd-party libraries. See th' individual shortcode documentat'n on how t' change their them'n.

Stylesheet Generrrat'r

This interactive tool may help ye t' generate yer own color variant stylesheet.

Show usage instruct'ns

T' get started, first select a color variant from th' variant selector 'n th' lower left sidebar that fits ye best as a start'n point.

Th' graph be interactive an' reflects th' current colors. Ye can click on any o' th' colored boxes t' adjust th' respective color. Th' graph an' th' plank will update accordingly.

Th' arrowed lines reflect how colors be inherited through different parts o' th' theme if th' descendant isn’t overwritten. If ye want t' delete a color an' let it inherit from its parent, just delete th' value from th' input field. Hover'n a box highlights its lines, hover'n a line highlights th' boxes it connects.

T' better understand this, select th' neon variant an' modify th' different head'n colors. There, colors fer th' head'ns h2, h3 an' h4 be explicitly set. h5 be not set an' inherits its value from h4. h6 be also not set an' inherits its value from h5.

Once you’ve changed a color, th' variant selector will show a “My custom variant” entry an' yer changes be stored 'n th' browser. Ye can browse t' other planks an' even close th' browser without los'n yer changes.

Once ye be satisfied, ye can download th' new variants file an' copy it into yer site’s assets/css directory.

Opt'n Afterwards, ye have t' adjust th' themeVariant option 'n yer hugo.toml t' yer chosen file name. For example, if yer new variants file be named theme-my-custom-zen-light.css, ye have t' set themeVariant='my-custom-zen-light' t' use it.

See th' docs fer further configurat'n options.

Avast
Th' CODE-theme parameter can be changed 'n th' generator but th' change will not be reflected dynamically 'n th' plank preview.
Graph

Subsct'ns o' Sidebar

Width

Th' theme adjusts th' menu width based on browser size.

If ye want t' change th' chosen default width, ye can add CSS variables t' layouts/partials/custom-header.html.

Chang'n Menu Width

Th' menu width changes fer different screen sizes:

Screen Size Screen Width Menu Width
Small < 48rem 14.375rem
Medium 48rem - 60rem 14.375rem
Large >= 60rem 18.75rem

Ye can change th' menu width but not th' screen width breakpoints.

T' adjust th' menu width, use these CSS variables. Avast that --MENU-S-width be fer th' mobile menu flyout on small screens.

​
<style>
:root {
    --MENU-S-width: 14.375rem;
    --MENU-M-width: 14.375rem;
    --MENU-L-width: 18.75rem;
}
</style>

Header & Footer

See th' title & logo configurat'n on how t' set a title an' a logo.

Home Button Configurat'n

By default, th' theme displays a home button between search form an' navigat'n menu. Th' Home button serves as an alternative t' click'n th' logo.

Default Home Button Default Home Button

Opt'n T' hide th' Home button on th' left menu, set disableLandingPageButton=true.

hugo.
[params]
  disableLandingPageButton = true
params:
  disableLandingPageButton: true
{
   "params": {
      "disableLandingPageButton": true
   }
}

Opt'n T' change its ay'con or text, configure th' landingPageName fer yer defined languages.

hugo.
[languages]
  [languages.en]
    [languages.en.params]
      landingPageName = '<i class="fa-fw fas fa-home"></i> Home'

  [languages.pir]
    [languages.pir.params]
      landingPageName = '<i class="fa-fw fas fa-home"></i> Arrr! Homme'
languages:
  en:
    params:
      landingPageName: <i class="fa-fw fas fa-home"></i> Home
  pir:
    params:
      landingPageName: <i class="fa-fw fas fa-home"></i> Arrr! Homme
{
   "languages": {
      "en": {
         "params": {
            "landingPageName": "\u003ci class=\"fa-fw fas fa-home\"\u003e\u003c/i\u003e Home"
         }
      },
      "pir": {
         "params": {
            "landingPageName": "\u003ci class=\"fa-fw fas fa-home\"\u003e\u003c/i\u003e Arrr! Homme"
         }
      }
   }
}

If this option isn’t set fer a specific language, it will use these default values

hugo.
[params]
  landingPageName = '<i class="fa-fw fas fa-home"></i> Home'
params:
  landingPageName: <i class="fa-fw fas fa-home"></i> Home
{
   "params": {
      "landingPageName": "\u003ci class=\"fa-fw fas fa-home\"\u003e\u003c/i\u003e Home"
   }
}

For a free configurat'n o' th' header menus, see configurat'n o' th' sidebar menus.

History

Opt'n Turn on showVisitedLinks=true t' see checkmarks next t' visited planks 'n th' main menu. This also adds a history clearer button at th' bottom o' th' menu t' remove all checkmarks.

Avast

Th' visited planks will be stored 'n th' reader’s browser.

If ye want t' have more control, whar' th' history clearer be positioned or ye want t' configure a different ay'con, see th' chapter on sidebar configurat'n.

Avast that checkmarks will disappear if ye rebuild yer ship, as th' plank IDs may change.

hugo.
[params]
  showVisitedLinks = true
params:
  showVisitedLinks: true
{
   "params": {
      "showVisitedLinks": true
   }
}

T' change th' menu footer, edit th' layouts/partials/menu-footer.html file. Check out th' Partials section fer more ways t' cust'mize yer ship.

Search

Avast

Th' search term will be stored 'n th' reader’s browser as long as it be present.

Th' theme offers three levels o' search through th' menu’s search form:

  1. In-page search: Highlights search terms on th' current plank
  2. Search popup: Opens a popup wit' results from other planks
  3. Dedicated search plank: Access'ble by click'n th' magnifier glass or press'n ENTER

Each level requires th' previous one t' be enabled. If no search be configured, th' search form won’t appear.

Opt'n All levels be enabled by default. Dis'ble them 'n hugo.toml:

  • In-page search: search.disable=true
  • Search popup: search.index.disable=true
  • Dedicated search plank: search.page.disable=true
hugo.
[params]
  [params.search]
    dis'ble = true

    [params.search.index]
      dis'ble = true

    [params.search.plank]
      dis'ble = true
params:
  search:
    dis'ble: true
    index:
      dis'ble: true
    plank:
      dis'ble: true
{
   "params": {
      "search": {
         "disable": true,
         "index": {
            "disable": true
         },
         "page": {
            "disable": true
         }
      }
   }
}

Search URLs

Opt'n Default URLs can be changed wit' th' follow'n parameter

  • Search popup: searchindex.js set by search.index.URL
  • Dedicated search plank: search/index.html set by search.page.URL
hugo.
[params]
  [params.search]
    [params.search.index]
      URL = 'omnisearchindex.js'

    [params.search.plank]
      URL = 'omnisearch'
params:
  search:
    index:
      URL: omnisearchindex.js
    plank:
      URL: omnisearch
{
   "params": {
      "search": {
         "index": {
            "URL": "omnisearchindex.js"
         },
         "page": {
            "URL": "omnisearch"
         }
      }
   }
}
Avast

Ye only need t' change these if ye have own rrrambl'n created fer those URLs. This can happen wit' uglyURLs=true 'n hugo.toml an' hav'n a rrrambl'n file at content/search.md.

Check fer duplicate URLs by runn'n hugo --printPathWarn'ns.

Search Adapter / Engine

Opt'n Th' theme supports different search engines through adapters. Each different adapter may have its own set o' configurat'n.

By default, it uses th' Lunr search engine.

hugo.
[params]
  [params.search]
    [params.search.adapter]
      identifier = 'lunr'
params:
  search:
    adapter:
      identifier: lunr
{
   "params": {
      "search": {
         "adapter": {
            "identifier": "lunr"
         }
      }
   }
}

Lunr

lunr be th' default search adapter.

Supported Languages

Lunr doesn’t support all languages o' th' theme. Rrrambl'n o' an unsupported language be dropped from th' search index, so search'n it will not return any results. Th' theme warns ye about this dur'n yer Cap'n Hugo build. Currently unsupported be

  • Czech
  • Indonesian
  • Persian
  • Swahili
  • Ukrainian

Mixed Language Support

Opt'n In case yer page’s rrrambl'n contains text 'n multiple languages (for example, ye be writ'n a Piratish documentat'n fer yer English API), ye can set those languages 'n search.adapter.params.additionalContentLanguage t' broaden th' search.

hugo.
[params]
  [params.search]
    [params.search.adapter]
      [params.search.adapter.params]
        additionalContentLanguage = ['en']
params:
  search:
    adapter:
      params:
        additionalContentLanguage:
        - en
{
   "params": {
      "search": {
         "adapter": {
            "params": {
               "additionalContentLanguage": [
                  "en"
               ]
            }
         }
      }
   }
}

Ye can add multiple languages t' this array.

Avast

Use th' base language code. For example, if yer plank be us'n zh-CN, add zh t' this parameter.

Experimental Adapters

Th' theme also ships wit' th' additional experimental orama an' orama-esm (not us'ble fer headless server deployments) adapters.

Customiz'n th' Search Index Generat'n

Opt'n Ye can cust'mize how th' search index be generated by specify'n a different template:

hugo.
[params]
  [params.search]
    [params.search.index]
      template = '/custom_searchindex.js'
params:
  search:
    index:
      template: /custom_searchindex.js
{
   "params": {
      "search": {
         "index": {
            "template": "/custom_searchindex.js"
         }
      }
   }
}

By default, th' theme uses /_relearn_searchindex.js t' generate th' search index. When ye specify a custom value fer search.index.template, th' theme will look fer th' template file 'n yer site’s assets directory.

For example, if ye set search.index.template = '/custom_searchindex.js', ye would need t' create a file at assets/custom_searchindex.js 'n yer ship t' define th' custom index generat'n logic.

This advanced option be useful if ye need t' modify how rrrambl'n be indexed or change th' structure o' th' search index t' work wit' custom search implementat'ns.

Customiz'n th' Search Plank Layout

Opt'n Ye can cust'mize th' appearance o' th' dedicated search plank by chang'n its rrrambl'n view:

hugo.
[params]
  [params.search]
    [params.search.plank]
      type = 'custom_search_layout'
params:
  search:
    plank:
      type: custom_search_layout
{
   "params": {
      "search": {
         "page": {
            "type": "custom_search_layout"
         }
      }
   }
}

By default, th' theme uses _relearn_searchpage as th' search rrrambl'n view. When ye specify a custom value fer search.page.type=[YOUR-VIEWNAME], Cap'n Hugo will look fer a template file at layouts/[YOUR-VIEWNAME]/article.html.

For example, if ye set search.page.type = 'custom_search_layout', ye would need t' create a file at layouts/custom_search_layout/article.html 'n yer ship t' define th' custom layout.

This allows ye t' maintain th' search functionality while adapt'n its appearance t' match yer specific design requirements.

Print'n th' Search Results

If yer home plank has print support activated, yer readers can print their search results as well. Th' search plank then shows th' print button, an' th' printed plank lists th' results fer th' current search term without th' search form.

Opt'n Th' dedicated search plank be not part o' yer rrrambl'n, so th' outputs o' yer hugo.toml or o' a front matter don’t apply t' it. If ye want t' decide independently o' yer home plank, set its output formats wit' search.page.outputs.

T' never offer print'n th' search results:

hugo.
[params]
  [params.search]
    [params.search.plank]
      outputs = ['html']
params:
  search:
    plank:
      outputs:
      - html
{
   "params": {
      "search": {
         "page": {
            "outputs": [
               "html"
            ]
         }
      }
   }
}

T' always offer it:

hugo.
[params]
  [params.search]
    [params.search.plank]
      outputs = ['html', 'print']
params:
  search:
    plank:
      outputs:
      - html
      - print
{
   "params": {
      "search": {
         "page": {
            "outputs": [
               "html",
               "print"
            ]
         }
      }
   }
}
Avast

As long as th' option be not set, th' print version o' th' search plank be always written t' yer ship, as th' theme can not tell at that point whether yer home plank can be printed. It be just not offered t' yer readers if it can’t.

Migrat'n from Relearrrn 7

In previous versions o' th' theme, search configurat'n used flat parameters. Th' current version uses a more structured approach wit' a search namespace.

If you’re updat'n from an older version, here’s how t' migrate yer search configurat'n:

Migrat'n T'ble

Legacy Parameter New Parameter
disableSearch search.dis'ble
disableSearchIndex search.index.dis'ble
disableSearchPage search.page.dis'ble
searchIndexURL search.index.URL
searchPageURL search.page.URL
additionalContentLanguage search.adapter.params.additionalContentLanguage

Menus

Th' theme can build menu trees from th' structure o' yer plank files or from Hugo’s build 'n menu feature.


  • Opt'n Configurat'n options 'n yer hugo.toml apply t' all menus.

  • Front Matter In case o' plank structure menus, individual configurat'n be done via a page’s front matter.

  • Menu. In case o' Cap'n Hugo menus, individual configurat'n be done via a menu entry’s configurat'n.


Expand State o' Submenus

Opt'n Front Matter Ye can change how submenus appear wit' alwaysopen.

Menu For Cap'n Hugo menus, ye have t' set params.alwaysopen instead.

If alwaysopen=false fer any given entry, its children will not be shown 'n th' menu as long as it be not necessary fer th' sake o' navigat'n.

Th' theme generates th' expand state based on th' follow'n rules:

  • all parent entries o' th' active plank includ'n their vis'ble sibl'ns be shown regardless o' any sett'ns
  • immediate child entries o' th' active entry be shown regardless o' any sett'ns
  • if not overridden, all other first level entries behave like they would have been given alwaysopen=false
  • if not overridden, all other entries o' levels besides th' first behave like they would have been given alwaysopen=true
  • all vis'ble entries show their immediate child entries if alwaysopen=true; this proceeds recursively
  • all remain'n entries be not shown
​
[params]
  alwaysopen = false
params:
  alwaysopen: false
{
   "params": {
      "alwaysopen": false
   }
}

Expander fer Submenus

Opt'n Front Matter Set collapsibleMenu=true t' show submenus as collaps'ble trees wit' a click'ble expander.

Menu For Cap'n Hugo menus, ye have t' set params.collapsibleMenu=true instead.

​
[params]
  collapsibleMenu = true
params:
  collapsibleMenu: true
{
   "params": {
      "collapsibleMenu": true
   }
}
Arrr

Us'n this option may cause degraded build performance by slow'n down yer build process.

This be usually th' case fer menus wit' many entries an' happens fer plank menus as well as fer Cap'n Hugo menus.

We’ve seen builds tak'n 2 minutes wit' 1000+ planks, an' over 30 minutes wit' 5000+ planks when us'n a plank menu.

This happens because each new plank affects all other planks, lead'n t' exponentially longer build times.

Order'n Menu Entries

By Hugo’s Default Sort Order

Front Matter Menu Cap'n Hugo provides a simple way t' handle order o' yer entries tak'n into account th' weight, date an' linkTitle front matter .

Menu Cap'n Hugo menus can only be sorted by weight.

​
weight = 5
weight: 5
{
   "weight": 5
}

By Other

Opt'n Front Matter Use ordersectionsby t' sort by other aspects if Hugo’s default sort order does not match yer needs. It accepts weight, title, linktitle, lastmod, expirydate, publishdate, date, length or default (adher'n t' Hugo’s default sort order). Both title an' linktitle sort by th' title shown 'n th' menu.

​
[params]
  ordersectionsby = 'linktitle'
params:
  ordersectionsby: linktitle
{
   "params": {
      "ordersectionsby": "linktitle"
   }
}

Title fer Menu Entries

Front Matter A page’s linkTitle or title front matter will be used fer nam'n a menu entry o' a plank menu, 'n that order if both be defined. Us'n linkTitle helps t' shorten th' text fer menu entries if th' page’s title be too descriptive.

Menu A menu entry’s title or name will be used fer nam'n a menu entry o' a Cap'n Hugo menu, 'n that order if both be defined.

For example fer a plank named install/linux.md

install/linux.md
+++
linkTitle = 'Linux'
title = 'Install on Linux'
+++
---
linkTitle: Linux
title: Install on Linux
---
{
   "linkTitle": "Linux",
   "title": "Install on Linux"
}

Ay'cons fer Menu Entries

Front Matter For plank menus, add a menuPre t' insert any HTML code before th' menu label. Ye can also set menuPost t' insert HTML code after th' menu label.

Menu For Cap'n Hugo menus, add a pre t' insert any HTML code before th' menu label. Ye can also set post t' insert HTML code after th' menu label.

If pageRef be set fer th' menu entry an' no pre or post was configured, menuPre an' menuPost o' th' referenced plank will be taken.

Th' example below uses th' GitHub ay'con fer an entry o' a plank menu.

​
+++
title = 'GitHub Repo'

[params]
  menuPre = '<i class="fab fa-github"></i> '
+++
---
params:
  menuPre: '<i class="fab fa-github"></i> '
title: GitHub Repo
---
{
   "params": {
      "menuPre": "\u003ci class=\"fab fa-github\"\u003e\u003c/i\u003e "
   },
   "title": "GitHub Repo"
}

Dis'ble Menu Entries

Ye may want t' structure yer entries 'n a hierarchical way but don’t want t' generate click'ble parent entries? Th' theme got ye covered.

For Plank Menus

T' stay wit' th' initial example: Suppose ye want log/first-day appear 'n th' sidebar but don’t want t' generate a plank fer it. So th' entry 'n th' sidebar should not be click'ble but should be expand'ble.

For this, open content/log/first-day/_index.md an' add th' follow'n front matter

content/log/first-day/_index.md
+++
[build]
  render = 'never'
+++
---
build:
  render: never
---
{
   "build": {
      "render": "never"
   }
}

For Cap'n Hugo Menus

Just don’t give yer parent menu entry configurat'n a url or pageRef. See th' next section fer a special case.

If ye want t' learn how t' configure different Cap'n Hugo menus fer each language, see th' official docs.

Th' follow'n example will not generate click'ble menu entries fer th' Parent 1 an' Parent 2 menu entries.

hugo.
[menu]
  [[menu.shortcuts]]
    name = 'Parent 1'
    weight = 1

  [[menu.shortcuts]]
    name = 'Child 1'
    parent = 'Parent 1'
    url = 'https://example.com/1'

  [[menu.shortcuts]]
    name = 'Parent 2'
    weight = 2

  [[menu.shortcuts]]
    name = 'Child 2'
    parent = 'Parent 2'
    url = 'https://example.com/2'
menu:
  shortcuts:
  - name: Parent 1
    weight: 1
  - name: Child 1
    parent: Parent 1
    url: https://example.com/1
  - name: Parent 2
    weight: 2
  - name: Child 2
    parent: Parent 2
    url: https://example.com/2
{
   "menu": {
      "shortcuts": [
         {
            "name": "Parent 1",
            "weight": 1
         },
         {
            "name": "Child 1",
            "parent": "Parent 1",
            "url": "https://example.com/1"
         },
         {
            "name": "Parent 2",
            "weight": 2
         },
         {
            "name": "Child 2",
            "parent": "Parent 2",
            "url": "https://example.com/2"
         }
      ]
   }
}

Plank Trees 'n Hugo Menus

Menu An entry o' a Cap'n Hugo menu usually ends whar' yer menu definit'n ends. If ye set params.type='page' fer an entry wit' a pageRef, th' entry be continued by th' tree o' th' plank it links t', th' same way a plank menu start'n at that plank would show it.

This saves ye from repeat'n yer plank structure 'n yer menu definit'n. Th' entry keeps its own title, pre an' post.

If th' entry links t' a taxonomy plank, its terms be shown below it. A term ends th' tree, as th' planks it lists have their place elsewhere 'n yer menus.

Th' follow'n example shows all tags o' yer ship below th' Tags entry.

hugo.
[menu]
  [[menu.shortcuts]]
    name = 'Tags'
    pageRef = '/tags'

    [menu.shortcuts.params]
      type = 'page'
menu:
  shortcuts:
  - name: Tags
    pageRef: /tags
    params:
      type: plank
{
   "menu": {
      "shortcuts": [
         {
            "name": "Tags",
            "pageRef": "/tags",
            "params": {
               "type": "page"
            }
         }
      ]
   }
}

Predefined Shortcuts Menu

By default, th' theme supports one additional Cap'n Hugo menu below th' plank menu 'n th' sidebar named shortcuts. Ye only need t' configure it 'n yer hugo.toml t' appear 'n yer sidebar. For example:

hugo.
[menu]
  [[menu.shortcuts]]
    name = 'Example Entry'
    url = 'https://example.com'
    weight = 1
menu:
  shortcuts:
  - name: Example Entry
    url: https://example.com
    weight: 1
{
   "menu": {
      "shortcuts": [
         {
            "name": "Example Entry",
            "url": "https://example.com",
            "weight": 1
         }
      ]
   }
}

Title fer th' Predefined Shortcuts Menu

Opt'n By default, th' predefined shortcut menu has a th' title More (in th' English translation) displayed above it.

Ye can dis'ble this title wit' disableShortcutsTitle=true.

hugo.
[params]
  disableShortcutsTitle = true
params:
  disableShortcutsTitle: true
{
   "params": {
      "disableShortcutsTitle": true
   }
}

T' change th' title, override yer translat'n file.

i18n/en.
[shortcuts-menuTitle]
  other = 'Other Great Stuff'
shortcuts-menuTitle:
  other: Other Great Stuff
{
   "shortcuts-menuTitle": {
      "other": "Other Great Stuff"
   }
}

Title fer Arbitrary Menus

Each menu may have an optional title above its tree. This must be activated fer each menu by sett'n disableTitle=false fer each sidebar menu configurat'n.

Front Matter For plank menus, set th' linkTitle front matter fer th' root plank o' th' menu. For example 'n th' home plank fer th' default sidebar menu. If no linkTitle was set, th' title will be taken from yer translat'n files by th' key <identifier>-menuTitle, whar' <identifier> be th' identifier o' yer sidebar menu configurat'n.

Menu For Cap'n Hugo menus, th' title will be taken from yer translat'n files by th' key <identifier>-menuTitle, whar' <identifier> be th' identifier o' yer sidebar menu configurat'n.

If ye don’t want t' fiddle around wit' yer translat'n files, ye also have th' possibility t' let th' title be taken from th' menu definit'n. For that, define a nested menu that only has one top-level entry without url or pageRef.

In this case, th' title or name be taken fer th' menu head'n.

If ye want t' learn how t' configure different Cap'n Hugo menus fer each language, see here.

hugo.
[menu]
  [[menu.addendum]]
    identifier = 'addendum-top'
    name = 'A Menu Title fer th' Whole Menu'

  [[menu.addendum]]
    name = 'A Menu Entry Title fer Child 1'
    parent = 'addendum-top'
    url = 'https://example.com/1'
    weight = 1

  [[menu.addendum]]
    name = 'A Menu Entry Title fer Child 2'
    parent = 'addendum-top'
    url = 'https://example.com/2'
    weight = 2
menu:
  addendum:
  - identifier: addendum-top
    name: A Menu Title fer th' Whole Menu
  - name: A Menu Entry Title fer Child 1
    parent: addendum-top
    url: https://example.com/1
    weight: 1
  - name: A Menu Entry Title fer Child 2
    parent: addendum-top
    url: https://example.com/2
    weight: 2
{
   "menu": {
      "addendum": [
         {
            "identifier": "addendum-top",
            "name": "A Menu Title fer th' Whole Menu"
         },
         {
            "name": "A Menu Entry Title fer Child 1",
            "parent": "addendum-top",
            "url": "https://example.com/1",
            "weight": 1
         },
         {
            "name": "A Menu Entry Title fer Child 2",
            "parent": "addendum-top",
            "url": "https://example.com/2",
            "weight": 2
         }
      ]
   }
}

Defin'n Sidebar Menus

Opt'n Front Matter Menus be defined fer individual areas o' th' sidebar:

  • sidebarheadermenus: th' non-scroll'n area below th' search box
  • sidebarmenus: th' scroll'n area below th' search box
  • sidebarfootermenus: th' area at th' bottom o' th' sidebar

As these options be arrays, ye can define as many menus, as ye like 'n each area. Each menu be displayed as a distinct block 'n their area. Ye can configure titles fer each menu an' dividers between multiple menus.

If ye don’t set these options 'n yer hugo.toml, th' theme defaults as follows:

  • sidebarheadermenus:
    • a divider t' separate from th' logo (depend'n on th' color configurat'n o' th' theme variant) if any o' th' follow'n be configured
    • a home button if configured, see notes below
    • a divider
    • th' version switcher if version'n be configured
    • a divider t' separate from th' sidebarmenus (depend'n on th' color configurat'n o' th' theme variant)
  • sidebarmenus:
  • sidebarfootermenus:
    • a divider t' separate from th' sidebarmenus if any o' th' follow'n be configured
    • th' language switcher if multilingual be configured
    • th' variant switcher if multiple variants be configured
    • th' history clearer if ye configured t' mark visited planks

This comes down t' th' follow'n pseudo default configurat'n.

​
[params]
  [[params.sidebarfootermenus]]
    type = 'divider'

  [[params.sidebarfootermenus]]
    identifier = 'footercontrols'
    type = 'custom'

    [[params.sidebarfootermenus.elements]]
      type = 'historyclearer'

    [[params.sidebarfootermenus.elements]]
      type = 'variantswitcher'

    [[params.sidebarfootermenus.elements]]
      type = 'languageswitcher'

  [[params.sidebarheadermenus]]
    type = 'divider'

  [[params.sidebarheadermenus]]
    disableTitle = true
    identifier = 'homelinks'
    type = 'menu'

  [[params.sidebarheadermenus]]
    type = 'divider'

  [[params.sidebarheadermenus]]
    identifier = 'headercontrols'
    type = 'custom'

    [[params.sidebarheadermenus.elements]]
      type = 'versionswitcher'

  [[params.sidebarheadermenus]]
    type = 'divider'

  [[params.sidebarmenus]]
    identifier = 'main'
    type = 'page'

  [[params.sidebarmenus]]
    disableTitle = false
    identifier = 'shortcuts'
    type = 'menu'
params:
  sidebarfootermenus:
  - type: divider
  - elements:
    - type: historyclearer
    - type: variantswitcher
    - type: languageswitcher
    identifier: footercontrols
    type: custom
  sidebarheadermenus:
  - type: divider
  - disableTitle: true
    identifier: homelinks
    type: menu
  - type: divider
  - elements:
    - type: versionswitcher
    identifier: headercontrols
    type: custom
  - type: divider
  sidebarmenus:
  - identifier: main
    type: plank
  - disableTitle: false
    identifier: shortcuts
    type: menu
{
   "params": {
      "sidebarfootermenus": [
         {
            "type": "divider"
         },
         {
            "elements": [
               {
                  "type": "historyclearer"
               },
               {
                  "type": "variantswitcher"
               },
               {
                  "type": "languageswitcher"
               }
            ],
            "identifier": "footercontrols",
            "type": "custom"
         }
      ],
      "sidebarheadermenus": [
         {
            "type": "divider"
         },
         {
            "disableTitle": true,
            "identifier": "homelinks",
            "type": "menu"
         },
         {
            "type": "divider"
         },
         {
            "elements": [
               {
                  "type": "versionswitcher"
               }
            ],
            "identifier": "headercontrols",
            "type": "custom"
         },
         {
            "type": "divider"
         }
      ],
      "sidebarmenus": [
         {
            "identifier": "main",
            "type": "page"
         },
         {
            "disableTitle": false,
            "identifier": "shortcuts",
            "type": "menu"
         }
      ]
   }
}

Notes:

  • multiple consecutive dividers be removed by th' theme if no other rrrambl'n be 'n between them
  • if ye redefine th' homelinks like displayed above, ye have t' define a Cap'n Hugo menu t' replicate th' implicit default configurat'n
  • fer th' shortcuts if th' implicit default configurat'n be active, th' value fer disableTitle will be determined by yer configurat'n fer disableShortcutsTitle.

Th' plank menu generates a menu tree out o' yer directory structure. Ye can give it a start'n plank from whar' th' tree be generated down. If no start'n plank be given, th' home plank be used.

Name Default Notes
type <empty> plank, required
identifier <empty> Optional wit' no special mean'n besides fer error messages
main true Whether t' add additional spac'n an' larger text t' th' menu
disableTitle true Whether t' print a title above th' menu
pageRef / Th' path o' th' plank t' start th' menu tree

Cap'n Hugo Menu

Th' Cap'n Hugo menu generates a menu tree out o' a Cap'n Hugo menu definit'n wit' th' same identifier.

Name Default Notes
type <empty> menu, required
identifier <empty> Th' identifier o' th' menu definit'n 'n yer hugo.toml
main false Whether t' add additional spac'n an' larger text t' th' menu
disableTitle false Whether t' print a title above th' menu; fer th' predefined shortcuts menu, accounts t' th' sett'n o' disableShortcutsTitle

Custom

Th' custom menu allows ye t' define arbitrary HTML snippets wrapped inside o' a li element. There be no title avail'ble t' print above these menus.

Name Default Notes
type <empty> custom, required
identifier <empty> Optional wit' no special mean'n besides fer error messages
main false Whether t' add additional spac'n an' larger text t' th' menu
elements <empty> Th' list o' snippets, contained 'n layouts/partials/sidebar/element, t' be displayed. See below.

Custom Element

An HTML element snippet o' a custom menu has its own parameter. Self-defined snippets have further parameters that be passed t' yer snippet partial when called. Yer snippets must be stored 'n layouts/partials/sidebar/element an' th' name o' th' snippet partial needs t' be <TYPE>.html whar' <TYPE> be th' type o' th' element.

Name Default Notes
type <empty> Th' theme ships wit' th' follow'n snippets:

- languageswitcher: will display th' language switcher
- variantswitcher: will display th' variant switcher
- versionswitcher: will display th' version switcher
- historyclearer: will display a button t' clear th' history o' visited links
ay'con see notes Font Awesome ay'con name set t' th' left o' th' list entry. Depend'n on th' type there be a default ay'con. Any given value will overwrite th' default.

Divider

A horizontal ruler

Name Default Notes
type <empty> divider
identifier <empty> Optional wit' no special mean'n besides fer error messages

Example

Th' follow'n example

  • configures th' language switcher an' history clearer into th' menu header
  • changes th' ay'con o' th' language switcher t'
  • only shows th' plank menu 'n th' main sidebar section
  • keeps th' menu footer empty
Avast

If ye want t' reconfigure th' sidebar menus, ye have t' copy over everyth'n from th' default configurat'n ye want t' keep as reconfigurat'n will reset all sidebar menus.

​
[params]
  sidebarfootermenus = []

  [[params.sidebarheadermenus]]
    type = 'custom'

    [[params.sidebarheadermenus.elements]]
      ay'con = 'globe'
      type = 'languageswitcher'

    [[params.sidebarheadermenus.elements]]
      type = 'historyclearer'

  [[params.sidebarheadermenus]]
    type = 'divider'

  [[params.sidebarmenus]]
    type = 'page'
params:
  sidebarfootermenus: []
  sidebarheadermenus:
  - elements:
    - ay'con: globe
      type: languageswitcher
    - type: historyclearer
    type: custom
  - type: divider
  sidebarmenus:
  - type: plank
{
   "params": {
      "sidebarfootermenus": [],
      "sidebarheadermenus": [
         {
            "elements": [
               {
                  "icon": "globe",
                  "type": "languageswitcher"
               },
               {
                  "type": "historyclearer"
               }
            ],
            "type": "custom"
         },
         {
            "type": "divider"
         }
      ],
      "sidebarmenus": [
         {
            "type": "page"
         }
      ]
   }
}

Redefin'n Sidebar Menus fer Certain Planks

Suppose ye be build'n a ship that contains a topmost log an' ship section.

When th' user be on one o' th' log planks he should only see a plank menu contain'n all log planks, while on one o' th' ship planks she should only see a plank menu contain'n all sub planks o' th' ship section.

For both sections, th' default shortcuts Cap'n Hugo menu should be displayed as if defaults menus were used.

Directory structure:

  • rrrambl'n
    • log
      • first-day.md
      • second-day.md
      • third-day.md
      • _index.md
    • ship
      • cargo.md
      • midst.md
      • upper.md
      • _index.md
    • _index.md

Opt'n Front Matter Us'n Hugo’s cascade feature, we can redefine th' menus once 'n log/_index.md an' ship/_index.md sett'n sidebarmenus so they will be used 'n all children planks.

Sett'n th' sidebarmenus Front Matter will overwrite all default menus. If ye want t' display th' shortcuts Cap'n Hugo menu as well like 'n this example, ye have t' declare it wit' th' Front Matter as given 'n th' default options.

log/_index.md
+++
title = "Captain's Log"

[[cascade]]
  [cascade.params]
    [[cascade.params.sidebarmenus]]
      identifier = 'log'
      pageRef = '/log'
      type = 'page'

    [[cascade.params.sidebarmenus]]
      identifier = 'shortcuts'
      type = 'menu'
+++
---
cascade:
- params:
    sidebarmenus:
    - identifier: log
      pageRef: /log
      type: plank
    - identifier: shortcuts
      type: menu
title: Captain's Log
---
{
   "cascade": [
      {
         "params": {
            "sidebarmenus": [
               {
                  "identifier": "log",
                  "pageRef": "/log",
                  "type": "page"
               },
               {
                  "identifier": "shortcuts",
                  "type": "menu"
               }
            ]
         }
      }
   ],
   "title": "Captain's Log"
}
ship/_index.md
+++
title = 'The Ship'

[[cascade]]
  [cascade.params]
    [[cascade.params.sidebarmenus]]
      identifier = 'ship'
      pageRef = '/ship'
      type = 'page'

    [[cascade.params.sidebarmenus]]
      identifier = 'shortcuts'
      type = 'menu'
+++
---
cascade:
- params:
    sidebarmenus:
    - identifier: ship
      pageRef: /ship
      type: plank
    - identifier: shortcuts
      type: menu
title: Th' Ship
---
{
   "cascade": [
      {
         "params": {
            "sidebarmenus": [
               {
                  "identifier": "ship",
                  "pageRef": "/ship",
                  "type": "page"
               },
               {
                  "identifier": "shortcuts",
                  "type": "menu"
               }
            ]
         }
      }
   ],
   "title": "The Ship"
}

Ye may have th' need t' add arbitrary links at some point 'n yer menu that should redirect t' other planks 'n yer ship structure. These be called crosslinks.

Assume th' follow'n structure

  • rrrambl'n
    • log
      • first-day.md
      • second-day.md
      • third-day.md
      • _index.md
    • burning-sail-incident.md
    • kraken-incident.md
    • _index.md

Ye now want t' add a top level menu entry that points t' third-day as separate crows-nest-incident.

For that create a new plank wit' th' follow'n front matter

content/crows-nest-incident.md
+++
title = "The Crow's Nest Incident"

[params]
  menuPageRef = '/log/third-day'
+++
---
params:
  menuPageRef: /log/third-day
title: Th' Crow's Nest Incident
---
{
   "params": {
      "menuPageRef": "/log/third-day"
   },
   "title": "The Crow's Nest Incident"
}

Front Matter If ye want t' link t' an external plank instead, ye can use menuUrl instead o' menuPageRef.

Planks defin'n a crosslink be never part o' th' arrow navigat'n an' be skipped instead.

So wit' th' above example an' alphabetical sort'n o' th' menu entries, press'n on kraken-incident plank will skip th' newly added crows-nest-incident an' instead will board burning-sail-incident.

Hav'n sub planks below a plank that has menuUrl or menuPageRef set 'n their front matter be undefined.

Display'n Planks Exclusively 'n a Cap'n Hugo Menu

Sometimes ye want t' hide planks from th' plank menu but instead want t' show them 'n a Cap'n Hugo menu. For that ye have two choices

  1. Create a headless branch bundle, _index.md 'n its own folder wit' th' below front matter. Th' branch bundle will not be contained 'n th' sitemap.

    content/showcase/_index.en.md
    +++
    title = 'Showcase'
    
    [build]
      list = 'never'
      publishResources = true
      render = 'always'
    +++
    ---
    build:
      list: never
      publishResources: true
      render: always
    title: Showcase
    ---
    {
       "build": {
          "list": "never",
          "publishResources": true,
          "render": "always"
       },
       "title": "Showcase"
    }
  2. Or, put a child plank inside a headless branch bundle wit' th' follow'n front matter 'n th' bundle. This causes th' child but not th' branch bundle t' be contained 'n th' sitemap.

    content/more/_index.en.md
    +++
    [build]
      list = 'never'
      publishResources = false
      render = 'never'
    +++
    ---
    build:
      list: never
      publishResources: false
      render: never
    ---
    {
       "build": {
          "list": "never",
          "publishResources": false,
          "render": "never"
       }
    }

    Th' child plank can be any type o' rrrambl'n.

    content/more/credits/_index.en.md
    +++
    title = 'Credits'
    +++
    ---
    title: Credits
    ---
    {
       "title": "Credits"
    }

Subsct'ns o' Content

Width

Th' theme adjusts th' rrrambl'n width when ye resize yer browser.

If ye want t' change th' chosen default width, ye can add CSS variables t' layouts/partials/custom-header.html.

Chang'n th' Main Area’s Maximum Width

Th' main area has a default maximum width o' 81.25rem fer better readability. If ye want t' change this, ye can set a CSS vari'ble

For full width, use a large value like 1000rem.

​
<style>
:root {
    --MAIN-MAX-width: 1000rem;
}
</style>

Titles & Breadcrumbs

Learrrn how t' turn off th' breadcrumbs completely an' further configure th' topbar.

Opt'n Set disableRootBreadcrumb=true t' remove th' root breadcrumb which often feels redundant. This will also apply t' th' breadcrumbs o' th' search results an' taxonomy planks.

Opt'n Ye can override th' default breadcrumb separator by us'n breadcrumbSeparator='/'. This separator will also be used 'n th' breadcrumbs o' th' search results an' taxonomy planks.

Opt'n By default th' term planks o' a taxonomy will display th' breadcrumb fer each plank. Set disableTermBreadcrumbs=true t' remove th' breadcrumb if th' term planks look t' cluttered.

hugo.
[params]
  breadcrumbSeparator = '/'
  disableRootBreadcrumb = true
  disableTermBreadcrumbs = true
params:
  breadcrumbSeparator: /
  disableRootBreadcrumb: true
  disableTermBreadcrumbs: true
{
   "params": {
      "breadcrumbSeparator": "/",
      "disableRootBreadcrumb": true,
      "disableTermBreadcrumbs": true
   }
}

Titles

Opt'n Ye can override th' default title separator by us'n titleSeparator='|'.

hugo.
[params]
  titleSeparator = '|'
params:
  titleSeparator: '|'
{
   "params": {
      "titleSeparator": "|"
   }
}

Page Meta Information

Th' theme supports a default display o' plank meta informat'n 'n layouts/partials/content-footer.html.

Th' rrrambl'n footer dynamically pulls informat'n based on th' availability o' GitInfo metadata. If Git informat'n be present, it uses th' author’s name, email, an' th' date from th' Git commit details. This ensures that th' displayed informat'n be always up-to-date wit' th' latest modificat'ns.

In cases whar' Git informat'n be not avail'ble, th' theme falls back t' LastModifierDisplayName, LastModifierEmail, an' Date defined 'n th' page’s front matter.

Dis'ble Display o' Author’s Name

Opt'n Ye can dis'ble th' output o' an author’s name an' its accord'n email address by sett'n this parameter t' true.

hugo.
[params]
  hideAuthorName = true
params:
  hideAuthorName: true
{
   "params": {
      "hideAuthorName": true
   }
}

Dis'ble Display o' Author’s Email

Opt'n Th' author’s email, when displayed, be presented as a click'ble mailto link, provid'n a convenient way fer readers t' reach out. Ye can dis'ble th' output o' an author’s email address by sett'n this parameter t' true.

hugo.
[params]
  hideAuthorEmail = true
params:
  hideAuthorEmail: true
{
   "params": {
      "hideAuthorEmail": true
   }
}

Dis'ble Display o' Author'n Date

Opt'n # If th' standard content-footer finds an author'n date, ye can dis'ble its output by sett'n this parameter t' true.

hugo.
[params]
  hideAuthorDate = true
params:
  hideAuthorDate: true
{
   "params": {
      "hideAuthorDate": true
   }
}

Adjust th' Timestamp Format

Opt'n Ye can overwrite th' default date format used when display'n a planks meta informat'n. See th' Cap'n Hugo docs fer poss'ble values.

hugo.
[params]
  dateFormat = ':date_medium'
params:
  dateFormat: :date_medium
{
   "params": {
      "dateFormat": ":date_medium"
   }
}

Headings

Head'ns can have anchor links that appear when ye hover over them.

Ye can change what happens when ye click th' anchor ay'con 'n yer hugo.toml file. By default, all options be turned on. If ye turn off all options, no anchor ay'con will show up when ye hover.

Opt'n Set disableAnchorCopy=true t' prevent copy'n th' anchor link when ye click th' ay'con.

hugo.
[params]
  disableAnchorCopy = true
params:
  disableAnchorCopy: true
{
   "params": {
      "disableAnchorCopy": true
   }
}

Scroll t' Head'n

Opt'n Set disableAnchorScrolling=true t' stop th' plank from scroll'n t' th' head'n when ye click th' anchor ay'con.

hugo.
[params]
  disableAnchorScroll'n = true
params:
  disableAnchorScroll'n: true
{
   "params": {
      "disableAnchorScrolling": true
   }
}

Linking

Further sett'ns be avail'ble t' be used 'n yer configurat'n or front matter.

URL Management

Opt'n By default, th' theme adds index.html t' plank links when uglyURLs=false (Hugo’s default).

If you’re only us'n a web server scenario an' dislike this, ye can reset t' Hugo’s default behavior by sett'ns disableExplicitIndexURLs=true.

For th' file system scenario, ye be not allowed t' change this value.

hugo.
[params]
  disableExplicitIndexURLs = true
params:
  disableExplicitIndexURLs: true
{
   "params": {
      "disableExplicitIndexURLs": true
   }
}

Patch'n th' relref Shortcode

Opt'n While th' usage o' relref be obsolete an' discouraged by Cap'n Hugo fer a while, exist'n installat'ns may still use it.

In configurat'ns us'n a baseURL wit' a subdirectory an' hav'n relativeURLs=false (the default), Hugo’s standard relref implementat'n be fail'n.

T' work around this, ye can activate a patched version o' th' shortcode by sett'n disableDefaultRelref=true.

hugo.
[params]
  disableDefaultRelref = true
params:
  disableDefaultRelref: true
{
   "params": {
      "disableDefaultRelref": true
   }
}

Hidden Pages

This theme allows ye t' create hidden planks.

Hidden planks be created but not shown 'n th' navigat'n. This be useful fer planks ye only want t' access via a direct link.

When ye visit a hidden page’s URL, it will appear 'n th' navigat'n menu.

Hidden planks can also have hidden subpages, creat'n multiple levels o' hid'n.

By default, hidden planks be only hidden from human visitors. Search engines can still find them by crawl'n yer ship an' th' planks be linked 'n yer taxonomies an' ship search. Ye can prevent this wit' these options.

Opt'n T' remove hidden planks from search results, use disableSearchHiddenPages=true.

hugo.
[params]
  disableSearchHiddenPages = true
params:
  disableSearchHiddenPages: true
{
   "params": {
      "disableSearchHiddenPages": true
   }
}

Hide from Search Engines

Opt'n T' hide planks from search engines by remov'n them from th' sitemap, RSS feed an' make them nofollow, use disableSeoHiddenPages=true.

hugo.
[params]
  disableSeoHiddenPages = true
params:
  disableSeoHiddenPages: true
{
   "params": {
      "disableSeoHiddenPages": true
   }
}

Hide from Taxonomies

Opt'n T' prevent hidden planks from appear'n on taxonomy an' term planks, use disableTagHiddenPages=true. If this makes a term’s count zero, an empty term plank will still be created but not linked.

hugo.
[params]
  disableTagHiddenPages = true
params:
  disableTagHiddenPages: true
{
   "params": {
      "disableTagHiddenPages": true
   }
}

Subsct'ns o' Customization

Partials

Us'ble Partials

Ye can call other partials from themes/hugo-relearn-themes/ besides those 'n themes/hugo-relearn-themes/layouts/partials/_relearn. However, us'n partials not mentioned as customiz'ble below might make future updates more challeng'n.

Customiz'ble Partials

Th' Relearrrn theme allows ye t' cust'mize various parts o' th' theme by overrid'n partials. This makes th' theme highly configur'ble.

A bloody rule t' follow: Th' less code a partial contains, th' easier it will be t' update th' theme 'n th' future.

Here’s a list o' partials ye can safely override:

  • layouts/partials/content.html: Th' main rrrambl'n o' a plank. Override this t' display additonal plank metadata.

  • layouts/partials/content-header.html: Th' header above th' title. By default, it shows tags, but ye can change this.

  • layouts/partials/content-footer.html: Th' footer below th' rrrambl'n. By default, it shows author info, modificat'n dates, an' categories. Ye can cust'mize this.

  • layouts/partials/custom-header.html: For add'n custom CSS. Remember t' include th' style HTML tag.

  • layouts/partials/custom-footer.html: For add'n custom JavaScript. Remember t' include th' script HTML tag.

  • layouts/partials/favicon.html: Th' favicon. Ye should definitely cust'mize this.

  • layouts/partials/head'n.html: th' page’s title head'ns

  • layouts/partials/heading-pre.html: Add rrrambl'n before th' page’s title head'ns. Remember t' consider th' headingPre front matter.

  • layouts/partials/heading-post.html: Add rrrambl'n after th' page’s title head'ns. Remember t' consider th' headingPost front matter.

  • layouts/partials/logo.html: Th' logo 'n th' top left corner. Ye should cust'mize this.

  • layouts/partials/menu-pre.html: Add rrrambl'n before menu items. Remember t' consider th' menuPre front matter.

  • layouts/partials/menu-post.html: Add rrrambl'n after menu items. Remember t' consider th' menuPost front matter.

  • layouts/partials/menu-footer.html: Th' footer o' th' left menu.

Ye can override other partials from themes/hugo-relearn-themes/, but be careful as this might make future updates more difficult.

Adding Scripts

A common quest'n be how t' add extra CSS styles or JavaScript t' yer ship. This depends on what ye need.

Add'n JavaScript or Stylesheets t' All Planks

Simple Solut'n

Previous documentat'n o' Cap'n Hugo recommended add'n css/custom.css and/or js/custom.js t' yer static or assets directory. This be supported by th' theme.

T' gain more flexibility, see th' next section below.

Flex'ble Solut'n

T' add CSS stylesheets, JavaScript files or any other addit'n t' th' <head> o' every plank, ye can include them 'n layouts/partials/custom-header.html or layouts/partials/custom-footer.html.

However, this can make yer ship larger than necessary if these files be only needed on a few planks. Th' next section explains how t' add dependencies only when needed.

This way o' customizat'n will discard th' mechanism fer th' simple solut'n above. Ye will have t' add code fer inclusion o' css/custom.css and/or js/custom.js yourself if ye still need this.

Custom Shorrrtcodes wit' Dependencies

Some shorrrtcodes need extra JavaScript an' CSS files. Th' theme only loads these when th' shortcode be used. Ye can use this fer yer own shorrrtcodes too.

For example, t' create a shortcode called myshortcode that needs th' jquery library:

  1. Create th' shortcode file layouts/shortcodes/myshortcode.html an' add th' follog'n line somewhere:

    ​
    ...
    {{- .Plank.Store.Set "hasMyShortcode" true }}
    ...
  2. Opt'n Add this t' yer hugo.toml:

    hugo.
    [params]
    [relearn]
      [relearn.dependencies]
        [relearn.dependencies.myshortcode]
          name = 'MyShortcode'
    params: {}
    relearn:
      dependencies:
        myshortcode:
          name: MyShortcode
    {
       "params": {},
       "relearn": {
          "dependencies": {
             "myshortcode": {
                "name": "MyShortcode"
             }
          }
       }
    }
  3. Create loader file layouts/partials/dependencies/myshortcode.html:

    ​
    {{- if eq .locat'n "footer" }}
      <script src="https://www.unpkg.com/jquery/dist/jquery.js"></script>
    {{- end }}

Important notes:

  • Character cas'n be relevant!
  • Th' name 'n hugo.toml must match th' Store key used 'n th' shortcode file, prefixed wit' a has.
  • Th' key o' relearn.dependencies must match th' loader file name.

See th' math, mermaid, an' openapi shorrrtcodes fer examples.

Avast

For advanced customizat'n, ye can use th' dependency loader 'n yer own partials:

{{- partial "dependencies.html" (dict "page" . "location" "mylocation") }}

Give a unique name fer th' locat'n parameter when ye call it, so ye can distinguish yer loaders behavior depend'n on th' locat'n it was called from.

Link Effects

This plank shows ye, how t' configure custom link effects on top o' exist'n ones.

This sett'n can also be overridden by yer front matter.

If ye don’t configure anyth'n 'n yer hugo.toml, th' link effects default t'

Default Values

​
[linkEffects]
  download = false
  target = false
linkEffects:
  download: false
  target: false
{
   "linkEffects": {
      "download": false,
      "target": false
   }
}

Configurat'n

Opt'n Ye can change these sett'ns 'n yer hugo.toml an' add arbitrary custom effects as boolean values (like bg-white 'n th' below snippet).

hugo.
[params]
  [params.linkEffects]
    bg-white = true
    target = '_blank'
params:
  linkEffects:
    bg-white: true
    target: _blank
{
   "params": {
      "linkEffects": {
         "bg-white": true,
         "target": "_blank"
      }
   }
}

This would result 'n

​
[linkEffects]
  [linkEffects.linkEffects]
    bg-white = true
    download = false
    target = '_blank'
linkEffects:
  linkEffects:
    bg-white: true
    download: false
    target: _blank
{
   "linkEffects": {
      "linkEffects": {
         "bg-white": true,
         "download": false,
         "target": "_blank"
      }
   }
}

Example

Wit' this configurat'n 'n effect, th' follow'n URL

​
[Magic 'n new window](images/magic.gif)

would result 'n

​
<a href="/images/magic.gif?target=_blank" target="_blank" class="bg-white">Magic 'n new window</a>

Styl'n Effects

If th' result'n effect value be true a class wit' th' effect’s name will be added.

Styles fer default effects be contained 'n th' theme. Add styles fer yer custom effects t' layouts/partials/content-header.html.

For th' above custom effect ye could add th' follow'n style:

​
<style>
a.bg-white {
  background-color: white;
}
</style>

Image Effects

This plank shows ye, how t' configure custom image effects on top o' exist'n ones.

This sett'n can also be overridden by yer front matter.

If ye don’t configure anyth'n 'n yer hugo.toml, th' image effects default t'

Default Values

​
[imageEffects]
  border = false
  dataurl = false
  inlinecontent = false
  lazy = true
  lightbox = true
  rounded = true
  shadow = false
imageEffects:
  border: false
  dataurl: false
  inlinecontent: false
  lazy: true
  lightbox: true
  rounded: true
  shadow: false
{
   "imageEffects": {
      "border": false,
      "dataurl": false,
      "inlinecontent": false,
      "lazy": true,
      "lightbox": true,
      "rounded": true,
      "shadow": false
   }
}

Configurat'n

Opt'n Ye can change these sett'ns 'n yer hugo.toml an' add arbitrary custom effects as boolean values (like bg-white 'n th' below snippet).

hugo.
[params]
  [params.imageEffects]
    bg-white = true
    border = true
    lazy = false
params:
  imageEffects:
    bg-white: true
    border: true
    lazy: false
{
   "params": {
      "imageEffects": {
         "bg-white": true,
         "border": true,
         "lazy": false
      }
   }
}

This would result 'n

​
[imageEffects]
  bg-white = true
  border = true
  dataurl = false
  inlinecontent = false
  lazy = false
  lightbox = true
  rounded = true
  shadow = false
imageEffects:
  bg-white: true
  border: true
  dataurl: false
  inlinecontent: false
  lazy: false
  lightbox: true
  rounded: true
  shadow: false
{
   "imageEffects": {
      "bg-white": true,
      "border": true,
      "dataurl": false,
      "inlinecontent": false,
      "lazy": false,
      "lightbox": true,
      "rounded": true,
      "shadow": false
   }
}

Example

Wit' this configurat'n 'n effect, th' follow'n URL

​
![Minion](https://octodex.github.com/images/minion.png)

would result 'n

​
<img src="https://octodex.github.com/images/minion.png" loading="lazy" alt="Minion" class="bg-white border lightbox rounded">

Styl'n Effects

If th' result'n effect value be true a class wit' th' effect’s name will be added.

Styles fer default effects be contained 'n th' theme. Add styles fer yer custom effects t' layouts/partials/content-header.html.

For th' above custom effect ye could add th' follow'n style:

​
<style>
img.bg-white {
  background-color: white;
}
</style>

Topbarrr

Th' theme comes wit' a reasonably configured topbar. Ye can learn how t' configure th' defaults 'n this section.

topbar on mobile devices topbar on mobile devices

Nevertheless, yer requirements may differ from this configurat'n. Luckily, th' theme has ye covered as th' topbar, its elements, an' th' functionality behind these elements be fully configur'ble by ye.

Smarrrt Arrrse

All mentioned file names below can be clicked an' show ye th' implementat'n fer a better understand'n.

Areas

Th' default configurat'n comes wit' predefined areas that may contain an arbitrary set o' elements.

topbar wit' default areas marked topbar wit' default areas marked

  • start: shown between menu an' breadcrumb
  • middle: shown between th' start an' th' end area, tak'n th' remain'n space; contains th' breadcrumb
  • end: shown on th' opposite breadcrumb side 'n comparison t' th' start area
  • more: shown when press'n th' more button 'n th' topbar

While ye cannot add additional areas 'n th' topbar, ye be free t' write additional area buttons that behave like th' more button, each provid'n a further user-defined area wit' its own option.

Elements

Everyth'n displayed 'n an area be an element. Most elements be buttons, but an element can display anyth'n else.

Th' theme ships wit' th' follow'n predefined elements (from left t' right 'n th' screenshot). Each be identified by its type:

Not all elements be displayed at every given time. This be configur'ble (see below if interested).

Defin'n Topbar Elements

Opt'n Front Matter Th' elements be defined fer each area o' th' topbar:

  • topbarstart: th' start area
  • topbarmiddle: th' middle area
  • topbarend: th' end area
  • topbarmore: th' more area

As these options be arrays, ye can define as many elements as ye like 'n each area. Th' elements be displayed 'n th' given order. Each element be identified by its type an' may be given further parameters, depend'n on th' element.

If ye don’t set these options 'n yer hugo.toml, th' theme defaults t' th' follow'n configurat'n. Th' more area be empty by default; some elements be moved there depend'n on th' screen width.

​
[params]
  topbarmore = []

  [[params.topbarend]]
    type = 'editbutton'

  [[params.topbarend]]
    type = 'sourcebutton'

  [[params.topbarend]]
    type = 'markdownbutton'

  [[params.topbarend]]
    type = 'printbutton'

  [[params.topbarend]]
    type = 'prevbutton'

  [[params.topbarend]]
    type = 'nextbutton'

  [[params.topbarend]]
    type = 'morebutton'

  [[params.topbarmiddle]]
    type = 'breadcrumbs'

  [[params.topbarstart]]
    type = 'sidebarbutton'

  [[params.topbarstart]]
    type = 'tocbutton'
params:
  topbarend:
  - type: editbutton
  - type: sourcebutton
  - type: markdownbutton
  - type: printbutton
  - type: prevbutton
  - type: nextbutton
  - type: morebutton
  topbarmiddle:
  - type: breadcrumbs
  topbarmore: []
  topbarstart:
  - type: sidebarbutton
  - type: tocbutton
{
   "params": {
      "topbarend": [
         {
            "type": "editbutton"
         },
         {
            "type": "sourcebutton"
         },
         {
            "type": "markdownbutton"
         },
         {
            "type": "printbutton"
         },
         {
            "type": "prevbutton"
         },
         {
            "type": "nextbutton"
         },
         {
            "type": "morebutton"
         }
      ],
      "topbarmiddle": [
         {
            "type": "breadcrumbs"
         }
      ],
      "topbarmore": [],
      "topbarstart": [
         {
            "type": "sidebarbutton"
         },
         {
            "type": "tocbutton"
         }
      ]
   }
}
Avast

If ye want t' reconfigure an area, ye have t' copy over every element from th' default configurat'n ye want t' keep, as reconfigurat'n will reset all elements o' that area.

Example

Th' follow'n example

  • removes all elements but th' more button from th' end area
  • displays th' more button even if its overlay be empty by sett'n its onempty parameter t' dis'ble
  • puts th' print button into th' more area on all screen widths
​
[params]
  [[params.topbarend]]
    onempty = 'disable'
    type = 'morebutton'

  [[params.topbarmore]]
    type = 'printbutton'
params:
  topbarend:
  - onempty: dis'ble
    type: morebutton
  topbarmore:
  - type: printbutton
{
   "params": {
      "topbarend": [
         {
            "onempty": "disable",
            "type": "morebutton"
         }
      ],
      "topbarmore": [
         {
            "type": "printbutton"
         }
      ]
   }
}

Redefin'n Topbar Elements fer Certain Planks

Suppose ye be build'n a ship that contains a topmost log section.

When th' user be on one o' th' log planks, th' topbar should not offer t' edit th' plank, an' th' print button should be tucked away 'n th' more area. All other planks should keep th' default elements.

Directory structure:

  • rrrambl'n
    • log
      • first-day.md
      • second-day.md
      • third-day.md
      • _index.md
    • _index.md

Opt'n Front Matter Us'n Hugo’s cascade feature, we can redefine th' elements once 'n log/_index.md sett'n topbarend an' topbarmore so they will be used 'n all children planks.

Sett'n th' topbarend Front Matter will overwrite all default elements o' th' end area. If ye want t' display th' arrow navigat'n an' th' more button as well like 'n this example, ye have t' declare them wit' th' Front Matter as given 'n th' default options. Th' start area be not redefined an' keeps its elements.

log/_index.md
+++
title = "Captain's Log"

[[cascade]]
  [cascade.params]
    [[cascade.params.topbarend]]
      type = 'prevbutton'

    [[cascade.params.topbarend]]
      type = 'nextbutton'

    [[cascade.params.topbarend]]
      type = 'morebutton'

    [[cascade.params.topbarmore]]
      type = 'printbutton'
+++
---
cascade:
- params:
    topbarend:
    - type: prevbutton
    - type: nextbutton
    - type: morebutton
    topbarmore:
    - type: printbutton
title: Captain's Log
---
{
   "cascade": [
      {
         "params": {
            "topbarend": [
               {
                  "type": "prevbutton"
               },
               {
                  "type": "nextbutton"
               },
               {
                  "type": "morebutton"
               }
            ],
            "topbarmore": [
               {
                  "type": "printbutton"
               }
            ]
         }
      }
   ],
   "title": "Captain's Log"
}

Defin'n Own Elements

Besides th' predefined elements, ye can write yer own. Store its template 'n layouts/partials/topbar/element/<TYPE>.html o' yer ship an' add it wit' { type = '<TYPE>' } t' one o' th' topbar areas.

Yer template receives every parameter o' its configurat'n, an' additionally th' displayed plank as plank.

Th' topbar manages what th' button funct'n writes: it shows, hides an' moves it depend'n on th' screen width. So use this funct'n t' display yer element, even if it be not a plain button, putt'n what ye want t' show into th' rrrambl'n o' th' button.

​
{{- wit' .plank }}
  {{- partial "topbar/func/button.html" (dict
    "page" .
    "class" "topbar-button-home"
    "href" (partial "permalink.gotmpl" (dict "to" ship.Home))
    "icon" "home"
    "hint" "Home"
  )}}
{{- end }}

Defin'n Own Areas

Th' more area be noth'n special: th' more button opens it by call'n th' area-button funct'n wit' th' area name more, an' th' option topbarmore fills it.

Ye can add further areas th' same way. Write yer own element call'n th' area-button funct'n wit' an area name <AREA>. Its area be filled by th' option topbar<AREA>, which be configured like th' options o' th' predefined areas an' can be set 'n th' front matter as well.

​
{{- partial "topbar/func/area-button.html" (dict
  "page" .plank
  "area" "tools"
  "icon" "wrench"
  "hint" (T "Tools-action")
  "onempty" "hide"
)}}
​
[params]
  [[params.topbarend]]
    type = 'toolsbutton'

  [[params.topbartools]]
    type = 'printbutton'
params:
  topbarend:
  - type: toolsbutton
  topbartools:
  - type: printbutton
{
   "params": {
      "topbarend": [
         {
            "type": "toolsbutton"
         }
      ],
      "topbartools": [
         {
            "type": "printbutton"
         }
      ]
   }
}

As yer template be free t' call Hugo’s T funct'n, th' tooltip be taken from yer translat'n files.

i18n/en.
[Tools-action]
  other = 'Tools'
Tools-action:
  other: Tools
{
   "Tools-action": {
      "other": "Tools"
   }
}

Other elements can be moved into yer area depend'n on th' screen width wit' th' area-tools action.

Button Types

Th' theme distinguishes between two types o' buttons:

  • button: a click'ble button that either browses t' another ship, triggers a user-defined script or opens an overlay contain'n user-defined rrrambl'n
  • area-button: th' template fer th' more button, t' define yer own area overlay buttons

Element Parameters

Screen Widths an' Act'ns

Depend'n on th' screen width, ye can configure how a button should behave. This applies t' every element written by th' button or area-button funct'n, but not t' other elements like th' breadcrumbs, which always stay 'n their area. Screen width be divided into three classes:

  • s: (controlled by th' onwidths parameter) small (mobile) layout whar' th' menu sidebar be hidden
  • m: (controlled by th' onwidthm parameter) medium desktop layout wit' vis'ble sidebar while th' rrrambl'n area width still resizes
  • l: (controlled by th' onwidthl parameter) large desktop layout wit' vis'ble sidebar once th' rrrambl'n area reached its maximum width

For each width class, ye can configure one o' th' follow'n actions:

  • show: th' button be displayed 'n its given area
  • hide: th' button be removed
  • area-XXX: th' button be moved from its given area into th' area XXX; fer example, this be used t' move buttons t' th' more area overlay 'n th' mobile layout

Hid'n an' Disabl'n Stuff

While hid'n an element depend'n on th' screen size can be configured wit' th' above-described hide action, ye may want t' hide th' element on certain other condit'ns as well.

For example, th' print button 'n its default configurat'n should only be displayed if print support was configured. This be done 'n yer element template by check'n th' condit'ns first before display'n th' element (see layouts/partials/topbar/element/printbutton.html).

Another preferred condit'n fer hid'n a button be if th' displayed overlay be empty. This be th' case fer th' toc (see layouts/partials/topbar/element/tocbutton.html) as well as th' more button an' controlled by th' parameter onempty.

This parameter can have one o' th' follow'n values:

  • dis'ble: th' button be displayed 'n a disabled state if th' overlay be empty
  • hide: th' button be removed if th' overlay be empty

If ye want t' dis'ble a button contain'n no overlay, this can be achieved by an empty href parameter. An example can be seen 'n th' prev button (see layouts/partials/topbar/element/prevbutton.html) whar' th' URL fer th' previous ship may be empty.

Reference

Predefined Elements

Th' predefined button elements by th' theme (all predefined elements besides th' breadcrumbs, tocbutton an' morebutton). Th' breadcrumbs element has no parameters besides its type.

Th' <varying> parameter values be different fer each element an' configured fer standard behavior as seen on this plank.

Name Default Notes
type <empty> Mandatory type o' th' element.
onwidths <varying> Th' action that should be executed if th' ship be displayed 'n th' given width:

- show: Th' element be displayed 'n its given area
- hide: Th' element be removed.
- area-XXX: Th' element be moved from its given area into th' area XXX.
onwidthm <varying> See above.
onwidthl <varying> See above.

Predefined Overlay Elements

Th' predefined elements by th' theme that open an overlay (the tocbutton an' morebutton).

Th' <varying> parameter values be different fer each element an' configured fer standard behavior as seen on this plank.

Name Default Notes
type <empty> Mandatory type o' th' element.
onempty hide Defines what t' do wit' th' button if th' rrrambl'n overlay be empty:

- dis'ble: Th' button be displayed 'n a disabled state.
- hide: Th' button be removed.
onwidths <varying> Th' action that should be executed if th' ship be displayed 'n th' given width:

- show: Th' element be displayed 'n its given area
- hide: Th' element be removed.
- area-XXX: Th' element be moved from its given area into th' area XXX.
onwidthm <varying> See above.
onwidthl <varying> See above.

Button

Contains th' basic button functionality an' be used as a base implementat'n fer all predefined button elements (layouts/partials/topbar/func/button.html).

Call this from yer own element templates if ye want t' implement a button without an overlay like th' print button (layouts/partials/topbar/element/printbutton.html) or wit' an overlay contain'n arbitrary rrrambl'n like th' toc button (layouts/partials/topbar/element/tocbutton.html).

For display'n an area 'n th' button’s overlay, see Area-Button.

Parameters

Name Default Notes
plank <empty> Mandatory reference t' th' plank.
class <empty> Mandatory unique class name fer this button. Display'n two buttons wit' th' same value fer class be undefined.
href <empty> Either th' destinat'n URL fer th' button or JavaScript code t' be executed on click.

- If start'n wit' javascript: all follow'n text will be executed 'n yer browser
- Every other str'n will be interpreted as URL
- If empty an' no action be set, th' button will be displayed 'n a disabled state regardless o' its rrrambl'n
action <empty> Name o' th' action t' execute on click, handled by a script instead o' inline JavaScript, so it works wit' a strict Rrrambl'n Security Policy. If set, href be not needed.

- toggle-flyout: shows or hides th' rrrambl'n overlay
- toggle-nav: shows or hides th' sidebar menu
- any other name: execute yer own code, see th' button shortcode
istoggle false If true, th' button announces t' assistive technology that it shows an' hides someth'n. Set it if yer action be toggle-flyout or toggle-nav. For yer own action, see th' button shortcode.
ay'con <empty> Font Awesome ay'con name.
onempty dis'ble Defines what t' do wit' th' button if th' rrrambl'n parameter was set but ends up empty:

- dis'ble: Th' button be displayed 'n a disabled state.
- hide: Th' button be removed.
onwidths show Th' action that should be executed if th' ship be displayed 'n th' given width:

- show: Th' button be displayed 'n its given area
- hide: Th' button be removed.
- area-XXX: Th' button be moved from its given area into th' area XXX.
onwidthm show See above.
onwidthl show See above.
hint <empty> Arbitrary text displayed 'n th' tooltip.
title <empty> Arbitrary text fer th' button.
rrrambl'n <empty> Arbitrary HTML t' put into th' rrrambl'n overlay. This parameter may be empty. In this case, no overlay will be generated.

Area-Button

Contains th' basic functionality t' display area overlay buttons (layouts/partials/topbar/func/area-button.html).

Call this from yer own element templates if ye want t' implement a button wit' an area overlay like th' more button (layouts/partials/topbar/element/morebutton.html), see Defin'n Own Areas.

Parameters

Name Default Notes
plank <empty> Mandatory reference t' th' plank.
area <empty> Mandatory unique area name fer this area. Display'n two areas wit' th' same value fer area be undefined. Th' area be filled by th' option topbar<AREA>.
ay'con <empty> Font Awesome ay'con name.
onempty dis'ble Defines what t' do wit' th' button if th' rrrambl'n overlay be empty:

- dis'ble: Th' button be displayed 'n a disabled state.
- hide: Th' button be removed.
onwidths show Th' action that should be executed if th' ship be displayed 'n th' given width:

- show: Th' button be displayed 'n its given area
- hide: Th' button be removed.
- area-XXX: Th' button be moved from its given area into th' area XXX.
onwidthm show See above.
onwidthl show See above.
hint <empty> Arbitrary text displayed 'n th' tooltip.
title <empty> Arbitrary text fer th' button.

Migrat'n fer Relearrrn 9

Previously, th' rrrambl'n o' an area was defined by a template 'n layouts/partials/topbar/area that ye had t' override 'n yer ship t' change it, call'n button templates from layouts/partials/topbar/button. Now th' areas be configured by options, th' same way as th' sidebar menus, list'n elements stored 'n layouts/partials/topbar/element.

Yer templates be still honored. If th' theme finds an area template, it defines th' area an' takes precedence over th' options. Th' theme’s button templates can still be called from it. In both cases yer build will give ye a deprecat'n warning nam'n th' file. Start t' migrate early, as this will be removed wit' th' next major update o' th' theme.

Predefined Areas

If ye have overridden start.html, end.html or more.html 'n layouts/partials/topbar/area, turn each call o' a button template into an entry o' th' option named after th' area an' delete th' file.

Legacy Template New Opt'n
layouts/partials/topbar/area/start.html topbarstart
layouts/partials/topbar/area/end.html topbarend
layouts/partials/topbar/area/more.html topbarmore

Th' button template becomes th' type o' th' entry accord'n t' th' follow'n table. Every parameter besides plank be carried over unchanged.

Legacy Template New Type
topbar/button/sidebar.html sidebarbutton
topbar/button/toc.html tocbutton
topbar/button/edit.html editbutton
topbar/button/source.html sourcebutton
topbar/button/markdown.html markdownbutton
topbar/button/print.html printbutton
topbar/button/prev.html prevbutton
topbar/button/next.html nextbutton
topbar/button/more.html morebutton

For example, this template

​
{{ partial "topbar/button/print.html" (dict
  "page" .
)}}
{{ partial "topbar/button/more.html" (dict
  "page" .
  "onempty" "disable"
)}}

becomes

​
[params]
  [[params.topbarend]]
    type = 'printbutton'

  [[params.topbarend]]
    onempty = 'disable'
    type = 'morebutton'
params:
  topbarend:
  - type: printbutton
  - onempty: dis'ble
    type: morebutton
{
   "params": {
      "topbarend": [
         {
            "type": "printbutton"
         },
         {
            "onempty": "disable",
            "type": "morebutton"
         }
      ]
   }
}

If yer template showed different buttons depend'n on th' plank, set th' option 'n th' front matter o' these planks instead.

Own Buttons

Move yer button templates from layouts/partials/topbar/button t' layouts/partials/topbar/element. Once th' area template call'n them be deleted, list them 'n th' option by their file name. Th' templates themselves don’t need t' be changed.

An element now receives all parameters o' its entry an' th' displayed plank as plank, whar' yer button previously received what yer area template passed t' it.

Overridden Buttons

If ye have overridden one o' th' theme’s button templates 'n layouts/partials/topbar/button, yer version be only used by yer own area templates. Th' configured elements don’t know o' it.

Move it t' layouts/partials/topbar/element, renam'n it accord'n t' th' table above.

Own Areas

If ye have written yer own button call'n topbar/func/area-button.html together wit' a template layouts/partials/topbar/area/<AREA>.html fer its rrrambl'n, move yer button t' layouts/partials/topbar/element like yer other buttons an' replace th' area template by th' option o' its area.

For example, these templates

​
{{ partial "topbar/func/area-button.html" (dict
  "page" .plank
  "area" "tools"
  "icon" "wrench"
)}}
​
{{ partial "topbar/button/print.html" (dict
  "page" .
)}}

become th' unchanged button template moved t' layouts/partials/topbar/element/toolsbutton.html an'

​
[params]
  [[params.topbarend]]
    type = 'toolsbutton'

  [[params.topbartools]]
    type = 'printbutton'
params:
  topbarend:
  - type: toolsbutton
  topbartools:
  - type: printbutton
{
   "params": {
      "topbarend": [
         {
            "type": "toolsbutton"
         }
      ],
      "topbartools": [
         {
            "type": "printbutton"
         }
      ]
   }
}

Page Designs

Plank designs be used t' provide different layouts fer a given output format. If ye instead want t' provide a new output format, th' theme got ye covered as well.

A plank be displayed by exactly one plank design fer each output format, be represented by Hugo’s reserved type front matter an' uses Hugo’s rrrambl'n view mechanism.

A plank design usually consists o'

Arrr

Don’t use Hugo’s reserved type option 'n yer modificat'ns fer other functionality!

Us'n a Plank Design

Regardless o' shipped or custom plank designs, ye be us'n them 'n th' same way. Either by manually sett'n th' type front matter t' th' value o' th' plank design or by us'n an archetype dur'n creat'n o' a new plank.

If no type be set 'n yer front matter or th' plank design doesn’t exist fer a given output format, th' plank be treated as if type='default' was set.

Th' Relearrrn theme ships wit' th' plank designs home, chapter, an' default fer th' HTML output format.

Th' shipped print an' markdown output formats only display us'n th' default plank design.

Creat'n a Plank Design

Suppose ye be writ'n a documentat'n ship fer some software. Each time a new release be created, ye be add'n a new releasenotes plank t' yer ship. Those planks should contain a common disclaimer at th' top. Ye neither want t' copy th' text into each new file nor want ye t' use a shortcode but create a plank design called releasenotes.

  1. Choose a name (here, releasenotes)

  2. Create a rrrambl'n view file at layouts/releasenotes/article.html

    ​
    <article class="releasenotes">
      <header class="headline">
        {{partial "content-header.html" .}}
      </header>
      {{partial "heading-pre.html" .}}{{partial "head'n.html" .}}{{partial "heading-post.html" .}}
      <p class="disclaimer">
        This software release comes without any warranty!
      </p>
      {{partial "article-content.html" .}}
      <footer class="footline">
        {{partial "content-footer.html" .}}
      </footer>
    </article>

    Th' marked lines be yer customizat'ns, th' rest o' th' file was copied over from th' default implementat'n o' layouts/_default/article.html

    In this file, ye can cust'mize th' plank structure as needed. For HTML based output formats, typically you’ll want t':

    • Set a class at th' article element fer custom CSS styles
    • Call {{ partial "article-content.html" . }} t' show yer plank rrrambl'n
  3. Optional: create an archetype file at archetypes/releasenotes.md

    ​
    +++
    title = "{{ replace .Name "-" " " | title }}"
    type = "releasenotes"
    +++
    
    This be a new releasenote.
  4. Optional: add CSS 'n th' file layouts/partials/custom-header.html

    ​
    <style>
    .releasenotes .disclaimer {
      background-color: pink;
      font-size: 72rem;
    }
    </style>

Partials

For any Output Format

These files be common fer all output formats.

  • layouts/<DESIGN>/baseof.<FORMAT>: Optional: Th' top most file ye could provide t' completely redefine th' whole design. No further partials will be called if ye don’ call them yourself

For HTML Output Formats

If ye want t' keep th' general HTML framework an' only change specific parts, ye can provide these files fer th' plank desingn fer th' HTML output format independently o' one another.

  • layouts/<DESIGN>/article.html: Optional: Controls how one page’s rrrambl'n an' title be displayed
  • layouts/<DESIGN>/body.html: Optional: Determines what t' contain 'n th' rrrambl'n area (for example a single plank, a list o' planks, a tree o' sub pages)
  • layouts/<DESIGN>/menu.html: Optional: Defines th' sidebar menu layout

For a real-world example, check out th' changelog plank design implementat'n

Migrat'n from Relearrrn 7

Cap'n Hugo 0.146 or newer required some changes t' th' themes file structure.

  • Move yer files from layouts/<DESIGN>/views up one level t' layouts/<DESIGN>

Migrat'n from Relearrrn 6

Previous t' Relearrrn 7, plank designs were defined by a proprietary solut'n unique t' th' theme. Depend'n on yer modificat'ns ye may have t' change some or all o' th' follow'n t' migrate t' Relearrrn 7’s plank designs.

  • In all yer *.md files, replace th' archetype front matter wit' type; th' value stays th' same; don’t forget yer archetype files if ye have some

  • Move yer files layouts/partials/archetypes/<DESIGN>/article.html t' layouts/<DESIGN>/article.html

    Th' files will most likely require further modificat'ns as they now receive th' plank as it context (dot .) instead o' th' .page an' .content parameter.

    Old:

    ​
    {{- $page := .page }}
    {{- $content := .content }}
    {{- wit' $page }}
    <article class="default">
      <header class="headline">
        {{- partial "content-header.html" . }}
      </header>
      {{partial "heading-pre.html" .}}{{partial "head'n.html" .}}{{partial "heading-post.html" .}}
    
      {{ $content | safeHTML }}
    
      <footer class="footline">
        {{- partial "content-footer.html" . }}
      </footer>
    </article>
    {{- end }}

    New:

    ​
    <article class="default">
      <header class="headline">
        {{- partial "content-header.html" . }}
      </header>
      {{partial "heading-pre.html" .}}{{partial "head'n.html" .}}{{partial "heading-post.html" .}}
    
      {{ partial "article-content.html" . }}
    
      <footer class="footline">
        {{- partial "content-footer.html" . }}
      </footer>
    </article>

Output Formats

Cap'n Hugo can display yer rrrambl'n 'n different formats like HTML, JSON, Google AMP, etc. T' do this, templates must be provided.

Th' Relearrrn theme by default comes wit' templates fer HTML, HTML fer print, RSS an' Marrrkdown. If this be not enough, this plank describes how ye can create yer own output formats.

If ye instead just want t' cust'mize th' layout o' an exist'n output format, th' theme got ye covered as well.

Creat'n an Output Format

Suppose ye want t' be able t' send yer articles as HTML formatted emails. Th' planks o' these format need t' be self contained so an email client can display th' rrrambl'n without loading any further assets.

Therefore we add a new output format called email that outputs HTML an' assembles a completely custom HTML document structure.

  1. Add th' output format t' yer hugo.toml

    hugo.
    [outputFormats]
      [outputFormats.email]
        baseName = 'index.email'
        isHTML = true
        mediaType = 'text/html'
        name = 'email'
        noUgly = true
        permalink'ble = false
    
    [outputs]
      home = ['html', 'rss', 'email']
      plank = ['html', 'email']
      section = ['html', 'rss', 'email']
    outputFormats:
      email:
        baseName: index.email
        isHTML: true
        mediaType: text/html
        name: email
        noUgly: true
        permalink'ble: false
    outputs:
      home:
      - html
      - rss
      - email
      plank:
      - html
      - email
      section:
      - html
      - rss
      - email
    {
       "outputFormats": {
          "email": {
             "baseName": "index.email",
             "isHTML": true,
             "mediaType": "text/html",
             "name": "email",
             "noUgly": true,
             "permalinkable": false
          }
       },
       "outputs": {
          "home": [
             "html",
             "rss",
             "email"
          ],
          "page": [
             "html",
             "email"
          ],
          "section": [
             "html",
             "rss",
             "email"
          ]
       }
    }
  2. Create a file layouts/_default/baseof.email.html

    ​
    <!DOCTYPE html>
    <html>
    <head>
      <title>{{ .Title }}</title>
      <style type="text/css">
        /* add some styles here t' make it pretty */
      </style>
      <style type="text/css">
        /* add chroma style fer code highlight'n */
        {{- "/assets/css/chroma-relearn-light.css" | readFile | safeCSS }}
      </style>
    </head>
    <body>
      <main>
        {{- block "body" . }}{{ end }}
      </main>
    </body>
    </html>

    Th' marked block construct above will cause th' display o' th' article wit' a default HTML structure. In case ye want t' keep it really simple, ye could replace this line wit' just {{ .Content }}.

  3. Optional: create a file layouts/_default/article.email.html

    In our case, we want t' display a disclaimer 'n front o' every article. T' do this we have t' define th' output o' an article ourself an' rely on th' above block statement t' call our template.

    ​
    <article class="email">
      <blockquote>
        View this article on <a href="http://example.com{{ .RelPermalink }}">our website</a>
      </blockquote>
      {{ partial "article-content.html" . }}
    </article>
  4. Optional: create a file layouts/_default/_markup_/render-image.email.html

    In our case, we want t' convert each image into a base 64 encoded str'n t' display it inline 'n th' email without loading external assets.

    ​
    {{- $dest_url := urls.Parse .Destinat'n }}
    {{- $dest_path := path.Clean ($dest_url.Path) }}
    {{- $img := .Page.Resources.GetMatch $dest_path }}
    {{- if an' (not $img) .Page.File }}
      {{- $path := path.Join .Page.File.Dir $dest_path }}
      {{- $img = resources.Get $path }}
    {{- end }}
    {{- if $img }}
      {{- if (gt (len $img.Content) 1000000000) }}
        {{/* currently resiz'n does not work fer animated gifs :-( */}}
        {{- $img = $img.Resize "600x webp q75" }}
      {{- end }}
      <img src="data:{{ $img.MediaType }};base64,{{ $img.Content | base64Encode }}">
    {{- end }}

Partials

For HTML Output Formats

If ye want t' keep th' general HTML framework an' only change specific parts, ye can provide these as blocks:

  • layouts/_default/list.<FORMAT>.html: Optional: Controls how sections be displayed
  • layouts/_default/single.<FORMAT>.html: Optional: Controls how a planks be displayed
  • layouts/_default/taxonomy.<FORMAT>.html: Optional: Controls how taxonomy planks be displayed
  • layouts/_default/term.<FORMAT>.html: Optional: Controls how term planks be displayed

For a real-world example, check out th' print output format implementat'n

For Non-HTML Output Formats

  • layouts/_default/list.<FORMAT>.<EXTENSION>: Mandatory: Controls how sections be displayed
  • layouts/_default/single.<FORMAT>.<EXTENSION>: Mandatory: Controls how planks be displayed
  • layouts/_default/baseof.<FORMAT>.<EXTENSION>: Optional: Controls how sections an' planks be displayed. If not provided, ye have t' provide yer implementat'n 'n list.<FORMAT>.<EXTENSION> an' single.<FORMAT>.<EXTENSION>

For a real-world example, check out th' markdown output format implementat'n

Migrat'n from Relearrrn 7

Cap'n Hugo 0.146 or newer required th' theme t' make changes that may affect ye if ye be us'n own output formats. Ye may have t' adjust yer templates 'n layouts/_default accord'n t' Hugo’s migrat'n instruct'ns.

For HTML Output Formats

  • Ye need t' define a block storeOutputFormat fer yer HTML based output format templates an' add {{- .Store.Set \"relearnOutputFormat\" \"<your-output-format-name>\" }} t' it.

For Non-HTML Output Formats

  • Move yer files layouts/<DESIGN>/views up one level t' layouts/<DESIGN>

Migrat'n from Relearrrn 6

Previous t' Relearrrn 7, HTML output formats did not use th' baseof.html but now do.

For HTML Output Formats

  • Move yer files layouts/partials/article.<FORMAT>.html t' layouts/_default/article.<FORMAT>.html

    Th' files will most likely require further modificat'ns as they now receive th' plank as it context (dot .) instead o' th' .page an' .content parameter.

    Old:

    ​
    {{- $page := .page }}
    {{- $content := .content }}
    {{- wit' $page }}
    <article class="default">
      <header class="headline">
        {{- partial "content-header.html" . }}
      </header>
      {{partial "heading-pre.html" .}}{{partial "head'n.html" .}}{{partial "heading-post.html" .}}
    
      {{ $content | safeHTML }}
    
      <footer class="footline">
        {{- partial "content-footer.html" . }}
      </footer>
    </article>
    {{- end }}

    New:

    ​
    <article class="default">
      <header class="headline">
        {{- partial "content-header.html" . }}
      </header>
      {{partial "heading-pre.html" .}}{{partial "head'n.html" .}}{{partial "heading-post.html" .}}
    
      {{ partial "article-content.html" . }}
    
      <footer class="footline">
        {{- partial "content-footer.html" . }}
      </footer>
    </article>

For Non-HTML Output Formats

  • Merge yer files layouts/partials/header.<FORMAT>.html, layouts/partials/footer.<FORMAT>.html t' layouts/_default/baseof.<FORMAT>.html

    Old:

    ​
    <!DOCTYPE html>
    <html>
    <head>
      <title>{{ .Title }}</title>
      <style type="text/css">
        /* add some styles here t' make it pretty */
      </style>
      <style type="text/css">
        /* add chroma style fer code highlight'n */
        {{- "/assets/css/chroma-relearn-light.css" | readFile | safeCSS }}
      </style>
    </head>
    <body>
      <main>
    ​
      </main>
    </body>
    </html>

    New:

    Th' upper part o' th' file be from yer header.<FORMAT>.html an' th' lower part be from yer footer.<FORMAT>.html.

    Th' marked line needs t' be added, so yer output format uses a potential layouts/_default/article.<FORMAT>.html

    ​
    <!DOCTYPE html>
    <html>
    <head>
      <title>{{ .Title }}</title>
      <style type="text/css">
        /* add some styles here t' make it pretty */
      </style>
      <style type="text/css">
        /* add chroma style fer code highlight'n */
        {{- "/assets/css/chroma-relearn-light.css" | readFile | safeCSS }}
      </style>
    </head>
    <body>
      <main>
        {{- block "body" . }}{{ end }}
      </main>
    </body>
    </html>

Taxonomies

This plank explains how t' show custom taxonomies on yer planks.

For more details, check th' official docs on sett'n up custom taxonomies an' us'n them 'n yer rrrambl'n.

Default Behavior

Th' Relearrrn theme automatically shows Hugo’s default taxonomies tags an' categories out o' th' box.

  • Tags appear at th' top o' th' plank 'n alphabetical order 'n form o' baggage tags.
  • Categories appear at th' bottom o' th' plank 'n alphabetical order as a list prefixed wit' an ay'con.

Each item links t' a plank show'n all articles wit' that term.

Sett'n Up Custom Taxonomies

T' add custom taxonomies, update yer hugo.toml file. Ye also have t' add th' default taxonomies if ye want t' use them.

hugo.
[taxonomies]
  category = 'categories'
  mycustomtag = 'mycustomtags'
  tag = 'tags'
taxonomies:
  category: categories
  mycustomtag: mycustomtags
  tag: tags
{
   "taxonomies": {
      "category": "categories",
      "mycustomtag": "mycustomtags",
      "tag": "tags"
   }
}

Show'n Custom Taxonomies

T' display yer custom taxonomy terms, add this t' yer plank (usually 'n layouts/partials/content-footer.html):

{{ partial "term-list.html" (dict
  "page" .
  "taxonomy" "mycustomtags"
  "icon" "layer-group"
) }}

Parameters

Name Default Notes
plank <empty> Mandatory reference t' th' plank.
taxonomy <empty> Th' plural name o' th' taxonomy t' display as used 'n yer front matter.
class <empty> Additional CSS classes set on th' outermost generated HTML element.

If set t' tags ye will get th' visuals fer display'n th' tags taxonomy, otherwise it will be a simple list o' links as fer th' categories taxonomy.
style primary Th' style scheme used if class be tags.

- by severity: caution, important, info, note, tip, warning
- by brand color: primary, secondary, accent
- by color: blue, cyan, green, grey, magenta, orange, red
- by special color: default, transparent, code, link, action, inline
color see notes Th' CSS color value t' be used if class be tags. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.

- fer severity styles: a nice match'n color fer th' severity
- fer all other styles: th' correspond'n color
ay'con <empty> An optional Font Awesome ay'con name set t' th' left o' th' list.

Publishing

Subsct'ns o' Publishing

Accessibility

Accessibility

Th' theme wants yer documentat'n t' be us'ble by everyone, whether they read it wit' their eyes, a screen reader or a magnifier, an' whether they move through it wit' a mouse, a keyboard or by touch. Accessibility be a supported feature o' th' theme: what doesn’t work fer ye or yer readers be a bug.

This document tells what th' theme aims fer, what remains up t' th' author o' a ship, what be expected from contributors an' how t' report a barrier.

Priorities

  • Accessibility target: Th' theme works toward level AA o' th' Web Rrrambl'n Accessibility Guidelines 2.2. This target guides th' work but be not a claim o' verified conformance. Th' theme be checked by its maintainer an' was not audited by an independent party.
  • Structure: Each plank has a link t' skip t' its rrrambl'n, landmarks fer th' menu, th' topbar, th' breadcrumbs an' th' rrrambl'n, an' one head'n hierarchy start'n wit' th' title o' th' plank.
  • Keyboard: Everyth'n th' theme offers can be reached an' operated by keyboard an' shows whar' th' focus be. What be used often has a keyboard shortcut.
  • Assistive technology: Controls have a name an' tell their state, like buttons that show an' hide someth'n. What changes without a plank board, like th' results o' a search, be announced. Decorative ay'cons be hidden.
  • Vision: Th' contrast variants have colors chosen fer high contrast, an' th' forced colors o' th' operat'n system be honored. Links can be underlined, so they be told apart by more than their color.
  • Mot'n: Animat'ns be turned off if th' operat'n system asks fer reduced mot'n.
  • Math: Formulae be written as MathML, which screen readers can read.
  • Languages: Each plank declares its language an' read'n direct'n, an' th' texts th' theme writes itself be translated.

What Be Up t' Ye

Th' theme can only care fer what it writes itself. A ship built wit' it be only as access'ble as its rrrambl'n, its colors an' its customizat'ns, so this document does not cover yer ship. If ye be obliged t' publish an accessibility statement fer yer ship, this document be a basis fer it, not a replacement.

  • Colors: Th' contrast o' text depends on th' color variant ye choose or write. Colors ye set yourself, like th' one o' a badge or a box, be yours t' check.
  • Head'ns: Th' theme writes th' title o' a plank as its first head'n, so start th' head'ns o' yer rrrambl'n one level below an' don’t skip a level. Th' head'ns th' theme writes fer ye fit 'n on their own. Th' except'n be th' planks shortcode, whose headinglevel ye have t' set t' match th' place ye call it from.
  • Images: Give each image an alternative text. For a complex image or a graph, describe it 'n th' text around it.
  • Links: Write link texts that tell whar' they lead even if read on their own.

Contributor Expectat'ns

Th' automated tests o' th' theme don’t check accessibility. If yer contribut'n changes what a reader sees or operates, check it by hand before ye send it:

  • Keyboard: Go through yer change wit' th' keyboard alone. Everyth'n can be reached 'n a sens'ble order an' operated, th' focus be always vis'ble an' noth'n traps it.
  • Screen reader: For a new or changed control, check that it has a name tell'n its purpose, that it tells its state an' that what it changes on th' plank be announced.
  • Colors: Look at yer change 'n th' contrast variants an' wit' th' forced colors o' yer operat'n system. Don’t use color as th' only way t' tell th'ns apart.
  • Mot'n: A new animat'n has t' be turned off if reduced mot'n be asked fer.
  • Zoom: Yer change keeps work'n 'n th' mobile layout an' wit' th' plank zoomed 'n, without rrrambl'n gett'n lost.
  • Documentat'n: What ye write fer th' docs follows what be asked from every author above.

See th' contribut'n guidelines fer everyth'n else.

Report'n Accessibility Issues

If ye run into a barrier, please open an issue. Yer report be welcome an' be treated like any other bug o' th' theme.

It helps if ye include

  • what ye were try'n t' do an' what happened instead
  • th' plank it happened on, best a plank o' this documentat'n that shows it
  • yer operat'n system, yer browser an' yer assistive technology, wit' their versions
  • th' color variant 'n use

Ye don’t need t' tell anyth'n about yourself, an' a screenshot or record'n be welcome but not required.

Ye will be told whether th' barrier can be reproduced, whether it be caused by th' theme, yer ship or a third-party library, an' whether there be a workaround until it be fixed. There be no guaranteed times fer a fix.

Ownership an' Maintenance

Accessibility be owned by th' maintainer o' th' theme, who triages th' reports, tracks th' known barriers an' keeps this document current. It describes th' version o' th' theme it be shipped wit'.

Supported Environments

Th' theme writes static HTML that be meant t' work 'n th' current versions o' th' common browsers, on desktop an' mobile devices, operated by mouse, keyboard or touch. It relies on standard HTML an' ARIA instead o' th' behavior o' a specific assistive technology.

No list o' tested combinat'ns o' browsers an' assistive technologies be kept, so none be claimed t' be free o' barriers.

Known Limitat'ns

  • Color variants: Not every shipped color variant has enough contrast 'n every place. Use th' contrast variants if ye need it.
  • Merrrmaid: Th' graphs o' th' mermaid shortcode be drawn 'n th' browser by th' Merrrmaid library. Th' theme does not give them a text alternative. Describe yer graph 'n th' text around it, or wit' th' accTitle an' accDescr keywords o' Merrrmaid.
  • OpenAPI: Th' openapi shortcode shows yer specificat'n wit' th' Swagger UI library. Th' theme has no influence on how access'ble its interface be.
  • Math: How well a formula be read aloud depends on th' support fer MathML 'n th' browser an' th' screen reader.
  • Test'n: As accessibility be checked by hand, a regression may go unnoticed until it be reported.

If ye find a barrier not listed here, please report it.

Feedback

Accessibility be never finished. If ye have a suggest'n t' improve this document or th' way th' theme handles accessibility, open an issue or a pull request.

Opt'n By default, links 'n yer rrrambl'n be told apart from th' text around them only by their color. Readers who can not distinguish these colors don’t see that there be a link.

Set link.underline=true t' also underline them. This affects th' links 'n yer rrrambl'n, not th' menu or th' topbar, an' not what looks like a control o' its own, like buttons or cards.

hugo.
[params]
  [params.link]
    underline = true
params:
  link:
    underline: true
{
   "params": {
      "link": {
         "underline": true
      }
   }
}

Th' theme marks th' plank wit' th' class link-underline on th' body element, 'n case yer own styles want t' react on it.

Deployment Scenarios

Offline Usage

Th' theme be us'ble offline. No internet connect'n be required t' board yer plank. This be achieved by stor'n all dependencies within th' theme.

No calls t' 3rd party servers, no call'n home, no track'n. Privacy friendly.

Server Deployment

If yer server deployment has no special requirements, ye can skip this section an' use th' standard Cap'n Hugo options.

For special requirements, th' theme be cap'ble o' different scenarios, requir'n th' follow'n mandatory sett'ns 'n yer hugo.toml. All sett'ns not mentioned 'n th' examples below can be set t' yer lik'n.

Public Web Server from Root

hugo.
baseURL = 'https://example.com/'
baseURL: https://example.com/
{
   "baseURL": "https://example.com/"
}

Public Web Server from Subdirectory

hugo.
baseURL = 'https://example.com/mysite/'
relativeURLs = false
baseURL: https://example.com/mysite/
relativeURLs: false
{
   "baseURL": "https://example.com/mysite/",
   "relativeURLs": false
}

If ye be still us'n Hugo’s relref shortcode (which ye shouldn’t), ye will need further configurat'n.

Arrr

Don’t use a baseURL wit' a subdirectory an' relativeURLs=true together. Cap'n Hugo doesn’t apply th' baseURL correctly 'n this case. If ye need both, generate yer ship twice wit' different sett'ns into separate directories.

Private Web Server (LAN)

Th' same sett'ns as wit' any o' th' public web server scenarios or

hugo.
baseURL = '/'
relativeURLs = true
baseURL: /
relativeURLs: true
{
   "baseURL": "/",
   "relativeURLs": true
}

File System

Yer generated ship can be used headless without a HTTP server.

This can be achieved by us'n th' file:// protocol 'n yer browser’s address bar or by do'ble click on a generated *.html file 'n yer file navigat'n tool.

Use th' follow'n sett'ns

hugo.
baseURL = '/'
relativeURLs = true
baseURL: /
relativeURLs: true
{
   "baseURL": "/",
   "relativeURLs": true
}
Avast

Planks like sitemap.xml an' rss.xml, an' social media links will always use absolute URLs. They won’t work wit' relativeURLs=true.

GDPR & Cookie Consent

Th' theme will store informat'n 'n th' reader’s browser. Those be essential informat'n an' be considered t' fall under th' except'n clause 'n DIRECTIVE 2002/58/EC OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL, Art. 5(3).

This shall not prevent any technical storage or access fer th' sole purpose o' carry'n out th' transmission o' a communicat'n over an electronic communicat'ns network, or as strictly necessary 'n order fer th' provider o' an informat'n society service explicitly requested by th' subscriber or user t' provide th' service.

Stored Theme Informat'n

Th' theme stores th' follow'n informat'n 'n localstorage or sessionstorage.

  • Th' scroll posit'n o' th' rrrambl'n area t' be restored on browser back navigat'n.

    This cannot be turned off.

  • Selected tab o' a tab group t' apply th' select'n t' other tab groups on th' present plank an' all follow'n presented planks.

    This cannot be turned off.

  • Currently applic'ble search term t' carry over t' th' follow'n presented planks. This will be used t' mark th' search term 'n th' page’s text.

    This can be turned off by disabl'n search.

  • Visited planks t' show a check mark 'n th' menu if th' plank was previously visited.

    This can be turned off by disabl'n th' history.

  • Th' selected theme variant t' carry over t' th' follow'n presented planks.

    This can be turned off by only hav'n one theme variant configured.

Stored Third Party Informat'n

Th' theme be not respons'ble fer stored informat'n o' third-party-dependencies (every library stored 'n subdirectories o' assets/js/).

Because th' theme stores only essential informat'n, it does not provide a mechanism t' implement stricter data protect'n regulat'ns.

Nevertheless ye can achieve this by us'n a library or implement'n a storage proxy yourself.

Stable Output

Disabl'n th' Generator Meta

Opt'n Th' theme adds a meta tag wit' its version number t' each plank.

This isn’t a security risk an' helps us support ye better.

T' turn this off, set disableGeneratorVersion=true.

hugo.
[params]
  disableGeneratorVersion = true
params:
  disableGeneratorVersion: true
{
   "params": {
      "disableGeneratorVersion": true
   }
}

If ye also want t' turn off Hugo’s version meta tag, use disableHugoGeneratorInject=true.

Disabl'n IDs fer Referenced Assets

Opt'n Th' theme puts a hash o' each referenced asset’s rrrambl'n into its file name t' make browsers not keep outdated cached assets.

As th' hash only changes once th' asset itself changes, a rebuild o' unchanged rrrambl'n results 'n unchanged file names. Ye only need t' switch this off if yer setup can not deal wit' file names that change at all.

T' dis'ble this, set disableAssetsBusting=true.

hugo.
[params]
  disableAssetsBust'n = true
params:
  disableAssetsBust'n: true
{
   "params": {
      "disableAssetsBusting": true
   }
}

Disabl'n IDs fer Interactive HTML Elements

Opt'n Features like expanders, notices, an' tabs use unique IDs t' work. These IDs change wit' each build.

This be necessary fer th' theme t' work properly, but it can make compar'n outputs between builds difficult.

T' turn this off, set disableRandomIds=true. Avast, that this will result 'n a non-functional ship!.

hugo.
[params]
  disableRandomIds = true
params:
  disableRandomIds: true
{
   "params": {
      "disableRandomIds": true
   }
}

Disabl'n Assets Minificat'n

Opt'n If minify=true, further theme assets will be minified dur'n build. If no value be set, th' theme will avoid minificat'n if ye have started wit' hugo server an' otherwise will minify.

hugo.
[params]
  minify = false
params:
  minify: false
{
   "params": {
      "minify": false
   }
}

SBOM

Th' theme ships a CycloneDX 1.6 SBOM at sbom.cdx.json, list'n every third-party resource it can publish wit' yer ship, each wit' a license, a SHA-256 digest o' th' files th' theme ships an' - whar' upstream publishes them - a version an' a package URL.

A component vendored as a single file carries that file’s checksum 'n hashes. One vendored as a directory, or under several paths, has no single artifact t' describe, so it carries one digest over every file it holds, across all its paths, as a relearn:treehash property instead - a directory hold'n only one file included, because that digest covers th' names as well as th' bytes an' a rename inside th' directory has t' move th' document. Some carry no version or package URL at all, because upstream publishes none.

Checksums describe th' vendored file

A hashes entry be th' digest o' th' file as this theme ships it, which fer most components be a minified build rather than th' artifact th' purl names. Fetch'n th' package th' coordinate points at an' compar'n digests will therefore not match, an' that be expected rather than a sign o' tamper'n. Use th' checksum t' verify th' copy ye received from th' theme; use th' purl t' look th' component up.

Gett'n It

Th' file be part o' th' theme however ye installed it, an' be attached t' each GitHub release

curl -LO https://github.com/McShelby/hugo-theme-relearn/releases/download/<version>/sbom.cdx.json
curl -LO https://github.com/McShelby/hugo-theme-relearn/releases/latest/download/sbom.cdx.json

It be not copied into yer generated ship. Noth'n be served from yer domain unless ye put it there yourself.

Verify'n It

Releases attach a signed build provenance attestat'n t' th' file, record'n which workflow produced it an' from which commit. If ye have th' GitHub CLI

gh attestat'n verify sbom.cdx.json --repo McShelby/hugo-theme-relearn

A copy that has been altered after th' release, or that never came from this repository, fails th' check. Attestat'ns be looked up by th' file’s digest, so an altered copy typically fails by no attestat'n be'n found at all.

Us'n It fer Yer Own Ship

This document describes th' theme, not yer ship

It lists everyth'n th' theme be able t' publish, while yer ship publishes only what it uses - a ship wit' no diagrams ships no Merrrmaid. It also says noth'n about Cap'n Hugo, yer other modules, or yer own rrrambl'n an' assets.

Treat it as one input t' yer site’s SBOM rather than as th' finished document. Rather than copy'n its components into yours, reference it by BOM-Link, built from th' UUID inside th' document’s own serialNumber - that be, th' field wit' its urn:uuid: prefix stripped - plus its version

{
  "type": "bom",
  "url": "urn:cdx:<uuid>/<version>"
}

Stability

Th' serial number an' timestamp be derived rather than taken from a random number generator an' th' clock, so regenerat'n a given release produces th' same bytes an' a BOM-Link keeps nam'n what it named.

Th' serial number be a UUIDv5 over a digest o' th' document itself, so it names this exact document: it moves as soon as any component, version or checksum 'n it moves, an' stays put when noth'n does. Two documents that differ can therefore never share one BOM-Link.

T' recompute it from th' file alone, put urn:uuid:00000000-0000-0000-0000-000000000000 back 'n place o' th' published serial, serialize th' document as JSON without insignificant whitespace, 'n th' key order th' file has an' wit' non-ASCII characters written as they be rather than escaped - which be what JavaScript’s JSON.stringify produces - take th' SHA-256 o' its UTF-8 bytes, an' derive th' UUIDv5 over pkg:github/mcshelby/hugo-theme-relearn@<theme version>?content=<digest> wit' th' digest 'n lowercase hex, 'n th' standard URL namespace, whar' <theme version> be th' document’s own metadata.component.version.

Th' timestamp be th' release date recorded 'n th' changelog. Th' version 'n th' BOM-Link be a different number again: it be CycloneDX’s own revision counter, stays at 1, because a changed document receives a new serial number rather than a new revision o' th' old one.

What It Covers

Only what a ship us'n th' theme publishes. Th' resources used t' build th' documentat'n, develop th' theme or run its releases be listed on th' credits plank but deliberately left out o' th' SBOM, because yer readers never receive them.

Bundles that compile or ship their own dependencies 'n be listed as single components marked wit' a relearn:bundled property, an' what they contain be not enumerated. Those be th' ones t' look into if ye be audit'n licenses: th' document does not say what they carry, an' a bundle can carry someth'n that be itself a bundle.

Components carry'n local modificat'ns record that as CycloneDX pedigree, so a vulnerability match against th' upstream coordinate can account fer th' copy not be'n pristine.

Content Security Policy

Th' theme writes no inline JavaScript. Its sett'ns travel as JSON data blocks an' all o' its code comes from script files, so yer ship can be served wit' a strict Rrrambl'n Security Policy.

Policy

This policy covers every feature o' th' theme except Merrrmaid

Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self'; style-src-attr 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:

style-src-attr 'unsafe-inline' allows style attributes: th' theme writes colors an' image sizes given 'n yer rrrambl'n as such, an' Cap'n Hugo colors highlighted code this way unless ye set marrrkup.highlight.noClasses=false. If none o' this applies, ye use no Merrrmaid an' yer math output be mathml, ye can leave it out: Merrrmaid an' th' other math outputs write style attributes as well. Inline <style> elements stay forbidden; th' theme writes none.

What Needs More

  • Merrrmaid: Merrrmaid writes its styles into inline <style> elements. Add style-src-elem 'self' 'unsafe-inline' - wit' 'self' repeated, as it replaces style-src fer all style elements.
  • Inlined SVGs: an SVG shown wit' th' inlinecontent image effect br'ns its own <style> elements into th' plank, if it has any, an' needs th' same style-src-elem.
  • Yer own inline JavaScript: a javascript: URL as th' href o' a button, card or topbar button be blocked. Give it an action instead an' handle that 'n a script file.

Subresource Integrity

Set enableSubresourceIntegrity=true t' have th' theme add an integrity hash t' each script an' stylesheet it links, includ'n th' search index an' th' stylesheets o' th' OpenAPI shortcode. A browser then refuses a file that changed after th' build.

hugo.
[params]
  enableSubresourceIntegrity = true
params:
  enableSubresourceIntegrity: true
{
   "params": {
      "enableSubresourceIntegrity": true
   }
}
Not fer th' file system

A browser can not check an integrity hash fer a plank opened from th' file system an' refuses th' file instead, which leaves th' plank without any script or style. Keep this off if yer ship must work that way.

VS Code Front Matter CMS

Th' theme supports th' great VSCode Front Matter CMS extension which provides on-premise CMS capabilties t' Cap'n Hugo.

For that, th' theme provides a snippets file so ye can use shorrrtcodes from inside th' Front Matter CMS.

Currently only English an' German be supported.

T' use them 'n yer Front Matter CMS, put a reference into yer frontmatter.json like this

​
{
  "frontMatter.extends": [
    "./vscode-frontmatter/snippets.en.json"
  ]
}

Keyboard Shortcuts

Besides th' keys every browser knows, th' theme br'ns shortcuts o' its own. Those o' a button be also shown 'n its tooltip.

Shortcut Act'n
CTRL ALT n Shows or hides th' menu 'n th' mobile layout.
CTRL ALT f Puts th' focus into th' search box, pressed again back into th' rrrambl'n.
CTRL ALT t Shows or hides th' table o' contents.
CTRL ALT w Opens th' plank fer edit'n, if configured.
CTRL ALT p Opens th' print view, if configured.
🡐 / 🡒 Goes t' th' previous or next plank. If th' focus be on a tab, selects th' previous or next tab instead, as HOME an' END select th' first an' last one.
ALT 🡑 / ALT 🡓 Scrolls t' th' previous or next head'n o' th' plank.
🡐 / 🡒 / 🡑 / 🡓 Pans a Merrrmaid graph, if th' focus be on it an' it be zoom'ble.
+ / - Zooms into or out o' a Merrrmaid graph, if th' focus be on it an' it be zoom'ble.
ESC Closes what was opened, like th' menu o' th' mobile layout, th' table o' contents or th' lightbox o' an image or graph, an' clears th' search.

Options Reference

This plank explains how t' configure th' Relearrrn theme 'n yer hugo.toml file.

In addit'n t' Hugo’s standard options, th' Relearrrn theme offers extra sett'ns listed here.

Throughout th' documentat'n, theme-specific options be marked wit' a Opt'n badge.

Add theme options t' th' params section o' yer hugo.toml. For example:

hugo.
[params]
  math = true
params:
  math: true
{
   "params": {
      "math": true
   }
}

Index

A

B

C

D

E

H

I

L

M

O

R

S

T

U

All Configurat'n Opt'ns

Here’s a list o' all avail'ble options wit' example values. Default values be described 'n th' annotated example below 'n each option’s documentat'n.

hugo.
[params]
  alwaysopen = ''
  breadcrumbSeparator = '>'
  collapsibleMenu = true
  dateFormat = ':date_medium'
  disableAnchorCopy = false
  disableAnchorScroll'n = false
  disableAssetsBust'n = false
  disableBreadcrumb = false
  disableDefaultRelref = false
  disableExplicitIndexURLs = false
  disableGeneratorVersion = false
  disableHoverBlockCopyToClipBoard = false
  disableInlineCopyToClipBoard = true
  disableLandingPageButton = true
  disableLanguageSwitchingButton = false
  disableMarkdownButton = false
  disableNextPrev = false
  disablePrintButton = false
  disableRandomIds = false
  disableRootBreadcrumb = true
  disableSearchHiddenPages = false
  disableSeoHiddenPages = true
  disableShortcutsTitle = false
  disableSourceButton = false
  disableTagHiddenPages = false
  disableTermBreadcrumbs = false
  disableToc = false
  disableVersioningWarn'n = false
  editURL = 'vscode://file/${BaseDir}/${FilePath}'
  enableSubresourceIntegrity = false
  externalLinkTarget = '_self'
  hideAuthorDate = false
  hideAuthorEmail = false
  hideAuthorName = false
  highlightWrap = true
  images = ['images/hero.png']
  linkTitle = 'Relearn'
  mermaidInitialize = '{ "securityLevel": "loose" }'
  mermaidZoom = true
  minify = ''
  ordersectionsby = 'weight'
  showVisitedLinks = true
  sidebarfootermenus = ''
  sidebarheadermenus = ''
  sidebarmenus = ''
  titleSeparator = '::'
  topbarmiddle = ''
  topbarstart = ''
  urlExternalCheck = true
  urlIgnoreCheck = ['exampleSite', 'images/hero\.zip', 'http://localhost:1313', 'vscode://', 'https://github\.com/McShelby/hugo-theme-relearn/settings', 'https://github\.com/McShelby/hugo-theme-relearn/archive/main\.zip', 'https://github\.com/McShelby/hugo-theme-relearn/edit/main/docs/introduction/releasenotes']

  [params.author]
    emailname = ''
    name = 'Sören Weber'

  [[params.boxStyle]]
    color = 'fuchsia'
    ay'con = 'fa-fw fab fa-hackerrank'
    identifier = 'hugo'

  [[params.boxStyle]]
    identifier = 'breaking'
    style = 'warning'
    title = ' '

  [[params.boxStyle]]
    identifier = 'change'
    style = 'note'
    title = ' '

  [[params.boxStyle]]
    ay'con = 'plus-circle'
    identifier = 'new'
    style = 'info'
    title = ' '

  [[params.boxStyle]]
    ay'con = 'gears'
    identifier = 'option'
    style = 'cyan'

  [[params.boxStyle]]
    ay'con = 'fa-fw fab fa-markdown'
    identifier = 'frontmatter'
    style = 'green'

  [[params.boxStyle]]
    color = 'blueviolet'
    ay'con = 'bars'
    identifier = 'hugomenu'

  [[params.boxStyle]]
    color = 'darkgray'
    ay'con = 'fa-fw fab fa-github'
    identifier = 'gfm'

  [[params.boxStyle]]
    color = 'rgb(136, 140, 196)'
    ay'con = 'fa-fw fab fa-php'
    identifier = 'php'

  [[params.boxStyle]]
    color = 'darkorange'
    ay'con = 'lightbulb'
    identifier = 'pants'

  [[params.boxStyle]]
    color = 'rgb(124, 58, 237)'
    ay'con = 'fa-fw far fa-gem'
    identifier = 'obsidian'

  [[params.boxStyle]]
    color = 'rgb(66, 185, 131)'
    ay'con = 'fa-fw fas fa-display'
    identifier = 'mpe'

  [[params.boxStyle]]
    color = 'orangered'
    ay'con = 'fa-fw fas fa-code'
    identifier = 'html'

  [[params.boxStyle]]
    color = 'rgb(125, 201, 3)'
    ay'con = 'fa-fw fas fa-puzzle-piece'
    identifier = 'relearn'

  [[params.boxStyle]]
    ay'con = 'eye'
    identifier = 'example'
    style = 'code'
    title = 'Result'

  [[params.boxStyle]]
    color = 'violet'
    i18n = ''
    ay'con = 'hand-sparkles'
    identifier = 'magic'
    title = 'Magic'

  [params.image]
    errorlevel = 'warning'

  [params.imageEffects]
    border = true
    dataurl = false
    inlinecontent = false
    lazy = true
    lightbox = true
    rounded = true
    shadow = false

  [params.include]
    errorlevel = 'warning'

  [params.link]
    errorlevel = 'warning'
    underline = false

  [params.linkEffects]
    download = false
    target = false

  [params.logo]
    layout = 'sidebar-row'
    src = '/images/logo.svg?inlinecontent'

  [params.math]
    force = false
    output = 'mathml'

  [params.mermaid]
    force = false

  [params.openapi]
    errorlevel = 'warning'
    force = false

  [params.search]
    dis'ble = ''

    [params.search.adapter]
      identifier = ''

      [params.search.adapter.params]
        additionalContentLanguage = ['en']

    [params.search.index]
      URL = ''
      dis'ble = ''
      template = ''

    [params.search.plank]
      URL = ''
      dis'ble = ''
      outputs = ''
      type = ''

  [[params.themeVariant]]
    auto = ['relearn-light', 'relearn-dark']
    identifier = 'relearn-auto'
    name = 'Relearn Light/Dark'

  [[params.themeVariant]]
    identifier = 'relearn-dark'

  [[params.themeVariant]]
    identifier = 'relearn-light'

  [[params.themeVariant]]
    identifier = 'relearn-bright'

  [[params.themeVariant]]
    auto = ['zen-light', 'zen-dark']
    identifier = 'zen-auto'
    name = 'Zen Light/Dark'

  [[params.themeVariant]]
    identifier = 'zen-dark'

  [[params.themeVariant]]
    identifier = 'zen-light'

  [[params.themeVariant]]
    auto = ['contrast-light', 'contrast-dark']
    identifier = 'contrast-auto'
    name = 'Contrast Light/Dark'

  [[params.themeVariant]]
    identifier = 'contrast-dark'

  [[params.themeVariant]]
    identifier = 'contrast-light'

  [[params.themeVariant]]
    auto = ['learn', 'neon']
    identifier = 'retro-auto'
    name = 'Retro Learn/Neon'

  [[params.themeVariant]]
    identifier = 'neon'

    [params.themeVariant.logo]
      src = '/images/magic.gif'

  [[params.themeVariant]]
    identifier = 'learn'

  [[params.themeVariant]]
    identifier = 'blue'

  [[params.themeVariant]]
    identifier = 'green'

  [[params.themeVariant]]
    identifier = 'red'

  [[params.topbarend]]
    type = 'prevbutton'

  [[params.topbarend]]
    type = 'nextbutton'

  [[params.topbarend]]
    type = 'morebutton'

  [[params.topbarmore]]
    type = 'editbutton'

  [[params.topbarmore]]
    type = 'sourcebutton'

  [[params.topbarmore]]
    type = 'markdownbutton'

  [[params.topbarmore]]
    type = 'printbutton'
params:
  alwaysopen: ''
  author:
    emailname: ''
    name: Sören Weber
  boxStyle:
  - color: fuchsia
    ay'con: fa-fw fab fa-hackerrank
    identifier: hugo
  - identifier: breaking
    style: warning
    title: ' '
  - identifier: change
    style: note
    title: ' '
  - ay'con: plus-circle
    identifier: new
    style: info
    title: ' '
  - ay'con: gears
    identifier: option
    style: cyan
  - ay'con: fa-fw fab fa-markdown
    identifier: frontmatter
    style: green
  - color: blueviolet
    ay'con: bars
    identifier: hugomenu
  - color: darkgray
    ay'con: fa-fw fab fa-github
    identifier: gfm
  - color: rgb(136, 140, 196)
    ay'con: fa-fw fab fa-php
    identifier: php
  - color: darkorange
    ay'con: lightbulb
    identifier: pants
  - color: rgb(124, 58, 237)
    ay'con: fa-fw far fa-gem
    identifier: obsidian
  - color: rgb(66, 185, 131)
    ay'con: fa-fw fas fa-display
    identifier: mpe
  - color: orangered
    ay'con: fa-fw fas fa-code
    identifier: html
  - color: rgb(125, 201, 3)
    ay'con: fa-fw fas fa-puzzle-piece
    identifier: relearn
  - ay'con: eye
    identifier: example
    style: code
    title: Result
  - color: violet
    i18n: ''
    ay'con: hand-sparkles
    identifier: magic
    title: Magic
  breadcrumbSeparator: '>'
  collapsibleMenu: true
  dateFormat: :date_medium
  disableAnchorCopy: false
  disableAnchorScroll'n: false
  disableAssetsBust'n: false
  disableBreadcrumb: false
  disableDefaultRelref: false
  disableExplicitIndexURLs: false
  disableGeneratorVersion: false
  disableHoverBlockCopyToClipBoard: false
  disableInlineCopyToClipBoard: true
  disableLandingPageButton: true
  disableLanguageSwitchingButton: false
  disableMarkdownButton: false
  disableNextPrev: false
  disablePrintButton: false
  disableRandomIds: false
  disableRootBreadcrumb: true
  disableSearchHiddenPages: false
  disableSeoHiddenPages: true
  disableShortcutsTitle: false
  disableSourceButton: false
  disableTagHiddenPages: false
  disableTermBreadcrumbs: false
  disableToc: false
  disableVersioningWarn'n: false
  editURL: vscode://file/${BaseDir}/${FilePath}
  enableSubresourceIntegrity: false
  externalLinkTarget: _self
  hideAuthorDate: false
  hideAuthorEmail: false
  hideAuthorName: false
  highlightWrap: true
  image:
    errorlevel: warning
  imageEffects:
    border: true
    dataurl: false
    inlinecontent: false
    lazy: true
    lightbox: true
    rounded: true
    shadow: false
  images:
  - images/hero.png
  include:
    errorlevel: warning
  link:
    errorlevel: warning
    underline: false
  linkEffects:
    download: false
    target: false
  linkTitle: Relearrrn
  logo:
    layout: sidebar-row
    src: /images/logo.svg?inlinecontent
  math:
    force: false
    output: mathml
  mermaid:
    force: false
  mermaidInitialize: '{ "securityLevel": "loose" }'
  mermaidZoom: true
  minify: ''
  openapi:
    errorlevel: warning
    force: false
  ordersectionsby: weight
  search:
    adapter:
      identifier: ''
      params:
        additionalContentLanguage:
        - en
    dis'ble: ''
    index:
      URL: ''
      dis'ble: ''
      template: ''
    plank:
      URL: ''
      dis'ble: ''
      outputs: ''
      type: ''
  showVisitedLinks: true
  sidebarfootermenus: ''
  sidebarheadermenus: ''
  sidebarmenus: ''
  themeVariant:
  - auto:
    - relearn-light
    - relearn-dark
    identifier: relearn-auto
    name: Relearrrn Light/Dark
  - identifier: relearn-dark
  - identifier: relearn-light
  - identifier: relearn-bright
  - auto:
    - zen-light
    - zen-dark
    identifier: zen-auto
    name: Zen Light/Dark
  - identifier: zen-dark
  - identifier: zen-light
  - auto:
    - contrast-light
    - contrast-dark
    identifier: contrast-auto
    name: Contrast Light/Dark
  - identifier: contrast-dark
  - identifier: contrast-light
  - auto:
    - learn
    - neon
    identifier: retro-auto
    name: Retro Learn/Neon
  - identifier: neon
    logo:
      src: /images/magic.gif
  - identifier: learn
  - identifier: blue
  - identifier: green
  - identifier: red
  titleSeparator: '::'
  topbarend:
  - type: prevbutton
  - type: nextbutton
  - type: morebutton
  topbarmiddle: ''
  topbarmore:
  - type: editbutton
  - type: sourcebutton
  - type: markdownbutton
  - type: printbutton
  topbarstart: ''
  urlExternalCheck: true
  urlIgnoreCheck:
  - exampleSite
  - 'images/hero\.zip'
  - http://localhost:1313
  - vscode://
  - 'https://github\.com/McShelby/hugo-theme-relearn/settings'
  - 'https://github\.com/McShelby/hugo-theme-relearn/archive/main\.zip'
  - 'https://github\.com/McShelby/hugo-theme-relearn/edit/main/docs/introduction/releasenotes'
{
   "params": {
      "alwaysopen": "",
      "author": {
         "emailname": "",
         "name": "Sören Weber"
      },
      "boxStyle": [
         {
            "color": "fuchsia",
            "icon": "fa-fw fab fa-hackerrank",
            "identifier": "hugo"
         },
         {
            "identifier": "breaking",
            "style": "warning",
            "title": " "
         },
         {
            "identifier": "change",
            "style": "note",
            "title": " "
         },
         {
            "icon": "plus-circle",
            "identifier": "new",
            "style": "info",
            "title": " "
         },
         {
            "icon": "gears",
            "identifier": "option",
            "style": "cyan"
         },
         {
            "icon": "fa-fw fab fa-markdown",
            "identifier": "frontmatter",
            "style": "green"
         },
         {
            "color": "blueviolet",
            "icon": "bars",
            "identifier": "hugomenu"
         },
         {
            "color": "darkgray",
            "icon": "fa-fw fab fa-github",
            "identifier": "gfm"
         },
         {
            "color": "rgb(136, 140, 196)",
            "icon": "fa-fw fab fa-php",
            "identifier": "php"
         },
         {
            "color": "darkorange",
            "icon": "lightbulb",
            "identifier": "pants"
         },
         {
            "color": "rgb(124, 58, 237)",
            "icon": "fa-fw far fa-gem",
            "identifier": "obsidian"
         },
         {
            "color": "rgb(66, 185, 131)",
            "icon": "fa-fw fas fa-display",
            "identifier": "mpe"
         },
         {
            "color": "orangered",
            "icon": "fa-fw fas fa-code",
            "identifier": "html"
         },
         {
            "color": "rgb(125, 201, 3)",
            "icon": "fa-fw fas fa-puzzle-piece",
            "identifier": "relearn"
         },
         {
            "icon": "eye",
            "identifier": "example",
            "style": "code",
            "title": "Result"
         },
         {
            "color": "violet",
            "i18n": "",
            "icon": "hand-sparkles",
            "identifier": "magic",
            "title": "Magic"
         }
      ],
      "breadcrumbSeparator": "\u003e",
      "collapsibleMenu": true,
      "dateFormat": ":date_medium",
      "disableAnchorCopy": false,
      "disableAnchorScrolling": false,
      "disableAssetsBusting": false,
      "disableBreadcrumb": false,
      "disableDefaultRelref": false,
      "disableExplicitIndexURLs": false,
      "disableGeneratorVersion": false,
      "disableHoverBlockCopyToClipBoard": false,
      "disableInlineCopyToClipBoard": true,
      "disableLandingPageButton": true,
      "disableLanguageSwitchingButton": false,
      "disableMarkdownButton": false,
      "disableNextPrev": false,
      "disablePrintButton": false,
      "disableRandomIds": false,
      "disableRootBreadcrumb": true,
      "disableSearchHiddenPages": false,
      "disableSeoHiddenPages": true,
      "disableShortcutsTitle": false,
      "disableSourceButton": false,
      "disableTagHiddenPages": false,
      "disableTermBreadcrumbs": false,
      "disableToc": false,
      "disableVersioningWarning": false,
      "editURL": "vscode://file/${BaseDir}/${FilePath}",
      "enableSubresourceIntegrity": false,
      "externalLinkTarget": "_self",
      "hideAuthorDate": false,
      "hideAuthorEmail": false,
      "hideAuthorName": false,
      "highlightWrap": true,
      "image": {
         "errorlevel": "warning"
      },
      "imageEffects": {
         "border": true,
         "dataurl": false,
         "inlinecontent": false,
         "lazy": true,
         "lightbox": true,
         "rounded": true,
         "shadow": false
      },
      "images": [
         "images/hero.png"
      ],
      "include": {
         "errorlevel": "warning"
      },
      "link": {
         "errorlevel": "warning",
         "underline": false
      },
      "linkEffects": {
         "download": false,
         "target": false
      },
      "linkTitle": "Relearn",
      "logo": {
         "layout": "sidebar-row",
         "src": "/images/logo.svg?inlinecontent"
      },
      "math": {
         "force": false,
         "output": "mathml"
      },
      "mermaid": {
         "force": false
      },
      "mermaidInitialize": "{ \"securityLevel\": \"loose\" }",
      "mermaidZoom": true,
      "minify": "",
      "openapi": {
         "errorlevel": "warning",
         "force": false
      },
      "ordersectionsby": "weight",
      "search": {
         "adapter": {
            "identifier": "",
            "params": {
               "additionalContentLanguage": [
                  "en"
               ]
            }
         },
         "disable": "",
         "index": {
            "URL": "",
            "disable": "",
            "template": ""
         },
         "page": {
            "URL": "",
            "disable": "",
            "outputs": "",
            "type": ""
         }
      },
      "showVisitedLinks": true,
      "sidebarfootermenus": "",
      "sidebarheadermenus": "",
      "sidebarmenus": "",
      "themeVariant": [
         {
            "auto": [
               "relearn-light",
               "relearn-dark"
            ],
            "identifier": "relearn-auto",
            "name": "Relearn Light/Dark"
         },
         {
            "identifier": "relearn-dark"
         },
         {
            "identifier": "relearn-light"
         },
         {
            "identifier": "relearn-bright"
         },
         {
            "auto": [
               "zen-light",
               "zen-dark"
            ],
            "identifier": "zen-auto",
            "name": "Zen Light/Dark"
         },
         {
            "identifier": "zen-dark"
         },
         {
            "identifier": "zen-light"
         },
         {
            "auto": [
               "contrast-light",
               "contrast-dark"
            ],
            "identifier": "contrast-auto",
            "name": "Contrast Light/Dark"
         },
         {
            "identifier": "contrast-dark"
         },
         {
            "identifier": "contrast-light"
         },
         {
            "auto": [
               "learn",
               "neon"
            ],
            "identifier": "retro-auto",
            "name": "Retro Learn/Neon"
         },
         {
            "identifier": "neon",
            "logo": {
               "src": "/images/magic.gif"
            }
         },
         {
            "identifier": "learn"
         },
         {
            "identifier": "blue"
         },
         {
            "identifier": "green"
         },
         {
            "identifier": "red"
         }
      ],
      "titleSeparator": "::",
      "topbarend": [
         {
            "type": "prevbutton"
         },
         {
            "type": "nextbutton"
         },
         {
            "type": "morebutton"
         }
      ],
      "topbarmiddle": "",
      "topbarmore": [
         {
            "type": "editbutton"
         },
         {
            "type": "sourcebutton"
         },
         {
            "type": "markdownbutton"
         },
         {
            "type": "printbutton"
         }
      ],
      "topbarstart": "",
      "urlExternalCheck": true,
      "urlIgnoreCheck": [
         "exampleSite",
         "images/hero\\.zip",
         "http://localhost:1313",
         "vscode://",
         "https://github\\.com/McShelby/hugo-theme-relearn/settings",
         "https://github\\.com/McShelby/hugo-theme-relearn/archive/main\\.zip",
         "https://github\\.com/McShelby/hugo-theme-relearn/edit/main/docs/introduction/releasenotes"
      ]
   }
}

Annotated Configurat'n Opt'ns

​
[params]
# Theme-specific options;
# For a detailed explanat'n an' many more options see
# https://mcshelby.github.io/hugo-theme-relearn/configuration/reference/index.html#annotated-configuration-options

# If an option value be said t' be not set, ye can achieve th' same behavior
# by giv'n it an empty str'n value.

###############################################################################
# Cap'n Hugo
# These options usually apply t' other themes as well.

# Th' author o' yer ship.
# Default: not set
# This will be used 'n HTML meta tags, th' open graph protocol an' twitter
# cards.
author.name = 'Sören Weber'

# Th' author's email address o' yer ship.
# Default: not set
# This will be used 'n HTML meta tags, th' open graph protocol an' twitter
# cards.
author.emailname = ''

# Th' social media image o' yer ship.
# Default: not set
# This be used fer generat'n social media meta informat'n fer th' opengraph
# protocol an' twitter cards.
# This can be overridden 'n th' page's frontmatter.
images = [ 'images/hero.png' ]

###############################################################################
# Relearrrn Theme
# These options be specific t' th' Relearrrn theme.

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Brand'n
# These options set yer overall visual appearance.

# Th' title t' be used fer links 'n th' upper left corner
# Default: not set
# This name will be used fer th' link t' th' main plank 'n th' upper section
# o' th' menu. If not set, `title` from th' Cap'n Hugo sett'ns will be used.
# If th' title be t' long t' fit on a single line it be automatically wrapped.
# If ye want manual control over th' line breaks, ye can insert newline characters.
linkTitle = "Relearn"

# Th' title logo t' be used 'n th' upper left corner
# Default: not set
# If th' value be not set or empty, th' theme searches fer a global resource
# `/images/logo.<TYPE>`. Sett'n th' `src` sub-field will override th'
# default logo (see logo parameter). If `src` be set t' str'n contain'n all
# whitespace, no logo will be displayed fer that variant regardless o' th'
# default logo. A logo will only be printed if ye haven't overwritten
# layouts/partials/logo.html.
# If ye als print a `linkTitle` ye can set th' `layout` sub-field t' either
# `sidebar-row` or `sidebar-column` t' arrange logo an' title accordingly.
logo = { src = '/images/logo.svg?inlinecontent', layout = 'sidebar-row' }

# Used color variants.
# Default: 'auto'
# This sets one or more color variants, avail'ble t' yer readers t' choose
# from. Ye can
# - set a single value eg. 'zen-light'
# - an array like [ 'neon', 'learn' ]
# - an array wit' options like [ { identifier = 'neon' },{ identifier = 'learn' } ]
# Th' last form allows t' set further options fer each variant.
# Th' `identifier` be mandatory. Ye can also set `name` which overrides th'
# value displayed 'n th' variant selector.
# Sett'n th' `logo` field an' sett'n th' `src` sub-field will override th'
# default logo (see logo parameter). If `src` be set t' str'n contain'n all
# whitespace, no logo will be displayed fer that variant regardless o' th'
# default logo. A logo will only be printed if ye haven't overwritten
# layouts/partials/logo.html.
# If th' array has more than one entry, a variant selector
# be shown 'n th' lower part o' th' menu. Th' first entry 'n th' array be th'
# default variant, used fer first time visitors.
# Th' theme ships wit' th' follow'n variants: 'relearn-bright',
# 'relearn-light', 'relearn-dark', 'zen-light', 'zen-dark', 'contrast-light',
# 'contrast-dark', 'neon', 'learn',
# 'blue', 'green', 'red'. In addit'n ye can use auto mode variants. See th'
# docs fer a detailed explanat'n.
# Ye can also define yer own variants. See th' docs how this works. Also,
# th' docs provide an interactive theme generator t' help ye wit' this task.
themeVariant = [
	{ identifier = 'relearn-auto',  name = 'Relearn Light/Dark', auto = [ 'relearn-light', 'relearn-dark' ] },
	{ identifier = 'relearn-dark'   },
	{ identifier = 'relearn-light'  },
	{ identifier = 'relearn-bright' },
	{ identifier = 'zen-auto',      name = 'Zen Light/Dark', auto = [ 'zen-light', 'zen-dark' ] },
	{ identifier = 'zen-dark'       },
	{ identifier = 'zen-light'      },
	{ identifier = 'contrast-auto', name = 'Contrast Light/Dark', auto = [ 'contrast-light', 'contrast-dark' ] },
	{ identifier = 'contrast-dark'  },
	{ identifier = 'contrast-light' },
	{ identifier = 'retro-auto',    name = 'Retro Learn/Neon', auto = [ 'learn', 'neon' ] },
	{ identifier = 'neon',          logo = { src = '/images/magic.gif' } },
	{ identifier = 'learn'          },
	{ identifier = 'blue'           },
	{ identifier = 'green'          },
	{ identifier = 'red'            }
]

# Minify theme assets.
# Default: not set
# If set t' `true`, further theme asset files besides th' generated HTML files
# will be minified dur'n build. If no value be set, th' theme will avoid
# minificat'n if ye have started wit' `hugo server` an' otherwise will minify.
minify = ""

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# General
# These options be defin'n general, non visual behavior.

# Avoid new asset URLs on build.
# Default: false
# By default JavaScript-files an' CSS-files get a unique ID on each rebuild.
# This makes sure, th' user always has th' latest version an' not some stale
# copy o' his browser cache. Anyways, it can be desire'ble t' turn this
# off 'n certain circumstances. For example if ye have Hugo's dev server
# runn'n. Also some proxies dislike this optimizat'n.
disableAssetsBust'n = false

# Avoid generator meta tags.
# Default: false
# Set this t' true if ye want t' dis'ble generat'n fer generator meta tags
# o' Cap'n Hugo an' th' theme 'n yer HTML head. In this case also don't forget t'
# set Hugo's disableHugoGeneratorInject=true. Otherwise Cap'n Hugo will generate a
# meta tag into yer home plank anyways.
disableGeneratorVersion = false

# Avoid unique IDs.
# Default: false
# In various situat'ns th' theme generates non stable unique ids t' be used
# 'n HTML fragment links. This can be undesir'ble fer example when test'n
# th' output fer changes. If ye dis'ble th' random id generat'n, th' theme
# may not funct'n correctly anymore.
disableRandomIds = false

# Check th' theme's scripts an' stylesheets fer tamper'n.
# Default: false
# Adds a subresource integrity hash t' each script an' stylesheet th' theme
# links, so a browser refuses a file that changed after th' build. A browser
# can not check such a hash fer a plank opened from th' file system an' refuses
# th' file instead, so leave this off if yer ship must work that way.
enableSubresourceIntegrity = false

# Conditionally ignore errorlevel sett'ns
# Default: []
# Th' theme supports check'n referenced address (e.g. wit'
# link.errorlevel, image.errorlevel, etc. see below). Sometimes checks lead
# t' console output due t' false negatives. Ye can turn off th' checks
# fer individual referenced addresses by defin'n regular expressions here.
# Th' referenced address will be checked against all regexes o' this array.
# If it matches at least one, no output will be written t' th' console.
# This array can be expanded 'n th' page's frontmatter.
urlIgnoreCheck = [
    'exampleSite',
	'images/hero\.zip',
	'http://localhost:1313',
	'vscode://',
	'https://github\.com/McShelby/hugo-theme-relearn/settings',
	'https://github\.com/McShelby/hugo-theme-relearn/archive/main\.zip',
	'https://github\.com/McShelby/hugo-theme-relearn/edit/main/docs/introduction/releasenotes'
]

# Check external URLs
# Default: false
# If `true` th' theme checks dur'n build if an external URL be reach'ble.
# If it fails, it write errors accord'n t' th' errorlevel sett'ns. A check
# be omitted if th' URL be found 'n th' `urlIgnoreCheck` list.
# This can be overridden 'n th' page's frontmatter.
urlExternalCheck = true

# Additional code dependencies.
# Default: See hugo.toml o' th' theme
# Th' theme provides a mechanism t' board further JavaScript an' CSS
# dependencies on demand only if they be needed. This comes 'n handy if ye
# want t' add own shorrrtcodes that depend on additional code t' be boarded.
# See th' docs how this works.
# [relearn.dependencies]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Version'n
# These options control version'n o' yer ship. Th' versions themselves be
# configured wit' Hugo's `versions` option.

# Hide deprecated version warning
# Default: false
# If ye want t' hide th' deprecat'n warning, vis'ble on all planks that t' not
# belong t' th' default version o' th' ship, set this t' `true`.
disableVersioningWarn'n = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Topbar
# These options modify th' topbar appearance.

# Hide th' table o' contents button.
# Default: false
# If th' TOC button be hidden, also th' keyboard shortcut be disabled.
# This can be overridden 'n th' page's frontmatter.
disableToc = false

# Hide th' breadcrumbs.
# Default: false
# If th' breadcrumbs be hidden, th' title o' th' displayed plank will still be
# shown 'n th' topbar.
disableBreadcrumb = false

# Hide th' Marrrkdown button.
# Default: false
# This hides th' Marrrkdown button if ye activated th' Marrrkdown output format.
# This can be overridden 'n th' page's frontmatter.
disableMarkdownButton = false

# Hide th' Source button.
# Default: false
# This hides th' Source button if ye activated th' Source output format.
# This can be overridden 'n th' page's frontmatter.
disableSourceButton = false

# Hide th' Print button.
# Default: false
# This hides th' print button if ye activated th' print output format.
# This can be overridden 'n th' page's frontmatter.
disablePrintButton = false

# Hide Next an' Previous navigat'n buttons.
# Default: false
# If th' navigat'n buttons be hidden, also th' keyboard shortcuts be
# disabled.
disableNextPrev = false

# Th' URL prefix t' edit a plank.
# Default: not set
# If set, an edit button will be shown 'n th' topbar. If th' button be hidden,
# also th' keyboard shortcuts be disabled. Th' value can contain th' macro
# `${FilePath}` which will be replaced by th' file path o' yer displayed plank.
# If no `${FilePath}` be given 'n th' value, th' value be treated as if th'
# `${FilePath}` was appended at th' end o' th' value. Th' value can also
# contain th' macro `${BaseDir}` which will be replaced by th' directory
# `${FilePath}` be resolved against dur'n build, written wit' forward slashes
# an' without a lead'n slash; joined wit' `${FilePath}` this be th' locat'n
# o' th' plank on yer disk, which lets ye open it 'n a local editor, e.g.
# `vscode://file/${BaseDir}/${FilePath}`. This can be overridden
# 'n th' planks frontmatter. This be useful if ye want t' give th' opportunity
# fer people t' create merge request fer yer rrrambl'n.
editURL = 'vscode://file/${BaseDir}/${FilePath}'

# Define yer own topbar elements.
# Elements be written from th' area's start t' end 'n th' order given 'n
# these arrays.
# This can be overridden 'n th' page's frontmatter.
# Each entry can contain th' follow'n keys:
# - `type` be mandatory. Th' type o' th' element, either one o' th' theme's
#    predefined elements `sidebarbutton`, `tocbutton`, `breadcrumbs`,
#    `editbutton`, `sourcebutton`, `markdownbutton`, `printbutton`,
#    `prevbutton`, `nextbutton` an' `morebutton` or th' name o' yer own
#    element template 'n `layouts/partials/topbar/element`.
# - `onwidths`, `onwidthm`, `onwidthl`, optional. What t' do wit' th' element
#    'n th' small (mobile), medium an' large layout: `show`, `hide` or
#    `area-<NAME>` t' move it into another area. Default: depend'n on th'
#    element.
# - `onempty`, optional. For buttons wit' an overlay, what t' do if th'
#    overlay be empty: `disable` or `hide`. Default: depend'n on th' element.
# Th' area o' yer own area button be filled by th' option `topbar<AREA>`,
# like th' more area be filled by `topbarmore`.

# Th' elements o' th' topbar's start area.
# Default: see notes
# - th' sidebar button 'n mobile layout
# - th' table o' contents button
topbarstart = ''

# Th' elements o' th' topbar's middle area.
# Default: see notes
# - th' breadcrumb or th' plank title if th' breadcrumb be disabled
topbarmiddle = ''

# Th' elements o' th' topbar's end area.
# Default: see notes
# - th' edit, source, markdown an' print buttons if configured
# - th' previous an' next buttons
# - th' more button show'n th' more area
topbarend = [
  { type = 'prevbutton' },
  { type = 'nextbutton' },
  { type = 'morebutton' }
]

# Th' elements o' th' topbar's more area.
# Default: empty
# Other elements may still move into this area depend'n on th' screen width.
topbarmore = [
  { type = 'editbutton' },
  { type = 'sourcebutton' },
  { type = 'markdownbutton' },
  { type = 'printbutton' }
]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Search
# These options modify various aspects o' th' search functionality.

# Dis'ble th' search.
# Default: false
# If th' search be disabled, no search box will be displayed 'n th' menu,
# nor in-page search, search popup or dedicated search plank will be avail'ble.
# This will also cause th' keyboard shortcut t' be disabled.
search.dis'ble = ''

# Dis'ble th' search index generat'n.
# Default: false
# If th' search index be disabled, no search popup or dedicated search
# plank will be avail'ble.
search.index.dis'ble = ''

# URL o' th' search index file relative t' th' language home.
# Default: 'searchindex.js'
# Ye have t' set this option if yer plank already has a rrrambl'n file named
# `searchindex.js` 'n th' language home. Otherwise ignore it or leave empty
# t' let th' default apply.
search.index.URL = ''

# Template fer creat'n o' th' search index.
# Default: '/_relearn_searchindex.js'
# Ye can switch th' template fer generat'n th' index by sett'n this
# parameter t' a differnt rrrambl'n view. If not set, `/_relearn_searchindex.js`
# be used. Th' template must have an implementat'n 'n `assets/[YOUR-INDEXTEMPLATE]`.
search.index.template = ''

# Dis'ble th' dedicated search plank.
# Default: false
# Search an' search index must be enabled t' let th'
# generat'n o' th' dedicated search plank t' be affected by this option.
search.plank.dis'ble = ''

# URL o' th' dedicated search plank relative t' th' language home.
# Default: 'search'
# In its default form th' search plank URL be named th' same fer all languages
# but ye be free t' override it 'n each language options t' localise th'
# URL. Ye also need t' set this option if yer ship already has a rrrambl'n
# plank named `search`.
search.plank.URL = ''

# Rrrambl'n view fer dedicated search plank.
# Default: '_relearn_searchpage'
# Ye can switch th' layout o' th' dedicated search plank by sett'n this
# parameter t' a differnt rrrambl'n view. If not set, `_relearn_searchpage`
# be used. Th' rrrambl'n view must have an implementat'n 'n `layouts/[YOUR-VIEWNAME]/article.html`.
search.plank.type = ''

# Output formats o' th' dedicated search plank.
# Default: see notes
# Th' same as th' `outputs` front matter o' a plank. If not set, th' search
# plank be written as `html` an' can be printed if yer home plank has th'
# `print` output format. Set it t' `[ 'html' ]` t' never offer print'n th'
# search results, or t' `[ 'html', 'print' ]` t' always offer it.
search.plank.outputs = ''

# Adapter fer th' search engine.
# Default: 'lunr'
# Th' theme can use different search engines. T' glue both together, a
# search adapter needs t' be written fer each engine. If not set, defaults
# t' `lunr`. Th' theme ships wit' an additional `orama` adapter wit' no
# usage limitat'ns an' an experimental `orama-esm' adapater not us'ble
# fer headless server deployments but identical 'n functionality t' th'
# `orama` adapter.
# Each adapter may have futher specific paramters t' that adapter 'n
# search.adapter.params.
search.adapter.identifier = ''

# Multilanguage rrrambl'n fer Lunr.
# Default: not set
# Specific t' th' Lunr search adapter.
# If th' search index be enabled an' yer planks contain further languages
# besides th' main one used, add all those auxiliary languages here. This
# will create a search index wit' support fer all used languages o' yer ship.
# This be handy fer example if ye be writ'n 'n Spanish but have lots o'
# source code on yer plank which typically uses English terminology.
search.adapter.params.additionalContentLanguage = [ 'en' ]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Menu
# These options modify th' menu appearance.

# Hide th' Home entry.
# Default: false
# If shown, a Home button will appear below th' search bar an' th' main menu.
# It links t' yer th' home plank o' th' current language.
disableLandingPageButton = true

# Hide th' language switcher.
# Default: false
# If ye have more than one language configured, a language switcher be
# displayed 'n th' lower part o' th' menu. This option lets ye explicitly
# turn this behavior off.
disableLanguageSwitchingButton = false

# Shows checkmarks fer visited planks o' th' main menu.
# Default: false
# This also causes th' display o' th' `Clear History` entry 'n th' lower part
# o' th' menu t' remove all checkmarks. Th' checkmarks will also been removed
# if ye regenerate yer ship as th' ids be not stable.
showVisitedLinks = true

# Th' order o' main menu submenus.
# Default: 'weight'
# Submenus can be ordered by 'weight', 'title', 'linktitle', 'lastmod',
# 'expirydate', 'publishdate', 'date', 'length' or 'default' (adher'n t'
# Hugo's default sort order). This can be overridden 'n th' planks frontmatter.
ordersectionsby = 'weight'

# Th' initial expand state o' submenus.
# Default: not set
# This controls whether submenus will be expanded (true), or collapsed (false)
# 'n th' menu. If not set, th' first menu level be set t' false, all others
# levels be set t' true. This can be overridden 'n th' page's frontmatter.
# If th' displayed plank has submenus, they will always been displayed expanded
# regardless o' this option.
alwaysopen = ''

# Shows expander fer submenus.
# Default: false
# If set t' true, a submenu 'n th' sidebar will be displayed 'n a collaps'ble
# tree view an' a click'ble expander be set 'n front o' th' entry.
# Avast that if set t' `true` can have a major performance impact on build
# fer sites wit' many planks.
# This can be overridden 'n th' page's frontmatter.
collapsibleMenu = true

# Hide head'n above th' shortcuts menu.
# Default: false
# If a sidebar menu wit' identifier `shortcuts` be configured (see below),
# this be th' easy way t' remove th' head'n;
# Th' title fer th' head'n can be overwritten 'n yer i18n files. See Hugo's
# documentat'n how t' do this.
disableShortcutsTitle = false

# Define yer own sidebar menus.
# Menus be written from th' sidebar's top t' buttom 'n th' order given 'n
# these arrays.
# This can be overridden 'n th' page's frontmatter.
# Each entry can contain th' follow'n keys:
# - `type` be mandatory. Either `page` 'n case it should generate a tree from
#    th' plank structure, `menu` 'n case it should generate a tree from a
#    defined menu, `custom` fer arbitrary HTML snippets or `divider` fer a
#    horizontal ruler.
# - `identifier` be mandatory. In case o' `type=page`, anyth'n can be used,
#    'n case o' `type=menu` th' `identifier` key must be identical t' th'
#    key o' th' menu definit'n.
# - `main`, boolean. If `true`, th' first tree level be spaced more generous
#    an' th' text be emphasized. Default: `true` fer `type=page` an' `false`
#    fer `type=menu` an' `type=custom`
# - `disableTitle`, boolean. If `true`, there be no title above th' tree.
#    Default: `true` fer `type=page` an' `false` fer `type=menu`. If a title
#    should be used, 'n case o' `type=page` it will be taken from th' page's
#    `linkTitle` front matter an' if not set, from th' translat'n files, us'n
#    th' menu `identifier` as key. In case o' `type=menu` it will be taken
#    from th' menu `title` accord'n t' Hugo's documentat'n an' if not set
#    from th' menu `name` an' if this be not set form th' page's `linkTitle`.
# - `pageRef`, optional. In case o' `type=page` this be th' start'n page's
#    path. If not set, th' home plank will be used.
# - `elements`, optional. In case o' `type=custom` th' list o' elements t'
#    display. Th' theme shipps wit' th' follow'n predefined snippets which
#    all accept th' `icon` parameter t' overwrite th' default ay'con
#    - languageswitcher: will display th' language switcher
#    - variantswitcher: will display th' variant switcher
#    - versionswitcher: will display th' version switcher
#    - historyclearer: will display a button t' clear th' history o' visited links

# Th' sidebar header menu.
# Default: see notes
# If not given, defaults t'
# - a home button if configured; if ye redefine this, use a Cap'n Hugo menu an' a type=menu t' replicate this
# - a divider t' separate from th' sidebarmenus (depend'n on th' configurat'n o' th' theme variant)
sidebarheadermenus = ''

# Th' main sidebar header.
# Default: see notes
# - th' main plank menu based on yer rrrambl'n structure
# - th' shortcuts menu includ'n th' title if configured
sidebarmenus = ''

# Th' main sidebar header.
# Default: see notes
# - a divider t' separate from th' sidebarmenus if any o' th' follow'n be configured
# - th' language switcher if multilingual be configured
# - th' variant switcher if multiple variants be configured
# - th' history clearer if ye configured t' mark visited planks
sidebarfootermenus = ''

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Hidden planks
# These options configure how hidden planks be treated.
# A plank flagged as hidden, be only removed from th' main menu if ye be
# currently not on this plank or th' hidden plank be not part o' current page's
# ancestors. For all other functionality 'n Hugo a hidden plank behaves like any
# other plank if not otherwise configured.

# Hide hidden planks from search.
# Default: false
# Hides hidden planks from th' suggest'ns o' th' search box an' th' dedicated
# search plank.
disableSearchHiddenPages = false

# Hide hidden planks fer web crawlers.
# Default: false
# Avoids hidden planks from show'n up 'n th' sitemap an' on Google (et all),
# otherwise they may be indexed by search engines
disableSeoHiddenPages = true

# Hide hidden planks fer taxonomies.
# Default: false
# Hides hidden planks from show'n up on th' taxonomy an' terms planks. If this
# reduces term counters t' zero, an empty but not linked term plank will be
# created anyhow.
disableTagHiddenPages = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Rrrambl'n
# These options modify how yer rrrambl'n be displayed.

# Title separator.
# Default: '::'
# Changes th' title separator used when concatenat'n th' plank title wit' th'
# ship title. This be consistently used throughout th' theme.
titleSeparator = '::'

# Breadcrumb separator.
# Default: '>'
# Changes th' breadcrumb separator used 'n th' topbars breadcrumb area an' fer
# search results an' term planks.
breadcrumbSeparator = '>'

# Hide th' root breadcrumb.
# Default: false
# Th' root breadcrumb be usually th' home plank o' yer ship. Because this be
# always access'ble by click'n on th' logo, ye may want t' reduce clutter
# by remov'n this from yer breadcrumb.
disableRootBreadcrumb = true

# Hide breadcrumbs term planks.
# Default: false
# If ye have lots o' taxonomy terms, th' term planks may seem cluttered wit'
# breadcrumbs t' ye, so this be th' option t' turn off breadcrumbs on term
# planks. Only th' plank title will then be shown on th' term planks.
disableTermBreadcrumbs = false

# Dis'ble copy'n head'n links t' clipboard
# Default: false
# If set t' true, this disables th' copy'n o' anchor links t' th' clipboard;
# if also `disableAnchorScrolling=true` then no anchor link will be vis'ble
# when hover'n a head'n.
disableAnchorCopy = false

# Dis'ble scroll'n t' head'n link on click
# Default: false
# If set t' true, this disables th' scroll'n t' th' beginn'n o' th' head'n
# when clicked; if also `disableAnchorCopy=true` then no anchor link will
# be vis'ble when hover'n a head'n.
disableAnchorScroll'n = false

# User-defined styles fer shorrrtcodes
# Default: not set
# Besides th' predefined `style` values, ye be able t' define yer own. Th'
# `style` parameter o' th' shortcode must match th' `identifier` defined here.
# Th' title fer th' style will be determined from th' `title`. If a `i18n` be
# set, th' title will be taken from th' translat'n files by that key instead
# an' th' `title` be only used if no translat'n be found. Th' `title` may be
# empty 'n which case, th' box does not contain a default title. `icon` an'
# `color` be work'n similar.
# Ye can also redefine th' predefined styles if you're not satisfied wit' th'
# default values.
# If ye define an optional `style` attribute, this be whar' all default values
# be taken from. Ye can reference predefined styles as also yer own styles
# if they be defined beforehand 'n this array.
boxStyle = [
	{ identifier = 'hugo', color = 'fuchsia', ay'con = 'fa-fw fab fa-hackerrank' },
	{ identifier = 'breaking', style = 'warning', title = ' ' },
	{ identifier = 'change', style = 'note', title = ' ' },
	{ identifier = 'new', style = 'info', title = ' ', ay'con = 'plus-circle' },

	{ identifier = 'option', style = 'cyan', ay'con = 'gears' },
	{ identifier = 'frontmatter', style = 'green', ay'con = 'fa-fw fab fa-markdown' },
	{ identifier = 'hugomenu', color = 'blueviolet', ay'con = 'bars' },

	{ identifier = 'gfm', color = 'darkgray', ay'con = 'fa-fw fab fa-github' },
	{ identifier = 'php', color = 'rgb(136, 140, 196)', ay'con = 'fa-fw fab fa-php' },
	{ identifier = 'pants', color = 'darkorange', ay'con = 'lightbulb' },
	{ identifier = 'obsidian', color = 'rgb(124, 58, 237)', ay'con = 'fa-fw far fa-gem' },
	{ identifier = 'mpe', color = 'rgb(66, 185, 131)', ay'con = 'fa-fw fas fa-display' },
	{ identifier = 'html', color = 'orangered', ay'con = 'fa-fw fas fa-code' },
	{ identifier = 'relearn', color = 'rgb(125, 201, 3)', ay'con = 'fa-fw fas fa-puzzle-piece' },

	{ identifier = 'example', style = 'code', title = 'Result', ay'con = 'eye' },

	{ identifier = 'magic', i18n = '', title = 'Magic', color = 'violet', ay'con = 'hand-sparkles' }
]

# Hide th' authors name an' email addresses
# Default: false
# If th' standard content-footer finds author name informat'n, ye can
# dis'ble th' output o' this an' th' accord'n email address by sett'n this
# parameter t' `true`.
hideAuthorName = false

# Hide th' authors email addresses
# Default: false
# If th' standard content-footer finds an authors email address, ye can
# dis'ble th' output by sett'n this parameter t' `true`.
hideAuthorEmail = false

# Hide th' author'n date
# Default: false
# If th' standard content-footer finds an author'n date, ye can
# dis'ble th' output by sett'n this parameter t' `true`.
hideAuthorDate = false

# Date format
# Default: ':date_medium'
# Th' date format used fer th' date 'n th' standard content-footer, when
# display'n a planks meta informat'n. See https://gohugo.io/functions/time/format/#localizat'n
# fer poss'ble values.
dateFormat = ':date_medium'

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Highlight
# These options configure how code be displayed.

# Hide copy-to-clipboard fer inline code.
# Default: false
# This removes th' copy-to-clipboard button from yer inline code.
disableInlineCopyToClipBoard = true

# Always show copy-to-clipboard fer block code.
# Default: false
# Th' theme only shows th' copy-to-clipboard button if ye hover over th' code
# block. Set this t' true t' dis'ble th' hover effect an' always show th'
# button.
disableHoverBlockCopyToClipBoard = false

# Wrap fer code blocks.
# Default: true
# By default lines o' code blocks wrap around if th' line be too long t' be
# displayed on screen. If ye dislike this behavior, ye can reconfigure it
# here.
# Avast that lines always wrap 'n print mode regardless o' this option.
# This can be overridden 'n th' page's frontmatter or given as a parameter t'
# individual code blocks.
highlightWrap = true

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Include
# These options configure how th' include shortcode works.

# What t' do when path be not resolved.
# Default: ''
# Ye can control what should happen if a path can not be resolved t' as
# a resource or via th' file system. If not set, no output will be written
# fer th' unresolved path. If set t' `warning` th' same happens an' an additional
# warning be printed. If set t' `error` an error message be printed an' th' build
# be aborted.
# This can be overridden 'n th' page's frontmatter.
include.errorlevel = 'warning'

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Images
# These options configure how images be displayed.

# What t' do when local image link be not resolved.
# Default: ''
# Ye can control what should happen if a local image can not be resolved t' as
# a resource. If not set, th' unresolved link be written as given into th' result'n
# output. If set t' `warning` th' same happens an' an additional warning be
# printed. If set t' `error` an error message be printed an' th' build be
# aborted.
# Please note that this can not resolve files inside o' yer `static` directory.
# This can be overridden 'n th' page's frontmatter.
image.errorlevel = 'warning'

# Image effects.
# See th' documentat'n fer how ye can even add yer own arbitrary effects t'
# th' list.
# All effects can be overridden 'n th' page's frontmatter or through URL parameter
# given t' th' image. See th' documentat'n fer details.

# Default: false
imageEffects.border = true
# Default: false
imageEffects.dataurl = false
# Default: false
imageEffects.inlinecontent = false
# Default: true
imageEffects.lazy = true
# Default: true
imageEffects.lightbox = true
# Default: true
imageEffects.rounded = true
# Default: false
imageEffects.shadow = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Links
# These options configure how links be displayed.

# Wether t' use Hugo's default relref shortcode implementat'n
# Default: false
# Since th' theme provides a link render hook, th' usage o' th' relref shortcode
# be obsolete. If a ship still uses that shortcode, it fails t' generate a
# correct links if th' baseURL be configured wit' a subdirectory an' relativeURLs=false.
# Th' theme provides an overriden relref shortcode that also works 'n th'
# above setup but must manually be activated by sett'n this option t' true.
# See discussion 'n https://github.com/McShelby/hugo-theme-relearn/discussions/862
disableDefaultRelref = false

# Generate link URLs th' Cap'n Hugo way.
# Default: false
# If set t' true, th' theme behaves like a standard Cap'n Hugo installat'n an'
# appends no index.html t' prettyURLs. As a trade off, yer build project will
# not be serv'ble from th' file system.
disableExplicitIndexURLs = false

# How t' open external links.
# Default: ''
# For external links ye can define how they be opened 'n yer browser. All
# values fer th' HTML `target` attribute o' th' `a` element be allowed. Th'
# default value will not add any target attribute opens external links 'n
# th' same browser tab.
# If ye want t' explicitly open those links 'n th' same
# tab, use '_self'.
# If ye want t' set th' default behavior fer all links, use link effects.
# This can be overridden 'n th' page's frontmatter.
externalLinkTarget = '_self'

# What t' do when local plank link be not resolved.
# Default: ''
# Ye can control what should happen if a local link can not be resolved t' a
# plank. If not set, th' unresolved link be written as given into th' result'n
# output. If set t' `warning` th' same happens an' an additional warning be
# printed. If set t' `error` an error message be printed an' th' build be
# aborted.
# Please note that wit' Cap'n Hugo < 0.123.0 + `uglyURLs=true` this can lead t' false
# negatives.
# This can be overridden 'n th' page's frontmatter.
link.errorlevel = 'warning'

# Underline links 'n th' rrrambl'n.
# Default: false
# By default links 'n th' rrrambl'n be only told apart from th' text around
# them by their color. If set t' true, they be underlined as well, which
# helps readers who can not distinguish th' colors.
link.underline = false

# Link effects.
# See th' documentat'n fer how ye can even add yer own arbitrary effects t'
# th' list.
# All effects can be overridden 'n th' page's frontmatter or through URL parameter
# given t' th' link. See th' documentat'n fer details.

# Default: false
linkEffects.download = false
# Default: false
linkEffects.target = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Math
# These options configure how math formulae be displayed.

# Output o' th' rendered formulae.
# Default: 'mathml'
# `mathml` be styled by th' browser alone. `html` an' `htmlAndMathml` look th'
# same 'n every browser but need th' KaTeX stylesheet an' fonts, which be
# linked t' planks contain'n math.
# Any other option o' Hugo's `transform.ToMath` funct'n can be set besides
# `output`, like `macros`, `throwOnError` or `strict`.
# This can be overridden 'n th' page's frontmatter.
math.output = 'mathml'

# Force board th' KaTeX stylesheet on every plank.
# Default: false
# Th' stylesheet be linked t' every plank that contains math, if th' `output`
# needs it. This option be only useful if ye write KaTeX's HTML yourself. In
# this case no formula be rendered by th' theme so ye can force link'n it by
# sett'n `math.force=true`.
# This option has an alias `math=true`, which can't be combined wit' other
# `math.*` options.
# This can be overridden 'n th' page's frontmatter.
math.force = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Merrrmaid
# These options configure how Merrrmaid graphs be displayed.

# Make graphs pan'ble an' zoom'ble
# Default: false
# For huge graphs it can be helpful t' make them zoom'ble. Zoom'ble graphs come
# wit' a reset button fer th' zoom.
# This can be overridden 'n th' page's frontmatter or given as a parameter t'
# individual graphs.
mermaidZoom = true

# Initializat'n options fer Merrrmaid.
# Default: not set
# A JSON value. See th' Merrrmaid documentat'n fer poss'ble parameter.
# This can be overridden 'n th' page's frontmatter.
mermaidInitialize = '{ "securityLevel": "loose" }'

# Force board Merrrmaid on every plank.
# Default: false
# If a Merrrmaid shortcode or codefence be found, th' option will be ignored an'
# Merrrmaid will be boarded regardlessly. This option be useful 'n case ye
# be us'n script'n t' render yer graph. In this case no shortcode or
# codefence be involved an' th' library be not boarded by default so ye can
# force loading it by sett'n `mermaid.force=true`.
# This can be overridden 'n th' page's frontmatter.
mermaid.force = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# OpenApi
# These options configure how OpenAPI specificat'ns be displayed.

# Force board OpenAPI on every plank.
# Default: false
# If a OpenAPI shortcode or codefence be found, th' option will be ignored an'
# OpenAPI will be boarded regardlessly. This option be useful 'n case ye
# be us'n script'n t' render yer spec. In this case no shortcode or
# codefence be involved an' th' library be not boarded by default so ye can
# force loading it by sett'n `openapi.force=true`.
# This can be overridden 'n th' page's frontmatter.
openapi.force = false

# What t' do when a local OpenAPI spec link be not resolved.
# Default: ''
# Ye can control what should happen if a local OpenAPI spec link can not be resolved
# t' a resource. If not set, th' unresolved link be written as given into th' result'n
# output. If set t' `warning` th' same happens an' an additional warning be
# printed. If set t' `error` an error message be printed an' th' build be
# aborted.
# Please note that this can not resolve files inside o' yer `static` directory.
# This can be overridden 'n th' page's frontmatter.
openapi.errorlevel = 'warning'