hugo-theme-relearn/shortcodes/index.print.html
2024-10-24 14:30:52 +00:00

7689 lines
492 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en" dir="ltr" itemscope itemtype="http://schema.org/Article">
<head>
<meta charset="utf-8">
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="generator" content="Hugo 0.136.4">
<meta name="generator" content="Relearn 7.0.1+4ed15c8096764c75a97ef858bb3a4c0d784fe888">
<meta name="description" content="Hugo uses Markdown as its content format. However, there are a lot of things that Markdown doesnt support well.">
<meta name="author" content="Sören Weber">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
<meta name="twitter:title" content="Shortcodes :: Hugo Relearn Theme">
<meta name="twitter:description" content="Hugo uses Markdown as its content format. However, there are a lot of things that Markdown doesnt support well.">
<meta property="og:url" content="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/index.html">
<meta property="og:site_name" content="Hugo Relearn Theme">
<meta property="og:title" content="Shortcodes :: Hugo Relearn Theme">
<meta property="og:description" content="Hugo uses Markdown as its content format. However, there are a lot of things that Markdown doesnt support well.">
<meta property="og:locale" content="en">
<meta property="og:type" content="website">
<meta property="og:image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
<meta itemprop="name" content="Shortcodes :: Hugo Relearn Theme">
<meta itemprop="description" content="Hugo uses Markdown as its content format. However, there are a lot of things that Markdown doesnt support well.">
<meta itemprop="wordCount" content="172">
<meta itemprop="image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
<meta itemprop="keywords" content="Reference">
<title>Shortcodes :: Hugo Relearn Theme</title>
<link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/index.html" rel="alternate" hreflang="x-default">
<link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/index.html" rel="alternate" hreflang="en">
<link href="https://mcshelby.github.io/hugo-theme-relearn/pir/shortcodes/index.html" rel="alternate" hreflang="art-x-pir">
<link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/index.html" rel="canonical" type="text/html" title="Shortcodes :: Hugo Relearn Theme">
<link href="/hugo-theme-relearn/shortcodes/index.xml" rel="alternate" type="application/rss+xml" title="Shortcodes :: Hugo Relearn Theme">
<link href="/hugo-theme-relearn/images/logo.svg?1729780238" rel="icon" type="image/svg+xml">
<link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1729780238" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1729780238" rel="stylesheet"></noscript>
<link href="/hugo-theme-relearn/css/nucleus.css?1729780238" rel="stylesheet">
<link href="/hugo-theme-relearn/css/auto-complete.css?1729780238" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/auto-complete.css?1729780238" rel="stylesheet"></noscript>
<link href="/hugo-theme-relearn/css/perfect-scrollbar.min.css?1729780238" rel="stylesheet">
<link href="/hugo-theme-relearn/css/fonts.css?1729780238" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fonts.css?1729780238" rel="stylesheet"></noscript>
<link href="/hugo-theme-relearn/css/theme.css?1729780238" rel="stylesheet">
<link href="/hugo-theme-relearn/css/theme-relearn-auto.css?1729780238" rel="stylesheet" id="R-variant-style">
<link href="/hugo-theme-relearn/css/chroma-relearn-auto.css?1729780238" rel="stylesheet" id="R-variant-chroma-style">
<link href="/hugo-theme-relearn/css/print.css?1729780238" rel="stylesheet" media="print">
<link href="/hugo-theme-relearn/css/format-print.css?1729780238" rel="stylesheet">
<script src="/hugo-theme-relearn/js/variant.js?1729780238"></script>
<script>
window.relearn = window.relearn || {};
window.relearn.relBasePath='..';
window.relearn.relBaseUri='..\/..';
window.relearn.absBaseUri='https:\/\/mcshelby.github.io\/hugo-theme-relearn';
window.relearn.disableAnchorCopy=false;
window.relearn.disableAnchorScrolling=false;
// variant stuff
window.variants && variants.init( [ 'relearn-auto', 'relearn-light', 'relearn-dark', 'relearn-bright', 'zen-auto', 'zen-light', 'zen-dark', 'retro-auto', 'neon', 'learn', 'blue', 'green', 'red' ] );
// translations
window.T_Copy_to_clipboard = `Copy to clipboard`;
window.T_Copied_to_clipboard = `Copied to clipboard!`;
window.T_Copy_link_to_clipboard = `Copy link to clipboard`;
window.T_Link_copied_to_clipboard = `Copied link to clipboard!`;
window.T_Reset_view = `Reset view`;
window.T_View_reset = `View reset!`;
window.T_No_results_found = `No results found for "{0}"`;
window.T_N_results_found = `{1} results found for "{0}"`;
</script>
<style>
#R-body img.bg-white {
background-color: white;
}
</style>
</head>
<body class="mobile-support print disableInlineCopyToClipboard" data-url="/hugo-theme-relearn/shortcodes/index.html">
<div id="R-body" class="default-animation">
<div id="R-body-overlay"></div>
<nav id="R-topbar">
<div class="topbar-wrapper">
<div class="topbar-sidebar-divider"></div>
<div class="topbar-area topbar-area-start" data-area="start">
<div class="topbar-button topbar-button-sidebar" data-content-empty="disable" data-width-s="show" data-width-m="hide" data-width-l="hide"><button class="topbar-control" onclick="toggleNav()" type="button" title="Menu (CTRL&#43;ALT&#43;n)"><i class="fa-fw fas fa-bars"></i></button>
</div>
<div class="topbar-button topbar-button-toc" data-content-empty="hide" data-width-s="show" data-width-m="show" data-width-l="show"><button class="topbar-control" onclick="toggleTopbarFlyout(this)" type="button" title="Table of Contents (CTRL&#43;ALT&#43;t)"><i class="fa-fw fas fa-list-alt"></i></button>
<div class="topbar-content">
<div class="topbar-content-wrapper">
</div>
</div>
</div>
</div>
<ol class="topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList"><li
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Shortcodes</span><meta itemprop="position" content="1"></li>
</ol>
<div class="topbar-area topbar-area-end" data-area="end">
<div class="topbar-button topbar-button-edit" data-content-empty="disable" data-width-s="area-more" data-width-m="show" data-width-l="show"><a class="topbar-control" href="https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/shortcodes/_index.en.md" target="_self" title="Edit (CTRL&#43;ALT&#43;w)"><i class="fa-fw fas fa-pen"></i></a>
</div>
<div class="topbar-button topbar-button-print" data-content-empty="disable" data-width-s="area-more" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/shortcodes/index.print.html" title="Print whole chapter (CTRL&#43;ALT&#43;p)"><i class="fa-fw fas fa-print"></i></a>
</div>
<div class="topbar-button topbar-button-prev" data-content-empty="disable" data-width-s="show" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/authoring/imageeffects/index.html" title="Image Effects (🡐)"><i class="fa-fw fas fa-chevron-left"></i></a>
</div>
<div class="topbar-button topbar-button-next" data-content-empty="disable" data-width-s="show" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/shortcodes/badge/index.html" title="Badge (🡒)"><i class="fa-fw fas fa-chevron-right"></i></a>
</div>
<div class="topbar-button topbar-button-more" data-content-empty="hide" data-width-s="show" data-width-m="show" data-width-l="show"><button class="topbar-control" onclick="toggleTopbarFlyout(this)" type="button" title="More"><i class="fa-fw fas fa-ellipsis-v"></i></button>
<div class="topbar-content">
<div class="topbar-content-wrapper">
<div class="topbar-area topbar-area-more" data-area="more">
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
<div id="R-main-overlay"></div>
<main id="R-body-inner" class="highlightable chapter" tabindex="-1">
<div class="flex-block-wrapper">
<article class="chapter narrow">
<header class="headline">
</header>
<div class="article-subheading">Chapter 4</div>
<h1 id="shortcodes">Shortcodes</h1>
<p>Hugo uses Markdown as its content format. However, there are a lot of things that Markdown doesn&rsquo;t support well.</p>
<p>You could use pure HTML to expand your possibilities. But this happens to be a bad idea. Everyone uses Markdown because it&rsquo;s pure and simple to read. You should avoid HTML to keep it as simple and portable as possible.</p>
<p>To avoid Markdown&rsquo;s limitations, Hugo created <a href="https://gohugo.io/content-management/shortcodes/" rel="external" target="_self">shortcodes</a>. A shortcode is a simple snippet inside of a page.</p>
<p>The Relearn theme provides many shortcodes on top of <a href="https://gohugo.io/content-management/shortcodes/#embedded-shortcodes" rel="external" target="_self">Hugo&rsquo;s existing ones</a>.</p>
<div class="children children-h2 children-sort-">
<h2><a href="/hugo-theme-relearn/shortcodes/badge/index.html">Badge</a></h2><p>Marker badges to display in your text</p>
<h2><a href="/hugo-theme-relearn/shortcodes/button/index.html">Button</a></h2><p>Clickable buttons</p>
<h2><a href="/hugo-theme-relearn/shortcodes/children/index.html">Children</a></h2><p>List the child pages of a page</p>
<h2><a href="/hugo-theme-relearn/shortcodes/expand/index.html">Expand</a></h2><p>Expandable/collapsible sections of text</p>
<h2><a href="/hugo-theme-relearn/shortcodes/highlight/index.html">Highlight</a></h2><p>Render code with a syntax highlighter</p>
<h2><a href="/hugo-theme-relearn/shortcodes/icon/index.html">Icon</a></h2><p>Nice icons for your page</p>
<h2><a href="/hugo-theme-relearn/shortcodes/include/index.html">Include</a></h2><p>Displays content from other files</p>
<h2><a href="/hugo-theme-relearn/shortcodes/math/index.html">Math</a></h2><p>Beautiful math and chemical formulae</p>
<h2><a href="/hugo-theme-relearn/shortcodes/mermaid/index.html">Mermaid</a></h2><p>Generate diagrams and flowcharts from text</p>
<h2><a href="/hugo-theme-relearn/shortcodes/notice/index.html">Notice</a></h2><p>Disclaimers to help you structure your page</p>
<h2><a href="/hugo-theme-relearn/shortcodes/openapi/index.html">OpenAPI</a></h2><p>UI for your OpenAPI / Swagger specifications</p>
<h2><a href="/hugo-theme-relearn/shortcodes/resources/index.html">Resources</a></h2><p>List resources contained in a page bundle</p>
<h2><a href="/hugo-theme-relearn/shortcodes/siteparam/index.html">SiteParam</a></h2><p>Get value of site params</p>
<h2><a href="/hugo-theme-relearn/shortcodes/tab/index.html">Tab</a></h2><p>Show content in a single tab</p>
<h2><a href="/hugo-theme-relearn/shortcodes/tabs/index.html">Tabs</a></h2><p>Show content in tabbed views</p>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<section>
<h1 class="a11y-only">Subsections of Shortcodes</h1>
<article class="default">
<header class="headline">
</header>
<h1 id="badge">Badge</h1>
<p>The <code>badge</code> shortcode displays little markers in your text with adjustable color, title and icon.</p>
<p><span class="badge cstyle default"><span class="badge-content">Important</span></span>
<span class="badge cstyle primary badge-with-title"><span class="badge-title">Version</span><span class="badge-content">6.6.6</span></span>
<span class="badge cstyle red badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-angle-double-up"></i></span><span class="badge-content">Captain</span></span>
<span class="badge cstyle info badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-info-circle"></i> Info</span><span class="badge-content">New</span></span>
<span class="badge cstyle default badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-hackerrank"></i></span><span class="badge-content" style="background-color: fuchsia;">Awesome</span></span></p>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Important</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Version&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="mf">6.6.6</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Captain</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">New</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;fuchsia&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;fa-fw fab fa-hackerrank&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Awesome</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/badge.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;Important&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/badge.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;style&#34;</span> <span class="s">&#34;primary&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;Version&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;6.6.6&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/badge.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;style&#34;</span> <span class="s">&#34;red&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;icon&#34;</span> <span class="s">&#34;angle-double-up&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;Captain&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/badge.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;style&#34;</span> <span class="s">&#34;info&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;New&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/badge.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;color&#34;</span> <span class="s">&#34;fuchsia&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;icon&#34;</span> <span class="s">&#34;fab fa-hackerrank&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;Awesome&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>style</strong></td>
<td><code>default</code></td>
<td>The style scheme used for the badge.<br><br>- by severity: <code>caution</code>, <code>important</code>, <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>cyan</code>, <code>green</code>, <code>grey</code>, <code>magenta</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code><br><br>You can also <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">define your own styles</a>.</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>see notes</td>
<td>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value" rel="external" target="_self">CSS color value</a> to be used. If not set, the chosen color depends on the <strong>style</strong>. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td>see notes</td>
<td>Arbitrary text for the badge title. Depending on the <strong>style</strong> there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no title for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><strong>icon</strong></td>
<td>see notes</td>
<td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> set to the left of the title. Depending on the <strong>style</strong> there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no icon for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary text for the badge.</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="style">Style</h3>
<h4 id="by-severity">By Severity</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;caution&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Magenta</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;important&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Cyan</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Blue</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;note&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Orange</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;tip&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Green</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;warning&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Red</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle caution badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-hand"></i> Caution</span><span class="badge-content">Magenta</span></span>
<span class="badge cstyle important badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-bolt"></i> Important</span><span class="badge-content">Cyan</span></span>
<span class="badge cstyle info badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-info-circle"></i> Info</span><span class="badge-content">Blue</span></span>
<span class="badge cstyle note badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-exclamation-circle"></i> Note</span><span class="badge-content">Orange</span></span>
<span class="badge cstyle tip badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-lightbulb"></i> Tip</span><span class="badge-content">Green</span></span>
<span class="badge cstyle warning badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-exclamation-triangle"></i> Warning</span><span class="badge-content">Red</span></span></p>
<h4 id="by-brand-colors">By Brand Colors</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;bullhorn&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Announcement&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Mandatory</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;secondary&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;bullhorn&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Announcement&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Optional</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;accent&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;bullhorn&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Announcement&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Special</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle primary badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-bullhorn"></i> Announcement</span><span class="badge-content">Mandatory</span></span>
<span class="badge cstyle secondary badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-bullhorn"></i> Announcement</span><span class="badge-content">Optional</span></span>
<span class="badge cstyle accent badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-bullhorn"></i> Announcement</span><span class="badge-content">Special</span></span></p>
<h4 id="by-color">By Color</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Blue</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;cyan&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Cyan</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;green&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Green</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;grey&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Grey</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;magenta&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Magenta</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;orange&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Orange</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Red</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle blue badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Blue</span></span>
<span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Cyan</span></span>
<span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Green</span></span>
<span class="badge cstyle grey badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Grey</span></span>
<span class="badge cstyle magenta badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Magenta</span></span>
<span class="badge cstyle orange badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Orange</span></span>
<span class="badge cstyle red badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Red</span></span></p>
<h4 id="by-special-color">By Special Color</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;default&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Default</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;transparent&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;palette&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Color&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Transparent</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle default badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Default</span></span>
<span class="badge cstyle transparent badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-palette"></i> Color</span><span class="badge-content">Transparent</span></span></p>
<h3 id="variants">Variants</h3>
<h4 id="without-icon-and-title-text">Without Icon and Title Text</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span><span class="mf">6.6.6</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34; &#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34; &#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Awesome</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Captain</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle default"><span class="badge-content">6.6.6</span></span>
<span class="badge cstyle info"><span class="badge-content">Awesome</span></span>
<span class="badge cstyle red"><span class="badge-content">Captain</span></span></p>
<h4 id="without-icon">Without Icon</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Version&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="mf">6.6.6</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34; &#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Awesome</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Rank&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Captain</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle default badge-with-title"><span class="badge-title">Version</span><span class="badge-content">6.6.6</span></span>
<span class="badge cstyle info badge-with-title"><span class="badge-title">Info</span><span class="badge-content">Awesome</span></span>
<span class="badge cstyle red badge-with-title"><span class="badge-title">Rank</span><span class="badge-content">Captain</span></span></p>
<h4 id="without-title-text">Without Title Text</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;star&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="mf">6.6.6</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34; &#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Awesome</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Captain</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle default badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-star"></i></span><span class="badge-content">6.6.6</span></span>
<span class="badge cstyle info badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-info-circle"></i></span><span class="badge-content">Awesome</span></span>
<span class="badge cstyle red badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-angle-double-up"></i></span><span class="badge-content">Captain</span></span></p>
<h4 id="all-set">All Set</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;star&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Version&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="mf">6.6.6</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Awesome</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Rank&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Captain</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="badge cstyle default badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-star"></i> Version</span><span class="badge-content">6.6.6</span></span>
<span class="badge cstyle info badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-info-circle"></i> Info</span><span class="badge-content">Awesome</span></span>
<span class="badge cstyle red badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-angle-double-up"></i> Rank</span><span class="badge-content">Captain</span></span></p>
<h4 id="override-for-severity">Override for Severity</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;rocket&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Feature&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Awesome</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="badge cstyle info badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-rocket"></i> Feature</span><span class="badge-content">Awesome</span></span>
<h3 id="other">Other</h3>
<h4 id="with-user-defined-color-font-awesome-brand-icon-and-markdown-title-and-content">With User-Defined Color, Font Awesome Brand Icon and Markdown Title and Content</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;fuchsia&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;fa-fw fab fa-hackerrank&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;**Font**&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="o">**</span><span class="nx">Awesome</span><span class="o">**</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="badge cstyle default badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-hackerrank"></i> <strong>Font</strong></span><span class="badge-content" style="background-color: fuchsia;"><strong>Awesome</strong></span></span>
<h4 id="with-icon-content">With Icon Content</h4>
<p>You can combine the badge with the <a href="/hugo-theme-relearn/shortcodes/icon/index.html"><code>icon</code> shortcode</a> to create even more stunning visuals.</p>
<p>In this case you need to declare <code>{{&lt; badge &gt;}}</code> instead of <code>{{% badge %}}</code>. Note, that in this case it is not possible to put markdown in the content.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="p">&gt;}}{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">skull</span><span class="o">-</span><span class="nx">crossbones</span> <span class="o">%</span><span class="p">}}{{&lt;</span> <span class="o">/</span><span class="nx">badge</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="p">&gt;}}{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">skull</span><span class="o">-</span><span class="nx">crossbones</span> <span class="o">%</span><span class="p">}}</span> <span class="nx">Pirate</span><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">badge</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Rank&#34;</span> <span class="p">&gt;}}{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">skull</span><span class="o">-</span><span class="nx">crossbones</span> <span class="o">%</span><span class="p">}}{{&lt;</span> <span class="o">/</span><span class="nx">badge</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Rank&#34;</span> <span class="p">&gt;}}{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">skull</span><span class="o">-</span><span class="nx">crossbones</span> <span class="o">%</span><span class="p">}}</span> <span class="nx">Pirate</span><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">badge</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Rank&#34;</span> <span class="p">&gt;}}{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">skull</span><span class="o">-</span><span class="nx">crossbones</span> <span class="o">%</span><span class="p">}}{{&lt;</span> <span class="o">/</span><span class="nx">badge</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Rank&#34;</span> <span class="p">&gt;}}{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">skull</span><span class="o">-</span><span class="nx">crossbones</span> <span class="o">%</span><span class="p">}}</span> <span class="nx">Pirate</span><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">badge</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<p><span class="badge cstyle primary badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-angle-double-up"></i></span><span class="badge-content"><i class="fa-fw fas fa-skull-crossbones"></i></span></span><br>
<span class="badge cstyle primary badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-angle-double-up"></i></span><span class="badge-content"><i class="fa-fw fas fa-skull-crossbones"></i> Pirate</span></span><br>
<span class="badge cstyle primary badge-with-title"><span class="badge-title">Rank</span><span class="badge-content"><i class="fa-fw fas fa-skull-crossbones"></i></span></span><br>
<span class="badge cstyle primary badge-with-title"><span class="badge-title">Rank</span><span class="badge-content"><i class="fa-fw fas fa-skull-crossbones"></i> Pirate</span></span><br>
<span class="badge cstyle primary badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-angle-double-up"></i> Rank</span><span class="badge-content"><i class="fa-fw fas fa-skull-crossbones"></i></span></span><br>
<span class="badge cstyle primary badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-angle-double-up"></i> Rank</span><span class="badge-content"><i class="fa-fw fas fa-skull-crossbones"></i> Pirate</span></span></p>
<h4 id="inside-of-text">Inside of Text</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">Lorem</span> <span class="nx">ipsum</span> <span class="nx">dolor</span> <span class="nx">sit</span> <span class="nx">amet</span><span class="p">,</span> <span class="nx">graecis</span> <span class="nx">denique</span> <span class="nx">ei</span> <span class="nx">vel</span><span class="p">,</span> <span class="nx">at</span> <span class="nx">duo</span> <span class="nx">primis</span> <span class="nx">mandamus</span><span class="p">.</span> <span class="p">{{</span><span class="o">%</span> <span class="nx">badge</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;rocket&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Awesome</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">badge</span> <span class="o">%</span><span class="p">}}</span> <span class="nx">Et</span> <span class="nx">legere</span> <span class="nx">ocurreret</span> <span class="nx">pri</span><span class="p">,</span> <span class="nx">animal</span> <span class="nx">tacimates</span> <span class="nx">complectitur</span> <span class="nx">ad</span> <span class="nx">cum</span><span class="p">.</span> <span class="nx">Cu</span> <span class="nx">eum</span> <span class="nx">inermis</span> <span class="nx">inimicus</span> <span class="nx">efficiendi</span><span class="p">.</span> <span class="nx">Labore</span> <span class="nx">officiis</span> <span class="nx">his</span> <span class="nx">ex</span><span class="p">,</span> <span class="nx">soluta</span> <span class="nx">officiis</span> <span class="nx">concludaturque</span> <span class="nx">ei</span> <span class="nx">qui</span><span class="p">,</span> <span class="nx">vide</span> <span class="nx">sensibus</span> <span class="nx">vim</span> <span class="nx">ad</span><span class="p">.</span></span></span></code></pre></div>
<p>Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. <span class="badge cstyle blue badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-rocket"></i></span><span class="badge-content">Awesome</span></span> 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.</p>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="button">Button</h1>
<p>The <code>button</code> shortcode displays a clickable button with adjustable color, title and icon.</p>
<p><span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive warning"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-dragon"></i> <span class="title">Get Hugo</span></a></span></p>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;warning&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;dragon&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/button.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;href&#34;</span> <span class="s">&#34;https://gohugo.io/&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;Get Hugo&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/button.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;href&#34;</span> <span class="s">&#34;https://gohugo.io/&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;style&#34;</span> <span class="s">&#34;warning&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;icon&#34;</span> <span class="s">&#34;dragon&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;Get Hugo&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>href</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Either the destination URL for the button or JavaScript code to be executed on click. If this parameter is not set, the button will do nothing but is still displayed as clickable.<br><br>- if starting with <code>javascript:</code> all following text will be executed in your browser<br>- every other string will be interpreted as URL</td>
</tr>
<tr>
<td><strong>style</strong></td>
<td><code>transparent</code></td>
<td>The style scheme used for the button.<br><br>- by severity: <code>caution</code>, <code>important</code>, <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>cyan</code>, <code>green</code>, <code>grey</code>, <code>magenta</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code><br><br>You can also <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">define your own styles</a>.</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>see notes</td>
<td>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value" rel="external" target="_self">CSS color value</a> to be used. If not set, the chosen color depends on the <strong>style</strong>. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color</td>
</tr>
<tr>
<td><strong>icon</strong></td>
<td>see notes</td>
<td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> set to the left of the title. Depending on the <strong>style</strong> there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no icon for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><strong>iconposition</strong></td>
<td><code>left</code></td>
<td>Places the icon to the <code>left</code> or <code>right</code> of the title.</td>
</tr>
<tr>
<td><strong>target</strong></td>
<td>see notes</td>
<td>The destination frame/window if <strong>href</strong> is an URL. Otherwise the parameter is not used. This behaves similar to normal links. If the parameter is not given it defaults to:<br><br>- the setting of <code>externalLinkTarget</code> or <code>_blank</code> if not set, for any address starting with <code>http://</code> or <code>https://</code><br>- no specific value for all other links</td>
</tr>
<tr>
<td><strong>type</strong></td>
<td>see notes</td>
<td>The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type" rel="external" target="_self">button type</a> if <strong>href</strong> is JavaScript. Otherwise the parameter is not used. If the parameter is not given it defaults to <code>button</code></td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td>see notes</td>
<td>Arbitrary text for the button title. Depending on the <strong>style</strong> there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no title for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="style">Style</h3>
<h4 id="by-severity">By Severity</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;caution&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;important&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;note&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;tip&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;warning&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="btn cstyle interactive caution"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-hand"></i> <span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive important"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-bolt"></i> <span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive info"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-info-circle"></i> <span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive note"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-exclamation-circle"></i> <span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive tip"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-lightbulb"></i> <span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive warning"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-exclamation-triangle"></i> <span class="title">Get Hugo</span></a></span></p>
<h4 id="by-brand-colors">By Brand Colors</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;secondary&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;accent&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="btn cstyle interactive primary"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive secondary"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive accent"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span></p>
<h4 id="by-color">By Color</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;cyan&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;green&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;grey&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;magenta&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;orange&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="btn cstyle interactive blue"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive cyan"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive green"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive grey"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive magenta"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive orange"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive red"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span></p>
<h4 id="by-special-color">By Special Color</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;default&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;transparent&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="btn cstyle interactive default"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span>
<span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span></a></span></p>
<h3 id="icon">Icon</h3>
<h4 id="empty">Empty</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34; &#34;</span> <span class="o">%</span><span class="p">}}{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"></a></span>
<h4 id="only">Only</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;download&#34;</span> <span class="o">%</span><span class="p">}}{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-download"></i></a></span>
<h4 id="to-the-left">To the Left</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;download&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-download"></i> <span class="title">Get Hugo</span></a></span>
<h4 id="to-the-right">To the Right</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;download&#34;</span> <span class="nx">iconposition</span><span class="p">=</span><span class="s">&#34;right&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo</span> <i class="fa-fw fas fa-download"></i></a></span>
<h4 id="override-for-severity">Override for Severity</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;dragon&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;warning&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive warning"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-dragon"></i> <span class="title">Get Hugo</span></a></span>
<h3 id="target">Target</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">target</span><span class="p">=</span><span class="s">&#34;_self&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span> <span class="nx">in</span> <span class="nx">same</span> <span class="nx">window</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="nx">Hugo</span> <span class="nx">in</span> <span class="nx">new</span> <span class="nx">Window</span><span class="o">/</span><span class="nf">Frame</span> <span class="p">(</span><span class="k">default</span><span class="p">){{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo in same Window/Frame</span></a></span>
<span class="btn cstyle interactive transparent"><a href="https://gohugo.io/" target="_self"><span class="title">Get Hugo in new Window/Frame (default)</span></a></span></p>
<h3 id="other">Other</h3>
<h4 id="with-user-defined-color-font-awesome-brand-icon-and-markdown-title">With User-Defined Color, Font Awesome Brand Icon and Markdown Title</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;fuchsia&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;fa-fw fab fa-hackerrank&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Get</span> <span class="o">**</span><span class="nx">Hugo</span><span class="o">**</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive default" style="--VARIABLE-BOX-color: fuchsia;"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fab fa-hackerrank"></i> <span class="title">Get <strong>Hugo</strong></span></a></span>
<h4 id="severity-style-with-all-defaults">Severity Style with All Defaults</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;https://gohugo.io/&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;tip&#34;</span> <span class="o">%</span><span class="p">}}{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive tip"><a href="https://gohugo.io/" target="_self"><i class="fa-fw fas fa-lightbulb"></i> <span class="title">Tip</span></a></span>
<h4 id="button-to-internal-page">Button to Internal Page</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;/index.html&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Home</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive transparent"><a href="/index.html"><span class="title">Home</span></a></span>
<h4 id="button-with-javascript-action">Button with JavaScript Action</h4>
<p>If your JavaScript action does not change the focus afterwards, make sure to call <code>this.blur()</code> in the end to unselect the button.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">button</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;bullhorn&#34;</span> <span class="nx">href</span><span class="p">=</span><span class="s">&#34;javascript:alert(&#39;Hello world!&#39;);this.blur();&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Shout</span> <span class="nx">it</span> <span class="nx">out</span><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">button</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<span class="btn cstyle interactive primary"><button onclick="alert(&#39;Hello world!&#39;);this.blur();" type="button"><i class="fa-fw fas fa-bullhorn"></i> <span class="title">Shout it out</span></button></span>
<h4 id="button-within-a-form-element">Button within a <code>form</code> Element</h4>
<p>To use native HTML elements in your Markdown, add this in your <code>hugo.toml</code></p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">renderer</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">unsafe</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">form</span> <span class="na">action</span><span class="o">=</span><span class="s">&#34;../../search.html&#34;</span> <span class="na">method</span><span class="o">=</span><span class="s">&#34;get&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"> <span class="p">&lt;</span><span class="nt">input</span> <span class="na">name</span><span class="o">=</span><span class="s">&#34;search-by-detail&#34;</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;search-by&#34;</span> <span class="na">type</span><span class="o">=</span><span class="s">&#34;search&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl"> {{% button type=&#34;submit&#34; style=&#34;secondary&#34; icon=&#34;search&#34; %}}Search{{% /button %}}
</span></span><span class="line"><span class="cl"><span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span></span></span></code></pre></div>
<form action="../../search.html" method="get">
<div class="searchform" style="width: 20vw;">
<input name="search-by-detail" class="search-by" type="search" placeholder="Search...">
<span class="btn cstyle interactive secondary"><button onclick="" type="submit"><i class="fa-fw fas fa-search"></i> <span class="title">Search</span></button></span>
</div>
</form>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="children">Children</h1>
<p>The <code>children</code> shortcode lists the child pages of the current page and its descendants.</p>
<ul class="children children-li children-sort-title">
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/index.html">page 1</a></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-2/index.html">page 2</a></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-3/index.html">page 3</a></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/test/index.html">page X</a></li>
</ul>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">children</span> <span class="nx">sort</span><span class="p">=</span><span class="s">&#34;title&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/children.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;sort&#34;</span> <span class="s">&#34;title&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>containerstyle</strong></td>
<td><code>ul</code></td>
<td>Choose the style used to group all children. It could be any HTML tag name.</td>
</tr>
<tr>
<td><strong>style</strong></td>
<td><code>li</code></td>
<td>Choose the style used to display each descendant. It could be any HTML tag name.</td>
</tr>
<tr>
<td><strong>showhidden</strong></td>
<td><code>false</code></td>
<td>When <code>true</code>, child pages hidden from the menu will be displayed as well.</td>
</tr>
<tr>
<td><strong>description</strong></td>
<td><code>false</code></td>
<td>When <code>true</code> shows a short text under each page in the list. When no description or summary exists for the page, the first 70 words of the content is taken - <a href="https://gohugo.io/content/summaries/" rel="external" target="_self">read more info about summaries on gohugo.io</a>.</td>
</tr>
<tr>
<td><strong>depth</strong></td>
<td><code>1</code></td>
<td>The depth of descendants to display. For example, if the value is <code>2</code>, the shortcode will display two levels of child pages. To get all descendants, set this value to a high number eg. <code>999</code>.</td>
</tr>
<tr>
<td><strong>sort</strong></td>
<td><code>auto</code></td>
<td>The sort criteria of the displayed list.<br><br>- <code>auto</code> defaults to <code>ordersectionsby</code> of the page&rsquo;s <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span><br>    or to <code>ordersectionsby</code> of the configuration <span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span><br>    or to <code>weight</code><br>- <code>weight</code><br>- <code>title</code><br>- <code>linktitle</code><br>- <code>modifieddate</code><br>- <code>expirydate</code><br>- <code>publishdate</code><br>- <code>date</code><br>- <code>length</code><br>- <code>default</code> adhering to Hugo&rsquo;s default sort criteria</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="all-default">All Default</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">children</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<ul class="children children-li children-sort-">
<li><a href="/hugo-theme-relearn/shortcodes/children/test/index.html">page X</a></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/index.html">page 1</a></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-2/index.html">page 2</a></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-3/index.html">page 3</a></li>
</ul>
<h3 id="with-description">With Description</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">children</span> <span class="nx">description</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<ul class="children children-li children-sort-">
<li><a href="/hugo-theme-relearn/shortcodes/children/test/index.html">page X</a><p>This is a plain page test, and the beginning of a YAML multiline description...
</p></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/index.html">page 1</a><p>This is a demo child page</p></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-2/index.html">page 2</a><p><p>This is a demo child page with no description.</p>
<p>So its content is used as description.</p></p></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-3/index.html">page 3</a><p>This is a demo child page</p></li>
</ul>
<h3 id="infinite-depth-and-hidden-pages">Infinite Depth and Hidden Pages</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">children</span> <span class="nx">depth</span><span class="p">=</span><span class="s">&#34;999&#34;</span> <span class="nx">showhidden</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<ul class="children children-li children-sort-">
<li><a href="/hugo-theme-relearn/shortcodes/children/test/index.html">page X</a><ul></ul></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/index.html">page 1</a><ul>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/index.html">page 1-1</a><ul>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-1/index.html">page 1-1-1 (hidden)</a><ul>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/index.html">page 1-1-1-1</a><ul>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/index.html">page 1-1-1-1-1 (hidden)</a><ul>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/children-1-1-1-1-1-1/index.html">page 1-1-1-1-1-1</a><ul></ul></li></ul></li></ul></li></ul></li>
<li><span>page 1-1-2 (headless)</span><ul>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-2/children-1-1-2-1/index.html">page 1-1-2-1</a><ul></ul></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-2/children-1-1-2-2/index.html">page 1-1-2-2</a><ul></ul></li></ul></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-3/index.html">page 1-1-3</a><ul></ul></li></ul></li></ul></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-2/index.html">page 2</a><ul></ul></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-3/index.html">page 3</a><ul>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-3/test3/index.html">page 3-1</a><ul></ul></li></ul></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-4/index.html">page 4 (hidden)</a><ul></ul></li>
</ul>
<h3 id="heading-styles-for-container-and-elements">Heading Styles for Container and Elements</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">children</span> <span class="nx">containerstyle</span><span class="p">=</span><span class="s">&#34;div&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;h2&#34;</span> <span class="nx">depth</span><span class="p">=</span><span class="s">&#34;3&#34;</span> <span class="nx">description</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="children children-h2 children-sort-">
<h2><a href="/hugo-theme-relearn/shortcodes/children/test/index.html">page X</a></h2><p>This is a plain page test, and the beginning of a YAML multiline description...
</p>
<h2><a href="/hugo-theme-relearn/shortcodes/children/children-1/index.html">page 1</a></h2><p>This is a demo child page</p>
<h3><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/index.html">page 1-1</a></h3><p>This is a demo child page</p>
<h4><span>page 1-1-2 (headless)</span></h4><p>This is a demo child page</p>
<h4><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-3/index.html">page 1-1-3</a></h4><p>This is a demo child page</p>
<h2><a href="/hugo-theme-relearn/shortcodes/children/children-2/index.html">page 2</a></h2><p><p>This is a demo child page with no description.</p>
<p>So its content is used as description.</p></p>
<h2><a href="/hugo-theme-relearn/shortcodes/children/children-3/index.html">page 3</a></h2><p>This is a demo child page</p>
<h3><a href="/hugo-theme-relearn/shortcodes/children/children-3/test3/index.html">page 3-1</a></h3><p>This is a plain page test nested in a parent</p>
</div>
<h3 id="divs-for-group-and-element-styles">Divs for Group and Element Styles</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">children</span> <span class="nx">containerstyle</span><span class="p">=</span><span class="s">&#34;div&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;div&#34;</span> <span class="nx">depth</span><span class="p">=</span><span class="s">&#34;3&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="children children-div children-sort-">
<div><a href="/hugo-theme-relearn/shortcodes/children/test/index.html">page X</a></div>
<div><a href="/hugo-theme-relearn/shortcodes/children/children-1/index.html">page 1</a></div>
<div><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/index.html">page 1-1</a></div>
<div><span>page 1-1-2 (headless)</span></div>
<div><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-3/index.html">page 1-1-3</a></div>
<div><a href="/hugo-theme-relearn/shortcodes/children/children-2/index.html">page 2</a></div>
<div><a href="/hugo-theme-relearn/shortcodes/children/children-3/index.html">page 3</a></div>
<div><a href="/hugo-theme-relearn/shortcodes/children/children-3/test3/index.html">page 3-1</a></div>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<section>
<h1 class="a11y-only">Subsections of Children</h1>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
</ul>
</div>
</header>
<h1 id="page-x">page X</h1>
<p>This is a plain demo child page X.</p>
<footer class="footline">
</footer>
</article>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-1">page 1</h1>
<p>This is a demo child page.</p>
<h2 id="subpages-of-this-page">Subpages of this page</h2>
<ul class="children children-li children-sort-">
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/index.html">page 1-1</a></li>
</ul>
<footer class="footline">
</footer>
</article>
<section>
<h1 class="a11y-only">Subsections of page 1</h1>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-1-1">page 1-1</h1>
<p>This is a demo child page with a hidden child. You can still access the hidden child <a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-1/index.html">directly</a> or via the search.</p>
<h2 id="subpages-of-this-page">Subpages of this page</h2>
<ul class="children children-li children-sort-">
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-1/index.html">page 1-1-1 (hidden)</a></li>
<li><span>page 1-1-2 (headless)</span></li>
<li><a href="/hugo-theme-relearn/shortcodes/children/children-1/children-1-1/children-1-1-3/index.html">page 1-1-3</a></li>
</ul>
<footer class="footline">
</footer>
</article>
<section>
<h1 class="a11y-only">Subsections of page 1-1</h1>
<article class="default">
<header class="headline">
</header>
<h1 id="page-1-1-2-headless">page 1-1-2 (headless)</h1>
<footer class="footline">
</footer>
</article>
<section>
<h1 class="a11y-only">Subsections of page 1-1-2 (headless)</h1>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-1-1-2-1">page 1-1-2-1</h1>
<p>This is a plain demo child page 1-1-2-1.</p>
<footer class="footline">
</footer>
</article>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-1-1-2-2">page 1-1-2-2</h1>
<p>This is a plain demo child page 1-1-2-2.</p>
<footer class="footline">
</footer>
</article>
</section>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-1-1-3">page 1-1-3</h1>
<p>This is a plain demo child page 1-1-3.</p>
<footer class="footline">
</footer>
</article>
</section>
</section>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-2">page 2</h1>
<p>This is a demo child page with no description.</p>
<p>So its content is used as description.</p>
<footer class="footline">
</footer>
</article>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-3">page 3</h1>
<p>This is a demo child page.</p>
<h2 id="subpages-of-this-page">Subpages of this page</h2>
<ul class="children children-li children-sort-">
<li><a href="/hugo-theme-relearn/shortcodes/children/children-3/test3/index.html">page 3-1</a></li>
</ul>
<footer class="footline">
</footer>
</article>
<section>
<h1 class="a11y-only">Subsections of page 3</h1>
<article class="default">
<header class="headline">
<div class="R-taxonomy taxonomy-tags cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/tags/children/index.html">Children</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/tags/non-hidden/index.html">Non-Hidden</a></li>
</ul>
</div>
</header>
<h1 id="page-3-1">page 3-1</h1>
<p>This is a plain demo child page 3-1.</p>
<footer class="footline">
</footer>
</article>
</section>
</section>
<article class="default">
<header class="headline">
</header>
<h1 id="expand">Expand</h1>
<p>The <code>expand</code> shortcode displays an expandable/collapsible section of text.</p>
<div class="expand">
<input type="checkbox" id="R-expand-3b8f213cd2aba3b2b628db8a2e05d3b1" aria-controls="R-expandcontent-3b8f213cd2aba3b2b628db8a2e05d3b1">
<label class="expand-label" for="R-expand-3b8f213cd2aba3b2b628db8a2e05d3b1">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Expand me&hellip;
</label>
<div id="R-expandcontent-3b8f213cd2aba3b2b628db8a2e05d3b1" class="expand-content">
<p>Thank you!</p>
<p>That&rsquo;s some text with a footnote<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<p>That&rsquo;s some more text with a footnote.<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>And that&rsquo;s the footnote.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>Anything of interest goes here.</p>
<p>Blue light glows blue.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
</div>
</div>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="shortcode-positional"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode-positional')"
>
<span class="tab-nav-text">shortcode (positional)</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">expand</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Expand me...&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Thank</span> <span class="nx">you</span><span class="p">!{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">expand</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode-positional"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">expand</span> <span class="s">&#34;Expand me...&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Thank</span> <span class="nx">you</span><span class="p">!{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">expand</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/expand.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;Expand me...&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;Thank you!&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>The <a href="/hugo-theme-relearn/shortcodes/notice/index.html"><code>notice</code> shortcode</a> is also capable of displaying expandable/collapsible sections of text but with color options.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>title</strong></td>
<td>1</td>
<td><code>&quot;Expand me...&quot;</code></td>
<td>Arbitrary text to appear next to the expand/collapse icon.</td>
</tr>
<tr>
<td><strong>expanded</strong></td>
<td>2</td>
<td><code>false</code></td>
<td>How the content is displayed.<br><br>- <code>true</code>: the content is initially shown<br>- <code>false</code>: the content is initially hidden</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary text to be displayed on expand.</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="all-defaults">All Defaults</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">expand</span> <span class="o">%</span><span class="p">}}</span><span class="nx">Yes</span><span class="p">,</span> <span class="nx">you</span> <span class="nx">did</span> <span class="nx">it</span><span class="p">!{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">expand</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="expand">
<input type="checkbox" id="R-expand-85c687ccd78d168c33ed595d6ed7cd27" aria-controls="R-expandcontent-85c687ccd78d168c33ed595d6ed7cd27">
<label class="expand-label" for="R-expand-85c687ccd78d168c33ed595d6ed7cd27">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Expand me&hellip;
</label>
<div id="R-expandcontent-85c687ccd78d168c33ed595d6ed7cd27" class="expand-content">
<p>
Yes, you did it!
</div>
</div>
<h3 id="initially-expanded">Initially Expanded</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">expand</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Expand me...&#34;</span> <span class="nx">expanded</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="o">%</span><span class="p">}}</span><span class="nx">No</span> <span class="nx">need</span> <span class="nx">to</span> <span class="nx">press</span> <span class="nx">you</span><span class="p">!{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">expand</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="expand">
<input type="checkbox" id="R-expand-144bf68a04cc88b0b1fce686fe67c787" aria-controls="R-expandcontent-144bf68a04cc88b0b1fce686fe67c787" checked>
<label class="expand-label" for="R-expand-144bf68a04cc88b0b1fce686fe67c787">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Expand me&hellip;
</label>
<div id="R-expandcontent-144bf68a04cc88b0b1fce686fe67c787" class="expand-content">
<p>
No need to press you!
</div>
</div>
<h3 id="arbitrary-text">Arbitrary Text</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">expand</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Show me almost **endless** possibilities&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">You</span> <span class="nx">can</span> <span class="nx">add</span> <span class="nx">standard</span> <span class="nx">markdown</span> <span class="nx">syntax</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">multiple</span> <span class="nx">paragraphs</span>
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">bullet</span> <span class="nx">point</span> <span class="nx">lists</span>
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">_emphasized_</span><span class="p">,</span> <span class="o">**</span><span class="nx">bold</span><span class="o">**</span> <span class="nx">and</span> <span class="nx">even</span> <span class="o">**</span><span class="nx">_bold</span> <span class="nx">emphasized_</span><span class="o">**</span> <span class="nx">text</span>
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="p">[</span><span class="nx">links</span><span class="p">](</span><span class="nx">https</span><span class="p">:</span><span class="c1">//example.com)
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="o">-</span> <span class="nx">etc</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="s">```plaintext
</span></span></span><span class="line"><span class="cl"><span class="s">...and even source code
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="nx">the</span> <span class="nx">possibilities</span> <span class="nx">are</span> <span class="nf">endless</span> <span class="p">(</span><span class="nx">almost</span> <span class="o">-</span> <span class="nx">including</span> <span class="nx">other</span> <span class="nx">shortcodes</span> <span class="nx">may</span> <span class="nx">or</span> <span class="nx">may</span> <span class="nx">not</span> <span class="nx">work</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">expand</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="expand">
<input type="checkbox" id="R-expand-0f097eab9797757d3b77b3b75d893201" aria-controls="R-expandcontent-0f097eab9797757d3b77b3b75d893201">
<label class="expand-label" for="R-expand-0f097eab9797757d3b77b3b75d893201">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Show me almost <strong>endless</strong> possibilities
</label>
<div id="R-expandcontent-0f097eab9797757d3b77b3b75d893201" class="expand-content">
<p>You can add standard markdown syntax:</p>
<ul>
<li>multiple paragraphs</li>
<li>bullet point lists</li>
<li><em>emphasized</em>, <strong>bold</strong> and even <strong><em>bold emphasized</em></strong> text</li>
<li><a href="https://example.com" rel="external" target="_self">links</a></li>
<li>etc.</li>
</ul>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">...and even source code</span></span></code></pre></div>
<blockquote>
<p>the possibilities are endless (almost - including other shortcodes may or may not work)</p>
</blockquote>
</div>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="highlight">Highlight</h1>
<p>The <code>highlight</code> shortcode renders your code with a syntax highlighter.</p>
<div class="tab-panel" data-tab-group="99ac67d0847c88230c17f37433dde67a">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="python"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('99ac67d0847c88230c17f37433dde67a','python')"
>
<span class="tab-nav-text">python</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="python"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code" lineNos="true"><pre tabindex="0" class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="ln">1</span><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;Hello World!&#34;</span><span class="p">)</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="codeodefence"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','codeodefence')"
>
<span class="tab-nav-text">codeodefence</span>
</button>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="shortcode-positional"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode-positional')"
>
<span class="tab-nav-text">shortcode (positional)</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
<button
data-tab-item="partial-compat"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial-compat')"
>
<span class="tab-nav-text">partial (compat)</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="codeodefence"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">```py {lineNos=&#34;true&#34; wrap=&#34;true&#34; title=&#34;python&#34;}
</span></span><span class="line"><span class="cl">print(&#34;Hello World!&#34;)
</span></span><span class="line"><span class="cl">```</span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="nx">lineNos</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="kd">type</span><span class="p">=</span><span class="s">&#34;py&#34;</span> <span class="nx">wrap</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;python&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s">&#34;Hello World!&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode-positional"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="nx">py</span> <span class="s">&#34;lineNos=true,wrap=true,title=python&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s">&#34;Hello World!&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/highlight.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;print(\&#34;Hello World!\&#34;)&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;lineNos&#34;</span> <span class="s">&#34;true&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;type&#34;</span> <span class="s">&#34;py&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;wrap&#34;</span> <span class="s">&#34;true&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;python&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial-compat"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/highlight.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;print(\&#34;Hello World!\&#34;)&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;options&#34;</span> <span class="s">&#34;lineNos=true,wrap=true,title=python&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;type&#34;</span> <span class="s">&#34;py&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>This shortcode is fully compatible with Hugo&rsquo;s <a href="https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode" rel="external" target="_self"><code>highlight</code> shortcode</a> but <strong>offers some extensions</strong>.</p>
<p>It is called interchangeably in the same way as Hugo&rsquo;s own shortcode by providing positional parameter or simply by using Markdown codefences.</p>
<p>You are free to also call this shortcode from your own partials. In this case it resembles Hugo&rsquo;s <a href="https://gohugo.io/functions/highlight/" rel="external" target="_self"><code>highlight</code> function</a> syntax if you call it using compatibility syntax.</p>
<p>Codefence syntax is widely available in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.</p>
<p>The <a href="/hugo-theme-relearn/shortcodes/tab/index.html"><code>tab</code> shortcode</a> is also capable of displaying code but with limited options.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>type</strong></td>
<td>1</td>
<td><em>&lt;empty&gt;</em></td>
<td>The language of the code to highlight. Choose from one of the <a href="https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages" rel="external" target="_self">supported languages</a>. Case-insensitive.</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td></td>
<td><em>&lt;empty&gt;</em></td>
<td><strong>Extension</strong>. Arbitrary title for code. This displays the code like a <a href="/hugo-theme-relearn/shortcodes/tab/index.html">single tab</a> if <code>hl_inline=false</code> (which is Hugo&rsquo;s default).</td>
</tr>
<tr>
<td><strong>wrap</strong></td>
<td></td>
<td>see notes</td>
<td><strong>Extension</strong>. When <code>true</code> the content may wrap on long lines otherwise it will be scrollable.<br><br>The default value can be set in your <code>hugo.toml</code> and overwritten via front matter. <a href="/hugo-theme-relearn/shortcodes/highlight/index.html#setting-wrap-of-long-lines">See below</a>.</td>
</tr>
<tr>
<td><strong>options</strong></td>
<td>2</td>
<td><em>&lt;empty&gt;</em></td>
<td>An optional, comma-separated list of zero or more <a href="https://gohugo.io/functions/highlight/#options" rel="external" target="_self">Hugo supported options</a> as well as extension parameter from this table.</td>
</tr>
<tr>
<td><em><strong>&lt;option&gt;</strong></em></td>
<td></td>
<td><em>&lt;empty&gt;</em></td>
<td>Any of <a href="https://gohugo.io/functions/highlight/#options" rel="external" target="_self">Hugo&rsquo;s supported options</a>.</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td></td>
<td><em>&lt;empty&gt;</em></td>
<td>Your code to highlight.</td>
</tr>
</tbody>
</table>
<h2 id="settings">Settings</h2>
<h3 id="setting-default-values-for-hugos-options">Setting Default Values for Hugo&rsquo;s Options</h3>
<p>Default values for <a href="https://gohugo.io/functions/highlight/#options" rel="external" target="_self">Hugo&rsquo;s supported options</a> can be set via <a href="https://gohugo.io/getting-started/configuration-markup/#highlight" rel="external" target="_self">goldmark settings</a>.</p>
<p>If used together with wrapping of long lines, use this recommended settings. Otherwise, line numbers will shift if code wraps.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">hugo.</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">markup</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">highlight</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lineNumbersInTable</span> <span class="p">=</span> <span class="kc">false</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">markup</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">highlight</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">lineNumbersInTable</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;markup&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;highlight&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;lineNumbersInTable&#34;</span><span class="p">:</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="setting-wrap-of-long-lines">Setting Wrap of Long Lines</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> By default, code will be wrapped if the line is not long enough.</p>
<p>You can disable wrapping by setting <code>highlightWrap=false</code> or by setting the <a href="/hugo-theme-relearn/shortcodes/highlight/index.html#parameter"><code>wrap</code> parameter</a> individually for each code block.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">highlightWrap</span> <span class="p">=</span> <span class="kc">false</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">highlightWrap</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;highlightWrap&#34;</span><span class="p">:</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="copy-to-clipboard-for-inline-code">Copy to Clipboard for Inline Code</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> By default inline code has a button to copy the code to the clipboard.</p>
<p>If you want to disable this feature, set <code>disableInlineCopyToClipBoard=true</code>.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">hugo.</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableInlineCopyToClipBoard</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">disableInlineCopyToClipBoard</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;params&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;disableInlineCopyToClipBoard&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="copy-to-clipboard-for-block-code">Copy to Clipboard for Block Code</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> By default block code has a button to copy the code to the clipboard that is only visible on hover.</p>
<p>Set <code>disableHoverBlockCopyToClipBoard=true</code> to disable the hover effect and always show the button.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">hugo.</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableHoverBlockCopyToClipBoard</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">disableHoverBlockCopyToClipBoard</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;params&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;disableHoverBlockCopyToClipBoard&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="setting-a-specific-color-scheme">Setting a Specific Color Scheme</h3>
<p>You can configure the color style used for code blocks in your <a href="/hugo-theme-relearn/configuration/branding/modules/index.html#change-syntax-highlighting">color variants stylesheet</a> file using the <code>--CODE-theme</code> variable. This requires further configuration as described in the above link.</p>
<h2 id="examples">Examples</h2>
<h3 id="line-numbers-with-starting-offset">Line Numbers with Starting Offset</h3>
<p>As mentioned above, line numbers in a <code>table</code> layout will shift if code is wrapping, so better use <code>inline</code>. To make things easier for you, set <code>lineNumbersInTable = false</code> in your <code>hugo.toml</code> and add <code>lineNos = true</code> when calling the shortcode instead of the specific values <code>table</code> or <code>inline</code>.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="nx">lineNos</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="nx">lineNoStart</span><span class="p">=</span><span class="s">&#34;666&#34;</span> <span class="kd">type</span><span class="p">=</span><span class="s">&#34;py&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nx">the</span> <span class="nx">hardest</span> <span class="nx">part</span> <span class="nx">is</span> <span class="nx">to</span> <span class="nx">start</span> <span class="nx">writing</span> <span class="nx">code</span><span class="p">;</span> <span class="nx">here</span><span class="err">&#39;</span><span class="nx">s</span> <span class="nx">a</span> <span class="nx">kickstart</span><span class="p">;</span> <span class="nx">just</span> <span class="nx">copy</span> <span class="nx">and</span> <span class="nx">paste</span> <span class="nx">this</span><span class="p">;</span> <span class="nx">it</span><span class="err">&#39;</span><span class="nx">s</span> <span class="nx">free</span><span class="p">;</span> <span class="nx">the</span> <span class="nx">next</span> <span class="nx">lines</span> <span class="nx">will</span> <span class="nx">cost</span> <span class="nx">you</span> <span class="nx">serious</span> <span class="nx">credits</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s">&#34;Hello&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s">&#34; &#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s">&#34;World&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s">&#34;!&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<div class="highlight wrap-code" lineNoStart="666" lineNos="true"><pre tabindex="0" class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="ln">666</span><span class="cl"><span class="c1"># the hardest part is to start writing code; here&#39;s a kickstart; just copy and paste this; it&#39;s free; the next lines will cost you serious credits</span>
</span></span><span class="line"><span class="ln">667</span><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;Hello&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="ln">668</span><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34; &#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="ln">669</span><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;World&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="ln">670</span><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;!&#34;</span><span class="p">)</span></span></span></code></pre></div>
<h3 id="markdown-codefence-with-title">Markdown Codefence with Title</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">```py { title=&#34;python&#34; }
</span></span><span class="line"><span class="cl"><span class="gh"># a bit shorter
</span></span></span><span class="line"><span class="cl"><span class="gh"></span>print(&#34;Hello World!&#34;)
</span></span><span class="line"><span class="cl">```</span></span></code></pre></div>
<div class="tab-panel" data-tab-group="f7e43efeec284589b7a713509ea72357">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="python"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('f7e43efeec284589b7a713509ea72357','python')"
>
<span class="tab-nav-text">python</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="python"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="cl"><span class="c1"># a bit shorter</span>
</span></span><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;Hello World!&#34;</span><span class="p">)</span></span></span></code></pre></div>
</div>
</div>
</div>
</div><h3 id="with-wrap">With Wrap</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="kd">type</span><span class="p">=</span><span class="s">&#34;py&#34;</span> <span class="nx">wrap</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="nx">hl_lines</span><span class="p">=</span><span class="s">&#34;2&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nx">Quicksort</span> <span class="nx">Python</span> <span class="nx">One</span><span class="o">-</span><span class="nx">liner</span>
</span></span><span class="line"><span class="cl"><span class="nx">lambda</span> <span class="nx">L</span><span class="p">:</span> <span class="p">[]</span> <span class="k">if</span> <span class="nx">L</span><span class="o">==</span><span class="p">[]</span> <span class="k">else</span> <span class="nf">qsort</span><span class="p">([</span><span class="nx">x</span> <span class="k">for</span> <span class="nx">x</span> <span class="nx">in</span> <span class="nx">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="nx">x</span><span class="p">&lt;</span> <span class="nx">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span> <span class="o">+</span> <span class="nx">L</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="nf">qsort</span><span class="p">([</span><span class="nx">x</span> <span class="k">for</span> <span class="nx">x</span> <span class="nx">in</span> <span class="nx">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="nx">x</span><span class="o">&gt;=</span><span class="nx">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nx">Some</span> <span class="nx">more</span> <span class="nx">stuff</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<div class="highlight wrap-code" hl_lines="2"><pre tabindex="0" class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="cl"><span class="c1"># Quicksort Python One-liner</span>
</span></span><span class="line hl"><span class="cl"><span class="k">lambda</span> <span class="n">L</span><span class="p">:</span> <span class="p">[]</span> <span class="k">if</span> <span class="n">L</span><span class="o">==</span><span class="p">[]</span> <span class="k">else</span> <span class="n">qsort</span><span class="p">([</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="n">x</span><span class="o">&lt;</span> <span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span> <span class="o">+</span> <span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="n">qsort</span><span class="p">([</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="n">x</span><span class="o">&gt;=</span><span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span>
</span></span><span class="line"><span class="cl"><span class="c1"># Some more stuff</span></span></span></code></pre></div>
<h3 id="without-wrap">Without Wrap</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="kd">type</span><span class="p">=</span><span class="s">&#34;py&#34;</span> <span class="nx">wrap</span><span class="p">=</span><span class="s">&#34;false&#34;</span> <span class="nx">hl_lines</span><span class="p">=</span><span class="s">&#34;2&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nx">Quicksort</span> <span class="nx">Python</span> <span class="nx">One</span><span class="o">-</span><span class="nx">liner</span>
</span></span><span class="line"><span class="cl"><span class="nx">lambda</span> <span class="nx">L</span><span class="p">:</span> <span class="p">[]</span> <span class="k">if</span> <span class="nx">L</span><span class="o">==</span><span class="p">[]</span> <span class="k">else</span> <span class="nf">qsort</span><span class="p">([</span><span class="nx">x</span> <span class="k">for</span> <span class="nx">x</span> <span class="nx">in</span> <span class="nx">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="nx">x</span><span class="p">&lt;</span> <span class="nx">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span> <span class="o">+</span> <span class="nx">L</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="nf">qsort</span><span class="p">([</span><span class="nx">x</span> <span class="k">for</span> <span class="nx">x</span> <span class="nx">in</span> <span class="nx">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="nx">x</span><span class="o">&gt;=</span><span class="nx">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span>
</span></span><span class="line"><span class="cl"><span class="err">#</span> <span class="nx">Some</span> <span class="nx">more</span> <span class="nx">stuff</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="cl"><span class="c1"># Quicksort Python One-liner</span>
</span></span><span class="line hl"><span class="cl"><span class="k">lambda</span> <span class="n">L</span><span class="p">:</span> <span class="p">[]</span> <span class="k">if</span> <span class="n">L</span><span class="o">==</span><span class="p">[]</span> <span class="k">else</span> <span class="n">qsort</span><span class="p">([</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="n">x</span><span class="o">&lt;</span> <span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span> <span class="o">+</span> <span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="n">qsort</span><span class="p">([</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">L</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span> <span class="k">if</span> <span class="n">x</span><span class="o">&gt;=</span><span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]])</span>
</span></span><span class="line"><span class="cl"><span class="c1"># Some more stuff</span></span></span></code></pre></div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="icon">Icon</h1>
<p>The <code>icon</code> shortcode displays icons using the <a href="https://fontawesome.com" rel="external" target="_self">Font Awesome</a> library.</p>
<p><i class="fa-fw fas fa-exclamation-triangle"></i>
<i class="fa-fw fas fa-angle-double-up"></i>
<i class="fa-fw fas fa-skull-crossbones"></i></p>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="shortcode-positional"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode-positional')"
>
<span class="tab-nav-text">shortcode (positional)</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;exclamation-triangle&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;angle-double-up&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;skull-crossbones&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode-positional"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">exclamation</span><span class="o">-</span><span class="nx">triangle</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">angle</span><span class="o">-</span><span class="nx">double</span><span class="o">-</span><span class="nx">up</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">skull</span><span class="o">-</span><span class="nx">crossbones</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/icon.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;icon&#34;</span> <span class="s">&#34;exclamation-triangle&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/icon.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;icon&#34;</span> <span class="s">&#34;angle-double-up&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/icon.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;icon&#34;</span> <span class="s">&#34;skull-crossbones&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>icon</strong></td>
<td>1</td>
<td><em>&lt;empty&gt;</em></td>
<td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> to be displayed. It will be displayed in the text color of its according context.</td>
</tr>
</tbody>
</table>
<h3 id="finding-an-icon">Finding an icon</h3>
<p>Browse through the available icons in the <a href="https://fontawesome.com/v6/search?m=free" rel="external" target="_self">Font Awesome Gallery</a>. Notice that the <strong>free</strong> filter is enabled, as only the free icons are available by default.</p>
<p>Once on the Font Awesome page for a specific icon, for example the page for the <a href="https://fontawesome.com/v6/icons/heart?s=solid" rel="external" target="_self">heart</a>, copy the icon name and paste into the Markdown content.</p>
<h3 id="customising-icons">Customising Icons</h3>
<p>Font Awesome provides many ways to modify the icon</p>
<ul>
<li>Change color (by default the icon will inherit the parent color)</li>
<li>Increase or decrease size</li>
<li>Rotate</li>
<li>Combine with other icons</li>
</ul>
<p>Check the full documentation on <a href="https://fontawesome.com/how-to-use/web-fonts-with-css" rel="external" target="_self">web fonts with CSS</a> for more.</p>
<h2 id="examples">Examples</h2>
<h3 id="standard-usage">Standard Usage</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">Built</span> <span class="nx">with</span> <span class="p">{{</span><span class="o">%</span> <span class="nx">icon</span> <span class="nx">heart</span> <span class="o">%</span><span class="p">}}</span> <span class="nx">by</span> <span class="nx">Relearn</span> <span class="nx">and</span> <span class="nx">Hugo</span></span></span></code></pre></div>
<p>Built with <i class="fa-fw fas fa-heart"></i> by Relearn and Hugo</p>
<h3 id="advanced-html-usage">Advanced HTML Usage</h3>
<p>While the shortcode simplifies using standard icons, the icon customization and other advanced features of the Font Awesome library require you to use HTML directly. Paste the <code>&lt;i&gt;</code> HTML into markup, and Font Awesome will load the relevant icon.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl">Built with <span class="p">&lt;</span><span class="nt">i</span> <span class="na">class</span><span class="o">=</span><span class="s">&#34;fas fa-heart&#34;</span><span class="p">&gt;&lt;/</span><span class="nt">i</span><span class="p">&gt;</span> by Relearn and Hugo</span></span></code></pre></div>
<p>Built with <i class="fas fa-heart"></i> by Relearn and Hugo</p>
<p>To use these native HTML elements in your Markdown, add this in your <code>hugo.toml</code>:</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">renderer</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">unsafe</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="include">Include</h1>
<p>The <code>include</code> shortcode includes other pages, resources or files from your project.</p>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="shortcode-positional"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode-positional')"
>
<span class="tab-nav-text">shortcode (positional)</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">include</span> <span class="nx">file</span><span class="p">=</span><span class="s">&#34;shortcodes/include/INCLUDE_ME.md&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode-positional"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">include</span> <span class="s">&#34;shortcodes/include/INCLUDE_ME.md&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/include .html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;file&#34;</span> <span class="s">&#34;shortcodes/include/INCLUDE_ME.md&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>The included files can even contain Markdown and will be taken into account when generating the table of contents.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>file</strong></td>
<td>1</td>
<td><em>&lt;empty&gt;</em></td>
<td>The path to the page, resource or file to be included. Page and resource paths adhere to <a href="https://gohugo.io/methods/page/path/" rel="external" target="_self">Hugo&rsquo;s logical path</a>. If not found by logical path it falls back to <a href="https://gohugo.io/functions/readfile/" rel="external" target="_self">Hugo&rsquo;s build-in <code>readFile</code> function</a></td>
</tr>
<tr>
<td><strong>hidefirstheading</strong></td>
<td>2</td>
<td><code>false</code></td>
<td>When <code>true</code> and the included file contains headings, the first heading will be hidden. This comes in handy, eg. if you include otherwise standalone Markdown files.</td>
</tr>
</tbody>
</table>
<h2 id="settings">Settings</h2>
<h3 id="enabling-link-warnings">Enabling Link Warnings</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> You can use <code>include.errorlevel</code> to control what should happen if a local link can not be resolved to a resource.</p>
<p>If not set or empty, any unresolved link is written as given into the resulting output. If set to <code>warning</code> the same happens and an additional warning is printed in the built console. If set to <code>error</code> an error message is printed and the build is aborted.</p>
<p>Please note that this can not resolve files inside of your <code>static</code> directory. The file must be a resource of the page or the site.</p>
<p>Link warnings are also available for <a href="/hugo-theme-relearn/authoring/frontmatter/linking/index.html#enabling-link-and-image-link-warnings">images &amp; links</a> and the <a href="/hugo-theme-relearn/shortcodes/openapi/index.html#enabling-link-warnings">openapi</a> shortcode.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">include</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">errorlevel</span> <span class="p">=</span> <span class="s1">&#39;warning&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">include</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">errorlevel</span><span class="p">:</span><span class="w"> </span><span class="l">warning</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;include&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;errorlevel&#34;</span><span class="p">:</span> <span class="s2">&#34;warning&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h2 id="examples">Examples</h2>
<h3 id="arbitrary-content">Arbitrary Content</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">include</span> <span class="s">&#34;shortcodes/include/INCLUDE_ME.md&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p>You can add standard markdown syntax:</p>
<ul>
<li>multiple paragraphs</li>
<li>bullet point lists</li>
<li><em>emphasized</em>, <strong>bold</strong> and even <strong><em>bold emphasized</em></strong> text</li>
<li><a href="https://example.com" rel="external" target="_self">links</a></li>
<li>etc.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></li>
</ul>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">...and even source code</span></span></code></pre></div>
<blockquote>
<p>the possibilities are endless (almost - including other shortcodes may or may not work) (almost - including other shortcodes may or may not work)</p>
</blockquote>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Et Cetera (English: /ɛtˈsɛtərə/), abbreviated to etc., etc, et cet., is a Latin expression that is used in English to mean &ldquo;and other similar things&rdquo;, or &ldquo;and so forth&rdquo;&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="math">Math</h1>
<p>If this is not enough, the <code>math</code> shortcode helps you rendering math and chemical formulae using the <a href="https://mathjax.org/" rel="external" target="_self">MathJax</a> library.</p>
<span class="math align-center">
$$\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)$$
</span>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="passthrough"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','passthrough')"
>
<span class="tab-nav-text">passthrough</span>
</button>
<button
data-tab-item="codefence"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','codefence')"
>
<span class="tab-nav-text">codefence</span>
</button>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="passthrough"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">$$\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)$$</span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="codefence"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">```math {align=&#34;center&#34;}
</span></span><span class="line"><span class="cl">$$\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)$$
</span></span><span class="line"><span class="cl">```</span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">math</span> <span class="nx">align</span><span class="p">=</span><span class="s">&#34;center&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="err">$$\</span><span class="nf">left</span><span class="p">(</span> <span class="err">\</span><span class="nx">sum_</span><span class="p">{</span><span class="nx">k</span><span class="p">=</span><span class="mi">1</span><span class="p">}^</span><span class="nx">n</span> <span class="nx">a_k</span> <span class="nx">b_k</span> <span class="err">\</span><span class="nx">right</span><span class="p">)^</span><span class="mi">2</span> <span class="err">\</span><span class="nx">leq</span> <span class="err">\</span><span class="nf">left</span><span class="p">(</span> <span class="err">\</span><span class="nx">sum_</span><span class="p">{</span><span class="nx">k</span><span class="p">=</span><span class="mi">1</span><span class="p">}^</span><span class="nx">n</span> <span class="nx">a_k</span><span class="p">^</span><span class="mi">2</span> <span class="err">\</span><span class="nx">right</span><span class="p">)</span> <span class="err">\</span><span class="nf">left</span><span class="p">(</span> <span class="err">\</span><span class="nx">sum_</span><span class="p">{</span><span class="nx">k</span><span class="p">=</span><span class="mi">1</span><span class="p">}^</span><span class="nx">n</span> <span class="nx">b_k</span><span class="p">^</span><span class="mi">2</span> <span class="err">\</span><span class="nx">right</span><span class="p">)</span><span class="err">$$</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">math</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/math.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;$$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)$$&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;align&#34;</span> <span class="s">&#34;center&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>You can also use <a href="/hugo-theme-relearn/authoring/markdown/index.html#subscript-and-superscript">pure Markdown</a> for writing simple math expressions.</p>
<p>Passthrough syntax is only available by <a href="/hugo-theme-relearn/shortcodes/math/index.html#passthrough-configuration">further configuration</a> and has limited features as it does not provide any of the below parameter. Nevertheless, it is widely available in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>align</strong></td>
<td><code>center</code></td>
<td>The vertical alignment.<br><br>Allowed values are <code>left</code>, <code>center</code> or <code>right</code>.</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td><em>&lt;empty&gt;</em></td>
<td>Your formulae.</td>
</tr>
</tbody>
</table>
<h2 id="settings">Settings</h2>
<h3 id="providing-initialization-options-for-the-mathjax-library">Providing Initialization Options for the MathJax Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The MathJax library is configured with default settings for initialization.</p>
<p>You can overwrite the settings by providing a JSON object in <code>mathJaxInitialize</code>. See <a href="https://docs.mathjax.org/en/latest/options/index.html" rel="external" target="_self">MathJax&rsquo;s documentation</a> for all allowed settings.</p>
<p>Keep in mind that initialization settings of your pages front matter overwrite all settings of your configuration options.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">mathJaxInitialize</span> <span class="p">=</span> <span class="s1">&#39;{ &#34;chtml&#34;: { &#34;displayAlign&#34;: &#34;left&#34; }, { &#34;tex&#34;: { &#34;inlineMath&#34;: [[&#34;\(&#34;, &#34;\)&#34;], [&#34;@&#34;, &#34;@&#34;]], displayMath: [[&#34;\[&#34;, &#34;\]&#34;], [&#34;@@&#34;, &#34;@@&#34;]] }, &#34;options&#34;: { &#34;enableMenu&#34;: false }&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">mathJaxInitialize</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;{ &#34;chtml&#34;: { &#34;displayAlign&#34;: &#34;left&#34; }, { &#34;tex&#34;: { &#34;inlineMath&#34;:
</span></span></span><span class="line"><span class="cl"><span class="s1"> [[&#34;\(&#34;, &#34;\)&#34;], [&#34;@&#34;, &#34;@&#34;]], displayMath: [[&#34;\[&#34;, &#34;\]&#34;], [&#34;@@&#34;, &#34;@@&#34;]] }, &#34;options&#34;:
</span></span></span><span class="line"><span class="cl"><span class="s1"> { &#34;enableMenu&#34;: false }&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;mathJaxInitialize&#34;</span><span class="p">:</span> <span class="s2">&#34;{ \&#34;chtml\&#34;: { \&#34;displayAlign\&#34;: \&#34;left\&#34; }, { \&#34;tex\&#34;: { \&#34;inlineMath\&#34;: [[\&#34;\\(\&#34;, \&#34;\\)\&#34;], [\&#34;@\&#34;, \&#34;@\&#34;]], displayMath: [[\&#34;\\[\&#34;, \&#34;\\]\&#34;], [\&#34;@@\&#34;, \&#34;@@\&#34;]] }, \&#34;options\&#34;: { \&#34;enableMenu\&#34;: false }&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="loading-an-external-version-of-the-mathjax-library">Loading an External Version of the MathJax Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The theme uses the shipped MathJax library by default.</p>
<p>In case you want do use a different version of the MathJax library but don&rsquo;t want to override the shipped version, you can set <code>customMathJaxURL</code> to the URL of the external MathJax library.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">customMathJaxURL</span> <span class="p">=</span> <span class="s1">&#39;https://unpkg.com/mathjax/es5/tex-mml-chtml.js&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">customMathJaxURL</span><span class="p">:</span><span class="w"> </span><span class="l">https://unpkg.com/mathjax/es5/tex-mml-chtml.js</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;customMathJaxURL&#34;</span><span class="p">:</span> <span class="s2">&#34;https://unpkg.com/mathjax/es5/tex-mml-chtml.js&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="force-loading-of-the-mathjax-library">Force Loading of the MathJax Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The MathJax library will be loaded if the page contains a <code>math</code> shortcode or codefence.</p>
<p>You can force loading the MathJax library if no shortcode or codefence was used by setting <code>math=true</code>. If a shortcode or codefence was found, the option has no effect. This must be set in case you are using the <a href="/hugo-theme-relearn/shortcodes/math/index.html#passthrough-configuration">passthrough configuration</a> to render math.</p>
<p>Instead of <code>math=true</code> you can also use the alias <code>math.force=true</code>.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">math</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">math</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;math&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="passthrough-configuration">Passthrough Configuration</h3>
<p>You can use your math without enclosing it in a shortcode or codefence by using a <a href="https://gohugo.io/content-management/mathematics/#step-1" rel="external" target="_self">passthrough configuration</a></p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">hugo.</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">markup</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">extensions</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">extensions</span><span class="p">.</span><span class="nx">passthrough</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">extensions</span><span class="p">.</span><span class="nx">passthrough</span><span class="p">.</span><span class="nx">delimiters</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">block</span> <span class="p">=</span> <span class="p">[[</span><span class="s1">&#39;\[&#39;</span><span class="p">,</span> <span class="s1">&#39;\]&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;$$&#39;</span><span class="p">,</span> <span class="s1">&#39;$$&#39;</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">inline</span> <span class="p">=</span> <span class="p">[[</span><span class="s1">&#39;\(&#39;</span><span class="p">,</span> <span class="s1">&#39;\)&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;$&#39;</span><span class="p">,</span> <span class="s1">&#39;$&#39;</span><span class="p">]]</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">markup</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">goldmark</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">extensions</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">passthrough</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">delimiters</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">block</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- - <span class="l">\[</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">\]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- - <span class="l">$$</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">$$</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">inline</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- - <span class="l">\(</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">\)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- - <span class="l">$</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">$</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">enable</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;markup&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;goldmark&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;extensions&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;passthrough&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;delimiters&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;block&#34;</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;\\[&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;\\]&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">],</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;$$&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;$$&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">],</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;inline&#34;</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;\\(&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;\\)&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">],</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;$&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="s2">&#34;$&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">},</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;enable&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>In this case you have to <a href="/hugo-theme-relearn/shortcodes/math/index.html#force-loading-of-the-mathjax-library">force load</a> the MathJax library either in your <code>hugo.toml</code> or in your page&rsquo;s front matter as the theme doesn&rsquo;t know if math is used.</p>
<p><a href="/hugo-theme-relearn/shortcodes/math/index.html#passthrough-block-math">See the example</a> on how a passthrough configurations makes using math really easy.</p>
<h2 id="examples">Examples</h2>
<h3 id="passthrough-block-math">Passthrough Block Math</h3>
<p>With <a href="/hugo-theme-relearn/shortcodes/math/index.html#passthrough-configuration">passthrough configuration</a> enabled you can just drop your math without enclosing it by shortcodes or codefences but no other <a href="/hugo-theme-relearn/shortcodes/math/index.html#parameter">parameters</a> are available.</p>
<p>In this case you have to <a href="/hugo-theme-relearn/shortcodes/math/index.html#force-loading-of-the-mathjax-library">force load</a> the MathJax library by setting <code>math=true</code> either in your <code>hugo.toml</code> or in your page&rsquo;s front matter.</p>
<p>In passthrough default configuration, block math is generated if you use two consecutive <code>$$</code> as a delimiter around your formulae.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">$$\left|
</span></span><span class="line"><span class="cl">\begin{array}{cc}
</span></span><span class="line"><span class="cl">a <span class="err">&amp;</span> b \\
</span></span><span class="line"><span class="cl">c <span class="err">&amp;</span> d
</span></span><span class="line"><span class="cl">\end{array}\right|$$</span></span></code></pre></div>
$$\left|
\begin{array}{cc}
a & b \\
c & d
\end{array}\right|$$<h3 id="passthrough-inline-math">Passthrough Inline Math</h3>
<p>The same usage restrictions as of the <a href="/hugo-theme-relearn/shortcodes/math/index.html#passthrough-block-math">previous example</a> apply here as well.</p>
<p>In passthrough default configuration, inline math is generated if you use a single <code>$</code> as a delimiter around your formulae.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">Euclid already knew, $\sqrt{2}$ is irrational.</span></span></code></pre></div>
<p>Euclid already knew, $\sqrt{2}$ is irrational.</p>
<h3 id="codefence-block-math-with-right-alignment">Codefence Block Math with Right Alignment</h3>
<p>If you are using codefences, more <a href="/hugo-theme-relearn/shortcodes/math/index.html#parameter">parameter</a> are available. Your formulae still needs to be enclosed by <code>$</code> or <code>$$</code> as delimiters respectively.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">```math {align=&#34;right&#34;}
</span></span><span class="line"><span class="cl">$$\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)$$
</span></span><span class="line"><span class="cl">```</span></span></code></pre></div>
<span class="math align-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)$$</span>
<h3 id="shortcode-block-math-with-right-alignment">Shortcode Block Math with Right Alignment</h3>
<p>You can also use shortcode syntax. Your formulae still needs to be enclosed by <code>$</code> or <code>$$</code> as delimiters respectively.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">{{<span class="p">&lt;</span> <span class="nt">math</span> <span class="na">align</span><span class="o">=</span><span class="s">&#34;right&#34;</span> <span class="p">&gt;</span>}}
</span></span><span class="line"><span class="cl">$$\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)$$
</span></span><span class="line"><span class="cl">{{<span class="p">&lt;</span> <span class="p">/</span><span class="nt">math</span> <span class="p">&gt;</span>}}</span></span></code></pre></div>
<span class="math align-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)$$
</span>
<h3 id="chemical-formulae">Chemical Formulae</h3>
<p>The MathJax library can also be used for chemical formulae.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">$$\ce{Hg^2+ -&gt;[I-] HgI2 -&gt;[I-] [Hg^{II}I4]^2-}$$</span></span></code></pre></div>
$$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="mermaid">Mermaid</h1>
<p>The <code>mermaid</code> shortcode generates diagrams and flowcharts from text in a similar manner as Markdown using the <a href="https://mermaidjs.github.io/" rel="external" target="_self">Mermaid</a> library.</p>
<pre class="mermaid align-center zoomable">graph LR;
If --&gt; Then
Then --&gt; Else</pre>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="codefence"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','codefence')"
>
<span class="tab-nav-text">codefence</span>
</button>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="codefence"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">```mermaid {align=&#34;center&#34; zoom=&#34;true&#34;}
</span></span><span class="line"><span class="cl">graph LR;
</span></span><span class="line"><span class="cl"> If --&gt; Then
</span></span><span class="line"><span class="cl"> Then --&gt; Else
</span></span><span class="line"><span class="cl">```</span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">mermaid</span> <span class="nx">align</span><span class="p">=</span><span class="s">&#34;center&#34;</span> <span class="nx">zoom</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">graph</span> <span class="nx">LR</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"> <span class="nx">If</span> <span class="o">--</span><span class="p">&gt;</span> <span class="nx">Then</span>
</span></span><span class="line"><span class="cl"> <span class="nx">Then</span> <span class="o">--</span><span class="p">&gt;</span> <span class="nx">Else</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">mermaid</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/mermaid.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;graph LR;\n If --&gt; Then\n Then --&gt; Else&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;align&#34;</span> <span class="s">&#34;center&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;zoom&#34;</span> <span class="s">&#34;true&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>Codefence syntax is widely available in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>align</strong></td>
<td><code>center</code></td>
<td>The vertical alignment.<br><br>Allowed values are <code>left</code>, <code>center</code> or <code>right</code>.</td>
</tr>
<tr>
<td><strong>zoom</strong></td>
<td>see notes</td>
<td>Whether the graph is pan- and zoomable.<br><br>If not set the value is determined by the <a href="/hugo-theme-relearn/shortcodes/mermaid/index.html#configuring-pan-and-zoom"><code>mermaidZoom</code> setting</a> of your configurations options or the pages front matter or <code>false</code> if not set at all.<br><br>- <code>false</code>: no pan or zoom<br>- <code>true</code>: pan and zoom active</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td><em>&lt;empty&gt;</em></td>
<td>Your Mermaid graph.</td>
</tr>
</tbody>
</table>
<h2 id="settings">Settings</h2>
<h3 id="configuring-pan-and-zoom">Configuring Pan and Zoom</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The generated graphs can be panned by dragging them and zoomed by using the mousewheel. On mobile devices you can use finger gestures.</p>
<p>By default this is disabled. Set <code>mermaidZoom=true</code> to enable it.</p>
<p>Individual settings of a graphs <a href="/hugo-theme-relearn/shortcodes/mermaid/index.html#parameter"><code>zoom</code> parameter</a> have precedence over the page&rsquo;s front matter and configuration options in that order.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">mermaidZoom</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">mermaidZoom</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;mermaidZoom&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="providing-initialization-options-for-the-mermaid-library">Providing Initialization Options for the Mermaid Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The Mermaid library is configured with default settings for initialization.</p>
<p>You can overwrite the settings by providing a JSON object in <code>mermaidInitialize</code>. See <a href="https://mermaid-js.github.io/mermaid/#/Setup?id=mermaidapi-configuration-defaults" rel="external" target="_self">Mermaid&rsquo;s documentation</a> for all allowed settings.</p>
<p>Keep in mind that initialization settings of your pages front matter overwrite all settings of your configuration options.</p>
<p>In addition, you can merge settings for each individual graph through <a href="https://mermaid-js.github.io/mermaid/#/directives?id=directives" rel="external" target="_self">diagram directives</a> on top of the settings of your page&rsquo;s front matter or configuration options.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">mermaidInitialize</span> <span class="p">=</span> <span class="s1">&#39;{ &#34;securityLevel&#34;: &#34;loose&#34; }&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">mermaidInitialize</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;{ &#34;securityLevel&#34;: &#34;loose&#34; }&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;mermaidInitialize&#34;</span><span class="p">:</span> <span class="s2">&#34;{ \&#34;securityLevel\&#34;: \&#34;loose\&#34; }&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="loading-an-external-version-of-the-mermaid-library">Loading an External Version of the Mermaid Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The theme uses the shipped Mermaid library by default.</p>
<p>In case you want do use a different version of the Mermaid library but don&rsquo;t want to override the shipped version, you can set <code>customMermaidURL</code> to the URL of the external Mermaid library.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">customMermaidURL</span> <span class="p">=</span> <span class="s1">&#39;https://unpkg.com/mermaid/dist/mermaid.min.js&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">customMermaidURL</span><span class="p">:</span><span class="w"> </span><span class="l">https://unpkg.com/mermaid/dist/mermaid.min.js</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;customMermaidURL&#34;</span><span class="p">:</span> <span class="s2">&#34;https://unpkg.com/mermaid/dist/mermaid.min.js&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="force-loading-of-the-mermaid-library">Force Loading of the Mermaid Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The Mermaid library will be loaded if the page contains an <code>mermaid</code> shortcode or codefence.</p>
<p>You can force loading the Mermaid library if no shortcode or codefence was used by setting <code>mermaid.force=true</code>. If a shortcode or codefence was found, this option has no effect. This comes handy in case you are using scripting to render a graph.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">mermaid</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">force</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">mermaid</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">force</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;mermaid&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;force&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="setting-a-specific-mermaid-theme">Setting a Specific Mermaid Theme</h3>
<p>While you can configure the Mermaid theme to render your graph by using one of the <a href="/hugo-theme-relearn/shortcodes/mermaid/index.html#providing-initialization-options-for-the-mermaid-library">initialization options</a>, the recommended way is to set the default value using the <code>--MERMAID-theme</code> variable in your <a href="/hugo-theme-relearn/configuration/branding/generator/index.html">color variant stylesheet</a>. This allows your graphs to look pretty when the user switches the color variant.</p>
<h2 id="examples">Examples</h2>
<h3 id="flowchart-with-yaml-title">Flowchart with YAML-Title</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>---
</span></span><span class="line"><span class="cl">title: Example Diagram
</span></span><span class="line"><span class="cl">---
</span></span><span class="line"><span class="cl">graph LR;
</span></span><span class="line"><span class="cl"> A[Hard edge] --&gt;|Link text| B(Round edge)
</span></span><span class="line"><span class="cl"> B --&gt; C{&lt;strong&gt;Decision&lt;/strong&gt;}
</span></span><span class="line"><span class="cl"> C --&gt;|One| D[Result one]
</span></span><span class="line"><span class="cl"> C --&gt;|Two| E[Result two]
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">---
title: Example Diagram
---
graph LR;
A[Hard edge] --&gt;|Link text| B(Round edge)
B --&gt; C{&lt;strong&gt;Decision&lt;/strong&gt;}
C --&gt;|One| D[Result one]
C --&gt;|Two| E[Result two]</pre>
<h3 id="sequence-diagram-with-configuration-directive">Sequence Diagram with Configuration Directive</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>%%{init:{&#34;fontFamily&#34;:&#34;monospace&#34;, &#34;sequence&#34;:{&#34;showSequenceNumbers&#34;:true}}}%%
</span></span><span class="line"><span class="cl">sequenceDiagram
</span></span><span class="line"><span class="cl"> Alice-&gt;&gt;John: Hello John, how are you?
</span></span><span class="line"><span class="cl"> loop Healthcheck
</span></span><span class="line"><span class="cl"> John-&gt;&gt;John: Fight against hypochondria
</span></span><span class="line"><span class="cl"> end
</span></span><span class="line"><span class="cl"> Note right of John: Rational thoughts!
</span></span><span class="line"><span class="cl"> John--&gt;&gt;Alice: Great!
</span></span><span class="line"><span class="cl"> John-&gt;&gt;Bob: How about you?
</span></span><span class="line"><span class="cl"> Bob--&gt;&gt;John: Jolly good!
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">%%{init:{&#34;fontFamily&#34;:&#34;monospace&#34;, &#34;sequence&#34;:{&#34;showSequenceNumbers&#34;:true}}}%%
sequenceDiagram
Alice-&gt;&gt;John: Hello John, how are you?
loop Healthcheck
John-&gt;&gt;John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John--&gt;&gt;Alice: Great!
John-&gt;&gt;Bob: How about you?
Bob--&gt;&gt;John: Jolly good!</pre>
<h3 id="class-diagram">Class Diagram</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>classDiagram
</span></span><span class="line"><span class="cl"> Animal &lt;|-- Duck
</span></span><span class="line"><span class="cl"> Animal &lt;|-- Fish
</span></span><span class="line"><span class="cl"> Animal &lt;|-- Zebra
</span></span><span class="line"><span class="cl"> Animal : +int age
</span></span><span class="line"><span class="cl"> Animal : +String gender
</span></span><span class="line"><span class="cl"> Animal: +isMammal()
</span></span><span class="line"><span class="cl"> Animal: +mate()
</span></span><span class="line"><span class="cl"> class Duck{
</span></span><span class="line"><span class="cl"> +String beakColor
</span></span><span class="line"><span class="cl"> +swim()
</span></span><span class="line"><span class="cl"> +quack()
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl"> class Fish{
</span></span><span class="line"><span class="cl"> -int sizeInFeet
</span></span><span class="line"><span class="cl"> -canEat()
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl"> class Zebra{
</span></span><span class="line"><span class="cl"> +bool is_wild
</span></span><span class="line"><span class="cl"> +run()
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">classDiagram
Animal &lt;|-- Duck
Animal &lt;|-- Fish
Animal &lt;|-- Zebra
Animal : &#43;int age
Animal : &#43;String gender
Animal: &#43;isMammal()
Animal: &#43;mate()
class Duck{
&#43;String beakColor
&#43;swim()
&#43;quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
&#43;bool is_wild
&#43;run()
}</pre>
<h3 id="state-diagram-aligned-to-the-right-using-shortcode-syntax">State Diagram Aligned to the Right Using Shortcode Syntax</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">mermaid</span> <span class="nx">align</span><span class="p">=</span><span class="s">&#34;right&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">stateDiagram</span><span class="o">-</span><span class="nx">v2</span>
</span></span><span class="line"><span class="cl"> <span class="nx">open</span><span class="p">:</span> <span class="nx">Open</span> <span class="nx">Door</span>
</span></span><span class="line"><span class="cl"> <span class="nx">closed</span><span class="p">:</span> <span class="nx">Closed</span> <span class="nx">Door</span>
</span></span><span class="line"><span class="cl"> <span class="nx">locked</span><span class="p">:</span> <span class="nx">Locked</span> <span class="nx">Door</span>
</span></span><span class="line"><span class="cl"> <span class="nx">open</span> <span class="o">--</span><span class="p">&gt;</span> <span class="nx">closed</span><span class="p">:</span> <span class="nx">Close</span>
</span></span><span class="line"><span class="cl"> <span class="nx">closed</span> <span class="o">--</span><span class="p">&gt;</span> <span class="nx">locked</span><span class="p">:</span> <span class="nx">Lock</span>
</span></span><span class="line"><span class="cl"> <span class="nx">locked</span> <span class="o">--</span><span class="p">&gt;</span> <span class="nx">closed</span><span class="p">:</span> <span class="nx">Unlock</span>
</span></span><span class="line"><span class="cl"> <span class="nx">closed</span> <span class="o">--</span><span class="p">&gt;</span> <span class="nx">open</span><span class="p">:</span> <span class="nx">Open</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">mermaid</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<pre class="mermaid align-right zoomable">
stateDiagram-v2
open: Open Door
closed: Closed Door
locked: Locked Door
open --&gt; closed: Close
closed --&gt; locked: Lock
locked --&gt; closed: Unlock
closed --&gt; open: Open
</pre>
<h3 id="entity-relationship-model-with-non-default-mermaid-theme">Entity Relationship Model with Non-Default Mermaid Theme</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>%%{init:{&#34;theme&#34;:&#34;forest&#34;}}%%
</span></span><span class="line"><span class="cl">erDiagram
</span></span><span class="line"><span class="cl"> CUSTOMER }|..|{ DELIVERY-ADDRESS : has
</span></span><span class="line"><span class="cl"> CUSTOMER ||--o{ ORDER : places
</span></span><span class="line"><span class="cl"> CUSTOMER ||--o{ INVOICE : &#34;liable for&#34;
</span></span><span class="line"><span class="cl"> DELIVERY-ADDRESS ||--o{ ORDER : receives
</span></span><span class="line"><span class="cl"> INVOICE ||--|{ ORDER : covers
</span></span><span class="line"><span class="cl"> ORDER ||--|{ ORDER-ITEM : includes
</span></span><span class="line"><span class="cl"> PRODUCT-CATEGORY ||--|{ PRODUCT : contains
</span></span><span class="line"><span class="cl"> PRODUCT ||--o{ ORDER-ITEM : &#34;ordered in&#34;
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">%%{init:{&#34;theme&#34;:&#34;forest&#34;}}%%
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : &#34;liable for&#34;
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : &#34;ordered in&#34;</pre>
<h3 id="user-journey">User Journey</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>journey
</span></span><span class="line"><span class="cl"> title My working day
</span></span><span class="line"><span class="cl"> section Go to work
</span></span><span class="line"><span class="cl"> Make tea: 5: Me
</span></span><span class="line"><span class="cl"> Go upstairs: 3: Me
</span></span><span class="line"><span class="cl"> Do work: 1: Me, Cat
</span></span><span class="line"><span class="cl"> section Go home
</span></span><span class="line"><span class="cl"> Go downstairs: 5: Me
</span></span><span class="line"><span class="cl"> Sit down: 3: Me
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">journey
title My working day
section Go to 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</pre>
<h3 id="gantt-chart">GANTT Chart</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>gantt
</span></span><span class="line"><span class="cl"> dateFormat YYYY-MM-DD
</span></span><span class="line"><span class="cl"> title Adding GANTT diagram functionality to Mermaid
</span></span><span class="line"><span class="cl"> section A section
</span></span><span class="line"><span class="cl"> Completed task :done, des1, 2014-01-06,2014-01-08
</span></span><span class="line"><span class="cl"> Active task :active, des2, 2014-01-09, 3d
</span></span><span class="line"><span class="cl"> Future task : des3, after des2, 5d
</span></span><span class="line"><span class="cl"> Future task2 : des4, after des3, 5d
</span></span><span class="line"><span class="cl"> section Critical tasks
</span></span><span class="line"><span class="cl"> Completed task in the critical line :crit, done, 2014-01-06,24h
</span></span><span class="line"><span class="cl"> Implement parser and jison :crit, done, after des1, 2d
</span></span><span class="line"><span class="cl"> Create tests for parser :crit, active, 3d
</span></span><span class="line"><span class="cl"> Future task in critical line :crit, 5d
</span></span><span class="line"><span class="cl"> Create tests for renderer :2d
</span></span><span class="line"><span class="cl"> Add to Mermaid :1d
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to Mermaid
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to Mermaid :1d</pre>
<h3 id="pie-chart-without-zoom">Pie Chart without Zoom</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl">```mermaid {zoom=&#34;false&#34;}
</span></span><span class="line"><span class="cl">pie title Pets adopted by volunteers
</span></span><span class="line"><span class="cl"> &#34;Dogs&#34; : 386
</span></span><span class="line"><span class="cl"> &#34;Cats&#34; : 85
</span></span><span class="line"><span class="cl"> &#34;Rats&#34; : 15
</span></span><span class="line"><span class="cl">```</span></span></code></pre></div>
<pre class="mermaid align-center zoomable">pie title Pets adopted by volunteers
&#34;Dogs&#34; : 386
&#34;Cats&#34; : 85
&#34;Rats&#34; : 15</pre>
<h3 id="quadrant-chart">Quadrant Chart</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>quadrantChart
</span></span><span class="line"><span class="cl"> title Reach and engagement of campaigns
</span></span><span class="line"><span class="cl"> x-axis Low Reach --&gt; High Reach
</span></span><span class="line"><span class="cl"> y-axis Low Engagement --&gt; High Engagement
</span></span><span class="line"><span class="cl"> quadrant-1 We should expand
</span></span><span class="line"><span class="cl"> quadrant-2 Need to promote
</span></span><span class="line"><span class="cl"> quadrant-3 Re-evaluate
</span></span><span class="line"><span class="cl"> quadrant-4 May be improved
</span></span><span class="line"><span class="cl"> Campaign A: [0.3, 0.6]
</span></span><span class="line"><span class="cl"> Campaign B: [0.45, 0.23]
</span></span><span class="line"><span class="cl"> Campaign C: [0.57, 0.69]
</span></span><span class="line"><span class="cl"> Campaign D: [0.78, 0.34]
</span></span><span class="line"><span class="cl"> Campaign E: [0.40, 0.34]
</span></span><span class="line"><span class="cl"> Campaign F: [0.35, 0.78]
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">quadrantChart
title Reach and engagement of campaigns
x-axis Low Reach --&gt; High Reach
y-axis Low Engagement --&gt; High Engagement
quadrant-1 We should expand
quadrant-2 Need to promote
quadrant-3 Re-evaluate
quadrant-4 May be improved
Campaign A: [0.3, 0.6]
Campaign B: [0.45, 0.23]
Campaign C: [0.57, 0.69]
Campaign D: [0.78, 0.34]
Campaign E: [0.40, 0.34]
Campaign F: [0.35, 0.78]</pre>
<h3 id="requirement-diagram">Requirement Diagram</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>requirementDiagram
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> requirement test_req {
</span></span><span class="line"><span class="cl"> id: 1
</span></span><span class="line"><span class="cl"> text: the test text.
</span></span><span class="line"><span class="cl"> risk: high
</span></span><span class="line"><span class="cl"> verifymethod: test
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> element test_entity {
</span></span><span class="line"><span class="cl"> type: simulation
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> test_entity - satisfies -&gt; test_req
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -&gt; test_req</pre>
<h3 id="git-graph">Git Graph</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>gitGraph
</span></span><span class="line"><span class="cl"> commit
</span></span><span class="line"><span class="cl"> commit
</span></span><span class="line"><span class="cl"> branch develop
</span></span><span class="line"><span class="cl"> checkout develop
</span></span><span class="line"><span class="cl"> commit
</span></span><span class="line"><span class="cl"> commit
</span></span><span class="line"><span class="cl"> checkout main
</span></span><span class="line"><span class="cl"> merge develop
</span></span><span class="line"><span class="cl"> commit
</span></span><span class="line"><span class="cl"> commit
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit</pre>
<h3 id="c4-diagrams">C4 Diagrams</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>C4Context
</span></span><span class="line"><span class="cl"> title System Context diagram for Internet Banking System
</span></span><span class="line"><span class="cl"> Enterprise_Boundary(b0, &#34;BankBoundary0&#34;) {
</span></span><span class="line"><span class="cl"> Person(customerA, &#34;Banking Customer A&#34;, &#34;A customer of the bank, with personal bank accounts.&#34;)
</span></span><span class="line"><span class="cl"> Person(customerB, &#34;Banking Customer B&#34;)
</span></span><span class="line"><span class="cl"> Person_Ext(customerC, &#34;Banking Customer C&#34;, &#34;desc&#34;)
</span></span><span class="line"><span class="cl"> Person(customerD, &#34;Banking Customer D&#34;, &#34;A customer of the bank, &lt;br/&gt; with personal bank accounts.&#34;)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> System(SystemAA, &#34;Internet Banking System&#34;, &#34;Allows customers to view information about their bank accounts, and make payments.&#34;)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> Enterprise_Boundary(b1, &#34;BankBoundary&#34;) {
</span></span><span class="line"><span class="cl"> SystemDb_Ext(SystemE, &#34;Mainframe Banking System&#34;, &#34;Stores all of the core banking information about customers, accounts, transactions, etc.&#34;)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> System_Boundary(b2, &#34;BankBoundary2&#34;) {
</span></span><span class="line"><span class="cl"> System(SystemA, &#34;Banking System A&#34;)
</span></span><span class="line"><span class="cl"> System(SystemB, &#34;Banking System B&#34;, &#34;A system of the bank, with personal bank accounts. next line.&#34;)
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> System_Ext(SystemC, &#34;E-mail system&#34;, &#34;The internal Microsoft Exchange e-mail system.&#34;)
</span></span><span class="line"><span class="cl"> SystemDb(SystemD, &#34;Banking System D Database&#34;, &#34;A system of the bank, with personal bank accounts.&#34;)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> Boundary(b3, &#34;BankBoundary3&#34;, &#34;boundary&#34;) {
</span></span><span class="line"><span class="cl"> SystemQueue(SystemF, &#34;Banking System F Queue&#34;, &#34;A system of the bank.&#34;)
</span></span><span class="line"><span class="cl"> SystemQueue_Ext(SystemG, &#34;Banking System G Queue&#34;, &#34;A system of the bank, with personal bank accounts.&#34;)
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl"> }
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> BiRel(customerA, SystemAA, &#34;Uses&#34;)
</span></span><span class="line"><span class="cl"> BiRel(SystemAA, SystemE, &#34;Uses&#34;)
</span></span><span class="line"><span class="cl"> Rel(SystemAA, SystemC, &#34;Sends e-mails&#34;, &#34;SMTP&#34;)
</span></span><span class="line"><span class="cl"> Rel(SystemC, customerA, &#34;Sends e-mails to&#34;)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> UpdateElementStyle(customerA, $fontColor=&#34;red&#34;, $bgColor=&#34;grey&#34;, $borderColor=&#34;red&#34;)
</span></span><span class="line"><span class="cl"> UpdateRelStyle(customerA, SystemAA, $textColor=&#34;blue&#34;, $lineColor=&#34;blue&#34;, $offsetX=&#34;5&#34;)
</span></span><span class="line"><span class="cl"> UpdateRelStyle(SystemAA, SystemE, $textColor=&#34;blue&#34;, $lineColor=&#34;blue&#34;, $offsetY=&#34;-10&#34;)
</span></span><span class="line"><span class="cl"> UpdateRelStyle(SystemAA, SystemC, $textColor=&#34;blue&#34;, $lineColor=&#34;blue&#34;, $offsetY=&#34;-40&#34;, $offsetX=&#34;-50&#34;)
</span></span><span class="line"><span class="cl"> UpdateRelStyle(SystemC, customerA, $textColor=&#34;red&#34;, $lineColor=&#34;red&#34;, $offsetX=&#34;-50&#34;, $offsetY=&#34;20&#34;)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> UpdateLayoutConfig($c4ShapeInRow=&#34;3&#34;, $c4BoundaryInRow=&#34;1&#34;)
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">C4Context
title System Context diagram for Internet Banking System
Enterprise_Boundary(b0, &#34;BankBoundary0&#34;) {
Person(customerA, &#34;Banking Customer A&#34;, &#34;A customer of the bank, with personal bank accounts.&#34;)
Person(customerB, &#34;Banking Customer B&#34;)
Person_Ext(customerC, &#34;Banking Customer C&#34;, &#34;desc&#34;)
Person(customerD, &#34;Banking Customer D&#34;, &#34;A customer of the bank, &lt;br/&gt; with personal bank accounts.&#34;)
System(SystemAA, &#34;Internet Banking System&#34;, &#34;Allows customers to view information about their bank accounts, and make payments.&#34;)
Enterprise_Boundary(b1, &#34;BankBoundary&#34;) {
SystemDb_Ext(SystemE, &#34;Mainframe Banking System&#34;, &#34;Stores all of the core banking information about customers, accounts, transactions, etc.&#34;)
System_Boundary(b2, &#34;BankBoundary2&#34;) {
System(SystemA, &#34;Banking System A&#34;)
System(SystemB, &#34;Banking System B&#34;, &#34;A system of the bank, with personal bank accounts. next line.&#34;)
}
System_Ext(SystemC, &#34;E-mail system&#34;, &#34;The internal Microsoft Exchange e-mail system.&#34;)
SystemDb(SystemD, &#34;Banking System D Database&#34;, &#34;A system of the bank, with personal bank accounts.&#34;)
Boundary(b3, &#34;BankBoundary3&#34;, &#34;boundary&#34;) {
SystemQueue(SystemF, &#34;Banking System F Queue&#34;, &#34;A system of the bank.&#34;)
SystemQueue_Ext(SystemG, &#34;Banking System G Queue&#34;, &#34;A system of the bank, with personal bank accounts.&#34;)
}
}
}
BiRel(customerA, SystemAA, &#34;Uses&#34;)
BiRel(SystemAA, SystemE, &#34;Uses&#34;)
Rel(SystemAA, SystemC, &#34;Sends e-mails&#34;, &#34;SMTP&#34;)
Rel(SystemC, customerA, &#34;Sends e-mails to&#34;)
UpdateElementStyle(customerA, $fontColor=&#34;red&#34;, $bgColor=&#34;grey&#34;, $borderColor=&#34;red&#34;)
UpdateRelStyle(customerA, SystemAA, $textColor=&#34;blue&#34;, $lineColor=&#34;blue&#34;, $offsetX=&#34;5&#34;)
UpdateRelStyle(SystemAA, SystemE, $textColor=&#34;blue&#34;, $lineColor=&#34;blue&#34;, $offsetY=&#34;-10&#34;)
UpdateRelStyle(SystemAA, SystemC, $textColor=&#34;blue&#34;, $lineColor=&#34;blue&#34;, $offsetY=&#34;-40&#34;, $offsetX=&#34;-50&#34;)
UpdateRelStyle(SystemC, customerA, $textColor=&#34;red&#34;, $lineColor=&#34;red&#34;, $offsetX=&#34;-50&#34;, $offsetY=&#34;20&#34;)
UpdateLayoutConfig($c4ShapeInRow=&#34;3&#34;, $c4BoundaryInRow=&#34;1&#34;)</pre>
<h3 id="mindmaps">Mindmaps</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>mindmap
</span></span><span class="line"><span class="cl"> root((mindmap))
</span></span><span class="line"><span class="cl"> Origins
</span></span><span class="line"><span class="cl"> Long history
</span></span><span class="line"><span class="cl"> ::icon(fa fa-book)
</span></span><span class="line"><span class="cl"> Popularisation
</span></span><span class="line"><span class="cl"> British popular psychology author Tony Buzan
</span></span><span class="line"><span class="cl"> Research
</span></span><span class="line"><span class="cl"> On effectiveness&lt;br/&gt;and features
</span></span><span class="line"><span class="cl"> On Automatic creation
</span></span><span class="line"><span class="cl"> Uses
</span></span><span class="line"><span class="cl"> Creative techniques
</span></span><span class="line"><span class="cl"> Strategic planning
</span></span><span class="line"><span class="cl"> Argument mapping
</span></span><span class="line"><span class="cl"> Tools
</span></span><span class="line"><span class="cl"> Pen and paper
</span></span><span class="line"><span class="cl"> Mermaid
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">mindmap
root((mindmap))
Origins
Long history
::icon(fa fa-book)
Popularisation
British popular psychology author Tony Buzan
Research
On effectiveness&lt;br/&gt;and features
On Automatic creation
Uses
Creative techniques
Strategic planning
Argument mapping
Tools
Pen and paper
Mermaid</pre>
<h3 id="timeline">Timeline</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>timeline
</span></span><span class="line"><span class="cl"> title History of Social Media Platform
</span></span><span class="line"><span class="cl"> 2002 : LinkedIn
</span></span><span class="line"><span class="cl"> 2004 : Facebook
</span></span><span class="line"><span class="cl"> : Google
</span></span><span class="line"><span class="cl"> 2005 : Youtube
</span></span><span class="line"><span class="cl"> 2006 : Twitter
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">timeline
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook
: Google
2005 : Youtube
2006 : Twitter</pre>
<h3 id="sankey">Sankey</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>sankey-beta
</span></span><span class="line"><span class="cl"> %% source,target,value
</span></span><span class="line"><span class="cl"> Electricity grid,Over generation / exports,104.453
</span></span><span class="line"><span class="cl"> Electricity grid,Heating and cooling - homes,113.726
</span></span><span class="line"><span class="cl"> Electricity grid,H2 conversion,27.14
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">sankey-beta
%% source,target,value
Electricity grid,Over generation / exports,104.453
Electricity grid,Heating and cooling - homes,113.726
Electricity grid,H2 conversion,27.14</pre>
<h3 id="xychart">XYChart</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>xychart-beta
</span></span><span class="line"><span class="cl"> title &#34;Sales Revenue&#34;
</span></span><span class="line"><span class="cl"> x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
</span></span><span class="line"><span class="cl"> y-axis &#34;Revenue (in $)&#34; 4000 --&gt; 11000
</span></span><span class="line"><span class="cl"> bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
</span></span><span class="line"><span class="cl"> line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">xychart-beta
title &#34;Sales Revenue&#34;
x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
y-axis &#34;Revenue (in $)&#34; 4000 --&gt; 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]</pre>
<h3 id="block-diagram">Block Diagram</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>block-beta
</span></span><span class="line"><span class="cl"> columns 1
</span></span><span class="line"><span class="cl"> db((&#34;DB&#34;))
</span></span><span class="line"><span class="cl"> blockArrowId6&lt;[&#34;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#34;]&gt;(down)
</span></span><span class="line"><span class="cl"> block:ID
</span></span><span class="line"><span class="cl"> A
</span></span><span class="line"><span class="cl"> B[&#34;A wide one in the middle&#34;]
</span></span><span class="line"><span class="cl"> C
</span></span><span class="line"><span class="cl"> end
</span></span><span class="line"><span class="cl"> space
</span></span><span class="line"><span class="cl"> D
</span></span><span class="line"><span class="cl"> ID --&gt; D
</span></span><span class="line"><span class="cl"> C --&gt; D
</span></span><span class="line"><span class="cl"> style B fill:#969,stroke:#333,stroke-width:4px
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">block-beta
columns 1
db((&#34;DB&#34;))
blockArrowId6&lt;[&#34;&amp;nbsp;&amp;nbsp;&amp;nbsp;&#34;]&gt;(down)
block:ID
A
B[&#34;A wide one in the middle&#34;]
C
end
space
D
ID --&gt; D
C --&gt; D
style B fill:#969,stroke:#333,stroke-width:4px</pre>
<h3 id="packet">Packet</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>---
</span></span><span class="line"><span class="cl">title: &#34;TCP Packet&#34;
</span></span><span class="line"><span class="cl">---
</span></span><span class="line"><span class="cl">packet-beta
</span></span><span class="line"><span class="cl"> 0-15: &#34;Source Port&#34;
</span></span><span class="line"><span class="cl"> 16-31: &#34;Destination Port&#34;
</span></span><span class="line"><span class="cl"> 32-63: &#34;Sequence Number&#34;
</span></span><span class="line"><span class="cl"> 64-95: &#34;Acknowledgment Number&#34;
</span></span><span class="line"><span class="cl"> 96-99: &#34;Data Offset&#34;
</span></span><span class="line"><span class="cl"> 100-105: &#34;Reserved&#34;
</span></span><span class="line"><span class="cl"> 106: &#34;URG&#34;
</span></span><span class="line"><span class="cl"> 107: &#34;ACK&#34;
</span></span><span class="line"><span class="cl"> 108: &#34;PSH&#34;
</span></span><span class="line"><span class="cl"> 109: &#34;RST&#34;
</span></span><span class="line"><span class="cl"> 110: &#34;SYN&#34;
</span></span><span class="line"><span class="cl"> 111: &#34;FIN&#34;
</span></span><span class="line"><span class="cl"> 112-127: &#34;Window&#34;
</span></span><span class="line"><span class="cl"> 128-143: &#34;Checksum&#34;
</span></span><span class="line"><span class="cl"> 144-159: &#34;Urgent Pointer&#34;
</span></span><span class="line"><span class="cl"> 160-191: &#34;(Options and Padding)&#34;
</span></span><span class="line"><span class="cl"> 192-255: &#34;Data (variable length)&#34;
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">---
title: &#34;TCP Packet&#34;
---
packet-beta
0-15: &#34;Source Port&#34;
16-31: &#34;Destination Port&#34;
32-63: &#34;Sequence Number&#34;
64-95: &#34;Acknowledgment Number&#34;
96-99: &#34;Data Offset&#34;
100-105: &#34;Reserved&#34;
106: &#34;URG&#34;
107: &#34;ACK&#34;
108: &#34;PSH&#34;
109: &#34;RST&#34;
110: &#34;SYN&#34;
111: &#34;FIN&#34;
112-127: &#34;Window&#34;
128-143: &#34;Checksum&#34;
144-159: &#34;Urgent Pointer&#34;
160-191: &#34;(Options and Padding)&#34;
192-255: &#34;Data (variable length)&#34;</pre>
<h3 id="architecture">Architecture</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="s">```mermaid
</span></span></span><span class="line"><span class="cl"><span class="s"></span>architecture-beta
</span></span><span class="line"><span class="cl"> group api(cloud)[API]
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> service db(database)[Database] in api
</span></span><span class="line"><span class="cl"> service disk1(disk)[Storage] in api
</span></span><span class="line"><span class="cl"> service disk2(disk)[Storage] in api
</span></span><span class="line"><span class="cl"> service server(server)[Server] in api
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> db:L -- R:server
</span></span><span class="line"><span class="cl"> disk1:T -- B:server
</span></span><span class="line"><span class="cl"> disk2:T -- B:db
</span></span><span class="line"><span class="cl"><span class="s">```</span></span></span></code></pre></div>
<pre class="mermaid align-center zoomable">architecture-beta
group api(cloud)[API]
service db(database)[Database] in api
service disk1(disk)[Storage] in api
service disk2(disk)[Storage] in api
service server(server)[Server] in api
db:L -- R:server
disk1:T -- B:server
disk2:T -- B:db</pre>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="notice">Notice</h1>
<p>The <code>notice</code> shortcode shows various types of disclaimers with adjustable color, title and icon to help you structure your page.</p>
<div class="box notices cstyle primary">
<div class="box-label">
<i class="fa-fw fas fa-skull-crossbones"></i> There may be pirates
</div>
<div class="box-content">
<p>It is all about the boxes.</p>
</div>
</div>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="callout"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','callout')"
>
<span class="tab-nav-text">callout</span>
</button>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="shortcode-positional"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode-positional')"
>
<span class="tab-nav-text">shortcode (positional)</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="callout"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="k">&gt; </span><span class="ge">[!primary] There may be pirates
</span></span></span><span class="line"><span class="cl"><span class="ge"></span>&gt; It is all about the boxes.</span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;There may be pirates&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;skull-crossbones&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">It</span> <span class="nx">is</span> <span class="nx">all</span> <span class="nx">about</span> <span class="nx">the</span> <span class="nx">boxes</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode-positional"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">primary</span> <span class="s">&#34;There may be pirates&#34;</span> <span class="s">&#34;skull-crossbones&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">It</span> <span class="nx">is</span> <span class="nx">all</span> <span class="nx">about</span> <span class="nx">the</span> <span class="nx">boxes</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/notice.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;style&#34;</span> <span class="s">&#34;primary&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;There may be pirates&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;icon&#34;</span> <span class="s">&#34;skull-crossbones&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="s">&#34;It is all about the boxes.&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>Callout syntax has limited features as it does not provide all of the below parameter. Nevertheless, it is widely available in other Markdown parsers like with <a href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts" rel="external" target="_self">GitHub alerts</a> or <a href="https://help.obsidian.md/Editing+and+formatting/Callouts#Change+the+title" rel="external" target="_self">Obsidian callouts</a> and therefore is the recommend syntax for generating portable Markdown.</p>
<p>If you want to display a transparent expandable box without any border, you can also use the <a href="/hugo-theme-relearn/shortcodes/expand/index.html"><code>expand</code> shortcode</a>.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>style</strong></td>
<td>1</td>
<td><code>default</code></td>
<td>The style scheme used for the box.<br><br>- by severity: <code>caution</code>, <code>important</code>, <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>cyan</code>, <code>green</code>, <code>grey</code>, <code>magenta</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code><br><br>You can also <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">define your own styles</a>.</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td></td>
<td>see notes</td>
<td>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value" rel="external" target="_self">CSS color value</a> to be used. If not set, the chosen color depends on the <strong>style</strong>. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color<br><br>This is not available using callout syntax.</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td>2</td>
<td>see notes</td>
<td>Arbitrary text for the box title. Depending on the <strong>style</strong> there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no title for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><strong>icon</strong></td>
<td>3</td>
<td>see notes</td>
<td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> set to the left of the title. Depending on the <strong>style</strong> there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no icon for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)<br><br>This is not available using callout syntax.</td>
</tr>
<tr>
<td><strong>expanded</strong></td>
<td></td>
<td><em>&lt;empty&gt;</em></td>
<td>Whether to draw an expander and how the content is displayed.<br><br>- <em>&lt;empty&gt;</em>: no expander is drawn and the content is permanently shown<br>- <code>true</code>: the expander is drawn and the content is initially shown<br>- <code>false</code>: the expander is drawn and the content is initially hidden</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary text to be displayed in box.</td>
</tr>
</tbody>
</table>
<h2 id="settings">Settings</h2>
<h3 id="defining-own-styles">Defining own Styles</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> Besides the predefined <code>style</code> values <a href="/hugo-theme-relearn/shortcodes/notice/index.html#parameter">from above</a>, you are able to define your own.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">hugo.</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">boxStyle</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">color</span> <span class="p">=</span> <span class="s1">&#39;gold&#39;</span>
</span></span><span class="line"><span class="cl"> <span class="nx">i18n</span> <span class="p">=</span> <span class="s1">&#39;&#39;</span>
</span></span><span class="line"><span class="cl"> <span class="nx">icon</span> <span class="p">=</span> <span class="s1">&#39;rainbow&#39;</span>
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">&#39;magic&#39;</span>
</span></span><span class="line"><span class="cl"> <span class="nx">title</span> <span class="p">=</span> <span class="s1">&#39;Magic&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">boxStyle</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">color</span><span class="p">:</span><span class="w"> </span><span class="l">gold</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">i18n</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">icon</span><span class="p">:</span><span class="w"> </span><span class="l">rainbow</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">magic</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="l">Magic</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;params&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;boxStyle&#34;</span><span class="p">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;color&#34;</span><span class="p">:</span> <span class="s2">&#34;gold&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;i18n&#34;</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;icon&#34;</span><span class="p">:</span> <span class="s2">&#34;rainbow&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;identifier&#34;</span><span class="p">:</span> <span class="s2">&#34;magic&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;title&#34;</span><span class="p">:</span> <span class="s2">&#34;Magic&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>The <code>style</code> parameter used in a shortcode must match the <code>identifier</code> in the configuration. The title for the style will be determined from the configured <code>title</code>. If no <code>title</code> but a <code>i18n</code> is set, the title will be taken from the translation files by that key. The <code>title</code> may be empty in which case, the box does not contain a default title. <code>icon</code> and <code>color</code> are working similar.</p>
<p>You can also redefine the predefined styles if you&rsquo;re not satisfied with the default values.</p>
<p>Below is a <a href="/hugo-theme-relearn/shortcodes/notice/index.html#user-defined-style">usage example</a>.</p>
<h2 id="examples">Examples</h2>
<h3 id="by-severity-using-callout-syntax">By Severity Using Callout Syntax</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="k">&gt; </span><span class="ge">[!CAUTION]
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">&gt; </span><span class="ge">Advises about risks or negative outcomes of certain actions.
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
</span></span></span><span class="line"><span class="cl"><span class="k">&gt; </span><span class="ge">[!IMPORTANT]
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">&gt; </span><span class="ge">Key information users need to know to achieve their goal.
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
</span></span></span><span class="line"><span class="cl"><span class="k">&gt; </span><span class="ge">[!INFO]
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">&gt; </span><span class="ge">Information that users &lt;ins&gt;_might_&lt;/ins&gt; find interesting.
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
</span></span></span><span class="line"><span class="cl"><span class="k">&gt; </span><span class="ge">[!NOTE]
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">&gt; </span><span class="ge">Useful information that users should know, even when skimming content.
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
</span></span></span><span class="line"><span class="cl"><span class="k">&gt; </span><span class="ge">[!TIP]
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">&gt; </span><span class="ge">Helpful advice for doing things better or more easily.
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
</span></span></span><span class="line"><span class="cl"><span class="k">&gt; </span><span class="ge">[!WARNING]
</span></span></span><span class="line"><span class="cl"><span class="ge"></span>&gt; Urgent info that needs immediate user attention to avoid problems.</span></span></code></pre></div>
<div class="box notices cstyle caution">
<div class="box-label">
<i class="fa-fw fas fa-hand"></i> Caution
</div>
<div class="box-content">
<p>Advises about risks or negative outcomes of certain actions.</p>
</div>
</div>
<div class="box notices cstyle important">
<div class="box-label">
<i class="fa-fw fas fa-bolt"></i> Important
</div>
<div class="box-content">
<p>Key information users need to know to achieve their goal.</p>
</div>
</div>
<div class="box notices cstyle info">
<div class="box-label">
<i class="fa-fw fas fa-info-circle"></i> Info
</div>
<div class="box-content">
<p>Information that users <ins><em>might</em></ins> find interesting.</p>
</div>
</div>
<div class="box notices cstyle note">
<div class="box-label">
<i class="fa-fw fas fa-exclamation-circle"></i> Note
</div>
<div class="box-content">
<p>Useful information that users should know, even when skimming content.</p>
</div>
</div>
<div class="box notices cstyle tip">
<div class="box-label">
<i class="fa-fw fas fa-lightbulb"></i> Tip
</div>
<div class="box-content">
<p>Helpful advice for doing things better or more easily.</p>
</div>
</div>
<div class="box notices cstyle warning">
<div class="box-label">
<i class="fa-fw fas fa-exclamation-triangle"></i> Warning
</div>
<div class="box-content">
<p>Urgent info that needs immediate user attention to avoid problems.</p>
</div>
</div>
<h3 id="by-brand-colors-with-title-and-icon-variantion">By Brand Colors with Title and Icon Variantion</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Primary&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">primary</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;secondary&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Secondary&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">secondary</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;accent&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;stopwatch&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">An</span> <span class="o">**</span><span class="nx">accent</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box notices cstyle primary">
<div class="box-label">
Primary
</div>
<div class="box-content">
<p>A <strong>primary</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle secondary">
<div class="box-label">
Secondary
</div>
<div class="box-content">
<p>A <strong>secondary</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle accent">
<div class="box-label">
<i class="fa-fw fas fa-stopwatch"></i>
</div>
<div class="box-content">
<p>An <strong>accent</strong> disclaimer</p>
</div>
</div>
<h3 id="by-color">By Color</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Blue&#34;</span><span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">blue</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;cyan&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Cyan&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">cyan</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;green&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Green&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">green</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;grey&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;bug&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">grey</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;magenta&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Magenta&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">magenta</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;orange&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Orange&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;bug&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">orange</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Red&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">red</span><span class="o">**</span> <span class="nx">disclaimer</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box notices cstyle blue">
<div class="box-label">
Blue
</div>
<div class="box-content">
<p>A <strong>blue</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle cyan">
<div class="box-label">
Cyan
</div>
<div class="box-content">
<p>A <strong>cyan</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle green">
<div class="box-label">
Green
</div>
<div class="box-content">
<p>A <strong>green</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle grey">
<div class="box-label">
<i class="fa-fw fas fa-bug"></i>
</div>
<div class="box-content">
<p>A <strong>grey</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle magenta">
<div class="box-label">
Magenta
</div>
<div class="box-content">
<p>A <strong>magenta</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle orange">
<div class="box-label">
<i class="fa-fw fas fa-bug"></i> Orange
</div>
<div class="box-content">
<p>A <strong>orange</strong> disclaimer</p>
</div>
</div>
<div class="box notices cstyle red">
<div class="box-label">
Red
</div>
<div class="box-content">
<p>A <strong>red</strong> disclaimer</p>
</div>
</div>
<h3 id="by-special-color">By Special Color</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;default&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Default&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;skull-crossbones&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">Just</span> <span class="nx">some</span> <span class="nx">grey</span> <span class="k">default</span> <span class="nx">color</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;code&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Code&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;skull-crossbones&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">Colored</span> <span class="nx">like</span> <span class="nx">a</span> <span class="nx">code</span> <span class="nx">fence</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;transparent&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Transparent&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;skull-crossbones&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">No</span> <span class="nx">visible</span> <span class="nx">borders</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box notices cstyle default">
<div class="box-label">
<i class="fa-fw fas fa-skull-crossbones"></i> Default
</div>
<div class="box-content">
<p>Just some grey default color.</p>
</div>
</div>
<div class="box notices cstyle code">
<div class="box-label">
<i class="fa-fw fas fa-skull-crossbones"></i> Code
</div>
<div class="box-content">
<p>Colored like a code fence.</p>
</div>
</div>
<div class="box notices cstyle transparent">
<div class="box-label">
<i class="fa-fw fas fa-skull-crossbones"></i> Transparent
</div>
<div class="box-content">
<p>No visible borders.</p>
</div>
</div>
<h3 id="various-features">Various Features</h3>
<h4 id="with-user-defined-color-font-awesome-brand-icon-and-markdown-in-title-and-content">With User-Defined Color, Font Awesome Brand Icon and Markdown in Title and Content</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;fuchsia&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;**Hugo** is _awesome_&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;fa-fw fab fa-hackerrank&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">You</span> <span class="nx">can</span> <span class="nx">add</span> <span class="nx">standard</span> <span class="nx">markdown</span> <span class="nx">syntax</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">multiple</span> <span class="nx">paragraphs</span>
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">bullet</span> <span class="nx">point</span> <span class="nx">lists</span>
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">_emphasized_</span><span class="p">,</span> <span class="o">**</span><span class="nx">bold</span><span class="o">**</span> <span class="nx">and</span> <span class="nx">even</span> <span class="o">**</span><span class="nx">_bold</span> <span class="nx">emphasized_</span><span class="o">**</span> <span class="nx">text</span>
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="p">[</span><span class="nx">links</span><span class="p">](</span><span class="nx">https</span><span class="p">:</span><span class="c1">//example.com)
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="o">-</span> <span class="nx">etc</span><span class="p">.[^</span><span class="nx">etc</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[^</span><span class="nx">etc</span><span class="p">]:</span> <span class="nx">Et</span> <span class="nf">Cetera</span> <span class="p">(</span><span class="nx">English</span><span class="p">:</span> <span class="o">/</span><span class="nx">ɛtˈsɛtərə</span><span class="o">/</span><span class="p">),</span> <span class="nx">abbreviated</span> <span class="nx">to</span> <span class="nx">etc</span><span class="p">.,</span> <span class="nx">etc</span><span class="p">,</span> <span class="nx">et</span> <span class="nx">cet</span><span class="p">.,</span> <span class="nx">is</span> <span class="nx">a</span> <span class="nx">Latin</span> <span class="nx">expression</span> <span class="nx">that</span> <span class="nx">is</span> <span class="nx">used</span> <span class="nx">in</span> <span class="nx">English</span> <span class="nx">to</span> <span class="nx">mean</span> <span class="s">&#34;and other similar things&#34;</span><span class="p">,</span> <span class="nx">or</span> <span class="s">&#34;and so forth&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="s">```plaintext
</span></span></span><span class="line"><span class="cl"><span class="s">...and even source code
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="nx">the</span> <span class="nx">possibilities</span> <span class="nx">are</span> <span class="nf">endless</span> <span class="p">(</span><span class="nx">almost</span> <span class="o">-</span> <span class="nx">including</span> <span class="nx">other</span> <span class="nx">shortcodes</span> <span class="nx">may</span> <span class="nx">or</span> <span class="nx">may</span> <span class="nx">not</span> <span class="nx">work</span><span class="p">)</span> <span class="p">(</span><span class="nx">almost</span> <span class="o">-</span> <span class="nx">including</span> <span class="nx">other</span> <span class="nx">shortcodes</span> <span class="nx">may</span> <span class="nx">or</span> <span class="nx">may</span> <span class="nx">not</span> <span class="nx">work</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box notices cstyle default" style="--VARIABLE-BOX-color: fuchsia;">
<div class="box-label">
<i class="fa-fw fab fa-hackerrank"></i> <strong>Hugo</strong> is <em>awesome</em>
</div>
<div class="box-content">
<p>You can add standard markdown syntax:</p>
<ul>
<li>multiple paragraphs</li>
<li>bullet point lists</li>
<li><em>emphasized</em>, <strong>bold</strong> and even <strong><em>bold emphasized</em></strong> text</li>
<li><a href="https://example.com" rel="external" target="_self">links</a></li>
<li>etc.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></li>
</ul>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">...and even source code</span></span></code></pre></div>
<blockquote>
<p>the possibilities are endless (almost - including other shortcodes may or may not work) (almost - including other shortcodes may or may not work)</p>
</blockquote>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Et Cetera (English: /ɛtˈsɛtərə/), abbreviated to etc., etc, et cet., is a Latin expression that is used in English to mean &ldquo;and other similar things&rdquo;, or &ldquo;and so forth&rdquo;&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
</div>
</div>
<h4 id="expandable-content-area">Expandable Content Area</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;green&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Expand me...&#34;</span> <span class="nx">expanded</span><span class="p">=</span><span class="s">&#34;true&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">No</span> <span class="nx">need</span> <span class="nx">to</span> <span class="nx">press</span> <span class="nx">you</span><span class="p">!</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;red&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Expand me...&#34;</span> <span class="nx">expanded</span><span class="p">=</span><span class="s">&#34;false&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">Thank</span> <span class="nx">you</span><span class="p">!</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="expand box notices cstyle green">
<input type="checkbox" id="R-expand-2488ff3f935657cc3003b5cb2f6a6859" aria-controls="R-expandcontent-2488ff3f935657cc3003b5cb2f6a6859" checked>
<label class="expand-label box-label" for="R-expand-2488ff3f935657cc3003b5cb2f6a6859">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Expand me&hellip;
</label>
<div class="box-spacer"></div>
<div id="R-expandcontent-2488ff3f935657cc3003b5cb2f6a6859" class="box-content expand-content">
<p>No need to press you!</p>
</div>
</div>
<div class="expand box notices cstyle red">
<input type="checkbox" id="R-expand-37ac1956d157a417d6269bfb24b3f056" aria-controls="R-expandcontent-37ac1956d157a417d6269bfb24b3f056">
<label class="expand-label box-label" for="R-expand-37ac1956d157a417d6269bfb24b3f056">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Expand me&hellip;
</label>
<div class="box-spacer"></div>
<div id="R-expandcontent-37ac1956d157a417d6269bfb24b3f056" class="box-content expand-content">
<p>Thank you!</p>
</div>
</div>
<h4 id="no-content-or-no-title">No Content or No Title</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;accent&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Just a bar&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;accent&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">Just</span> <span class="nx">a</span> <span class="nx">box</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box notices cstyle accent">
<div class="box-label">
Just a bar
</div>
</div>
<div class="box notices cstyle accent">
<div class="box-content">
<p>Just a box</p>
</div>
</div>
<h4 id="various-callouts">Various Callouts</h4>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="p">[!</span><span class="nx">caution</span><span class="p">]</span> <span class="nx">Callouts</span> <span class="nx">can</span> <span class="nx">have</span> <span class="nx">custom</span> <span class="nx">titles</span>
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="nx">Like</span> <span class="nx">this</span> <span class="nx">one</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="p">[!</span><span class="nx">caution</span><span class="p">]</span> <span class="nx">Title</span><span class="o">-</span><span class="nx">only</span> <span class="nx">callout</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="p">[!</span><span class="nx">note</span><span class="p">]</span><span class="o">-</span> <span class="nx">Are</span> <span class="nx">callouts</span> <span class="nx">foldable</span><span class="err">?</span>
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="nx">Yes</span><span class="p">!</span> <span class="nx">In</span> <span class="nx">a</span> <span class="nx">foldable</span> <span class="nx">callout</span><span class="p">,</span> <span class="nx">the</span> <span class="nx">contents</span> <span class="nx">are</span> <span class="nx">hidden</span> <span class="nx">when</span> <span class="nx">the</span> <span class="nx">callout</span> <span class="nx">is</span> <span class="nx">collapsed</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="p">[!</span><span class="nx">note</span><span class="p">]</span><span class="o">+</span> <span class="nx">Are</span> <span class="nx">callouts</span> <span class="nx">foldable</span><span class="err">?</span>
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="nx">Yes</span><span class="p">!</span> <span class="nx">In</span> <span class="nx">a</span> <span class="nx">foldable</span> <span class="nx">callout</span><span class="p">,</span> <span class="nx">the</span> <span class="nx">contents</span> <span class="nx">are</span> <span class="nx">hidden</span> <span class="nx">when</span> <span class="nx">the</span> <span class="nx">callout</span> <span class="nx">is</span> <span class="nx">collapsed</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="p">[!</span><span class="nx">info</span><span class="p">]</span> <span class="nx">Can</span> <span class="nx">callouts</span> <span class="nx">be</span> <span class="nx">nested</span><span class="err">?</span>
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="p">&gt;</span> <span class="p">[!</span><span class="nx">important</span><span class="p">]</span> <span class="nx">Yes</span><span class="p">!,</span> <span class="nx">they</span> <span class="nx">can</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">&gt;</span> <span class="p">&gt;</span> <span class="p">&gt;</span> <span class="p">[!</span><span class="nx">tip</span><span class="p">]</span> <span class="nx">You</span> <span class="nx">can</span> <span class="nx">even</span> <span class="nx">use</span> <span class="nx">multiple</span> <span class="nx">layers</span> <span class="nx">of</span> <span class="nx">nesting</span><span class="p">.</span></span></span></code></pre></div>
<div class="box notices cstyle caution">
<div class="box-label">
<i class="fa-fw fas fa-hand"></i> Callouts can have custom titles
</div>
<div class="box-content">
<p>Like this one.</p>
</div>
</div>
<div class="box notices cstyle caution">
<div class="box-label">
<i class="fa-fw fas fa-hand"></i> Title-only callout
</div>
</div>
<div class="expand box notices cstyle note">
<input type="checkbox" id="R-expand-bfb824ec817685944f6a2deb38cf00e1" aria-controls="R-expandcontent-bfb824ec817685944f6a2deb38cf00e1">
<label class="expand-label box-label" for="R-expand-bfb824ec817685944f6a2deb38cf00e1">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> <i class="fa-fw fas fa-exclamation-circle"></i> Are callouts foldable?
</label>
<div class="box-spacer"></div>
<div id="R-expandcontent-bfb824ec817685944f6a2deb38cf00e1" class="box-content expand-content">
<p>Yes! In a foldable callout, the contents are hidden when the callout is collapsed</p>
</div>
</div>
<div class="expand box notices cstyle note">
<input type="checkbox" id="R-expand-f40f0b5f6c215c520508c9e6acb2b3f8" aria-controls="R-expandcontent-f40f0b5f6c215c520508c9e6acb2b3f8" checked>
<label class="expand-label box-label" for="R-expand-f40f0b5f6c215c520508c9e6acb2b3f8">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> <i class="fa-fw fas fa-exclamation-circle"></i> Are callouts foldable?
</label>
<div class="box-spacer"></div>
<div id="R-expandcontent-f40f0b5f6c215c520508c9e6acb2b3f8" class="box-content expand-content">
<p>Yes! In a foldable callout, the contents are hidden when the callout is collapsed</p>
</div>
</div>
<div class="box notices cstyle info">
<div class="box-label">
<i class="fa-fw fas fa-info-circle"></i> Can callouts be nested?
</div>
<div class="box-content">
<p><div class="box notices cstyle important">
<div class="box-label">
<i class="fa-fw fas fa-bolt"></i> Yes!, they can.
</div>
<div class="box-content">
<p><div class="box notices cstyle tip">
<div class="box-label">
<i class="fa-fw fas fa-lightbulb"></i> You can even use multiple layers of nesting.
</div>
</div>
</div>
</div>
</div>
</div>
<h4 id="code-with-collapsed-colored-borders">Code with Collapsed Colored Borders</h4>
<div class="highlight wrap-code"><pre tabindex="0"><code>&gt; [!secondary]
&gt; ```c
&gt; // With colored border in Markdown syntax
&gt; printf(&#34;Hello World!&#34;);
&gt; ```
{{% notice style=&#34;red&#34; %}}
```c
// With colored border in Shortcode syntax
printf(&#34;Hello World!&#34;);
```
{{% /notice %}}</code></pre></div>
<div class="box notices cstyle secondary">
<div class="box-content">
<p><div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="c1">// With colored border in Markdown syntax
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="nf">printf</span><span class="p">(</span><span class="s">&#34;Hello World!&#34;</span><span class="p">);</span></span></span></code></pre></div>
</div>
</div>
<div class="box notices cstyle red">
<div class="box-content">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="c1">// With colored border in Shortcode syntax
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="nf">printf</span><span class="p">(</span><span class="s">&#34;Hello World!&#34;</span><span class="p">);</span></span></span></code></pre></div>
</div>
</div>
<h4 id="user-defined-style">User-defined Style</h4>
<p>Self-defined styles can be <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">configured</a> in your <code>hugo.toml</code> and used for every shortcode, that accepts a <code>style</code> parameter.</p>
<div class="highlight wrap-code"><pre tabindex="0"><code>&gt; [!magic]
&gt; Maaagic!</code></pre></div>
<div class="box notices cstyle magic">
<div class="box-label">
<i class="fa-fw fas fa-rainbow"></i> Magic
</div>
<div class="box-content">
<p>Maaagic!</p>
</div>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="openapi">OpenAPI</h1>
<p>The <code>openapi</code> shortcode displays your OpenAPI / Swagger specifications using the <a href="https://github.com/swagger-api/swagger-ui" rel="external" target="_self">Swagger UI</a> library.</p>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">openapi</span> <span class="nx">src</span><span class="p">=</span><span class="s">&#34;https://petstore3.openapi.io/api/v3/openapi.json&#34;</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/openapi.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;src&#34;</span> <span class="s">&#34;https://petstore3.openapi.io/api/v3/openapi.json&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>If you want to print out (or generate a PDF) from your OpenAPI documentation, don&rsquo;t initiate printing directly from the page because the elements are optimized for interactive usage in a browser.</p>
<p>Instead, open the <a href="/hugo-theme-relearn/authoring/frontmatter/topbar/index.html">print preview</a> in your browser and initiate printing from that page. This page is optimized for reading and expands most of the available sections.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>src</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>The path to the to the OpenAPI specification resource or URL to be used. Resource paths adhere to <a href="https://gohugo.io/methods/page/path/" rel="external" target="_self">Hugo&rsquo;s logical path</a>.</td>
</tr>
</tbody>
</table>
<h2 id="settings">Settings</h2>
<h3 id="enabling-link-warnings">Enabling Link Warnings</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> You can use <code>openapi.errorlevel</code> to control what should happen if a local OpenAPI specification link can not be resolved to a resource.</p>
<p>If not set or empty, any unresolved link is written as given into the resulting output. If set to <code>warning</code> the same happens and an additional warning is printed in the built console. If set to <code>error</code> an error message is printed and the build is aborted.</p>
<p>Please note that this can not resolve files inside of your <code>static</code> directory. The file must be a resource of the page or the site.</p>
<p>Link warnings are also available for <a href="/hugo-theme-relearn/authoring/frontmatter/linking/index.html#enabling-link-and-image-link-warnings">images &amp; links</a> and the <a href="/hugo-theme-relearn/shortcodes/include/index.html#enabling-link-warnings">include</a> shortcode.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">openapi</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">errorlevel</span> <span class="p">=</span> <span class="s1">&#39;warning&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">openapi</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">errorlevel</span><span class="p">:</span><span class="w"> </span><span class="l">warning</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;openapi&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;errorlevel&#34;</span><span class="p">:</span> <span class="s2">&#34;warning&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="loading-an-external-version-of-the-swagger-ui-library">Loading an External Version of the Swagger UI Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The theme uses the shipped Swagger UI library by default.</p>
<p>In case you want do use a different version of the Swagger UI library but don&rsquo;t want to override the shipped version, you can set <code>customOpenapiURL</code> to the URL of the external Swagger UI library.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">customOpenapiURL</span> <span class="p">=</span> <span class="s1">&#39;https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">customOpenapiURL</span><span class="p">:</span><span class="w"> </span><span class="l">https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;customOpenapiURL&#34;</span><span class="p">:</span> <span class="s2">&#34;https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="force-loading-of-the-swagger-ui-library">Force Loading of the Swagger UI Library</h3>
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> <span class="badge cstyle green badge-with-title"><span class="badge-title"><i class="fa-fw fab fa-markdown"></i></span><span class="badge-content">Front Matter</span></span> The Swagger UI library will be loaded if the page contains an <code>openapi</code> shortcode or codefence.</p>
<p>You can force loading the Swagger UI library if no shortcode or codefence was used by setting <code>openapi.force=true</code>. If a shortcode or codefence was found, the option has no effect. This comes handy in case you are using scripting to render a spec.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">openapi</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">force</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">openapi</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">force</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;openapi&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;force&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="setting-a-specific-swagger-ui-theme">Setting a Specific Swagger UI Theme</h3>
<p>The recommended way to configure your Swagger UI theme is to set the default value using the <code>--OPENAPI-theme</code> variable in your <a href="/hugo-theme-relearn/configuration/branding/generator/index.html">color variant stylesheet</a>. This allows your specs to look pretty when the user switches the color variant.</p>
<h2 id="example">Example</h2>
<h3 id="using-local-file">Using Local File</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">openapi</span> <span class="nx">src</span><span class="p">=</span><span class="s">&#34;petstore.json&#34;</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<div class="sc-openapi-wrapper is-loading helper-loading-container">
<div
class="sc-openapi-container"
id="R-openapi-df099d1fe300a958678ea116f9a047e2"
data-openapi-url=""
data-openapi-spec="{
&#34;openapi&#34;: &#34;3.0.2&#34;,
&#34;info&#34;: {
&#34;title&#34;: &#34;Swagger Petstore - OpenAPI 3.0&#34;,
&#34;description&#34;: &#34;This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we&#39;ve switched to the design first approach!\nYou can now help us improve the API whether it&#39;s by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)&#34;,
&#34;termsOfService&#34;: &#34;http://swagger.io/terms/&#34;,
&#34;contact&#34;: {
&#34;email&#34;: &#34;apiteam@swagger.io&#34;
},
&#34;license&#34;: {
&#34;name&#34;: &#34;Apache 2.0&#34;,
&#34;url&#34;: &#34;http://www.apache.org/licenses/LICENSE-2.0.html&#34;
},
&#34;version&#34;: &#34;1.0.18&#34;
},
&#34;externalDocs&#34;: {
&#34;description&#34;: &#34;Find out more about Swagger&#34;,
&#34;url&#34;: &#34;http://swagger.io&#34;
},
&#34;servers&#34;: [
{
&#34;url&#34;: &#34;/api/v3&#34;
}
],
&#34;tags&#34;: [
{
&#34;name&#34;: &#34;pet&#34;,
&#34;description&#34;: &#34;Everything about your Pets&#34;,
&#34;externalDocs&#34;: {
&#34;description&#34;: &#34;Find out more&#34;,
&#34;url&#34;: &#34;http://swagger.io&#34;
}
},
{
&#34;name&#34;: &#34;store&#34;,
&#34;description&#34;: &#34;Access to Petstore orders&#34;,
&#34;externalDocs&#34;: {
&#34;description&#34;: &#34;Find out more about our store&#34;,
&#34;url&#34;: &#34;http://swagger.io&#34;
}
},
{
&#34;name&#34;: &#34;user&#34;,
&#34;description&#34;: &#34;Operations about user&#34;
}
],
&#34;paths&#34;: {
&#34;/pet&#34;: {
&#34;put&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;Update an existing pet&#34;,
&#34;description&#34;: &#34;Update an existing pet by Id&#34;,
&#34;operationId&#34;: &#34;updatePet&#34;,
&#34;requestBody&#34;: {
&#34;description&#34;: &#34;Update an existent pet in the store&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/x-www-form-urlencoded&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
},
&#34;required&#34;: true
},
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;Successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
}
},
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid ID supplied&#34;
},
&#34;404&#34;: {
&#34;description&#34;: &#34;Pet not found&#34;
},
&#34;405&#34;: {
&#34;description&#34;: &#34;Validation exception&#34;
}
},
&#34;security&#34;: [
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
},
&#34;post&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;Add a new pet to the store&#34;,
&#34;description&#34;: &#34;Add a new pet to the store&#34;,
&#34;operationId&#34;: &#34;addPet&#34;,
&#34;requestBody&#34;: {
&#34;description&#34;: &#34;Create a new pet in the store&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/x-www-form-urlencoded&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
},
&#34;required&#34;: true
},
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;Successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
}
},
&#34;405&#34;: {
&#34;description&#34;: &#34;Invalid input&#34;
}
},
&#34;security&#34;: [
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
}
},
&#34;/pet/findByStatus&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;Finds Pets by status&#34;,
&#34;description&#34;: &#34;Multiple status values can be provided with comma separated strings&#34;,
&#34;operationId&#34;: &#34;findPetsByStatus&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;status&#34;,
&#34;in&#34;: &#34;query&#34;,
&#34;description&#34;: &#34;Status values that need to be considered for filter&#34;,
&#34;required&#34;: false,
&#34;explode&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;default&#34;: &#34;available&#34;,
&#34;enum&#34;: [
&#34;available&#34;,
&#34;pending&#34;,
&#34;sold&#34;
]
}
}
],
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
}
}
},
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid status value&#34;
}
},
&#34;security&#34;: [
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
}
},
&#34;/pet/findByTags&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;Finds Pets by tags&#34;,
&#34;description&#34;: &#34;Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.&#34;,
&#34;operationId&#34;: &#34;findPetsByTags&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;tags&#34;,
&#34;in&#34;: &#34;query&#34;,
&#34;description&#34;: &#34;Tags to filter by&#34;,
&#34;required&#34;: false,
&#34;explode&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;items&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
}
],
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
}
}
},
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid tag value&#34;
}
},
&#34;security&#34;: [
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
}
},
&#34;/pet/{petId}&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;Find pet by ID&#34;,
&#34;description&#34;: &#34;Returns a single pet&#34;,
&#34;operationId&#34;: &#34;getPetById&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;petId&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;ID of pet to return&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
}
}
],
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
}
},
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid ID supplied&#34;
},
&#34;404&#34;: {
&#34;description&#34;: &#34;Pet not found&#34;
}
},
&#34;security&#34;: [
{
&#34;api_key&#34;: []
},
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
},
&#34;post&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;Updates a pet in the store with form data&#34;,
&#34;description&#34;: &#34;&#34;,
&#34;operationId&#34;: &#34;updatePetWithForm&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;petId&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;ID of pet that needs to be updated&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
}
},
{
&#34;name&#34;: &#34;name&#34;,
&#34;in&#34;: &#34;query&#34;,
&#34;description&#34;: &#34;Name of pet that needs to be updated&#34;,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
{
&#34;name&#34;: &#34;status&#34;,
&#34;in&#34;: &#34;query&#34;,
&#34;description&#34;: &#34;Status of pet that needs to be updated&#34;,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
],
&#34;responses&#34;: {
&#34;405&#34;: {
&#34;description&#34;: &#34;Invalid input&#34;
}
},
&#34;security&#34;: [
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
},
&#34;delete&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;Deletes a pet&#34;,
&#34;description&#34;: &#34;&#34;,
&#34;operationId&#34;: &#34;deletePet&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;api_key&#34;,
&#34;in&#34;: &#34;header&#34;,
&#34;description&#34;: &#34;&#34;,
&#34;required&#34;: false,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
{
&#34;name&#34;: &#34;petId&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;Pet id to delete&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
}
}
],
&#34;responses&#34;: {
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid pet value&#34;
}
},
&#34;security&#34;: [
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
}
},
&#34;/pet/{petId}/uploadImage&#34;: {
&#34;post&#34;: {
&#34;tags&#34;: [
&#34;pet&#34;
],
&#34;summary&#34;: &#34;uploads an image&#34;,
&#34;description&#34;: &#34;&#34;,
&#34;operationId&#34;: &#34;uploadFile&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;petId&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;ID of pet to update&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
}
},
{
&#34;name&#34;: &#34;additionalMetadata&#34;,
&#34;in&#34;: &#34;query&#34;,
&#34;description&#34;: &#34;Additional Metadata&#34;,
&#34;required&#34;: false,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
],
&#34;requestBody&#34;: {
&#34;content&#34;: {
&#34;application/octet-stream&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;binary&#34;
}
}
}
},
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/ApiResponse&#34;
}
}
}
}
},
&#34;security&#34;: [
{
&#34;petstore_auth&#34;: [
&#34;write:pets&#34;,
&#34;read:pets&#34;
]
}
]
}
},
&#34;/store/inventory&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;store&#34;
],
&#34;summary&#34;: &#34;Returns pet inventories by status&#34;,
&#34;description&#34;: &#34;Returns a map of status codes to quantities&#34;,
&#34;operationId&#34;: &#34;getInventory&#34;,
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;additionalProperties&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;
}
}
}
}
}
},
&#34;security&#34;: [
{
&#34;api_key&#34;: []
}
]
}
},
&#34;/store/order&#34;: {
&#34;post&#34;: {
&#34;tags&#34;: [
&#34;store&#34;
],
&#34;summary&#34;: &#34;Place an order for a pet&#34;,
&#34;description&#34;: &#34;Place a new order in the store&#34;,
&#34;operationId&#34;: &#34;placeOrder&#34;,
&#34;requestBody&#34;: {
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Order&#34;
}
},
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Order&#34;
}
},
&#34;application/x-www-form-urlencoded&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Order&#34;
}
}
}
},
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Order&#34;
}
}
}
},
&#34;405&#34;: {
&#34;description&#34;: &#34;Invalid input&#34;
}
}
}
},
&#34;/store/order/{orderId}&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;store&#34;
],
&#34;summary&#34;: &#34;Find purchase order by ID&#34;,
&#34;description&#34;: &#34;For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generate exceptions.&#34;,
&#34;operationId&#34;: &#34;getOrderById&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;orderId&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;ID of order that needs to be fetched&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
}
}
],
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Order&#34;
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Order&#34;
}
}
}
},
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid ID supplied&#34;
},
&#34;404&#34;: {
&#34;description&#34;: &#34;Order not found&#34;
}
}
},
&#34;delete&#34;: {
&#34;tags&#34;: [
&#34;store&#34;
],
&#34;summary&#34;: &#34;Delete purchase order by ID&#34;,
&#34;description&#34;: &#34;For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors&#34;,
&#34;operationId&#34;: &#34;deleteOrder&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;orderId&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;ID of the order that needs to be deleted&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
}
}
],
&#34;responses&#34;: {
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid ID supplied&#34;
},
&#34;404&#34;: {
&#34;description&#34;: &#34;Order not found&#34;
}
}
}
},
&#34;/user&#34;: {
&#34;post&#34;: {
&#34;tags&#34;: [
&#34;user&#34;
],
&#34;summary&#34;: &#34;Create user&#34;,
&#34;description&#34;: &#34;This can only be done by the logged in user.&#34;,
&#34;operationId&#34;: &#34;createUser&#34;,
&#34;requestBody&#34;: {
&#34;description&#34;: &#34;Created user object&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
},
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
},
&#34;application/x-www-form-urlencoded&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
}
}
},
&#34;responses&#34;: {
&#34;default&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
},
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
}
}
}
}
}
},
&#34;/user/createWithList&#34;: {
&#34;post&#34;: {
&#34;tags&#34;: [
&#34;user&#34;
],
&#34;summary&#34;: &#34;Creates list of users with given input array&#34;,
&#34;description&#34;: &#34;Creates list of users with given input array&#34;,
&#34;operationId&#34;: &#34;createUsersWithListInput&#34;,
&#34;requestBody&#34;: {
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
}
}
}
},
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;Successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
}
}
},
&#34;default&#34;: {
&#34;description&#34;: &#34;successful operation&#34;
}
}
}
},
&#34;/user/login&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;user&#34;
],
&#34;summary&#34;: &#34;Logs user into the system&#34;,
&#34;description&#34;: &#34;&#34;,
&#34;operationId&#34;: &#34;loginUser&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;username&#34;,
&#34;in&#34;: &#34;query&#34;,
&#34;description&#34;: &#34;The user name for login&#34;,
&#34;required&#34;: false,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
{
&#34;name&#34;: &#34;password&#34;,
&#34;in&#34;: &#34;query&#34;,
&#34;description&#34;: &#34;The password for login in clear text&#34;,
&#34;required&#34;: false,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
],
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;headers&#34;: {
&#34;X-Rate-Limit&#34;: {
&#34;description&#34;: &#34;calls per hour allowed by the user&#34;,
&#34;schema&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;
}
},
&#34;X-Expires-After&#34;: {
&#34;description&#34;: &#34;date in UTC when token expires&#34;,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;date-time&#34;
}
}
},
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
}
},
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid username/password supplied&#34;
}
}
}
},
&#34;/user/logout&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;user&#34;
],
&#34;summary&#34;: &#34;Logs out current logged in user session&#34;,
&#34;description&#34;: &#34;&#34;,
&#34;operationId&#34;: &#34;logoutUser&#34;,
&#34;parameters&#34;: [],
&#34;responses&#34;: {
&#34;default&#34;: {
&#34;description&#34;: &#34;successful operation&#34;
}
}
}
},
&#34;/user/{username}&#34;: {
&#34;get&#34;: {
&#34;tags&#34;: [
&#34;user&#34;
],
&#34;summary&#34;: &#34;Get user by user name&#34;,
&#34;description&#34;: &#34;&#34;,
&#34;operationId&#34;: &#34;getUserByName&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;username&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;The name that needs to be fetched. Use user1 for testing. &#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
],
&#34;responses&#34;: {
&#34;200&#34;: {
&#34;description&#34;: &#34;successful operation&#34;,
&#34;content&#34;: {
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
},
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
}
}
},
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid username supplied&#34;
},
&#34;404&#34;: {
&#34;description&#34;: &#34;User not found&#34;
}
}
},
&#34;put&#34;: {
&#34;tags&#34;: [
&#34;user&#34;
],
&#34;summary&#34;: &#34;Update user&#34;,
&#34;description&#34;: &#34;This can only be done by the logged in user.&#34;,
&#34;operationId&#34;: &#34;updateUser&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;username&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;name that needs to be updated&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
],
&#34;requestBody&#34;: {
&#34;description&#34;: &#34;Update an existent user in the store&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
},
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
},
&#34;application/x-www-form-urlencoded&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
}
}
},
&#34;responses&#34;: {
&#34;default&#34;: {
&#34;description&#34;: &#34;successful operation&#34;
}
}
},
&#34;delete&#34;: {
&#34;tags&#34;: [
&#34;user&#34;
],
&#34;summary&#34;: &#34;Delete user&#34;,
&#34;description&#34;: &#34;This can only be done by the logged in user.&#34;,
&#34;operationId&#34;: &#34;deleteUser&#34;,
&#34;parameters&#34;: [
{
&#34;name&#34;: &#34;username&#34;,
&#34;in&#34;: &#34;path&#34;,
&#34;description&#34;: &#34;The name that needs to be deleted&#34;,
&#34;required&#34;: true,
&#34;schema&#34;: {
&#34;type&#34;: &#34;string&#34;
}
}
],
&#34;responses&#34;: {
&#34;400&#34;: {
&#34;description&#34;: &#34;Invalid username supplied&#34;
},
&#34;404&#34;: {
&#34;description&#34;: &#34;User not found&#34;
}
}
}
}
},
&#34;components&#34;: {
&#34;schemas&#34;: {
&#34;Order&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;petId&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 198772
},
&#34;quantity&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 7
},
&#34;shipDate&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;date-time&#34;
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;Order Status&#34;,
&#34;example&#34;: &#34;approved&#34;,
&#34;enum&#34;: [
&#34;placed&#34;,
&#34;approved&#34;,
&#34;delivered&#34;
]
},
&#34;complete&#34;: {
&#34;type&#34;: &#34;boolean&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;order&#34;
}
},
&#34;petId&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;petId&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 198772
},
&#34;quantity&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 7
},
&#34;shipDate&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;date-time&#34;
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;Order Status&#34;,
&#34;example&#34;: &#34;approved&#34;,
&#34;enum&#34;: [
&#34;placed&#34;,
&#34;approved&#34;,
&#34;delivered&#34;
]
},
&#34;complete&#34;: {
&#34;type&#34;: &#34;boolean&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;order&#34;
}
},
&#34;quantity&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;petId&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 198772
},
&#34;quantity&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 7
},
&#34;shipDate&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;date-time&#34;
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;Order Status&#34;,
&#34;example&#34;: &#34;approved&#34;,
&#34;enum&#34;: [
&#34;placed&#34;,
&#34;approved&#34;,
&#34;delivered&#34;
]
},
&#34;complete&#34;: {
&#34;type&#34;: &#34;boolean&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;order&#34;
}
},
&#34;shipDate&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;petId&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 198772
},
&#34;quantity&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 7
},
&#34;shipDate&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;date-time&#34;
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;Order Status&#34;,
&#34;example&#34;: &#34;approved&#34;,
&#34;enum&#34;: [
&#34;placed&#34;,
&#34;approved&#34;,
&#34;delivered&#34;
]
},
&#34;complete&#34;: {
&#34;type&#34;: &#34;boolean&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;order&#34;
}
},
&#34;status&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;petId&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 198772
},
&#34;quantity&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 7
},
&#34;shipDate&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;date-time&#34;
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;Order Status&#34;,
&#34;example&#34;: &#34;approved&#34;,
&#34;enum&#34;: [
&#34;placed&#34;,
&#34;approved&#34;,
&#34;delivered&#34;
]
},
&#34;complete&#34;: {
&#34;type&#34;: &#34;boolean&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;order&#34;
}
},
&#34;complete&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;petId&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 198772
},
&#34;quantity&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 7
},
&#34;shipDate&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;format&#34;: &#34;date-time&#34;
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;Order Status&#34;,
&#34;example&#34;: &#34;approved&#34;,
&#34;enum&#34;: [
&#34;placed&#34;,
&#34;approved&#34;,
&#34;delivered&#34;
]
},
&#34;complete&#34;: {
&#34;type&#34;: &#34;boolean&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;order&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;order&#34;
}
},
&#34;Customer&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 100000
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;fehguy&#34;
},
&#34;address&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;addresses&#34;,
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Address&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;customer&#34;
}
},
&#34;username&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 100000
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;fehguy&#34;
},
&#34;address&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;addresses&#34;,
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Address&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;customer&#34;
}
},
&#34;address&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 100000
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;fehguy&#34;
},
&#34;address&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;addresses&#34;,
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Address&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;customer&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;customer&#34;
}
},
&#34;Address&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;street&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;street&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;437 Lytton&#34;
},
&#34;city&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;Palo Alto&#34;
},
&#34;state&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;CA&#34;
},
&#34;zip&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;94301&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;address&#34;
}
},
&#34;city&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;street&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;437 Lytton&#34;
},
&#34;city&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;Palo Alto&#34;
},
&#34;state&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;CA&#34;
},
&#34;zip&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;94301&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;address&#34;
}
},
&#34;state&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;street&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;437 Lytton&#34;
},
&#34;city&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;Palo Alto&#34;
},
&#34;state&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;CA&#34;
},
&#34;zip&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;94301&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;address&#34;
}
},
&#34;zip&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;street&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;437 Lytton&#34;
},
&#34;city&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;Palo Alto&#34;
},
&#34;state&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;CA&#34;
},
&#34;zip&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;94301&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;address&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;address&#34;
}
},
&#34;Category&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 1
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;Dogs&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;category&#34;
}
},
&#34;name&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 1
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;Dogs&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;category&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;category&#34;
}
},
&#34;User&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;username&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;email&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;password&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;username&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;theUser&#34;
},
&#34;firstName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;John&#34;
},
&#34;lastName&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;James&#34;
},
&#34;email&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;john@email.com&#34;
},
&#34;password&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;phone&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;12345&#34;
},
&#34;userStatus&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;description&#34;: &#34;User Status&#34;,
&#34;format&#34;: &#34;int32&#34;,
&#34;example&#34;: 1
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;user&#34;
}
},
&#34;Tag&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;tag&#34;
}
},
&#34;name&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;tag&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;tag&#34;
}
},
&#34;Pet&#34;: {
&#34;required&#34;: [
&#34;name&#34;,
&#34;photoUrls&#34;
],
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;required&#34;: [
&#34;name&#34;,
&#34;photoUrls&#34;
],
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;doggie&#34;
},
&#34;category&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Category&#34;
},
&#34;photoUrls&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;photoUrl&#34;
}
}
},
&#34;tags&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Tag&#34;
}
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;pet status in the store&#34;,
&#34;enum&#34;: [
&#34;available&#34;,
&#34;pending&#34;,
&#34;sold&#34;
]
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;pet&#34;
}
},
&#34;name&#34;: {
&#34;required&#34;: [
&#34;name&#34;,
&#34;photoUrls&#34;
],
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;doggie&#34;
},
&#34;category&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Category&#34;
},
&#34;photoUrls&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;photoUrl&#34;
}
}
},
&#34;tags&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Tag&#34;
}
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;pet status in the store&#34;,
&#34;enum&#34;: [
&#34;available&#34;,
&#34;pending&#34;,
&#34;sold&#34;
]
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;pet&#34;
}
},
&#34;category&#34;: {
&#34;required&#34;: [
&#34;name&#34;,
&#34;photoUrls&#34;
],
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;doggie&#34;
},
&#34;category&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Category&#34;
},
&#34;photoUrls&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;photoUrl&#34;
}
}
},
&#34;tags&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Tag&#34;
}
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;pet status in the store&#34;,
&#34;enum&#34;: [
&#34;available&#34;,
&#34;pending&#34;,
&#34;sold&#34;
]
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;pet&#34;
}
},
&#34;photoUrls&#34;: {
&#34;required&#34;: [
&#34;name&#34;,
&#34;photoUrls&#34;
],
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;doggie&#34;
},
&#34;category&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Category&#34;
},
&#34;photoUrls&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;photoUrl&#34;
}
}
},
&#34;tags&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Tag&#34;
}
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;pet status in the store&#34;,
&#34;enum&#34;: [
&#34;available&#34;,
&#34;pending&#34;,
&#34;sold&#34;
]
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;pet&#34;
}
},
&#34;tags&#34;: {
&#34;required&#34;: [
&#34;name&#34;,
&#34;photoUrls&#34;
],
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;doggie&#34;
},
&#34;category&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Category&#34;
},
&#34;photoUrls&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;photoUrl&#34;
}
}
},
&#34;tags&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Tag&#34;
}
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;pet status in the store&#34;,
&#34;enum&#34;: [
&#34;available&#34;,
&#34;pending&#34;,
&#34;sold&#34;
]
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;pet&#34;
}
},
&#34;status&#34;: {
&#34;required&#34;: [
&#34;name&#34;,
&#34;photoUrls&#34;
],
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;id&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int64&#34;,
&#34;example&#34;: 10
},
&#34;name&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;example&#34;: &#34;doggie&#34;
},
&#34;category&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Category&#34;
},
&#34;photoUrls&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;xml&#34;: {
&#34;name&#34;: &#34;photoUrl&#34;
}
}
},
&#34;tags&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;xml&#34;: {
&#34;wrapped&#34;: true
},
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Tag&#34;
}
},
&#34;status&#34;: {
&#34;type&#34;: &#34;string&#34;,
&#34;description&#34;: &#34;pet status in the store&#34;,
&#34;enum&#34;: [
&#34;available&#34;,
&#34;pending&#34;,
&#34;sold&#34;
]
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;pet&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;pet&#34;
}
},
&#34;ApiResponse&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;code&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;code&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;
},
&#34;type&#34;: {
&#34;type&#34;: &#34;string&#34;
},
&#34;message&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;##default&#34;
}
},
&#34;type&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;code&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;
},
&#34;type&#34;: {
&#34;type&#34;: &#34;string&#34;
},
&#34;message&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;##default&#34;
}
},
&#34;message&#34;: {
&#34;type&#34;: &#34;object&#34;,
&#34;properties&#34;: {
&#34;code&#34;: {
&#34;type&#34;: &#34;integer&#34;,
&#34;format&#34;: &#34;int32&#34;
},
&#34;type&#34;: {
&#34;type&#34;: &#34;string&#34;
},
&#34;message&#34;: {
&#34;type&#34;: &#34;string&#34;
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;##default&#34;
}
}
},
&#34;xml&#34;: {
&#34;name&#34;: &#34;##default&#34;
}
}
},
&#34;requestBodies&#34;: {
&#34;Pet&#34;: {
&#34;description&#34;: &#34;Pet object that needs to be added to the store&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
},
&#34;application/xml&#34;: {
&#34;schema&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/Pet&#34;
}
}
}
},
&#34;UserArray&#34;: {
&#34;description&#34;: &#34;List of user object&#34;,
&#34;content&#34;: {
&#34;application/json&#34;: {
&#34;schema&#34;: {
&#34;type&#34;: &#34;array&#34;,
&#34;items&#34;: {
&#34;$ref&#34;: &#34;#/components/schemas/User&#34;
}
}
}
}
}
},
&#34;securitySchemes&#34;: {
&#34;petstore_auth&#34;: {
&#34;type&#34;: &#34;oauth2&#34;,
&#34;flows&#34;: {
&#34;implicit&#34;: {
&#34;authorizationUrl&#34;: &#34;https://petstore3.swagger.io/oauth/authorize&#34;,
&#34;scopes&#34;: {
&#34;write:pets&#34;: &#34;modify pets in your account&#34;,
&#34;read:pets&#34;: &#34;read your pets&#34;
}
}
}
},
&#34;api_key&#34;: {
&#34;type&#34;: &#34;apiKey&#34;,
&#34;name&#34;: &#34;api_key&#34;,
&#34;in&#34;: &#34;header&#34;
}
}
}
}"
></div>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="resources">Resources</h1>
<p>The <code>resources</code> shortcode displays links to resources contained in a <a href="https://gohugo.io/content-management/page-bundles/" rel="external" target="_self">page bundle</a>.</p>
<div class="box attachments cstyle transparent">
<div class="box-label">
<i class="fa-fw fas fa-paperclip"></i> Attachments
</div>
<ul class="attachments-files box-content">
<li><a href="/hugo-theme-relearn/shortcodes/resources/hugo.png">hugo.png</a> (17 KB)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/MaybeTreasure.en.txt">MaybeTreasure.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/NoTreasure.en.txt">NoTreasure.en.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/Treasure.pir.txt">Treasure.pir.txt</a> (31 B)</li>
</ul>
</div>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">resources</span> <span class="nx">sort</span><span class="p">=</span><span class="s">&#34;asc&#34;</span> <span class="o">/%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/resources.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;sort&#34;</span> <span class="s">&#34;asc&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>Multilanguage features are not supported directly by the shortcode but rely on Hugo&rsquo;s handling for resource translations applied when the theme iterates over all available resources.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>style</strong></td>
<td><code>transparent</code></td>
<td>The style scheme used for the box.<br><br>- by severity: <code>caution</code>, <code>important</code>, <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>cyan</code>, <code>green</code>, <code>grey</code>, <code>magenta</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code><br><br>You can also <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">define your own styles</a>.</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>see notes</td>
<td>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value" rel="external" target="_self">CSS color value</a> to be used. If not set, the chosen color depends on the <strong>style</strong>. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td>see notes</td>
<td>Arbitrary text for the box title. Depending on the <strong>style</strong> there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: <code>Resources</code><br><br>If you want no title for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><strong>icon</strong></td>
<td>see notes</td>
<td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> set to the left of the title. Depending on the <strong>style</strong> there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: <code>paperclip</code><br><br>If you want no icon, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><strong>expanded</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Whether to draw an expander and how the resource list is displayed.<br><br>- <em>&lt;empty&gt;</em>: no expander is drawn and the resource list is permanently shown<br>- <code>true</code>: the expander is drawn and the resource list is initially shown<br>- <code>false</code>: the expander is drawn and the resource list is initially hidden</td>
</tr>
<tr>
<td><strong>sort</strong></td>
<td><code>asc</code></td>
<td>Sorting the output in <code>asc</code>ending or <code>desc</code>ending order.</td>
</tr>
<tr>
<td><strong>pattern</strong></td>
<td><code>.*</code></td>
<td>A <a href="https://en.wikipedia.org/wiki/Regular_expression" rel="external" target="_self">regular expressions</a>, used to filter the resources <a href="https://gohugo.io/methods/resource/name/" rel="external" target="_self">by name</a>. For example:<br><br>- to match a file suffix of &lsquo;jpg&rsquo;, use <code>.*\.jpg</code> (not <code>*.\.jpg</code>)<br>- to match file names ending in <code>jpg</code> or <code>png</code>, use <code>.*\.(jpg|png)</code></td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="custom-title-list-of-resources-ending-in-png-jpg-or-gif">Custom Title, List of Resources Ending in png, jpg or gif</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">resources</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Related **files**&#34;</span> <span class="nx">pattern</span><span class="p">=</span><span class="s">&#34;.*\.(png|jpg|gif)&#34;</span> <span class="o">/%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box attachments cstyle transparent">
<div class="box-label">
<i class="fa-fw fas fa-paperclip"></i> Related <strong>files</strong>
</div>
<ul class="attachments-files box-content">
<li><a href="/hugo-theme-relearn/shortcodes/resources/hugo.png">hugo.png</a> (17 KB)</li>
</ul>
</div>
<h3 id="info-styled-box-descending-sort-order">Info Styled Box, Descending Sort Order</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">resources</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="nx">sort</span><span class="p">=</span><span class="s">&#34;desc&#34;</span> <span class="o">/%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box attachments cstyle info">
<div class="box-label">
<i class="fa-fw fas fa-info-circle"></i> Info
</div>
<ul class="attachments-files box-content">
<li><a href="/hugo-theme-relearn/shortcodes/resources/Treasure.pir.txt">Treasure.pir.txt</a> (31 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/NoTreasure.en.txt">NoTreasure.en.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/MaybeTreasure.en.txt">MaybeTreasure.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/hugo.png">hugo.png</a> (17 KB)</li>
</ul>
</div>
<h3 id="with-user-defined-color-and-font-awesome-brand-icon">With User-Defined Color and Font Awesome Brand Icon</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">resources</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;fuchsia&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;fa-fw fab fa-hackerrank&#34;</span> <span class="o">/%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="box attachments cstyle default" style="--VARIABLE-BOX-color: fuchsia;">
<div class="box-label">
<i class="fa-fw fab fa-hackerrank"></i> Attachments
</div>
<ul class="attachments-files box-content">
<li><a href="/hugo-theme-relearn/shortcodes/resources/hugo.png">hugo.png</a> (17 KB)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/MaybeTreasure.en.txt">MaybeTreasure.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/NoTreasure.en.txt">NoTreasure.en.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/Treasure.pir.txt">Treasure.pir.txt</a> (31 B)</li>
</ul>
</div>
<h3 id="expander-with-initially-hidden-resource-list">Expander with Initially Hidden Resource List</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">resources</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">expanded</span><span class="p">=</span><span class="s">&#34;false&#34;</span> <span class="o">/%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="expand box attachments cstyle primary">
<input type="checkbox" id="R-expand-1023f5676d41cbe35031106cc3da9a51" aria-controls="R-expandcontent-1023f5676d41cbe35031106cc3da9a51">
<label class="expand-label box-label" for="R-expand-1023f5676d41cbe35031106cc3da9a51">
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
<i class="expander-icon fa-fw fas fa-chevron-right"></i> <i class="fa-fw fas fa-paperclip"></i> Attachments
</label>
<div class="box-spacer"></div>
<ul id="R-expandcontent-1023f5676d41cbe35031106cc3da9a51" class="attachments-files box-content expand-content">
<li><a href="/hugo-theme-relearn/shortcodes/resources/hugo.png">hugo.png</a> (17 KB)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/MaybeTreasure.en.txt">MaybeTreasure.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/NoTreasure.en.txt">NoTreasure.en.txt</a> (23 B)</li>
<li><a href="/hugo-theme-relearn/shortcodes/resources/Treasure.pir.txt">Treasure.pir.txt</a> (31 B)</li>
</ul>
</div>
<h3 id="style-color-title-and-icons">Style, Color, Title and Icons</h3>
<p>For further examples for <strong>style</strong>, <strong>color</strong>, <strong>title</strong> and <strong>icon</strong>, see the <a href="/hugo-theme-relearn/shortcodes/notice/index.html"><code>notice</code> shortcode</a> documentation. The parameter are working the same way for both shortcodes, besides having different defaults.</p>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="siteparam">SiteParam</h1>
<p>The <code>siteparam</code> shortcode prints values of params contained in your <code>hugo.toml</code>.</p>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="shortcode-positional"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','shortcode-positional')"
>
<span class="tab-nav-text">shortcode (positional)</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">siteparam</span> <span class="nx">name</span><span class="p">=</span><span class="s">&#34;editURL&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="shortcode-positional"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">siteparam</span> <span class="s">&#34;editURL&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/siteparam.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;name&#34;</span> <span class="s">&#34;editURL&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>name</strong></td>
<td>1</td>
<td><em>&lt;empty&gt;</em></td>
<td>The name of the site param to be displayed.</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="editurl"><code>editURL</code></h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="s">`editURL`</span> <span class="nx">value</span><span class="p">:</span> <span class="p">{{</span><span class="o">%</span> <span class="nx">siteparam</span> <span class="nx">name</span><span class="p">=</span><span class="s">&#34;editURL&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p><code>editURL</code> value: <a href="https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/$%7BFilePath%7D" rel="external" target="_self">https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}</a></p>
<h3 id="nested-parameter-with-markdown-and-html-formatting">Nested Parameter with Markdown and HTML Formatting</h3>
<p>To use formatted parameter, add this in your <code>hugo.toml</code>:</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">hugo.</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">markup</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">renderer</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">unsafe</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">markup</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">goldmark</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">renderer</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">unsafe</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;markup&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;goldmark&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;renderer&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;unsafe&#34;</span><span class="p">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>Now values containing Markdown will be formatted correctly.</p>
<div class="tab-panel" data-tab-group="config-code">
<div class="tab-nav">
<div class="tab-nav-title">hugo.</div>
<button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
<span class="tab-nav-text">toml</span>
</button>
<button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
<span class="tab-nav-text">yaml</span>
</button>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
<span class="tab-nav-text">json</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">siteparam</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">siteparam</span><span class="p">.</span><span class="nx">test</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">text</span> <span class="p">=</span> <span class="s1">&#39;A **nested** parameter &lt;b&gt;with&lt;/b&gt; formatting&#39;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">siteparam</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">test</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">text</span><span class="p">:</span><span class="w"> </span><span class="l">A **nested** parameter &lt;b&gt;with&lt;/b&gt; formatting</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;params&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;siteparam&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;test&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&#34;text&#34;</span><span class="p">:</span> <span class="s2">&#34;A **nested** parameter \u003cb\u003ewith\u003c/b\u003e formatting&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="nx">Formatted</span> <span class="nx">parameter</span><span class="p">:</span> <span class="p">{{</span><span class="o">%</span> <span class="nx">siteparam</span> <span class="nx">name</span><span class="p">=</span><span class="s">&#34;siteparam.test.text&#34;</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<p>Formatted parameter: A <strong>nested</strong> option &lt;b&gt;with&lt;/b&gt; formatting</p>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="tab">Tab</h1>
<p>You can use a <code>tab</code> shortcode to display a single tab with a title.</p>
<div class="tab-panel" data-tab-group="ce4b7b3441490b6cc1c779b90cb27948">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="c"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('ce4b7b3441490b6cc1c779b90cb27948','c')"
>
<span class="tab-nav-text">c</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="c"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">printf</span><span class="p">(</span><span class="s2">&#34;Hello World!&#34;</span><span class="p">);</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;c&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```c
</span></span></span><span class="line"><span class="cl"><span class="s">printf(&#34;Hello World!&#34;);
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/tab.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;c&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="p">(</span><span class="s">&#34;```c\nprintf(\&#34;Hello World!\&#34;)\n```&#34;</span> <span class="p">|</span> <span class="p">.</span><span class="nx">RenderString</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>If you want multiple tabs grouped together you can wrap your tabs into the <a href="/hugo-theme-relearn/shortcodes/tabs/index.html"><code>tabs</code> shortcode</a>.</p>
<p>If you want further options when using a single code tab, you can also use the <a href="/hugo-theme-relearn/shortcodes/highlight/index.html"><code>highlight</code> shortcode</a>.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>style</strong></td>
<td>see notes</td>
<td>The style scheme used for the tab. If you don&rsquo;t set a style and you display a single code block inside of the tab, its default styling will adapt to that of a <code>code</code> block. Otherwise <code>default</code> is used.<br><br>- by severity: <code>caution</code>, <code>important</code>, <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>cyan</code>, <code>green</code>, <code>grey</code>, <code>magenta</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code><br><br>You can also <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">define your own styles</a>.</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>see notes</td>
<td>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value" rel="external" target="_self">CSS color value</a> to be used. If not set, the chosen color depends on the <strong>style</strong>. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td>see notes</td>
<td>Arbitrary title for the tab. Depending on the <strong>style</strong> there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no title for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><strong>icon</strong></td>
<td>see notes</td>
<td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> set to the left of the title. Depending on the <strong>style</strong> there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: <em>&lt;empty&gt;</em><br><br>If you want no icon for a severity style, you have to set this parameter to <code>&quot; &quot;</code> (a non empty string filled with spaces)</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary text to be displayed in the tab.</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="single-code-block-with-collapsed-margins">Single Code Block with Collapsed Margins</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Code&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```python
</span></span></span><span class="line"><span class="cl"><span class="s">printf(&#34;Hello World!&#34;);
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="tab-panel" data-tab-group="cf8a2d76ed5764356a1accb7e4dc4e70">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="code"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('cf8a2d76ed5764356a1accb7e4dc4e70','code')"
>
<span class="tab-nav-text">Code</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="code"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">printf</span><span class="p">(</span><span class="s2">&#34;Hello World!&#34;</span><span class="p">);</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="mixed-markdown-content">Mixed Markdown Content</h3>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;_**Mixed**_&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="nx">tab</span> <span class="nx">can</span> <span class="nx">not</span> <span class="nx">only</span> <span class="nx">contain</span> <span class="nx">code</span> <span class="nx">but</span> <span class="nx">arbitrary</span> <span class="nx">text</span><span class="p">.</span> <span class="nx">In</span> <span class="nx">this</span> <span class="k">case</span> <span class="nx">text</span> <span class="o">**</span><span class="nx">and</span><span class="o">**</span> <span class="nx">code</span> <span class="nx">will</span> <span class="nx">get</span> <span class="nx">a</span> <span class="nx">margin</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="s">```python
</span></span></span><span class="line"><span class="cl"><span class="s">printf(&#34;Hello World!&#34;);
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
<div class="tab-panel" data-tab-group="0ec8f997eaf53b1ace06fb268153447a">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="mixed"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('0ec8f997eaf53b1ace06fb268153447a','mixed')"
>
<span class="tab-nav-text"><em><strong>Mixed</strong></em></span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="mixed"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<p>A tab can not only contain code but arbitrary text. In this case text <strong>and</strong> code will get a margin.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">printf</span><span class="p">(</span><span class="s2">&#34;Hello World!&#34;</span><span class="p">);</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="understanding-style-and-color-behavior">Understanding <code>style</code> and <code>color</code> Behavior</h3>
<p>The <code>style</code> parameter affects how the <code>color</code> parameter is applied.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;just colored style&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">set</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">color</span> <span class="nx">style</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">style</span> <span class="nx">color</span> <span class="nx">as</span> <span class="nx">configured</span> <span class="nx">in</span> <span class="nx">your</span> <span class="nx">theme</span> <span class="nx">variant</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;just color&#34;</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">Only</span> <span class="nx">the</span> <span class="s">`color`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">set</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">CSS</span> <span class="nx">color</span> <span class="nx">value</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;default style and color&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;default&#34;</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">affects</span> <span class="nx">how</span> <span class="nx">the</span> <span class="s">`color`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">applied</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`default`</span> <span class="nx">style</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">your</span> <span class="s">`--MAIN-BG-color`</span> <span class="nx">as</span> <span class="nx">configured</span> <span class="k">for</span> <span class="nx">your</span> <span class="nx">theme</span> <span class="nx">variant</span> <span class="nx">resembling</span> <span class="nx">the</span> <span class="k">default</span> <span class="nx">style</span> <span class="nx">but</span> <span class="nx">with</span> <span class="nx">different</span> <span class="nx">color</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;just severity style&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">set</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">severity</span> <span class="nx">style</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">style</span> <span class="nx">color</span> <span class="nx">as</span> <span class="nx">configured</span> <span class="nx">in</span> <span class="nx">your</span> <span class="nx">theme</span> <span class="nx">variant</span> <span class="nx">and</span> <span class="nx">also</span> <span class="nx">affects</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">icon</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;severity style and color&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;info&#34;</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;blue&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">affects</span> <span class="nx">how</span> <span class="nx">the</span> <span class="s">`color`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">applied</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">CSS</span> <span class="nx">color</span> <span class="nx">value</span> <span class="nx">and</span> <span class="nx">also</span> <span class="nx">affects</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">icon</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<div class="tab-panel" data-tab-group="03aedc1763dffead3353f4581b0bd6a6">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="just-colored-style"
class="tab-nav-button tab-panel-style cstyle blue active" tabindex="-1"
onclick="switchTab('03aedc1763dffead3353f4581b0bd6a6','just-colored-style')"
>
<span class="tab-nav-text">just colored style</span>
</button>
<button
data-tab-item="just-color"
class="tab-nav-button tab-panel-style cstyle filled" style="--VARIABLE-BOX-color: blue;"
onclick="switchTab('03aedc1763dffead3353f4581b0bd6a6','just-color')"
>
<span class="tab-nav-text">just color</span>
</button>
<button
data-tab-item="default-style-and-color"
class="tab-nav-button tab-panel-style cstyle default" style="--VARIABLE-BOX-color: blue;"
onclick="switchTab('03aedc1763dffead3353f4581b0bd6a6','default-style-and-color')"
>
<span class="tab-nav-text">default style and color</span>
</button>
<button
data-tab-item="just-severity-stylefa-fw-fas-fa-info-circle"
class="tab-nav-button tab-panel-style cstyle info"
onclick="switchTab('03aedc1763dffead3353f4581b0bd6a6','just-severity-stylefa-fw-fas-fa-info-circle')"
>
<span class="tab-nav-text"><i class="fa-fw fas fa-info-circle"></i> just severity style</span>
</button>
<button
data-tab-item="severity-style-and-colorfa-fw-fas-fa-info-circle"
class="tab-nav-button tab-panel-style cstyle info" style="--VARIABLE-BOX-color: blue;"
onclick="switchTab('03aedc1763dffead3353f4581b0bd6a6','severity-style-and-colorfa-fw-fas-fa-info-circle')"
>
<span class="tab-nav-text"><i class="fa-fw fas fa-info-circle"></i> severity style and color</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="just-colored-style"
class="tab-content tab-panel-style cstyle blue active">
<div class="tab-content-text">
<p>The <code>style</code> parameter is set to a color style.</p>
<p>This will set the background to a lighter version of the chosen style color as configured in your theme variant.</p>
</div>
</div>
<div
data-tab-item="just-color"
class="tab-content tab-panel-style cstyle filled" style="--VARIABLE-BOX-color: blue;">
<div class="tab-content-text">
<p>Only the <code>color</code> parameter is set.</p>
<p>This will set the background to a lighter version of the chosen CSS color value.</p>
</div>
</div>
<div
data-tab-item="default-style-and-color"
class="tab-content tab-panel-style cstyle default" style="--VARIABLE-BOX-color: blue;">
<div class="tab-content-text">
<p>The <code>style</code> parameter affects how the <code>color</code> parameter is applied.</p>
<p>The <code>default</code> style will set the background to your <code>--MAIN-BG-color</code> as configured for your theme variant resembling the default style but with different color.</p>
</div>
</div>
<div
data-tab-item="just-severity-stylefa-fw-fas-fa-info-circle"
class="tab-content tab-panel-style cstyle info">
<div class="tab-content-text">
<p>The <code>style</code> parameter is set to a severity style.</p>
<p>This will set the background to a lighter version of the chosen style color as configured in your theme variant and also affects the chosen icon.</p>
</div>
</div>
<div
data-tab-item="severity-style-and-colorfa-fw-fas-fa-info-circle"
class="tab-content tab-panel-style cstyle info" style="--VARIABLE-BOX-color: blue;">
<div class="tab-content-text">
<p>The <code>style</code> parameter affects how the <code>color</code> parameter is applied.</p>
<p>This will set the background to a lighter version of the chosen CSS color value and also affects the chosen icon.</p>
</div>
</div>
</div>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
<article class="default">
<header class="headline">
</header>
<h1 id="tabs">Tabs</h1>
<p>The <code>tabs</code> shortcode displays arbitrary content in an unlimited number of tabs.</p>
<div class="tab-panel" data-tab-group="cacd1b04dd8ecc85a40fa264508d31f2">
<div class="tab-nav">
<div class="tab-nav-title">hello.</div>
<button
data-tab-item="py"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('cacd1b04dd8ecc85a40fa264508d31f2','py')"
>
<span class="tab-nav-text">py</span>
</button>
<button
data-tab-item="sh"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('cacd1b04dd8ecc85a40fa264508d31f2','sh')"
>
<span class="tab-nav-text">sh</span>
</button>
<button
data-tab-item="c"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('cacd1b04dd8ecc85a40fa264508d31f2','c')"
>
<span class="tab-nav-text">c</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="py"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;Hello World!&#34;</span><span class="p">)</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="sh"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;Hello World!&#34;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="c"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="nf">printf</span><span class="p">(</span><span class="s">&#34;Hello World!&#34;</span><span class="p">);</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h2 id="usage">Usage</h2>
<div class="tab-panel" data-tab-group="shortcode-parameter">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="shortcode"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('shortcode-parameter','shortcode')"
>
<span class="tab-nav-text">shortcode</span>
</button>
<button
data-tab-item="partial"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('shortcode-parameter','partial')"
>
<span class="tab-nav-text">partial</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="shortcode"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;hello.&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;py&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```python
</span></span></span><span class="line"><span class="cl"><span class="s">print(&#34;Hello World!&#34;)
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;sh&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```bash
</span></span></span><span class="line"><span class="cl"><span class="s">echo &#34;Hello World!&#34;
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;c&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```c
</span></span></span><span class="line"><span class="cl"><span class="s">printf&#34;Hello World!&#34;);
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="partial"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;shortcodes/tabs.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;hello.&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="p">(</span><span class="nf">slice</span>
</span></span><span class="line"><span class="cl"> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;py&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="p">(</span><span class="s">&#34;```python\nprint(\&#34;Hello World!\&#34;)\n```&#34;</span> <span class="p">|</span> <span class="p">.</span><span class="nx">RenderString</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;sh&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="p">(</span><span class="s">&#34;```bash\necho \&#34;Hello World!\&#34;\n```&#34;</span> <span class="p">|</span> <span class="p">.</span><span class="nx">RenderString</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;title&#34;</span> <span class="s">&#34;c&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;content&#34;</span> <span class="p">(</span><span class="s">&#34;```c\nprintf(\&#34;Hello World!\&#34;);\n```&#34;</span> <span class="p">|</span> <span class="p">.</span><span class="nx">RenderString</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="p">)</span>
</span></span><span class="line"><span class="cl"> <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<p>If you just want a single tab you can instead call the <a href="/hugo-theme-relearn/shortcodes/tab/index.html"><code>tab</code> shortcode</a> standalone.</p>
<p>Also follow the above link to see the parameter for a nested tab.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>groupid</strong></td>
<td><em>&lt;random&gt;</em></td>
<td>Arbitrary name of the group the tab view belongs to.<br><br>Tab views with the same <strong>groupid</strong> sychronize their selected tab. The tab selection is restored automatically based on the <code>groupid</code> for tab view. If the selected tab can not be found in a tab group the first tab is selected instead.<br><br>This sychronization applies to the whole site!</td>
</tr>
<tr>
<td><strong>style</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Sets a default value for every contained tab. Can be overridden by each tab. See the <a href="/hugo-theme-relearn/shortcodes/tab/index.html#parameter"><code>tab</code> shortcode</a> for possible values.</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Sets a default value for every contained tab. Can be overridden by each tab. See the <a href="/hugo-theme-relearn/shortcodes/tab/index.html#parameter"><code>tab</code> shortcode</a> for possible values.</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary title written in front of the tab view.</td>
</tr>
<tr>
<td><strong>icon</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> set to the left of the title.</td>
</tr>
<tr>
<td><em><strong>&lt;content&gt;</strong></em></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary number of tabs defined with the <code>tab</code> sub-shortcode.</td>
</tr>
</tbody>
</table>
<h2 id="examples">Examples</h2>
<h3 id="behavior-of-the-groupid">Behavior of the <code>groupid</code></h3>
<p>See what happens to the tab views while you select different tabs.</p>
<p>While pressing a tab of Group A switches all tab views of Group A in sync (if the tab is available), the tabs of Group B are left untouched.</p>
<div class="tab-panel" data-tab-group="66953c2275dffc87429a13cdc80fdbc4">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="group-a-tab-view-1"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('66953c2275dffc87429a13cdc80fdbc4','group-a-tab-view-1')"
>
<span class="tab-nav-text">Group A, Tab View 1</span>
</button>
<button
data-tab-item="group-a-tab-view-2"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('66953c2275dffc87429a13cdc80fdbc4','group-a-tab-view-2')"
>
<span class="tab-nav-text">Group A, Tab View 2</span>
</button>
<button
data-tab-item="group-b"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('66953c2275dffc87429a13cdc80fdbc4','group-b')"
>
<span class="tab-nav-text">Group B</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="group-a-tab-view-1"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="nx">groupid</span><span class="p">=</span><span class="s">&#34;a&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;json&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="nx">json</span> <span class="s">&#34;linenos=true&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{</span> <span class="s">&#34;Hello&#34;</span><span class="p">:</span> <span class="s">&#34;World&#34;</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;_**XML**_ stuff&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```xml
</span></span></span><span class="line"><span class="cl"><span class="s">&lt;Hello&gt;World&lt;/Hello&gt;
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;text&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="nx">Hello</span> <span class="nx">World</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="group-a-tab-view-2"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="nx">groupid</span><span class="p">=</span><span class="s">&#34;a&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;json&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="nx">json</span> <span class="s">&#34;linenos=true&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{</span> <span class="s">&#34;Hello&#34;</span><span class="p">:</span> <span class="s">&#34;World&#34;</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;XML stuff&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```xml
</span></span></span><span class="line"><span class="cl"><span class="s">&lt;Hello&gt;World&lt;/Hello&gt;
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="group-b"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="nx">groupid</span><span class="p">=</span><span class="s">&#34;b&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;json&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">highlight</span> <span class="nx">json</span> <span class="s">&#34;linenos=true&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{</span> <span class="s">&#34;Hello&#34;</span><span class="p">:</span> <span class="s">&#34;World&#34;</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">highlight</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;XML stuff&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="s">```xml
</span></span></span><span class="line"><span class="cl"><span class="s">&lt;Hello&gt;World&lt;/Hello&gt;
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h4 id="group-a-tab-view-1">Group A, Tab View 1</h4>
<div class="tab-panel" data-tab-group="tab-example-a">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('tab-example-a','json')"
>
<span class="tab-nav-text">json</span>
</button>
<button
data-tab-item="xml-stuff"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('tab-example-a','xml-stuff')"
>
<span class="tab-nav-text"><em><strong>XML</strong></em> stuff</span>
</button>
<button
data-tab-item="text"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('tab-example-a','text')"
>
<span class="tab-nav-text">text</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code" linenos="true"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="ln">1</span><span class="cl"><span class="p">{</span> <span class="nt">&#34;Hello&#34;</span><span class="p">:</span> <span class="s2">&#34;World&#34;</span> <span class="p">}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="xml-stuff"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;Hello&gt;</span>World<span class="nt">&lt;/Hello&gt;</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="text"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<pre><code>Hello World
</code></pre>
</div>
</div>
</div>
</div>
<h4 id="group-a-tab-view-2">Group A, Tab View 2</h4>
<div class="tab-panel" data-tab-group="tab-example-a">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('tab-example-a','json')"
>
<span class="tab-nav-text">json</span>
</button>
<button
data-tab-item="xml-stuff"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('tab-example-a','xml-stuff')"
>
<span class="tab-nav-text">XML stuff</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code" linenos="true"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="ln">1</span><span class="cl"><span class="p">{</span> <span class="nt">&#34;Hello&#34;</span><span class="p">:</span> <span class="s2">&#34;World&#34;</span> <span class="p">}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="xml-stuff"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;Hello&gt;</span>World<span class="nt">&lt;/Hello&gt;</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h4 id="group-b">Group B</h4>
<div class="tab-panel" data-tab-group="tab-example-b">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('tab-example-b','json')"
>
<span class="tab-nav-text">json</span>
</button>
<button
data-tab-item="xml-stuff"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('tab-example-b','xml-stuff')"
>
<span class="tab-nav-text">XML stuff</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code" linenos="true"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="ln">1</span><span class="cl"><span class="p">{</span> <span class="nt">&#34;Hello&#34;</span><span class="p">:</span> <span class="s2">&#34;World&#34;</span> <span class="p">}</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="xml-stuff"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;Hello&gt;</span>World<span class="nt">&lt;/Hello&gt;</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
<h3 id="nested-tab-views-and-color">Nested Tab Views and Color</h3>
<p>In case you want to nest tab views, the parent tab that contains nested tab views needs to be declared with <code>{{&lt; tab &gt;}}</code> instead of <code>{{% tab %}}</code>. Note, that in this case it is not possible to put markdown in the parent tab.</p>
<p>You can also set style and color parameter for all tabs and overwrite them on tab level. See the <a href="/hugo-theme-relearn/shortcodes/tab/index.html#parameter"><code>tab</code> shortcode</a> for possible values.</p>
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="nx">groupid</span><span class="p">=</span><span class="s">&#34;main&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;primary&#34;</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Rationale&#34;</span> <span class="nx">icon</span><span class="p">=</span><span class="s">&#34;thumbtack&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Text&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"> <span class="nx">Simple</span> <span class="nx">text</span> <span class="nx">is</span> <span class="nx">possible</span> <span class="nx">here</span><span class="o">...</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="nx">groupid</span><span class="p">=</span><span class="s">&#34;tabs-example-language&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;python&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="nx">Python</span> <span class="nx">is</span> <span class="o">**</span><span class="nx">super</span><span class="o">**</span> <span class="nx">easy</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="o">-</span> <span class="nx">most</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">time</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="o">-</span> <span class="k">if</span> <span class="nx">you</span> <span class="nx">don</span><span class="err">&#39;</span><span class="nx">t</span> <span class="nx">want</span> <span class="nx">to</span> <span class="nx">output</span> <span class="nx">unicode</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;bash&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="nx">Bash</span> <span class="nx">is</span> <span class="k">for</span> <span class="o">**</span><span class="nx">hackers</span><span class="o">**</span><span class="p">.</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tab</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;Code&#34;</span> <span class="nx">style</span><span class="p">=</span><span class="s">&#34;default&#34;</span> <span class="nx">color</span><span class="p">=</span><span class="s">&#34;darkorchid&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"> <span class="o">...</span><span class="nx">but</span> <span class="nx">no</span> <span class="nx">markdown</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{&lt;</span> <span class="nx">tabs</span> <span class="nx">groupid</span><span class="p">=</span><span class="s">&#34;tabs-example-language&#34;</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;python&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="s">```python
</span></span></span><span class="line"><span class="cl"><span class="s"> print(&#34;Hello World!&#34;)
</span></span></span><span class="line"><span class="cl"><span class="s"> ```</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">&#34;bash&#34;</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="s">```bash
</span></span></span><span class="line"><span class="cl"><span class="s"> echo &#34;Hello World!&#34;
</span></span></span><span class="line"><span class="cl"><span class="s"> ```</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span>
</span></span><span class="line"><span class="cl"> <span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tab</span> <span class="p">&gt;}}</span>
</span></span><span class="line"><span class="cl"><span class="p">{{&lt;</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">&gt;}}</span></span></span></code></pre></div>
<div class="tab-panel" data-tab-group="main">
<div class="tab-nav">
<div class="tab-nav-title"><i class="fa-fw fas fa-thumbtack"></i> Rationale</div>
<button
data-tab-item="text"
class="tab-nav-button tab-panel-style cstyle primary active" tabindex="-1"
onclick="switchTab('main','text')"
>
<span class="tab-nav-text">Text</span>
</button>
<button
data-tab-item="code"
class="tab-nav-button tab-panel-style cstyle default" style="--VARIABLE-BOX-color: darkorchid;"
onclick="switchTab('main','code')"
>
<span class="tab-nav-text">Code</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="text"
class="tab-content tab-panel-style cstyle primary active">
<div class="tab-content-text">
<p>
Simple text is possible here...
<div class="tab-panel" data-tab-group="tabs-example-language">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="python"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('tabs-example-language','python')"
>
<span class="tab-nav-text">python</span>
</button>
<button
data-tab-item="bash"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('tabs-example-language','bash')"
>
<span class="tab-nav-text">bash</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="python"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<p>Python is <strong>super</strong> easy.</p>
<ul>
<li>most of the time.</li>
<li>if you don&rsquo;t want to output unicode</li>
</ul>
</div>
</div>
<div
data-tab-item="bash"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<p>Bash is for <strong>hackers</strong>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
data-tab-item="code"
class="tab-content tab-panel-style cstyle default" style="--VARIABLE-BOX-color: darkorchid;">
<div class="tab-content-text">
<p>
...but no markdown
<div class="tab-panel" data-tab-group="tabs-example-language">
<div class="tab-nav">
<div class="tab-nav-title">&#8203;</div>
<button
data-tab-item="python"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('tabs-example-language','python')"
>
<span class="tab-nav-text">python</span>
</button>
<button
data-tab-item="bash"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('tabs-example-language','bash')"
>
<span class="tab-nav-text">bash</span>
</button>
</div>
<div class="tab-content-container">
<div
data-tab-item="python"
class="tab-content tab-panel-style cstyle initial active">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="nb">print</span><span class="p">(</span><span class="s2">&#34;Hello World!&#34;</span><span class="p">)</span></span></span></code></pre></div>
</div>
</div>
<div
data-tab-item="bash"
class="tab-content tab-panel-style cstyle initial">
<div class="tab-content-text">
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;Hello World!&#34;</span></span></span></code></pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footline">
<div class="R-taxonomy taxonomy-categories cstyle" title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li>
<li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li>
</ul>
</div>
</footer>
</article>
</section>
</div>
</main>
</div>
<script src="/hugo-theme-relearn/js/clipboard.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/perfect-scrollbar.min.js?1729780238" defer></script>
<script>
function useMathJax( config ){
window.MathJax = Object.assign( window.MathJax || {}, {
tex: {
inlineMath: [['\\(', '\\)'], ['$', '$']],
displayMath: [['\\[', '\\]'], ['$$', '$$']],
},
options: {
enableMenu: false
}
}, config );
}
useMathJax( JSON.parse("{}") );
</script>
<script id="MathJax-script" async src="/hugo-theme-relearn/js/mathjax/tex-mml-chtml.js?1729780238"></script>
<script src="/hugo-theme-relearn/js/d3/d3-color.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-dispatch.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-drag.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-ease.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-interpolate.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-selection.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-timer.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-transition.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/d3/d3-zoom.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/js-yaml.min.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/mermaid.min.js?1729780238" defer></script>
<script>
window.themeUseMermaid = JSON.parse("{ \"securityLevel\": \"loose\" }");
</script>
<script src="/hugo-theme-relearn/js/js-yaml.min.js?1729780238" defer></script>
<script>window.noZensmooth = true;</script>
<script src="/hugo-theme-relearn/js/swagger-ui/swagger-ui-bundle.js?1729780238" defer></script>
<script src="/hugo-theme-relearn/js/swagger-ui/swagger-ui-standalone-preset.js?1729780238" defer></script>
<script>
window.themeUseOpenapi = { css: "/js/swagger-ui/swagger-ui.css?1729780238", cssInProject: true, assetsBuster: "?1729780238" };
</script>
<script src="/hugo-theme-relearn/js/theme.js?1729780238" defer></script>
</body>
</html>