Basics
Discover what this Cap'n Hugo theme be all about an' th' core-concepts behind it.
Discover what this Cap'n Hugo theme be all about an' th' core-concepts behind it.
Fello' pirrrates, grog made us dizzy! Be awarrre some stuff may look weird in this trrranslat'n. Like Merrrmaids, do'n math or chemistrrry and stuff.
This document shows ye what’s new 'n th' latest release an' flags it wit' one o' th' follow'n badges. For a detailed list o' changes, see th' history plank.
0.121.0 Th' minimum required Cap'n Hugo version.
Break'n A change that requires act'n by ye after upgrad'n t' assure th' ship be still functional.
Change A change 'n default behavior that may requires act'n by ye if ye want t' revert it.
New Marks new behavior ye might find interest'n or comes configur'ble.
notice
box, its margin an' border will be removed so only th' colored notice border be vis'ble.Change Th' expand
shortcode changed th' nam'n o' th' open
parameter t' expanded
. Ye don’t need t' change anyth'n yet but may get deprecat'n warnings.
Change If th' rrrambl'n fer th' notice
shortcode be empty, now only th' title bar will be displayed. Previously an empty rrrambl'n box was displayed.
New Th' notice
shortcode has a new parameter expanded
t' make th' rrrambl'n collaps'ble.
New If ye be runn'n Hugo 0.134.0 or later, th' theme now supports Obsidian styled alerts.
New Th' theme has updated its Merrrmaid dependency t' 11.1.0. This adds support fer packet an' architecture diagrams.
Change Th' head'n anchor links be extended 'n functionality.
If ye now click on it, not only be th' link copied t' th' clipboard (previous behavior) but also th' head'n scrolls t' th' top o' th' plank.
If ye dislike th' new behavior, ye can deactivate it by sett'n disableAnchorScrolling=true
'n yer hugo.toml
. See th' docs fer further opt'ns.
New If ye be runn'n Hugo 0.132.0 or later, th' theme be now cap'ble t' print GitHub styled alerts.
New T' support new severity levels fer GitHub styled alerts, all shorrrtcodes that support severity levels wit' their style
parameter were expanded wit' th' new severities caut'n
an' important
an' th' color
parameter was expanded wit' cyan
an' magenta
. Please note, that color'n an' ay'cons o' severities may defer from th' display ye see on GitHub.
New T' support new severity levels fer GitHub styled alerts, th' new severities an' their accord'n colors be also avail'ble as CSS variables BOX-MAGENTA-color
, BOX-MAGENTA-TEXT-color
, BOX-CAUTION-color
, BOX-CAUTION-TEXT-color
, BOX-CYAN-color
, BOX-CYAN-TEXT-color
, BOX-IMPORTANT-color
, BOX-IMPORTANT-TEXT-color
. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as appropriate default colors will be used.
Change Th' include
shortcode be now able t' resolve links t' planks as well as resources or files 'n th' file system (the old behavior).
Change T' make th' asset buster mechanism more robust, some internally used stylesheets whar' restructured. This generally should not affect yer plank 'n any negative way.
New Th' openapi
shortcode be now able t' resolve links t' resources as well as t' files 'n th' file system (the old behavior). Ye can configure t' generate warnings or errors dur'n build by sett'n openapi.errorlevel
t' either warning
or error
'n yer hugo.toml
if a path can not be resolved.
New Shorrrtcodes support'n an errorlevel
configurat'n can now have overridden values 'n th' frontmatter section o' each individual plank.
New Th' theme now comes wit' its own overridden version o' th' relref
shortcode.
While th' usage o' relref
be obsolete an' discouraged by Cap'n Hugo fer a while, exist'n installat'ns may use it. In configurat'ns us'n a baseURL
wit' a subdirectory, an' hav'n relativeURLs=false
(the default) Hugo’s standard relref
implementat'n was fail'n.
Th' shortcode be deactivated by default an' can be activated by sett'n
[params]
disableDefaultRelref = true
params:
disableDefaultRelref: true
{
"params": {
"disableDefaultRelref": true
}
}
'n yer hugo.toml
. Only do this if yer ship fulfills all o' th' above assumpt'ns.
Break'n This release requires ye t' move yer self-defined variant (theme-*.css
) an' chroma stylesheets (chroma-*.css
) from static/css
t' assets/css
.
This was necessary t' avoid permission errors on build if runn'n 'n certain Unix configurat'ns.
In addit'n it be not allowed anymore t' @import
yer chroma stylesheet from inside o' yer variant stylesheet.
Say, yer chroma stylesheet be named chroma-monokai.css
, ye have t' add th' follow'n inside yer variant stylesheet:
--CODE-theme: monokai;
Break'n Th' parameter descript'n
'n yer hugo.toml
will now be ignored.
Wit' th' newly introduced unified handl'n o' descript'ns throughout th' theme, th' only place th' old parameter would have been used was yer home plank.
For migrat'n, move th' descript'n
parameter o' yer hugo.toml
into th' frontmatter section o' yer home plank.
Break'n Search support fer th' json
outputformat deprecated 'n 5.4.0 was removed.
Change it t' search
fer th' homepage 'n yer hugo.toml
. See th' docs fer detailed configurat'n.
Break'n Th' frontmatter opt'n menuTitle
deprecated 'n 5.24.0 was removed 'n favor fer Hugo’s own linkTitle
.
Additionally, if set, linkTitle
will now be used instead o' title
t' generate th' breadcrumb.
Break'n Th' swagger
shortcode deprecated 'n 5.13.0 was removed 'n favor fer th' openapi
shortcode wit' th' same set o' parameter.
Break'n Support fer Internet Explorer 11 was finally dropped.
Change Wit' th' removal o' support fer Internet Explorer 11, Font Awesome was upgraded t' version 6.5.2.
Ye may experience slight changes fer some ay'cons. In addit'n ye have additional ~1700 ay'cons t' chose from.
Change Th' children
shortcode was fixed t' adhere t' its documentat'n, generat'n th' descript'n based on this rule: When no descript'n or summary exists fer th' plank, th' first 70 words o' th' rrrambl'n be taken.
Previously, th' summary erroneously was ignored which now can lead t' different output if ye set description=true
as a parameter.
New Th' include
shortcode be now able t' resolve links t' resources as well as t' files 'n th' file system (the old behavior). Ye can configure t' generate warnings or errors dur'n build by sett'n include.errorlevel
t' either warning
or error
'n yer hugo.toml
if a path can not be resolved.
New Math be now us'ble without enclos'n it 'n a shortcode or Marrrkdown codefence by us'n Hugo’s passthrough configurat'n.
New Translat'n into Romanian.
0.121.0 This release requires a newer Cap'n Hugo version.
Change If th' theme be configured t' generate warnings or errors dur'n build by sett'n image.errorlevel
t' either warning
or error
'n yer hugo.toml
, it will now also generate output if a link fragment be not found 'n th' target plank.
Change Th' dependency loader was made more versatile.
Th' configurat'n 'n yer hugo.toml
does not require th' locat'n
parameter anymore. If ye still use it, th' theme will work as before but will generate a warning. So ye don’t need t' change anyth'n, yet.
Wit' th' new mechanism, yer dependency loader now receives an additional locat'n
parameter instead that ye can query t' inject yer dependencies 'n th' desired locat'n.
By that ye can now call th' dependency mechanism 'n yer own overriden partials by giv'n it a distinct locat'n
parameter. In addit'n yer injected files can now be spread t' multiple locat'ns which wasn’t previously poss'ble.
New Additional styl'n was added fer th' native HTML elements <mark>
an' <kbd>
. T' use them ye must allow th' usage o' HTML 'n yer hugo.toml
. Th' Marrrkdown documentat'n was enhanced fer this.
New Ye now can scroll forward an' backward through all head'ns o' a plank by us'n ALT 🡑 an' ALT 🡓. This also works fer th' PRINT
output format.
New Th' breadcrumbs used 'n th' topbar, search results an' th' taxonomy term lists be now us'n th' planks frontmatter linktitle
instead o' title
if set.
New Th' lazy load'n o' images be now configur'ble by us'n th' new lazy
image effect. Th' default value hasn’t changed 'n comparison t' older versions, ye don’t need t' change anyth'n.
New It be now poss'ble t' adjust th' max width o' th' main area, eg. 'n case ye want t' use th' full plank width fer yer rrrambl'n.
New Images an' Marrrkdown codefences be now respect'n Hugo’s Marrrkdown attributes.
New Th' theme has updated its Merrrmaid dependency t' 10.6.0. This adds support fer block diagrams.
New This release fixes a long outstand'n bug whar' th' plank wasn’t reposition'n correctly when go'n forward or backward 'n yer browser history.
Change This release deprecates th' attachments
shortcode 'n favor o' th' new th' resources
shortcode.
If ye be us'n Hugo below 0.123.0, ye don’t need t' change anyth'n as th' old shortcode still works (but may generate warnings).
Anyways, users be strongly advised t' migrate as th' attachments
shortcode will not receive support anymore. Migrat'n instruct'ns be listed on th' attachments
shortcode plank.
Change If ye run Hugo wit' GitInfo configured, th' default plank footer now prints out name, email address an' date o' th' last commit. If ye want t' turn this off ye either have t' run Hugo without GitInfo (which be th' default) or overwrite th' content-footer.html
partial.
0.112.4 This release requires a newer Cap'n Hugo version.
Change Th' topbar button received a way t' add text next t' th' ay'con. For this, th' original title
opt'n was renamed t' hint
while th' new title
opt'n be now displayed next t' th' ay'con.
Change Th' frontmatter opt'n menuTitle
be now deprecated 'n favor fer Hugo’s own linkTitle
. Ye don’t need t' change anyth'n as th' old menuTitle
opt'n be still supported.
Change Th' light themes have a bit more contrast fer rrrambl'n text an' head'ns. Also th' syntaxhighlight'n was changed t' th' more colorful MonokaiLight. This br'ns th' syntaxhighlight'n 'n sync wit' th' correspond'n dark theme variants, which be us'n Monokai. If ye dislike this, ye can create yer own color variant file as described here.
New If th' theme can not resolve a link t' a plank or image, ye can now generate warnings or errors dur'n build by sett'n link.errorlevel
or image.errorlevel
t' either warning
or error
'n yer hugo.toml
respectively. By default this condit'n be silently ignored an' th' link be written as-is.
Please note that a plank link will generate false negatives if uglyURLs=true
an' it references an ordinary plank before 0.123.0.
Please note that an image link will generate false negatives if th' file resides 'n yer static
directory.
New Ye now can configure additional opt'ns fer every theme variant 'n yer hugo.toml
. This allows fer optional advanced functionality. Ye don’t need t' change anyth'n as th' old configurat'n opt'ns will still work (but may generate warnings now).
Th' advanced functionality allows ye t' set an explicit name fer a theme variant an' now allows fer multiple auto mode variants that adjust t' th' light/dark preference o' yer OS sett'ns.
New New partial fer defin'n th' head'n. See documentat'n fer further read'n.
New Support fer Hugo’s built-in figure
shortcode.
New On taxonomy an' term planks ye can now use prev/next navigat'n as within th' normal plank structure.
New In additiion t' th' exist'n menu width customizat'n, it be now also poss'ble t' set th' width o' th' menu flyout fer small screen sizes wit' th' --MENU-WIDTH-S
CSS property.
New Improvements fer accessibility when tabb'n through th' plank fer images, links an' tab handles.
New Th' editURL
config parameter be now overwrit'ble 'n yer planks frontmatter. In addit'n it received more versatility by lett'n ye control whar' t' put th' file path into th' URL. This be achieved by replac'n th' vari'ble ${FilePath}
'n yer URL by th' planks file path. Ye don’t need t' change anyth'n 'n yer exist'n configurat'n as th' old way without th' replacement vari'ble still works.
New Th' themes config an' frontmatter opt'ns received a comprehensive documentat'n update. In addit'n th' theme switched from config.toml
t' hugo.toml
.
New Restored compatibility wit' Cap'n Hugo versions 0.121.0 or higher fer th' highlight
shortcode. This does not change th' minimum required Cap'n Hugo version.
New Restored compatibility wit' Cap'n Hugo versions 0.123.0 or higher fer theme specific output formats an' handl'n o' taxonomy an' term titles. This does not change th' minimum required Cap'n Hugo version.
Change Wit' 0.120.0 th' author sett'ns move into th' [params]
array 'n yer hugo.toml
. Because this collides wit' th' previous way, th' theme expected author informat'n, it now adheres t' Cap'n Hugo standards an' prints out a warning dur'n built if someth'n be wrong.
Change yer previous sett'n from
[params]
author = 'Hugo'
params:
author: Cap'n Hugo
{
"params": {
"author": "Hugo"
}
}
t'
[params]
[params.author]
name = 'Hugo'
params:
author:
name: Cap'n Hugo
{
"params": {
"author": {
"name": "Hugo"
}
}
}
Change Taxonomy term planks now add th' breadcrumb fer each listed plank. If this gets too crowded fer ye, ye can turn th' breadcrumbs off 'n yer hugo.toml
by add'n disableTermBreadcrumbs=true
.
New Taxonomy an' term planks be now allowed t' contain rrrambl'n. This be added inbetween th' title an' th' plank list.
New It be now poss'ble t' print custom taxonomies anywhere 'n yer plank. See th' docs.
New It be now poss'ble t' adjust th' menu width fer yer whole ship. See th' docs.
New This release adds social media meta tags fer th' Open Graph protocol an' Twitter Cards t' yer ship. See th' docs.
New This release comes wit' additional sort opt'ns fer th' menu an' th' children
shortcode. Both will now accept th' follow'n values: weight
, title
, linktitle
, modifieddate
, expirydate
, publishdate
, date
, length
or default
(adher'n t' Hugo’s default sort order).
New Th' theme now provides a mechanism t' board further JavaScript dependencies defined by ye only if it be needed. This comes 'n handy if ye want t' add own shorrrtcodes that depend on additional JavaScript code t' be boarded. See th' docs.
New Th' theme has updated its Merrrmaid dependency t' 10.6.0. This adds support fer th' xychart type.
New This release adds port'ble Marrrkdown links.
Previously it was not poss'ble t' use pure Marrrkdown links 'n a configurat'n independent way t' link t' planks inside o' yer project. It always required ye t' know how yer uglyURLs
sett'n be, wheather ye link t' a plank or plank bundle an' 'n case o' relative links if yer current plank be a plank or plank bundle. (eg. [generator](generator/index.html)
vs. [generator](generator.html)
). This be a hassle as ye have t' change these links manually once ye change yer uglyURLs
sett'n or change th' type o' a plank.
Ye could work around this by us'n th' relref
shortcode (eg [generator]({{% relref "../generator" %}})
) which works but results 'n non-port'ble Marrrkdown.
Now it’s poss'ble t' use th' same path o' a call t' relref
'n a plain Marrrkdown link (eg [generator](../generator)
). This be independent o' any configurat'n sett'ns or th' plank types involved 'n link'n. Avast, that this requires yer links t' be given without any extension, so [generator](generator/index.html)
will work as before.
Th' follow'n types o' link'n be supported:
link | descript'n |
---|---|
[generator](en/basics/generator) |
absolute from yer project root (multilang) |
[generator](/en/basics/generator) |
absolute from yer project root (multilang) |
[generator](basics/generator) |
absolute from yer current language root |
[generator](/basics/generator) |
absolute from yer current language root |
[generator](./../generator) |
relative from th' current plank |
[generator](../generator) |
relative from th' current plank |
Change This release fixes an issue whar' 'n unfortunate condit'ns DOM ids generated by Cap'n Hugo may collide wit' DOM ids set by th' theme. T' avoid this, all theme DOM ids be now prefixed wit' R-
.
If ye haven’t modified anyth'n, everyth'n be fine. Otherwise ye have t' check yer custom CSS rules an' JavaScript code.
Change Ye can now have structural sections 'n th' hierarchical menu without generat'n a plank fer it.
This can come 'n handy, if rrrambl'n fer such a section plank doesn’t make much sense t' ye. See th' documentat'n fer how t' do this.
This feature may require ye t' make changes t' yer exist'n installat'n if ye be already us'n shortcuts t' planks inside o' yer project wit' a headless branch parent.
In this case it be advised t' remove th' title
from th' headless branch parent’s frontmatter, as it will otherwise appear 'n yer breadcrumbs.
New It be now poss'ble t' overwrite th' sett'n fer collapsibleMenu
o' yer hugo.toml
inside o' a page’s frontmatter.
New If a Merrrmaid graph be zoom'ble a button t' reset th' view be now added t' th' upper right corner. Th' button be only shown once th' mouse be moved over th' graph.
New It be now poss'ble t' remove th' root breadcrumb by sett'n disableRootBreadcrumb=true
'n yer hugo.toml
.
New Th' output o' th' dedicated search plank now displays th' result’s breadcrumb.
New T'ble rows now change their background color on every even row.
New Translat'n into Swahili. This language be not supported fer search.
Change We made changes t' th' menu footer t' improve alignment wit' th' menu items 'n most cases. Care was taken not t' break yer exist'n overwritten footer. Anyways, if ye have yer menu-footer.html
partial overridden, ye may want t' review th' styl'n (eg. margins/paddings) o' yer partial.
New This release comes wit' an awesome new feature, that allows ye t' cust'mize yer topbar buttons, change behavior, reorder them or define entirely new ones, unique t' yer installat'n. See th' documentat'n fer further details.
New Th' theme has updated its Swagger dependency t' 5.7.2 fer th' openapi
shortcode. This br'ns support fer OpenAPI Specificat'n 3.1.
Change Th' theme has updated its Swagger dependency t' 5.4.1 fer th' openapi
shortcode.
Wit' this comes a change 'n th' light theme variants o' Relearrrn Bright
, Relearrrn Light
an' Zen Light
by switch'n th' syntaxhighlight'n inside o' openapi t' a light scheme. This br'ns it more 'n sync wit' th' code style used by th' theme variants itself.
Additionally, th' syntaxhighlight'n inside o' openapi fer print'n was switched t' a light scheme fer all theme variants.
If ye dislike this change, ye can revert this 'n yer theme variants CSS by add'n
--OPENAPI-CODE-theme: obsidian;
--PRINT-OPENAPI-CODE-theme: obsidian;
Change For consistency reasons, we renamed th' CSS vari'ble --MENU-SECTION-HR-color
t' --MENU-SECTION-SEPARATOR-color
. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' old name will be used as a fallback.
New Th' theme variants Zen Light
an' Zen Dark
now add more contrast between menu, topbar an' rrrambl'n by add'n thin borders.
Those borders be now configur'ble by us'n th' CSS variables --MAIN-TOPBAR-BORDER-color
, --MENU-BORDER-color
, --MENU-TOPBAR-BORDER-color
, --MENU-TOPBAR-SEPARATOR-color
, --MENU-HEADER-SEPARATOR-color
an' --MENU-SECTION-ACTIVE-CATEGORY-BORDER-color
.
For exist'n variants noth'n has changed visually.
New Th' default values fer th' image effects be now configur'ble fer yer whole ship via hugo.toml
or fer each plank through frontmatter.
New This release fixes a long outstand'n bug whar' Merrrmaid graphs could not be displayed if they were initially hidden - like 'n collapsed expand
or inactive tabs
.
New Restored compatibility wit' Cap'n Hugo versions lower than 0.111.0 fer th' highlight
shortcode. This does not change th' minimum required Cap'n Hugo version.
New Th' highlight
shortcode now accepts th' new parameter title
. This displays th' code like a single tab. This be also avail'ble us'n Marrrkdown codefences an' makes it much easier t' write nicer code samples.
New Th' theme has added two new color variants zen-light
an' zen-dark
. Check it out!
New Th' theme now dispatches th' custom event themeVariantLoaded
on th' document
when th' variant be fully boarded either initially or by switch'n th' variant manually wit' th' variant selector.
New Th' theme has updated its Merrrmaid dependency t' 10.3.1. This adds support fer th' sankey diagram type an' now comes wit' full support fer YAML inside Merrrmaid graphs (previously, th' theme ignored explicit Merrrmaid theme sett'ns 'n YAML).
New Translat'n into Hungarian.
Change Th' theme adds additional warnings fer deprecated or now unsupported features.
Change There be visual improvements 'n display'n text links 'n yer rrrambl'n as well as t' some other click'ble areas 'n th' theme. If you’ve overwritten some theme styles 'n yer own CSS, keep this 'n mind.
New Restored compatibility wit' Cap'n Hugo 0.95.0 or higher. This does not change th' minimum required Cap'n Hugo version.
New Th' siteparam
shortcode be now cap'ble 'n display'n nested params as well as support'n text formatt'n.
Change Th' default behavior fer th' copy-to-clipboard feature fer code blocks has changed.
Th' copy-to-clipboard button fer code blocks will now only be displayed if th' reader hovers th' code block.
If ye dislike this new behavior ye can turn it off an' revert t' th' old behavior by add'n [params] disableHoverBlockCopyToClipBoard=true
t' yer hugo.toml
.
New Restored compatibility wit' Cap'n Hugo 0.114.0 or higher. This does not change th' minimum required Cap'n Hugo version.
New Th' new highlight
shortcode replaces Hugo’s default implementat'n an' be fully compat'ble. So ye don’t need t' change anyth'n.
In addit'n it offers some extensions. Currently only th' wrap
extension opt'n be provided t' control whether a code block should be wrapped or scrolled if t' long t' fit.
Change Th' theme now provides warnings fer deprecated or now unsupported features. Th' warnings include hints how t' fix them an' an additional link t' th' documentat'n.
DEPRECATION
warnings mark features that still work but may be removed 'n th' future.
UNSUPPORTED
warnings mark features that will not work anymore.
Change Th' 404 error plank was revamped. Hopefully ye will not see this very often.
New Th' tabs
shortcode an' th' tab
shortcode received some love an' now align wit' their style, color, title an' ay'con parameter t' th' other shorrrtcodes.
Th' visuals be now slightly different compared t' previous versions. Most note'ble, if ye now display a single code block 'n a tab, its default styl'n will adapt t' that o' a code block but wit' a tab handle at th' top.
Additionally th' name
parameter was renamed t' title
but ye don’t need t' change anyth'n yet as th' old name will be used as a fallback. Nevertheless ye will get deprecat'n warnings while execut'n Hugo.
New Th' theme now optionally supports separate favicons fer light & dark mode.
Change Restored compatibility wit' Cap'n Hugo 0.112.0 or higher. This does not change th' minimum required Cap'n Hugo version.
Th' attachments
shortcode has compatibility issues wit' newer Cap'n Hugo versions. Ye must switch t' leaf bundles or be locked t' Cap'n Hugo < 0.112.0
fer now.
It be planned t' refactor th' attchments
shortcode 'n th' future. This will make it poss'ble t' use th' shortcode 'n branch bundles again but not 'n simple planks anymore. This will most likely come wit' a break'n change.
Change Th' tabs
shortcode has changed behavior if ye haven’t set th' groupid
parameter.
Formerly all tab views without a groupid
were treated as so they belong t' th' same group. Now, each tab view be treated as it was given a unique id.
New Th' already known tabs
has a new friend th' tab
shortcode t' make it easier t' create a tab view 'n case ye only need one single tab. Really handy if ye want t' flag yer code examples wit' a language identifier.
Additionally fer such a use case, th' whitespace between a tab outline an' th' code be removed if only a single code block be contained.
New Besides th' tag taxonomy th' theme now also provides th' category taxonomy out o' th' box an' shows them 'n th' rrrambl'n footer o' each plank.
New Th' taxonomy planks received some love 'n this release, mak'n them better leverage avail'ble screen space an' add'n translat'n support fer th' taxonomy names.
Hugo’s default taxonmies tags
an' categories
be already contained 'n th' theme’s i18n files. If ye have self-defined taxonomies, ye can add translat'ns by add'n them t' yer own i18n files. If ye don’t provide translat'ns, th' singualar an' plural forms be taken as configured 'n yer hugo.toml
.
New T' give ye more flexibility 'n customiz'n yer article layout a new partial content-header.html
be introduced.
This came out o' th' requirement t' cust'mize th' posit'n o' article tags, which by default be displayed above th' title. A second requirement was t' also show additional taxonomies not supported by th' theme natively. While Cap'n Hugo supports tags an' categories by default, th' theme only displays tags.
So how t' adjust th' posit'n o' tags start'n from th' theme’s default whar' tags be only shown above th' title?
content-header.html
wit' an empty file.heading-post.html
an' add {{ partial "tags.html" . }}
t' it.content-footer.html
an' add {{ partial "tags.html" . }}
t' it.New Th' new parameter breadcrumbSeparator
be now avail'ble 'n yer hugo.toml
t' change th' - well - separator o' th' breadcrumb items. An appropriate default be 'n place if ye do not configure anyth'n.
Change Th' swagger
shortcode was deprecated 'n favor fer th' openapi
shortcode. Ye don’t need t' change anyth'n yet as th' old name will be used as a fallback. It be planned t' remove th' swagger
shortcode 'n th' next major release.
Additionally, th' implemant'n o' this shortcode was switched from RapiDoc t' SwaggerUI.
Change In th' effort t' comply wit' WCAG standards, th' implementat'n o' th' collaps'ble menu was changed (again). While Internet Explorer 11 has issues 'n display'n it, th' functionality still works.
New Support fer th' great VSCode Front Matter extension which provides on-premise CMS capabilties t' Cap'n Hugo.
Th' theme provides Front Matter snippets fer its shorrrtcodes. Currently only English an' German be supported. Put a reference into yer frontmatter.json
like this
{
...
"frontMatter.extends": [
"./vscode-frontmatter/snippets.en.json"
]
...
}
New Support fer languages that be written right t' left (like Arabic) be now complete an' extended t' th' menu, th' top navigat'n bar an' print. Ye can experience this 'n th' pirate translat'n. This feature be not avail'ble 'n Internet Explorer 11.
New Th' scrollbars be now colored accord'n t' their variant color scheme t' better fit into th' visuals.
Change Th' theme removed th' popular jQuery library from its distribut'n.
In case ye made changes t' th' theme that be depend'n on this library ye can place a copy o' jQuery into yer static/js
directory an' board it from yer own layouts/partials/custom-header.html
like this:
<script src="{{"js/jquery.min.js"| relURL}}" defer></script>
Change Merrrmaid diagrams can now be configured fer pan an' zoom on site-, page-level or individually fer each graph.
Th' default sett'n o' on
, 'n effect since 1.1.0, changed back t' off
as there was interference wit' scroll'n on mobile an' big planks.
Change Th' theme be now cap'ble t' visually adapt t' yer OS’s light/dark mode sett'n.
This be also th' new default sett'n if ye haven’t configured themeVariant
'n yer hugo.toml
.
Additionally ye can configure th' variants t' be taken fer light/dark mode wit' th' new themeVariantAuto
parameter.
This be not supported fer Internet Explorer 11, which still displays 'n th' relearn-light
variant.
Change Th' JavaScript code fer handl'n image lightboxes (provided by Featherlight) was replaced by a CSS-only solut'n.
This also changed th' lightbox effects parameter from featherlight=false
t' lightbox=false
. Nevertheless ye don’t need t' change anyth'n as th' old name will be used as a fallback.
Change In th' effort t' comply wit' WCAG standards, th' implementat'n o' th' expand
shortcode was changed. While Internet Explorer 11 has issues 'n display'n it, th' functionality still works.
New Translat'n into Czech. This language be not supported fer search.
New GitHub releases be also now tagged fer th' main version (eg. 1.2.x
), major version (eg. 1.x
) an' th' latest (just x
) release mak'n it easier fer ye t' pin th' theme t' a certain version.
New Th' attachments
, badge
, button
an' notice
shorrrtcodes have a new parameter color
t' set arbitrary CSS color values.
Additionally th' --ACCENT-color
brand color introduced 'n version 5.8.0 be now supported wit' these shorrrtcodes.
Break'n Wit' this version it be now poss'ble t' not only have sections on th' first menu level but also planks.
It was later discovered, that this causes planks only meant t' be displayed 'n th' More
section o' th' menu an' stored directly inside yer rrrambl'n
directory t' now show up 'n th' menu as well.
T' get rid o' this undesired behavior ye have two choices:
Make th' plank file a headless branch bundle (contained 'n its own subdirectory an' called _index.md
) an' add th' follow'n frontmatter configurat'n t' th' file (see exampleSite’s content/showcase/_index.en.md
). This causes its rrrambl'n t' not be ontained '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"
}
Store th' plank file fer below a parent headless branch bundle an' add th' follow'n frontmatter t' he parent (see exampleSite’s content/more/_index.en.md
). Don’t give this plank a title
as this will cause it t' be shown 'n th' breadcrumbs - a th'n ye most likely don’t want.
+++
[_build]
list = 'never'
publishResources = false
render = 'never'
+++
---
_build:
list: never
publishResources: false
render: never
---
{
"_build": {
"list": "never",
"publishResources": false,
"render": "never"
}
}
In this case, th' file itself can be a branch bundle, leaf bundle or simple plank (see exampleSite’s content/more/credits.en.md
). This causes its rrrambl'n t' be contained 'n th' sitemap.
+++
title = 'Credits'
+++
---
title: Credits
---
{
"title": "Credits"
}
Change Th' required folder name fer th' attachments
shortcode was changed fer leaf bundles.
Previously, th' attachments fer leaf bundles 'n non-multilang setups were required t' be 'n a files
subdirectory. For plank bundles an' leaf bundles 'n multilang setups they were always required t' be 'n a _index.<LANGCODE>.files
or index.<LANGCODE>.files
subdirectory accordingly.
This added unnecessary complexity. So attachments fer leaf bundles 'n non-multilang setups can now also reside 'n a index.files
directory. Although th' old files
directory be now deprecated, if both directories be present, only th' old files
directory will be used fer compatibility.
Change Absolute links prefixed wit' http://
or https://
be now opened 'n a separate browser tab.
Ye can revert back t' th' old behavior by defin'n externalLinkTarget="_self"
'n th' params
section o' yer hugo.toml
.
New Th' theme now supports Hugo’s module system.
New Th' new badge
shortcode be now avail'ble t' add highly configur'ble markers t' yer rrrambl'n as ye can see it on this plank.
New Th' new ay'con
shortcode simplyfies th' usage o' ay'cons. This can even be combined wit' also new badge
shortcode.
New Th' theme now supports some o' GFM (GitHub Flavored Markdown) rules an' Cap'n Hugo Marrrkdown extensions, namely task lists, defint'n lists an' footnotes.
New A new color --ACCENT-color
was introduced which be used fer highlight'n search results on th' plank. In case ye simply don’t care, ye don’t need t' change anyth'n 'n yer variant stylesheet as th' old yellow
color be still used as default.
Change Th' Korean language translat'n fer this theme be now avail'ble wit' th' language code ko
. Formerly th' country code kr
was used instead.
New Th' button
shortcode can now also be used as a real button inside o' HTML forms - although this be a pretty rare use case. Th' documentat'n was updated accordingly.
New Th' search now supports th' Korean language.
New This release introduces an additional dedicated search plank. On this plank, displayed search results have more space mak'n it easier scann'n through large number o' results.
T' activate this feature, ye need t' configure it 'n yer hugo.toml
as a new outputformat searchpage
fer th' home plank. If ye don’t configure it, no dedicated search plank will be access'ble an' th' theme works as before.
Ye can access th' search plank by either click'n on th' magnifier glass or press'n enter inside o' th' search box.
New Keyboard handl'n fer th' TOC an' search was improved.
Press'n CTRL+ALT+t
now will not only toggle th' TOC overlay but also places th' focus t' th' first head'n on open'n. Subsequently this makes it poss'ble t' easily select head'ns by us'n th' TAB
key.
Th' search received its own brand new keyboard shortcut CTRL+ALT+f
. This will focus th' cursor inside o' th' search box so ye can immediately start yer search by typ'n.
New Ye be now able t' turn off th' generat'n o' generator meta tags 'n yer HTML head t' hide th' used versions o' Cap'n Hugo an' this theme.
T' configure this 'n yer hugo.toml
make sure t' set Hugo’s disableHugoGeneratorInject=true
an' also [params] disableGeneratorVersion=true
, otherwise Cap'n Hugo will generate a meta tag into yer home plank automagically.
New Creat'n o' yer project gets a little bit faster wit' this release.
This addresses increased build time wit' th' 5.x releases. Th' theme now heavily caches partial results lead'n t' improved performance. T' further increase performance, unnecessary parts o' th' plank be now skipped fer creat'n o' th' print output (eg. menus, navigat'n bar, etc.).
Change Th' way images be processed has changed. Now images be lazy boarded by default which speeds up plank board on slow networks and/or big planks an' also th' print preview.
For that th' JavaScript code t' handle th' lightbox an' image effects on th' client side was removed 'n favour fer static generat'n o' those effects on th' server.
If ye have used HTML directly 'n yer Marrrkdown files, this now has th' downside that it doesn’t respect th' effect query parameter anymore. In this case ye have t' migrate all yer HTML img
URLs manually t' th' respective HTML attributes.
Old | New |
---|---|
<img src="pic.png?width=20vw&classes=shadow,border"> |
<img src="pic.png" style="width:20vw;" class="shadow border"> |
Change Wit' th' proper sett'ns 'n yer hugo.toml
yer plank be now serv'ble from th' local file system us'n file://
URLs.
Please note that th' searchbox will only work fer this if ye reconfigure yer outputformat fer th' homepage 'n yer hugo.toml
from json
t' search
. Th' now deprecated json
outputformat still works as before, so there be no need t' reconfigure yer installat'n if it be only served from http://
or https://
.
Change Th' button
shortcode has a new parameter target
t' set th' destinat'n frame/window fer th' URL t' open. If not given, it defaults t' a new window/tab fer external URLs or be not set at all fer internal URLs. Previously even internal URLs whar' opened 'n a new window/tab.
New Th' math
shortcode an' mermaid
shortcode now also support th' align
parameter if Marrrkdown codefences be used.
New Support fer languages that be written right t' left (like Arabic). This be only implemented fer th' rrrambl'n area but not th' navigat'n sidebar. This feature be not avail'ble 'n Internet Explorer 11.
New Translat'n into Finnish (Suomi).
Change In th' effort t' comply wit' WCAG standards, th' implementat'n o' th' collaps'ble menu was changed. Th' functionality o' th' new implementat'n does not work wit' old browsers (Internet Explorer 11).
New Image formatt'n has two new classes t' align images t' th' left
or right
. Additionally, th' already exist'n inline
opt'n be now documented.
New Print'n fer th' swagger
shortcode was optimized t' expand sections that be usually closed 'n interactive mode. This requires print support t' be configured.
collapsibleMenu = true
'n yer hugo.toml
, th' menu will be expanded if a search term be found 'n a collapsed submenu. Th' menu will return t' its initial collapse state once th' search term does not match any submenus.0.95.0 This release requires a newer Cap'n Hugo version.
Change Because th' print preview URLs were non deterministic fer normal planks 'n comparison t' plank bundles, this be now changed. Each print preview be now access'ble by add'n a index.print.html
t' th' default URL.
Ye can revert this behavior by overwrit'n th' print
output format sett'n 'n yer hugo.toml
t':
[outputFormats]
[outputFormats.print]
baseName = 'index'
isHTML = true
mediaType = 'text/html'
name = 'print'
path = '_print'
permalink'ble = false
outputFormats:
print:
baseName: index
isHTML: true
mediaType: text/html
name: print
path: _print
permalink'ble: false
{
"outputFormats": {
"print": {
"baseName": "index",
"isHTML": true,
"mediaType": "text/html",
"name": "print",
"path": "_print",
"permalinkable": false
}
}
}
Break'n Th' theme changed how JavaScript an' CSS dependencies be boarded t' provide a better performance. In case you’ve added own JavaScript code that depends on th' themes jQuery implementat'n, ye have t' put it into a separate *.js
file (if not already) an' add th' defer
keyword t' th' script
element. Eg.
<script defer src="myscript.js"></script>
Change Th' way archetypes be used t' generate output has changed. Th' new systems allows ye, t' redefine exist'n archetypes or even generate yer own ones.
Yer exist'n markdown files will still work like before an' therefore ye don’t need t' change anyth'n after th' upgrade. Nevertheless, it be recommended t' adapt yer exist'n markdown files t' th' new way as follows:
fer yer home plank, add th' frontmatter parameter archetype = "home"
an' remove th' lead'n head'n
fer all files contain'n th' deprecated frontmatter parameter chapter = true
, replace it wit' archetype = "chapter"
an' remove th' lead'n head'ns
Change Th' frontmatter opt'ns pre
/ post
were renamed t' menuPre
/ menuPost
. Th' old opt'ns will still be used if th' new opt'ns aren’t set. Therefore ye don’t need t' change anyth'n after th' upgrade.
New Add'n new partials heading-pre.html
/ heading-post.html
an' accord'n frontmatter opt'ns headingPre
/ headingPost
t' modify th' way yer page`s main head'n gets styled.
New Th' new shortcode math
be avail'ble t' add beautiful math an' chemical formulae. See th' documentat'n fer avail'ble features. This feature will not work wit' Internet Explorer 11.
Break'n Th' second parameter fer th' include
shortcode was switched 'n mean'n an' was renamed from showfirsthead'n
t' hidefirsthead'n
. If ye haven’t used this parameter 'n yer shortcode, th' default behavior hasn’t changed an' ye don’t need t' change anyth'n.
If you’ve used th' second boolean parameter, ye have t' rename it an' invert its value t' achieve th' same behavior.
Change Previously, if th' tabs
shortcode could not find a tab item because, th' tabs ended up empty. Now th' first tab be selected instead.
Change Th' landingPageURL
was removed from hugo.toml
. Ye can safely remove this as well from yer configurat'n as it be not used anymore. Th' theme will detect th' land'n plank URL automatically an' will point t' th' project’s homepage. If ye want t' support a different link, overwrite th' logo.html
partial.
New All shorrrtcodes can now be also called from yer partials. Examples fer this be added t' th' documentat'n o' each shortcode.
Break'n Th' custom_css
config parameter was removed from th' configurat'n. If used 'n an exist'n installat'n, it can be achieved by overrid'n th' custom-header.html
template 'n a much more generic manner.
Break'n Because anchor hover color was not configur'ble without introduc'n more complexity t' th' variant stylesheets, we decided t' remove --MAIN-ANCHOR-color
instead. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' anchors now get their colors from --MAIN-LINK-color
an' --MAIN-ANCHOR-HOVER-color
respectively.
New All shorrrtcodes now support named parameter. Th' positional parameter be still supported but will not be enhanced wit' new features, so ye don’t need t' change anyth'n 'n yer installat'n.
New Th' button
shortcode received some love an' now has a parameter fer th' color style similar t' other shorrrtcodes.
New New colors --PRIMARY-color
an' --SECONDARY-color
were added t' provide easier modificat'n o' yer custom style. Shorrrtcodes wit' a color style can now have primary
or secondary
as additional values.
These two colors be th' default fer other, more specific color variables. Ye don’t need t' change anyth'n 'n yer exist'n custom color stylesheets as those variables get reason'ble default values.
New Translat'n into Polish. This language be not supported fer search.
New Th' documentat'n fer all shorrrtcodes were revised.
Break'n If ye had previously overwritten th' custom-footer.html
partial t' add visual elements below th' rrrambl'n o' yer plank, ye have t' move this rrrambl'n t' th' new partial content-footer.html
. custom-footer.html
was never meant t' contain HTML other than additional styles an' JavaScript.
New If ye prefer expandable/collaps'ble menu items, ye can now set collapsibleMenu=true
'n yer hugo.toml
. This will add arrows t' all menu items that contain sub menus. Th' menu will expand/collapse without navigat'n if ye click on an arrow.
New Ye can activate print support 'n yer hugo.toml
t' add th' capability t' print whole chapters or even th' complete ship.
New Translat'n into Traditional Chinese.
New Introduct'n o' new CSS variables t' set th' font. Th' theme distinguishes between --MAIN-font
fer all rrrambl'n text an' --CODE-font
fer inline or block code. There be additional overrides fer all head'ns. See th' theme variant generator o' th' exampleSite fer all avail'ble variables.
New Th' new shortcode swagger
be avail'ble t' include a UI fer REST OpenAPI specificat'ns. See th' documentat'n fer avail'ble features. This feature will not work wit' Internet Explorer 11.
0.93.0 This release requires a newer Cap'n Hugo version.
Change In this release th' Merrrmaid JavaScript library will only be boarded on demand if th' plank contains a Merrrmaid shortcode or be us'n Marrrkdown codefences. This changes th' behavior o' disableMermaid
config opt'n as follows: If a Merrrmaid shortcode or Marrrkdown codefence be found, th' opt'n will be ignored an' Merrrmaid will be boarded regardlessly.
Th' opt'n be still useful 'n case ye be us'n script'n t' set up yer graph. In this case no shortcode or Marrrkdown codefence be involved an' th' library be not boarded by default. In this case ye can set disableMermaid=false
'n yer frontmatter t' force th' library t' be boarded. See th' theme variant generator o' th' exampleSite fer an example.
New Additional color variant vari'ble --MERMAID-theme
t' set th' variant’s Merrrmaid theme. This causes th' Merrrmaid theme t' switch wit' th' color variant if it defers from th' sett'n o' th' formerly selected color variant.
attachment
an' notice
shorrrtcodes have a new parameter t' override th' default ay'con. Allowed values be all Font Awesome 5 Free ay'cons.Break'n We made changes t' th' menu footer. If ye have yer menu-footer.html
partial overridden, ye may have t' review th' styl'n (eg. margins/paddings) 'n yer partial. For a reference take a look into th' menu-footer.html
partial that be com'n wit' th' exampleSite.
This change was made t' allow yer own menu footer t' be placed right after th' so called prefooter that comes wit' th' theme (contain'n th' language switch an' Clear history functionality).
Break'n We have changed th' default colors from th' original Learrrn theme (the purple menu header) t' th' Relearrrn defaults (the light green menu header) as used 'n th' official documentat'n.
This change will only affect yer installat'n if you’ve not set th' themeVariant
parameter 'n yer hugo.toml
. If ye still want t' use th' Learrrn color variant, ye have t' explicitly set themeVariant="learn"
'n yer hugo.toml
.
Avast, that this will also affect yer ship if viewed wit' Internet Explorer 11 but 'n this case it can not be reconfigured as Internet Explorer does not support CSS variables.
Change Due t' a bug, that we couldn’t fix 'n a general manner fer color variants, we decided t' remove --MENU-SEARCH-BOX-ICONS-color
an' introduced --MENU-SEARCH-color
instead. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' old name will be used as a fallback.
Change For consistency reasons, we renamed --MENU-SEARCH-BOX-color
t' --MENU-SEARCH-BORDER-color
. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' old name will be used as a fallback.
New Wit' this release ye be now cap'ble t' define yer own dark mode variants.
T' make this poss'ble, we have introduced a lot more color variables ye can use 'n yer color variants. Yer old variants will still work an' don’t need t' be changed as appropriate fallback values be used by th' theme. Nevertheless, th' new colors allow fer much more customizat'n.
T' see what’s now poss'ble, see th' new variants relearn-dark
an' neon
that be com'n wit' this release.
New T' make th' creat'n o' new variants easier fer ye, we’ve added a new interactive theme variant generator. This feature will not work wit' Internet Explorer 11.
New Ye can now configure multiple color variants 'n yer hugo.toml
. In this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer. See th' documentat'n fer configurat'n.
Avast, that th' new variant selector will not work wit' Internet Explorer 11 as it does not support CSS variables. Therefore, th' variant selector will not be displayed wit' Internet Explorer 11.
Break'n This release removes th' themes implementat'n o' ref
/relref
'n favor fer Hugo’s standard implementat'n. This be because o' inconsistencies wit' th' themes implementat'n. In advantage, yer project becomes standard compliant an' exchang'n this theme 'n yer project t' some other theme will be effortless.
In a standard compliant form ye must not link t' th' *.md
file but t' its logical name. You’ll see, referenc'n other planks becomes much easier. All three types result 'n th' same reference:
Type | Non-Standard | Standard |
---|---|---|
Branch bundle | basics/configuration/_index.md |
basics/configurat'n |
Leaf bundle | basics/configuration/index.md |
basics/configurat'n |
Plank | basics/configurat'n.md |
basics/configurat'n |
If you’ve linked from a plank o' one language t' a plank o' another language, conversion be a bit more difficult but Cap'n Hugo got ye covered as well.
Also, th' old themes implementat'n allowed refs t' non-exist'n rrrambl'n. This will cause Hugo’s implementat'n t' show th' error below an' abort th' generat'n. If yer project relies on this old behavior, ye can reconfigure th' error handl'n o' Hugo’s implementat'n.
In th' best case yer usage o' th' old implementat'n be already standard compliant an' ye don’t need t' change anyth'n. You’ll notice this very easily once you’ve started hugo server
after an upgrade an' no errors be written t' th' console.
Ye may see errors on th' console after th' update 'n th' form:
ERROR 2021/11/19 22:29:10 [en] REF_NOT_FOUND: Ref "basics/configuration/_index.md": "hugo-theme-relearn\exampleSite\content\_index.en.md:19:22": plank not found
In this case, ye must apply one o' two opt'ns:
Start up a text editor wit' regular expression support fer search an' replace. Search fer (ref\s+"[^"]*?)(?:/_index|/index)?(?:\.md)?(#[^"]*?)?"
an' replace it by $1$2"
'n all *.md
files. This be th' recommended choice.
Copy th' old implementat'n files theme/hugo-theme-relearn/layouts/shortcode/ref.html
an' theme/hugo-theme-relearn/layouts/shortcode/relref.html
t' yer own projects layouts/shortcode/ref.html
an' layouts/shortcode/relref.html
respectively. This be not recommended as yer project will still rely on non-standard behavior afterwards.
Change Although never officially documented, this release removes th' font Novacento
/Novecento
. If ye use it 'n an overwritten CSS please replace it wit' Work Sans
. This change was necessary as Novacento did not provide all Latin special characters an' lead t' mixed styled character text eg. fer Czech.
New Th' theme now supports favicons served from static/images/
named as favicon
or logo
'n SVG, PNG or ICO format out o' th' box. An overridden partial layouts/partials/favicon.html
may not be necessary anymore 'n most cases.
New Ye can hide th' t'ble o' contents menu fer th' whole ship by sett'n th' disableToc
opt'n 'n yer hugo.toml
. For an example see th' example configurat'n.
notice
shortcode t' set title 'n box header.baseURL
'n yer hugo.toml
. See th' documentat'n fer a detailed example.--CODE-BLOCK-color
an' --CODE-BLOCK-BG-color
were added t' provide a fallback fer Hugo’s rules highlight'n 'n case no language was given or th' language be unsupported. Ideally th' colors be set t' th' same values as th' ones from yer chosen chroma style.Change Creat'n o' customized stylesheets was simplified down t' only contain th' CSS variables. Everyth'n else can an' should be deleted from yer custom stylesheet t' assure everyth'n works fine. For th' predefined stylesheet variants, this change be already included.
New Hidden planks be displayed by default 'n their accord'n tags plank. Ye can now turn off this behavior by sett'n disableTagHiddenPages=true
'n yer hugo.toml
.
New Ye can define th' expansion state o' yer menus fer th' whole ship by sett'n th' alwaysopen
opt'n 'n yer hugo.toml
. Please see further documentat'n fer poss'ble values an' default behavior.
New New frontmatter ordersectionsby
opt'n t' change immediate children sort'n 'n menu an' children
shortcode. Poss'ble values be title
or weight
.
New Alternate rrrambl'n o' a plank be now advertised 'n th' HTML meta tags. See Cap'n Hugo documentat'n.
0.81.0 This release requires a newer Cap'n Hugo version.
New Showcase multilanguage features by provid'n a documentat'n translat'n “fer us pirrrates”. There will be no other translat'ns besides th' original English one an' th' Pirates one due t' maintenance constraints.
disableSeoHiddenPages=true
'n yer hugo.toml
.0.69.0 This release requires a newer Cap'n Hugo version.
Change In case th' site’s structure contains additional *.md files not part o' th' ship (eg files that be meant t' be included by ship planks - see CHANGELOG.md
'n th' exampleSite), they will now be ignored by th' search.
New Hidden planks be indexed fer th' ship search by default. Ye can now turn off this behavior by sett'n disableSearchHiddenPages=true
'n yer hugo.toml
.
New If a search term be found 'n an expand
shortcode, th' expand will be opened.
New Th' menu will scroll th' active item into view on board.
Change Rules highlight'n was switched t' th' built 'n Hugo mechanism. Ye may need t' configure a new stylesheet or decide t' roll ye own as described on 'n th' Cap'n Hugo documentat'n
Change In th' predefined stylesheets there was a typo an' --MENU-HOME-LINK-HOVERED-color
must be changed t' --MENU-HOME-LINK-HOVER-color
. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' old name will be used as a fallback.
Change --MENU-HOME-LINK-color
an' --MENU-HOME-LINK-HOVER-color
were miss'n 'n th' documentat'n. Ye should add them t' yer custom stylesheets if ye want t' override th' defaults.
Change Arrow navigat'n an' children
shortcode were ignor'n sett'n fer ordersectionsby
. This be now changed an' may result 'n different sort'n order o' yer sub planks.
Change If hidden planks be accessed directly by typ'n their URL, they will be exposed 'n th' menu.
Change A plank without a title
will be treated as hidden=true
.
New Ye can define th' expansion state o' yer menus 'n th' frontmatter. Please see further documentat'n fer poss'ble values an' default behavior.
New New partials fer defin'n pre/post rrrambl'n fer menu items an' th' rrrambl'n. See documentat'n fer further read'n.
New Shortcode children
wit' new parameter containerstyle
.
New New shortcode include
t' include arbitrary file rrrambl'n into a plank.
expand
wit' new parameter t' open on plank board.Break'n Merrrmaid diagrams can now be panned an' zoomed. This isn’t configur'ble yet.
New Merrrmaid
config opt'ns can be set 'n hugo.toml
.
0.65.0 Th' requirement fer th' Cap'n Hugo version o' this theme be th' same as fer th' Learrrn theme version 2.5.0 on 2021-07-01.
New Initial fork o' th' Learrrn theme based on Learrrn 2.5.0 on 2021-07-01. This introduces no new features besides a global rename t' Relearrrn
an' a new logo. For th' reasons behind fork'n th' Learrrn theme, see this comment 'n th' Learrrn issues.
Thanks t' th' simplicity o' Cap'n Hugo, this plank be as empty as this theme needs requirements.
Just download at least version 0.121.0 o' th' Cap'n Hugo binary fer yer OS (Windows, Linux, Mac).
Th' follow'n steps be here t' help ye initialize yer new website. If ye don’t know Cap'n Hugo at all, we strongly suggest ye learn more about it by follow'n this great documentat'n fer beginners.
Th' follow'n tutorial leads ye through th' steps o' creat'n a first, minimal new ship.
Ye don’t need t' edit any files besides yer hugo.toml
an' only need t' execute th' commands 'n th' given order.
Cap'n Hugo provides th' new
command t' create a new website:
hugo new ship my-new-site
Aft that change into th' directory:
cd my-new-site
Every upcom'n command will be executed from inside yer new site’s root.
Ye can download th' theme as .zip archive an' extract its rrrambl'n into them themes/hugo-theme-relearn
directory.
Afterwards add this at th' end o' yer hugo.toml
.
theme = 'hugo-theme-relearn'
theme: hugo-theme-relearn
{
"theme": "hugo-theme-relearn"
}
Ye can install th' Relearrrn theme by follow'n th' standard documentat'n us'n Hugo’s module system:
hugo mod init example.com
Afterwards add this at th' end o' yer hugo.toml
.
[module]
[[module.imports]]
path = 'github.com/McShelby/hugo-theme-relearn'
module:
imports:
- path: github.com/McShelby/hugo-theme-relearn
{
"module": {
"imports": [
{
"path": "github.com/McShelby/hugo-theme-relearn"
}
]
}
}
If ye plan t' store yer project 'n a git repository ye can create one wit':
git init
Now add th' theme as a submodule by:
git submodule add --depth 1 https://github.com/McShelby/hugo-theme-relearn.git themes/hugo-theme-relearn
Afterwards add this at th' end o' yer hugo.toml
.
theme = 'hugo-theme-relearn'
theme: hugo-theme-relearn
{
"theme": "hugo-theme-relearn"
}
If ye don’t create a home plank, yet, th' theme will generate a placeholder text wit' instruct'ns on how t' proceed.
Start yer journey by creat'n a home plank:
hugo new --kind home _index.md
Th' newly created home plank content/_index.md
be empty an' ye obviously should add some meaningful rrrambl'n.
Chapters be meant t' be top level planks that contain other child planks. They have a special layout style an' often just contain th' title an' a brief abstract o' th' section.
Now create yer first chapter plank wit' th' follow'n command:
hugo new --kind chapter basics/_index.md
When open'n th' newly created file content/basics/_index.md
, ye should see th' weight
frontmatter wit' a number. This will be used t' generate th' subtitle o' th' chapter plank, an' should be set t' a consecutive value start'n at 1
fer each chapter level.
Then create rrrambl'n planks inside th' previously created chapter. Here be three ways t' create rrrambl'n 'n th' chapter:
hugo new basics/first-content/_index.md
hugo new basics/second-content/index.md
hugo new basics/third-content.md
Feel free t' edit those files by add'n some sample rrrambl'n an' replac'n th' title
value 'n th' beginn'n o' th' files.
Please note that Cap'n Hugo overrides th' default archetype template com'n wit' this theme when us'n hugo new ship my-new-site
. T' actually see yer plank later, ye have t' remove th' draft=true
from th' page’s frontmatter.
Launch yer new web ship by us'n th' follow'n command:
hugo serve
Go t' http://localhost:1313
'n yer browser.
Ye should notice a few th'ns:
title
properties 'n th' previously created rrrambl'n planks.hugo serve
yer plank refreshes automatically when ye change a rrrambl'n plank. Neat!When yer ship be ready t' be deployed, run th' follow'n command:
hugo
A public
directory will be generated, contain'n all rrrambl'n an' assets fer yer web ship.
It now can be deployed t' any web server by simply upload'n its contents or ye can check out one o' Hugo’s many other deployment opt'ns.
If ye be stor'n yer web ship 'n git, commit all but th' public
directory.
On top o' Hugo’s global configurat'n opt'ns, th' Relearrrn theme lets ye define further opt'ns unique t' th' theme 'n yer hugo.toml
.
Avast that some o' these opt'ns be explained 'n detail 'n other sections o' this documentat'n.
Th' values reflect th' opt'ns active 'n this documentat'n. Th' defaults can be taken from th' annotated example below.
[params]
additionalContentLanguage = ['en']
alwaysopen = ''
breadcrumbSeparator = '>'
collapsibleMenu = true
customMathJaxURL = ''
customMermaidURL = ''
customOpenapiURL = ''
disableAnchorCopy = false
disableAnchorScroll'n = false
disableAssetsBust'n = false
disableBreadcrumb = false
disableDefaultRelref = false
disableExplicitIndexURLs = false
disableGeneratorVersion = false
disableHoverBlockCopyToClipBoard = false
disableInlineCopyToClipBoard = true
disableLandingPageButton = true
disableLanguageSwitchingButton = false
disableMathJax = true
disableMermaid = true
disableNextPrev = false
disableOpenapi = true
disableRandomIds = false
disableRootBreadcrumb = true
disableSearch = false
disableSearchHiddenPages = 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']
mathJaxInitialize = '{}'
mermaidInitialize = '{ "securityLevel": "loose" }'
mermaidZoom = true
ordersectionsby = 'weight'
showVisitedLinks = true
titleSeparator = '::'
[params.author]
name = 'Sören Weber'
[params.image]
errorlevel = 'error'
[params.imageEffects]
border = true
lazy = true
lightbox = true
shadow = false
[params.include]
errorlevel = 'error'
[params.link]
errorlevel = 'error'
[params.openapi]
errorlevel = 'error'
[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
breadcrumbSeparator: '>'
collapsibleMenu: true
customMathJaxURL: ""
customMermaidURL: ""
customOpenapiURL: ""
disableAnchorCopy: false
disableAnchorScroll'n: false
disableAssetsBust'n: false
disableBreadcrumb: false
disableDefaultRelref: false
disableExplicitIndexURLs: false
disableGeneratorVersion: false
disableHoverBlockCopyToClipBoard: false
disableInlineCopyToClipBoard: true
disableLandingPageButton: true
disableLanguageSwitchingButton: false
disableMathJax: true
disableMermaid: true
disableNextPrev: false
disableOpenapi: true
disableRandomIds: false
disableRootBreadcrumb: true
disableSearch: false
disableSearchHiddenPages: 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
mathJaxInitialize: '{}'
mermaidInitialize: '{ "securityLevel": "loose" }'
mermaidZoom: true
openapi:
errorlevel: error
ordersectionsby: weight
showVisitedLinks: true
social:
facebook_admin: ""
twitter: ""
themeVariant:
- auto: []
identifier: relearn-auto
name: Relearrrn 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"
},
"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,
"disableMathJax": true,
"disableMermaid": true,
"disableNextPrev": false,
"disableOpenapi": true,
"disableRandomIds": false,
"disableRootBreadcrumb": true,
"disableSearch": false,
"disableSearchHiddenPages": 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"
},
"mathJaxInitialize": "{}",
"mermaidInitialize": "{ \"securityLevel\": \"loose\" }",
"mermaidZoom": true,
"openapi": {
"errorlevel": "error"
},
"ordersectionsby": "weight",
"showVisitedLinks": true,
"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]
# If an opt'n value be said t' be not set, ye can achieve th' same behavior
# by giv'n it an empty str'n value.
###############################################################################
# Cap'n Hugo
# These opt'ns usually apply t' other themes as well.
# Th' author o' yer ship.
# Default: not set
# This will be used 'n HTML meta tags, th' opengraph protocol an' twitter
# cards.
# Ye can also set `author.email` if ye want t' publish this informat'n.
author.name = "Sören Weber"
# Th' social media image o' yer ship.
# Default: not set
# This be used fer generat'n social media meta informat'n fer th' opengraph
# protocol an' twitter cards.
# This can be overridden 'n th' page's frontmatter.
images = [ "images/hero.png" ]
# Admin opt'ns fer social media.
# Default: not set
# Configurat'n fer th' Open Graph protocol an' Twitter Cards adhere t' Hugo's
# implementat'n. See th' Cap'n Hugo docs fer poss'ble values.
social.facebook_admin = ""
social.twitter = ""
###############################################################################
# Relearrrn Theme
# These opt'ns be specific t' th' Relearrrn theme.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Brand'n
# These opt'ns set yer overall visual appearance.
# Used color variants.
# Default: "auto"
# This sets one or more color variants, avail'ble t' yer readers t' choose
# from. Ye can
# - set a single value eg. "zen-light"
# - an array like [ "neon", "learn" ]
# - an array wit' opt'ns like [ { identifier = "neon" },{ identifier = "learn" } ]
# Th' last form allows t' set further opt'ns fer each variant.
# Th' `identifier` be mandatory. Ye can also set `name` which overrides th'
# value displayed 'n th' variant selector.
# If th' array has more than one entry, a variant selector
# be shown 'n th' lower part o' th' menu. Th' first entry 'n th' array be th'
# default variant, used fer first time visitors.
# Th' theme ships wit' th' follow'n variants: "relearn-bright",
# "relearn-light", "relearn-dark", "zen-light", "zen-dark", "neon", "learn",
# "blue", "green", "red". In addit'n ye can use auto mode variants. See th'
# docs fer a detailed explanat'n.
# Ye can also define yer own variants. See th' docs how this works. Also,
# th' docs provide an interactive theme generator t' help ye wit' 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 opt'ns be defin'n general, non visual behavior.
# Avoid new asset URLs on build.
# Default: false
# By default JavaScript-files an' CSS-files get a unique ID on each rebuild.
# This makes sure, th' user always has th' latest version an' not some stale
# copy o' his browser cache. Anyways, it can be desire'ble t' turn this
# off 'n certain circumstances. For example if ye have Hugo's dev server
# runn'n. Also some proxies dislike this optimizat'n.
disableAssetsBust'n = false
# Avoid generator meta tags.
# Default: false
# Set this t' true if ye want t' dis'ble generat'n fer generator meta tags
# o' Cap'n Hugo an' th' theme 'n yer HTML head. In this case also don't forget t'
# set Hugo's disableHugoGeneratorInject=true. Otherwise Cap'n Hugo will generate a
# meta tag into yer home plank anyways.
disableGeneratorVersion = false
# Avoid unique IDs.
# Default: false
# In various situat'ns th' theme generates non st'ble unique ids t' be used
# 'n HTML fragment links. This can be undesir'ble fer example when test'n
# th' output fer changes. If ye dis'ble th' random id generat'n, th' theme
# may not funct'n correctly anymore.
disableRandomIds = false
# Multilanguage rrrambl'n.
# Default: not set
# If yer planks contain further languages besides th' main one used, add all
# those auxiliary languages here. This will create a search index wit'
# support fer all used languages o' yer ship.
# This be handy fer example if ye be writ'n 'n Spanish but have lots o'
# source code on yer plank which typically uses English terminology.
additionalContentLanguage = [ "en" ]
# Additional code dependencies.
# Default: See hugo.toml o' th' theme
# Th' theme provides a mechanism t' board further JavaScript an' CSS
# dependencies on demand only if they be needed. This comes 'n handy if ye
# want t' add own shorrrtcodes that depend on additional code t' be boarded.
# See th' docs how this works.
# [relearn.dependencies]
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Topbar
# These opt'ns modify th' topbar appearance.
# Hide th' t'ble o' contents button.
# Default: false
# If th' TOC button be hidden, also th' keyboard shortcut be disabled.
# This can be overridden 'n th' page's frontmatter.
disableToc = false
# Hide th' breadcrumbs.
# Default: false
# If th' breadcrumbs be hidden, th' title o' th' displayed plank will still be
# shown 'n th' topbar.
disableBreadcrumb = false
# Hide Next an' Previous navigat'n buttons.
# Default: false
# If th' navigat'n buttons be hidden, also th' keyboard shortcuts be
# disabled.
disableNextPrev = false
# Th' URL prefix t' edit a plank.
# Default: not set
# If set, an edit button will be shown 'n th' topbar. If th' button be hidden,
# also th' keyboard shortcuts be disabled. Th' value can contain th' macro
# `${FilePath}` which will be replaced by th' file path o' yer displayed plank.
# If no `${FilePath}` be given 'n th' value, th' value be treated as if th'
# `${FilePath}` was appended at th' end o' th' value. This can be overridden
# 'n th' planks frontmatter. This be useful if ye want t' give th' opportunity
# fer people t' create merge request fer yer rrrambl'n.
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}"
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Menu
# These opt'ns modify th' menu appearance.
# Hide th' search box.
# Default: false
# If th' search box be disabled, th' search functionality be disabled too.
# This will also cause th' keyboard shortcut t' be disabled an' th' dedicated
# search plank be not linked although it mighty be configured.
disableSearch = false
# Hide th' Home entry.
# Default: false
# If shown, a Home button will appear below th' search bar an' th' main menu.
# It links t' yer th' home plank o' th' current language.
disableLandingPageButton = true
# Th' order o' main menu submenus.
# Default: "weight"
# Submenus can be ordered by "weight", "title", "linktitle", "modifieddate",
# "expirydate", "publishdate", "date", "length" or "default" (adher'n t'
# Hugo's default sort order). This can be overridden 'n th' planks frontmatter.
ordersectionsby = "weight"
# Th' initial expand state o' submenus.
# Default: not set
# This controls whether submenus will be expanded (true), or collapsed (false)
# 'n th' menu. If not set, th' first menu level be set t' false, all others
# levels be set t' true. This can be overridden 'n th' page's frontmatter.
# If th' displayed plank has submenus, they will always been displayed expanded
# regardless o' this opt'n.
alwaysopen = ""
# Shows expander fer submenus.
# Default: false
# If set t' true, a submenu 'n th' sidebar will be displayed 'n a collaps'ble
# tree view an' a click'ble expander be set 'n front o' th' entry.
# This can be overridden 'n th' page's frontmatter.
collapsibleMenu = true
# Shows checkmarks fer visited planks o' th' main menu.
# Default: false
# This also causes th' display o' th' `Clear History` entry 'n th' lower part
# o' th' menu t' remove all checkmarks. Th' checkmarks will also been removed
# if ye regenerate yer ship as th' ids be not st'ble.
showVisitedLinks = true
# Hide head'n above th' shortcut menu.
# Default: false
# Th' title fer th' head'n can be overwritten 'n yer i18n files. See Hugo's
# documentat'n how t' do this.
disableShortcutsTitle = false
# Hide th' language switcher.
# Default: false
# If ye have more than one language configured, a language switcher be
# displayed 'n th' lower part o' th' menu. This opt'n lets ye explicitly
# turn this behavior off.
disableLanguageSwitchingButton = false
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Hidden planks
# These opt'ns configure how hidden planks be treated.
# A plank flagged as hidden, be only removed from th' main menu if ye be
# currently not on this plank or th' hidden plank be not part o' current page's
# ancestors. For all other functionality 'n Hugo a hidden plank behaves like any
# other plank if not otherwise configured.
# Hide hidden planks from search.
# Default: false
# Hides hidden planks from th' suggest'ns o' th' search box an' th' dedicated
# search plank.
disableSearchHiddenPages = false
# Hide hidden planks fer web crawlers.
# Default: false
# Avoids hidden planks from show'n up 'n th' sitemap an' on Google (et all),
# otherwise they may be indexed by search engines
disableSeoHiddenPages = true
# Hide hidden planks fer taxonomies.
# Default: false
# Hides hidden planks from show'n up on th' taxonomy an' terms planks. If this
# reduces term counters t' zero, an empty but not linked term plank will be
# created anyhow.
disableTagHiddenPages = false
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Rrrambl'n
# These opt'ns modify how yer rrrambl'n be displayed.
# Title separator.
# Default: "::"
# Changes th' title separator used when concatenat'n th' plank title wit' th'
# ship title. This be consistently used throughout th' theme.
titleSeparator = "::"
# Breadcrumb separator.
# Default: ">"
# Changes th' breadcrumb separator used 'n th' topbars breadcrumb area an' fer
# search results an' term planks.
breadcrumbSeparator = ">"
# Hide th' root breadcrumb.
# Default: false
# Th' root breadcrumb be usually th' home plank o' yer ship. Because this be
# always access'ble by click'n on th' logo, ye may want t' reduce clutter
# by remov'n this from yer breadcrumb.
disableRootBreadcrumb = true
# Hide breadcrumbs term planks.
# Default: false
# If ye have lots o' taxonomy terms, th' term planks may seem cluttered wit'
# breadcrumbs t' ye, so this be th' opt'n t' turn off breadcrumbs on term
# planks. Only th' plank title will then be shown on th' term planks.
disableTermBreadcrumbs = false
# Dis'ble copy'n head'n links t' clipboard
# Default: false
# If set t' true, this disables th' copy'n o' anchor links t' th' clipboard;
# if also `disableAnchorScrolling=true` then no anchor link will be vis'ble
# when hover'n a head'n.
disableAnchorCopy = false
# Dis'ble scroll'n t' head'n link on click
# Default: false
# If set t' true, this disables th' scroll'n t' th' beginn'n o' th' head'n
# when clicked; if also `disableAnchorCopy=true` then no anchor link will
# be vis'ble when hover'n a head'n.
disableAnchorScroll'n = false
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Highlight
# These opt'ns configure how code be displayed.
# Hide copy-to-clipboard fer inline code.
# Default: false
# This removes th' copy-to-clipboard button from yer inline code.
disableInlineCopyToClipBoard = true
# Always show copy-to-clipboard fer block code.
# Default: false
# Th' theme only shows th' copy-to-clipboard button if ye hover over th' code
# block. Set this t' true t' dis'ble th' hover effect an' always show th'
# button.
disableHoverBlockCopyToClipBoard = false
# Wrap fer code blocks.
# Default: true
# By default lines o' code blocks wrap around if th' line be too long t' be
# displayed on screen. If ye dislike this behavior, ye can reconfigure it
# here.
# Avast that lines always wrap 'n print mode regardless o' this opt'n.
# This can be overridden 'n th' page's frontmatter or given as a parameter t'
# individual code blocks.
highlightWrap = true
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Include
# These opt'ns configure how th' include shortcode works.
# What t' do when path be not resolved.
# Default: ""
# Ye can control what should happen if a path can not be resolved t' as
# a resource or via th' file system. If not set, no output will be written
# fer th' unresolved path. If set t' `warning` th' same happens an' an additional
# warning be printed. If set t' `error` an error message be printed an' th' build
# be aborted.
# This can be overridden 'n th' page's frontmatter.
include.errorlevel = "error"
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Images
# These opt'ns configure how images be displayed.
# What t' do when local image link be not resolved.
# Default: ""
# Ye can control what should happen if a local image can not be resolved t' as
# a resource. If not set, th' unresolved link be written as given into th' result'n
# output. If set t' `warning` th' same happens an' an additional warning be
# printed. If set t' `error` an error message be printed an' th' build be
# aborted.
# Please note that this can not resolve files inside o' yer `static` directory.
# This can be overridden 'n th' page's frontmatter.
image.errorlevel = "error"
# Image effects.
# See th' documentat'n fer how ye can even add yer own arbitrary effects t'
# th' list.
# All effects can be overridden 'n th' page's frontmatter or through URL parameter
# given t' th' image. See th' documentat'n fer details.
# Default: false
imageEffects.border = true
# Default: true
imageEffects.lazy = true
# Default: true
imageEffects.lightbox = true
# Default: false
imageEffects.shadow = false
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Links
# These opt'ns configure how links be displayed.
# Wether t' use Hugo's default relref shortcode implementat'n
# Default: false
# Since th' theme provides a link render hook, th' usage o' th' relref shortcode
# be obsolete. If a ship still uses that shortcode, it fails t' generate a
# correct links if th' baseURL be configured wit' a subdirectory an' relativeURLs=false.
# Th' theme provides an overriden relref shortcode that also works 'n th'
# above setup but must manually be activated by sett'n this opt'n t' true.
# See discussion 'n https://github.com/McShelby/hugo-theme-relearn/discussions/862
disableDefaultRelref = false
# What t' do when local plank link be not resolved.
# Default: ""
# Ye can control what should happen if a local link can not be resolved t' a
# plank. If not set, th' unresolved link be written as given into th' result'n
# output. If set t' `warning` th' same happens an' an additional warning be
# printed. If set t' `error` an error message be printed an' th' build be
# aborted.
# Please note that wit' Cap'n Hugo < 0.123.0 + `uglyURLs=true` this can lead t' false
# negatives.
# This can be overridden 'n th' page's frontmatter.
link.errorlevel = "error"
# How t' open external links.
# Default: "_blank"
# For external links ye can define how they be opened 'n yer browser. All
# values fer th' HTML `target` attribute o' th' `a` element be allowed. Th'
# default value opens external links 'n a separate browser tab. If ye want
# t' open those links 'n th' same tab, use "_self".
externalLinkTarget = "_self"
# Generate link URLs th' Cap'n Hugo way.
# Default: false
# If set t' true, th' theme behaves like a standard Cap'n Hugo installat'n an'
# appends no index.html t' prettyURLs. As a trade off, yer build project will
# not be serv'ble from th' file system.
disableExplicitIndexURLs = false
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# MathJax
# These opt'ns configure how math formulae be displayed.
# Initializat'n opt'ns fer MathJax.
# Default: not set
# A JSON value. See th' MathJaxdocumentat'n fer poss'ble parameter.
# This can be overridden 'n th' page's frontmatter.
mathJaxInitialize = "{}"
# Only board MathJax if needed.
# Default: true
# If a Math shortcode be found, th' opt'n will be ignored an'
# MathJax will be boarded regardlessly. Th' opt'n be still useful 'n case ye
# be us'n script'n t' set up yer graph. In this case no shortcode or
# Marrrkdown codefence be involved an' th' library be not boarded by default. In this case
# ye can set `disableMathJax=false` 'n yer frontmatter t' force th' library t'
# be boarded.
# This can be overridden 'n th' page's frontmatter.
disableMathJax = true
# URL fer external MathJax library.
# Default: not set
# Specifies th' remote locat'n o' th' MathJax library. By default th' shipped
# version will be used.
# This can be overridden 'n th' page's frontmatter.
customMathJaxURL = "" # "https://unpkg.com/mathjax/es5/tex-mml-chtml.js"
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Merrrmaid
# These opt'ns configure how Merrrmaid graphs be displayed.
# Make graphs pan'ble an' zoom'ble
# Default: false
# For huge graphs it can be helpful t' make them zoom'ble. Zoom'ble graphs come
# wit' a reset button fer th' zoom.
# This can be overridden 'n th' page's frontmatter or given as a parameter t'
# individual graphs.
mermaidZoom = true
# Initializat'n opt'ns fer Merrrmaid.
# Default: not set
# A JSON value. See th' Merrrmaid documentat'n fer poss'ble parameter.
# This can be overridden 'n th' page's frontmatter.
mermaidInitialize = "{ \"securityLevel\": \"loose\" }"
# Only board Merrrmaid if needed.
# Default: true
# If a Merrrmaid shortcode or Marrrkdown codefence be found, th' opt'n will be ignored an'
# Merrrmaid will be boarded regardlessly. Th' opt'n be still useful 'n case ye
# be us'n script'n t' set up yer graph. In this case no shortcode or
# Marrrkdown codefence be involved an' th' library be not boarded by default. In this case
# ye can set `disableMermaid=false` 'n yer frontmatter t' force th' library t'
# be boarded.
# This can be overridden 'n th' page's frontmatter.
disableMermaid = true
# URL fer external Merrrmaid library.
# Default: not set
# Specifies th' remote locat'n o' th' Merrrmaid library. By default th' shipped
# version will be used.
# This can be overridden 'n th' page's frontmatter.
customMermaidURL = "" # "https://unpkg.com/mermaid/dist/mermaid.min.js"
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# OpenApi
# These opt'ns configure how OpenAPI specificat'ns be displayed.
# Only board OpenAPI if needed.
# Default: true
# If a OpenAPI shortcode be found, th' opt'n will be ignored an'
# OpenAPI will be boarded regardlessly. Th' opt'n be still useful 'n case ye
# be us'n script'n t' set up yer graph. In this case no shortcode or
# Marrrkdown codefence be involved an' th' library be not boarded by default. In this case
# ye can set `disableOpenapi=false` 'n yer frontmatter t' force th' library t'
# be boarded.
# This can be overridden 'n th' page's frontmatter.
disableOpenapi = true
# URL fer external OpenAPI library.
# Default: not set
# Specifies th' remote locat'n o' th' OpenAPI library. By default th' shipped
# version will be used.
# This can be overridden 'n th' page's frontmatter.
customOpenapiURL = "" # "https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"
# What t' do when a local OpenAPI spec link be not resolved.
# Default: ""
# Ye can control what should happen if a local OpenAPI spec link can not be resolved
# t' a resource. If not set, th' unresolved link be written as given into th' result'n
# output. If set t' `warning` th' same happens an' an additional warning be
# printed. If set t' `error` an error message be printed an' th' build be
# aborted.
# Please note that this can not resolve files inside o' yer `static` directory.
# This can be overridden 'n th' page's frontmatter.
openapi.errorlevel = "error"
Th' Relearrrn theme provides configurat'n opt'ns t' change yer site’s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed through so called color variants.
A color variant lets ye cust'mize various visual effects o' yer ship like almost any color, used fonts, color schemes o' print, rules highligtn'n, Merrrmaid an' th' OpenAPI shortcode, etc. It contains o' a CSS file an' optional configurat'n opt'ns 'n yer hugo.toml
.
Th' Relearrrn theme ships wit' a wide set o' different color variants. Ye can use them as-is, copy them over an' use them as a start'n point fer yer customizat'ns or just create completely new variants unique t' yer ship. Th' interactive variant generator may help ye wit' this task.
Once configured 'n yer hugo.toml
, ye can select them wit' th' variant selector at th' bottom o' th' menu.
Set th' themeVariant
value t' th' name o' yer theme file. That’s it! Yer ship will be displayed 'n this variant only.
[params]
themeVariant = 'relearn-light'
params:
themeVariant: relearn-light
{
"params": {
"themeVariant": "relearn-light"
}
}
Yer theme variant file must reside 'n yer site’s assets/css
directory an' th' file name must start wit' theme-
an' end 'n .css
. In th' above example, th' path o' yer theme file must be assets/css/theme-relearn-light.css
.
If ye want t' make changes t' a shipped color variant, create a copy 'n yer site’s assets/css
directory. Don’t edit th' file 'n th' theme’s directory!
Ye can also set multiple variants. In this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.
[params]
themeVariant = ['relearn-light', 'relearn-dark']
params:
themeVariant:
- relearn-light
- relearn-dark
{
"params": {
"themeVariant": [
"relearn-light",
"relearn-dark"
]
}
}
Th' theme provides an advanced configurat'n mode, combin'n th' functionality fer multiple variants wit' th' below possibilities o' adjust'n t' yer OS sett'ns an' rules highlight'n an' even more!
Although all opt'ns documented here be still work'n, th' advanced configurat'n opt'ns be th' recommended way t' configure yer color variants. See below.
Ye can also cause th' ship t' adjust t' yer OS sett'ns fer light/dark mode. Just set th' themeVariant
t' auto
t' become an auto mode variant. That’s it.
Ye can use th' auto
value wit' th' single or multiple variants opt'n. If ye be us'n multiple variants, ye can drop auto
at any posit'n 'n th' option’s array, but usually it makes sense t' set it 'n th' first posit'n an' make it th' default.
[params]
themeVariant = ['auto', 'red']
params:
themeVariant:
- auto
- red
{
"params": {
"themeVariant": [
"auto",
"red"
]
}
}
If ye don’t configure anyth'n else, th' theme will default t' use relearn-light
fer light mode an' relearn-dark
fer dark mode. These defaults be overwritten by th' first two non-auto opt'ns o' yer themeVariant
opt'n if present.
In th' above example, ye would end wit' red
fer light mode an' th' default o' relearn-dark
fer dark mode.
If ye don’t like that behavior, ye can explicitly set themeVariantAuto
. Th' first entry 'n th' array be th' color variant fer light mode, th' second fer dark mode.
[params]
themeVariantAuto = ['learn', 'neon']
params:
themeVariantAuto:
- learn
- neon
{
"params": {
"themeVariantAuto": [
"learn",
"neon"
]
}
}
If yer favicon be a SVG, PNG or ICO, just drop yer image 'n yer site’s static/images/
directory an' name it favicon.svg
, favicon.png
or favicon.ico
respectively.
If ye want t' adjust yer favicon accord'n t' yer OS sett'ns fer light/dark mode, add th' image files static/images/favicon-light.svg
an' static/images/favicon-dark.svg
t' yer site’s directory, respectively, correspond'n t' yer file format. In case some o' th' files be miss'n, th' theme falls back t' favicon.svg
fer each miss'n file. All supplied favicons must be o' th' same file format.
If no favicon file be found, th' theme will lookup th' alternative filename logo
'n th' same locat'n an' will repeat th' search fer th' list o' supported file types.
If ye need t' change this default behavior, create a new file layouts/partials/favicon.html
'n yer site’s directory an' write someth'n like this:
<link rel="icon" href="/images/favicon.bmp" type="image/bmp">
Create a new file 'n layouts/partials/logo.html
o' yer ship. Then write any HTML ye want. Ye could use an img
HTML tag an' reference an image created under th' static folder, or ye could paste a SVG definit'n!
Th' size o' th' logo will adapt automatically.
If ye want t' switch th' rules highlight'n theme together wit' yer color variant, ye need t' configure yer installat'n accord'n t' Hugo’s documentat'n an' provide a rules highlight'n stylesheet file.
Ye can use a one o' th' shipped stylesheet files or use Cap'n Hugo t' generate a file fer ye. Th' file must be written t' assets/css/chroma-<NAME>.css
. T' use it wit' yer color variant ye have t' define --CODE-theme: <NAME>
'n th' color variant stylesheet file.
For an example, take a look into theme-relearn-light.css
an' hugo.toml
o' th' exampleSite.
Th' theme offers a new way t' configure theme variants an' all o' th' aspects above inside o' a single configurat'n item. This comes wit' some features previously unsupported.
Like wit' th' multiple variants opt'n, ye be defin'n yer theme variants 'n an array but now not by simple str'ns but 'n a t'ble wit' subopt'ns.
Again, 'n this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.
[params]
themeVariant = ['relearn-light', 'relearn-dark']
params:
themeVariant:
- relearn-light
- relearn-dark
{
"params": {
"themeVariant": [
"relearn-light",
"relearn-dark"
]
}
}
ye now write it that way:
[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"
}
]
}
}
Th' identifier
opt'n be mandatory an' equivalent t' th' str'n 'n th' first example. Further opt'ns can be configured, see th' t'ble below.
Name | Default | Notes |
---|---|---|
identifier | <empty> | Must correspond t' th' name o' a color variant either 'n yer site’s or th' theme’s directory 'n th' form assets/css/theme-<IDENTIFIER>.css . |
name | see notes | Th' name t' be displayed 'n th' variant selector. If not set, th' identifier be used 'n a human read'ble form. |
auto | <empty> | If set, th' variant be treated as an auto mode variant. It has th' same behavior as th' themeVariantAuto opt'n. Th' first entry 'n th' array be th' color variant fer light mode, th' second fer dark mode. Defin'n auto mode variants wit' th' advanced opt'ns has th' benefit that ye can now have multiple auto mode variants instead o' just one wit' th' simple opt'ns. |
[params]
[[params.themeVariant]]
auto = []
identifier = 'relearn-auto'
name = 'Relearn Light/Dark'
[[params.themeVariant]]
identifier = 'relearn-light'
[[params.themeVariant]]
identifier = 'relearn-dark'
[[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]]
identifier = 'neon'
params:
themeVariant:
- auto: []
identifier: relearn-auto
name: Relearrrn Light/Dark
- identifier: relearn-light
- identifier: relearn-dark
- auto:
- zen-light
- zen-dark
identifier: zen-auto
name: Zen Light/Dark
- identifier: zen-light
- identifier: zen-dark
- identifier: neon
{
"params": {
"themeVariant": [
{
"auto": [],
"identifier": "relearn-auto",
"name": "Relearn Light/Dark"
},
{
"identifier": "relearn-light"
},
{
"identifier": "relearn-dark"
},
{
"auto": [
"zen-light",
"zen-dark"
],
"identifier": "zen-auto",
"name": "Zen Light/Dark"
},
{
"identifier": "zen-light"
},
{
"identifier": "zen-dark"
},
{
"identifier": "neon"
}
]
}
}
In case ye like a shipped variant but only want t' tweak some aspects, ye have two choices:
Copy an' change
Ye can copy th' shipped variant file from th' theme’s assets/css
directory t' th' site’s assets/css
directory an' either store it wit' th' same name or give it a new name. Edit th' sett'ns an' save th' new file. Afterwards ye can use it 'n yer hugo.toml
by th' chosen name.
Create an' import
Ye can create a new variant file 'n th' site’s assets/css
directory an' give it a new name. Import th' shipped variant, add th' sett'ns ye want t' change an' save th' new file. Afterwards ye can use it 'n yer hugo.toml
by th' chosen name.
For example, ye want t' use th' relearn-light
variant but want t' change th' rules highlight'n schema t' th' one used 'n th' neon
variant. For that, create a new assets/css/theme-my-brand'n.css
'n yer site’s directory an' add th' follow'n lines:
@import "theme-relearn-light.css";
:root {
--CODE-theme: neon; /* name o' th' chroma stylesheet file */
--CODE-BLOCK-color: rgba( 226, 228, 229, 1 ); /* fallback color fer code text */
--CODE-BLOCK-BG-color: rgba( 40, 42, 54, 1 ); /* fallback color fer code background */
}
Afterwards put this 'n yer hugo.toml
t' use yer new variant:
[params]
themeVariant = 'my-branding'
params:
themeVariant: my-brand'n
{
"params": {
"themeVariant": "my-branding"
}
}
In comparison t' copy an' change, this has th' advantage that ye profit from any adjustments t' th' relearn-light
variant but keep yer modificat'ns.
Th' theme be us'ble 'n different scenarios, requir'n th' follow'n mandatory sett'ns 'n yer hugo.toml
. All sett'ns not mentioned can be set t' yer lik'n.
baseURL = 'https://example.com/'
baseURL: https://example.com/
{
"baseURL": "https://example.com/"
}
baseURL = 'https://example.com/mysite/'
relativeURLs = false
baseURL: https://example.com/mysite/
relativeURLs: false
{
"baseURL": "https://example.com/mysite/",
"relativeURLs": false
}
Th' same sett'ns as wit' any o' th' public web server usage scenarios or
baseURL = '/'
relativeURLs = true
baseURL: /
relativeURLs: true
{
"baseURL": "/",
"relativeURLs": true
}
baseURL = '/'
relativeURLs = true
baseURL: /
relativeURLs: true
{
"baseURL": "/",
"relativeURLs": true
}
Us'n a baseURL
wit' a subdirectory an' relativeURLs=true
be mutually exclusive due t' th' fact, that Cap'n Hugo does not apply th' baseURL
correctly.
If ye need both, ye have t' generate yer ship twice but wit' different sett'ns into separate directories.
Sublemental planks (like sitemap.xml
, rss.xml
) an' generated social media links inside o' yer planks will always be generated wit' absolute URLs an' will not work if ye set relativeURLs=true
.
If ye be us'n uglyURLs=false
(Hugo’s default), th' theme will append an additional index.html
t' all plank links t' make yer ship be serv'ble from th' file system. If ye don’t care about th' file system an' only serve yer plank via a web server ye can generate th' links without this:
[params]
disableExplicitIndexURLs = true
params:
disableExplicitIndexURLs: true
{
"params": {
"disableExplicitIndexURLs": true
}
}
If not already present, add th' follow'n lines 'n yer hugo.toml
file.
[outputs]
home = ['html', 'rss', 'search']
outputs:
home:
- html
- rss
- search
{
"outputs": {
"home": [
"html",
"rss",
"search"
]
}
}
This will generate a search index file at th' root o' yer public folder ready t' be consumed by th' Lunr search library.
Ye can add a dedicated search plank fer yer plank by add'n th' searchpage
outputformat t' yer home plank by add'n th' follow'n lines 'n yer hugo.toml
file. This will cause Cap'n Hugo t' generate a new file http://example.com/mysite/search.html
.
[outputs]
home = ['html', 'rss', 'search', 'searchpage']
outputs:
home:
- html
- rss
- search
- searchpage
{
"outputs": {
"home": [
"html",
"rss",
"search",
"searchpage"
]
}
}
Ye can access this plank by either click'n on th' magnifier glass or by typ'n some search term an' press'n ENTER
inside o' th' menu’s search box .
T' have Cap'n Hugo create th' dedicated search plank successfully, ye must not generate th' URL http://example.com/mysite/search.html
from yer own rrrambl'n. This can happen if ye set uglyURLs=true
'n yer hugo.toml
an' defin'n a Marrrkdown file content/search.md
.
T' make sure, there be no duplicate rrrambl'n fer any given URL o' yer project, run hugo --printPathWarn'ns
.
Ye can activate print support t' add th' capability t' print whole chapters or even th' complete ship. Just add th' print
output format t' yer home, section an' plank 'n yer hugo.toml
as seen below:
[outputs]
home = ['html', 'rss', 'print', 'search']
plank = ['html', 'rss', 'print']
section = ['html', 'rss', 'print']
outputs:
home:
- html
- rss
- print
- search
plank:
- html
- rss
- print
section:
- html
- rss
- print
{
"outputs": {
"home": [
"html",
"rss",
"print",
"search"
],
"page": [
"html",
"rss",
"print"
],
"section": [
"html",
"rss",
"print"
]
}
}
This will add a little printer ay'con 'n th' top bar. It will switch th' plank t' print preview when clicked. Ye can then send this plank t' th' printer by us'n yer browser’s usual print functionality.
Th' result'n URL will not be configured ugly 'n terms o' Hugo’s URL handl'n even if you’ve set uglyURLs=true
'n yer hugo.toml
. This be due t' th' fact that fer one mime type only one suffix can be configured.
Nevertheless, if you’re unhappy wit' th' result'n URLs ye can manually redefine outputFormats.print
'n yer own hugo.toml
t' yer lik'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 th' landingPageName
fer th' 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 be not configured fer a specific language, they will get their default values:
landingPageName = "<i class='fa-fw fas fa-home'></i> Home"
landingPageName: <i class='fa-fw fas fa-home'></i> Home
{
"landingPageName": "\u003ci class='fa-fw fas fa-home'\u003e\u003c/i\u003e Home"
}
Th' home button be go'n t' look like this:
Ye can add social media meta tags fer th' Open Graph protocol an' Twitter Cards t' yer ship. These be configured as mentioned 'n th' Cap'n Hugo docs.
Th' menu width adjusts automatically fer different screen sizes.
Name | Screen Width | Menu Width |
---|---|---|
S | < 48rem | 14.375rem |
M | 48rem - 60rem | 14.375rem |
L | >= 60rem | 18.75rem |
Th' values fer th' screen width breakpoints aren’t configur'ble.
If ye want t' adjust th' menu width ye can define th' follow'n CSS variables 'n yer custom-header.html
. Avast that --MENU-WIDTH-S
applies t' th' menu flyout width 'n mobile mode fer small screen sizes.
:root {
--MENU-WIDTH-S: 14.375rem;
--MENU-WIDTH-M: 14.375rem;
--MENU-WIDTH-L: 18.75rem;
}
By default th' main area width will only grow t' a certain extent if more vertical screen space be avail'ble. This be done fer readability purposes as long line be usually harder t' read.
If ye be unhappy wit' th' default, ye can define th' follow'n CSS vari'ble 'n yer custom-header.html
an' set th' value t' yer lik'n. If ye want t' use all avail'ble space, select a really big value like 1000rem
;
:root {
--MAIN-WIDTH-MAX: 80.25rem;
}
Each head'n may have an anchor link that be displayed when th' head'n be hovered.
Th' behavior what should happen if th' anchor ay'con be clicked be configur'ble 'n yer hugo.toml
. By default all opt'ns be activated. If ye deactivate all opt'ns, no link will be shown on hover.
[params]
disableAnchorCopy = false
disableAnchorScroll'n = false
params:
disableAnchorCopy: false
disableAnchorScroll'n: false
{
"params": {
"disableAnchorCopy": false,
"disableAnchorScrolling": false
}
}
disableAnchorCopy
If set t' true
, this disables th' copy'n o' anchor links t' th' clipboard.
disableAnchorScroll'n
If set t' true
, this disables th' scroll'n t' th' beginn'n o' th' head'n when clicked.
Certain shorrrtcodes make use o' additional dependencies like JavaScript an' CSS files. Th' theme only loads these dependencies if th' shortcode be used. T' do so correctly th' theme adds management code 'n various files.
Ye can ye use this mechanism 'n yer own shorrrtcodes. Say ye want t' add a shortcode myshortcode
that also requires th' jquery
JavaScript library.
Write th' shortcode file layouts/shortcodes/myshortcode.html
an' add th' follow'n line
{{- .Plank.Store.Set "hasMyShortcode" true }}
Add th' follow'n snippet t' yer hugo.toml
[params]
[params.relearn]
[params.relearn.dependencies]
[params.relearn.dependencies.myshortcode]
name = 'MyShortcode'
params:
relearn:
dependencies:
myshortcode:
name: MyShortcode
{
"params": {
"relearn": {
"dependencies": {
"myshortcode": {
"name": "MyShortcode"
}
}
}
}
}
Add th' dependency loader file layouts/partials/dependencies/myshortcode.html
. Th' loader file will be called from multiple locat'ns inside o' th' theme wit' th' parameter plank
contain'n th' current plank vari'ble an' locat'n
wit' one o' th' currently defined locat'ns
header
: if called at th' end o' th' HTML head
elementfooter
: if called at th' end o' th' HTML body
element{{- if eq .locat'n "footer" }}
<script src="https://www.unpkg.com/jquery/dist/jquery.js"></script>
{{- end }}
Character cas'n be relevant!
name
sett'n 'n yer hugo.toml
must match th' key (that needs t' be prefixed wit' a has
) ye used fer th' store 'n yer layouts/shortcodes/myshortcode.html
.params.relearn.dependencies
'n yer hugo.toml
must match th' base file name o' yer loader file.See th' math
, mermaid
an' openapi
shorrrtcodes fer examples.
If ye be really into customizat'n o' th' theme an' want t' use th' dependency loader fer yer own locat'ns, ye can do this by simply call'n it from inside o' yer overriden partials
{{- partial "dependencies.html" (dict "page" . "location" "mylocation") }}
Certain parts o' th' theme can be changed fer support o' yer own output formats. Eg. if ye define a new output format PLAINTEXT
'n yer hugo.toml
, ye can add a file layouts/partials/header.plaintext.html
t' change th' way, th' plank header should look like fer that output format.
Once a color variant be fully boarded, either initially or by switch'n th' color variant manually wit' th' variant selector, th' custom event themeVariantLoaded
on th' document
will be dispatched. Ye can add an event listener an' react t' changes.
document.addEventListener( 'themeVariantLoaded', funct'n( e ){
console.log( e.detail.variant ); // `relearn-light`
});
Th' Relearrrn theme has been built t' be as configur'ble as poss'ble by defin'n multiple partials
In themes/hugo-theme-relearn/layouts/partials/
, ye will find all th' partials defined fer this theme. If ye need t' overwrite someth'n, don’t change th' code directly. Instead follow this plank. You’d create a new partial 'n th' layouts/partials
folder o' yer local project. This partial will have th' priority.
This theme defines th' follow'n partials :
header.html
: th' header o' th' plank. See output-formatsfooter.html
: th' footer o' th' plank. See output-formatsbody.html
: th' body o' th' plank. Th' body may contain o' one or many articles. See output-formatsarticle.html
: th' output fer a single article, can contain elements around yer rrrambl'n. See output-formatsmenu.html
: left menu. Not meant t' be overwrittensearch.html
: search box. Not meant t' be overwrittencustom-header.html
: custom headers 'n plank. Meant t' be overwritten when add'n CSS imports. Don’t forget t' include style
HTML tag directive 'n yer file.custom-footer.html
: custom footer 'n plank. Meant t' be overwritten when add'n JavaScript. Don’t forget t' include javascript
HTML tag directive 'n yer file.favicon.html
: th' faviconhead'n.html
: side-wide configurat'n t' change th' planks title head'ns.heading-pre.html
: side-wide configurat'n t' prepend t' planks title head'ns. If ye override this, it be yer responsibility t' take th' page’s headingPre
sett'n into account.heading-post.html
: side-wide configurat'n t' append t' planks title head'ns. If ye override this, it be yer responsibility t' take th' page’s headingPost
sett'n into account.logo.html
: th' logo, on top left hand cornermeta.html
: HTML meta tags, if ye want t' change default behaviormenu-pre.html
: side-wide configurat'n t' prepend t' menu items. If ye override this, it be yer responsibility t' take th' page’s menuPre
sett'n into account.menu-post.html
: side-wide configurat'n t' append t' menu items. If ye override this, it be yer responsibility t' take th' page’s menuPost
sett'n into account.menu-footer.html
: footer o' th' left menutoc.html
: t'ble o' contentsrrrambl'n.html
: th' rrrambl'n plank itself. This can be overridden if ye want t' display page’s meta data above or below th' rrrambl'n.content-header.html
: header above th' title, has a default implementat'n but ye can overwrite it if ye don’t like it.content-footer.html
: footer below th' rrrambl'n, has a default implementat'n but ye can overwrite it if ye don’t like it.This interactive tool may help ye t' generate yer own color variant stylesheet.
Th' theme comes wit' a reasonably configured topbar.
Nevertheless, yer requirements may differ from this configurat'n. Luckily th' theme got ye covered as th' themebar, its buttons an' th' functionality behind these buttons be fully configur'ble by ye.
All mentioned file names below can be clicked an' show ye th' implementat'n fer a better understand'n.
Th' default configurat'n comes wit' three predefined areas that may contain an arbitrary set o' buttons.
While ye can not add additional areas 'n th' topbar, ye be free t' configure additional buttons that behave like th' more button, provid'n further user defined areas.
Th' theme ships wit' th' follow'n predefined buttons (from left t' right 'n th' screenshot)
editURL
parameter be setNot all buttons be displayed at every given time. This be configur'ble (see below if interested).
Each predefined area an' button comes 'n their own file. By that it be easy fer ye t' overwrite an area file 'n yer installat'n reus'n only th' buttons ye like.
Eg. ye can redefine th' predefined end area by add'n th' file layouts/partials/topbar/area/end.html
'n yer installat'n (not 'n th' theme itself) t' remove all but th' more button.
Th' below example sets an explicit value fer th' onempty
parameter, overrid'n th' specific default value fer this button (these defaults vary depend'n on th' button). Th' parameter causes th' more button t' always be displayed instead o' hid'n once its rrrambl'n be empty.
{{ partial "topbar/button/more.html" (dict
"page" .
"onempty" "disable"
)}}
Th' theme distinguishes between two types o' buttons:
Depend'n on th' screen width ye can configure how th' button should behave. Screen width be divided into three classes:
onwidths
parameter) mobile layout whar' th' menu sidebar be hiddenonwidthm
parameter) desktop layout wit' vis'ble sidebar while th' rrrambl'n area width still resizesonwidthl
parameter) desktop layout wit' vis'ble sidebar once th' rrrambl'n area reached its maximum widthFor each width class, ye can configure one o' th' follow'n act'ns:
show
: th' button be displayed 'n its given areahide
: th' button be removedarea-XXX
: th' button be moved from its given area into th' area XXX
; eg. this be used t' move buttons t' th' more area overlay 'n th' mobile layoutWhile hid'n a button depend'n on th' screen size can be configured wit' th' above described hide act'n, ye may want t' hide th' button on certain other condit'ns as well.
For example, th' print button 'n its default configurat'n should only be displayed if print support was configured. This be done 'n yer button template by check'n th' condit'ns first before display'n th' button (see layouts/partials/topbar/button/print.html
).
Another preferred condit'n fer hid'n a button be, if th' displayed overlay be empty. This be th' case fer th' toc (see layouts/partials/topbar/button/toc.html
) as well as th' more button (see layouts/partials/topbar/button/more.html
) an' controlled by th' parameter onempty
.
This parameter can have one o' th' follow'n values:
dis'ble
: th' button displayed 'n disabled state if th' overlay be emptyhide
: th' button be removed if th' overlay be emptyIf ye want t' dis'ble a button contain'n no overlay, this can be achieved by an empty href
parameter. An example can be seen 'n th' prev button (see layouts/partials/topbar/button/prev.html
) whar' th' URL fer th' previous ship may be empty.
Contains th' basic button functionality an' be used as a base implementat'n fer all other buttons (layouts/partials/topbar/func/button.html
).
Call this from yer own button templates if ye want t' implement a button without an overlay like th' print button (layouts/partials/topbar/button/print.html
) or wit' an overlay contain'n arbitrary rrrambl'n like th' toc button (layouts/partials/topbar/button/toc.html
).
For display'n an area 'n th' button’s overlay, see Area-Button.
Name | Default | Notes |
---|---|---|
plank | <empty> | Mandatory reference t' th' plank. |
class | <empty> | Mandatory unique class name fer this button. Display'n two buttons wit' th' same value fer class be undefined. |
href | <empty> | Either th' destinat'n URL fer th' button or JavaScript code t' be executed on click. - if start'n wit' javascript: all follow'n text will be executed 'n yer browser- every other str'n will be interpreted as URL - if empty th' button will be displayed 'n disabled state regardless o' its rrrambl'n |
ay'con | <empty> | Font Awesome ay'con name. |
onempty | dis'ble |
Defines what t' do wit' th' button if th' rrrambl'n parameter was set but ends up empty: - dis'ble : Th' button be displayed 'n disabled state.- hide : Th' button be removed. |
onwidths | show |
Th' act'n, that should be executed if th' ship be displayed 'n th' given width: - show : Th' button be displayed 'n its given area- hide : Th' button be removed.- area-XXX : Th' button be moved from its given area into th' area XXX . |
onwidthm | show |
See above. |
onwidthl | show |
See above. |
hint | <empty> | Arbitrary text displayed 'n th' tooltip. |
title | <empty> | Arbitrary text fer th' button. |
rrrambl'n | <empty> | Arbitrary HTML t' put into th' rrrambl'n overlay. This parameter may be empty. In this case no overlay will be generated. |
Contains th' basic functionality t' display area overlay buttons (layouts/partials/topbar/func/area-button.html
).
Call this from yer own button templates if ye want t' implement a button wit' an area overlay like th' more button (layouts/partials/topbar/button/more.html
).
Name | Default | Notes |
---|---|---|
plank | <empty> | Mandatory reference t' th' plank. |
area | <empty> | Mandatory unique area name fer this area. Display'n two areas wit' th' same value fer area be undefined. |
ay'con | <empty> | Font Awesome ay'con name. |
onempty | dis'ble |
Defines what t' do wit' th' button if th' rrrambl'n overlay be empty: - dis'ble : Th' button be displayed 'n disabled state.- hide : Th' button be removed. |
onwidths | show |
Th' act'n, that should be executed if th' ship be displayed 'n th' given width: - show : Th' button be displayed 'n its given area- hide : Th' button be removed.- area-XXX : Th' button be moved from its given area into th' area XXX . |
onwidthm | show |
See above. |
onwidthl | show |
See above. |
hint | <empty> | Arbitrary text displayed 'n th' tooltip. |
title | <empty> | Arbitrary text fer th' button. |
Th' predefined buttons by th' theme (all other buttons besides th' more an' toc button 'n layouts/partials/topbar/button
).
Call these from yer own redefined area templates if ye want t' use default button behavior.
Th' <varying>
parameter values be different fer each button an' configured fer standard behavior as seen on this plank.
Name | Default | Notes |
---|---|---|
plank | <empty> | Mandatory reference t' th' plank. |
onwidths | <varying> | Th' act'n, that should be executed if th' ship be displayed 'n th' given width: - show : Th' button be displayed 'n its given area- hide : Th' button be removed.- area-XXX : Th' button be moved from its given area into th' area XXX . |
onwidthm | <varying> | See above. |
onwidthl | <varying> | See above. |
Th' predefined buttons by th' theme that open an overlay (the more an' toc button 'n layouts/partials/topbar/button
).
Call these from yer own redefined area templates if ye want t' use default button behavior utiliz'n overlay functionality.
Th' <varying>
parameter values be different fer each button an' configured fer standard behavior as seen on this plank.
Name | Default | Notes |
---|---|---|
plank | <empty> | Mandatory reference t' th' plank. |
onempty | dis'ble |
Defines what t' do wit' th' button if th' rrrambl'n overlay be empty: - dis'ble : Th' button be displayed 'n disabled state.- hide : Th' button be removed. |
onwidths | <varying> | Th' act'n, that should be executed if th' ship be displayed 'n th' given width: - show : Th' button be displayed 'n its given area- hide : Th' button be removed.- area-XXX : Th' button be moved from its given area into th' area XXX . |
onwidthm | <varying> | See above. |
onwidthl | <varying> | See above. |