Th' theme be a fork o' th' great Learrrn theme wit' th' aim o' fix'n long outstand'n bugs an' adapt'n t' latest Cap'n Hugo features. As far as poss'ble this theme tries t' be a drop-in replacement fer th' Learrrn theme.
Th' Relearrrn theme be licensed under th' MIT License.
Credits
This theme would not be poss'ble without th' work o' many others.
Subsct'ns o' Cap'n Hugo Relearrrn Theme
T' chapterrr 1
Basics
Discover what this Cap'n Hugo theme be all about an' th' core-concepts behind it.
Subsct'ns o' Basics
What's New
Arrr! Pirrrates
Fello' pirrrates, grog made us dizzy! Be awarrre some stuff may look weird in this trrranslat'n. Like Merrrmaids, do'n math or chemistrrry and stuff.
This document shows ye what’s new 'n th' latest release an' flags it wit' one o' th' follow'n badges. For a detailed list o' changes, see th' history plank.
0.110.0 Th' minimum required Cap'n Hugo version.
Break'n A change that requires act'n by ye after upgrad'n t' assure th' ship be still functional.
Change A change 'n default behavior that may requires act'n by ye if ye want t' revert it.
New Marks new behavior ye might find interest'n or comes configur'ble.
5.24.0.beta
0.110.0 This release requires a newer Cap'n Hugo version.
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' syntaxhighlightn'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 Ye now can configure additional opt'ns fer every theme variant 'n yer config.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, set different colors (if ye be us'n monochrome SVGs) or even different ay'cons (handy if ye want t' adjust colors fer PNGs, GIFs or JPGs) an' now allows fer multiple auto mode variants that adjust t' th' light/dark preference o' yer OS sett'ns.
5.23.0 (2023-11-03)
Change Wit' 0.120.0 th' author sett'ns move into th' [params] array 'n yer config.toml. Because this collides wit' th' previous way, th' theme expected author informat'n, it now adheres t' Cap'n Hugo standards an' prints out a warning dur'n built if someth'n be wrong.
Change yer previous sett'n from
[params]author="Hugo"
t'
[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 config.toml by add'n disableTermBreadcrumbs=true.
New Taxonomy an' term planks be now allowed t' contain rrrambl'n. This be added inbetween th' title an' th' plank list.
New It be now poss'ble t' print custom taxonomies anywhere 'n yer plank. See th' docs.
New It be now poss'ble t' adjust th' menu width fer yer whole ship. See th' docs.
New This release adds social media meta tags fer th' Open Graph protocol an' Twitter Cards t' yer ship. See th' docs.
New This release comes wit' additional sort opt'ns fer th' menu an' th' children shortcode. Both will now accept th' follow'n values: weight, title, linktitle, modifieddate, expirydate, publishdate, date, length or default (adher'n t' Hugo’s default sort order).
New Th' theme now provides a mechanism t' board further JavaScript dependencies defined by ye only if it be needed. This comes 'n handy if ye want t' add own shorrrtcodes that depend on additional JavaScript code t' be boarded. See th' docs.
New Th' theme has updated its Merrrmaid dependency t' 10.6.0. This adds support fer th' xychart type.
New This release adds port'ble Marrrkdown links.
Previously it was not poss'ble t' use pure Marrrkdown links 'n a configurat'n independend 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 independend o' any configurat'n sett'ns or th' plank types involved 'n link'n. Avast, that this requires yer links t' be given without any extension, so [generator](generator/index.html) will work as before.
Th' follow'n types o' link'n be supported:
link
descript'n
[generator](en/basics/generator)
absolute from yer project root (multilang)
[generator](/en/basics/generator)
absolute from yer project root (multilang)
[generator](basics/generator)
absolute from yer current language root
[generator](/basics/generator)
absolute from yer current language root
[generator](./../generator)
relative from th' current plank
[generator](../generator)
relative from th' current plank
5.22.0 (2023-10-02)
Change This release fixes an issue whar' 'n unfortunate condit'ns DOM ids generated by Cap'n Hugo may collide wit' DOM ids set by th' theme. T' avoid this, all theme DOM ids be now prefixed wit' R-.
If ye haven’t modified anyth'n, everyth'n be fine. Otherwise ye have t' check yer custom CSS rules an' JavaScript code.
Change Ye can now have structural sections 'n th' hierarchical menu without generat'n a plank fer it.
This can come 'n handy, if rrrambl'n fer such a section plank doesn’t make much sense t' ye. See th' documentat'n fer how t' do this.
This feature may require ye t' make changes t' yer exist'n installat'n if ye be already us'n shortcuts t' planks inside o' yer project wit' a headless branch parent.
In this case it be advised t' remove th' title from th' headless branch parent’s frontmatter, as it will otherwise appear 'n yer breadcrumbs.
New It be now poss'ble t' overwrite th' sett'n fer collapsibleMenu o' yer config.toml inside o' a page’s frontmatter.
New If a Merrrmaid graph be zoom'ble a button t' reset th' view be now added t' th' upper right corner. Th' button be only shown once th' mouse be moved over th' graph.
New It be now poss'ble t' remove th' root breadcrumb by sett'n disableRootBreadcrumb=true 'n yer config.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 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 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 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' syntaxhighlightn'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' syntaxhighlightn'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 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 config.toml or fer each plank thru frontmatter.
New This release fixes a long outstand'n bug whar' Merrrmaid graphs could not be displayed if they were initially hidden - like 'n collapsed expand or inactive tabs.
New Restored compatibility wit' Cap'n Hugo versions lower than 0.111.0 fer th' highlight shortcode. This does not change th' minimum required Cap'n Hugo version.
5.19.0 (2023-08-12)
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 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 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 aswell as t' some other click'ble areas 'n th' theme. If you’ve overwritten some theme styles 'n yer own CSS, keep this 'n mind.
New Restored compatibility wit' Cap'n Hugo 0.95.0 or higher. This does not change th' minimum required Cap'n Hugo version.
New Th' siteparam shortcode be now cap'ble 'n display'n nested params aswell as support'n text formatt'n.
5.17.0 (2023-06-22)
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 config.toml.
New Restored compatibility wit' Cap'n Hugo 0.114.0 or higher. This does not change th' minimum required Cap'n Hugo version.
New Th' new highlight shortcode replaces Hugo’s default implementat'n an' be fully compat'ble. So ye don’t need t' change anyth'n.
In addit'n it offers some extensions. Currently only th' wrap extension opt'n be provided t' control whether a code block should be wrapped or scrolled if t' long t' fit.
5.16.0 (2023-06-10)
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' documenat'n.
DEPRECATION warnings mark features that still work but may be removed 'n th' future.
UNSUPPORTED warnings mark features that will not work anymore.
Change Th' 404 error plank was revamped. Hopefully ye will not see this very often.
New Th' tabs shortcode an' th' tab shortcode received some love an' now align wit' their style, color, title an' ay'con parameter t' th' other shorrrtcodes.
Th' visuals be now slightly different compared t' previous versions. Most note'ble, if ye now display a single code block 'n a tab, its default styl'n will adapt t' that o' a code block but wit' a tab handle at th' top.
Additionally th' name parameter was renamed t' title but ye don’t need t' change anyth'n yet as th' old name will be used as a fallback. Nevertheless ye will get deprecat'n warnings while execut'n Hugo.
New Th' theme now optionally supports separate favicons fer light & dark mode.
5.15.0 (2023-05-29)
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 compatiblity issues wit' newer Cap'n Hugo versions. Ye must switch t' leaf bundles or be locked t' Cap'n Hugo < 0.112.0 fer now.
It be planned t' refactor th' attchments shortcode 'n th' future. This will make it poss'ble t' use th' shortcode 'n branch bundles again but not 'n simple planks anymore. This will most likely come wit' a break'n change.
Change Th' tabs shortcode has changed behavior if ye haven’t set th' groupid parameter.
Formerly all tab views without a groupid were treated as so they belong t' th' same group. Now, each tab view be treated as it was given a unique id.
New Th' already known 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 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 config.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 config.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 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 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 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 Th' theme removed th' popular jQuery library from its distribut'n.
In case ye made changes t' th' theme that be dependend 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 config.toml.
Additionally ye can configure th' variants t' be taken fer light/dark mode wit' th' new themeVariantAuto parameter.
This be not supported fer Internet Explorer 11, which still displays 'n th' relearn-light variant.
Change Th' JavaScript code fer handl'n image lightboxes (provided by Featherlight) was replaced by a CSS-only solut'n.
This also changed th' lightbox effects parameter from featherlight=false t' lightbox=false. Nevertheless ye don’t need t' change anyth'n as th' old name will be used as a fallback.
Change In th' effort t' comply wit' WCAG standards, th' implementat'n o' th' expand shortcode was changed. While Internet Explorer 11 has issues 'n display'n it, th' functionality still works.
New Translat'n into Czech. This language be not supported fer search.
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 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 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 aswell.
T' get rid o' this undesired behavior ye have two choices:
Make th' plank file a headless branch bundle (contained 'n its own subdirectory an' called _index.md) an' add th' follow'n frontmatter configurat'n t' th' file (see exampleSite’s content/showcase/_index.en.md). This causes its rrrambl'n t' not be ontained 'n th' sitemap.
Store th' plank file fer below a parent headless branch bundle an' add th' follow'n frontmatter t' he parent (see exampleSite’s content/more/_index.en.md).
# title = "More" ### ATTENTION: Don't give this plank a title as this will cause it t' be 'n th' breadcrumbs - a th'n ye most likely don't want[_build]render="never"list="never"publishResources=false
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"
Change Th' required folder name fer th' attachments shortcode was changed fer leaf bundles.
Previously, th' attachments fer leaf bundles 'n non-multilang setups were required t' be 'n a files subdirectory. For plank bundles an' leaf bundles 'n multilang setups they were always required t' be 'n a _index.<LANGCODE>.files or index.<LANGCODE>.files subdirectory accordingly.
This added unnessessary 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 compatiblity.
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 config.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 highlightn'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 Th' Korean language translat'n fer this theme be now avail'ble wit' th' language code ko. Formerly th' country code kr was used instead.
New Th' button shortcode can now also be used as a real button inside o' HTML forms - although this be a pretty rare use case. Th' documentat'n was updated accordingly.
New Th' search now supports th' Korean language.
5.6.0 (2022-11-18)
New This release introduces an additional dedicated search plank. On this plank, displayed search results have more space mak'n it easier scann'n thru large number o' results.
T' activate this feature, ye need t' configure it 'n yer config.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' the 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 config.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' 5.x releases. Th' theme now heavily caches partial results lead'n t' improved performance. T' further increase performance, unnecessary parts o' th' plank be now skipped fer creat'n o' th' print output (eg. menus, navigat'n bar, etc.).
5.5.0 (2022-11-06)
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 config.toml yer plank be now serv'ble from th' local file system us'n file:// URLs.
Please note that th' searchbox will only work fer this if ye reconfigure yer outputformat fer th' homepage 'n yer config.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 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).
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 If you’ve set collapsibleMenu = true 'n yer config.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)
0.95.0 This release requires a newer Cap'n Hugo version.
Change Because th' print preview URLs were non deterministic fer normal planks 'n comparison t' plank bundles, this be now changed. Each print preview be now access'ble by add'n a index.print.html t' th' default URL.
Ye can revert this behavior by overwrit'n th' PRINT output format sett'n 'n yer config.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 Th' way archetypes be used t' generate output has changed. Th' new systems allows ye, t' redefine exist'n archetypes or even generate yer own ones.
Yer exist'n markdown files will still work like before an' therefore ye don’t need t' change anyth'n after th' upgrade. Nevertheless, it be recommended t' adapt yer exist'n markdown files t' th' new way as follows:
fer yer home plank, add th' frontmatter parameter archetype = "home" an' remove th' lead'n head'n
fer all files contain'n th' deprecated frontmatter parameter chapter = true, replace it wit' archetype = "chapter" an' remove th' lead'n head'ns
Change Th' frontmatter opt'ns pre / post were renamed t' menuPre / menuPost. Th' old opt'ns will still be used if th' new opt'ns aren’t set. Therefore ye don’t need t' change anyth'n after th' upgrade.
New Add'n new partials heading-pre.html / heading-post.html an' accord'n frontmatter opt'ns headingPre / headingPost t' modify th' way yer page`s main head'n gets styled.
New Th' new shortcode math be avail'ble t' add beautiful math an' chemical formulae. See th' documentat'n fer avail'ble features. This feature will not work wit' Internet Explorer 11.
4.2.0 (2022-06-23)
Break'n Th' second parameter fer th' include shortcode was switched 'n mean'n an' was renamed from showfirsthead'n t' hidefirsthead'n. If ye haven’t used this parameter 'n yer shortcode, th' default behavior hasn’t changed an' ye don’t need t' change anyth'n.
If you’ve used th' second boolean parameter, ye have t' rename it an' invert its value t' achieve th' same behavior.
Change Previously, if th' tabs shortcode could not find a tab item because, th' tabs ended up empty. Now th' first tab be selected instead.
Change Th' landingPageURL was removed from config.toml. Ye can safely remove this as well from yer configurat'n as it be not used anymore. Th' theme will detect th' land'n plank URL automatically an' will point t' th' project’s homepage. If ye want t' support a different link, overwrite th' logo.html partial.
New All shorrrtcodes can now be also called from yer partials. Examples fer this be added t' th' documentat'n o' each shortcode.
Break'n Th' custom_css config parameter was removed from th' configurat'n. If used 'n an exist'n installat'n, it can be achieved by overrid'n th' custom-header.html template 'n a much more generic manner.
Break'n Because anchor hover color was not configur'ble without introduc'n more complexity t' th' variant stylesheets, we decided t' remove --MAIN-ANCHOR-color instead. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' anchors now get their colors from --MAIN-LINK-color an' --MAIN-ANCHOR-HOVER-color respectively.
New All shorrrtcodes now support named parameter. Th' positional parameter be still supported but will not be enhanced wit' new features, so ye don’t need t' change anyth'n 'n yer installat'n.
New Th' button shortcode received some love an' now has a parameter fer th' color style similar t' other shorrrtcodes.
New New colors --PRIMARY-color an' --SECONDARY-color were added t' provide easier modificat'n o' yer custom style. Shorrrtcodes wit' a color style can now have primary or secondary as additional values.
These two colors be th' default fer other, more specific color variables. Ye don’t need t' change anyth'n 'n yer exist'n custom color stylesheets as those variables get reason'ble default values.
New Translat'n into Polish. This language be not supported fer search.
New Th' documentat'n fer all shorrrtcodes were revised.
3.4.0 (2022-04-03)
Break'n If ye had previously overwritten th' custom-footer.html partial t' add visual elements below th' rrrambl'n o' yer plank, ye have t' move this rrrambl'n t' th' new partial content-footer.html. custom-footer.html was never meant t' contain HTML other than additional styles an' JavaScript.
New If ye prefer expandable/collaps'ble menu items, ye can now set collapsibleMenu=true 'n yer config.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 config.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 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)
0.93.0 This release requires a newer Cap'n Hugo version.
Change In this release th' Merrrmaid JavaScript library will only be boarded on demand if th' plank contains a Merrrmaid shortcode or be us'n Merrrmaid codefences. This changes th' behavior o' disableMermaid config opt'n as follows: If a Merrrmaid shortcode or 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 codefence be involved an' th' library be not boarded by default. In this case ye can set disableMermaid=false 'n yer frontmatter t' force th' library t' be boarded. See th' theme variant generator o' th' exampleSite fer an example.
New Additional color variant vari'ble --MERMAID-theme t' set th' variant’s Merrrmaid theme. This causes th' Merrrmaid theme t' switch wit' th' color variant if it defers from th' sett'n o' th' formerly selected color variant.
3.1.0 (2022-03-15)
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 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 config.toml. If ye still want t' use th' Learrrn color variant, ye have t' explicitly set themeVariant="learn" 'n yer config.toml.
Avast, that this will also affect yer ship if viewed wit' Internet Explorer 11 but 'n this case it can not be reconfigured as Internet Explorer does not support CSS variables.
Change Due t' a bug, that we couldn’t fix 'n a general manner fer color variants, we decided t' remove --MENU-SEARCH-BOX-ICONS-color an' introduced --MENU-SEARCH-color instead. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' old name will be used as a fallback.
Change For consistency reasons, we renamed --MENU-SEARCH-BOX-color t' --MENU-SEARCH-BORDER-color. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' old name will be used as a fallback.
New Wit' this release ye be now cap'ble t' define yer own dark mode variants.
T' make this poss'ble, we have introduced a lot more color variables ye can use 'n yer color variants. Yer old variants will still work an' don’t need t' be changed as appropriate fallback values be used by th' theme. Nevertheless, th' new colors allow fer much more customizat'n.
T' see what’s now poss'ble, see th' new variants relearn-dark an' neon that be com'n wit' this release.
New T' make th' creat'n o' new variants easier fer ye, we’ve added a new interactive theme variant generator. This feature will not work wit' Internet Explorer 11.
New Ye can now configure multiple color variants 'n yer config.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.
2.9.0 (2021-11-19)
Break'n This release removes th' themes implementat'n o' ref/relref 'n favor fer Hugos standard implementat'n. This be because o' inconsistencies wit' th' themes implementat'n. In advantage, yer project becomes standard compliant an' exchang'n this theme 'n yer project t' some other theme will be effortless.
In a standard compliant form ye must not link t' th' *.md file but t' its logical name. You’ll see, referenc'n other planks becomes much easier. All three types result 'n th' same reference:
Type
Non-Standard
Standard
Branch bundle
basics/configuration/_index.md
basics/configurat'n
Leaf bundle
basics/configuration/index.md
basics/configurat'n
Plank
basics/configurat'n.md
basics/configurat'n
If you’ve linked from a plank o' one language t' a plank o' another language, conversion be a bit more difficult but Cap'n Hugo got ye covered as well.
Also, th' old themes implementat'n allowed refs t' non-exist'n rrrambl'n. This will cause Hugos 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' Hugos implementat'n.
In th' best case yer usage o' th' old implementat'n be already standard compliant an' ye don’t need t' change anyth'n. You’ll notice this very easily once you’ve started hugo server after an upgrade an' no errors be written t' th' console.
Ye may see errors on th' console after th' update 'n th' form:
ERROR 2021/11/19 22:29:10 [en] REF_NOT_FOUND: Ref "basics/configuration/_index.md": "hugo-theme-relearn\exampleSite\content\_index.en.md:19:22": plank not found
In this case, ye must apply one o' two opt'ns:
Start up a text editor wit' regular expression support fer search an' replace. Search fer (ref\s+"[^"]*?)(?:/_index|/index)?(?:\.md)?(#[^"]*?)?" an' replace it by $1$2" 'n all *.md files. This be th' recommended choice.
Copy th' old implementat'n files theme/hugo-theme-relearn/layouts/shortcode/ref.html an' theme/hugo-theme-relearn/layouts/shortcode/relref.html t' yer own projects layouts/shortcode/ref.html an' layouts/shortcode/relref.html respectively. This be not recommended as yer project will still rely on non-standard behavior afterwards.
2.8.0 (2021-11-03)
Change Although never officially documented, this release removes th' font Novacento/Novecento. If ye use it 'n an overwritten CSS please replace it wit' Work Sans. This change was necessary as Novacento did not provide all Latin special characters an' lead t' mixed styled character text eg. fer Czech.
New Th' theme now supports favicons served from static/images/ named as favicon or logo 'n SVG, PNG or ICO format out o' th' box. An overridden partial layouts/partials/favicon.html may not be necessary anymore 'n most cases.
New Ye can hide th' t'ble o' contents menu fer th' whole ship by sett'n th' disableToc opt'n 'n yer config.toml. For an example see th' example configurat'n.
2.7.0 (2021-10-24)
New Optional second parameter fer notice shortcode t' set title 'n box header.
2.6.0 (2021-10-21)
New Yer ship can now be served from a subfolder if ye set baseURL an' canonifyURLs=true 'n yer config.toml. See th' documentat'n fer a detailed example.
2.5.0 (2021-10-08)
Change New colors --CODE-BLOCK-color an' --CODE-BLOCK-BG-color were added t' provide a fallback fer Hugos 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 Creat'n o' customized stylesheets was simplified down t' only contain th' CSS variables. Everyth'n else can an' should be deleted from yer custom stylesheet t' assure everyth'n works fine. For th' predefined stylesheet variants, this change be already included.
New Hidden planks be displayed by default 'n their accord'n tags plank. Ye can now turn off this behavior by sett'n disableTagHiddenPages=true 'n yer config.toml.
New Ye can define th' expansion state o' yer menus fer th' whole ship by sett'n th' alwaysopen opt'n 'n yer config.toml. Please see further documentat'n fer poss'ble values an' default behavior.
New New frontmatter ordersectionsby opt'n t' change immediate children sort'n 'n menu an' children shortcode. Poss'ble values be title or weight.
New Alternate rrrambl'n o' a plank be now advertised 'n th' HTML meta tags. See Cap'n Hugo documentat'n.
2.3.0 (2021-09-13)
0.81.0 This release requires a newer Cap'n Hugo version.
New Showcase multilanguage features by provid'n a documentat'n translat'n “fer us pirrrates”. There will be no other translat'ns besides th' original English one an' th' Pirates one due t' maintenance constraints.
2.2.0 (2021-09-09)
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 config.toml.
2.1.0 (2021-09-07)
0.69.0 This release requires a newer Cap'n Hugo version.
Change In case th' site’s structure contains additional *.md files not part o' th' ship (eg files that be meant t' be included by ship planks - see CHANGELOG.md 'n th' exampleSite), they will now be ignored by th' search.
New Hidden planks be indexed fer th' ship search by default. Ye can now turn off this behavior by sett'n disableSearchHiddenPages=true 'n yer config.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 Rules highlight'n was switched t' th' built 'n Hugo mechanism. Ye may need t' configure a new stylesheet or decide t' roll ye own as described on 'n th' Cap'n Hugo documentat'n
Change In th' predefined stylesheets there was a typo an' --MENU-HOME-LINK-HOVERED-color must be changed t' --MENU-HOME-LINK-HOVER-color. Ye don’t need t' change anyth'n 'n yer custom color stylesheet as th' old name will be used as a fallback.
Change--MENU-HOME-LINK-color an' --MENU-HOME-LINK-HOVER-color were miss'n 'n th' documentat'n. Ye should add them t' yer custom stylesheets if ye want t' override th' defaults.
Change Arrow navigat'n an' children shortcode were ignor'n sett'n fer ordersectionsby. This be now changed an' may result 'n different sort'n order o' yer sub planks.
Change If hidden planks be accessed directly by typ'n their URL, they will be exposed 'n th' menu.
Change A plank without a title will be treated as hidden=true.
New Ye can define th' expansion state o' yer menus 'n th' frontmatter. Please see further documentat'n fer poss'ble values an' default behavior.
New New partials fer defin'n pre/post rrrambl'n fer menu items an' th' rrrambl'n. See documentat'n fer further read'n.
New Shortcode children wit' new parameter containerstyle.
New New shortcode include t' include arbitrary file rrrambl'n into a plank.
1.2.0 (2021-07-26)
New Shortcode expand wit' new parameter t' open on plank board.
1.1.0 (2021-07-02)
Break'nMerrrmaid diagrams can now be panned an' zoomed. This isn’t configur'ble yet.
NewMerrrmaid config opt'ns can be set 'n config.toml.
1.0.0 (2021-07-01)
0.65.0 Th' requirement fer th' Cap'n Hugo version o' this theme be th' same as fer th' Learrrn theme version 2.5.0 on 2021-07-01.
New Initial fork o' th' Learrrn theme based on Learrrn 2.5.0 on 2021-07-01. This introduces no new features besides a global rename t' Relearrrn an' a new logo. For th' reasons behind fork'n th' Learrrn theme, see this comment 'n th' Learrrn issues.
Requirrrements
Thanks t' th' simplicity o' Cap'n Hugo, this plank be as empty as this theme needs requirements.
Just download at least version 0.110.0 o' th' Cap'n Hugo binary fer yer OS (Windows, Linux, Mac).
Th' follow'n steps be here t' help ye initialize yer new website. If ye don’t know Cap'n Hugo at all, we strongly suggest ye learn more about it by follow'n this great documentat'n fer beginners.
Create yer project
Cap'n Hugo provides a new command t' create a new website.
hugo new ship <new_project>
Install th' theme
Install th' Relearrrn theme by follow'n this documentat'n us'n Hugo’s module system.
If ye install th' theme from yer git repository or GitHub, ye have several opt'ns.
If ye use th' head o' th' main branch, ye be us'n th' development version. Usually it be fully functional but can break from time t' time. We try t' fix newly introduced bugs 'n this version as soon as poss'ble.
Additionally ye can checkout one o' th' tagged versions. These tagged versions correspond t' an official releases from th' GitHub repository.
Besides th' usual version tags (eg 1.2.3) there be also tags fer th' main version (eg. 1.2.x), major version (eg. 1.x) an' th' latest (just x) released version mak'n it easier fer ye t' pin th' theme t' a certain version.
Basic configurat'n
When build'n th' website, ye can set a theme by us'n --theme opt'n. However, we suggest ye modify th' configurat'n file (config.toml) an' set th' theme as th' default. Ye can also add th' [outputs] section t' en'ble th' search functionality.
# Change th' default theme t' be use when build'n th' ship wit' Cap'n Hugotheme="hugo-theme-relearn"# For search functionality[outputs]home=["HTML","RSS","SEARCH"]
Create yer first chapter plank
Chapters be planks that contain other child planks. It has a special layout style an' usually just contains a chapter name, th' title an' a brief abstract o' th' section.
### Chapter 1
# Basics
Discover what this Cap'n Hugo theme be all about an' th' core concepts behind it.
renders as
Th' Relearrrn theme provides archetypes t' create skeletons fer yer website. Begin by creat'n yer first chapter plank wit' th' follow'n command
hugo new --kind chapter basics/_index.md
By open'n th' given file, ye should see th' property chapter=true on top, mean'n this plank be a chapter.
By default all chapters an' planks be created as a draft. If ye want t' render these planks, remove th' property draft: true from th' metadata.
Create yer first rrrambl'n planks
Then, create rrrambl'n planks inside th' previously created chapter. Here be two ways t' create rrrambl'n 'n th' chapter:
hugo new basics/first-content.md
hugo new basics/second-content/_index.md
Feel free t' edit those files by add'n some sample rrrambl'n an' replac'n th' title value 'n th' beginn'n o' th' files.
Launch'n th' website locally
Launch by us'n th' follow'n command:
hugo serve
Go t' http://localhost:1313
Ye should notice three th'ns:
Ye have a left-side Basics menu, contain'n two submenus wit' names equal t' th' title properties 'n th' previously created files.
Th' home plank explains how t' cust'mize it by follow'n th' instruct'ns.
When ye run hugo serve, when th' contents o' th' files change, th' plank automatically refreshes wit' th' changes. Neat!
Build th' website
When yer ship be ready t' deploy, run th' follow'n command:
hugo
A public folder will be generated, contain'n all static rrrambl'n an' assets fer yer website. It can now be deployed on any web server.
On top o' Hugo’s global configurat'n opt'ns, th' Relearrrn theme lets ye define further opt'ns unique t' th' theme 'n yer config.toml. Th' defaults be written 'n th' comments o' each opt'n.
Avast that some o' these opt'ns be explained 'n detail 'n other sections o' this documentat'n.
[params]# If an opt'n value be said t' be not set, ye can achieve th' same behavior# by given it an empty str'n value.################################################################################ Cap'n Hugo# These opt'ns usually apply t' other themes aswell.# 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"]# Th' descript'n o' yer ship.# Default: not set# This be used fer generat'n HTML meta tags, social media meta informat'n# fer th' opengraph protocol an' twitter cards.# This can be overridden 'n th' page's frontmatter.descript'n="Documentat'n fer Cap'n Hugo Relearrrn Theme"# 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.#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Variants# These opt'ns set yer color variant.# 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 explainat'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="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 tihs case also don't forget t'# set Hugo's disableHugoGeneratorInject=true. Otherwise Cap'n Hugo will generate a# meta tag into yer home plank anyways.disableGeneratorVersion=false# Avoid unique IDs.# Default: false# In various situat'ns th' theme generates non st'ble unique ids t' be used# 'n HTML fragment links. This can be undesir'ble fer example when test'n# th' output fer changes. If ye dis'ble th' random id generat'n, th' theme# may not funct'n correctly anymore.disableRandomIds=false# Multilanguage rrrambl'n.# Default: not set# If yer planks contain further languages besides th' main one used, add all# those auxiliary languages here. This will create a search index wit'# support fer all used languages o' yer ship.# This be handy fer example if ye be writ'n 'n Spanish but have lots o'# source code on yer plank which typically uses English terminology.additionalContentLanguage=["en"]# Additional code dependencies.# Default: See config.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' given URL be prepended t' th'# relative file path o' a th' displayed plank. Th' URL must end wit' a `/`.# This be useful if ye wnat 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/"#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Menu# These opt'ns modify th' menu apperance.# Hide th' search box.# Default: false# If th' searc box be sisabled, th' search functionality be disabled too.# This will also cause th' keyboard shortcut t' be disabled an' th' dedicated# search plank be not linked although it mighty be configured.disableSearch=false# Hide th' Home entry.# Default: false# If shown, a Home button will appear below th' search bar an' th' main menu.# It links t' yer th' home plank o' th' current language.disableLandingPageButton=true# Th' order o' main menu submenus.# Default: "weight"# Submenus can be ordered by "weight", "title", "linktitle", "modifieddate",# "expirydate", "publishdate", "date", "length" or "default" (adher'n t'# Hugo's default sort order). This can be overridden 'n th' planks frontmatter.ordersectionsby="weight"# Th' initial expand state o' submenus.# Default: not set# This controls whether submenus will be expanded (true), or collapsed (false)# 'n th' menu. If not set, th' first menu level be set t' false, all others# levels be set t' true. This can be overridden 'n th' page's frontmatter.# If th' displayed plank has submenus, they will always been displayed expanded# regardless o' this opt'n.alwaysopen=""# Shows expander fer submenus.# Default: false# If set t' true, a submenu 'n th' sidebar will be displayed 'n a collaps'ble# tree view an' a click'ble expander be set 'n front o' th' entry.collapsibleMenu=true# Shows checkmarks fer visited planks o' th' main menu.# Default: false# This also causes th' display o' th' `Clear History` entry 'n th' lower part# o' th' menu t' remove all checkmarks. Th' checkmarks will also been removed# if ye regenerate yer ship as th' ids be not st'ble.showVisitedLinks=true# Hide head'n above th' shortcut menu.# Default: false# Th' title fer th' head'n can be overwritten 'n yer i18n files. See Hugo's# documentat'n how t' do this.disableShortcutsTitle=false# Hide th' language switcher.# Default: false# If ye have more than one language configured, a language switcher be# displayed 'n th' lower part o' th' menu. This opit'n lets ye explicitly# turn this behavior off.disableLanguageSwitchingButton=false#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Hidden planks# These opt'ns configure how hidden planks be treated.# A plank flagged as hidden, be only removed from th' main menu but behaves# like any other plank fer all other functionality 'n Hugo.# 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#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 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#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Images# These opt'ns configure how images be displayed.# 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 thru URL parameter# given t' th' image. See th' documentat'n fer details.# Default: falseimageEffects.border=true# Default: trueimageEffects.lightbox=true# Default: falseimageEffects.shadow=false#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Links# These opt'ns configure how links be displayed.# How t' open external links.# Default: "_blank"# For external links ye can define how they be opened 'n yer browser. All# values fer th' HTML `target` attribute o' th' `a` element be allowed. Th'# default value opens external links 'n a separate browser tab. If ye want# t' open those links 'n th' same tab, use "_self".externalLinkTarget="_blank"# Generate link URLs th' Cap'n Hugo way.# Default: false# If set t' true, th' theme behaves like a standard Cap'n Hugo installat'n an'# appends no index.html t' prettyURLs. As a trade off, yer build project will# not be serv'ble from th' file system.disableExplicitIndexURLs=false#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# MathJax# These opt'ns configure how math formulae be displayed.# Initializat'n opt'ns fer MathJax.# Default: not set# A JSON value. See th' MathJaxdocumentat'n fer poss'ble parameter.# This can be overridden 'n th' page's frontmatter.mathJaxInitialize="{}"# Only board MathJax if needed.# Default: true# If a Math shortcode be found, th' opt'n will be ignored an'# MathJax will be boarded regardlessly. Th' opt'n be still useful 'n case ye# be us'n script'n t' set up yer graph. In this case no shortcode or# codefence be involved an' th' library be not boarded by default. In this case# ye can set `disableMathJax=false` 'n yer frontmatter t' force th' library t'# be boarded.# This can be overridden 'n th' page's frontmatter.disableMathJax=true# URL fer external MathJax library.# Default: not set# Specifies th' remote locat'n o' th' MathJax library. By default th' shipped# version will be used.# This can be overridden 'n th' page's frontmatter.customMathJaxURL=""# "https://unpkg.com/mathjax/es5/tex-mml-chtml.js"#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# Merrrmaid# These opt'ns configure how Merrrmaid graphs be displayed.# Make graphs pan'ble an' zoom'ble# Default: false# For huge graphs it can be helpful t' make them zoom'ble. Zoom'ble graphs come# wit' a reset button fer th' zoom.# This can be overridden 'n th' page's frontmatter or given as a parameter t'# individual graphs.mermaidZoom=true# Initializat'n opt'ns fer Merrrmaid.# Default: not set# A JSON value. See th' Merrrmaid documentat'n fer poss'ble parameter.# This can be overridden 'n th' page's frontmatter.mermaidInitialize="{ \"securityLevel\": \"loose\" }"# Only board Merrrmaid if needed.# Default: true# If a Merrrmaid shortcode or 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# codefence be involved an' th' library be not boarded by default. In this case# ye can set `disableMermaid=false` 'n yer frontmatter t' force th' library t'# be boarded.# This can be overridden 'n th' page's frontmatter.disableMermaid=true# URL fer external Merrrmaid library.# Default: not set# Specifies th' remote locat'n o' th' Merrrmaid library. By default th' shipped# version will be used.# This can be overridden 'n th' page's frontmatter.customMermaidURL=""# "https://unpkg.com/mermaid/dist/mermaid.min.js"#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# OpenApi# These opt'ns configure how OpenAPI specificat'ns be displayed.# Only board OpenAPI if needed.# Default: true# If a OpenAPI shortcode be found, th' opt'n will be ignored an'# OpenAPI will be boarded regardlessly. Th' opt'n be still useful 'n case ye# be us'n script'n t' set up yer graph. In this case no shortcode or# codefence be involved an' th' library be not boarded by default. In this case# ye can set `disableOpenapi=false` 'n yer frontmatter t' force th' library t'# be boarded.# This can be overridden 'n th' page's frontmatter.disableOpenapi=true# URL fer external OpenAPI library.# Default: not set# Specifies th' remote locat'n o' th' OpenAPI library. By default th' shipped# version will be used.# This can be overridden 'n th' page's frontmatter.customOpenapiURL=""# "https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"
Brrrand'n
Th' Relearrrn theme provides configurat'n opt'ns t' change yer your site’s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed thru so called color variants.
A color variant lets ye cust'mize various visual effects o' yer ship like almost any color, used fonts, color schemes o' print, rules highligtn'n, Merrrmaid an' th' OpenAPI shortcode, etc. It contains o' a CSS file an' optional configurat'n opt'ns 'n yer config.toml.
Th' Relearrrn theme ships wit' a wide set o' different color variants. Ye can use them as-is, copy them over an' use them as a start'n point fer yer customizat'ns or just create completely new variants unique t' yer ship. Th' interactive variant generator may help ye wit' this task.
Once configured 'n yer config.toml, ye can select them wit' th' variant selector at th' bottom o' th' menu.
Change th' Variant (Simple)
Single Variant
Set th' themeVariant value t' th' name o' yer theme file. That’s it! Yer ship will be displayed 'n this variant only.
[params]themeVariant="relearn-light"
Avast
Yer theme variant file must reside 'n yer site’s static/css directory or 'n th' theme’s static/css directory an' th' file name must start wit' theme- an' end wit .css. In th' above example, th' path o' yer theme file must be static/css/theme-relearn-light.css.
If ye want t' make changes t' a shipped color variant, create a copy 'n yer site’s static/css directory. Don’t edit th' file 'n th' theme’s directory!
Multiple Variants
Ye can also set multiple variants. In this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.
Th' theme provides an advanced configurat'n mode, combin'n th' functionality fer multiple variants wit' th' below possibilities o' adjust'n t' yer OS sett'ns, logo an' rules highlightn'n an' even more!
Although all opt'ns documented here be still work'n, th' advanced configurat'n opt'ns be th' recommended way t' configure yer color variants. See below.
Adjust t' OS Sett'ns
Ye can also cause th' ship t' adjust t' yer OS sett'ns fer light/dark mode. Just set th' themeVariant t' auto t' become an auto mode variant. That’s it.
Ye can use th' auto value wit' th' single or multiple variants opt'n. If ye be us'n multiple variants, ye can drop auto at any posit'n 'n th' option’s array, but usually it makes sense t' set it 'n th' first posit'n an' make it th' default.
[params]themeVariant=["auto","red"]
If ye don’t configure anyth'n else, th' theme will default t' use relearn-light fer light mode an' relearn-dark fer dark mode. These defaults be overwritten by th' first two non-auto opt'ns o' yer themeVariant opt'n if present.
In th' above example, ye would end wit' red fer light mode an' th' default o' relearn-dark fer dark mode.
If ye don’t like that behavior, ye can explicitly set themeVariantAuto. Th' first entry 'n th' array be th' color variant fer light mode, th' second fer dark mode.
[params]themeVariantAuto=["learn","neon"]
Change th' Favicon
If yer favicon be a SVG, PNG or ICO, just drop yer image 'n yer site’s static/images/ directory an' name it favicon.svg, favicon.png or favicon.ico respectively.
If ye want t' adjust yer favicon accord'n t' yer OS sett'ns fer light/dark mode, add th' image files static/images/favicon-light.svg an' static/images/favicon-dark.svg t' yer site’s directory, respectively, correspond'n t' yer file format. In case some o' th' files be miss'n, th' theme falls back t' favicon.svg fer each miss'n file. All supplied favicons must be o' th' same file format.
If no favicon file be found, th' theme will lookup th' alternative filename logo 'n th' same locat'n an' will repeat th' search fer th' list o' supported file types.
If ye need t' change this default behavior, create a new file layouts/partials/favicon.html 'n yer site’s directory an' write someth'n like this:
Create a new file 'n layouts/partials/logo.html o' yer ship. Then write any HTML ye want. Ye could use an img HTML tag an' reference an image created under th' static folder, or ye could paste a SVG definit'n!
Avast
Th' size o' th' logo will adapt automatically.
Rules Highlightn'n
If ye want t' switch th' rules highlight'n theme together wit' yer color variant, ye need t' configure yer installat'n accord'n t' Hugo’s documentat'n an' provide a rules highlight'n stylesheet file.
Ye can use a one o' th' shipped stylesheet files or use Cap'n Hugo t' generate a file fer ye. Th' file must be written t' static/css/chroma-<NAME>.css. T' use it wit' yer color variant ye have t' define --CODE-theme: <NAME> 'n th' color variant stylesheet file.
Th' theme offers a new way t' configure theme variants an' all o' th' aspects above inside o' a single configurat'n item. This comes wit' some features previously unsupported.
Like wit' th' multiple variants opt'n, ye be defin'n yer theme variants 'n an array but now not by simple str'nsbut '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 static/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 two choices:
Copy an' change
Ye can copy th' shipped variant file from th' theme’s static/css directory t' th' site’s static/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 config.toml by th' choosen name.
Create an' import
Ye can create a new variant file 'n th' site’s static/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 config.toml by th' choosen name.
For example, ye want t' use th' relearn-light variant but want t' change th' rules highlightn'n schema t' th' one used 'n th' neon variant. For that, create a new static/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:learn;/* name o' th' chroma styleheet 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 config.toml t' use yer new variant:
[params]themeVariant="my-branding"
In comparison t' copy an' change, this has th' advantage that ye profit from any adjustments t' th' relearn-light variant but keep yer modificat'ns.
Customizat'n
Serv'n yer plank from a subfolder
If yer ship be served from a subfolder, eg. https://example.com/mysite/, ye have t' set th' follow'n lines t' yer config.toml
Without canonifyURLs=true URLs 'n sublemental planks (like sitemap.xml, rss.xml) will be generated falsly while yer HTML files will still work. See https://github.com/gohugoio/hugo/issues/5226.
Serv'n yer plank from th' filesystem
If ye want yer plank served from th' filesystem by us'n URLs start'n wit' file:// you’ll need th' follow'n configurat'n 'n yer config.toml:
relativeURLs=true
Th' theme will append an additional index.html t' all plank bundle links by default t' make th' plank be serv'ble from th' file system. If ye don’t care about th' file system an' only serve yer plank via a webserver ye can also generate th' links without this change by add'n this t' yer config.toml
[params]disableExplicitIndexURLs=true
Avast
If ye want t' use th' search feature from th' file system us'n an older installat'n o' th' theme make sure t' change yer outputformat fer th' homepage from th' now deprecated JSON t' SEARCHas seen below.
Activate search
If not already present, add th' follow'n lines 'n yer config.toml file.
[outputs]home=["HTML","RSS","SEARCH"]
This will generate a search index file at th' root o' yer public folder ready t' be consumed by th' Lunr search library. Avast that th' SEARCH outputformat was named JSON 'n previous releases but was implemented differently. Although JSON still works, it be now deprecated.
Activate dedicated search plank
Ye can add a dedicated search plank fer yer plank by add'n th' SEARCHPAGE outputformat t' yer home plank by add'n th' follow'n lines 'n yer config.toml file. This will cause Cap'n Hugo t' generate a new file http://example.com/mysite/search.html.
Ye can access this plank by either click'n on th' magnifier glass or by typ'n some search term an' press'n ENTER inside o' th' menu’s search box .
Avast
T' have Cap'n Hugo create th' dedicated search plank successfully, ye must not generate th' URL http://example.com/mysite/search.html from yer own rrrambl'n. This can happen if ye set uglyURLs=true 'n yer config.toml an' defin'n a Marrrkdown file content/search.md.
T' make sure, there be no duplicate rrrambl'n fer any given URL o' yer project, run hugo --printPathWarn'ns.
Activate print support
Ye can activate print support t' add th' capability t' print whole chapters or even th' complete ship. Just add th' PRINT output format t' yer home, section an' plank 'n yer config.toml as seen below:
This will add a little printer ay'con 'n th' top bar. It will switch th' plank t' print preview when clicked. Ye can then send this plank t' th' printer by us'n yer browser’s usual print functionality.
Avast
Th' result'n URL will not be configured ugly 'n terms o' Hugo’s URL handl'n even if you’ve set uglyURLs=true 'n yer config.toml. This be due t' th' fact that fer one mime type only one suffix can be configured.
Nevertheless, if you’re unhappy wit' th' result'n URLs ye can manually redefine outputFormats.PRINT 'n yer own config.toml t' yer lik'n.
Home Button Configurat'n
If th' disableLandingPageButton opt'n be set t' false, a Home button will appear
on th' left menu. It be an alternative fer click'n on th' logo. T' edit th'
appearance, ye will have t' configure th' landingPageName fer th' defined languages:
Ye can add social media meta tags fer th' Open Graph protocol an' Twitter Cards t' yer ship. These be configured as mentioned 'n th' Cap'n Hugo docs.
Change th' Menu Width
Th' menu width adjusts automatically fer different screen sizes.
Name
Screen Width
Menu Width
S
< 48rem
0
M
48rem - 60rem
14.375rem
L
>= 60rem
18.75rem
Th' values fer th' screen width breakpoints aren’t configur'ble.
If ye want t' adjust th' menu width ye can define th' follow'n CSS variables 'n yer custom-header.html. Avast that --MENU-WIDTH-S doesn’t exist as th' menu be always hidden fer small screen sizes.
Certain shorrrtcodes make use o' additional JavaScript files. Th' theme only loads these dependencies if th' shortcode be used. T' do so correctly th' theme adds management code 'n various files.
Ye can ye use this mechanism 'n yer own shorrrtcodes. Say ye want t' add a shortcode myshortcode that also requires th' jquery JavaScript library.
Write th' shortcode file layouts/shortcodes/myshortcode.html an' add th' follow'n line
Add th' dependency loader file layouts/partials/dependencies/myshortcode.html. Th' loader file will be appended t' yer header or footer, dependend on th' locat'n sett'n 'n yer config.toml.
th' name sett'n 'n yer config.toml must match th' key (that needs t' be prefixed wit' a has) ye used fer th' store 'n yer layouts/shortcodes/myshortcode.html.
th' key on params.relearn.dependencies 'n yer config.toml must match th' base file name o' yer loader file.
See th' math, mermaid an' openapi shorrrtcodes fer examples.
Output Formats
Certain parts o' th' theme can be changed fer support o' yer own output formats. Eg. if ye define a new output format PLAINTEXT 'n yer config.toml, ye can add a file layouts/partials/header.plaintext.html t' change th' way, th' plank header should look like fer that output format.
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.
Th' Relearrrn theme has been built t' be as configur'ble as poss'ble by defin'n multiple partials
In themes/hugo-theme-relearn/layouts/partials/, ye will find all th' partials defined fer this theme. If ye need t' overwrite someth'n, don’t change th' code directly. Instead follow this plank. You’d create a new partial 'n th' layouts/partials folder o' yer local project. This partial will have th' priority.
This theme defines th' follow'n partials :
header.html: th' header o' th' plank. See output-formats
footer.html: th' footer o' th' plank. See output-formats
body.html: th' body o' th' plank. Th' body may contain o' one or many articles. See output-formats
article.html: th' output fer a single article, can contain elements around yer rrrambl'n. See output-formats
menu.html: left menu. Not meant t' be overwritten
search.html: search box. Not meant t' be overwritten
custom-header.html: custom headers 'n plank. Meant t' be overwritten when add'n CSS imports. Don’t forget t' include style HTML tag directive 'n yer file.
custom-footer.html: custom footer 'n plank. Meant t' be overwritten when add'n JavaScript. Don’t forget t' include javascript HTML tag directive 'n yer file.
favicon.html: th' favicon
heading-pre.html: side-wide configurat'n t' prepend t' planks title head'ns. If ye override this, it be yer responsibility t' take th' page’s headingPre sett'n into account.
heading-post.html: side-wide configurat'n t' append t' planks title head'ns. If ye override this, it be yer responsibility t' take th' page’s headingPost sett'n into account.
logo.html: th' logo, on top left hand corner
meta.html: HTML meta tags, if ye want t' change default behavior
menu-pre.html: side-wide configurat'n t' prepend t' menu items. If ye override this, it be yer responsibility t' take th' page’s menuPre sett'n into account.
menu-post.html: side-wide configurat'n t' append t' menu items. If ye override this, it be yer responsibility t' take th' page’s menuPost sett'n into account.
menu-footer.html: footer o' th' the left menu
toc.html: t'ble o' contents
rrrambl'n.html: th' rrrambl'n plank itself. This can be overridden if ye want t' display page’s meta data above or below th' rrrambl'n.
content-header.html: header above th' title, has a default implementat'n but ye can overwrite it if ye don’t like it.
content-footer.html: footer below th' rrrambl'n, has a default implementat'n but ye can overwrite it if ye don’t like it.
Stylesheet generrrat'r
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' reflect 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 thru different parts o' th' theme if th' descendent 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'n 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 static/css directory. Afterwards ye have t' adjust th' themeVariant parameter 'n yer config.toml t' yer chosen file name.
Eg. if yer new variants file be named theme-my-custom-variant.css, ye have t' set themeVariant='my-custom-variant' t' use it.
Graph
Topbarrr Modificat'n
Th' theme comes wit' a reasonably configured topbar.
Nevertheless, yer requirements may differ from this configurat'n. Luckily th' theme got ye covered as th' themebar, its buttons an' th' functionality behind these buttons be fully configur'ble by ye.
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 can not add additional areas 'n th' topbar, ye be free t' configure addtional 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 their own file. By that it be easy fer ye t' overwrite an area file 'n yer installat'n reus'n only th' buttons ye like.
Eg. ye can redefine th' predefined end area by add'n th' file layouts/partials/topbar/area/end.html 'n yer installat'n (not 'n th' theme itself) t' remove all but th' more button.
Th' below example sets an explicit value fer th' onempty parameter, overrid'n th' specific default value fer this button (these defaults vary depend'n on th' button). Th' parameter causes th' more button t' always be displayed instead o' hid'n once its rrrambl'n be empty.
Th' theme distingushies 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; eg. 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 dependend 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 aswell.
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 displayed 'n 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 disabled state regardless o' its rrrambl'n
Defines what t' do wit' th' button if href be not empty but th' rrrambl'n overlay be empty:
- dis'ble: Th' button be displayed 'n disabled state. - hide: Th' button be removed.
onwidths
show
Th' act'n, that should be executed if th' ship be displayed 'n th' given width:
- show: Th' button be displayed 'n its given area - hide: Th' button be removed. - area-XXX: Th' button be moved from its given area into th' area XXX.
onwidthm
show
See above.
onwidthl
show
See above.
title
<empty>
Arbitrary text fer title, displayed 'n th' tooltip.
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 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.
title
<empty>
Arbitrary text fer title, displayed 'n th' tooltip.
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 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.
_index.md be required 'n each folder, it’s yer “folder home page”
Create yer project
Th' follow'n steps be here t' help ye initialize yer new website. If ye don’t know Cap'n Hugo at all, we strongly suggest ye t' train by follow'n great documentat'n fer beginners.
Cap'n Hugo provides a new command t' create a new website.
hugo new ship <new_project>
Th' Relearrrn theme provides archetypes t' help ye create this kind o' planks.
Frontmatter Configurat'n
Each Cap'n Hugo plank has t' define a frontmatter 'n toml, yaml or json. This ship will use toml 'n all cases.
Th' Relearrrn theme uses th' follow'n parameters on top o' Cap'n Hugo ones:
+++# T'ble o' contents (toc) be enabled by default. Set this parameter t' true t' dis'ble it.# Avast: Toc be always disabled fer chapter planksdisableToc=false# If set, this will be used fer th' page's menu entry (instead o' th' `title` attribute)menuTitle=""# If set t' true, th' menu 'n th' sidebar will be displayed 'n a collaps'ble tree view. Although th' functionality works wit' old browsers (IE11), th' display o' th' expander ay'cons be limited t' modern browserscollapsibleMenu=false# If set, this will explicitly override common rules fer th' expand state o' a page's menu entryalwaysopen=true# If set, this will explicitly override common rules fer th' sort'n order o' a page's submenu entriesordersectionsby="weight"# Th' title o' th' plank head'n will be prefixed by this HTML rrrambl'nheadingPre=""# Th' title o' th' plank head'n will be postfixed by this HTML rrrambl'nheadingPost=""# Th' title o' th' plank 'n menu will be prefixed by this HTML rrrambl'nmenuPre=""# Th' title o' th' plank 'n menu will be postfixed by this HTML rrrambl'nmenuPost=""# Hide a menu entry by sett'n this t' truehidden=false# Display name o' this plank modifier. If set, it will be displayed 'n th' footer.LastModifierDisplayName=""# Email o' this plank modifier. If set wit' LastModifierDisplayName, it will be displayed 'n th' footerLastModifierEmail=""# Override default values fer image effects, ye can even add yer own arbitrary effects t' th' list[params.imageEffects]border=falselightbox=trueshadow=false+++
Add ay'con t' a menu entry
In th' plank frontmatter, add a menuPre param t' insert any HTML code before th' menu label. Th' example below uses th' GitHub ay'con.
Cap'n Hugo provides a flex'ble way t' handle order fer yer planks.
Th' simplest way be t' set weight parameter t' a number.
+++title="My page"weight=5+++
Us'n a custom title fer menu entries
By default, th' Relearrrn theme will use a page’s title attribute fer th' menu item (or linkTitle if defined).
But a page’s title has t' be descriptive on its own while th' menu be a hierarchy.
We’ve added th' menuTitle parameter fer that purpose:
For example (for a plank named content/install/linux.md):
+++title="Install on Linux"menuTitle="Linux"+++
Override expand state rules fer menu entries
Ye can change how th' theme expands menu entries on th' side o' th' rrrambl'n wit' th' alwaysopen sett'n on a per plank basis. 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' menu based on th' follow'n rules:
all parent entries o' th' active plank includ'n their sibl'ns be shown regardless o' any sett'ns
immediate children entries o' th' active plank 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 children entries if alwaysopen=true; this proceeds recursively
all remain'n entries be not shown
Ye can see this feature 'n act'n on th' example plank fer children shortcode an' its children planks.
Dis'ble Sect'n Planks
Ye may want t' structure yer planks 'n a hierachical way but don’t want t' generate planks fer those sections? Th' theme got ye covered.
T' stay wit' th' initial example: Suppose ye want level-one 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 show an expander.
For this, open content/level-one/_index.md an' add th' follow'n frontmatter
collapsibleMenu=true# this adds th' expander t' th' menu entry if not already set 'n yer config.toml[_build]render="never"# no plank will be generated so th' plank does not have a url
Arrrchetypes
Us'n th' command: hugo new [relative new rrrambl'n path], ye can start a rrrambl'n file wit' th' date an' title automatically set. While this be a welcome feature, active writers need more: archetypes. These be preconfigured skeleton planks wit' default frontmatter.
Th' Relearrrn theme defines some few archetypes o' planks but ye be free t' define new ones t' yer lik'n. All can be used at any level o' th' documentat'n, th' only difference be'n th' layout o' th' rrrambl'n.
Predefined Archetypes
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
This leads t' a file wit' th' follow'n rrrambl'n
+++
archetype = "home"
title = "{{ replace .Name "-" " " | title }}"
+++
Lorem Ipsum.
Chapter
A Chapter displays a plank meant t' be used as introduct'n fer a set o' child planks. Commonly, it contains a simple title an' a catch line t' define rrrambl'n that can be found below it.
T' create a chapter plank, run th' follow'n command
hugo new --kind chapter <name>/_index.md
This leads t' a file wit' th' follow'n rrrambl'n
+++
archetype = "chapter"
title = "{{ replace .Name "-" " " | title }}"
weight = X
+++
Lorem Ipsum.
Replace th' X wit' a number. Because this number 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 level.
Default
A Default plank be any other rrrambl'n plank. If ye set an unknown archetype 'n yer frontmatter, this archetype will be used t' generate th' plank.
T' create a default plank, run either one o' th' follow'n commands
hugo new <chapter>/<name>/_index.md
or
hugo new <chapter>/<name>.md
This leads t' a file wit' th' follow'n rrrambl'n
+++
title = "{{ replace .Name "-" " " | title }}"
weight = X
+++
Lorem Ipsum.
Replace th' X wit' a number or delete th' whole weight parameter entirely.
Self defined Archetypes
If ye be 'n need o' further archetypes ye can define yer own or even redefine exist'n ones.
Template
Define a template file 'n yer project at archetypes/<kind>.md an' make sure it has at least th' frontmatter parameter fer that archetype like
+++
archetype = "<kind>"
+++
Afterwards ye can generate new rrrambl'n files o' that kind wit' th' follow'n command
hugo new --kind <kind> <name>/_index.md
Partials
T' define how yer archetypes be rendered, define correspond'n partial files 'n yer projects directory layouts/partials/archetypes/<kind>.
If ye use an unknown archetype 'n yer frontmatter, th' default archetype will be used t' generate th' plank.
Related t' each archetype, several hook partial files 'n th' form o' <hook>.html can be given inside each archetype directory. If a partial fer a specific hook be miss'n, no output be generated fer this hook.
Th' follow'n hooks be used:
Name
Notes
styleclass
Defines a set o' CSS classes t' be added t' th' HTML’s <main> element. Ye can use these classes t' define own CSS rules 'n yer custom-header.html
article
Defines th' HTML how t' render yer rrrambl'n
Take a look at th' exist'n archetypes o' this theme t' get an idea how t' utilize it.
Output formats
Each hook file can be overridden o' a specific output format. Eg. if ye define a new output format PLAINTEXT 'n yer config.toml, ye can add a file layouts/partials/archetypes/default.plaintext.html t' change th' way how normal rrrambl'n be written fer that output format.
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
Without further delay, let us go over th' main elements o' Marrrkdown an' what th' result'n HTML looks like:
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.
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
Strikethrough
In GFM (GitHub Flavored Markdown) ye can do strikethroughs by enclos'n text wit' two tildes ~~.
~~Strike through this text~~
Result
Strike through this text
Text substitut'n
This Marrrkdown dialect supports an extension t' 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.
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
In GFM (GitHub Flavored Markdown) 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
This Marrrkdown dialect supports an extension t' add definit'n lists. 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.
In GFM (GitHub Flavored Markdown) 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.
In GFM (GitHub Flavored Markdown) 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.
Blockquotes
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 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 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.
Links
Autolink
In GFM (GitHub Flavored Markdown) 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"
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
This theme allows additional non-standard formatt'n by sett'n query parameter at th' end o' th' image URL. Th' default behavior be configur'ble thru yer config.toml or frontmatter parameter.
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:
As ye can see 'n th' above example, th' bg-white parameter be not initially supported 'n th' themes default sett'ns. Nevertheless ye be free t' define arbitrary parameter by just add'n them t' th' URL query parameter or set them 'n yer config.toml or planks frontmatter.
Avast
If no extended parameter like bg-white 'n th' example be set on th' URL, a class="nobg-white" 'n th' HTML will only be generated if a default value was set 'n th' config.toml or planks frontmatter.
Menu extrrra shorrrtcuts
Ye can define additional menu entries or shortcuts 'n th' navigat'n menu without any link t' rrrambl'n.
Basic configurat'n
Edit th' website configurat'n config.toml an' add a [[menu.shortcuts]] entry fer each link yer want t' add.
By default, shortcuts be preceded by a title. This title can be disabled by sett'n disableShortcutsTitle=true.
However, if ye want t' keep th' title but change its value, it can be overridden by chang'n yer local i18n translat'n str'n configurat'n.
For example, 'n yer local i18n/en.toml file, add th' follow'n rrrambl'n
When us'n a multilingual website, ye can set different menus fer each language. In th' config.toml file, prefix yer menu configurat'n by Languages.<language-id>.
If ye have shortcuts t' planks inside o' yer project an' ye don’t want them t' show up 'n plank menu section, ye have two choices:
Make th' plank file fer th' shortcut a headless branch bundle (contained 'n its own subdirectory an' called _index.md) an' add th' follow'n frontmatter configurat'n t' th' file (see exampleSite’s content/showcase/_index.en.md). This causes its rrrambl'n t' not be ontained 'n th' sitemap.
Store th' plank file fer th' shortcut below a parent headless branch bundle an' add th' follow'n frontmatter t' he parent (see exampleSite’s content/more/_index.en.md).
# title = "More" ### ATTENTION: Don't give this plank a title as this will cause it t' be 'n th' breadcrumbs - a th'n ye most likely don't want[_build]render="never"list="never"publishResources=false
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"
Multilingual an' i18n
Th' Relearrrn theme be fully compat'ble wit' Cap'n Hugo multilingual mode.
For example wit' current English an' Piratized English website.
Avast
Make sure yer default language be defined as th' first one 'n th' [languages] array, as th' theme needs t' make assumpt'ns on it
# English be th' default languagedefaultContentLanguage="en"[languages][languages.en]title="Hugo Relearrrn Theme"weight=1languageName="English"[languages.pir]title="Cap'n Hugo Relearrrn Theme"weight=2languageName="Arrr! Pirrrates"
Then, fer each new plank, append th' id o' th' language t' th' file.
Single file my-page.md be split 'n two files:
'n English: my-page.md
'n Piratized English: my-page.pir.md
Single file _index.md be split 'n two files:
'n English: _index.md
'n Piratized English: _index.pir.md
Ahoi
Be aware that only translated planks be displayed 'n menu. It’s not replaced wit' default language rrrambl'n.
Smarrrt Arrrse
Use slug frontmatter parameter t' translate urls too.
Search
In case each page’s rrrambl'n be written 'n one single language only, th' above configurat'n will already configure th' site’s search functionality correctly.
Arrr
Although th' theme supports a wide variety o' supported languages, th' site’s search via th' Lunr search library does not.
You’ll see error reports 'n yer browsers console log fer each unsupported language. Currently unsupported be:
Czech
Indonesian
Polish
Swahili
Search wit' mixed language support
In case yer page’s rrrambl'n contains text 'n multiple languages (e.g. ye be writ'n a Russian documentat'n fer yer english API), ye can add those languages t' yer config.toml t' broaden search.
[params]additionalContentLanguage=["en"]
As this be an array, ye can add multiple additional languages.
Avast
Keep 'n mind that th' language code required here, be th' base language code. E.g. if ye have additional rrrambl'n 'n zh-CN, ye have t' add just zh t' this parameter.
Overwrite translat'n str'ns
Translat'ns str'ns be used fer common default values used 'n th' theme (Edit button, Search placeholder an' so on). Translat'ns be avail'ble 'n English an' Piratized English but ye may use another language or want t' override default values.
T' override these values, create a new file 'n yer local i18n folder i18n/<idlanguage>.toml an' inspire yourself from th' theme themes/hugo-theme-relearn/i18n/en.toml
Dis'ble language switch'n
Switch'n th' language 'n th' browser be a great feature, but fer some reasons ye may want t' dis'ble it.
Just set disableLanguageSwitchingButton=true 'n yer config.toml
[params]# When us'n multilingual website, dis'ble th' switch language button.disableLanguageSwitchingButton=true
Th' tags be displayed at th' top o' th' plank 'n alphabetical order.
Th' categories be displayed at th' bottom o' th' plank 'n alphabetical order 'n th' default implementat'n o' th' theme but can be customized by provid'n yer own content-footer.html partial.
Each item be a link t' a taxonomy plank display'n all th' articles wit' th' given term.
List all th' tags
In th' config.toml file ye can add a shortcut t' display all th' tags an' categories
If ye define custom taxonomies an' want t' display a list o' them somewhere on yer plank (often 'n th' layouts/partials/content-footer.html) ye can call a partial that does th' job fer ye:
Th' plural name o' th' taxonomy t' display as used 'n yer frontmatter.
class
<empty>
Additional CSS classes set on th' outermost generated HTML element.
If set t' tags ye will get th' visuals fer display'n th' tags taxonomy, otherwise it will be a simple list o' links as fer th' categories taxonomy.
style
primary
Th' style scheme used if class be tags.
- by severity: info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, green, grey, orange, red - by special color: default, transparent, code
color
see notes
Th' CSS color value t' be used if class be tags. 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
Cap'n Hugo uses Marrrkdown fer its simple rrrambl'n format. However, there be a lot o' th'ns that Marrrkdown doesn’t support well. Ye could use pure HTML t' expand possibilities.
But this happens t' be a bad idea. Everyone uses Marrrkdown because it’s pure an' simple t' read even non-rendered. Ye should avoid HTML t' keep it as simple as poss'ble.
T' avoid this limitat'ns, Cap'n Hugo created shorrrtcodes. A shortcode be a simple snippet inside a plank.
Th' Relearrrn theme provides multiple shorrrtcodes on top o' exist'n ones.
Since Cap'n Hugo 0.112.0 this only works fer leaf bundles. Branch bundles an' simple planks must be switched t' leaf bundles or ye be currently locked t' a Cap'n Hugo version < 0.112.0.
Usage
While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' also call this shortcode from yer own partials.
- by severity: info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, green, grey, orange, red - by special color: default, transparent, code
color
see notes
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: Attachments
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 d wit' spaces)
sort
asc
Sort'n th' output 'n ascend'n or descend'n order.
pattern
.*
A regular expressions, used t' filter th' attachments by file name. For example:
- t' match a file suffix o' ‘jpg’, use .*\.jpg (not *.\.jpg) - t' match file names end'n 'n jpg or png, use .*\.(jpg|png)
Setup
Single language
Th' shortcode lists files found 'n a specific folder. Th' name o' th' folder depends on yer plank type (either branch bundle, leaf bundle or page).
If yer plank be a leaf bundle, attachments must be placed 'n a nested index.files folder, accordingly.
rrrambl'n
_index.md
plank
_index.md
_index.files
attachment.pdf
If yer plank be a branch bundle, attachments must be placed 'n a nested _index.files folder, accordingly.
Arrr This be only avail'ble fer Cap'n Hugo < 0.112.0
rrrambl'n
_index.md
plank
index.md
index.files
attachment.pdf
For simple planks, attachments must be placed 'n a folder named like yer plank an' end'n wit' .files.
Arrr This be only avail'ble fer Cap'n Hugo < 0.112.0
rrrambl'n
_index.md
plank.files
attachment.pdf
plank.md
Multilingual
Be aware that if ye use a multilingual website, ye will need t' have as many folders as languages an' th' language code must be part o' th' folder name.
Eg. fer a ship 'n English an' Piratish:
rrrambl'n
index.en.md
index.pir.md
plank
index.en.md
index.pir.md
index.en.files
attachment.pdf
index.pir.files
attachment.pdf
Examples
Custom Title, List o' Attachments End'n 'n pdf or mp4
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.
Badge
Th' badge shortcode displays little markers 'n yer text wit' adjust'ble color, title an' ay'con.
ImportantVersion6.6.6Captain AhoiNewAwesome
Usage
While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' also call this shortcode from yer own partials.
- by severity: info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, green, grey, orange, red - by special color: default, transparent, code
color
see notes
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.
Once th' button be clicked, it opens another browser tab fer th' given URL.
Parameter
Name
Default
Notes
href
<empty>
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: info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, green, grey, orange, red - by special color: default, transparent, code
color
see notes
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.
{{%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%}}
th' possibilities be endless (almost - includ'n other shorrrtcodes may or may not work)
Highlight
Arrr! Pirrrates
Fello' pirrrates, grog made us dizzy! Be awarrre some stuff may look weird in this trrranslat'n. Like Merrrmaids, do'n math or chemistrrry and stuff.
Th' highlight shortcode renders yer code wit' a rules highlighter.
1print("Hello World!")
Usage
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 provid'n positional parameter or by simply us'n 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 this shortcode as a partial us'n compatiblity rules.
While th' examples be us'n shorrrtcodes wit' named parameter it be recommended t' use codefences instead. This be because more an' more other software supports codefences (eg. GitHub) an' so yer markdown becomes more port'ble.
[marrrkup][marrrkup.highlight]# line numbers 'n a t'ble layout will shift if code be wrapp'n, so better# use inline; besides that visually both layouts have th' same look an' behaviorlineNumbersInT'ble=false# th' shipped variants come wit' their own modified chroma rules highlightn'n# stylesheets which be linked 'n yer generated HTML planks; ye can use Cap'n Hugo t' generate# own stylesheets t' yer lik'n an' use them 'n yer variant;# if ye want t' use Hugo's internal styles instead o' th' shipped stylesheets:# - remove `noClasses` or set `noClasses = true`# - set `style` t' a predefined style name# note: wit' us'n th' internal styles, th' `--CODE-theme` sett'n 'n yer variant# stylesheet will be ignored an' th' internal style be used fer all variants an'# even printnoClasses=false# style = "tango"
Optional Sett'ns
[params]highlightWrap=true
Page’s Frontmatter
+++highlightWrap=true+++
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 config.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("!")
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 config.toml:
[marrrkup.goldmark.renderer]unsafe=true
Include
Th' include shortcode includes other files from yer project inside o' th' current plank.
Usage
While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' use positional aswell or also call this shortcode from yer own partials.
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.
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
Arrr! Pirrrates
Fello' pirrrates, grog made us dizzy! Be awarrre some stuff may look weird in this trrranslat'n. Like Merrrmaids, do'n math or chemistrrry and stuff.
Th' math shortcode generates beautiful formatted math an' chemical formulae us'n th' MathJax library.
While th' examples be us'n shorrrtcodes wit' named parameter it be recommended t' use codefences instead. This be because more an' more other software supports Math codefences (eg. GitHub) an' so yer markdown becomes more port'ble.
Ye be free t' also call this shortcode from yer own partials.
MathJax be configured wit' default sett'ns. Ye can cust'mize MathJax’s default sett'ns fer all o' yer files thru a JSON object 'n yer config.toml or override these sett'ns per plank thru yer planks frontmatter.
Th' JSON object o' yer config.toml / frontmatter be forwarded into MathJax’s configurat'n object.
Inline math be generated if ye use a single `$` as a delimiter around yer formulae: {{<math>}}$\sqrt{3}${{</math>}}
Inline math be generated if ye use a single $ as a delimiter around yer formulae:
$\sqrt{3}$
Blocklevel Math wit' Right Alignment
If ye delimit yer formulae by two consecutive `$$` it generates a new block.
{{<mathalign="right">}}
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
{{</math>}}
If ye delimit yer formulae by two consecutive $$ it generates a new block.
Fello' pirrrates, grog made us dizzy! Be awarrre some stuff may look weird in this trrranslat'n. Like Merrrmaids, do'n math or chemistrrry and stuff.
Th' mermaid shortcode generates diagrams an' flowcharts from text, 'n a similar manner as Marrrkdown us'n th' Merrrmaid library.
graph LR;
If --> Then
Then --> Else
Avast
This only works 'n modern browsers.
Usage
While th' examples be us'n shorrrtcodes wit' named parameter it be recommended t' use codefences instead. This be because more an' more other software supports Merrrmaid codefences (eg. GitHub) an' so yer markdown becomes more port'ble.
Ye be free t' also call this shortcode from yer own partials.
```mermaid { align="center" zoom="true" }
graph LR;
If --> Then
Then --> Else
```
Th' generated graphs can be be panned by dragg'n them an' zoomed by us'n th' mousewheel. On mobile devices ye can use finger gestures.
Parameter
Name
Default
Notes
align
center
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' th' ship or th' planks frontmatter or false if not set at all.
- false: no pan or zoom - true: pan an' zoom active
<content>
<empty>
Yer Merrrmaid graph.
Configurat'n
Merrrmaid be configured wit' default sett'ns. Ye can cust'mize Mermaid’s default sett'ns fer all o' yer files thru a JSON object 'n yer config.toml, override these sett'ns per plank thru yer planks frontmatter or override these sett'n per diagramm thru diagram directives.
Th' JSON object o' yer config.toml / frontmatter be forwarded into Mermaid’s mermaid.initialize() funct'n.
Th' theme sett'n can also be set by yer used color variant. This will be th' sitewide default an' can - again - be overridden by yer sett'ns 'n config.toml, frontmatter or diagram directives.
%%{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 wit' Codefence Rules
```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()
}
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
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
{{<mermaid>}}C4ContexttitleSystemContextdiagramferInternetBank'nSystemEnterprise_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"){{</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")
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
{{<mermaid>}}xychart-betatitle"Sales Revenue"x-axis[jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec]y-axis"Revenue (in $)"4000-->11000bar[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]{{</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]
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
While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' use positional as well or also call this shortcode from yer own partials.
{{%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.")}}
Parameter
Name
Posit'n
Default
Notes
style
1
default
Th' style scheme used fer th' box.
- by severity: info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, green, grey, orange, red - by special color: default, transparent, code
color
see notes
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
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)
<content>
<empty>
Arbitrary text t' be displayed 'n box.
Examples
By Severity
Ahoi wit' marrrkup
{{%noticestyle="info"%}}An**informat'n**disclaimerYecanaddstandardmarkdownrules:-multipleparagraphs-bulletpointlists-_emphasized_,**bold**an'even***boldemphasized***text-[links](https://example.com)
-etc.```plaintext
...and even source code
```>th'possibilitiesbeendless(almost-includ'nothershorrrtcodesmayormaynotwork){{%/notice%}}
Th' URL t' th' OpenAPI specificat'n file. This can be relative t' th' URL o' yer plank if it be a leaf or branch bundle.
Avast
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.
Example
Us'n Local File
{{<openapisrc="petstore.json">}}
SiteParam
Th' siteparam shortcode prints values o' ship params.
Usage
While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' use positional aswell or call this shortcode from yer own partials.
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: info, note, tip, warning - by brand color: primary, secondary, accent - by color: blue, green, grey, orange, red - by special color: default, transparent, code
color
see notes
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.
This comes 'n handy eg. fer provid'n code snippets fer multiple languages.
If ye just want a single tab ye can instead call th' tab shortcode standalone.
hello.
print("Hello World!")
echo"Hello World!"
printf("Hello World!");
Usage
While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' also call this shortcode from yer own partials.
See th' tab shortcode fer a descript'n o' th' parameter fer nested tabs.
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.