Chapter 2

Configuration

Find out how to configure and customize your site.

Site Management

Get yourself familiar with the general structure of your website

Branding

Change colors and logos of your site

Sidebar

Configure all things sidebar

Content

Configure the content area of your site

Customization

Customize files for advanced usage

Options Reference

All configuration options for the Relearn theme

Subsections of Configuration

Subsections of Site Management

Directory Structure

If you’ve followed the Getting Started guide, your directory layout will look similar to this:

β”œβ”€β”€ content
β”‚   β”œβ”€β”€ first-chapter
β”‚   β”‚   β”œβ”€β”€ first-page
|   |   |   └── _index.md
β”‚   β”‚   β”œβ”€β”€ second-page
|   |   |   └── index.md
β”‚   β”‚   └── third-page.md
β”‚   └── _index.md
β”œβ”€β”€ themes
β”‚   └── hugo-theme-relearn
β”‚       └── ...
└── hugo.toml

Hugo uses a union file system, which lets you combine multiple directories.

By default, it puts your root directory on top of the Relearn theme directory. Files in your root directory will replace theme files in the same location.

For example, if you create a file at layouts/partials/heading.html, it will override the theme’s themes/hugo-theme-relearn/layouts/partials/heading.html.

See this list, to learn which files are allowed to be modified by you.

This makes it easy to customize the theme without changing files in the themes directory, making future theme updates simpler.

Warning

Don’t edit files inside the themes/hugo-theme-relearn directory. That’s not the recommended way to customize! Refer to the explanation above.

Don’t clone the theme repository and edit files there for your site. That’s not the recommended way to customize! Instead, follow the Getting Started guide.

Multilingual

The Relearn theme works with Hugo’s multilingual mode.

It supports many languages, including right-to-left languages.

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

Translation by File Name

Here’s how to make your site multilingual using translations by file name:

  1. Set up languages in your hugo.toml file:

    hugo.
    defaultContentLanguage = 'en'
    
    [languages]
      [languages.en]
        languageCode = 'en'
        languageName = 'English'
        title = 'My Website'
        weight = 1
    
      [languages.pir]
        languageCode = 'art-x-pir'
        languageDirection = 'rtl'
        languageName = 'Pirrratish'
        title = 'Arrr, my Website'
        weight = 2
    defaultContentLanguage: en
    languages:
      en:
        languageCode: en
        languageName: English
        title: My Website
        weight: 1
      pir:
        languageCode: art-x-pir
        languageDirection: rtl
        languageName: Pirrratish
        title: Arrr, my Website
        weight: 2
    {
       "defaultContentLanguage": "en",
       "languages": {
          "en": {
             "languageCode": "en",
             "languageName": "English",
             "title": "My Website",
             "weight": 1
          },
          "pir": {
             "languageCode": "art-x-pir",
             "languageDirection": "rtl",
             "languageName": "Pirrratish",
             "title": "Arrr, my Website",
             "weight": 2
          }
       }
    }
  2. Duplicate your content files and add language codes to their file names:

    β”œβ”€β”€ content
    β”‚   β”œβ”€β”€ first-chapter
    β”‚   β”‚   β”œβ”€β”€ first-page
    |   |   |   β”œβ”€β”€ _index.en.md
    |   |   |   └── _index.pir.md
    β”‚   β”‚   β”œβ”€β”€ second-page
    |   |   |   β”œβ”€β”€ index.en.md
    |   |   |   └── index.pir.md
    β”‚   β”‚   β”œβ”€β”€ third-page.en.md
    β”‚   β”‚   └── third-page.pir.md
    β”‚   β”œβ”€β”€ _index.en.md
    β”‚   └── _index.pir.md
    β”œβ”€β”€ themes
    β”‚   └── hugo-theme-relearn
    β”‚       └── ...
    └── hugo.toml

Translation by Content Directory

The theme also support translations by content directory which can be configured in a similar way. This is not used in further examples of this documentation.

Search Settings

Check the search configuration for multilingual options.

Turn Off Language Switching

Option By default the theme shows a language switcher in the lower part of the menu.

To disable the language switcher set disableLanguageSwitchingButton=true

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

Meta Information

Site Author Information

Option The theme uses author details in various parts of your site, like RSS feeds and meta tags.

hugo.
[params]
  [params.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"
      }
   }
}

Site Title

The title will be used in meta information of your HTML.

hugo.
title = 'Hugo Relearn Theme'
title: Hugo Relearn Theme
{
   "title": "Hugo Relearn Theme"
}

Site Description

Front Matter The theme shows a site description in various places, such as RSS feeds and meta tags. For this, it uses the description field from your home page’s front matter.

Social Media Images

When your page is shared on social media, you can set a site-wide image to display with the link

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

More Social Media Options

The theme adheres to Hugo’s official documentation for Open Graph and Twitter Cards configuration.

Deployment Scenarios

Offline Usage

The theme is usable offline. No internet connection is required to load your page. This is achieved by storing all dependencies within the theme.

No calls to 3rd party servers, no calling home, no tracking. Privacy friendly.

Server Deployment

If your server deployment has no special requirements, you can skip this section and use the standard Hugo options.

For special requirements, the theme is capable of different scenarios, requiring the following mandatory settings in your hugo.toml. All settings not mentioned in the examples below can be set to your liking.

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 you are still using Hugo’s relref shortcode (which you shouldn’t), you will need further configuration.

Warning

Don’t use a baseURL with a subdirectory and relativeURLs=true together. Hugo doesn’t apply the baseURL correctly in this case. If you need both, generate your site twice with different settings into separate directories.

Private Web Server (LAN)

The same settings as with any of the public web server scenarios or

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

File System

Your generated site can be used headless without a HTTP server.

This can be achieved by using the file:// protocol in your browser’s address bar or by double click on a generated *.html file in your file navigation tool.

Use the following settings

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

Pages like sitemap.xml and rss.xml, and social media links will always use absolute URLs. They won’t work with relativeURLs=true.

Available Output Formats

Enable print support to print entire chapters or the whole site. Add the print output format to your home, section, and page in hugo.toml:

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

This adds a printer icon in the topbar. Clicking it switches to print preview, showing the page and its visible subpages in a printer-friendly format. Use your browser’s print function to print or save as PDF.

The URL won’t be configured ugly for Hugo’s URL handling, even with uglyURLs=true in hugo.toml. This is because each mime type can only have one suffix.

If you don’t like the URLs, you can reconfigure outputFormats.print in your hugo.toml to something other than the default of:

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

Stable Output

Disabling the Generator Meta

Option The theme adds a meta tag with its version number to each page.

This isn’t a security risk and helps us support you better.

To turn this off, set disableGeneratorVersion=true.

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

If you also want to turn off Hugo’s version meta tag, use disableHugoGeneratorInject=true.

Disabling IDs for Referenced Assets

Option The theme creates a unique ID for each build and adds it to each referenced asset’s URL to make browsers not keep outdated cached assets.

This is good for production sites but can be problematic during development. It makes comparing outputs difficult as each build has new IDs.

To disable this, set disableAssetsBusting=true.

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

Disabling IDs for Interactive HTML Elements

Option Features like expanders, callouts, and tabs use unique IDs to work. These IDs change with each build.

This is necessary for the theme to work properly, but it can make comparing outputs between builds difficult.

To turn this off, set disableRandomIds=true. Note, that this will result in a non-functional site!.

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

Subsections of Branding

Logo

Change the Favicon

If your favicon is an SVG, PNG, or ICO, just drop your image in your site’s static/images/ directory and name it favicon.svg, favicon.png, or favicon.ico respectively.

If you want to adjust your favicon according to your OS settings for light/dark mode, add the image files static/images/favicon-light.svg and static/images/favicon-dark.svg to your site’s directory, respectively, corresponding to your file format. In case some of the files are missing, the theme falls back to favicon.svg for each missing file. All supplied favicons must be of the same file format.

If no favicon file is found, the theme will look up the alternative filename logo in the same location and will repeat the search for the list of supported file types.

If you need to change this default behavior, create a new file layouts/partials/favicon.html in your site’s directory and write something like this:

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

By default, only your site title will be shown at the top of the menu. You can configure this, or override the logo partial.

Create a new file in layouts/partials/logo.html of your site. Then write any HTML you want. You could use an img HTML tag and reference an image, or you could paste an SVG definition!

The size of the logo will adapt automatically.

Colors

The Relearn theme offers color variants to change your site’s appearance. Each color variant contains of a CSS file and optional settings in your hugo.toml.

You can use the shipped variants, customize them, or create your own. The interactive variant generator can help you with this.

Once set up in hugo.toml, you can switch variants using the selector at the bottom of the menu.

Shipped Variants

The theme ships with the following set of variants

  • Relearn
    • Light: the classic Relearn default, coming with signature green, dark sidebar and light content area
    • Dark: dark variant of Light, coming with signature green, dark sidebar and dark content area
    • Bright: alternative of Light, coming with signature green, green sidebar and light content area
  • Zen
    • Light: a more relaxed white/grey variant, coming with blue accents, light sidebar and light content area
    • Dark: dark variant of Light, coming with blue accents, dark sidebar and dark content area
  • Experimental
    • Neon: a variant that glows in the dark, gradient sidebar and dark content area
  • Retro
    • Learn: the default of the old Learn theme, coming with signature light purple, dark sidebar and light content area
    • Blue: a blue variant of the old Learn theme, coming tinted in blue, dark sidebar and light content area
    • Green: a green variant of the old Learn theme, coming tinted in green, dark sidebar and light content area
    • Red: a red variant of the old Learn theme, coming tinted in red, dark sidebar and light content area

Changing the Variant

Option Set the themeVariant option to change the variant.

The theme offers the recommended advanced configuration mode that combines the functionality for multiple variants, OS setting adjustments, and more.

Simple Setup

Single Variant

Set themeVariant to your theme CSS file name:

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

Place your theme file in assets/css or themes/hugo-theme-relearn/assets/css. Name it theme-*.css.

In the above example, the path of your theme file must be assets/css/theme-relearn-light.css or themes/hugo-theme-relearn/assets/css/theme-relearn-light.css.

Multiple Variants

To let the reader choose between multiple variants, set themeVariant like this:

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

The first variant is the default, and a selector will appear if there’s more than one.

Adjust to OS Settings

Use the auto value to match OS light/dark settings. Usually it makes sense to set it in the first position and make it the default.

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

If you don’t configure anything else, the theme will default to use relearn-light for light mode and relearn-dark for dark mode.

Default is relearn-light for light and relearn-dark for dark mode. These defaults are overwritten by the first two non-auto options of your themeVariant array.

You can override the default with themeVariantAuto:

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

Advanced

The theme offers an advanced way to configure theme variants and all of the aspects above inside of a single configuration item. This comes with some features previously unsupported.

Like with the multiple variants option, you are defining your theme variants in an array but now in a table with suboptions.

Again, in this case, the first variant is the default chosen on first view and a variant selector will be shown in the menu footer if the 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"
      ]
   }
}

you 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"
         }
      ]
   }
}

The identifier option is mandatory and equivalent to the string in the first example. Further options can be configured, see the table below.

Parameter

Name Default Notes
identifier <empty> Must correspond to the name of a color variant either in your site’s or the theme’s directory in the form assets/css/theme-<IDENTIFIER>.css.
name see notes The name to be displayed in the variant selector. If not set, the identifier is used in a human readable form.
auto <empty> If set, the variant is treated as an auto mode variant. It has the same behavior as the themeVariantAuto option. The first entry in the array is the color variant for light mode, the second for dark mode. Defining auto mode variants with the advanced options has the benefit that you can now have multiple auto mode variants instead of just one with the simple options.

Example Configuration

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: 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
{
   "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

Modifying Variants

In case you like a shipped variant but only want to tweak some aspects, you have some choices. Don’t edit the file in the theme’s directory! You will lose the ability to later easily upgrade your theme to a newer version.

  1. Copy and change

    You can copy the shipped variant file from the theme’s themes/hugo-theme-relearn/assets/css directory to the site’s assets/css directory and either store it with the same name or give it a new name. Edit the settings and save the new file. Afterwards, you can use it in your hugo.toml by the chosen name.

  2. Create and import

    You can create a new variant file in the site’s assets/css directory and give it a new name. Import the shipped variant, add the settings you want to change and save the new file. Afterwards, you can use it in your hugo.toml by the chosen name.

    For example, you want to use the relearn-light variant but want to change the syntax highlighting schema to the one used in the neon variant. For that, create a new assets/css/theme-my-branding.css in your site’s directory and add the following lines:

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

    Afterwards, put this in your hugo.toml to use your new variant:

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

    In comparison to copy and change, this has the advantage that you profit from any adjustments to the relearn-light variant while keeping your modifications.

React to Variant Switches in JavaScript

Once a color variant is fully loaded, either initially or by switching the color variant manually with the variant selector, the custom event themeVariantLoaded on the document will be dispatched. You can add an event listener and react to changes.

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

Module Theming

Change Syntax Highlighting

If you want to switch the syntax highlighting theme together with your color variant, first you need to configure your installation according to Hugo’s documentation to provide a syntax highlighting stylesheet file.

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

You can use one of the shipped stylesheet files or use Hugo to generate a file for you.

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

The file must be written to assets/css/chroma-<NAME>.css. To use it with your color variant, you have to modify --CODE-theme: <NAME> in the color variant stylesheet file.

@import "theme-relearn-light.css";
:root {
  --CODE-theme: mycode; /* name of the chroma stylesheet file */
}

Change 3rd-Party Libraries Theming

Some of the shipped shortcodes are using 3rd-party libraries. See the individual shortcode documentation on how to change their theming.

Stylesheet Generator

This interactive tool may help you to generate your own color variant stylesheet.

To get started, first select a color variant from the variant selector in the lower left sidebar that fits you best as a starting point.

The graph is interactive and reflects the current colors. You can click on any of the colored boxes to adjust the respective color. The graph and the page will update accordingly.

The arrowed lines reflect how colors are inherited through different parts of the theme if the descendant isn’t overwritten. If you want to delete a color and let it inherit from its parent, just delete the value from the input field.

To better understand this, select the neon variant and modify the different heading colors. There, colors for the headings h2, h3 and h4 are explicitly set. h5 is not set and inherits its value from h4. h6 is also not set and inherits its value from h5.

Once you’ve changed a color, the variant selector will show a “My custom variant” entry and your changes are stored in the browser. You can browse to other pages and even close the browser without losing your changes.

Once you are satisfied, you can download the new variants file and copy it into your site’s assets/css directory.

Option Afterwards, you have to adjust the themeVariant option in your hugo.toml to your chosen file name. For example, if your new variants file is named theme-my-custom-variant.css, you have to set themeVariant='my-custom-variant' to use it.

See the docs for further configuration options.

Graph

Subsections of Sidebar

Width

The theme adjusts the menu width based on browser size.

If you want to change the chosen default width, you can add CSS variables to layouts/partials/custom-header.html.

Changing Menu Width

The menu width changes for different screen sizes:

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

You can change the menu width but not the screen width breakpoints.

To adjust the menu width, use these CSS variables. Note that --MENU-WIDTH-S is for the mobile menu flyout on small screens.

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

Header & Footer

Title

Option With the default partials for the logo, The site title will also be used for the text at the top of the sidebar. If you want to show a different text in the sidebar, you can overwrite linkTitle.

hugo.
[params]
  linkTitle = 'Relearn'
params:
  linkTitle: Relearn
{
   "params": {
      "linkTitle": "Relearn"
   }
}

Home Button Configuration

By default, the theme displays a home button between search form and navigation menu. The Home button serves as an alternative to clicking the logo.

Default Home Button Default Home Button

Option To hide the Home button on the left menu, set disableLandingPageButton=true.

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

Option To change its icon or text, configure the landingPageName for your 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 for 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"
   }
}

History

Option Turn on showVisitedLinks=true to see checkmarks next to visited pages in the main menu. This also adds a Clear History option at the bottom of the menu to remove all checkmarks. Note that checkmarks will disappear if you rebuild your site, as the page IDs may change.

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

To change the menu footer, edit the layouts/partials/menu-footer.html file. Check out the Partials section for more ways to customize your site.

Search

The theme offers three levels of search through the menu’s search form:

  1. In-page search: Highlights search terms on the current page
  2. Search popup: Opens a popup with results from other pages
  3. Dedicated search page: Accessible by clicking the magnifier glass or pressing ENTER

Each level requires the previous one to be enabled. If no search is configured, the search form won’t appear.

Option All levels are enabled by default. Disable them in hugo.toml:

  • In-page search: disableSearch=true
  • Search popup: disableSearchIndex=true
  • Dedicated search page: disableSearchPage=true
hugo.
[params]
  disableSearch = true
  disableSearchIndex = true
  disableSearchPage = true
params:
  disableSearch: true
  disableSearchIndex: true
  disableSearchPage: true
{
   "params": {
      "disableSearch": true,
      "disableSearchIndex": true,
      "disableSearchPage": true
   }
}

Option Default URLs can be changed with the following parameter

  • Search popup: searchindex.js set by searchIndexURL
  • Dedicated search page: search/index.html set by searchPageURL
hugo.
[params]
  searchIndexURL = 'omnisearchindex.js'
  searchPageURL = 'omnisearch'
params:
  searchIndexURL: omnisearchindex.js
  searchPageURL: omnisearch
{
   "params": {
      "searchIndexURL": "omnisearchindex.js",
      "searchPageURL": "omnisearch"
   }
}
Note

Only change these if you have content at those URLs. This can happen with uglyURLs=true in hugo.toml and having a content file at content/search.md.

Check for duplicate URLs by running hugo --printPathWarnings.

Supported Languages

The Lunr search library doesn’t support all languages of the theme. Unsupported languages will show errors in the browser console. Currently unsupported are

  • Czech
  • Indonesian
  • Polish
  • Swahili

Mixed Language Support

Option In case your page’s content contains text in multiple languages (for example, you are writing a Piratish documentation for your English API), you can set those languages in additionalContentLanguage to broaden the search.

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

You can add multiple languages to this array.

Note

Use the base language code. For example, if your page is using zh-CN, add zh to this parameter.

Shortcut Menu

The sidebar contains your content’s navigation menu, but you can also add extra menu entries or shortcuts in a separate section.

For internal links, use the pageRef property instead of url. Learn more about Hugo’s menu configuration.

Title

Option By default, the shortcut menu has a title ("More" in English).

You can disable this title with disableShortcutsTitle=true.

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

To change the title, update your local i18n translation file.

[shortcuts-menuTitle]
other = "Other Great Stuff"

Single Language Example

Edit hugo.toml and add [[menu.shortcuts]] entries for each link:

hugo.
[menu]
  [[menu.shortcuts]]
    name = 'GitHub Repo'
    pre = '<i class="fa-fw fab fa-github"></i> '
    url = 'https://github.com/McShelby/hugo-theme-relearn'
    weight = 10

  [[menu.shortcuts]]
    name = 'Showcases'
    pageRef = '/showcase'
    weight = 20

  [[menu.shortcuts]]
    name = 'Credits'
    pageRef = '/more/credits'
    weight = 30

  [[menu.shortcuts]]
    name = 'Tags'
    pageRef = '/tags'
    pre = '<i class="fa-fw fas fa-tags"></i> '
    weight = 40

  [[menu.shortcuts]]
    name = 'Categories'
    pageRef = '/categories'
    pre = '<i class="fa-fw fas fa-layer-group"></i> '
    weight = 50
menu:
  shortcuts:
  - name: GitHub Repo
    pre: '<i class="fa-fw fab fa-github"></i> '
    url: https://github.com/McShelby/hugo-theme-relearn
    weight: 10
  - name: Showcases
    pageRef: /showcase
    weight: 20
  - name: Credits
    pageRef: /more/credits
    weight: 30
  - name: Tags
    pageRef: /tags
    pre: '<i class="fa-fw fas fa-tags"></i> '
    weight: 40
  - name: Categories
    pageRef: /categories
    pre: '<i class="fa-fw fas fa-layer-group"></i> '
    weight: 50
{
   "menu": {
      "shortcuts": [
         {
            "name": "GitHub Repo",
            "pre": "\u003ci class=\"fa-fw fab fa-github\"\u003e\u003c/i\u003e ",
            "url": "https://github.com/McShelby/hugo-theme-relearn",
            "weight": 10
         },
         {
            "name": "Showcases",
            "pageRef": "/showcase",
            "weight": 20
         },
         {
            "name": "Credits",
            "pageRef": "/more/credits",
            "weight": 30
         },
         {
            "name": "Tags",
            "pageRef": "/tags",
            "pre": "\u003ci class=\"fa-fw fas fa-tags\"\u003e\u003c/i\u003e ",
            "weight": 40
         },
         {
            "name": "Categories",
            "pageRef": "/categories",
            "pre": "\u003ci class=\"fa-fw fas fa-layer-group\"\u003e\u003c/i\u003e ",
            "weight": 50
         }
      ]
   }
}

Multilingual Example

For multilingual sites, set different menus for each language in hugo.toml:

hugo.
[languages]
  [languages.en]
    languageName = 'English'
    title = 'Hugo Relearn Theme'
    weight = 1

    [languages.en.menu]
      [[languages.en.menu.shortcuts]]
        name = 'GitHub Repo'
        pre = '<i class="fa-fw fab fa-github"></i> '
        url = 'https://github.com/McShelby/hugo-theme-relearn'
        weight = 10

      [[languages.en.menu.shortcuts]]
        name = 'Showcases'
        pageRef = '/showcase'
        weight = 20

      [[languages.en.menu.shortcuts]]
        name = 'Credits'
        pageRef = '/more/credits'
        weight = 30

      [[languages.en.menu.shortcuts]]
        name = 'Tags'
        pageRef = '/tags'
        pre = '<i class="fa-fw fas fa-tags"></i> '
        weight = 40

      [[languages.en.menu.shortcuts]]
        name = 'Categories'
        pageRef = '/categories'
        pre = '<i class="fa-fw fas fa-layer-group"></i> '
        weight = 50

  [languages.pir]
    languageName = 'Arrr! Pirrratish'
    title = 'Captain Hugo Relearrrn Theme'
    weight = 2

    [languages.pir.menu]
      [[languages.pir.menu.shortcuts]]
        identifier = 'ds'
        name = '<i class="fa-fw fab fa-github"></i> GitHub Repo'
        url = 'https://github.com/McShelby/hugo-theme-relearn'
        weight = 10

      [[languages.pir.menu.shortcuts]]
        name = '<i class="fa-fw fas fa-camera"></i> Showcases'
        pageRef = '/showcase'
        weight = 11

      [[languages.pir.menu.shortcuts]]
        name = 'GitHub Repo'
        pre = '<i class="fa-fw fab fa-github"></i> '
        url = 'https://github.com/McShelby/hugo-theme-relearn'
        weight = 10

      [[languages.pir.menu.shortcuts]]
        name = 'Showcases'
        pageRef = '/showcase'
        weight = 20

      [[languages.pir.menu.shortcuts]]
        name = 'Crrredits'
        pageRef = '/more/credits'
        weight = 30

      [[languages.pir.menu.shortcuts]]
        name = 'Arrr! Tags'
        pageRef = '/tags'
        pre = '<i class="fa-fw fas fa-tags"></i> '
        weight = 40

      [[languages.pir.menu.shortcuts]]
        name = 'Categorrries'
        pageRef = '/categories'
        pre = '<i class="fa-fw fas fa-layer-group"></i> '
        weight = 50
languages:
  en:
    languageName: English
    menu:
      shortcuts:
      - name: GitHub Repo
        pre: '<i class="fa-fw fab fa-github"></i> '
        url: https://github.com/McShelby/hugo-theme-relearn
        weight: 10
      - name: Showcases
        pageRef: /showcase
        weight: 20
      - name: Credits
        pageRef: /more/credits
        weight: 30
      - name: Tags
        pageRef: /tags
        pre: '<i class="fa-fw fas fa-tags"></i> '
        weight: 40
      - name: Categories
        pageRef: /categories
        pre: '<i class="fa-fw fas fa-layer-group"></i> '
        weight: 50
    title: Hugo Relearn Theme
    weight: 1
  pir:
    languageName: Arrr! Pirrratish
    menu:
      shortcuts:
      - identifier: ds
        name: <i class="fa-fw fab fa-github"></i> GitHub Repo
        url: https://github.com/McShelby/hugo-theme-relearn
        weight: 10
      - name: <i class="fa-fw fas fa-camera"></i> Showcases
        pageRef: /showcase
        weight: 11
      - name: GitHub Repo
        pre: '<i class="fa-fw fab fa-github"></i> '
        url: https://github.com/McShelby/hugo-theme-relearn
        weight: 10
      - name: Showcases
        pageRef: /showcase
        weight: 20
      - name: Crrredits
        pageRef: /more/credits
        weight: 30
      - name: Arrr! Tags
        pageRef: /tags
        pre: '<i class="fa-fw fas fa-tags"></i> '
        weight: 40
      - name: Categorrries
        pageRef: /categories
        pre: '<i class="fa-fw fas fa-layer-group"></i> '
        weight: 50
    title: Captain Hugo Relearrrn Theme
    weight: 2
{
   "languages": {
      "en": {
         "languageName": "English",
         "menu": {
            "shortcuts": [
               {
                  "name": "GitHub Repo",
                  "pre": "\u003ci class=\"fa-fw fab fa-github\"\u003e\u003c/i\u003e ",
                  "url": "https://github.com/McShelby/hugo-theme-relearn",
                  "weight": 10
               },
               {
                  "name": "Showcases",
                  "pageRef": "/showcase",
                  "weight": 20
               },
               {
                  "name": "Credits",
                  "pageRef": "/more/credits",
                  "weight": 30
               },
               {
                  "name": "Tags",
                  "pageRef": "/tags",
                  "pre": "\u003ci class=\"fa-fw fas fa-tags\"\u003e\u003c/i\u003e ",
                  "weight": 40
               },
               {
                  "name": "Categories",
                  "pageRef": "/categories",
                  "pre": "\u003ci class=\"fa-fw fas fa-layer-group\"\u003e\u003c/i\u003e ",
                  "weight": 50
               }
            ]
         },
         "title": "Hugo Relearn Theme",
         "weight": 1
      },
      "pir": {
         "languageName": "Arrr! Pirrratish",
         "menu": {
            "shortcuts": [
               {
                  "identifier": "ds",
                  "name": "\u003ci class=\"fa-fw fab fa-github\"\u003e\u003c/i\u003e GitHub Repo",
                  "url": "https://github.com/McShelby/hugo-theme-relearn",
                  "weight": 10
               },
               {
                  "name": "\u003ci class=\"fa-fw fas fa-camera\"\u003e\u003c/i\u003e Showcases",
                  "pageRef": "/showcase",
                  "weight": 11
               },
               {
                  "name": "GitHub Repo",
                  "pre": "\u003ci class=\"fa-fw fab fa-github\"\u003e\u003c/i\u003e ",
                  "url": "https://github.com/McShelby/hugo-theme-relearn",
                  "weight": 10
               },
               {
                  "name": "Showcases",
                  "pageRef": "/showcase",
                  "weight": 20
               },
               {
                  "name": "Crrredits",
                  "pageRef": "/more/credits",
                  "weight": 30
               },
               {
                  "name": "Arrr! Tags",
                  "pageRef": "/tags",
                  "pre": "\u003ci class=\"fa-fw fas fa-tags\"\u003e\u003c/i\u003e ",
                  "weight": 40
               },
               {
                  "name": "Categorrries",
                  "pageRef": "/categories",
                  "pre": "\u003ci class=\"fa-fw fas fa-layer-group\"\u003e\u003c/i\u003e ",
                  "weight": 50
               }
            ]
         },
         "title": "Captain Hugo Relearrrn Theme",
         "weight": 2
      }
   }
}

Displaying Pages Only in the Shortcuts Menu

To show pages only in the shortcuts menu you have two choices

  1. Create a headless branch bundle, _index.md in its own folder with the below front matter. The branch bundle will not be contained in the 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 page inside a headless branch bundle with the following front matter in the bundle. This causes the child but not the branch bundle to be contained in the 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"
       }
    }

    The child page can be any type of content.

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

Subsections of Content

Width

The theme adjusts the content width when you resize your browser.

If you want to change the chosen default width, you can add CSS variables to layouts/partials/custom-header.html.

Changing the Main Area’s Maximum Width

The main area has a default maximum width of 80.25rem for better readability. If you want to change this, you can set a CSS variable

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

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

Titles & Breadcrumbs

Learn how to turn off the breadcrumbs completely and further configure the topbar.

Option Set disableRootBreadcrumb=true to remove the root breadcrumb which often feels redundant. This will also apply to the breadcrumbs of the search results and taxonomy pages.

Option You can override the default breadcrumb separator by using breadcrumbSeparator='/'. This separator will also be used in the breadcrumbs of the search results and taxonomy pages.

Option By default the term pages of a taxonomy will display the breadcrumb for each page. Set disableTermBreadcrumbs=true to remove the breadcrumb if the term pages look to cluttered.

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

Titles

Option You can override the default title separator by using titleSeparator='|'.

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

Headings

Headings can have anchor links that appear when you hover over them.

You can change what happens when you click the anchor icon in your hugo.toml file. By default, all options are turned on. If you turn off all options, no anchor icon will show up when you hover.

Option Set disableAnchorCopy=true to prevent copying the anchor link when you click the icon.

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

Scroll to Heading

Option Set disableAnchorScrolling=true to stop the page from scrolling to the heading when you click the anchor icon.

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

Linking

Further settings are available to be used in your configuration or front matter.

URL Management

Option By default, the theme adds index.html to page links when uglyURLs=false (Hugo’s default).

If you’re only using a web server scenario and dislike this, you can reset to Hugo’s default behavior by settings disableExplicitIndexURLs=true.

For the file system scenario, you are not allowed to change this value.

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

Patching the relref Shortcode

Option While the usage of relref is obsolete and discouraged by Hugo for a while, existing installations may still use it.

In configurations using a baseURL with a subdirectory and having relativeURLs=false (the default), Hugo’s standard relref implementation is failing.

To work around this, you can activate a patched version of the shortcode by setting disableDefaultRelref=true.

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

Hidden Pages

This theme allows you to create hidden pages.

Hidden pages are created but not shown in the navigation. This is useful for pages you only want to access via a direct link.

When you visit a hidden page’s URL, it will appear in the navigation menu.

Hidden pages can also have hidden subpages, creating multiple levels of hiding.

By default, hidden pages are only hidden from human visitors. Search engines can still find them by crawling your site and the pages are linked in your taxonomies and site search. You can prevent this with these options.

Option To remove hidden pages from search results, use disableSearchHiddenPages=true.

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

Hide from Search Engines

Option To hide pages from search engines by removing them from the sitemap, RSS feed and make them nofollow, use disableSeoHiddenPages=true.

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

Hide from Taxonomies

Option To prevent hidden pages from appearing on taxonomy and term pages, use disableTagHiddenPages=true. If this makes a term’s count zero, an empty term page will still be created but not linked.

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

Subsections of Customization

Partials

Usable Partials

You can call other partials from themes/hugo-relearn-themes/ besides those in themes/hugo-relearn-themes/layouts/partials/_relearn. However, using partials not mentioned as customizable below might make future updates more challenging.

Customizable Partials

The Relearn theme allows you to customize various parts of the theme by overriding partials. This makes the theme highly configurable.

A good rule to follow: The less code a partial contains, the easier it will be to update the theme in the future.

Here’s a list of partials you can safely override:

  • layouts/partials/content.html: The main content of a page. Override this to display additonal page metadata.

  • layouts/partials/content-header.html: The header above the title. By default, it shows tags, but you can change this.

  • layouts/partials/content-footer.html: The footer below the content. By default, it shows author info, modification dates, and categories. You can customize this.

  • layouts/partials/custom-header.html: For adding custom CSS. Remember to include the style HTML tag.

  • layouts/partials/custom-footer.html: For adding custom JavaScript. Remember to include the script HTML tag.

  • layouts/partials/favicon.html: The favicon. You should definitely customize this.

  • layouts/partials/heading.html: the page’s title headings

  • layouts/partials/heading-pre.html: Add content before the page’s title headings. Remember to consider the headingPre front matter.

  • layouts/partials/heading-post.html: Add content after the page’s title headings. Remember to consider the headingPost front matter.

  • layouts/partials/logo.html: The logo in the top left corner. You should customize this.

  • layouts/partials/menu-pre.html: Add content before menu items. Remember to consider the menuPre front matter.

  • layouts/partials/menu-post.html: Add content after menu items. Remember to consider the menuPost front matter.

  • layouts/partials/menu-footer.html: The footer of the left menu.

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

Extending Scripts

A common question is how to add extra CSS styles or JavaScript to your site. This depends on what you need.

Adding JavaScript or Stylesheets to All Pages

To add JavaScript files or CSS stylesheets to every page, you can include them in layouts/partials/custom-header.html or layouts/partials/custom-footer.html.

However, this can make your site larger than necessary if these files are only needed on a few pages. The next section explains how to add dependencies only when needed.

Custom Shortcodes with Dependencies

Some shortcodes need extra JavaScript and CSS files. The theme only loads these when the shortcode is used. You can use this for your own shortcodes too.

For example, to create a shortcode called myshortcode that needs the jquery library:

  1. Create the shortcode file layouts/shortcodes/myshortcode.html and add the folloging line somewhere:

    ...
    {{- .Page.Store.Set "hasMyShortcode" true }}
    ...
  2. Option Add this to your hugo.toml:

    hugo.
    [params]
      [params.relearn]
        [params.relearn.dependencies]
          [params.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 .location "footer" }}
      <script src="https://www.unpkg.com/jquery/dist/jquery.js"></script>
    {{- end }}

Important notes:

  • Character casing is relevant!
  • The name in hugo.toml must match the Store key used in the shortcode file, prefixed with a has.
  • The key of relearn.dependencies must match the loader file name.

See the math, mermaid, and openapi shortcodes for examples.

Note

For advanced customization, you can use the dependency loader in your own partials:

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

Give a unique name for the location parameter when you call it, so you can distinguish your loaders behavior depending on the location it was called from.

Image Effects

This page shows you, how to configure custom image effects on top of existing ones.

This setting can also be overridden by your front matter.

If you don’t configure anything in your hugo.toml, the image effects default to

Default Values

[imageEffects]
  border = false
  lazy = true
  lightbox = true
  shadow = false
imageEffects:
  border: false
  lazy: true
  lightbox: true
  shadow: false
{
   "imageEffects": {
      "border": false,
      "lazy": true,
      "lightbox": true,
      "shadow": false
   }
}

Configuration

Option You can change these settings in your hugo.toml and add arbitrary custom effects as boolean values (like bg-white in the 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 in

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

Example

With this configuration in effect, the following URL

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

would result in

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

Styling Effects

If the resulting effect value is

  • true: add a class with the effect’s name
  • false: add a class with the effect’s name and a “no” prefix

Styles for default effects are contained in the theme. Add styles for your custom effects to layouts/partials/content-header.html.

For the above example you could add styles for both boolean cases:

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

Topbar

The theme comes with a reasonably configured topbar. You can learn how to configure the defaults in this section.

topbar on mobile devices topbar on mobile devices

Nevertheless, your requirements may differ from this configuration. Luckily, the theme has you covered as the topbar, its buttons, and the functionality behind these buttons are fully configurable by you.

Tip

All mentioned file names below can be clicked and show you the implementation for a better understanding.

Areas

The default configuration comes with three predefined areas that may contain an arbitrary set of buttons.

topbar with default areas marked topbar with default areas marked

  • start: shown between menu and breadcrumb
  • end: shown on the opposite breadcrumb side in comparison to the start area
  • more: shown when pressing the more button in the topbar

While you cannot add additional areas in the topbar, you are free to configure additional buttons that behave like the more button, providing further user-defined areas.

Buttons

The theme ships with the following predefined buttons (from left to right in the screenshot):

Not all buttons are displayed at every given time. This is configurable (see below if interested).

Redefining Areas

Each predefined area and button comes in its own file. By that, it is easy for you to overwrite an area file in your installation, reusing only the buttons you like.

E.g., you can redefine the predefined end area by adding the file layouts/partials/topbar/area/end.html in your installation (not in the theme itself) to remove all but the more button.

The below example sets an explicit value for the onempty parameter, overriding the specific default value for this button (these defaults vary depending on the button). The parameter causes the more button to always be displayed instead of hiding once its content is empty.

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

Defining Own Buttons

Button Types

The theme distinguishes between two types of buttons:

  • button: a clickable button that either browses to another site, triggers a user-defined script or opens an overlay containing user-defined content
  • area-button: the template for the more button, to define your own area overlay buttons

Button Parameter

Screen Widths and Actions

Depending on the screen width, you can configure how the button should behave. Screen width is divided into three classes:

  • s: (controlled by the onwidths parameter) mobile layout where the menu sidebar is hidden
  • m: (controlled by the onwidthm parameter) desktop layout with visible sidebar while the content area width still resizes
  • l: (controlled by the onwidthl parameter) desktop layout with visible sidebar once the content area reached its maximum width

For each width class, you can configure one of the following actions:

  • show: the button is displayed in its given area
  • hide: the button is removed
  • area-XXX: the button is moved from its given area into the area XXX; for example, this is used to move buttons to the more area overlay in the mobile layout

Hiding and Disabling Stuff

While hiding a button depending on the screen size can be configured with the above-described hide action, you may want to hide the button on certain other conditions as well.

For example, the print button in its default configuration should only be displayed if print support was configured. This is done in your button template by checking the conditions first before displaying the button (see layouts/partials/topbar/button/print.html).

Another preferred condition for hiding a button is if the displayed overlay is empty. This is the case for the toc (see layouts/partials/topbar/button/toc.html) as well as the more button (see layouts/partials/topbar/button/more.html) and controlled by the parameter onempty.

This parameter can have one of the following values:

  • disable: the button is displayed in a disabled state if the overlay is empty
  • hide: the button is removed if the overlay is empty

If you want to disable a button containing no overlay, this can be achieved by an empty href parameter. An example can be seen in the prev button (see layouts/partials/topbar/button/prev.html) where the URL for the previous site may be empty.

Reference

Button

Contains the basic button functionality and is used as a base implementation for all other buttons (layouts/partials/topbar/func/button.html).

Call this from your own button templates if you want to implement a button without an overlay like the print button (layouts/partials/topbar/button/print.html) or with an overlay containing arbitrary content like the toc button (layouts/partials/topbar/button/toc.html).

For displaying an area in the button’s overlay, see Area-Button.

Parameter

Name Default Notes
page <empty> Mandatory reference to the page.
class <empty> Mandatory unique class name for this button. Displaying two buttons with the same value for class is undefined.
href <empty> Either the destination URL for the button or JavaScript code to be executed on click.

- If starting with javascript: all following text will be executed in your browser
- Every other string will be interpreted as URL
- If empty, the button will be displayed in a disabled state regardless of its content
icon <empty> Font Awesome icon name.
onempty disable Defines what to do with the button if the content parameter was set but ends up empty:

- disable: The button is displayed in a disabled state.
- hide: The button is removed.
onwidths show The action that should be executed if the site is displayed in the given width:

- show: The button is displayed in its given area
- hide: The button is removed.
- area-XXX: The button is moved from its given area into the area XXX.
onwidthm show See above.
onwidthl show See above.
hint <empty> Arbitrary text displayed in the tooltip.
title <empty> Arbitrary text for the button.
content <empty> Arbitrary HTML to put into the content overlay. This parameter may be empty. In this case, no overlay will be generated.

Area-Button

Contains the basic functionality to display area overlay buttons (layouts/partials/topbar/func/area-button.html).

Call this from your own button templates if you want to implement a button with an area overlay like the more button (layouts/partials/topbar/button/more.html).

Parameter

Name Default Notes
page <empty> Mandatory reference to the page.
area <empty> Mandatory unique area name for this area. Displaying two areas with the same value for area is undefined.
icon <empty> Font Awesome icon name.
onempty disable Defines what to do with the button if the content overlay is empty:

- disable: The button is displayed in a disabled state.
- hide: The button is removed.
onwidths show The action that should be executed if the site is displayed in the given width:

- show: The button is displayed in its given area
- hide: The button is removed.
- area-XXX: The button is moved from its given area into the area XXX.
onwidthm show See above.
onwidthl show See above.
hint <empty> Arbitrary text displayed in the tooltip.
title <empty> Arbitrary text for the button.

Predefined Buttons

The predefined buttons by the theme (all other buttons besides the more and toc button in layouts/partials/topbar/button).

Call these from your own redefined area templates if you want to use default button behavior.

The <varying> parameter values are different for each button and configured for standard behavior as seen on this page.

Parameter

Name Default Notes
page <empty> Mandatory reference to the page.
onwidths <varying> The action that should be executed if the site is displayed in the given width:

- show: The button is displayed in its given area
- hide: The button is removed.
- area-XXX: The button is moved from its given area into the area XXX.
onwidthm <varying> See above.
onwidthl <varying> See above.

Predefined Overlay-Buttons

The predefined buttons by the theme that open an overlay (the more and toc button in layouts/partials/topbar/button).

Call these from your own redefined area templates if you want to use default button behavior utilizing overlay functionality.

The <varying> parameter values are different for each button and configured for standard behavior as seen on this page.

Parameter

Name Default Notes
page <empty> Mandatory reference to the page.
onempty disable Defines what to do with the button if the content overlay is empty:

- disable: The button is displayed in a disabled state.
- hide: The button is removed.
onwidths <varying> The action that should be executed if the site is displayed in the given width:

- show: The button is displayed in its given area
- hide: The button is removed.
- area-XXX: The button is moved from its given area into the area XXX.
onwidthm <varying> See above.
onwidthl <varying> See above.

Page Designs

A page is displayed by exactly one page design. The Relearn theme offers the page designs home, chapter, and default.

A page design usually consists of

If no type is set in your front matter, the page is treated as if type='default' was set.

Warning

Don’t use the type option in your modifications for other functionality!

All shipped designs use the theme’s framework from themes/hugo-theme-learn/layouts/_default/baseof.html, containing of the same topbar and sidebar but can change how content appears in the center of the page.

Using a Page Design

Regardless of shipped or custom page design, you are using them in the same way.

Creating a Page Designs

To make a custom page design:

  1. Choose a name (for example, mydesign)

  2. Create a content view file at layouts/mydesign/views/article.html

    <article class="mydesign">
      <header class="headline">
    {{ partial "content-header.html" . }}
      </header>
    <div class="article-subheading">AWESOME</div>
    {{ partial "heading-pre.html" . }}{{ partial "heading.html" . }}{{ partial "heading-post.html" . }}
    {{ partial "article-content.html" . }}
      <footer class="footline">
    {{ partial "content-footer.html" . }}
      </footer>
    </article>

    In this file, you can customize the page design as needed. Typically, you’ll want to:

    • Set a class at the article element for custom CSS styles
    • Use {{ partial "article-content.html" . }} to show your page content
  3. Create an archetype file at archetypes/mydesign.md (optional)

    +++
    title = "{{ replace .Name "-" " " | title }}"
    type = "mydesign"
    +++
    
    This is my new design.
  4. Add CSS in file layouts/partials/custom-header.html (optional)

    <style>
    .mydesign .article-subheading {
      font-size: 72rem;
    }
    .mydesign a {
      background-color: pink;
    }
    </style>

Partials

The above example uses layouts/mydesign/views/article.html but you have some others

  • layouts/mydesign/baseof.html: Completely redefine the whole HTML structure, none of the other listed partials will be used
  • layouts/mydesign/views/menu.html: Defines the sidebar menu layout
  • layouts/mydesign/views/body.html: Determines what to contain in the content area (for example a single page, a list of pages, a tree of sub pages)
  • layouts/mydesign/views/article.html: Controls how one page’s content and title are displayed

Output Formats

In addition to the output formats coming with the theme, you can create your own output formats.

Starting from Scratch

If you want to add a new output format called myformat that outputs HTML and you want to build everything yourself without using the theme’s components:

  1. Create a file layouts/_default/baseof.myformat.html
  2. Implement all the necessary code in this file

Using the Theme’s Structure

If you want to keep the general framework and only change specific parts, you can override these files:

  • layouts/_default/views/article.html: Controls how a page’s content and title are displayed
  • layouts/_default/views/body.html: Determines the page body structure
  • layouts/_default/views/menu.html: Defines the sidebar menu layout
  • layouts/_default/views/storeOutputFormat.html: Stores the output format name for use in the framework

For a real-world example, check out the print output format implementations

Taxonomies

This page explains how to show custom taxonomies on your pages.

For more details, check the official docs on setting up custom taxonomies and using them in your content.

Default Behavior

The Relearn theme automatically shows Hugo’s default taxonomies tags and categories out of the box.

  • Tags appear at the top of the page in alphabetical order in form of baggage tags.
  • Categories appear at the bottom of the page in alphabetical order as a list prefixed with an icon.

Each item links to a page showing all articles with that term.

Setting Up Custom Taxonomies

To add custom taxonomies, update your hugo.toml file. You also have to add the default taxonomies if you want to use them.

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

Showing Custom Taxonomies

To display your custom taxonomy terms, add this to your page (usually in layouts/partials/content-footer.html):

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

Parameter

Name Default Notes
page <empty> Mandatory reference to the page.
taxonomy <empty> The plural name of the taxonomy to display as used in your front matter.
class <empty> Additional CSS classes set on the outermost generated HTML element.

If set to tags you will get the visuals for displaying the tags taxonomy, otherwise it will be a simple list of links as for the categories taxonomy.
style primary The style scheme used if class is 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
color see notes The CSS color value to be used if class is tags. If not set, the chosen color depends on the style. Any given value will overwrite the default.

- for severity styles: a nice matching color for the severity
- for all other styles: the corresponding color
icon <empty> An optional Font Awesome icon name set to the left of the list.

Options Reference

This page explains how to configure the Relearn theme in your hugo.toml file.

In addition to Hugo’s standard options, the Relearn theme offers extra settings listed here.

Throughout the documentation, theme-specific options are marked with a Option badge.

Add theme options to the params section of your 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

All Configuration Options

Here’s a list of all available options with example values. Default values are described in the annotated example below in each option’s documentation.

hugo.
[params]
  additionalContentLanguage = ['en']
  alwaysopen = ''
  breadcrumbSeparator = '>'
  collapsibleMenu = true
  customMathJaxURL = ''
  customMermaidURL = ''
  customOpenapiURL = ''
  disableAnchorCopy = false
  disableAnchorScrolling = false
  disableAssetsBusting = false
  disableBreadcrumb = false
  disableDefaultRelref = false
  disableExplicitIndexURLs = false
  disableGeneratorVersion = false
  disableHoverBlockCopyToClipBoard = false
  disableInlineCopyToClipBoard = true
  disableLandingPageButton = true
  disableLanguageSwitchingButton = false
  disableNextPrev = false
  disableRandomIds = false
  disableRootBreadcrumb = true
  disableSearch = false
  disableSearchHiddenPages = false
  disableSearchIndex = false
  disableSearchPage = false
  disableSeoHiddenPages = true
  disableShortcutsTitle = false
  disableTagHiddenPages = false
  disableTermBreadcrumbs = false
  disableToc = false
  editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}'
  externalLinkTarget = '_self'
  highlightWrap = true
  images = ['images/hero.png']
  linkTitle = 'Relearn'
  math = false
  mathJaxInitialize = '{}'
  mermaidInitialize = '{ "securityLevel": "loose" }'
  mermaidZoom = true
  ordersectionsby = 'weight'
  searchIndexURL = 'searchindex.js'
  searchPageURL = 'search'
  showVisitedLinks = true
  titleSeparator = '::'

  [params.author]
    name = 'SΓΆren Weber'

  [[params.boxStyle]]
    color = 'gold'
    i18n = ''
    icon = 'rainbow'
    identifier = 'magic'
    title = 'Magic'

  [params.image]
    errorlevel = 'error'

  [params.imageEffects]
    border = true
    lazy = true
    lightbox = true
    shadow = false

  [params.include]
    errorlevel = 'error'

  [params.link]
    errorlevel = 'error'

  [params.mermaid]
    force = false

  [params.openapi]
    errorlevel = 'error'

  [params.oppenapi]
    force = false

  [[params.sidebarmenus]]
    disableTitle = true
    identifier = 'home'
    main = true
    pageRef = ''
    type = 'page'

  [[params.sidebarmenus]]
    disableTitle = false
    identifier = 'shortcuts'
    main = false
    type = 'menu'

  [params.social]
    facebook_admin = ''
    twitter = ''

  [[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]]
    identifier = 'blue'

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

  [[params.themeVariant]]
    identifier = 'red'
params:
  additionalContentLanguage:
  - en
  alwaysopen: ""
  author:
    name: SΓΆren Weber
  boxStyle:
  - color: gold
    i18n: ""
    icon: rainbow
    identifier: magic
    title: Magic
  breadcrumbSeparator: '>'
  collapsibleMenu: true
  customMathJaxURL: ""
  customMermaidURL: ""
  customOpenapiURL: ""
  disableAnchorCopy: false
  disableAnchorScrolling: false
  disableAssetsBusting: false
  disableBreadcrumb: false
  disableDefaultRelref: false
  disableExplicitIndexURLs: false
  disableGeneratorVersion: false
  disableHoverBlockCopyToClipBoard: false
  disableInlineCopyToClipBoard: true
  disableLandingPageButton: true
  disableLanguageSwitchingButton: false
  disableNextPrev: false
  disableRandomIds: false
  disableRootBreadcrumb: true
  disableSearch: false
  disableSearchHiddenPages: false
  disableSearchIndex: false
  disableSearchPage: false
  disableSeoHiddenPages: true
  disableShortcutsTitle: false
  disableTagHiddenPages: false
  disableTermBreadcrumbs: false
  disableToc: false
  editURL: https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}
  externalLinkTarget: _self
  highlightWrap: true
  image:
    errorlevel: error
  imageEffects:
    border: true
    lazy: true
    lightbox: true
    shadow: false
  images:
  - images/hero.png
  include:
    errorlevel: error
  link:
    errorlevel: error
  linkTitle: Relearn
  math: false
  mathJaxInitialize: '{}'
  mermaid:
    force: false
  mermaidInitialize: '{ "securityLevel": "loose" }'
  mermaidZoom: true
  openapi:
    errorlevel: error
  oppenapi:
    force: false
  ordersectionsby: weight
  searchIndexURL: searchindex.js
  searchPageURL: search
  showVisitedLinks: true
  sidebarmenus:
  - disableTitle: true
    identifier: home
    main: true
    pageRef: ""
    type: page
  - disableTitle: false
    identifier: shortcuts
    main: false
    type: menu
  social:
    facebook_admin: ""
    twitter: ""
  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
  - identifier: blue
  - identifier: green
  - identifier: red
  titleSeparator: '::'
{
   "params": {
      "additionalContentLanguage": [
         "en"
      ],
      "alwaysopen": "",
      "author": {
         "name": "SΓΆren Weber"
      },
      "boxStyle": [
         {
            "color": "gold",
            "i18n": "",
            "icon": "rainbow",
            "identifier": "magic",
            "title": "Magic"
         }
      ],
      "breadcrumbSeparator": "\u003e",
      "collapsibleMenu": true,
      "customMathJaxURL": "",
      "customMermaidURL": "",
      "customOpenapiURL": "",
      "disableAnchorCopy": false,
      "disableAnchorScrolling": false,
      "disableAssetsBusting": false,
      "disableBreadcrumb": false,
      "disableDefaultRelref": false,
      "disableExplicitIndexURLs": false,
      "disableGeneratorVersion": false,
      "disableHoverBlockCopyToClipBoard": false,
      "disableInlineCopyToClipBoard": true,
      "disableLandingPageButton": true,
      "disableLanguageSwitchingButton": false,
      "disableNextPrev": false,
      "disableRandomIds": false,
      "disableRootBreadcrumb": true,
      "disableSearch": false,
      "disableSearchHiddenPages": false,
      "disableSearchIndex": false,
      "disableSearchPage": false,
      "disableSeoHiddenPages": true,
      "disableShortcutsTitle": false,
      "disableTagHiddenPages": false,
      "disableTermBreadcrumbs": false,
      "disableToc": false,
      "editURL": "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}",
      "externalLinkTarget": "_self",
      "highlightWrap": true,
      "image": {
         "errorlevel": "error"
      },
      "imageEffects": {
         "border": true,
         "lazy": true,
         "lightbox": true,
         "shadow": false
      },
      "images": [
         "images/hero.png"
      ],
      "include": {
         "errorlevel": "error"
      },
      "link": {
         "errorlevel": "error"
      },
      "linkTitle": "Relearn",
      "math": false,
      "mathJaxInitialize": "{}",
      "mermaid": {
         "force": false
      },
      "mermaidInitialize": "{ \"securityLevel\": \"loose\" }",
      "mermaidZoom": true,
      "openapi": {
         "errorlevel": "error"
      },
      "oppenapi": {
         "force": false
      },
      "ordersectionsby": "weight",
      "searchIndexURL": "searchindex.js",
      "searchPageURL": "search",
      "showVisitedLinks": true,
      "sidebarmenus": [
         {
            "disableTitle": true,
            "identifier": "home",
            "main": true,
            "pageRef": "",
            "type": "page"
         },
         {
            "disableTitle": false,
            "identifier": "shortcuts",
            "main": false,
            "type": "menu"
         }
      ],
      "social": {
         "facebook_admin": "",
         "twitter": ""
      },
      "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"
         },
         {
            "identifier": "blue"
         },
         {
            "identifier": "green"
         },
         {
            "identifier": "red"
         }
      ],
      "titleSeparator": "::"
   }
}

Annotated Configuration Options

[params]
# If an option value is said to be not set, you can achieve the same behavior
# by giving it an empty string value.

###############################################################################
# Hugo
# These options usually apply to other themes as well.

# The title to be used for links to the main page
# Default: not set
# This name will be used for the link to the main page in the upper section
# of the menu. If not set, `title` from the Hugo settings will be used.
linkTitle = 'Relearn'

# The author of your site.
# Default: not set
# This will be used in HTML meta tags, the opengraph protocol and twitter
# cards.
# You can also set `author.email` if you want to publish this information.
author.name = 'SΓΆren Weber'

# The social media image of your site.
# Default: not set
# This is used for generating social media meta information for the opengraph
# protocol and twitter cards.
# This can be overridden in the page's frontmatter.
images = [ 'images/hero.png' ]

# Admin options for social media.
# Default: not set
# Configuration for the Open Graph protocol and Twitter Cards adhere to Hugo's
# implementation. See the Hugo docs for possible values.
social.facebook_admin = ''
social.twitter = ''

###############################################################################
# Relearn Theme
# These options are specific to the Relearn theme.

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Branding
# These options set your overall visual appearance.

# Used color variants.
# Default: 'auto'
# This sets one or more color variants, available to your readers to choose
# from. You can
# - set a single value eg. 'zen-light'
# - an array like [ 'neon', 'learn' ]
# - an array with options like [ { identifier = 'neon' },{ identifier = 'learn' } ]
# The last form allows to set further options for each variant.
# The `identifier` is mandatory. You can also set `name` which overrides the
# value displayed in the variant selector.
# If the array has more than one entry, a variant selector
# is shown in the lower part of the menu. The first entry in the array is the
# default variant, used for first time visitors.
# The theme ships with the following variants: 'relearn-bright',
# 'relearn-light', 'relearn-dark', 'zen-light', 'zen-dark', 'neon', 'learn',
# 'blue', 'green', 'red'. In addition you can use auto mode variants. See the
# docs for a detailed explanation.
# You can also define your own variants. See the docs how this works. Also,
# the docs provide an interactive theme generator to help you with this task.
themeVariant = [
	{ identifier = 'relearn-auto',  name = 'Relearn Light/Dark', auto = [] },
	{ identifier = 'relearn-light'  },
	{ identifier = 'relearn-dark'   },
	{ identifier = 'relearn-bright' },
	{ identifier = 'zen-auto',      name = 'Zen Light/Dark', auto = [ 'zen-light', 'zen-dark' ] },
	{ identifier = 'zen-light'      },
	{ identifier = 'zen-dark'       },
	{ identifier = 'retro-auto',    name = 'Retro Learn/Neon', auto = [ 'learn', 'neon' ] },
	{ identifier = 'neon'           },
	{ identifier = 'learn'          },
	{ identifier = 'blue'           },
	{ identifier = 'green'          },
	{ identifier = 'red'            }
]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# General
# These options are defining general, non visual behavior.

# Avoid new asset URLs on build.
# Default: false
# By default JavaScript-files and CSS-files get a unique ID on each rebuild.
# This makes sure, the user always has the latest version and not some stale
# copy of his browser cache. Anyways, it can be desireable to turn this
# off in certain circumstances. For example if you have Hugo's dev server
# running. Also some proxies dislike this optimization.
disableAssetsBusting = false

# Avoid generator meta tags.
# Default: false
# Set this to true if you want to disable generation for generator meta tags
# of Hugo and the theme in your HTML head. In this case also don't forget to
# set Hugo's disableHugoGeneratorInject=true. Otherwise Hugo will generate a
# meta tag into your home page anyways.
disableGeneratorVersion = false

# Avoid unique IDs.
# Default: false
# In various situations the theme generates non stable unique ids to be used
# in HTML fragment links. This can be undesirable for example when testing
# the output for changes. If you disable the random id generation, the theme
# may not function correctly anymore.
disableRandomIds = false

# Additional code dependencies.
# Default: See hugo.toml of the theme
# The theme provides a mechanism to load further JavaScript and CSS
# dependencies on demand only if they are needed. This comes in handy if you
# want to add own shortcodes that depend on additional code to be loaded.
# See the docs how this works.
# [relearn.dependencies]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Topbar
# These options modify the topbar appearance.

# Hide the table of contents button.
# Default: false
# If the TOC button is hidden, also the keyboard shortcut is disabled.
# This can be overridden in the page's frontmatter.
disableToc = false

# Hide the breadcrumbs.
# Default: false
# If the breadcrumbs are hidden, the title of the displayed page will still be
# shown in the topbar.
disableBreadcrumb = false

# Hide Next and Previous navigation buttons.
# Default: false
# If the navigation buttons are hidden, also the keyboard shortcuts are
# disabled.
disableNextPrev = false

# The URL prefix to edit a page.
# Default: not set
# If set, an edit button will be shown in the topbar. If the button is hidden,
# also the keyboard shortcuts are disabled. The value can contain the macro
# `${FilePath}` which will be replaced by the file path of your displayed page.
# If no `${FilePath}` is given in the value, the value is treated as if the
# `${FilePath}` was appended at the end of the value. This can be overridden
# in the pages frontmatter. This is useful if you want to give the opportunity
# for people to create merge request for your content.
editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}'

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Search
# These options modify various aspects of the search functionality.

# Disable the search.
# Default: false
# If the search is disabled, no search box will be displayed in the menu,
# nor in-page search, search popup or dedicated search page will be available.
# This will also cause the keyboard shortcut to be disabled.
disableSearch = false

# Disable the search index generation.
# Default: false
# `disableSearch=false` must be set to let the generation of the search index
# file to be affected by this option. If the search index is disabled, no
# search popup or dedicated search page will be available.
disableSearchIndex = false

# URL of the search index file relative to the language home.
# Default: 'searchindex.js'
# You have to set this option if your page already has a content file named
# `searchindex.js` in the language home.
searchIndexURL = 'searchindex.js'

# Disable the dedicated search page.
# Default: false
# `disableSearch=false` and `disableSearchIndex=false` must be set to let the
# generation of the dedicated search page to be affected by this option.
disableSearchPage = false

# URL of the dedicated search page relative to the language home.
# Default: 'search'
# In its basic form the search page URL is named the same for all languages
# but you are free to override it in each language options to localised the
# URL. You also need to set this option if your page already has a content
# page named `search`.
searchPageURL = 'search'

# Multilanguage content.
# Default: not set
# If the search index is enabled and your pages contain further languages
# besides the main one used, add all those auxiliary languages here. This
# will create a search index with support for all used languages of your site.
# This is handy for example if you are writing in Spanish but have lots of
# source code on your page which typically uses English terminology.
additionalContentLanguage = [ 'en' ]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Menu
# These options modify the menu appearance.

# Hide the Home entry.
# Default: false
# If shown, a Home button will appear below the search bar and the main menu.
# It links to your the home page of the current language.
disableLandingPageButton = true

# Hide the language switcher.
# Default: false
# If you have more than one language configured, a language switcher is
# displayed in the lower part of the menu. This option lets you explicitly
# turn this behavior off.
disableLanguageSwitchingButton = false

# Shows checkmarks for visited pages of the main menu.
# Default: false
# This also causes the display of the `Clear History` entry in the lower part
# of the menu to remove all checkmarks. The checkmarks will also been removed
# if you regenerate your site as the ids are not stable.
showVisitedLinks = true

# The order of main menu submenus.
# Default: 'weight'
# Submenus can be ordered by 'weight', 'title', 'linktitle', 'modifieddate',
# 'expirydate', 'publishdate', 'date', 'length' or 'default' (adhering to
# Hugo's default sort order). This can be overridden in the pages frontmatter.
ordersectionsby = 'weight'

# The initial expand state of submenus.
# Default: not set
# This controls whether submenus will be expanded (true), or collapsed (false)
# in the menu. If not set, the first menu level is set to false, all others
# levels are set to true. This can be overridden in the page's frontmatter.
# If the displayed page has submenus, they will always been displayed expanded
# regardless of this option.
alwaysopen = ''

# Shows expander for submenus.
# Default: false
# If set to true, a submenu in the sidebar will be displayed in a collapsible
# tree view and a clickable expander is set in front of the entry.
# This can be overridden in the page's frontmatter.
collapsibleMenu = true

# Hide heading above the shortcuts menu.
# Default: false
# If a sidebar menu with identifier `shortcuts` is configured (see below),
# this is the easy way to remove the heading;
# The title for the heading can be overwritten in your i18n files. See Hugo's
# documentation how to do this.
disableShortcutsTitle = false

# Define your own sidebar menus.
# Default: the value used below
# The sidebar menus are built from this parameter. If not set, it contains
# the below default.
# Menus are written from the sidebar's top to buttom in the order given in
# this array.
# This can be overridden in the page's frontmatter.
# Each entry can contain the following keys:
# - `type` is mandatory. Either `page` in case it should generate a tre from
#    the page structure or `menu` in case it should generate a tree from a
#    defined menu.
# - `identifier` is mandatory. In case of `type=page`, anything can be used,
#    in case of `type=menu` the `identifier` key must be identical to the
#    key of the menu definition.
# - `main`, boolean. If `true`, the first tree level is spaced more generous
#    and the text is emphasized. Default: `true` for `type=page` and `false`
#    for `type=menu`
# - `disableTitle`, boolean. If `true`, there is no title above the tree.
#    Default: `true` for `type=page` and `false` for `type=menu`. If a title
#    should be used, in case of `type=page` it will be taken from the page's
#    `menuTitle` front matter and if not set, from the translation files, using
#    the menu `identifier` as key. In case of `type=menu` it will be taken
#    from the menu `title` according to Hugo's documentation and if not set
#    from the menu `name` and if this is not set form the page's `linkTitle`.
# - `pageRef`, optional. In case of `type=page` this is the starting page's
#   path. If not set, the home page will be used.
sidebarmenus = [
	{ type = 'page', identifier = 'home', main = true, disableTitle = true, pageRef = '' },
	{ type = 'menu', identifier = 'shortcuts', main = false, disableTitle = false },
]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Hidden pages
# These options configure how hidden pages are treated.
# A page flagged as hidden, is only removed from the main menu if you are
# currently not on this page or the hidden page is not part of current page's
# ancestors. For all other functionality in Hugo a hidden page behaves like any
# other page if not otherwise configured.

# Hide hidden pages from search.
# Default: false
# Hides hidden pages from the suggestions of the search box and the dedicated
# search page.
disableSearchHiddenPages = false

# Hide hidden pages for web crawlers.
# Default: false
# Avoids hidden pages from showing up in the sitemap and on Google (et all),
# otherwise they may be indexed by search engines
disableSeoHiddenPages = true

# Hide hidden pages for taxonomies.
# Default: false
# Hides hidden pages from showing up on the taxonomy and terms pages. If this
# reduces term counters to zero, an empty but not linked term page will be
# created anyhow.
disableTagHiddenPages = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Content
# These options modify how your content is displayed.

# Title separator.
# Default: '::'
# Changes the title separator used when concatenating the page title with the
# site title. This is consistently used throughout the theme.
titleSeparator = '::'

# Breadcrumb separator.
# Default: '>'
# Changes the breadcrumb separator used in the topbars breadcrumb area and for
# search results and term pages.
breadcrumbSeparator = '>'

# Hide the root breadcrumb.
# Default: false
# The root breadcrumb is usually the home page of your site. Because this is
# always accessible by clicking on the logo, you may want to reduce clutter
# by removing this from your breadcrumb.
disableRootBreadcrumb = true

# Hide breadcrumbs term pages.
# Default: false
# If you have lots of taxonomy terms, the term pages may seem cluttered with
# breadcrumbs to you, so this is the option to turn off breadcrumbs on term
# pages. Only the page title will then be shown on the term pages.
disableTermBreadcrumbs = false

# Disable copying heading links to clipboard
# Default: false
# If set to true, this disables the copying of anchor links to the clipboard;
# if also `disableAnchorScrolling=true` then no anchor link will be visible
# when hovering a heading.
disableAnchorCopy = false

# Disable scrolling to heading link on click
# Default: false
# If set to true, this disables the scrolling to the beginning of the heading
# when clicked; if also `disableAnchorCopy=true` then no anchor link will
# be visible when hovering a heading.
disableAnchorScrolling = false

# User-defined styles for shortcodes
# Default: not set
# Besides the predefined `style` values, you are able to define your own. The
# `style` parameter of the shortcode must match the `identifier` defined here.
# The title for the style will be determined from the `title`. If no `title`
# but a `i18n` is set, the title will be taken from the translation files by
# that key. The `title` may be empty in which case, the box does not contain a
# default title. `icon` and `color` are working similar.
boxStyle = [
	{ identifier = 'magic', i18n = '', title = 'Magic', icon = 'rainbow', color = 'gold' }
]

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Highlight
# These options configure how code is displayed.

# Hide copy-to-clipboard for inline code.
# Default: false
# This removes the copy-to-clipboard button from your inline code.
disableInlineCopyToClipBoard = true

# Always show copy-to-clipboard for block code.
# Default: false
# The theme only shows the copy-to-clipboard button if you hover over the code
# block. Set this to true to disable the hover effect and always show the
# button.
disableHoverBlockCopyToClipBoard = false

# Wrap for code blocks.
# Default: true
# By default lines of code blocks wrap around if the line is too long to be
# displayed on screen. If you dislike this behavior, you can reconfigure it
# here.
# Note that lines always wrap in print mode regardless of this option.
# This can be overridden in the page's frontmatter or given as a parameter to
# individual code blocks.
highlightWrap = true

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Include
# These options configure how the include shortcode works.

# What to do when path is not resolved.
# Default: ''
# You can control what should happen if a path can not be resolved to as
# a resource or via the file system. If not set, no output will be written
# for the unresolved path. If set to `warning` the same happens and an additional
# warning is printed. If set to `error` an error message is printed and the build
# is aborted.
# This can be overridden in the page's frontmatter.
include.errorlevel = 'error'

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Images
# These options configure how images are displayed.

# What to do when local image link is not resolved.
# Default: ''
# You can control what should happen if a local image can not be resolved to as
# a resource. If not set, the unresolved link is written as given into the resulting
# output. If set to `warning` the same happens and an additional warning is
# printed. If set to `error` an error message is printed and the build is
# aborted.
# Please note that this can not resolve files inside of your `static` directory.
# This can be overridden in the page's frontmatter.
image.errorlevel = 'error'

# Image effects.
# See the documentation for how you can even add your own arbitrary effects to
# the list.
# All effects can be overridden in the page's frontmatter or through URL parameter
# given to the image. See the documentation for details.

# Default: false
imageEffects.border = true
# Default: true
imageEffects.lazy = true
# Default: true
imageEffects.lightbox = true
# Default: false
imageEffects.shadow = false

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Links
# These options configure how links are displayed.

# Wether to use Hugo's default relref shortcode implementation
# Default: false
# Since the theme provides a link render hook, the usage of the relref shortcode
# is obsolete. If a site still uses that shortcode, it fails to generate a
# correct links if the baseURL is configured with a subdirectory and relativeURLs=false.
# The theme provides an overriden relref shortcode that also works in the
# above setup but must manually be activated by setting this option to true.
# See discussion in https://github.com/McShelby/hugo-theme-relearn/discussions/862
disableDefaultRelref = false

# Generate link URLs the Hugo way.
# Default: false
# If set to true, the theme behaves like a standard Hugo installation and
# appends no index.html to prettyURLs. As a trade off, your build project will
# not be servable from the file system.
disableExplicitIndexURLs = false

# What to do when local page link is not resolved.
# Default: ''
# You can control what should happen if a local link can not be resolved to a
# page. If not set, the unresolved link is written as given into the resulting
# output. If set to `warning` the same happens and an additional warning is
# printed. If set to `error` an error message is printed and the build is
# aborted.
# Please note that with Hugo < 0.123.0 + `uglyURLs=true` this can lead to false
# negatives.
# This can be overridden in the page's frontmatter.
link.errorlevel = 'error'

# How to open external links.
# Default: '_blank'
# For external links you can define how they are opened in your browser. All
# values for the HTML `target` attribute of the `a` element are allowed. The
# default value opens external links in a separate browser tab. If you want
# to open those links in the same tab, use '_self'.
# This can be overridden in the page's frontmatter.
externalLinkTarget = '_self'

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# MathJax
# These options configure how math formulae are displayed.

# Initialization options for MathJax.
# Default: not set
# A JSON value. See the MathJaxdocumentation for possible parameter.
# This can be overridden in the page's frontmatter.
mathJaxInitialize = '{}'

# Force load Math on every page.
# Default: false
# If a, Math shortcode or codefence is found, the option will be ignored and
# Math will be loaded regardlessly. This option is useful in case you
# are using passthrough configuration to render your math. In this case no shortcode or
# codefence is involved and the library is not loaded by default so you can
# force loading it by setting `math=true`.
# This option has an alias `math.force`.
# This can be overridden in the page's frontmatter.
math = false

# URL for external MathJax library.
# Default: not set
# Specifies the remote location of the MathJax library. By default the shipped
# version will be used.
# This can be overridden in the page's frontmatter.
customMathJaxURL = '' # 'https://unpkg.com/mathjax/es5/tex-mml-chtml.js'

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Mermaid
# These options configure how Mermaid graphs are displayed.

# Make graphs panable and zoomable
# Default: false
# For huge graphs it can be helpful to make them zoomable. Zoomable graphs come
# with a reset button for the zoom.
# This can be overridden in the page's frontmatter or given as a parameter to
# individual graphs.
mermaidZoom = true

# Initialization options for Mermaid.
# Default: not set
# A JSON value. See the Mermaid documentation for possible parameter.
# This can be overridden in the page's frontmatter.
mermaidInitialize = '{ "securityLevel": "loose" }'

# Force load Mermaid on every page.
# Default: false
# If a Mermaid shortcode or codefence is found, the option will be ignored and
# Mermaid will be loaded regardlessly. This option is useful in case you
# are using scripting to render your graph. In this case no shortcode or
# codefence is involved and the library is not loaded by default so you can
# force loading it by setting `mermaid.force=true`.
# This can be overridden in the page's frontmatter.
mermaid.force = false

# URL for external Mermaid library.
# Default: not set
# Specifies the remote location of the Mermaid library. By default the shipped
# version will be used.
# This can be overridden in the page's frontmatter.
customMermaidURL = '' # 'https://unpkg.com/mermaid/dist/mermaid.min.js'

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# OpenApi
# These options configure how OpenAPI specifications are displayed.

# Force load OpenAPI on every page.
# Default: false
# If a, OpenAPI shortcode or codefence is found, the option will be ignored and
# OpenAPI will be loaded regardlessly. This option is useful in case you
# are using scripting to render your spec. In this case no shortcode or
# codefence is involved and the library is not loaded by default so you can
# force loading it by setting `openapi.force=true`.
# This can be overridden in the page's frontmatter.
oppenapi.force = false

# URL for external OpenAPI library.
# Default: not set
# Specifies the remote location of the OpenAPI library. By default the shipped
# version will be used.
# This can be overridden in the page's frontmatter.
customOpenapiURL = '' # 'https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js'

# What to do when a local OpenAPI spec link is not resolved.
# Default: ''
# You can control what should happen if a local OpenAPI spec link can not be resolved
# to a resource. If not set, the unresolved link is written as given into the resulting
# output. If set to `warning` the same happens and an additional warning is
# printed. If set to `error` an error message is printed and the build is
# aborted.
# Please note that this can not resolve files inside of your `static` directory.
# This can be overridden in the page's frontmatter.
openapi.errorlevel = 'error'