Topbar

This page is about how to configure the topbar using configuration options. If you want to add further buttons or functionality, see this section.

Your topbar contains the following elements. Some of them are configuarable:

Table of Contents

Option Front Matter Set disableToc=true to hide the TOC button on all pages. If the button is hidden, also the keyboard shortcut is disabled. This can be overridden in a page’s front matter.

disableToc = true
disableToc: true
{
   "disableToc": true
}

Option Front Matter Set disableBreadcrumb=true to hide the breadcrumb in the topbar.

Further breadcrumbs settings can be found in the content configuration section.

disableBreadcrumb = true
disableBreadcrumb: true
{
   "disableBreadcrumb": true
}

Edit Button

Option Front Matter If editURL is set to a URL, an edit button will be shown in the topbar. If the button is hidden, also the keyboard shortcut is 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 front matter.

editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}'
editURL: https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}
{
   "editURL": "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}"
}

Arrow Navigation

Option Front Matter You can hide the previous/next buttons by setting disableNextPrev=true. If the buttons are hidden, also the keyboard shortcuts are disabled.

disableNextPrev = true
disableNextPrev: true
{
   "disableNextPrev": true
}