Sidebar
Width
Chang'n th' width o' th' sidebar
Header & Footer
Configure th' header an' footer
Search
Configure search an' th' search form
Shortcut Menu
Add additional shortcut links t' th' sidebar
Chang'n th' width o' th' sidebar
Configure th' header an' footer
Configure search an' th' search form
Add additional shortcut links t' th' sidebar
Th' theme adjusts th' menu width based on browser size.
If ye want t' change th' chosen default width, ye can add CSS variables t' layouts/partials/custom-header.html
.
Th' menu width changes fer different screen sizes:
Screen Size | Screen Width | Menu Width |
---|---|---|
Small | < 48rem | 14.375rem |
Medium | 48rem - 60rem | 14.375rem |
Large | >= 60rem | 18.75rem |
Ye can change th' menu width but not th' screen width breakpoints.
T' adjust th' menu width, use these CSS variables. Avast that --MENU-WIDTH-S
be fer th' mobile menu flyout on small screens.
<style>
:root {
--MENU-WIDTH-S: 14.375rem;
--MENU-WIDTH-M: 14.375rem;
--MENU-WIDTH-L: 18.75rem;
}
</style>
Opt'n Wit' th' default partials fer th' logo, Th' ship title will also be used fer th' text at th' top o' th' sidebar. If ye want t' show a different text 'n th' sidebar, ye can overwrite linkTitle
.
[params]
linkTitle = 'Relearn'
params:
linkTitle: Relearrrn
{
"params": {
"linkTitle": "Relearn"
}
}
By default, th' theme displays a home button between search form an' navigat'n menu. Th' Home button serves as an alternative t' click'n th' logo.
Opt'n T' hide th' Home button on th' left menu, set disableLandingPageButton=true
.
[params]
disableLandingPageButton = true
params:
disableLandingPageButton: true
{
"params": {
"disableLandingPageButton": true
}
}
Opt'n T' change its ay'con or text, configure th' landingPageName
fer yer defined languages.
[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 opt'n isn’t set fer a specific language, it will use these default values
[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"
}
}
Opt'n Turn on showVisitedLinks=true
t' see checkmarks next t' visited planks 'n th' main menu. This also adds a Clear History
opt'n at th' bottom o' th' menu t' remove all checkmarks. Avast that checkmarks will disappear if ye rebuild yer ship, as th' plank IDs may change.
[params]
showVisitedLinks = true
params:
showVisitedLinks: true
{
"params": {
"showVisitedLinks": true
}
}
T' change th' menu footer, edit th' layouts/partials/menu-footer.html
file. Check out th' Partials section fer more ways t' cust'mize yer ship.
Th' theme offers three levels o' search through th' menu’s search form:
Each level requires th' previous one t' be enabled. If no search be configured, th' search form won’t appear.
Opt'n All levels be enabled by default. Dis'ble them 'n hugo.toml
:
disableSearch=true
disableSearchIndex=true
disableSearchPage=true
[params]
disableSearch = true
disableSearchIndex = true
disableSearchPage = true
params:
disableSearch: true
disableSearchIndex: true
disableSearchPage: true
{
"params": {
"disableSearch": true,
"disableSearchIndex": true,
"disableSearchPage": true
}
}
Opt'n Default URLs can be changed wit' th' follow'n parameter
searchindex.js
set by searchIndexURL
search/index.html
set by searchPageURL
[params]
searchIndexURL = 'omnisearchindex.js'
searchPageURL = 'omnisearch'
params:
searchIndexURL: omnisearchindex.js
searchPageURL: omnisearch
{
"params": {
"searchIndexURL": "omnisearchindex.js",
"searchPageURL": "omnisearch"
}
}
Only change these if ye have rrrambl'n at those URLs. This can happen wit' uglyURLs=true
'n hugo.toml
an' hav'n a rrrambl'n file at content/search.md
.
Check fer duplicate URLs by runn'n hugo --printPathWarn'ns
.
Th' Lunr search library doesn’t support all languages o' th' theme. Unsupported languages will show errors 'n th' browser console. Currently unsupported be
Opt'n In case yer page’s rrrambl'n contains text 'n multiple languages (for example, ye be writ'n a Piratish documentat'n fer yer English API), ye can set those languages 'n additionalContentLanguage
t' broaden th' search.
[params]
additionalContentLanguage = ['en']
params:
additionalContentLanguage:
- en
{
"params": {
"additionalContentLanguage": [
"en"
]
}
}
Ye can add multiple languages t' this array.
Use th' base language code. For example, if yer plank be us'n zh-CN
, add zh
t' this parameter.
Th' sidebar contains yer content’s navigat'n menu, but ye can also add extra menu entries or shortcuts 'n a separate section.
For internal links, use th' pageRef
property instead o' url
. Learrrn more about Hugo’s menu configurat'n.
Opt'n By default, th' shortcut menu has a title ("More" 'n English).
Ye can dis'ble this title wit' disableShortcutsTitle=true
.
[params]
disableShortcutsTitle = true
params:
disableShortcutsTitle: true
{
"params": {
"disableShortcutsTitle": true
}
}
T' change th' title, update yer local i18n translat'n file.
[Shortcuts-Title]
other = "Other Great Stuff"
Edit hugo.toml
an' add [[menu.shortcuts]]
entries fer each link:
[menu]
[[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
[[menu.shortcuts]]
name = '<i class="fa-fw fas fa-camera"></i> Showcases'
pageRef = '/showcase'
weight = 11
[[menu.shortcuts]]
identifier = 'hugodoc'
name = '<i class="fa-fw fas fa-bookmark"></i> Cap'n Hugo Documentation'
url = 'https://gohugo.io/'
weight = 20
[[menu.shortcuts]]
name = '<i class="fa-fw fas fa-bullhorn"></i> Credits'
pageRef = '/more/credits'
weight = 30
[[menu.shortcuts]]
name = '<i class="fa-fw fas fa-tags"></i> Tags'
pageRef = '/tags'
weight = 40
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
- identifier: hugodoc
name: <i class="fa-fw fas fa-bookmark"></i> Cap'n Hugo Documentat'n
url: https://gohugo.io/
weight: 20
- name: <i class="fa-fw fas fa-bullhorn"></i> Credits
pageRef: /more/credits
weight: 30
- name: <i class="fa-fw fas fa-tags"></i> Tags
pageRef: /tags
weight: 40
{
"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
},
{
"identifier": "hugodoc",
"name": "\u003ci class=\"fa-fw fas fa-bookmark\"\u003e\u003c/i\u003e Cap'n Hugo Documentation",
"url": "https://gohugo.io/",
"weight": 20
},
{
"name": "\u003ci class=\"fa-fw fas fa-bullhorn\"\u003e\u003c/i\u003e Credits",
"pageRef": "/more/credits",
"weight": 30
},
{
"name": "\u003ci class=\"fa-fw fas fa-tags\"\u003e\u003c/i\u003e Tags",
"pageRef": "/tags",
"weight": 40
}
]
}
}
For multilingual sites, set different menus fer each language 'n hugo.toml
:
[languages]
[languages.en]
languageName = 'English'
title = 'Hugo Relearrrn Theme'
weight = 1
[languages.en.menu]
[[languages.en.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.en.menu.shortcuts]]
name = '<i class="fa-fw fas fa-camera"></i> Showcases'
pageRef = '/showcase'
weight = 11
[[languages.en.menu.shortcuts]]
identifier = 'hugodoc'
name = '<i class="fa-fw fas fa-bookmark"></i> Cap'n Hugo Documentation'
url = 'https://gohugo.io/'
weight = 20
[[languages.en.menu.shortcuts]]
name = '<i class="fa-fw fas fa-bullhorn"></i> Credits'
pageRef = '/more/credits'
weight = 30
[[languages.en.menu.shortcuts]]
name = '<i class="fa-fw fas fa-tags"></i> Tags'
pageRef = '/tags'
weight = 40
[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]]
identifier = 'hugodoc'
name = '<i class="fa-fw fas fa-bookmark"></i> Captain Hugo Documentation'
url = 'https://gohugo.io/'
weight = 20
[[languages.pir.menu.shortcuts]]
name = '<i class="fa-fw fas fa-bullhorn"></i> Crrredits'
pageRef = '/more/credits'
weight = 30
[[languages.pir.menu.shortcuts]]
name = '<i class="fa-fw fas fa-tags"></i> Arrr! Tags'
pageRef = '/tags'
weight = 40
languages:
en:
languageName: English
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
- identifier: hugodoc
name: <i class="fa-fw fas fa-bookmark"></i> Cap'n Hugo Documentat'n
url: https://gohugo.io/
weight: 20
- name: <i class="fa-fw fas fa-bullhorn"></i> Credits
pageRef: /more/credits
weight: 30
- name: <i class="fa-fw fas fa-tags"></i> Tags
pageRef: /tags
weight: 40
title: Cap'n Hugo Relearrrn 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
- identifier: hugodoc
name: <i class="fa-fw fas fa-bookmark"></i> Captain Hugo Documentat'n
url: https://gohugo.io/
weight: 20
- name: <i class="fa-fw fas fa-bullhorn"></i> Crrredits
pageRef: /more/credits
weight: 30
- name: <i class="fa-fw fas fa-tags"></i> Arrr! Tags
pageRef: /tags
weight: 40
title: Captain Hugo Relearrrn Theme
weight: 2
{
"languages": {
"en": {
"languageName": "English",
"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
},
{
"identifier": "hugodoc",
"name": "\u003ci class=\"fa-fw fas fa-bookmark\"\u003e\u003c/i\u003e Cap'n Hugo Documentation",
"url": "https://gohugo.io/",
"weight": 20
},
{
"name": "\u003ci class=\"fa-fw fas fa-bullhorn\"\u003e\u003c/i\u003e Credits",
"pageRef": "/more/credits",
"weight": 30
},
{
"name": "\u003ci class=\"fa-fw fas fa-tags\"\u003e\u003c/i\u003e Tags",
"pageRef": "/tags",
"weight": 40
}
]
},
"title": "Hugo Relearrrn 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
},
{
"identifier": "hugodoc",
"name": "\u003ci class=\"fa-fw fas fa-bookmark\"\u003e\u003c/i\u003e Captain Hugo Documentation",
"url": "https://gohugo.io/",
"weight": 20
},
{
"name": "\u003ci class=\"fa-fw fas fa-bullhorn\"\u003e\u003c/i\u003e Crrredits",
"pageRef": "/more/credits",
"weight": 30
},
{
"name": "\u003ci class=\"fa-fw fas fa-tags\"\u003e\u003c/i\u003e Arrr! Tags",
"pageRef": "/tags",
"weight": 40
}
]
},
"title": "Captain Hugo Relearrrn Theme",
"weight": 2
}
}
}
T' show planks only 'n th' shortcuts menu ye have two choices
Create a headless branch bundle, _index.md
'n its own folder wit' th' below front matter. Th' branch bundle will not be contained 'n th' sitemap.
+++
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"
}
Or, put a child plank inside a headless branch bundle wit' th' follow'n front matter 'n th' bundle. This causes th' child but not th' branch bundle t' be contained 'n th' sitemap.
+++
[_build]
list = 'never'
publishResources = false
render = 'never'
+++
---
_build:
list: never
publishResources: false
render: never
---
{
"_build": {
"list": "never",
"publishResources": false,
"render": "never"
}
}
Th' child plank can be any type o' rrrambl'n.
+++
title = 'Credits'
+++
---
title: Credits
---
{
"title": "Credits"
}