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.
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:enlanguages:en:languageCode:enlanguageName:Englishtitle:My Websiteweight:1pir:languageCode:art-x-pirlanguageDirection:rtllanguageName:Pirrratishtitle:Arrr, my Websiteweight: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}}}
Duplicate your content files and add language codes to their file names:
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.
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.
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
Print Support
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:
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:
An interactive tool to generate color variant stylesheets
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:
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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}}
Footer
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
Configure Search
The theme offers three levels of search through the menu’s search form:
In-page search: Highlights search terms on the current page
Search popup: Opens a popup with results from other pages
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:
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.
Option All configuration options in your hugo.toml apply to all menus but can be changed individually.
Front Matter In case of page structure menus, individual configuration is done via a page’s front matter.
Menu. In case of Hugo menus, individual configuration is done via a menu entry’s configuration.
Expand State of Submenus
OptionFront Matter You can change how submenus appear with alwaysopen.
Menu For Hugo menus, you have to set params.alwaysopen instead.
If alwaysopen=false for any given entry, its children will not be shown in the menu as long as it is not necessary for the sake of navigation.
The theme generates the expand state based on the following rules:
all parent entries of the active page including their visible siblings are shown regardless of any settings
immediate child entries of the active entry are shown regardless of any settings
if not overridden, all other first level entries behave like they would have been given alwaysopen=false
if not overridden, all other entries of levels besides the first behave like they would have been given alwaysopen=true
all visible entries show their immediate child entries if alwaysopen=true; this proceeds recursively
all remaining entries are not shown
alwaysopen=false
alwaysopen:false
{"alwaysopen":false}
Expander for Submenus
OptionFront Matter Set collapsibleMenu=true to show submenus as collapsible trees with a clickable expander.
Menu For Hugo menus, you have to set params.collapsibleMenu=true instead.
collapsibleMenu=true
collapsibleMenu:true
{"collapsibleMenu":true}
Warning
Using this option may cause degraded build performance by slowing down your build process.
This is usually the case for menus with many entries and happens for page menus as well as for Hugo menus.
We’ve seen builds taking 2 minutes with 1000+ pages, and over 30 minutes with 5000+ pages when using a page menu.
This happens because each new page affects all other pages, leading to exponentially longer build times.
Ordering Menu Entries
By Weight
Front MatterMenu Hugo provides a simple way to handle order of your entries by setting the weight front matter to a number.
Hugo menus can only be sorted using the weight method.
weight=5
weight:5
{"weight":5}
By Other
Using the weight for sorting can get cumbersome if you, for example, just want to sort alphabetically. Each time you add a new page in the set of pages, you may have to renumber some or all of them to make space for the new page.
OptionFront Matter Use ordersectionsby to sort by other aspects. See the children shortcode for a complete list.
ordersectionsby='linktitle'
ordersectionsby:linktitle
{"ordersectionsby":"linktitle"}
Title for Menu Entries
Front Matter A page’s linkTitle or title front matter will be used for naming a menu entry of a page menu, in that order if both are defined. Using linkTitle helps to shorten the text for menu entries if the pageβs title is too descriptive.
Menu A menu entry’s title or name will be used for naming a menu entry of a Hugo menu, in that order if both are defined.
For example for a page named install/linux.md
+++linkTitle='Linux'title='Install on Linux'+++
---linkTitle:Linuxtitle:Install on Linux---
{"linkTitle":"Linux","title":"Install on Linux"}
Icons for Menu Entries
Front Matter For page menus, add a menuPre to insert any HTML code before the menu label. You can also set menuPost to insert HTML code after the menu label.
Menu For Hugo menus, add a pre to insert any HTML code before the menu label. You can also set post to insert HTML code after the menu label.
If pageRef is set for the menu entry and no pre or post was configured, menuPre and menuPost of the referenced page will be taken.
The example below uses the GitHub icon for an entry of a page menu.
You may want to structure your entries in a hierarchical way but don’t want to generate clickable parent entries? The theme got you covered.
For Page Menus
To stay with the initial example: Suppose you want first-chapter/first-page appear in the sidebar but don’t want to generate a page for it. So the entry in the sidebar should not be clickable but should be expandable.
For this, open content/first-chapter/first-page/_index.md and add the following front matter
+++[_build]render='never'+++
---_build:render:never---
{"_build":{"render":"never"}}
For Hugo Menus
Just don’t give your parent menu entry configuration a url or pageRef. See the next section for a special case.
If you want to learn how to configure different Hugo menus for each language, see the official docs.
Front Matter For page menus, set the menuTitle front matter for the root page of the menu. For example in the home page for the default sidebar menu. If no menuTitle was set, the title will be taken from your translation files by the key <identifier>-menuTitle, where <identifier> is the identifier of your sidebar menu configuration.
Menu For Hugo menus, the title will be taken from your translation files by the key <identifier>-menuTitle, where <identifier> is the identifier of your sidebar menu configuration.
If you don’t want to fiddle around with your translation files, you also have the possibility to let the title be taken from the menu definition. For that, define a nested menu that only has one top-level entry without url or pageRef.
In this case, the title or name is taken for the menu heading.
If you want to learn how to configure different Hugo menus for each language, see the official docs.
+++[menu][[menu.addendum]]name='A Menu Title for the Whole Menu'[[menu.addendum]]name='A Menu Entry Title for Child 1'parent='Parent'url='https://example.com/1'weight=1[[menu.addendum]]name='A Menu Entry Title for Child 2'parent='Parent'url='https://example.com/2'weight=2+++
---menu:addendum:- name:A Menu Title for the Whole Menu- name:A Menu Entry Title for Child 1parent:Parenturl:https://example.com/1weight:1- name:A Menu Entry Title for Child 2parent:Parenturl:https://example.com/2weight:2---
{"menu":{"addendum":[{"name":"A Menu Title for the Whole Menu"},{"name":"A Menu Entry Title for Child 1","parent":"Parent","url":"https://example.com/1","weight":1},{"name":"A Menu Entry Title for Child 2","parent":"Parent","url":"https://example.com/2","weight":2}]}}
Title for the Predefined Shortcut Menu
Option By default, the predefined shortcut menu has a the title More (in the English translation).
You can disable this title with disableShortcutsTitle=true.
hugo.
[params]disableShortcutsTitle=true
params:disableShortcutsTitle:true
{"params":{"disableShortcutsTitle":true}}
To change the title, override your translation file.
[shortcuts-menuTitle]other="Other Great Stuff"
Defining Sidebar Menus
OptionFront Matter Menus are defined using the sidebarmenus option.
You can define as many menus, as you like. If you don’t overwrite this option, the theme defaults to
- for type=page an arbitrary name - for page=menu the identifier of the menu definition in your hugo.toml
main
see notes
Whether to add additional spacing and larger text to the menu
- for type=page defaults to true - for page=menu defaults to false
disableTitle
see notes
Whether to print a title above the menu
- for type=page defaults to true - for page=menu defaults to false
pageRef
<empty>
Only for type=page, the page path to start the menu tree. If not set, defaults to the home page.
Redefining Sidebar Menus for Certain Pages
Suppose you are building a site that contains a topmost blog and documentation section.
When the user is on one of the blog pages he should only see a menu containing all blog pages, while on a documentation page he should only see a menu containing all doc pages.
OptionFront Matter Using Hugo’s cascade feature, we can redefine the menus once in blog/_index.md and docs/_index.md setting sidebarmenus so they will be used in all children pages.
If you want to link to an external page instead, you can use menuUrl instead of menuPageRef.
Pages defining a crosslink are never part of the arrow navigation and are skipped instead.
So with the above example and alphabetical sorting of the menu entries, pressing on topic-blue will skip the newly added topic-green and instead will load topic-red.
Having sub pages below a page that defines a crosslink is undefined.
Displaying Pages Exclusively in a Hugo Menu
Sometimes you want to hide pages from the page menu but instead want to show them in a Hugo menu. For that you have two choices
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.
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.
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
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.
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.
Copy Anchor Links
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.
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.
Hide from Search
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.
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:
Create the shortcode file layouts/shortcodes/myshortcode.html and add the folloging line somewhere:
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.
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.
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):
sidebar: opens the sidebar flyout if in mobile layout
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.
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).
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.
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
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.
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.
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.
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
an archetype file: a template for creating new Markdown files with this design
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:
Choose a name (for example, mydesign)
Create a content view file at layouts/mydesign/views/article.html
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:
Create a file layouts/_default/baseof.myformat.html
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
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.
[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 enginesdisableSeoHiddenPages=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: falseimageEffects.border=true# Default: trueimageEffects.lazy=true# Default: trueimageEffects.lightbox=true# Default: falseimageEffects.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/862disableDefaultRelref=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'