Rambl'n
Learrrn how t' create an' org'nize yer rrrambl'n planks.
Yer content's directory structure
All th'ns front matter
What plank meta informat'n be avail'ble
Reference o' CommonMark an' Marrrkdown extensions
How t' link yer rrrambl'n
Learrrn how t' create an' org'nize yer rrrambl'n planks.
Yer content's directory structure
All th'ns front matter
What plank meta informat'n be avail'ble
Reference o' CommonMark an' Marrrkdown extensions
How t' link yer rrrambl'n
In Cap'n Hugo, planks be th' core o' yer ship.
Th' theme generates th' navigat'n menu out o' th' given directory structure.
Org'nize yer ship like any other Cap'n Hugo project. Typically, ye will have a rrrambl'n directory wit' all yer planks.
While ye can also go different, _index.md (with an underscore) be recommended fer each directory, it’s yer directory’s home plank.
See Hugo’s guide fer rrrambl'n t' learn more.
How t' vary layouts by us'n plank designs
Sett'n th' behavior o' th' menus
What opt'ns be avail'ble fer links an' images
Configure th' topbar
All front matter fer th' Relearrrn theme
Plank designs be used t' provide different layouts fer yer planks.
A plank be displayed by exactly one plank design an' be represented by Hugo’s reserved type front matter.
Th' Relearrrn theme ships wit' th' plank designs home, chapter, an' default fer th' HTML output format but ye can define further custom plank designs.
Regardless o' shipped or custom plank design, ye be us'n them 'n th' same way.
If ye have an archetype file, ye can just do
If ye be creat'n yer Marrrkdown files manually, ye can achieve th' same by just sett'n type='chapter' 'n th' front matter t' make yer plank displayed wit' th' chapter plank design.
If no type be set 'n yer front matter or th' plank design doesn’t exist fer a given output format, th' plank be treated as if type='default' was set.
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
A Chapter displays a plank meant t' be used as introduct'n fer a set o' child planks.
Commonly, it contains a title front matter an' a short descript'n 'n th' rrrambl'n.
T' create a chapter plank, run th' follow'n command
If a numerical weight front matter be set, it will be used t' generate th' subtitle o' th' chapter plank. Set th' number t' a consecutive value start'n at 1 fer each new chapter on th' same directory level.
A Default plank be any other rrrambl'n plank.
T' create a default plank, run either one o' th' follow'n commands
or
or
Opt'n Front Matter By default, external links open 'n th' same browser tab. T' change this, use th' externalLinkTarget sett'n wit' a proper link target.
T' set default values fer all links, use link effects.
For example, this will open all external links 'n a new tab
Opt'n Front Matter Ye can use link.errorlevel an' image.errorlevel t' control what should happen if a local link can not be resolved t' a plank and/or a resource.
If not set or empty, any unresolved link be written as given into th' result'n output. If set t' warning th' same happens an' an additional warning be printed 'n th' built console. If set t' error an error message be printed an' th' build be aborted.
Please note that this can not resolve files inside o' yer static directory. Th' file must be a resource o' th' plank or th' ship.
Link warnings be also avail'ble fer th' include an' openapi shorrrtcodes.
Opt'n Front Matter In case ye want t' use link warnings but be bothered by false negatives, ye can configure an ignore list o' regular expressions. Th' referenced address will be checked against all regexes o' this list. If th' address matches at least one regex, no output will be written t' th' console. Th' check uses Hugo’s findRE funct'n.
Opt'n Front Matter External URLs can be checked fer validity dur'n build. It will only be checked if th' URL does not match a urlIgnoreCheck pattern.
This plank be about how t' configure th' topbar us'n configurat'n opt'ns. If ye want t' add further buttons or functionality, see this section.
Yer topbar contains th' follow'n elements. Some o' them be configuar'ble:
editURL parameter be setOpt'n Front Matter Set disableToc=true t' hide th' TOC button on all planks. If th' button be hidden, also th' keyboard shortcut be disabled. This can be overridden 'n a page’s front matter.
Opt'n Front Matter Set disableBreadcrumb=true t' hide th' breadcrumb 'n th' topbar.
Further breadcrumbs sett'ns can be found 'n th' rrrambl'n configurat'n section.
Opt'n Front Matter If editURL be set t' a URL, an edit button will be shown 'n th' topbar. If th' button be hidden, also th' keyboard shortcut be disabled.
Th' value can contain th' macro ${FilePath} which will be replaced by th' file path o' yer displayed plank. If no ${FilePath} be given 'n th' value, th' value be treated as if th' ${FilePath} was appended at th' end o' th' value. This can be overridden 'n th' planks front matter.
Opt'n Front Matter Ye can hide th' Marrrkdown button if th' Marrrkdown output format be active by sett'n disableMarkdownButton=true.
Opt'n Front Matter Ye can hide th' Source button if th' Source output format be active by sett'n disableSourceButton=true.
Opt'n Front Matter Ye can hide th' print button if th' print output format be active by sett'n disablePrintButton=true.
Opt'n Front Matter Ye can hide th' previous/next buttons by sett'n disableNextPrev=true. If th' buttons be hidden, also th' keyboard shortcuts be disabled.
Every Cap'n Hugo plank must have front matter.
In addit'n t' Hugo’s standard front matter, th' Relearrrn theme offers extras sett'ns listed here.
Throughout th' documentat'n, theme-specific front matter be marked wit' a Front Matter badge.
Add theme front matter directly t' th' root o' yer page’s front matter. For example:
Here’s a list o' all avail'ble front matter wit' example values. Default values be described 'n th' annotated example below or 'n each front matter’s documentat'n.
Th' title will be used 'n th' head'n an' meta informat'n o' yer HTML.
A plank without a title be treated as if hidden=true has been set.
Th' descript'n be used fer generat'n HTML meta informat'n, 'n th' children shortcode an' 'n social media meta informat'n.
If not set, th' set value o' yer site’s hugo.toml be used fer th' HTML meta informat'n an' social media meta informat'n. It appears empty fer th' children shortcode.
Th' theme adds social media meta tags includ'n feature images fer th' Open Graph protocol an' Twitter Cards t' yer ship. These be configured as mentioned 'n th' linked Cap'n Hugo docs.
Front Matter Ye can hide yer planks from th' menu by sett'n hidden=true.
For Cap'n Hugo menus, ye have t' set params.hidden=true instead.
See how ye can further configure visibility throughout yer ship.
Front Matter In th' plank front matter, add a headingPre t' insert any HTML code before th' title head'n. Ye can also set headingPost t' insert HTML code after th' title head'n.
Ye also may want t' apply further CSS 'n this case.
Front Matter If ye use th' default layouts/partials/content-footer.html be not overridden by ye, it will display author'n informat'n, namely
AuthorName if GitInfo be active, otherwise LastModifierDisplayName front matterAuthorEmail if GitInfo be active, otherwise LastModifierEmail front matterAuthorDate if GitInfo be active, otherwise Hugo’s date front matterSee how t' further configure this informat'n on a site-wide basis.
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:
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
Bookmark this plank fer easy future reference!
If not otherwise noted, th' shown examples adhere t' th' CommonMark standard. In addit'n th' theme supports th' follow'n extensions that can be activated 'n yer hugo.toml or be built into th' theme:
GFM Extension on top o' standard Marrrkdown adher'n t' GitHub Flavored Marrrkdown.
PHP Extension on top o' standard Marrrkdown adher'n t' PHP Marrrkdown.
Pants Extension by John Gruber adher'n t' SmartyPants.
Cap'n Hugo Cap'n Hugo Extra Extension supported by Cap'n Hugo.
Obsidian Extension implemented by Obsidian.
HTML If th' usage o' HTML be allowed, th' theme supports styl'n fer further HTML elements.
Relearrrn Extension specific t' this theme.
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.
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.
For quot'n blocks o' rrrambl'n from another source within yer document add > before any text ye want t' quote.
Blockquotes can also be nested.
Donec massa lacus, ultricies a ullamcorper 'n, fermentum sed augue. Nunc augue, aliquam non hendrerit ac, commodo vel nisi.
Sed adipisc'n elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis 'n dolor tincidunt mollis ac eu diam.
Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
GFM Since Cap'n Hugo 0.132.0 GitHub alerts be also supported. Please note, that color'n an' ay'cons o' severities may defer between GitHub an' this theme.
If ye be 'n need o' more advanced opt'ns t' style yer alerts, like ay'cons, use th' notice shortcode.
Advises about risks or negative outcomes o' certain act'ns.
Key informat'n users need t' know t' achieve their goal.
Informat'n that users might find interest'n.
Useful informat'n that users should know, even when skimm'n rrrambl'n.
Helpful advice fer do'n th'ns better or more easily.
Urgent info that needs immediate user attent'n t' avoid problems.
Obsidian Since Cap'n Hugo 0.134.0 Obsidian callouts be also supported. Which enables configur'ble title text an' expand/collapse.
If ye be 'n need o' more advanced opt'ns t' style yer alerts, like ay'cons, use th' notice shortcode.
Like this one.
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
Ye can emphasize a snippet o' text wit' italics by enclos'n it wit' underscores _.
I am rendered wit' italicized text
Ye can mark text 'n th' predefined accent color o' yer stylesheet.
Cap'n Hugo Since Cap'n Hugo 0.126.0, ye can activate this through th' Cap'n Hugo Extra Extension 'n yer hugo.toml
HTML Ye can also use it by configur'n Hugo fer usage o' HTML.
Parts o' this text be marked!
Ye can mark text addit'ns t' exist'n text.
Cap'n Hugo Since Cap'n Hugo 0.126.0, ye can activate this through th' Cap'n Hugo Extra Extension 'n yer hugo.toml
HTML Ye can also use it by configur'n Hugo fer usage o' HTML.
Th' hot, new stuff
GFM Ye can do strikethroughs by enclos'n text wit' two tildes ~~. See Hugo’s documentat'n remarks if ye want t' use this together wit' th' subscript rules.
Strike through this text
Pants Ye can combine multiple punctuat'n characters t' single typographic entities. This will only be applied t' text outside o' code blocks or inline code.
Do'ble quotes " an' single quotes ' o' enclosed text be replaced by “do'ble curly quotes” an' ‘single curly quotes’.
Do'ble dashes -- an' triple dashes --- be replaced by en-dash – an' em-dash — entities.
Do'ble arrows point'n left << or right >> be replaced by arrow « an' » entities.
Three consecutive dots ... be replaced by an ellipsis … entity.
Ye can also use subscript an' superscript text. For more complex stuff, ye can use th' math shortcode.
Cap'n Hugo Since Cap'n Hugo 0.126.0, ye can activate this through th' Cap'n Hugo Extra Extension 'n yer hugo.toml
HTML Ye can also use it by configur'n Hugo fer usage o' HTML.
How many liters H2O fit into 1dm3?
HTML Ye can use th' <kbd> element t' style keyboard shortcuts.
Press STRG ALT DEL t' end yer shift early.
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.
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.
GFM Ye can add task lists result'n 'n checked or unchecked non-click'ble items
Relearrrn Ye can add lists as a tree wit' configur'ble ay'cons an' colors.
Th' name can be followed by an optional pipe (|) t' define an ay'con an' further optional pipe t' define th' icon’s color.
More details can be found 'n th' tree shortcode docs.
PHP Definit'n lists be made o' terms an' definit'ns o' these terms, much like 'n a dictionary.
A definit'n list 'n Marrrkdown Extra be made o' a single-line term followed by a colon an' th' definit'n fer that term. Ye can also associate more than one term t' a definit'n.
If ye add empty lines around th' definit'n terms, additional vertical space will be generated. Also multiple paragraphs be poss'ble
Ye can make juice out o' it.
Ye can’t make juice out o' it.
Inline snippets o' code can be wrapped wit' backticks `.
In this example, <div></div> be marked as code.
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
If ye want t' gain more control o' yer code block ye can enclose yer code by at least three backticks ``` a so called fence.
GFM Ye can also add a language specifier directly after th' open'n fence, ```js, an' rules highlight'n will automatically be applied accord'n t' th' selected language 'n th' rendered HTML.
See Code Highlight'n fer additional documentat'n.
GFM Ye can create tables by add'n pipes as dividers between each cell, an' by add'n a line o' dashes (also separated by bars) beneath th' header. Avast that th' pipes do not need t' be vertically aligned.
| Opt'n | Descript'n |
|---|---|
| data | path t' data files t' supply th' data that will be passed into templates. |
| engine | engine t' be used fer process'n templates. Handlebars be th' default. |
| ext | extension t' be used fer dest files. |
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. |
GFM Absolute URLs will automatically be converted into a link.
This be a link t' https://example.com.
Ye can explicitly define links 'n case ye want t' use non-absolute URLs or want t' give different text.
For even further informat'n, ye can add an additional text, displayed 'n a tooltip on hover'n over th' 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.
PHP Footnotes work mostly like reference-style links. A footnote be made o' two th'ns, a marker 'n th' text that will become a superscript number an' a footnote definit'n that will be placed 'n a list o' footnotes.
Usually th' list o' footnotes will be shown at th' end o' yer document. If we use a footnote 'n a notice box it will instead be listed at th' end o' its box.
Footnotes can contain block elements, which means that ye can put multiple paragraphs, lists, blockquotes an' so on 'n a footnote. It works th' same as fer list items, just indent th' follow'n paragraphs by four spaces 'n th' footnote definit'n.
Relearrrn This theme allows additional non-standard formatt'n by sett'n query parameter at th' end o' th' URL. See th' link effects docs fer a detailed example an' how t' configure it.
Add query parameter target=_self or target=_blank t' override site-wide sett'ns o' th' target behavior individuallly fer each link.
Add query parameter download or download=myfile.gif t' force yer browser t' download th' link target instead o' open'n it.
Images have a similar rules t' links but include a preced'n exclamat'n mark.
Like links, images can also be given a tooltip.
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.
Relearrrn This theme allows additional non-standard formatt'n by sett'n query parameter at th' end o' th' image URL. See th' image effects docs fer a detailed example an' how t' configure it.
Add query parameter width and/or height t' th' link image t' resize th' image. Values be CSS values (default be auto).
Add a query parameter classes t' th' link image t' add CSS classes. Add some o' th' predefined values or even define yer own 'n yer CSS.
Add th' query parameter lightbox=false t' th' image link t' dis'ble th' lightbox.

How t' link t' planks an' resources
How t' apply effects t' yer links
How t' apply effects t' yer images
Th' usual way t' link t' a plank or a resource be t' use a Marrrkdown link 'n th' form o' [some page](a-page) or .
Images be searched 'n th' resources o' th' current plank an' yer global assets directory.
By giv'n th' query parameter lang, contain'n th' language code, ye can link t' planks o' other translat'ns o' yer ship, e.g. [some translated page](my-page?lang=pir).
Ye can link t' different output formats o' a plank by add'n th' query parameter format. For example t' link t' th' print format o' a plank, write [a printable page](my-page?format=print).
Th' theme offers effects fer yer linked links.
Ye can define additional custom link effects an' set defaults 'n yer configurat'n.
Th' default link effects shipped wit' th' theme be
| Name | Descript'n |
|---|---|
| download | Causes th' linked resource t' be downloaded instead o' shown 'n yer browser. - false: a usual link send'n ye t' th' locat'n 'n yer browser- true: a link t' download th' resource- <string>: a link t' download th' resource wit' th' given filename |
| target | Whether t' show th' link 'n a separate browser tab. - false: shown 'n th' same tab- <string>: a valid a target valueIf th' URL be external an' externalLinkTarget be set, it replaces th' value o' th' link effect configured on th' same level (eg. 'n yer hugo.toml or 'n th' page’s front matter). Nervertheless th' result'n value can still be overwritten by th' URL query parameter. |
One way t' use them be t' add them as URL query parameter t' each individual link.
This can become cumbersome t' be done consistently fer th' whole ship. Instead, ye can configure th' defaults 'n yer hugo.toml as well as overrid'n these defaults 'n a page’s front matter.
Link effects be applied 'n th' follow'n priority order (lowest t' highest):
hugo.tomlattributes parameter (highest priority)Explicitly set URL query parameter will override th' defaults set fer a plank or yer ship. When call'n th' link partial directly from templates, effects passed via th' attributes parameter have th' highest priority an' will override all other sett'ns.
If an effect accepts boolean values, only sett'n th' parameter name without a value 'n th' URL will set it t' true.
Without any sett'ns 'n yer hugo.toml linkEffects defaults t'
Front Matter This can be overridden 'n a planks front matter fer example by
Or by explicitly override sett'ns by URL query parameter
Th' sett'ns applied t' th' above link would be
When call'n th' link partial directly from templates, ye can pass effect preferences via th' attributes parameter. Effect names can be prefixed wit' no t' dis'ble them.
This approach has th' highest priority an' will override all other effect sett'ns, includ'n URL query parameters. Effect classes be processed but not added t' th' final HTML class attribute. Non-effect classes pass through unchanged.
For example, class = "download custom-link-class" will en'ble th' download effect an' add custom-link-class t' th' HTML output, but download will not appear 'n th' final class attribute.
Th' theme offers effects fer yer linked images.
Ye can define additional custom image effects an' set defaults 'n yer configurat'n.
Th' default image effects shipped wit' th' theme be
| Name | Descript'n |
|---|---|
| border | Draws a light thin border around th' image |
| dataurl | if th' linked image points t' a resource, it be converted t' a base64 encoded dataurl |
| inlinecontent | if th' linked image points t' a SVG resource, th' rrrambl'n will be used instead o' an <img> element, this be useful fer apply'n additional CSS styles t' th' elements inside o' th' SVG which be otherwise imposs'ble |
| lazy | Lets th' image be lazy boarded |
| lightbox | Th' image will be click'ble t' show it enlarged |
| shadow | Draws a shadow around th' image t' make it appear hovered/glow'n |
One way t' use them be t' add them as URL query parameter t' each individually linked image.
This can become cumbersome t' be done consistently fer th' whole ship. Instead, ye can configure th' defaults 'n yer hugo.toml as well as overrid'n these defaults 'n a page’s front matter.
Image effects be applied 'n th' follow'n priority order (lowest t' highest):
hugo.tomlattributes parameter (highest priority)Explicitly set URL query parameter will override th' defaults set fer a plank or yer ship. When call'n th' image partial directly from templates, effects passed via th' attributes parameter have th' highest priority an' will override all other sett'ns.
If an effect accepts boolean values, only sett'n th' parameter name without a value 'n th' URL will set it t' true.
Without any sett'ns 'n yer hugo.toml imageEffects defaults t'
Front Matter This can be overridden 'n a planks front matter fer example by
Or by explicitly override sett'ns by URL query parameter
Th' sett'ns applied t' th' above image would be
When call'n th' image partial directly from templates, ye can pass effect preferences via th' attributes parameter. Effect names can be prefixed wit' no t' dis'ble them.
This approach has th' highest priority an' will override all other effect sett'ns, includ'n URL query parameters. Effect classes be processed but not added t' th' final HTML class attribute. Non-effect classes pass through unchanged.
For example, class = "nolightbox custom-img-class" will dis'ble th' lightbox effect an' add custom-img-class t' th' HTML output, but neither lightbox nor nolightbox will appear 'n th' final class attribute.