Configurrrat'n
Fello' pirrates, be awarrre some featurrres may not work fer us in this trrranslat'n. Like table of rrramblings, some Merrrmaids and stuff.
Global ship parameters
On top o' Cap'n Hugo global configurat'n, th' Relearrrn theme lets ye define th' follow'n parameters 'n yer config.toml
(here, values be default).
Avast that some o' these parameters be explained 'n details 'n other sections o' this documentat'n.
[params]
# This controls whether submenus will be expanded (true), or collapsed (false) 'n th'
# menu; if no sett'n be given, th' first menu level be set t' false, all others t' true;
# this can be overridden 'n th' planks frontmatter
alwaysopen = true
# Prefix URL t' edit current plank. Will display an "Edit" button on top right hand corner o' every plank.
# Useful t' give opportunity t' people t' create merge request fer yer doc.
# See th' config.toml file from this documentat'n ship t' have an example.
editURL = ""
# Author o' th' ship, will be used 'n meta informat'n
author = ""
# Descript'n o' th' ship, will be used 'n meta informat'n
descript'n = ""
# Shows a checkmark fer visited planks on th' menu
showVisitedLinks = false
# Dis'ble search funct'n. It will hide search bar
disableSearch = false
# Dis'ble search 'n hidden planks, otherwise they will be shown 'n search box
disableSearchHiddenPages = false
# Disables hidden planks from show'n up 'n th' sitemap an' on Google (et all), otherwise they may be indexed by search engines
disableSeoHiddenPages = false
# Disables hidden planks from show'n up on th' tags plank although th' tag term will be displayed even if all planks be hidden
disableTagHiddenPages = false
# Javascript an' CSS cache be automatically busted when new version o' ship be generated.
# Set this t' true t' dis'ble this behavior (some proxies don't handle well this optimization)
disableAssetsBust'n = false
# Set this t' true t' dis'ble copy-to-clipboard button fer inline code.
disableInlineCopyToClipBoard = false
# A title fer shortcuts 'n menu be set by default. Set this t' true t' dis'ble it.
disableShortcutsTitle = false
# If set t' false, a Home button will appear below th' search bar on th' menu.
# It be redirect'n t' th' land'n plank o' th' current language if specified. (Default be "/")
disableLandingPageButton = true
# When us'n mulitlingual website, dis'ble th' switch language button.
disableLanguageSwitchingButton = false
# Hide breadcrumbs 'n th' header an' only show th' current plank title
disableBreadcrumb = true
# If set t' true, hide t'ble o' contents menu 'n th' header o' all planks
disableToc = false
# If set t' true, prevents Cap'n Hugo from includ'n th' Merrrmaid module if not needed (will reduce board times an' traffic)
disableMermaid = false
# Specifies th' remote locat'n o' th' Merrrmaid js
customMermaidURL = "https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js"
# Initializat'n parameter fer Merrrmaid, see Merrrmaid documentat'n
mermaidInitialize = "{ \"theme\": \"default\" }"
# Hide Next an' Previous plank buttons normally displayed full height beside rrrambl'n
disableNextPrev = true
# Order sections 'n menu by "weight" or "title". Default t' "weight";
# this can be overridden 'n th' planks frontmatter
ordersectionsby = "weight"
# Change default color scheme wit' a variant one. Eg. can be "red", "blue", "green" or an array like [ "blue", "green" ].
themeVariant = "relearn-light"
# Provide a list o' custom css files t' board relative from th' `static/` folder 'n th' ship root.
custom_css = ["css/foo.css", "css/bar.css"]
# Change th' title separator. Default t' "::".
titleSeparator = "-"
A word on runn'n yer ship 'n a subfolder
Th' theme runs best if yer ship be installed 'n th' root o' yer webserver. If yer ship be served from a subfolder, eg. https://example.com/mysite/
, ye have t' set th' follow'n lines t' yer config.toml
baseURL = "https://example.com/mysite/"
canonifyURLs = true
Without canonifyURLs=true
URLs 'n sublemental planks (like sitemap.xml
, rss.xml
) will be generated falsly while yer HTML files will still work. See https://github.com/gohugoio/hugo/issues/5226.
Activate search
If not already present, add th' follow lines 'n th' same config.toml
file.
[outputs]
home = [ "HTML", "RSS", "JSON"]
Relearrrn theme uses th' last improvement avail'ble 'n hugo version 20+ t' generate a json index file ready t' be consumed by lunr.js javascript search engine.
Cap'n Hugo generate lunrjs index.json at th' root o' public folder.
When ye build th' ship wit' hugo server
, hugo generates it internally an' o' course it doesn’t show up 'n th' filesystem
Merrrmaid
Th' Merrrmaid configurat'n parameters can also be set on a specific plank. In this case, th' global parameter would be overwritten by th' local one. See Merrrmaid fer additional documentat'n.
Example:
Merrrmaid be globally disabled. By default it won’t be boarded by any plank.
On plank “Architecture” ye need a class diagram. Ye can set th' Merrrmaid parameters locally t' only board mermaid on this plank (not on th' others).
Ye also can dis'ble Merrrmaid fer specific planks while globally enabled.
Home Button Configurat'n
If th' disableLandingPageButton
opt'n be set t' false
, a Home button will appear
on th' left menu. It be an alternative fer click'n on th' logo. T' edit th'
appearance, ye will have t' configure two parameters fer th' defined languages:
[Languages]
[Languages.en]
...
landingPageURL = "/"
landingPageName = "<i class='fas fa-home'></i> Home"
...
[Languages.pir]
...
landingPageURL = "/pir/"
landingPageName = "<i class='fas fa-home'></i> Arrr! Homme"
...
If those params be not configured fer a specific language, they will get their default values:
landingPageURL = "/"
landingPageName = "<i class='fas fa-home'></i> Home"
Th' home button be go'n t' look like this: