Shortcodes on Hugo Relearn Theme https://mcshelby.github.io/hugo-theme-relearn/shortcodes/index.html Recent content in Shortcodes on Hugo Relearn Theme Hugo -- gohugo.io en Badge https://mcshelby.github.io/hugo-theme-relearn/shortcodes/badge/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/badge/index.html The badge shortcode displays little markers in your text with adjustable color, title and icon. Important Version6.6.6 Captain InfoNew Awesome Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. ​ shortcode partial {{% badge %}}Important{{% /badge %}} {{% badge style="primary" title="Version" %}}6.6.6{{% /badge %}} {{% badge style="red" icon="angle-double-up" %}}Captain{{% /badge %}} {{% badge style="info" %}}New{{% /badge %}} {{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}Awesome{{% /badge %}} {{ partial "shortcodes/badge. Button https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button/index.html The button shortcode displays a clickable button with adjustable color, title and icon. Get Hugo Get Hugo Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. ​ shortcode partial {{% button href="https://gohugo.io/" %}}Get Hugo{{% /button %}} {{% button href="https://gohugo.io/" style="warning" icon="dragon" %}}Get Hugo{{% /button %}} {{ partial "shortcodes/button.html" (dict "page" . "href" "https://gohugo.io/" "content" "Get Hugo" )}} {{ partial "shortcodes/button. Children https://mcshelby.github.io/hugo-theme-relearn/shortcodes/children/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/children/index.html The children shortcode lists the child pages of the current page and its descendants. page X page 1 page 2 page 3 Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. ​ shortcode partial {{% children sort="weight" %}} {{ partial "shortcodes/children.html" (dict "page" . "sort" "weight" )}} Parameter Name Default Notes containerstyle ul Choose the style used to group all children. Expand https://mcshelby.github.io/hugo-theme-relearn/shortcodes/expand/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/expand/index.html The expand shortcode displays an expandable/collapsible section of text. Expand me… Thank you! That’s some text with a footnote1 That’s some more text with a footnote.2 And that’s the footnote. ↩︎ Anything of interest goes here. Blue light glows blue. ↩︎ Usage While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials. ​ shortcode shortcode (positional) partial {{% expand title="Expand me. Highlight https://mcshelby.github.io/hugo-theme-relearn/shortcodes/highlight/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/highlight/index.html The highlight shortcode renders your code with a syntax highlighter. ​ python 1print("Hello World!") Usage This shortcode is fully compatible with Hugo’s highlight shortcode but offers some extensions. It is called interchangeably in the same way as Hugo’s own shortcode providing positional parameter or by simply using codefences. You are free to also call this shortcode from your own partials. In this case it resembles Hugo’s highlight function syntax if you call this shortcode as a partial using compatibility syntax. Icon https://mcshelby.github.io/hugo-theme-relearn/shortcodes/icon/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/icon/index.html The icon shortcode displays icons using the Font Awesome library. Usage While the examples are using shortcodes with positional parameter you are free to also call this shortcode from your own partials. ​ shortcode shortcode (positional) partial {{% icon icon="exclamation-triangle" %}} {{% icon icon="angle-double-up" %}} {{% icon icon="skull-crossbones" %}} {{% icon exclamation-triangle %}} {{% icon angle-double-up %}} {{% icon skull-crossbones %}} {{ partial "shortcodes/icon.html" (dict "page" . "icon" "exclamation-triangle" )}} {{ partial "shortcodes/icon. Include https://mcshelby.github.io/hugo-theme-relearn/shortcodes/include/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/include/index.html The include shortcode includes other files from your project inside of the current page. Usage While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials. ​ shortcode shortcode (positional) partial {{% include file="shortcodes/INCLUDE_ME.md" %}} {{% include "shortcodes/INCLUDE_ME.md" %}} {{ partial "shortcodes/include .html" (dict "page" . "file" "shortcodes/INCLUDE_ME.md" )}} The included files can even contain Markdown and will be taken into account when generating the table of contents. Math https://mcshelby.github.io/hugo-theme-relearn/shortcodes/math/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/math/index.html The math shortcode generates beautiful formatted math and chemical formulae using the MathJax library. Math is also usable without enclosing it in a shortcode or codefence but requires configuration by you. $$\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)$$ Usage While the examples are using shortcodes with named parameter it is recommended to use codefences instead. This is because more and more other software supports Math codefences (eg. Mermaid https://mcshelby.github.io/hugo-theme-relearn/shortcodes/mermaid/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/mermaid/index.html The mermaid shortcode generates diagrams and flowcharts from text, in a similar manner as Markdown using the Mermaid library. graph LR; If --> Then Then --> Else Usage While the examples are using shortcodes with named parameter it is recommended to use codefences instead. This is because more and more other software supports Mermaid codefences (eg. GitHub) and so your markdown becomes more portable. You are free to also call this shortcode from your own partials. Notice https://mcshelby.github.io/hugo-theme-relearn/shortcodes/notice/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/notice/index.html The notice shortcode shows various types of disclaimers with adjustable color, title and icon to help you structure your page. There may be pirates It is all about the boxes. Usage While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials. ​ shortcode shortcode (positional) partial {{% notice style="primary" title="There may be pirates" icon="skull-crossbones" %}} It is all about the boxes. OpenAPI https://mcshelby.github.io/hugo-theme-relearn/shortcodes/openapi/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/openapi/index.html The openapi shortcode uses the Swagger UI library to display your OpenAPI / Swagger specifications. Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. ​ shortcode partial {{< openapi src="https://petstore3.openapi.io/api/v3/openapi.json" >}} {{ partial "shortcodes/openapi.html" (dict "page" . "src" "https://petstore3.openapi.io/api/v3/openapi.json" )}} Parameter Name Default Notes src <empty> The URL to the OpenAPI specification file. This can be relative to the URL of your page if it is a leaf or branch bundle. Resources https://mcshelby.github.io/hugo-theme-relearn/shortcodes/resources/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/resources/index.html The resources shortcode displays the titles of resources contained in a page bundle. Attachments hugo.png (17 KB) MaybeTreasure.txt (23 B) NoTreasure.en.txt (23 B) Treasure.pir.txt (31 B) Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. ​ shortcode partial {{% resources sort="asc" /%}} {{ partial "shortcodes/resources.html" (dict "page" . "sort" "asc" )}} Multilanguage features are not supported directly by the shortcode but rely on Hugo’s handling for resource translations applied when the theme iterates over all available resources. SiteParam https://mcshelby.github.io/hugo-theme-relearn/shortcodes/siteparam/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/siteparam/index.html The siteparam shortcode prints values of site params. Usage While the examples are using shortcodes with named parameter you are free to use positional as well or call this shortcode from your own partials. ​ shortcode shortcode (positional) partial {{% siteparam name="editURL" %}} {{% siteparam "editURL" %}} {{ partial "shortcodes/siteparam.html" (dict "page" . "name" "editURL" )}} Parameter Name Position Default Notes name 1 <empty> The name of the site param to be displayed. Tab https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tab/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tab/index.html You can use a tab shortcode to display a single tab. This is especially useful if you want to flag your code example with an explicit language. If you want multiple tabs grouped together you can wrap your tabs into the tabs shortcode. ​ c printf("Hello World!"); Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. ​ shortcode partial {{% tab title="c" %}} ```c printf("Hello World! Tabs https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tabs/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tabs/index.html The tabs shortcode displays arbitrary content in an unlimited number of tabs. This comes in handy eg. for providing code snippets for multiple languages. If you just want a single tab you can instead call the tab shortcode standalone. hello. py sh c print("Hello World!") echo "Hello World!" printf("Hello World!"); Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.