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 Attachments https://McShelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html Mon, 01 Jan 0001 00:00:00 +0000 https://McShelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html The attachments shortcode displays a list of files attached to a page with adjustable color, title and icon. Attachments adivorciarsetoca00cape.pdf (361 KB) BachGavotteShort.mp3 (357 KB) Carroll_AliceAuPaysDesMerveilles.pdf (175 KB) hugo.png (17 KB) hugo.txt (20 B) movieselectricsheep-flock-244-32500-2.mp4 (340 KB) Warning Since Hugo 0.112.0 this only works for leaf bundles. Branch bundles and simple pages must be switched to leaf bundles or you are currently locked to a Hugo version < 0.112.0. Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. 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 shortcode partial 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="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 shortcode partial 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 shortcode partial 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. ↩︎ Note This only works in modern browsers flawlessly. While Internet Explorer 11 has issues in displaying it, the functionality still works. 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. 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. 1print("Hello World!") Usage This shortcode is compatible with Hugo’s highlight shortcode but offers some extensions. You can call it interchangeably in the same way as Hugo’s own shortcode using positional parameter or by simply using codefences. You are free to also call this shortcode from your own partials. In this case it somewhat resemble Hugo’s highlight function syntax if you call this shortcode as a partial using compatiblity 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 shortcode (positional) shortcode (positional) partial 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" . 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 aswell or also call this shortcode from your own partials. ​ shortcode shortcode shortcode (positional) shortcode (positional) partial 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. $$\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)$$ Note This only works in modern browsers. 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. GitHub) and so your markdown becomes more portable. 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 Note This only works in modern browsers. Warning Due to limitations with Mermaid, it is currently not possible to use Mermaid code fences in an initially collapsed expand shortcode. This is a know issue and can’t be fixed by this theme. Usage While the examples are using shortcodes with named parameter it is recommended to use codefences instead. 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 shortcode (positional) shortcode (positional) partial 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. Note This only works in modern browsers. Usage While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials. ​ shortcode shortcode partial 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. 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 aswell or call this shortcode from your own partials. ​ shortcode shortcode shortcode (positional) shortcode (positional) partial 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 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. 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 py sh sh c 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.