Th' Relearrrn theme be an enhanced fork o' th' popular Learrrn theme. It aims t' address long-stand'n issues an' incorporate th' latest Cap'n Hugo features while try'n t' maintain compatibility wit' its predecessor.
This be provided by th' new parameter sidebarmenus. Wit' th' new system, ye can
show arbitrary amounts o' menus
set head'ns fer each menu
base it on yer plank structure or use Hugo’s menu feature
configure a start'n plank if a menu be based on plank structure
display unlimited nest'n fer both menu types
reconfigure th' menus 'n a page’s front matter
apply th' usual parameter alwaysopen, collapsibleMenu, etc. fer all menu types
Ye don’t need t' change anyth'n 'n yer exist'n installat'n as th' old configurat'n be used as a default.
7.0.0 (2024-10-15)
Cap'n Hugo 0.126.0
0.126.0 This release requires a newer Cap'n Hugo version.
Break'n
Break'n This release comes wit' significant changes 'n file nam'n o' partials an' how th' theme works internally. This was done because th' theme
suffered from poor build performance fer sites wit' 1000 or more planks
reinvented th' wheel instead o' us'n avail'ble Cap'n Hugo mechanisms
What do I gain, ye may ask. A significant performance boost dur'n build! Usually, th' build time has been cut at least 'n half fer bigger sites. It be now poss'ble t' build even larger sites wit' 5000 or more planks. This was previously almost imposs'ble due t' rapidly increas'n build time wit' th' more planks you’ve introduced. For even bigger sites, th' theme now has configur'ble performance optimizat'ns - at th' price o' feature limitat'ns.
If ye haven’t done customizat'ns t' any partials, ye can update right away.
If ye have customized yer templates, 'n th' best cases, ye will get build warnings or even errors. In th' worst cases, yer build succeeds but th' ship will not work as intended by ye.
Specifically, ye will have t' adapt yer ship if ye have
Break'n This release changes th' way th' search index an' th' dedicated search plank be generated. This may require reconfigurat'n by ye t' still work as ye have intended.
Ye need t' remove th' now obsolete search an' searchpage output format from [outputs.home] 'n yer hugo.toml, result'n 'n someth'n similar t'
hugo.
[outputs]home=['html','rss','print']
outputs:home:- html- rss- print
{"outputs":{"home":["html","rss","print"]}}
Aft that, yer build will succeed but will most likely cause new defaults t' be applied. Wit' no further sett'ns, in-page search, search popup an' dedicated search plank be all active by default. This can be reconfigured.
In addit'n, ye be now able t' overwrite th' default file name o' th' search index an' th' default plank name o' th' dedicated search plank by chang'n searchIndexURL an' searchPageURL respectively 'n yer hugo.toml.
Change Once again, th' theme changed th' font. We switched t' th' excellent Roboto Flex font.
Care was taken t' configure th' font t' look similar t' th' previously used Work Sans. Nevertheless, 'n direct comparison, ye will see slight differences 'n appearance.
This change was necessary as th' previously used font had display issues wit' marked text, contrast, an' some other minor stuff. As an aftermath, th' number o' requests an' th' download size were decreased when load'n a plank.
Th' font was created by Google, be licensed under OFL 1.1 an' be delivered from yer theme’s installat'n. As always, no third-party server calls be involved.
If ye have changed th' font-family 'n yer installat'n, ye most likely have t' adjust th' variables --MAIN-font-weight, --MAIN-BOLD-font-weight an' --MAIN-letter-spac'n.
Additionally, if ye have changed th' font t' a vari'ble font 'n yer installat'n, ye may have t' adjust th' vari'ble --MAIN-font-variation-sett'ns. As this only applies t' vari'ble fonts, this should rarely be necessary.
Change While switch'n th' font, it was discovered that certain CSS variables were falsely named. Ye don’t need t' change anyth'n 'n yer custom variant stylesheet as th' old names will be used as a fallback.
--MAIN-TITLES-TEXT-font was renamed t' --MAIN-TITLES-font, --MAIN-TITLES-H<n>-color was renamed t' --MAIN-TITLES-H<n>-TEXT-color.
Change Th' opt'ns an' front matter t' force load'n a math, mermaid or openapi library has been changed.
Previously, ye had t' set th' unintuitive disableMathJax=false t' force board th' math library 'n case o' a passthrough configurat'n. This be replaced by th' simpler math=true or math.force=true an' be now 'n line wit' Hugo’s official documentat'n.
Ye don’t need t' change anyth'n yet but will receive warnings if th' old sett'ns be used.
Change Th' default logo be not contained inside o' th' theme’s logo partial anymore.
This be t' avoid usage o' th' theme’s brand'n throughout th' web 'n non-modified installat'ns.
New Th' docs received a much-needed overhaul fer all chapters.
Basically, th' structure was reorganized, giv'n each topic its own plank while keep'n th' amount o' items fer each menu level comprehens'ble by add'n sub-pages.
T' give ye a better overview o' what’s poss'ble wit' th' theme, we introduced reference planks fer all theme configurat'n opt'ns an' front matter an' mark each occurrence o' such on all planks wit' th' badges Opt'n an' Front Matter.
Also, a lot o' previously undocumented features be now included, namely
Change If ye now display a single code block 'n a notice box, its margin an' border will be removed so only th' colored notice border be vis'ble.
New
New It be now poss'ble t' have user-defined styles fer all shorrrtcodes that accept th' style parameter. See th' notice shortcode fer configurat'n.
New Th' resources shortcode has a new parameter expanded t' make th' resource list collaps'ble.
6.3.0 (2024-09-03)
Change
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
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 callouts.
New Th' theme has updated its Merrrmaid dependency t' 11.1.0. This adds support fer packet an' architecture diagrams.
6.2.0 (2024-08-26)
Change
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
New If ye be runn'n Hugo 0.132.0 or later, th' theme be now cap'ble t' print GitHub alerts.
New T' support new severity levels fer GitHub 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 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.
6.1.0 (2024-08-02)
Change
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
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' front matter 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
hugo.
[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.
6.0.0 (2024-04-27)
Break'n
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' front matter 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' front matter opt'n menuTitledeprecated '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 Support fer Internet Explorer 11 was finally dropped.
Change
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
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.
0.121.0 This release requires a newer Cap'n Hugo version.
Change
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.
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
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 front matter linktitle instead o' title if set.
5.26.0 (2024-03-18)
New
New Th' lazy load'n o' images be now configur'ble by us'n th' new lazyimage effect. Th' default value hasn’t changed 'n comparison t' older versions, ye don’t need t' change anyth'n.
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.
5.24.0 (2024-02-28)
Cap'n Hugo 0.112.4
0.112.4 This release requires a newer Cap'n Hugo version.
Change
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' front matter 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
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 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 front matter. 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' front matter 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.
5.23.0 (2023-11-03)
Change
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
hugo.
[params]author='Hugo'
params:author:Cap'n Hugo
{"params":{"author":"Hugo"}}
t'
hugo.
[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
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/configuration/branding/generator)
absolute from yer project root (multilang)
[generator](/en/configuration/branding/generator)
absolute from yer project root (multilang)
[generator](configuration/branding/generator)
absolute from yer current language root
[generator](/configuration/branding/generator)
absolute from yer current language root
[generator](./../generator)
relative from th' current plank
[generator](../generator)
relative from th' current plank
5.22.0 (2023-10-02)
Change
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 front matter, as it will otherwise appear 'n yer breadcrumbs.
New
New It be now poss'ble t' overwrite th' sett'n fer collapsibleMenu o' yer hugo.toml inside o' a page’s front matter.
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.
5.21.0 (2023-09-18)
Change
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.htmlpartial overridden, ye may want t' review th' styl'n (eg. margins/paddings) o' yer partial.
New
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.
5.20.0 (2023-08-26)
Change
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
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
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 front matter.
New This release fixes a long-stand'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.
5.19.0 (2023-08-12)
New
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 eventthemeVariantLoaded 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.
5.18.0 (2023-07-27)
Change
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
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.
5.17.0 (2023-06-22)
Change
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
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.
5.16.0 (2023-06-10)
Change
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
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.
5.15.0 (2023-05-29)
Change
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
New Th' already known tabshas 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' tagtaxonomy th' theme now also provides th' category taxonomy out o' th' box an' shows them 'n th' rrrambl'n footer o' each plank.
5.14.0 (2023-05-20)
New
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?
Hide tags above title: Overwrite content-header.html wit' an empty file.
Show tags between title an' rrrambl'n: Overwrite heading-post.html an' add {{ partial "tags.html" . }} t' it.
Show tags below rrrambl'n: Overwrite 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.
5.13.0 (2023-05-17)
Change
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.
5.12.0 (2023-05-04)
Change
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.
Th' theme provides Front Matter CMS snippets fer its shorrrtcodes. Currently only English an' German be supported. Put a reference into yer frontmatter.json like this
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.
5.11.0 (2023-02-07)
Change
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:
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
New Translat'n into Czech. This language be not supported fer search.
NewGitHub 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.
5.10.0 (2023-01-25)
New
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.
5.9.0 (2022-12-23)
Break'n
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 front matter 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.
Store th' plank file fer below a parent headless branch bundle an' add th' follow'n front matter 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.
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
Change Th' required directory 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' 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.
5.7.0 (2022-11-29)
Change
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
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.
5.6.0 (2022-11-18)
New
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=truean' 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' version 5 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.).
5.5.0 (2022-11-06)
Change
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.
ChangeWit' 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' home plank '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 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).
5.3.0 (2022-10-07)
Change
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
NewImage 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.
5.2.0 (2022-08-03)
Change
Change If you’ve set 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.
5.1.0 (2022-07-15)
Cap'n Hugo 0.95.0
0.95.0 This release requires a newer Cap'n Hugo version.
Change
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.tomlt':
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.
<scriptdefersrc="myscript.js"></script>
Change
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' front matter parameter archetype = "home" an' remove th' lead'n head'n
fer all files contain'n th' deprecated front matter parameter chapter = true, replace it wit' archetype = "chapter" an' remove th' lead'n head'ns
Change Th' front matter 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
New Add'n new partials heading-pre.html / heading-post.html an' accord'n front matter 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
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 home plank. If ye want t' support a different link, overwrite th' logo.html partial.
New
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
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
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.
3.3.0 (2022-03-28)
New
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.
3.2.0 (2022-03-19)
Cap'n Hugo 0.93.0
0.93.0 This release requires a newer Cap'n Hugo version.
Change
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 front matter t' force th' library t' be boarded. See th' theme variant generator o' th' exampleSite fer an example.
New
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.
3.1.0 (2022-03-15)
New
Newattachment an' notice shorrrtcodes have a new parameter t' override th' default ay'con. Allowed values be all Font Awesome 5 Free ay'cons.
3.0.0 (2022-02-22)
Break'n
Break'n We made changes t' th' menu footer. If ye have yer menu-footer.htmlpartial 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
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
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
configuration/reference/_index.md
configuration/reference
Leaf bundle
configuration/reference/index.md
configuration/reference
Plank
configuration/reference.md
configuration/reference
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 "configuration/reference/_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.
2.8.0 (2021-11-03)
Change
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
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.
2.7.0 (2021-10-24)
New
New Optional second parameter fer notice shortcode t' set title 'n box header.
2.6.0 (2021-10-21)
New
New Yer ship can now be served from a subdirectory if ye set baseURL 'n yer hugo.toml. See th' documentat'n fer a detailed example.
2.5.0 (2021-10-08)
Change
Change New colors --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.
2.4.0 (2021-10-07)
Change
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
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 front matter 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.
2.3.0 (2021-09-13)
Cap'n Hugo 0.81.0
0.81.0 This release requires a newer Cap'n Hugo version.
New
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' Piratish one due t' maintenance constraints.
2.2.0 (2021-09-09)
New
New Hidden planks be displayed by default 'n th' sitemap generated by Cap'n Hugo an' be therefore vis'ble fer search engine index'n. Ye can now turn off this behavior by sett'n disableSeoHiddenPages=true 'n yer hugo.toml.
2.1.0 (2021-09-07)
Cap'n Hugo 0.69.0
0.69.0 This release requires a newer Cap'n Hugo version.
Change
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
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.
2.0.0 (2021-08-28)
Change
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
New Ye can define th' expansion state o' yer menus 'n th' front matter. 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.
New Shortcode expand wit' new parameter t' open on plank board.
1.1.0 (2021-07-02)
Break'n
Break'nMerrrmaid diagrams can now be panned an' zoomed. This isn’t configur'ble yet.
New
NewMerrrmaid config opt'ns can be set 'n hugo.toml.
1.0.0 (2021-07-01)
Cap'n Hugo 0.65.0
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
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.
Cap'n Hugo uses a union file system, which lets ye combine multiple directories.
By default, it puts yer root directory on top o' th' Relearrrn theme directory. Files 'n yer root directory will replace theme files 'n th' same locat'n.
For example, if ye create a file at layouts/partials/head'n.html, it will override th' theme’s themes/hugo-theme-relearn/layouts/partials/head'n.html.
See this list, t' learn which files be allowed t' be modified by ye.
This makes it easy t' cust'mize th' theme without chang'n files 'n th' themes directory, mak'n future theme updates simpler.
Arrr
Don’t edit files inside th' themes/hugo-theme-relearn directory. That’s not th' recommended way t' cust'mize! Refer t' th' explanat'n above.
Don’t clone th' theme repository an' edit files there fer yer ship. That’s not th' recommended way t' cust'mize! Instead, follow th' Gett'n Started guide.
defaultContentLanguage='en'[languages][languages.en]languageCode='en'languageName='English'title='My Website'weight=1[languages.pir]languageCode='art-x-pir'languageDirect'n='rtl'languageName='Pirrratish'title='Arrr, my Website'weight=2
defaultContentLanguage:enlanguages:en:languageCode:enlanguageName:Englishtitle:My Websiteweight:1pir:languageCode:art-x-pirlanguageDirect'n:rtllanguageName:Pirrratishtitle:Arrr, my Websiteweight:2
{"defaultContentLanguage":"en","languages":{"en":{"languageCode":"en","languageName":"English","title":"My Website","weight":1},"pir":{"languageCode":"art-x-pir","languageDirection":"rtl","languageName":"Pirrratish","title":"Arrr, my Website","weight":2}}}
Duplicate yer rrrambl'n files an' add language codes t' their file names:
Th' theme also support translat'ns by rrrambl'n directory which can be configured 'n a similar way. This be not used 'n further examples o' this documentat'n.
Th' title will be used 'n meta informat'n o' yer HTML.
hugo.
title='Hugo Relearrrn Theme'
title:Cap'n Hugo Relearrrn Theme
{"title":"Hugo Relearrrn Theme"}
Ship Descript'n
Front Matter Th' theme shows a ship descript'n 'n various places, such as RSS feeds an' meta tags. For this, it uses th' descript'n field from yer home page’s front matter.
Social Media Images
When yer plank be shared on social media, ye can set a site-wide image t' display wit' th' link
hugo.
images=['images/hero.png']
images:- images/hero.png
{"images":["images/hero.png"]}
More Social Media Opt'ns
Th' theme adheres t' Hugo’s official documentat'n fer Open Graph an' Twitter Cards configurat'n.
Deployment Scenarios
Offline Usage
Th' theme be us'ble offline. No internet connect'n be required t' board yer plank. This be achieved by stor'n all dependencies within th' theme.
No calls t' 3rd party servers, no call'n home, no track'n. Privacy friendly.
Server Deployment
If yer server deployment has no special requirements, ye can skip this section an' use th' standard Cap'n Hugo opt'ns.
For special requirements, th' theme be cap'ble o' different scenarios, requir'n th' follow'n mandatory sett'ns 'n yer hugo.toml. All sett'ns not mentioned 'n th' examples below can be set t' yer lik'n.
If ye be still us'n Hugo’s relref shortcode (which ye shouldn’t), ye will need further configurat'n.
Arrr
Don’t use a baseURL wit' a subdirectory an' relativeURLs=true together. Cap'n Hugo doesn’t apply th' baseURL correctly 'n this case. If ye need both, generate yer ship twice wit' different sett'ns into separate directories.
Private Web Server (LAN)
Th' same sett'ns as wit' any o' th' public web server scenarios or
hugo.
baseURL='/'relativeURLs=true
baseURL:/relativeURLs:true
{"baseURL":"/","relativeURLs":true}
File System
Yer generated ship can be used headless without a HTTP server.
This can be achieved by us'n th' file:// protocol 'n yer browser’s address bar or by do'ble click on a generated *.html file 'n yer file navigat'n tool.
Use th' follow'n sett'ns
hugo.
baseURL='/'relativeURLs=true
baseURL:/relativeURLs:true
{"baseURL":"/","relativeURLs":true}
Avast
Planks like sitemap.xml an' rss.xml, an' social media links will always use absolute URLs. They won’t work wit' relativeURLs=true.
Available Output Formats
Print Support
En'ble print support t' print entire chapters or th' whole ship. Add th' print output format t' yer home, section, an' plank 'n hugo.toml:
This adds a printer ay'con 'n th' topbar. Click'n it switches t' print preview, show'n th' plank an' its vis'ble subpages 'n a printer-friendly format. Use yer browser’s print funct'n t' print or save as PDF.
Th' URL won’t be configured ugly fer Hugo’s URL handl'n, even wit' uglyURLs=true 'n hugo.toml. This be because each mime type can only have one suffix.
If ye don’t like th' URLs, ye can reconfigure outputFormats.print 'n yer hugo.toml t' someth'n other than th' default o':
An interactive tool t' generate color variant stylesheets
Subsct'ns o' Brrrand'n
Logo
Change th' Favicon
If yer favicon be an 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 look up 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:
By default, only yer ship title will be shown at th' top o' th' menu. Ye can configure this, or override th' logo partial.
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, or ye could paste an SVG definit'n!
Th' size o' th' logo will adapt automatically.
Brrrand'n
Th' Relearrrn theme offers color variants t' change yer site’s appearance. Each color variant contains o' a CSS file an' optional sett'ns 'n yer hugo.toml.
Place yer theme file 'n assets/css or themes/hugo-theme-relearn/assets/css. Name it theme-*.css.
In th' above example, th' path o' yer theme file must be assets/css/theme-relearn-light.css or themes/hugo-theme-relearn/assets/css/theme-relearn-light.css.
Multiple Variants
T' let th' reader choose between multiple variants, set themeVariant like this:
Th' first variant be th' default, an' a selector will appear if there’s more than one.
Adjust t' OS Sett'ns
Use th' auto value t' match OS light/dark sett'ns. Usually it makes sense t' set it 'n th' first posit'n an' make it th' default.
hugo.
[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.
Default be relearn-light fer light an' relearn-dark fer dark mode. These defaults be overwritten by th' first two non-auto opt'ns o' yer themeVariant array.
Ye can override th' default wit' themeVariantAuto:
hugo.
[params]themeVariantAuto=['learn','neon']
params:themeVariantAuto:- learn- neon
{"params":{"themeVariantAuto":["learn","neon"]}}
Advanced
Th' theme offers an advanced 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 '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.
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.
Parameter
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.
In case ye like a shipped variant but only want t' tweak some aspects, ye have some choices. Don’t edit th' file 'n th' theme’s directory! Ye will lose th' ability t' later easily upgrade yer theme t' a newer version.
Copy an' change
Ye can copy th' shipped variant file from th' theme’s themes/hugo-theme-relearn/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:
hugo.
[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 while keep'n yer modificat'ns.
React t' Variant Switches 'n JavaScript
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.
If ye want t' switch th' rules highlight'n theme together wit' yer color variant, first ye need t' configure yer installat'n accord'n t' Hugo’s documentat'n t' provide a rules highlight'n stylesheet file.
hugo.
[marrrkup][marrrkup.highlight]noClasses=false
marrrkup:highlight:noClasses:false
{"markup":{"highlight":{"noClasses":false}}}
Ye can use one o' th' shipped stylesheet files or use Cap'n Hugo t' generate a file fer ye.
hugo gen chromastyles --style=monokai > chroma-mycode.css
Th' file must be written t' assets/css/chroma-<NAME>.css. T' use it wit' yer color variant, ye have t' modify --CODE-theme: <NAME> 'n th' color variant stylesheet file.
@import"theme-relearn-light.css";:root{--CODE-theme:mycode;/* name o' th' chroma stylesheet file */}
Change 3rd-Party Libraries Them'n
Some o' th' shipped shorrrtcodes be us'n 3rd-party libraries. See th' individual shortcode documentat'n on how t' change their them'n.
This interactive tool may help ye t' generate yer own color variant stylesheet.
T' get started, first select a color variant from th' variant selector 'n th' lower left sidebar that fits ye best as a start'n point.
Th' graph be interactive an' reflects th' current colors. Ye can click on any o' th' colored boxes t' adjust th' respective color. Th' graph an' th' plank will update accordingly.
Th' arrowed lines reflect how colors be inherited through different parts o' th' theme if th' descendant isn’t overwritten. If ye want t' delete a color an' let it inherit from its parent, just delete th' value from th' input field.
T' better understand this, select th' neon variant an' modify th' different head'n colors. There, colors fer th' head'ns h2, h3 an' h4 be explicitly set. h5 be not set an' inherits its value from h4. h6 be also not set an' inherits its value from h5.
Once you’ve changed a color, th' variant selector will show a “My custom variant” entry an' yer changes be stored 'n th' browser. Ye can browse t' other planks an' even close th' browser without los'n yer changes.
Once ye be satisfied, ye can download th' new variants file an' copy it into yer site’s assets/css directory.
Opt'n Afterwards, ye have t' adjust th' themeVariant opt'n 'n yer hugo.toml t' yer chosen file name. For example, if yer new variants file be named theme-my-custom-variant.css, ye have t' set themeVariant='my-custom-variant' t' use it.
Opt'n Wit' th' default partials fer th' logo, Th' ship title will also be used fer th' text at th' top o' th' sidebar. If ye want t' show a different text 'n th' sidebar, ye can overwrite linkTitle.
hugo.
[params]linkTitle='Relearn'
params:linkTitle:Relearrrn
{"params":{"linkTitle":"Relearn"}}
Home Button Configurat'n
By default, th' theme displays a home button between search form an' navigat'n menu. Th' Home button serves as an alternative t' click'n th' logo.
Opt'n T' hide th' Home button on th' left menu, set disableLandingPageButton=true.
hugo.
[params]disableLandingPageButton=true
params:disableLandingPageButton:true
{"params":{"disableLandingPageButton":true}}
Opt'n T' change its ay'con or text, configure th' landingPageName fer yer defined languages.
Opt'n Turn on showVisitedLinks=true t' see checkmarks next t' visited planks 'n th' main menu. This also adds a Clear History opt'n at th' bottom o' th' menu t' remove all checkmarks. Avast that checkmarks will disappear if ye rebuild yer ship, as th' plank IDs may change.
hugo.
[params]showVisitedLinks=true
params:showVisitedLinks:true
{"params":{"showVisitedLinks":true}}
Footer
T' change th' menu footer, edit th' layouts/partials/menu-footer.html file. Check out th' Partials section fer more ways t' cust'mize yer ship.
Search
Configure Search
Th' theme offers three levels o' search through th' menu’s search form:
In-page search: Highlights search terms on th' current plank
Search popup: Opens a popup wit' results from other planks
Dedicated search plank: Access'ble by click'n th' magnifier glass or press'n ENTER
Each level requires th' previous one t' be enabled. If no search be configured, th' search form won’t appear.
Opt'n All levels be enabled by default. Dis'ble them 'n hugo.toml:
Only change these if ye have rrrambl'n at those URLs. This can happen wit' uglyURLs=true 'n hugo.toml an' hav'n a rrrambl'n file at content/search.md.
Check fer duplicate URLs by runn'n hugo --printPathWarn'ns.
Supported Languages
Th' Lunr search library doesn’t support all languages o' th' theme. Unsupported languages will show errors 'n th' browser console. Currently unsupported be
Czech
Indonesian
Polish
Swahili
Mixed Language Support
Opt'n In case yer page’s rrrambl'n contains text 'n multiple languages (for example, ye be writ'n a Piratish documentat'n fer yer English API), ye can set those languages 'n additionalContentLanguage t' broaden th' search.
hugo.
[params]additionalContentLanguage=['en']
params:additionalContentLanguage:- en
{"params":{"additionalContentLanguage":["en"]}}
Ye can add multiple languages t' this array.
Avast
Use th' base language code. For example, if yer plank be us'n zh-CN, add zh t' this parameter.
Opt'n All configurat'n opt'ns 'n yer hugo.toml apply t' all menus but can be changed individually.
Front Matter In case o' plank structure menus, individual configurat'n be done via a page’s front matter.
Menu. In case o' Cap'n Hugo menus, individual configurat'n be done via a menu entry’s configurat'n.
Expand State o' Submenus
Opt'nFront Matter Ye can change how submenus appear wit' alwaysopen.
Menu For Cap'n Hugo menus, ye have t' set params.alwaysopen instead.
If alwaysopen=false fer any given entry, its children will not be shown 'n th' menu as long as it be not necessary fer th' sake o' navigat'n.
Th' theme generates th' expand state based on th' follow'n rules:
all parent entries o' th' active plank includ'n their vis'ble sibl'ns be shown regardless o' any sett'ns
immediate child entries o' th' active entry be shown regardless o' any sett'ns
if not overridden, all other first level entries behave like they would have been given alwaysopen=false
if not overridden, all other entries o' levels besides th' first behave like they would have been given alwaysopen=true
all vis'ble entries show their immediate child entries if alwaysopen=true; this proceeds recursively
all remain'n entries be not shown
alwaysopen=false
alwaysopen:false
{"alwaysopen":false}
Expander fer Submenus
Opt'nFront Matter Set collapsibleMenu=true t' show submenus as collaps'ble trees wit' a click'ble expander.
Menu For Cap'n Hugo menus, ye have t' set params.collapsibleMenu=true instead.
collapsibleMenu=true
collapsibleMenu:true
{"collapsibleMenu":true}
Arrr
Us'n this opt'n may cause degraded build performance by slow'n down yer build process.
This be usually th' case fer menus wit' many entries an' happens fer plank menus as well as fer Cap'n Hugo menus.
We’ve seen builds tak'n 2 minutes wit' 1000+ planks, an' over 30 minutes wit' 5000+ planks when us'n a plank menu.
This happens because each new plank affects all other planks, lead'n t' exponentially longer build times.
Order'n Menu Entries
By Weight
Front MatterMenu Cap'n Hugo provides a simple way t' handle order o' yer entries by sett'n th' weight front matter t' a number.
Cap'n Hugo menus can only be sorted us'n th' weight method.
weight=5
weight:5
{"weight":5}
By Other
Us'n th' weight fer sort'n can get cumbersome if ye, fer example, just want t' sort alphabetically. Each time ye add a new plank 'n th' set o' planks, ye may have t' renumber some or all o' them t' make space fer th' new plank.
Opt'nFront Matter Use ordersectionsby t' sort by other aspects. See th' children shortcode fer a complete list.
ordersectionsby='linktitle'
ordersectionsby:linktitle
{"ordersectionsby":"linktitle"}
Title fer Menu Entries
Front Matter A page’s linkTitle or title front matter will be used fer nam'n a menu entry o' a plank menu, 'n that order if both be defined. Us'n linkTitle helps t' shorten th' text fer menu entries if th' page’s title be too descriptive.
Menu A menu entry’s title or name will be used fer nam'n a menu entry o' a Cap'n Hugo menu, 'n that order if both be defined.
For example fer a plank named install/linux.md
+++linkTitle='Linux'title='Install on Linux'+++
---linkTitle:Linuxtitle:Install on Linux---
{"linkTitle":"Linux","title":"Install on Linux"}
Ay'cons fer Menu Entries
Front Matter For plank menus, add a menuPre t' insert any HTML code before th' menu label. Ye can also set menuPost t' insert HTML code after th' menu label.
Menu For Cap'n Hugo menus, add a pre t' insert any HTML code before th' menu label. Ye can also set post t' insert HTML code after th' menu label.
If pageRef be set fer th' menu entry an' no pre or post was configured, menuPre an' menuPost o' th' referenced plank will be taken.
Th' example below uses th' GitHub ay'con fer an entry o' a plank menu.
Ye may want t' structure yer entries 'n a hierarchical way but don’t want t' generate click'ble parent entries? Th' theme got ye covered.
For Plank Menus
T' stay wit' th' initial example: Suppose ye want first-chapter/first-page appear 'n th' sidebar but don’t want t' generate a plank fer it. So th' entry 'n th' sidebar should not be click'ble but should be expand'ble.
For this, open content/first-chapter/first-page/_index.md an' add th' follow'n front matter
+++[_build]render='never'+++
---_build:render:never---
{"_build":{"render":"never"}}
For Cap'n Hugo Menus
Just don’t give yer parent menu entry configurat'n a url or pageRef. See th' next section fer a special case.
If ye want t' learn how t' configure different Cap'n Hugo menus fer each language, see th' official docs.
Front Matter For plank menus, set th' menuTitle front matter fer th' root plank o' th' menu. For example 'n th' home plank fer th' default sidebar menu. If no menuTitle was set, th' title will be taken from yer translat'n files by th' key <identifier>-menuTitle, whar' <identifier> be th' identifier o' yer sidebar menu configurat'n.
Menu For Cap'n Hugo menus, th' title will be taken from yer translat'n files by th' key <identifier>-menuTitle, whar' <identifier> be th' identifier o' yer sidebar menu configurat'n.
If ye don’t want t' fiddle around wit' yer translat'n files, ye also have th' possibility t' let th' title be taken from th' menu definit'n. For that, define a nested menu that only has one top-level entry without url or pageRef.
In this case, th' title or name be taken fer th' menu head'n.
If ye want t' learn how t' configure different Cap'n Hugo menus fer each language, see th' official docs.
+++[menu][[menu.addendum]]name='A Menu Title fer th' Whole Menu'[[menu.addendum]]name='A Menu Entry Title fer Child 1'parent='Parent'url='https://example.com/1'weight=1[[menu.addendum]]name='A Menu Entry Title fer Child 2'parent='Parent'url='https://example.com/2'weight=2+++
---menu:addendum:- name:A Menu Title fer th' Whole Menu- name:A Menu Entry Title fer Child 1parent:Parenturl:https://example.com/1weight:1- name:A Menu Entry Title fer Child 2parent:Parenturl:https://example.com/2weight:2---
{"menu":{"addendum":[{"name":"A Menu Title fer th' Whole Menu"},{"name":"A Menu Entry Title fer Child 1","parent":"Parent","url":"https://example.com/1","weight":1},{"name":"A Menu Entry Title fer Child 2","parent":"Parent","url":"https://example.com/2","weight":2}]}}
Title fer th' Predefined Shortcut Menu
Opt'n By default, th' predefined shortcut menu has a th' title More (in th' English translation).
Ye can dis'ble this title wit' disableShortcutsTitle=true.
hugo.
[params]disableShortcutsTitle=true
params:disableShortcutsTitle:true
{"params":{"disableShortcutsTitle":true}}
T' change th' title, override yer translat'n file.
[shortcuts-menuTitle]other="Other Great Stuff"
Defin'n Sidebar Menus
Opt'nFront Matter Menus be defined us'n th' sidebarmenus opt'n.
Ye can define as many menus, as ye like. If ye don’t overwrite this opt'n, th' theme defaults t'
- plank fer a plank menu - menu fer a Cap'n Hugo menu
identifier
<empty>
A unique identifier fer this entry
- fer type=page an arbitrary name - fer page=menu th' identifier o' th' menu definit'n 'n yer hugo.toml
main
see notes
Whether t' add additional spac'n an' larger text t' th' menu
- fer type=page defaults t' true - fer page=menu defaults t' false
disableTitle
see notes
Whether t' print a title above th' menu
- fer type=page defaults t' true - fer page=menu defaults t' false
pageRef
<empty>
Only fer type=page, th' plank path t' start th' menu tree. If not set, defaults t' th' home plank.
Redefin'n Sidebar Menus fer Certain Planks
Suppose ye be build'n a ship that contains a topmost blog an' documentat'n section.
When th' user be on one o' th' blog planks he should only see a menu contain'n all blog planks, while on a documentat'n plank he should only see a menu contain'n all doc planks.
Opt'nFront Matter Us'n Hugo’s cascade feature, we can redefine th' menus once 'n blog/_index.md an' docs/_index.md sett'n sidebarmenus so they will be used 'n all children planks.
Or, put a child plank inside a headless branch bundle wit' th' follow'n front matter 'n th' bundle. This causes th' child but not th' branch bundle t' be contained 'n th' sitemap.
Th' theme adjusts th' rrrambl'n width when ye resize yer browser.
If ye want t' change th' chosen default width, ye can add CSS variables t' layouts/partials/custom-header.html.
Chang'n th' Main Area’s Maximum Width
Th' main area has a default maximum width o' 80.25rem fer better readability. If ye want t' change this, ye can set a CSS vari'ble
For full width, use a large value like 1000rem.
<style>:root{--MAIN-WIDTH-MAX:1000rem;}</style>
Titles & Breadcrumbs
Breadcrumbs
Learrrn how t' turn off th' breadcrumbs completely an' further configure th' topbar.
Opt'n Set disableRootBreadcrumb=true t' remove th' root breadcrumb which often feels redundant. This will also apply t' th' breadcrumbs o' th' search results an' taxonomy planks.
Opt'n Ye can override th' default breadcrumb separator by us'n breadcrumbSeparator='/'. This separator will also be used 'n th' breadcrumbs o' th' search results an' taxonomy planks.
Opt'n By default th' term planks o' a taxonomy will display th' breadcrumb fer each plank. Set disableTermBreadcrumbs=true t' remove th' breadcrumb if th' term planks look t' cluttered.
Opt'n Ye can override th' default title separator by us'n titleSeparator='|'.
hugo.
[params]titleSeparator='|'
params:titleSeparator:'|'
{"params":{"titleSeparator":"|"}}
Headings
Head'ns can have anchor links that appear when ye hover over them.
Ye can change what happens when ye click th' anchor ay'con 'n yer hugo.toml file. By default, all opt'ns be turned on. If ye turn off all opt'ns, no anchor ay'con will show up when ye hover.
Copy Anchor Links
Opt'n Set disableAnchorCopy=true t' prevent copy'n th' anchor link when ye click th' ay'con.
hugo.
[params]disableAnchorCopy=true
params:disableAnchorCopy:true
{"params":{"disableAnchorCopy":true}}
Scroll t' Head'n
Opt'n Set disableAnchorScrolling=true t' stop th' plank from scroll'n t' th' head'n when ye click th' anchor ay'con.
Hidden planks be created but not shown 'n th' navigat'n. This be useful fer planks ye only want t' access via a direct link.
When ye visit a hidden page’s URL, it will appear 'n th' navigat'n menu.
Hidden planks can also have hidden subpages, creat'n multiple levels o' hid'n.
By default, hidden planks be only hidden from human visitors. Search engines can still find them by crawl'n yer ship an' th' planks be linked 'n yer taxonomies an' ship search. Ye can prevent this wit' these opt'ns.
Hide from Search
Opt'n T' remove hidden planks from search results, use disableSearchHiddenPages=true.
hugo.
[params]disableSearchHiddenPages=true
params:disableSearchHiddenPages:true
{"params":{"disableSearchHiddenPages":true}}
Hide from Search Engines
Opt'n T' hide planks from search engines by remov'n them from th' sitemap, RSS feed an' make them nofollow, use disableSeoHiddenPages=true.
hugo.
[params]disableSeoHiddenPages=true
params:disableSeoHiddenPages:true
{"params":{"disableSeoHiddenPages":true}}
Hide from Taxonomies
Opt'n T' prevent hidden planks from appear'n on taxonomy an' term planks, use disableTagHiddenPages=true. If this makes a term’s count zero, an empty term plank will still be created but not linked.
Ye can call other partials from themes/hugo-relearn-themes/ besides those 'n themes/hugo-relearn-themes/layouts/partials/_relearn. However, us'n partials not mentioned as customiz'ble below might make future updates more challeng'n.
Customiz'ble Partials
Th' Relearrrn theme allows ye t' cust'mize various parts o' th' theme by overrid'n partials. This makes th' theme highly configur'ble.
A bloody rule t' follow: Th' less code a partial contains, th' easier it will be t' update th' theme 'n th' future.
Here’s a list o' partials ye can safely override:
layouts/partials/content.html: Th' main rrrambl'n o' a plank. Override this t' display additonal plank metadata.
layouts/partials/content-header.html: Th' header above th' title. By default, it shows tags, but ye can change this.
layouts/partials/content-footer.html: Th' footer below th' rrrambl'n. By default, it shows author info, modificat'n dates, an' categories. Ye can cust'mize this.
layouts/partials/custom-header.html: For add'n custom CSS. Remember t' include th' style HTML tag.
layouts/partials/custom-footer.html: For add'n custom JavaScript. Remember t' include th' script HTML tag.
layouts/partials/favicon.html: Th' favicon. Ye should definitely cust'mize this.
layouts/partials/head'n.html: th' page’s title head'ns
layouts/partials/heading-pre.html: Add rrrambl'n before th' page’s title head'ns. Remember t' consider th' headingPre front matter.
layouts/partials/heading-post.html: Add rrrambl'n after th' page’s title head'ns. Remember t' consider th' headingPost front matter.
layouts/partials/logo.html: Th' logo 'n th' top left corner. Ye should cust'mize this.
layouts/partials/menu-pre.html: Add rrrambl'n before menu items. Remember t' consider th' menuPre front matter.
layouts/partials/menu-post.html: Add rrrambl'n after menu items. Remember t' consider th' menuPost front matter.
layouts/partials/menu-footer.html: Th' footer o' th' left menu.
Ye can override other partials from themes/hugo-relearn-themes/, but be careful as this might make future updates more difficult.
Extending Scripts
A common quest'n be how t' add extra CSS styles or JavaScript t' yer ship. This depends on what ye need.
Add'n JavaScript or Stylesheets t' All Planks
T' add JavaScript files or CSS stylesheets t' every plank, ye can include them 'n layouts/partials/custom-header.html or layouts/partials/custom-footer.html.
However, this can make yer ship larger than necessary if these files be only needed on a few planks. Th' next section explains how t' add dependencies only when needed.
Custom Shorrrtcodes wit' Dependencies
Some shorrrtcodes need extra JavaScript an' CSS files. Th' theme only loads these when th' shortcode be used. Ye can use this fer yer own shorrrtcodes too.
For example, t' create a shortcode called myshortcode that needs th' jquery library:
Nevertheless, yer requirements may differ from this configurat'n. Luckily, th' theme has ye covered as th' topbar, its buttons, an' th' functionality behind these buttons be fully configur'ble by ye.
Smarrrt Arrrse
All mentioned file names below can be clicked an' show ye th' implementat'n fer a better understand'n.
Areas
Th' default configurat'n comes wit' three predefined areas that may contain an arbitrary set o' buttons.
end: shown on th' opposite breadcrumb side 'n comparison t' th' start area
more: shown when press'n th' more button 'n th' topbar
While ye cannot 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.
Buttons
Th' theme ships wit' th' follow'n predefined buttons (from left t' right 'n th' screenshot):
sidebar: opens th' sidebar flyout if 'n mobile layout
Not all buttons be displayed at every given time. This be configur'ble (see below if interested).
Redefin'n Areas
Each predefined area an' button comes 'n its 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.
E.g., 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.
Th' theme distinguishes between two types o' buttons:
button: a click'ble button that either browses t' another ship, triggers a user-defined script or opens an overlay contain'n user-defined rrrambl'n
area-button: th' template fer th' more button, t' define yer own area overlay buttons
Button Parameter
Screen Widths an' Act'ns
Depend'n on th' screen width, ye can configure how th' button should behave. Screen width be divided into three classes:
s: (controlled by th' onwidths parameter) mobile layout whar' th' menu sidebar be hidden
m: (controlled by th' onwidthm parameter) desktop layout wit' vis'ble sidebar while th' rrrambl'n area width still resizes
l: (controlled by th' onwidthl parameter) desktop layout wit' vis'ble sidebar once th' rrrambl'n area reached its maximum width
For each width class, ye can configure one o' th' follow'n act'ns:
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; fer example, this be used t' move buttons t' th' more area overlay 'n th' mobile layout
Hid'n an' Disabl'n Stuff
While 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).
This parameter can have one o' th' follow'n values:
dis'ble: th' button be displayed 'n a disabled state if th' overlay be empty
hide: th' button be removed if th' overlay be empty
If 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.
For display'n an area 'n th' button’s overlay, see Area-Button.
Parameter
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 a disabled state regardless o' its rrrambl'n
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 a 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.
Defines what t' do wit' th' button if th' rrrambl'n overlay be empty:
- dis'ble: Th' button be displayed 'n a 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.
Predefined Buttons
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.
Parameter
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.
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.
Parameter
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 a 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.
Page Designs
A plank be displayed by exactly one plank design. Th' Relearrrn theme offers th' plank designs home, chapter, an' default.
A plank design usually consists o'
an archetype file: a template fer creat'n new Marrrkdown files wit' this design
If no type be set 'n yer front matter, th' plank be treated as if type='default' was set.
Arrr
Don’t use th' type opt'n 'n yer modificat'ns fer other functionality!
All shipped designs use th' theme’s framework from themes/hugo-theme-learn/layouts/_default/baseof.html, contain'n o' th' same topbar an' sidebar but can change how rrrambl'n appears 'n th' center o' th' plank.
Us'n a Plank Design
Regardless o' shipped or custom plank design, ye be us'n them 'n th' same way.
Creat'n a Plank Designs
T' make a custom plank design:
Choose a name (for example, mydesign)
Create a rrrambl'n view file at layouts/mydesign/views/article.html
[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' title t' be used fer links t' th' main plank# Default: not set# This name will be used fer th' link t' th' main plank 'n th' upper section# o' th' menu. If not set, `title` from th' Cap'n Hugo sett'ns will be used.linkTitle='Relearn'# 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# 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}'#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Search# These opt'ns modify various aspects o' th' search functionality.# Dis'ble th' search.# Default: false# If th' search be disabled, no search box will be displayed 'n th' menu,# nor in-page search, search popup or dedicated search plank will be avail'ble.# This will also cause th' keyboard shortcut t' be disabled.disableSearch=false# Dis'ble th' search index generat'n.# Default: false# `disableSearch=false` must be set t' let th' generat'n o' th' search index# file t' be affected by this opt'n. If th' search index be disabled, no# search popup or dedicated search plank will be avail'ble.disableSearchIndex=false# URL o' th' search index file relative t' th' language home.# Default: 'searchindex.js'# Ye have t' set this opt'n if yer plank already has a rrrambl'n file named# `searchindex.js` 'n th' language home.searchIndexURL='searchindex.js'# Dis'ble th' dedicated search plank.# Default: false# `disableSearch=false` an' `disableSearchIndex=false` must be set t' let th'# generat'n o' th' dedicated search plank t' be affected by this opt'n.disableSearchPage=false# URL o' th' dedicated search plank relative t' th' language home.# Default: 'search'# In its basic form th' search plank URL be named th' same fer all languages# but ye be free t' override it 'n each language opt'ns t' localised th'# URL. Ye also need t' set this opt'n if yer plank already has a rrrambl'n# plank named `search`.searchPageURL='search'# Multilanguage rrrambl'n.# Default: not set# If th' search index be enabled an' 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']#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Menu# These opt'ns modify th' menu appearance.# 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# 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# 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# 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# Hide head'n above th' shortcuts menu.# Default: false# If a sidebar menu wit' identifier `shortcuts` be configured (see below),# this be th' easy way t' remove th' head'n;# Th' title fer th' head'n can be overwritten 'n yer i18n files. See Hugo's# documentat'n how t' do this.disableShortcutsTitle=false# Define yer own sidebar menus.# Default: th' value used below# Th' sidebar menus be built from this parameter. If not set, it contains# th' below default.# Menus be written from th' sidebar's top t' buttom 'n th' order given 'n# this array.# This can be overridden 'n th' page's frontmatter.# Each entry can contain th' follow'n keys:# - `type` be mandatory. Either `page` 'n case it should generate a tre from# th' plank structure or `menu` 'n case it should generate a tree from a# defined menu.# - `identifier` be mandatory. In case o' `type=page`, anyth'n can be used,# 'n case o' `type=menu` th' `identifier` key must be identical t' th'# key o' th' menu definit'n.# - `main`, boolean. If `true`, th' first tree level be spaced more generous# an' th' text be emphasized. Default: `true` fer `type=page` an' `false`# fer `type=menu`# - `disableTitle`, boolean. If `true`, there be no title above th' tree.# Default: `true` fer `type=page` an' `false` fer `type=menu`. If a title# should be used, 'n case o' `type=page` it will be taken from th' page's# `menuTitle` front matter an' if not set, from th' translat'n files, us'n# th' menu `identifier` as key. In case o' `type=menu` it will be taken# from th' menu `title` accord'n t' Hugo's documentat'n an' if not set# from th' menu `name` an' if this be not set form th' page's `linkTitle`.# - `pageRef`, optional. In case o' `type=page` this be th' start'n page's# path. If not set, th' home plank will be used.sidebarmenus=[{type='page',identifier='home',main=true,disableTitle=true,pageRef=''},{type='menu',identifier='shortcuts',main=false,disableTitle=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 enginesdisableSeoHiddenPages=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# User-defined styles fer shorrrtcodes# Default: not set# Besides th' predefined `style` values, ye be able t' define yer own. Th'# `style` parameter o' th' shortcode must match th' `identifier` defined here.# Th' title fer th' style will be determined from th' `title`. If no `title`# but a `i18n` be set, th' title will be taken from th' translat'n files by# that key. Th' `title` may be empty 'n which case, th' box does not contain a# default title. `icon` an' `color` be work'n similar.boxStyle=[{identifier='magic',i18n='',title='Magic',ay'con='rainbow',color='gold'}]#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 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: falseimageEffects.border=true# Default: trueimageEffects.lazy=true# Default: trueimageEffects.lightbox=true# Default: falseimageEffects.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/862disableDefaultRelref=false# 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# 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'.# This can be overridden 'n th' page's frontmatter.externalLinkTarget='_self'#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 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='{}'# Force board Math on every plank.# Default: false# If a, Math shortcode or codefence be found, th' opt'n will be ignored an'# Math will be boarded regardlessly. This opt'n be useful 'n case ye# be us'n passthrough configurat'n t' render yer math. In this case no shortcode or# codefence be involved an' th' library be not boarded by default so ye can# force load'n it by sett'n `math=true`.# This opt'n has an alias `math.force`.# This can be overridden 'n th' page's frontmatter.math=false# 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" }'# Force board Merrrmaid on every plank.# Default: false# If a Merrrmaid shortcode or codefence be found, th' opt'n will be ignored an'# Merrrmaid will be boarded regardlessly. This opt'n be useful 'n case ye# be us'n script'n t' render yer graph. In this case no shortcode or# codefence be involved an' th' library be not boarded by default so ye can# force load'n it by sett'n `mermaid.force=true`.# This can be overridden 'n th' page's frontmatter.mermaid.force=false# 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.# Force board OpenAPI on every plank.# Default: false# If a, OpenAPI shortcode or codefence be found, th' opt'n will be ignored an'# OpenAPI will be boarded regardlessly. This opt'n be useful 'n case ye# be us'n script'n t' render yer spec. In this case no shortcode or# codefence be involved an' th' library be not boarded by default so ye can# force load'n it by sett'n `openapi.force=true`.# This can be overridden 'n th' page's frontmatter.oppenapi.force=false# 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'
T' chapterrr 3
Rambl'n
Learrrn how t' create an' org'nize yer rrrambl'n planks.
If ye be creat'n yer Marrrkdown files manually, ye can achieve th' same by just sett'n type='chapter' 'n th' front matter.
Yer result'n Marrrkdown file needs t' have at least th' type front matter set t' th' value o' th' plank design
+++title="Chapter 1"type="chapter"+++
Predefined Designs
Home
A Home plank be th' start'n plank o' yer project. It’s best t' have only one plank o' this kind 'n yer project.
T' create a home plank, run th' follow'n command
hugo new --kind home _index.md
Chapter
A Chapter displays a plank meant t' be used as introduct'n fer a set o' child planks.
Commonly, it contains a title front matter an' a short descript'n 'n th' rrrambl'n.
T' create a chapter plank, run th' follow'n command
hugo new --kind chapter chapter1/_index.md
If a numerical weight front matter be set, it will be used t' generate th' subtitle o' th' chapter plank. Set th' number t' a consecutive value start'n at 1 fer each new chapter on th' same directory level.
Default
A Default plank be any other rrrambl'n plank.
T' create a default plank, run either one o' th' follow'n commands
Opt'nFront Matter By default, external links open 'n a new tab. T' change this, use th' externalLinkTarget sett'n wit' a proper link target.
For example, this will open links 'n th' same tab
externalLinkTarget='_self'
externalLinkTarget:_self
{"externalLinkTarget":"_self"}
Enabl'n Link an' Image Link Warn'ns
Opt'nFront Matter Ye can use link.errorlevel an' image.errorlevel t' control what should happen if a local link can not be resolved t' a resource.
If not set or empty, any unresolved link be written as given into th' result'n output. If set t' warning th' same happens an' an additional warning be printed 'n th' built console. 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. Th' file must be a resource o' th' plank or th' ship.
Link warnings be also avail'ble fer th' include an' openapi shorrrtcodes.
more: opens th' overlay if screen space be limited
T'ble o' Contents
Opt'nFront Matter Set disableToc=true t' hide th' TOC button on all planks. If th' button be hidden, also th' keyboard shortcut be disabled. This can be overridden 'n a page’s front matter.
disableToc=true
disableToc:true
{"disableToc":true}
Breadcrumbs
Opt'nFront Matter Set disableBreadcrumb=true t' hide th' breadcrumb 'n th' topbar.
Opt'nFront Matter If editURL be set t' a URL, an edit button will be shown 'n th' topbar. If th' button be hidden, also th' keyboard shortcut 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 front matter.
Opt'nFront Matter Ye can hide th' previous/next buttons by sett'n disableNextPrev=true. If th' buttons be hidden, also th' keyboard shortcuts be disabled.
Here’s a list o' all avail'ble front matter wit' example values. Default values be described 'n th' annotated example below or 'n each front matter’s documentat'n.
+++# 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' social media image o' yer plank.# Default: not set# This be used fer generat'n social media meta informat'n fer th' opengraph# protocol an' twitter cards.# If not set, th' set value o' yer site's hugo.toml be used.images=['images/hero.png']# Th' title o' yer plank.# Default: not set# A plank without a title be treated as a hidden plank.title='Example Page'# Th' descript'n o' yer plank.# Default: not set# This be used fer generat'n HTML meta tags, social media meta informat'n# fer th' opengraph protocol an' twitter cards.# If not set, th' set value o' yer site's hugo.toml be used fer th' html# meta tag, social media meta informat'n fer th' opengraph protocol an'# twitter cards.descript'n=''# Th' plank design t' be used# Default: not set# This decides th' layout o' yer plank. Th' theme ships 'home', 'chapter' an'# 'default'. If not set, 'default' be taken.type=''################################################################################ Relearrrn Theme# These opt'ns be specific t' th' Relearrrn theme.#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 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.# If not set, th' set value o' yer site's hugo.toml be used.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 not set, th' set value o' yer site's hugo.toml be used. If th' global# parameter be given but ye want t' hide th' button fer th' displayed plank,# ye can set th' value t' an empty str'n. If instead o' hid'n ye want t' have# an disabled button, ye can set th' value t' a str'n contain'n just spaces.# This be useful if ye want t' give th' opportunity fer people t' create merge# request fer yer rrrambl'n.editURL=''#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Menu# These opt'ns modify th' menu appearance.# Menu specific title# Default: not set# Th' title displayed 'n th' menu. If not set th' `title` front matter will# be used.linkTitle=''# Prefix fer th' title 'n navigat'n menu.# Default: not set# Th' title o' th' plank 'n th' menu will be prefixed by this HTML rrrambl'n.menuPre=''# Suffix fer th' title 'n navigat'n menu.# Default: not set# Th' title o' th' plank 'n th' menu will be suffixed by this HTML rrrambl'n.menuPost=''# Th' order o' navigat'n 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).# If not set, th' value o' th' parent menu entry be used.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. If not set, th' value o' th' parent menu entry be used.# 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.# If not set, th' set value o' yer site's hugo.toml be used.collapsibleMenu=true# Define yer own sidebar menus.# Default: th' value used below# Th' sidebar menus be built from this parameter. If not set, th' set value# o' yer site's hugo.toml be used an' contains th' below default.# Menus be written from th' sidebar's top t' buttom 'n th' order given 'n# this array.# Each entry can contain th' follow'n keys:# - `type` be mandatory. Either `page` 'n case it should generate a tre from# th' plank structure or `menu` 'n case it should generate a tree from a# defined menu.# - `identifier` be mandatory. In case o' `type=page`, anyth'n can be used,# 'n case o' `type=menu` th' `identifier` key must be identical t' th'# key o' th' menu definit'n.# - `main`, boolean. If `true`, th' first tree level be spaced more generous# an' th' text be emphasized. Default: `true` fer `type=page` an' `false`# fer `type=menu`# - `disableTitle`, boolean. If `true`, there be no title above th' tree.# Default: `true` fer `type=page` an' `false` fer `type=menu`. If a title# should be used, 'n case o' `type=page` it will be taken from th' page's# `menuTitle` front matter an' if not set, from th' translat'n files, us'n# th' menu `identifier` as key. In case o' `type=menu` it will be taken# from th' menu `title` accord'n t' Hugo's documentat'n an' if not set# from th' menu `name` an' if this be not set form th' page's `linkTitle`.# - `pageRef`, optional. In case o' `type=page` this be th' start'n page's# path. If not set, th' home plank will be used.sidebarmenus=[{type='page',identifier='home',main=true,disableTitle=true,pageRef=''},{type='menu',identifier='shortcuts',main=false,disableTitle=false},]#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Hidden planks# These opt'ns configure how hidden planks be treated.# A plank flagged as hidden, be only removed from th' navigat'n 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 a page's menu entry.# Default: false# If this value be true, th' plank be hidden from th' menu.hidden=false#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Rrrambl'n# These opt'ns modify how yer rrrambl'n be displayed.# Prefix fer th' title 'n th' rrrambl'n area.# Default: not set# Th' title o' th' plank head'n will be prefixed by this HTML rrrambl'n.headingPre=''# Suffix fer th' title 'n th' rrrambl'n area.# Default: not set# Th' title o' th' plank head'n will be suffixed by this HTML rrrambl'n.headingPost=''# Display name o' th' page's last editor.# Default: not set# If set, it will be displayed 'n th' default footer.LastModifierDisplayName=''# Email address o' th' page's last editor.# Default: not set# If set together wit' LastModifierDisplayName, it will be displayed 'n th'# default footer.LastModifierEmail=''#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Highlight# These opt'ns configure how code be displayed.# 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.# If not set, th' set value o' yer site's hugo.toml be used 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.# If not set, th' set value o' yer site's hugo.toml be used.include.errorlevel=''#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 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.# If not set, th' set value o' yer site's hugo.toml be used.image.errorlevel=''# Image effects.# See th' documentat'n fer how ye can even add yer own arbitrary effects t'# th' list.# All effect values default t' th' values o' yer site's hugo.toml an' can be# overridden through URL parameter given t' th' image. See th' documentat'n fer# details.# Default: falseimageEffects.border=true# Default: trueimageEffects.lazy=true# Default: trueimageEffects.lightbox=true# Default: falseimageEffects.shadow=false#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Links# These opt'ns configure how links be displayed.# 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.# If not set, th' set value o' yer site's hugo.toml be used.link.errorlevel=''# 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'.# If not set, th' set value o' yer site's hugo.toml be used.externalLinkTarget='_self'#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 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.# If not set, th' set value o' yer site's hugo.toml be used.mathJaxInitialize='{}'# Force board Math on every plank.# Default: false# If a, Math shortcode or codefence be found, th' opt'n will be ignored an'# Math will be boarded regardlessly. This opt'n be useful 'n case ye# be us'n passthrough configurat'n t' render yer math. In this case no shortcode or# codefence be involved an' th' library be not boarded by default so ye can# force load'n it by sett'n `math=true`.# This opt'n has an alias `math.force`.# If not set, th' set value o' yer site's hugo.toml be used.math=false# 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.# If not set, th' set value o' yer site's hugo.toml be used.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.# If not set, th' set value o' yer site's hugo.toml be used 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.# If not set, th' set value o' yer site's hugo.toml be used.mermaidInitialize='{ "securityLevel": "loose" }'# Force board Merrrmaid on every plank.# Default: false# If a Merrrmaid shortcode or codefence be found, th' opt'n will be ignored an'# Merrrmaid will be boarded regardlessly. This opt'n be useful 'n case ye# be us'n script'n t' render yer graph. In this case no shortcode or# codefence be involved an' th' library be not boarded by default so ye can# force load'n it by sett'n `mermaid.force=true`.# If not set, th' set value o' yer site's hugo.toml be used.mermaid.force=false# 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.# If not set, th' set value o' yer site's hugo.toml be used.customMermaidURL=''# 'https://unpkg.com/mermaid/dist/mermaid.min.js'#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# OpenApi# These opt'ns configure how OpenAPI specificat'ns be displayed.# Board OpenAPI on every plank.# Default: false# If a, OpenAPI shortcode or codefence be found, th' opt'n will be ignored an'# OpenAPI will be boarded regardlessly. This opt'n be useful 'n case ye# be us'n script'n t' render yer spec. In this case no shortcode or# codefence be involved an' th' library be not boarded by default so ye can# force load'n it by sett'n `openapi.force=true`.# If not set, th' set value o' yer site's hugo.toml be used.oppenapi.force=false# 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.# If not set, th' set value o' yer site's hugo.toml be used.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.# If not set, th' set value o' yer site's hugo.toml be used.openapi.errorlevel=''+++
Meta Information
Plank Title
Th' title will be used 'n th' head'n an' meta informat'n o' yer HTML.
Th' descript'n be used fer generat'n HTML meta informat'n, 'n th' children shortcode an' 'n social media meta informat'n.
If not set, th' set value o' yer site’s hugo.toml be used fer th' HTML meta informat'n an' social media meta informat'n. It appears empty fer th' children shortcode.
+++descript'n='Some lenghty example description'+++
---descript'n:Some lenghty example descript'n---
{"description":"Some lenghty example description"}
Social Media Images
Th' theme adds social media meta tags includ'n feature images fer th' Open Graph protocol an' Twitter Cards t' yer ship. These be configured as mentioned 'n th' linked Cap'n Hugo docs.
+++images=['images/hero.png']+++
---images:- images/hero.png---
{"images":["images/hero.png"]}
Hidden
Front Matter Ye can hide yer planks from th' menu by sett'n hidden=true.
Menu For Cap'n Hugo menus, ye have t' set params.hidden=true instead.
Front Matter In th' plank front matter, add a headingPre t' insert any HTML code before th' title head'n. Ye can also set headingPost t' insert HTML code after th' title head'n.
Let’s face it: Writ'n rrrambl'n fer th' web be tiresome. WYSIWYG editors help alleviate this task, but they generally result 'n horr'ble code, or worse yet, ugly web planks.
Marrrkdown be a better way t' write HTML, without all th' complexities an' ugliness that usually accompanies it.
Some o' th' key benefits be:
Marrrkdown be simple t' learn, wit' minimal extra characters so it’s also quicker t' write rrrambl'n.
Less chance o' errors when writ'n 'n Marrrkdown.
Produces valid HTML output.
Keeps th' rrrambl'n an' th' visual display separate, so ye cannot mess up th' look o' yer ship.
Write 'n any text editor or Marrrkdown applicat'n ye like.
Marrrkdown be a joy t' use!
John Gruber, th' author o' Marrrkdown, puts it like this:
Th' overrid'n design goal fer Markdown’s formatt'n rules be t' make it as read'ble as poss'ble. Th' idea be that a Markdown-formatted document should be publish'ble as-is, as plain text, without look'n like it’s been marked up wit' tags or formatt'n instruct'ns. While Markdown’s rules has been influenced by several exist'n text-to-HTML filters, th' single biggest source o' inspirat'n fer Markdown’s rules be th' format o' plain text email.
John Gruber
Smarrrt Arrrse
Bookmark this plank fer easy future reference!
Standard an' Extensions
If not otherwise noted, th' shown examples adhere t' th' CommonMark standard. In addit'n th' theme supports th' follow'n extensions that can be activated 'n yer hugo.toml or be built into th' theme:
HTML If th' usage o' HTML be allowed, th' theme supports styl'n fer further HTML elements.
Relearrrn Extension specific t' this theme.
Paragraphs
In Marrrkdown yer rrrambl'n usually spans th' whole avail'ble document width. This be called a block. Blocks be always separated by whitespace t' their adjacent blocks 'n th' result'n document.
Any text not start'n wit' a special sign be written as normal, plain text paragraph block an' must be separated t' its adjacent blocks by empty lines.
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
Result
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
Head'ns
A bloody idea be t' structure yer rrrambl'n us'n head'ns an' subhead'ns. HTML-head'ns from h1 through h6 be constructed wit' a # fer each level.
In Hugo ye usually don’t use h1 as this be generated by yer theme an' ye should only have one such element 'n a document.
T' further structure yer rrrambl'n ye can add horizontal rules. They create a “thematic break” between paragraph blocks. In Marrrkdown, ye can create it wit' three consecutive dashes ---.
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
---
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
Result
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
Blockquotes
Quotat'ns
For quot'n blocks o' rrrambl'n from another source within yer document add > before any text ye want t' quote.
Blockquotes can also be nested.
> Donec massa lacus, ultricies a ullamcorper 'n, fermentum sed augue. Nunc augue, aliquam non hendrerit ac, commodo vel nisi.
>
> > Sed adipisc'n elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis 'n dolor tincidunt mollis ac eu diam.
>
> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
Result
Donec massa lacus, ultricies a ullamcorper 'n, fermentum sed augue. Nunc augue, aliquam non hendrerit ac, commodo vel nisi.
Sed adipisc'n elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis 'n dolor tincidunt mollis ac eu diam.
Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
GitHub Alerts
GFM Since Cap'n Hugo 0.132.0GitHub alerts be also supported. Please note, that color'n an' ay'cons o' severities may defer between GitHub an' this theme.
If ye be 'n need o' more advanced opt'ns t' style yer alerts, like ay'cons, use th' notice shortcode.
> [!CAUTION]
> Advises about risks or negative outcomes o' certain act'ns.
> [!IMPORTANT]
> Key informat'n users need t' know t' achieve their goal.
> [!INFO]
> Informat'n that users <ins>_might_</ins> find interest'n.
> [!NOTE]
> Useful informat'n that users should know, even when skimm'n rrrambl'n.
> [!TIP]
> Helpful advice fer do'n th'ns better or more easily.
> [!WARNING]
> Urgent info that needs immediate user attent'n t' avoid problems.
Result
Caut'n
Advises about risks or negative outcomes o' certain act'ns.
Important
Key informat'n users need t' know t' achieve their goal.
Ahoi
Informat'n that users might find interest'n.
Avast
Useful informat'n that users should know, even when skimm'n rrrambl'n.
Smarrrt Arrrse
Helpful advice fer do'n th'ns better or more easily.
Arrr
Urgent info that needs immediate user attent'n t' avoid problems.
Obsidian Callouts
Obsidian Since Cap'n Hugo 0.134.0Obsidian callouts be also supported. Which enables configur'ble title text an' expand/collapse.
If ye be 'n need o' more advanced opt'ns t' style yer alerts, like ay'cons, use th' notice shortcode.
> [!tip] Callouts can have custom titles
> Like this one.
> [!tip] Title-only callout
> [!note]- Be callouts fold'ble?
> Yes! In a fold'ble callout, th' contents be hidden when th' callout be collapsed
> [!note]+ Be callouts fold'ble?
> Yes! In a fold'ble callout, th' contents be hidden when th' callout be collapsed
Result
Callouts can have custom titles
Like this one.
Title-only callout
Yes! In a fold'ble callout, th' contents be hidden when th' callout be collapsed
Yes! In a fold'ble callout, th' contents be hidden when th' callout be collapsed
Text Markers
Bold
Ye can show importance o' a snippet o' text wit' a heavier font-weight by enclos'n it wit' two asterisks **.
I am rendered wit' **bold text**
Result
I am rendered wit' bold text
Italics
Ye can emphasize a snippet o' text wit' italics by enclos'n it wit' underscores _.
I am rendered wit' _italicized text_
Result
I am rendered wit' italicized text
Marked Text
Ye can mark text 'n th' predefined accent color o' yer stylesheet.
HTML Ye can also use it by configur'n Hugo fer usage o' HTML.
Th' <ins>hot, new</ins> stuff
Result
Th' hot, new stuff
Deleted Text
GFM Ye can do strikethroughs by enclos'n text wit' two tildes ~~. See Hugo’s documentat'n remarks if ye want t' use this together wit' th' subscript rules.
~~Strike through~~ this text
Result
Strike through this text
Special Typesett'n
Text Substitut'n
Pants Ye can combine multiple punctuat'n characters t' single typographic entities. This will only be applied t' text outside o' code blocks or inline code.
Do'ble quotes `"` an' single quotes `'` o' enclosed text be replaced by **"do'ble curly quotes"** an' **'single curly quotes'**.
Do'ble dashes `--` an' triple dashes `---` be replaced by en-dash **--** an' em-dash **---** entities.
Do'ble arrows point'n left `<<` or right `>>` be replaced by arrow **<<** an' **>>** entities.
Three consecutive dots `...` be replaced by an ellipsis **...** entity.
Result
Do'ble quotes " an' single quotes ' o' enclosed text be replaced by “do'ble curly quotes” an' ‘single curly quotes’.
Do'ble dashes -- an' triple dashes --- be replaced by en-dash – an' em-dash — entities.
Do'ble arrows point'n left << or right >> be replaced by arrow « an' » entities.
Three consecutive dots ... be replaced by an ellipsis … entity.
Subscript an' Superscript
Ye can also use subscript an' superscript text. For more complex stuff, ye can use th' math shortcode.
HTML Ye can also use it by configur'n Hugo fer usage o' HTML.
How many liters H<sub>2</sub>O fit into 1dm<sup>3</sup>?
Result
How many liters H2O fit into 1dm3?
Keyboard Shortcuts
HTML Ye can use th' <kbd> element t' style keyboard shortcuts.
Press <kbd>STRG</kbd><kbd>ALT</kbd><kbd>DEL</kbd> t' end yer shift early.
Result
Press STRGALTDEL t' end yer shift early.
Lists
Unordered
Ye can write a list o' items 'n which th' order o' th' items does not explicitly matter.
It be poss'ble t' nest lists by indent'n an item fer th' next sublevel.
Ye may use any o' -, * or + t' denote bullets fer each list item but should not switch between those symbols inside one whole list.
- Lorem ipsum dolor sit amet
- Consectetur adipisc'n elit
- Vestibulum laoreet porttitor sem
- Ac tristique libero volutpat at
- Nulla volutpat aliquam velit
- Phasellus iaculis neque
- Purus sodales ultricies
- Faucibus porta lacus fringilla vel
Result
Lorem ipsum dolor sit amet
Consectetur adipisc'n elit
Vestibulum laoreet porttitor sem
Ac tristique libero volutpat at
Nulla volutpat aliquam velit
Phasellus iaculis neque
Purus sodales ultricies
Faucibus porta lacus fringilla vel
Ordered
Ye can create a list o' items 'n which th' order o' items does explicitly matter.
It be poss'ble t' nest lists by indent'n an item fer th' next sublevel.
Marrrkdown will automatically number each o' yer items consecutively. This means, th' order number ye be provid'n be irrelevant.
1. Lorem ipsum dolor sit amet
3. Consectetur adipisc'n elit
1. Integer molestie lorem at massa
7. Facilisis 'n pretium nisl aliquet
99. Nulla volutpat aliquam velit
1. Faucibus porta lacus fringilla vel
1. Aenean sit amet erat nunc
17. Eget porttitor lorem
Result
Lorem ipsum dolor sit amet
Consectetur adipisc'n elit
Integer molestie lorem at massa
Facilisis 'n pretium nisl aliquet
Nulla volutpat aliquam velit
Faucibus porta lacus fringilla vel
Aenean sit amet erat nunc
Eget porttitor lorem
Tasks
GFM Ye can add task lists result'n 'n checked or unchecked non-click'ble items
- [x] Basic Test
- [ ] More Tests
- [x] View
- [x] Hear
- [ ] Smell
Result
Basic Test
More Tests
View
Hear
Smell
Definit'ns
PHP Definit'n lists be made o' terms an' definit'ns o' these terms, much like 'n a dictionary.
A definit'n list 'n Marrrkdown Extra be made o' a single-line term followed by a colon an' th' definit'n fer that term. Ye can also associate more than one term t' a definit'n.
If ye add empty lines around th' definit'n terms, additional vertical space will be generated. Also multiple paragraphs be poss'ble
Apple
: Pomaceous fruit o' plants o' th' genus Malus 'n th' family Rosaceae.
: An American computer company.
Orange
: Th' fruit o' an evergreen tree o' th' genus Citrus.
Ye can make juice out o' it.
: A telecommunicat'n company.
Ye can't make juice out o' it.
Result
Apple
Pomaceous fruit o' plants o' th' genus Malus 'n th' family Rosaceae.
An American computer company.
Orange
Th' fruit o' an evergreen tree o' th' genus Citrus.
Ye can make juice out o' it.
A telecommunicat'n company.
Ye can’t make juice out o' it.
Code
Inline Code
Inline snippets o' code can be wrapped wit' backticks `.
In this example, `<div></div>` be marked as code.
Result
In this example, <div></div> be marked as code.
Indented Code Block
A simple code block can be generated by indent'n several lines o' code by at least two spaces.
Be impressed by my advanced code:
// Some comments
line 1 o' code
line 2 o' code
line 3 o' code
Result
Be impressed by my advanced code:
// Some comments
line 1 o' code
line 2 o' code
line 3 o' code
Fenced Code Block
If ye want t' gain more control o' yer code block ye can enclose yer code by at least three backticks ``` a so called fence.
GFM Ye can also add a language specifier directly after th' open'n fence, ```js, an' rules highlight'n will automatically be applied accord'n t' th' selected language 'n th' rendered HTML.
GFM Ye can create tables by add'n pipes as dividers between each cell, an' by add'n a line o' dashes (also separated by bars) beneath th' header. Avast that th' pipes do not need t' be vertically aligned.
| Opt'n | Descript'n |
|--------|-------------|
| data | path t' data files t' supply th' data that will be passed into templates. |
| engine | engine t' be used fer process'n templates. Handlebars be th' default. |
| ext | extension t' be used fer dest files. |
Result
Opt'n
Descript'n
data
path t' data files t' supply th' data that will be passed into templates.
engine
engine t' be used fer process'n templates. Handlebars be th' default.
ext
extension t' be used fer dest files.
Aligned Columns
Add'n a colon on th' left and/or right side o' th' dashes below any head'n will align th' text fer that column accordingly.
| Opt'n | Number | Descript'n |
|-------:|:------:|:------------|
| data | 1 | path t' data files t' supply th' data that will be passed into templates. |
| engine | 2 | engine t' be used fer process'n templates. Handlebars be th' default. |
| ext | 3 | extension t' be used fer dest files. |
Result
Opt'n
Number
Descript'n
data
1
path t' data files t' supply th' data that will be passed into templates.
engine
2
engine t' be used fer process'n templates. Handlebars be th' default.
ext
3
extension t' be used fer dest files.
Links
Autolink
GFM Absolute URLs will automatically be converted into a link.
Links can be simplyfied fer recurr'n reuse by us'n a reference ID t' later define th' URL locat'n. This simplyfies writ'n if ye want t' use a link more than once 'n a document.
[Example][somelinkID]
[somelinkID]: https://example.com "Go t' example domain"
PHP Footnotes work mostly like reference-style links. A footnote be made o' two th'ns, a marker 'n th' text that will become a superscript number an' a footnote definit'n that will be placed 'n a list o' footnotes.
Usually th' list o' footnotes will be shown at th' end o' yer document. If we use a footnote 'n a notice box it will instead be listed at th' end o' its box.
Footnotes can contain block elements, which means that ye can put multiple paragraphs, lists, blockquotes an' so on 'n a footnote. It works th' same as fer list items, just indent th' follow'n paragraphs by four spaces 'n th' footnote definit'n.
That's some text wit' a footnote[^1]
[^1]: An' that's th' footnote.
That's some more text wit' a footnote.[^someid]
[^someid]:
Anyth'n o' interest goes here.
Blue light glows blue.
Images can also be linked by reference ID t' later define th' URL locat'n. This simplyfies writ'n if ye want t' use an image more than once 'n a document.
![La Forge][laforge]
[laforge]: https://octodex.github.com/images/trekkie.jpg "Geordi La Forge"
Result
Image Effects
Relearrrn This theme allows additional non-standard formatt'n by sett'n query parameter at th' end o' th' image URL. See th' image effects docs fer a detailed example an' how t' configure it.
Resiz'n
Add query parameter width and/or height t' th' link image t' resize th' image. Values be CSS values (default be auto).
If ye want t' wrap an image 'n a link an' lightbox=true be yer default sett'n, ye have t' explicitly dis'ble th' lightbox t' avoid it t' hijack'n yer link like:
Th' default image effects shipped wit' th' theme be
Name
Descript'n
border
Draws a light thin border around th' image
lazy
Lets th' image be lazy boarded
lightbox
Th' image will be click'ble t' show it enlarged
shadow
Draws a shadow around th' image t' make it appear hovered/glow'n
One way t' use them be t' add them as URL query parameter t' each individually linked image.
This can become cumbersome t' be done consistently fer th' whole ship. Instead, ye can configure th' defaults 'n yer hugo.toml as well as overrid'n these defaults 'n a page’s front matter.
Explicitly set URL query parameter will override th' defaults set fer a plank or yer ship.
Without any sett'ns 'n yer hugo.tomlimageEffects defaults t'
Cap'n Hugo uses Marrrkdown as its rrrambl'n format. However, there be a lot o' th'ns that Marrrkdown doesn’t support well.
Ye could use pure HTML t' expand yer possibilities. But this happens t' be a bad idea. Everyone uses Marrrkdown because it’s pure an' simple t' read. Ye should avoid HTML t' keep it as simple an' port'ble as poss'ble.
T' avoid Markdown’s limitat'ns, Cap'n Hugo created shorrrtcodes. A shortcode be a simple snippet inside o' a plank.
Th' Relearrrn theme provides many shorrrtcodes on top o' Hugo’s exist'n ones.
Th' badge shortcode displays little markers 'n yer text wit' adjust'ble color, title an' ay'con.
ImportantVersion6.6.6Captain AhoiNewAwesome
Usage
{{%badge%}}Important{{%/badge%}}{{%badgestyle="primary"title="Version"%}}6.6.6{{%/badge%}}{{%badgestyle="red"ay'con="angle-double-up"%}}Captain{{%/badge%}}{{%badgestyle="info"%}}New{{%/badge%}}{{%badgecolor="fuchsia"ay'con="fa-fw fab fa-hackerrank"%}}Awesome{{%/badge%}}
Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.
- fer severity styles: a nice match'n color fer th' severity - fer all other styles: th' correspond'n color
title
see notes
Arbitrary text fer th' badge title. Depend'n on th' style there may be a default title. Any given value will overwrite th' default.
- fer severity styles: th' match'n title fer th' severity - fer all other styles: <empty>
If ye want no title fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
ay'con
see notes
Font Awesome ay'con name set t' th' left o' th' title. Depend'n on th' style there may be a default ay'con. Any given value will overwrite th' default.
- fer severity styles: a nice match'n ay'con fer th' severity - fer all other styles: <empty>
If ye want no ay'con fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Awesome Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
Button
Th' button shortcode displays a click'ble button wit' adjust'ble color, title an' ay'con.
Either th' destinat'n URL fer th' button or JavaScript code t' be executed on click. If this parameter be not set, th' button will do noth'n but be still displayed as click'ble.
- if start'n wit' javascript: all follow'n text will be executed 'n yer browser - every other str'n will be interpreted as URL
style
transparent
Th' style scheme used fer th' button.
- by severity: caut'n, important, info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, cyan, green, grey, magenta, orange, red - by special color: default, transparent, code
Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.
- fer severity styles: a nice match'n color fer th' severity - fer all other styles: th' correspond'n color
ay'con
see notes
Font Awesome ay'con name set t' th' left o' th' title. Depend'n on th' style there may be a default ay'con. Any given value will overwrite th' default.
- fer severity styles: a nice match'n ay'con fer th' severity - fer all other styles: <empty>
If ye want no ay'con fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
iconposit'n
left
Places th' ay'con t' th' left or right o' th' title.
target
see notes
Th' destinat'n frame/window if href be an URL. Otherwise th' parameter be not used. This behaves similar t' normal links. If th' parameter be not given it defaults t':
- th' sett'n o' externalLinkTarget or _blank if not set, fer any address start'n wit' http:// or https:// - no specific value fer all other links
type
see notes
Th' button type if href be JavaScript. Otherwise th' parameter be not used. If th' parameter be not given it defaults t' button
<content>
see notes
Arbitrary text fer th' button title. Depend'n on th' style there may be a default title. Any given value will overwrite th' default.
- fer severity styles: th' match'n title fer th' severity - fer all other styles: <empty>
If ye want no title fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
Choose th' style used t' group all children. It could be any HTML tag name.
style
li
Choose th' style used t' display each descendant. It could be any HTML tag name.
showhidden
false
When true, child planks hidden from th' menu will be displayed as well.
descript'n
false
When true shows a short text under each plank 'n th' list. When no descript'n or summary exists fer th' plank, th' first 70 words o' th' rrrambl'n be taken - read more info about summaries on gohugo.io.
depth
1
Th' depth o' descendants t' display. For example, if th' value be 2, th' shortcode will display two levels o' child planks. T' get all descendants, set this value t' a high number eg. 999.
sort
auto
Th' sort criteria o' th' displayed list.
- auto defaults t' ordersectionsby o' th' page’s Front Matter or t' ordersectionsby o' th' configurat'n Opt'n or t' weight - weight - title - linktitle - modifieddate - expirydate - publishdate - date - length - default adher'n t' Hugo’s default sort criteria
{{%expandtitle="Show me almost **endless** possibilities"%}}Yecanaddstandardmarkdownrules:-multipleparagraphs-bulletpointlists-_emphasized_,**bold**an'even**_boldemphasized_**text-[links](https://example.com)
-etc.```plaintext
...and even source code
```>th'possibilitiesbeendless(almost-includ'nothershorrrtcodesmayormaynotwork){{%/expand%}}
This shortcode be fully compat'ble wit' Hugo’s highlight shortcode but offers some extensions.
It be called interchangeably 'n th' same way as Hugo’s own shortcode by provid'n positional parameter or simply by us'n Marrrkdown codefences.
Ye be free t' also call this shortcode from yer own partials. In this case it resembles Hugo’s highlight funct'n rules if ye call it us'n compatibility rules.
Codefence rules be widely avail'ble 'n other Marrrkdown parsers like GitHub an' therefore be th' recommend rules fer generat'n port'ble Marrrkdown.
Th' tab shortcode be also cap'ble o' display'n code but wit' limited opt'ns.
Parameter
Name
Posit'n
Default
Notes
type
1
<empty>
Th' language o' th' code t' highlight. Choose from one o' th' supported languages. Case-insensitive.
title
<empty>
Extension. Arbitrary title fer code. This displays th' code like a single tab if hl_inline=false (which be Hugo’s default).
wrap
see notes
Extension. When true th' rrrambl'n may wrap on long lines otherwise it will be scroll'ble.
Th' default value can be set 'n yer hugo.toml an' overwritten via front matter. See below.
opt'ns
2
<empty>
An optional, comma-separated list o' zero or more Cap'n Hugo supported opt'ns as well as extension parameter from this t'ble.
Ye can configure th' color style used fer code blocks 'n yer color variants stylesheet file us'n th' --CODE-theme vari'ble. This requires further configurat'n as described 'n th' above link.
Examples
Line Numbers wit' Start'n Offset
As mentioned above, line numbers 'n a t'ble layout will shift if code be wrapp'n, so better use inline. T' make th'ns easier fer ye, set lineNumbersInT'ble = false 'n yer hugo.toml an' add lineNos = true when call'n th' shortcode instead o' th' specific values t'ble or inline.
666# th' hardest part be t' start writ'n code; here's a kickstart; just copy an' paste this; it's free; th' next lines will cost ye serious credits667print("Hello")668print(" ")669print("World")670print("!")
Marrrkdown Codefence wit' Title
```py { title="python" }
# a bit shorter
print("Hello World!")
```
Font Awesome ay'con name t' be displayed. It will be displayed 'n th' text color o' its accord'n context.
Find'n an ay'con
Browse through th' avail'ble ay'cons 'n th' Font Awesome Gallery. Notice that th' free filter be enabled, as only th' free ay'cons be avail'ble by default.
Once on th' Font Awesome plank fer a specific ay'con, fer example th' plank fer th' heart, copy th' ay'con name an' paste into th' Marrrkdown rrrambl'n.
Customis'n Ay'cons
Font Awesome provides many ways t' modify th' ay'con
Change color (by default th' ay'con will inherit th' parent color)
Builtwit'{{%ay'conheart%}}byRelearrrnan'Cap'n Hugo
Built wit' by Relearrrn an' Cap'n Hugo
Advanced HTML Usage
While th' shortcode simplifies us'n standard ay'cons, th' ay'con customizat'n an' other advanced features o' th' Font Awesome library require ye t' use HTML directly. Paste th' <i> HTML into marrrkup, an' Font Awesome will board th' relevant ay'con.
Built wit' <iclass="fas fa-heart"></i> by Relearrrn an' Cap'n Hugo
Built wit' by Relearrrn an' Cap'n Hugo
T' use these native HTML elements 'n yer Marrrkdown, add this 'n yer hugo.toml:
[marrrkup.goldmark.renderer]unsafe=true
Include
Th' include shortcode includes other planks, resources or files from yer project.
When true an' th' included file contains head'ns, th' first head'n will be hidden. This comes 'n handy, eg. if ye include otherwise standalone Marrrkdown files.
Sett'ns
Enabl'n Link Warn'ns
Opt'nFront Matter Ye can use include.errorlevel t' control what should happen if a local link can not be resolved t' a resource.
If not set or empty, any unresolved link be written as given into th' result'n output. If set t' warning th' same happens an' an additional warning be printed 'n th' built console. 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. Th' file must be a resource o' th' plank or th' ship.
th' possibilities be endless (almost - includ'n other shorrrtcodes may or may not work) (almost - includ'n other shorrrtcodes may or may not work)
Et Cetera (English: /ɛtˈsɛtərə/), abbreviated t' etc., etc, et cet., be a Latin expression that be used 'n English t' mean “and other similar things”, or “and so forth” ↩︎
Math
If this be not enough, th' math shortcode helps ye render'n math an' chemical formulae us'n th' MathJax library.
Ye can also use pure Marrrkdown fer writ'n simple math expressions.
Passthrough rules be only avail'ble by further configurat'n an' has limited features as it does not provide any o' th' below parameter. Nevertheless, it be widely avail'ble 'n other Marrrkdown parsers like GitHub an' therefore be th' recommend rules fer generat'n port'ble Marrrkdown.
Parameter
Name
Default
Notes
align
center
Th' vertical alignment.
Allowed values be left, center or right.
<content>
<empty>
Yer formulae.
Sett'ns
Provid'n Initializat'n Opt'ns fer th' MathJax Library
Opt'nFront Matter Th' MathJax library be configured wit' default sett'ns fer initializat'n.
Ye can overwrite th' sett'ns by provid'n a JSON object 'n mathJaxInitialize. See MathJax’s documentat'n fer all allowed sett'ns.
Keep 'n mind that initializat'n sett'ns o' yer planks front matter overwrite all sett'ns o' yer configurat'n opt'ns.
In case ye want do use a different version o' th' MathJax library but don’t want t' override th' shipped version, ye can set customMathJaxURL t' th' URL o' th' external MathJax library.
Opt'nFront Matter Th' MathJax library will be boarded if th' plank contains a math shortcode or codefence.
Ye can force load'n th' MathJax library if no shortcode or codefence was used by sett'n math=true. If a shortcode or codefence was found, th' opt'n has no effect. This must be set 'n case ye be us'n th' passthrough configurat'n t' render math.
Instead o' math=true ye can also use th' alias math.force=true.
math=true
math:true
{"math":true}
Passthrough Configurat'n
Ye can use yer math without enclos'n it 'n a shortcode or codefence by us'n a passthrough configurat'n
In this case ye have t' force board th' MathJax library either 'n yer hugo.toml or 'n yer page’s front matter as th' theme doesn’t know if math be used.
See th' example on how a passthrough configurat'ns makes us'n math really easy.
Examples
Passthrough Block Math
Wit' passthrough configurat'n enabled ye can just drop yer math without enclos'n it by shorrrtcodes or codefences but no other parameters be avail'ble.
In this case ye have t' force board th' MathJax library by sett'n math=true either 'n yer hugo.toml or 'n yer page’s front matter.
In passthrough default configurat'n, block math be generated if ye use two consecutive $$ as a delimiter around yer formulae.
$$\left|
\begin{array}{cc}
a & b \\
c & d
\end{array}\right|$$
$$\left|
\begin{array}{cc}
a & b \\
c & d
\end{array}\right|$$
Passthrough Inline Math
Th' same usage restrict'ns as o' th' previous example apply here as well.
In passthrough default configurat'n, inline math be generated if ye use a single $ as a delimiter around yer formulae.
Euclid already knew, $\sqrt{2}$ be irrational.
Euclid already knew, $\sqrt{2}$ be irrational.
Codefence Block Math wit' Right Alignment
If ye be us'n codefences, more parameter be avail'ble. Yer formulae still needs t' be enclosed by $ or $$ as delimiters respectively.
{{partial"shortcodes/mermaid.html"(dict"page"."content""graph LR;\n If --> Then\n Then --> Else""align""center""zoom""true")}}
Codefence rules be widely avail'ble 'n other Marrrkdown parsers like GitHub an' therefore be th' recommend rules fer generat'n port'ble Marrrkdown.
Parameter
Name
Default
Notes
align
center
Th' vertical alignment.
Allowed values be left, center or right.
zoom
see notes
Whether th' graph be pan- an' zoom'ble.
If not set th' value be determined by th' mermaidZoom sett'n o' yer configurat'ns opt'ns or th' planks front matter or false if not set at all.
- false: no pan or zoom - true: pan an' zoom active
<content>
<empty>
Yer Merrrmaid graph.
Sett'ns
Configur'n Pan an' Zoom
Opt'nFront Matter Th' generated graphs can be panned by dragg'n them an' zoomed by us'n th' mousewheel. On mobile devices ye can use finger gestures.
By default this be disabled. Set mermaidZoom=true t' en'ble it.
Individual sett'ns o' a graphs zoom parameter have precedence over th' page’s front matter an' configurat'n opt'ns 'n that order.
mermaidZoom=true
mermaidZoom:true
{"mermaidZoom":true}
Provid'n Initializat'n Opt'ns fer th' Merrrmaid Library
Opt'nFront Matter Th' Merrrmaid library be configured wit' default sett'ns fer initializat'n.
Ye can overwrite th' sett'ns by provid'n a JSON object 'n mermaidInitialize. See Mermaid’s documentat'n fer all allowed sett'ns.
Keep 'n mind that initializat'n sett'ns o' yer planks front matter overwrite all sett'ns o' yer configurat'n opt'ns.
In addit'n, ye can merge sett'ns fer each individual graph through diagram directives on top o' th' sett'ns o' yer page’s front matter or configurat'n opt'ns.
In case ye want do use a different version o' th' Merrrmaid library but don’t want t' override th' shipped version, ye can set customMermaidURL t' th' URL o' th' external Merrrmaid library.
Opt'nFront Matter Th' Merrrmaid library will be boarded if th' plank contains an mermaid shortcode or codefence.
Ye can force load'n th' Merrrmaid library if no shortcode or codefence was used by sett'n mermaid.force=true. If a shortcode or codefence was found, this opt'n has no effect. This comes handy 'n case ye be us'n script'n t' render a graph.
[mermaid]force=true
mermaid:force:true
{"mermaid":{"force":true}}
Sett'n a Specific Merrrmaid Theme
While ye can configure th' Merrrmaid theme t' render yer graph by us'n one o' th' initializat'n opt'ns, th' recommended way be t' set th' default value us'n th' --MERMAID-theme vari'ble 'n yer color variant stylesheet. This allows yer graphs t' look pretty when th' user switches th' color variant.
Examples
Flowchart wit' YAML-Title
```mermaid
---
title: Example Diagram
---
graph LR;
A[Hard edge] -->|Link text| B(Round edge)
B --> C{<strong>Decision</strong>}
C -->|One| D[Result one]
C -->|Two| E[Result two]
```
---
title: Example Diagram
---
graph LR;
A[Hard edge] -->|Link text| B(Round edge)
B --> C{<strong>Decision</strong>}
C -->|One| D[Result one]
C -->|Two| E[Result two]
Sequence Diagram wit' Configurat'n Directive
```mermaid
%%{init:{"fontFamily":"monospace", "sequence":{"showSequenceNumbers":true}}}%%
sequenceDiagram
Alice->>John: Hello John, how be ye?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about ye?
Bob-->>John: Jolly bloody!
```
%%{init:{"fontFamily":"monospace", "sequence":{"showSequenceNumbers":true}}}%%
sequenceDiagram
Alice->>John: Hello John, how be ye?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about ye?
Bob-->>John: Jolly bloody!
Class Diagram
```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +Str'n gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+Str'n beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
```
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +Str'n gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+Str'n beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
State Diagram Aligned t' th' Right Us'n Shortcode Rules
stateDiagram-v2
open: Open Door
closed: Closed Door
locked: Locked Door
open --> closed: Close
closed --> locked: Lock
locked --> closed: Unlock
closed --> open: Open
Entity Relationship Model wit' Non-Default Merrrmaid Theme
```mermaid
%%{init:{"theme":"forest"}}%%
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "li'ble for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
```
%%{init:{"theme":"forest"}}%%
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "li'ble for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
User Journey
```mermaid
journey
title My work'n day
section Go t' work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 3: Me
```
journey
title My work'n day
section Go t' work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 3: Me
GANTT Chart
```mermaid
gantt
dateFormat YYYY-MM-DD
title Add'n GANTT diagram functionality t' Merrrmaid
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task 'n th' critical line :crit, done, 2014-01-06,24h
Implement parser an' jison :crit, done, after des1, 2d
Create tests fer parser :crit, active, 3d
Future task 'n critical line :crit, 5d
Create tests fer renderer :2d
Add t' Merrrmaid :1d
```
gantt
dateFormat YYYY-MM-DD
title Add'n GANTT diagram functionality t' Merrrmaid
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task 'n th' critical line :crit, done, 2014-01-06,24h
Implement parser an' jison :crit, done, after des1, 2d
Create tests fer parser :crit, active, 3d
Future task 'n critical line :crit, 5d
Create tests fer renderer :2d
Add t' Merrrmaid :1d
Pie Chart without Zoom
```mermaid {zoom="false"}
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
```
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
Quadrant Chart
```mermaid
quadrantChart
title Reach an' engagement o' campaigns
x-axis Low Reach --> High Reach
y-axis Low Engagement --> High Engagement
quadrant-1 We should expand
quadrant-2 Need t' promote
quadrant-3 Re-evaluate
quadrant-4 May be improved
Campaign A: [0.3, 0.6]
Campaign B: [0.45, 0.23]
Campaign C: [0.57, 0.69]
Campaign D: [0.78, 0.34]
Campaign E: [0.40, 0.34]
Campaign F: [0.35, 0.78]
```
quadrantChart
title Reach an' engagement o' campaigns
x-axis Low Reach --> High Reach
y-axis Low Engagement --> High Engagement
quadrant-1 We should expand
quadrant-2 Need t' promote
quadrant-3 Re-evaluate
quadrant-4 May be improved
Campaign A: [0.3, 0.6]
Campaign B: [0.45, 0.23]
Campaign C: [0.57, 0.69]
Campaign D: [0.78, 0.34]
Campaign E: [0.40, 0.34]
Campaign F: [0.35, 0.78]
Requirement Diagram
```mermaid
requirementDiagram
requirement test_req {
id: 1
text: th' test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulat'n
}
test_entity - satisfies -> test_req
```
requirementDiagram
requirement test_req {
id: 1
text: th' test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulat'n
}
test_entity - satisfies -> test_req
```mermaid
C4Context
title System Context diagram fer Internet Bank'n System
Enterprise_Boundary(b0, "BankBoundary0") {
Person(customerA, "Bank'n Customer A", "A customer o' th' bank, wit' personal bank accounts.")
Person(customerB, "Bank'n Customer B")
Person_Ext(customerC, "Bank'n Customer C", "desc")
Person(customerD, "Bank'n Customer D", "A customer o' th' bank, <br/> wit' personal bank accounts.")
System(SystemAA, "Internet Bank'n System", "Allows customers t' view informat'n about their bank accounts, an' make payments.")
Enterprise_Boundary(b1, "BankBoundary") {
SystemDb_Ext(SystemE, "Mainframe Bank'n System", "Stores all o' th' core bank'n informat'n about customers, accounts, transact'ns, etc.")
System_Boundary(b2, "BankBoundary2") {
System(SystemA, "Bank'n System A")
System(SystemB, "Bank'n System B", "A system o' th' bank, wit' personal bank accounts. next line.")
}
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
SystemDb(SystemD, "Bank'n System D Database", "A system o' th' bank, wit' personal bank accounts.")
Boundary(b3, "BankBoundary3", "boundary") {
SystemQueue(SystemF, "Bank'n System F Queue", "A system o' th' bank.")
SystemQueue_Ext(SystemG, "Bank'n System G Queue", "A system o' th' bank, wit' personal bank accounts.")
}
}
}
BiRel(customerA, SystemAA, "Uses")
BiRel(SystemAA, SystemE, "Uses")
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
Rel(SystemC, customerA, "Sends e-mails to")
UpdateElementStyle(customerA, $fontColor="red", $bgColor="grey", $borderColor="red")
UpdateRelStyle(customerA, SystemAA, $textColor="blue", $lineColor="blue", $offsetX="5")
UpdateRelStyle(SystemAA, SystemE, $textColor="blue", $lineColor="blue", $offsetY="-10")
UpdateRelStyle(SystemAA, SystemC, $textColor="blue", $lineColor="blue", $offsetY="-40", $offsetX="-50")
UpdateRelStyle(SystemC, customerA, $textColor="red", $lineColor="red", $offsetX="-50", $offsetY="20")
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")
```
C4Context
title System Context diagram fer Internet Bank'n System
Enterprise_Boundary(b0, "BankBoundary0") {
Person(customerA, "Bank'n Customer A", "A customer o' th' bank, wit' personal bank accounts.")
Person(customerB, "Bank'n Customer B")
Person_Ext(customerC, "Bank'n Customer C", "desc")
Person(customerD, "Bank'n Customer D", "A customer o' th' bank, <br/> wit' personal bank accounts.")
System(SystemAA, "Internet Bank'n System", "Allows customers t' view informat'n about their bank accounts, an' make payments.")
Enterprise_Boundary(b1, "BankBoundary") {
SystemDb_Ext(SystemE, "Mainframe Bank'n System", "Stores all o' th' core bank'n informat'n about customers, accounts, transact'ns, etc.")
System_Boundary(b2, "BankBoundary2") {
System(SystemA, "Bank'n System A")
System(SystemB, "Bank'n System B", "A system o' th' bank, wit' personal bank accounts. next line.")
}
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
SystemDb(SystemD, "Bank'n System D Database", "A system o' th' bank, wit' personal bank accounts.")
Boundary(b3, "BankBoundary3", "boundary") {
SystemQueue(SystemF, "Bank'n System F Queue", "A system o' th' bank.")
SystemQueue_Ext(SystemG, "Bank'n System G Queue", "A system o' th' bank, wit' personal bank accounts.")
}
}
}
BiRel(customerA, SystemAA, "Uses")
BiRel(SystemAA, SystemE, "Uses")
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
Rel(SystemC, customerA, "Sends e-mails to")
UpdateElementStyle(customerA, $fontColor="red", $bgColor="grey", $borderColor="red")
UpdateRelStyle(customerA, SystemAA, $textColor="blue", $lineColor="blue", $offsetX="5")
UpdateRelStyle(SystemAA, SystemE, $textColor="blue", $lineColor="blue", $offsetY="-10")
UpdateRelStyle(SystemAA, SystemC, $textColor="blue", $lineColor="blue", $offsetY="-40", $offsetX="-50")
UpdateRelStyle(SystemC, customerA, $textColor="red", $lineColor="red", $offsetX="-50", $offsetY="20")
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")
Mindmaps
```mermaid
mindmap
root((mindmap))
Origins
Long history
::icon(fa fa-book)
Popularisat'n
British popular psychology author Tony Buzan
Research
On effectiveness<br/>and features
On Automatic creat'n
Uses
Creative techniques
Strategic plann'n
Argument mapp'n
Tools
Pen an' paper
Merrrmaid
```
mindmap
root((mindmap))
Origins
Long history
::icon(fa fa-book)
Popularisat'n
British popular psychology author Tony Buzan
Research
On effectiveness<br/>and features
On Automatic creat'n
Uses
Creative techniques
Strategic plann'n
Argument mapp'n
Tools
Pen an' paper
Merrrmaid
Timeline
```mermaid
timeline
title History o' Social Media Platform
2002 : LinkedIn
2004 : Facebook
: Google
2005 : Youtube
2006 : Twitter
```
timeline
title History o' Social Media Platform
2002 : LinkedIn
2004 : Facebook
: Google
2005 : Youtube
2006 : Twitter
```mermaid
xychart-beta
title "Sales Revenue"
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
```
xychart-beta
title "Sales Revenue"
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis "Revenue (in $)" 4000 --> 11000
bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
Block Diagram
```mermaid
block-beta
columns 1
db(("DB"))
blockArrowId6<[" "]>(down)
block:ID
A
B["A wide one 'n th' middle"]
C
end
space
D
ID --> D
C --> D
style B fill:#969,stroke:#333,stroke-width:4px
```
block-beta
columns 1
db(("DB"))
blockArrowId6<[" "]>(down)
block:ID
A
B["A wide one 'n th' middle"]
C
end
space
D
ID --> D
C --> D
style B fill:#969,stroke:#333,stroke-width:4px
```mermaid
architecture-beta
group api(cloud)[API]
service db(database)[Database] 'n api
service disk1(disk)[Storage] 'n api
service disk2(disk)[Storage] 'n api
service server(server)[Server] 'n api
db:L -- R:server
disk1:T -- B:server
disk2:T -- B:db
```
architecture-beta
group api(cloud)[API]
service db(database)[Database] 'n api
service disk1(disk)[Storage] 'n api
service disk2(disk)[Storage] 'n api
service server(server)[Server] 'n api
db:L -- R:server
disk1:T -- B:server
disk2:T -- B:db
Notice
Th' notice shortcode shows various types o' disclaimers wit' adjust'ble color, title an' ay'con t' help ye structure yer plank.
There may be pirates
It be all about th' boxes.
Usage
> [!primary] There may be pirates
> It be all about th' boxes.
{{%noticestyle="primary"title="There may be pirates"ay'con="skull-crossbones"%}}Itbeallaboutth'boxes.{{%/notice%}}
{{%noticeprimary"There may be pirates""skull-crossbones"%}}Itbeallaboutth'boxes.{{%/notice%}}
{{partial"shortcodes/notice.html"(dict"page"."style""primary""title""There may be pirates""icon""skull-crossbones""content""It be all about th' boxes.")}}
Callout rules has limited features as it does not provide all o' th' below parameter. Nevertheless, it be widely avail'ble 'n other Marrrkdown parsers like wit' GitHub alerts or Obsidian callouts an' therefore be th' recommend rules fer generat'n port'ble Marrrkdown.
If ye want t' display a transparent expand'ble box without any border, ye can also use th' expand shortcode.
Parameter
Name
Posit'n
Default
Notes
style
1
default
Th' style scheme used fer th' box.
- by severity: caut'n, important, info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, cyan, green, grey, magenta, orange, red - by special color: default, transparent, code
Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.
- fer severity styles: a nice match'n color fer th' severity - fer all other styles: th' correspond'n color
This be not avail'ble us'n callout rules.
title
2
see notes
Arbitrary text fer th' box title. Depend'n on th' style there may be a default title. Any given value will overwrite th' default.
- fer severity styles: th' match'n title fer th' severity - fer all other styles: <empty>
If ye want no title fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
ay'con
3
see notes
Font Awesome ay'con name set t' th' left o' th' title. Depend'n on th' style there may be a default ay'con. Any given value will overwrite th' default.
- fer severity styles: a nice match'n ay'con fer th' severity - fer all other styles: <empty>
If ye want no ay'con fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
This be not avail'ble us'n callout rules.
expanded
<empty>
Whether t' draw an expander an' how th' rrrambl'n be displayed.
- <empty>: no expander be drawn an' th' rrrambl'n be permanently shown - true: th' expander be drawn an' th' rrrambl'n be initially shown - false: th' expander be drawn an' th' rrrambl'n be initially hidden
<content>
<empty>
Arbitrary text t' be displayed 'n box.
Sett'ns
Defin'n own Styles
Opt'n Besides th' predefined style values from above, ye be able t' define yer own.
Th' style parameter used 'n a shortcode must match th' identifier 'n th' configurat'n. Th' title fer th' style will be determined from th' configured title. If no title but a i18n be set, th' title will be taken from th' translat'n files by that key. Th' title may be empty 'n which case, th' box does not contain a default title. ay'con an' color be work'n similar.
Ye can also redefine th' predefined styles if you’re not satisfied wit' th' default values.
> [!CAUTION]
> Advises about risks or negative outcomes o' certain act'ns.
> [!IMPORTANT]
> Key informat'n users need t' know t' achieve their goal.
> [!INFO]
> Informat'n that users <ins>_might_</ins> find interest'n.
> [!NOTE]
> Useful informat'n that users should know, even when skimm'n rrrambl'n.
> [!TIP]
> Helpful advice fer do'n th'ns better or more easily.
> [!WARNING]
> Urgent info that needs immediate user attent'n t' avoid problems.
Caut'n
Advises about risks or negative outcomes o' certain act'ns.
Important
Key informat'n users need t' know t' achieve their goal.
Ahoi
Informat'n that users might find interest'n.
Avast
Useful informat'n that users should know, even when skimm'n rrrambl'n.
Smarrrt Arrrse
Helpful advice fer do'n th'ns better or more easily.
Arrr
Urgent info that needs immediate user attent'n t' avoid problems.
Wit' User-Defined Color, Font Awesome Brand Ay'con an' Marrrkdown 'n Title an' Rrrambl'n
{{%noticecolor="fuchsia"title="**Hugo** be _awesome_"ay'con="fa-fw fab fa-hackerrank"%}}Yecanaddstandardmarkdownrules:-multipleparagraphs-bulletpointlists-_emphasized_,**bold**an'even**_boldemphasized_**text-[links](https://example.com)
-etc.[^etc][^etc]:EtCetera(English:/ɛtˈsɛtərə/),abbreviatedt'etc.,etc,etcet.,beaLatinexpressionthatbeused'nEnglisht'mean"and other similar things",or"and so forth"```plaintext
...and even source code
```>th'possibilitiesbeendless(almost-includ'nothershorrrtcodesmayormaynotwork)(almost-includ'nothershorrrtcodesmayormaynotwork){{%/notice%}}
th' possibilities be endless (almost - includ'n other shorrrtcodes may or may not work) (almost - includ'n other shorrrtcodes may or may not work)
Et Cetera (English: /ɛtˈsɛtərə/), abbreviated t' etc., etc, et cet., be a Latin expression that be used 'n English t' mean “and other similar things”, or “and so forth” ↩︎
If ye want t' print out (or generate a PDF) from yer OpenAPI documentat'n, don’t initiate print'n directly from th' plank because th' elements be optimized fer interactive usage 'n a browser.
Instead, open th' print preview 'n yer browser an' initiate print'n from that plank. This plank be optimized fer read'n an' expands most o' th' avail'ble sections.
Opt'nFront Matter Ye can use openapi.errorlevel t' control what should happen if a local OpenAPI specificat'n link can not be resolved t' a resource.
If not set or empty, any unresolved link be written as given into th' result'n output. If set t' warning th' same happens an' an additional warning be printed 'n th' built console. 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. Th' file must be a resource o' th' plank or th' ship.
In case ye want do use a different version o' th' Swagger UI library but don’t want t' override th' shipped version, ye can set customOpenapiURL t' th' URL o' th' external Swagger UI library.
Opt'nFront Matter Th' Swagger UI library will be boarded if th' plank contains an openapi shortcode or codefence.
Ye can force load'n th' Swagger UI library if no shortcode or codefence was used by sett'n openapi.force=true. If a shortcode or codefence was found, th' opt'n has no effect. This comes handy 'n case ye be us'n script'n t' render a spec.
[openapi]force=true
openapi:force:true
{"openapi":{"force":true}}
Sett'n a Specific Swagger UI Theme
Th' recommended way t' configure yer Swagger UI theme be t' set th' default value us'n th' --OPENAPI-theme vari'ble 'n yer color variant stylesheet. This allows yer specs t' look pretty when th' user switches th' color variant.
Multilanguage features be not supported directly by th' shortcode but rely on Hugo’s handl'n fer resource translat'ns applied when th' theme iterates over all avail'ble resources.
Parameter
Name
Default
Notes
style
transparent
Th' style scheme used fer th' box.
- by severity: caut'n, important, info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, cyan, green, grey, magenta, orange, red - by special color: default, transparent, code
Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.
- fer severity styles: a nice match'n color fer th' severity - fer all other styles: th' correspond'n color
title
see notes
Arbitrary text fer th' box title. Depend'n on th' style there may be a default title. Any given value will overwrite th' default.
- fer severity styles: th' match'n title fer th' severity - fer all other styles: Resources
If ye want no title fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
ay'con
see notes
Font Awesome ay'con name set t' th' left o' th' title. Depend'n on th' style there may be a default ay'con. Any given value will overwrite th' default.
- fer severity styles: a nice match'n ay'con fer th' severity - fer all other styles: paperclip
If ye want no ay'con, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
expanded
<empty>
Whether t' draw an expander an' how th' resource list be displayed.
- <empty>: no expander be drawn an' th' resource list be permanently shown - true: th' expander be drawn an' th' resource list be initially shown - false: th' expander be drawn an' th' resource list be initially hidden
For further examples fer style, color, title an' ay'con, see th' notice shortcode documentat'n. Th' parameter be work'n th' same way fer both shorrrtcodes, besides hav'n different defaults.
SiteParam
Th' siteparam shortcode prints values o' params contained 'n yer hugo.toml.
If ye want multiple tabs grouped together ye can wrap yer tabs into th' tabs shortcode.
If ye want further opt'ns when us'n a single code tab, ye can also use th' highlight shortcode.
Parameter
Name
Default
Notes
style
see notes
Th' style scheme used fer th' tab. If ye don’t set a style an' ye display a single code block inside o' th' tab, its default styl'n will adapt t' that o' a code block. Otherwise default be used.
- by severity: caut'n, important, info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, cyan, green, grey, magenta, orange, red - by special color: default, transparent, code
Th' CSS color value t' be used. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.
- fer severity styles: a nice match'n color fer th' severity - fer all other styles: th' correspond'n color
title
see notes
Arbitrary title fer th' tab. Depend'n on th' style there may be a default title. Any given value will overwrite th' default.
- fer severity styles: th' match'n title fer th' severity - fer all other styles: <empty>
If ye want no title fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
ay'con
see notes
Font Awesome ay'con name set t' th' left o' th' title. Depend'n on th' style there may be a default ay'con. Any given value will overwrite th' default.
- fer severity styles: a nice match'n ay'con fer th' severity - fer all other styles: <empty>
If ye want no ay'con fer a severity style, ye have t' set this parameter t' " " (a non empty str'n filled wit' spaces)
This will set th' background t' a lighter version o' th' chosen style color as configured 'n yer theme variant.
Only th' color parameter be set.
This will set th' background t' a lighter version o' th' chosen CSS color value.
Th' style parameter affects how th' color parameter be applied.
Th' default style will set th' background t' yer --MAIN-BG-color as configured fer yer theme variant resembl'n th' default style but wit' different color.
Th' style parameter be set t' a severity style.
This will set th' background t' a lighter version o' th' chosen style color as configured 'n yer theme variant an' also affects th' chosen ay'con.
Th' style parameter affects how th' color parameter be applied.
This will set th' background t' a lighter version o' th' chosen CSS color value an' also affects th' chosen ay'con.
Tabs
Th' tabs shortcode displays arbitrary rrrambl'n 'n an unlimited number o' tabs.
If ye just want a single tab ye can instead call th' tab shortcode standalone.
Also follow th' above link t' see th' parameter fer a nested tab.
Parameter
Name
Default
Notes
groupid
<random>
Arbitrary name o' th' group th' tab view belongs t'.
Tab views wit' th' same groupid sychr'nize their selected tab. Th' tab select'n be restored automatically based on th' groupid fer tab view. If th' selected tab can not be found 'n a tab group th' first tab be selected instead.
This sychronizat'n applies t' th' whole ship!
style
<empty>
Sets a default value fer every contained tab. Can be overridden by each tab. See th' tab shortcode fer poss'ble values.
color
<empty>
Sets a default value fer every contained tab. Can be overridden by each tab. See th' tab shortcode fer poss'ble values.
In case ye want t' nest tab views, th' parent tab that contains nested tab views needs t' be declared wit' {{< tab >}} instead o' {{% tab %}}. Avast, that 'n this case it be not poss'ble t' put markdown 'n th' parent tab.
Ye can also set style an' color parameter fer all tabs an' overwrite them on tab level. See th' tab shortcode fer poss'ble values.