2022-04-02 13:30:16 +00:00
<!DOCTYPE html>
2022-11-01 01:10:49 +00:00
< html lang = "en" dir = "ltr" >
2022-04-02 13:30:16 +00:00
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0" >
2022-11-17 21:58:05 +00:00
< meta name = "generator" content = "Hugo 0.106.0" >
2022-11-10 09:09:19 +00:00
< meta name = "generator" content = "Relearn 5.5.3+tip" >
2022-04-02 13:30:16 +00:00
< meta name = "description" content = "Documentation for Hugo Relearn Theme" >
< meta name = "author" content = "Sören Weber" >
< title > Shortcodes :: Hugo Relearn Theme< / title >
2022-11-15 06:35:08 +00:00
< link href = "https://McShelby.github.io/hugo-theme-relearn/shortcodes/index.html" rel = "canonical" type = "text/html" title = "Shortcodes :: Hugo Relearn Theme" >
2022-11-06 00:38:34 +00:00
< link href = "../shortcodes/index.xml" rel = "alternate" type = "application/rss+xml" title = "Shortcodes :: Hugo Relearn Theme" >
2022-11-18 20:10:44 +00:00
< link href = "../images/logo.svg?1668802238" rel = "icon" type = "image/svg+xml" >
2022-07-15 13:20:02 +00:00
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how - to - use -->
2022-11-18 20:10:44 +00:00
< link href = "../css/fontawesome-all.min.css?1668802240" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/fontawesome-all.min.css?1668802240" rel = "stylesheet" > < / noscript >
< link href = "../css/featherlight.min.css?1668802240" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/featherlight.min.css?1668802240" rel = "stylesheet" > < / noscript >
< link href = "../css/auto-complete.css?1668802240" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/auto-complete.css?1668802240" rel = "stylesheet" > < / noscript >
< link href = "../css/perfect-scrollbar.min.css?1668802240" rel = "stylesheet" >
< link href = "../css/nucleus.css?1668802240" rel = "stylesheet" >
< link href = "../css/fonts.css?1668802240" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/fonts.css?1668802240" rel = "stylesheet" > < / noscript >
< link href = "../css/theme.css?1668802240" rel = "stylesheet" >
< link href = "../css/theme-relearn-light.css?1668802240" rel = "stylesheet" id = "variant-style" >
< link href = "../css/ie.css?1668802240" rel = "stylesheet" >
< link href = "../css/variant.css?1668802240" rel = "stylesheet" >
< link href = "../css/print.css?1668802240" rel = "stylesheet" media = "print" >
< link href = "../css/format-print.css?1668802240" rel = "stylesheet" >
< script src = "../js/url.js?1668802240" > < / script >
< script src = "../js/variant.js?1668802240" > < / script >
2022-04-02 13:30:16 +00:00
< script >
// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:
// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72
2022-11-05 23:35:48 +00:00
window.index_js_url="../index.search.js";
var root_url="../";
2022-04-02 13:30:16 +00:00
var baseUri=root_url.replace(/\/$/, '');
// 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!';
2022-11-17 21:13:11 +00:00
window.T_No_results_found = 'No results found for \u0022{0}\u0022';
window.T_N_results_found = '{1} results found for \u0022{0}\u0022';
2022-04-02 13:30:16 +00:00
// some further base stuff
var baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
2022-07-14 20:20:11 +00:00
window.variants & & variants.init( [ 'relearn-light', 'relearn-dark', 'learn', 'neon', 'blue', 'green', 'red' ] );
2022-04-02 13:30:16 +00:00
< / script >
2022-11-18 20:10:44 +00:00
< script src = "../js/jquery.min.js?1668802240" defer > < / script >
2022-04-02 13:30:16 +00:00
< / head >
2022-11-15 06:35:08 +00:00
< body class = "mobile-support print disableInlineCopyToClipboard" data-url = "../shortcodes/index.html" >
2022-04-02 13:30:16 +00:00
< div id = "body" class = "default-animation" >
< div id = "sidebar-overlay" > < / div >
< div id = "toc-overlay" > < / div >
2022-11-07 19:58:08 +00:00
< nav id = "topbar" class = "highlightable" dir = "ltr" >
2022-04-02 13:30:16 +00:00
< div >
< div id = "breadcrumbs" >
< span id = "sidebar-toggle-span" >
2022-10-08 20:51:04 +00:00
< a href = "#" id = "sidebar-toggle" title = 'Menu (CTRL+ALT+n)' > < i class = "fas fa-bars fa-fw" > < / i > < / a >
2022-04-02 13:30:16 +00:00
< / span >
< ol class = "links" itemscope itemtype = "http://schema.org/BreadcrumbList" >
2022-11-05 23:35:48 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < a itemprop = "item" href = "../index.html" > < span itemprop = "name" > Hugo Relearn Theme< / span > < / a > < meta itemprop = "position" content = "1" > > < / li >
2022-10-02 22:25:49 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < span itemprop = "name" > Shortcodes< / span > < meta itemprop = "position" content = "2" > < / li >
2022-04-02 13:30:16 +00:00
< / ol >
< / div >
< / div >
< / nav >
2022-07-05 22:16:52 +00:00
< main id = "body-inner" class = "highlightable chapter narrow" tabindex = "-1" >
2022-04-02 13:30:16 +00:00
< div class = "flex-block-wrapper" >
< div id = "head-tags" >
< / div >
2022-11-07 19:58:08 +00:00
< article class = "chapter" >
2022-07-05 22:16:52 +00:00
< div class = "article-subheading" > Chapter 3< / div >
2022-11-13 21:34:47 +00:00
< h1 id = "shortcodes" > Shortcodes< / h1 >
2022-04-02 13:30:16 +00:00
< p > Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’ t support well. You could use pure HTML to expand possibilities.< / p >
< p > But this happens to be a bad idea. Everyone uses Markdown because it’ s pure and simple to read even non-rendered. You should avoid HTML to keep it as simple as possible.< / p >
< p > To avoid this limitations, Hugo created < a href = "https://gohugo.io/extras/shortcodes/" > shortcodes< / a > . A shortcode is a simple snippet inside a page.< / p >
< p > The Relearn theme provides multiple shortcodes on top of existing ones.< / p >
< div class = "children children-h2 children-sort-" >
2022-11-08 14:43:28 +00:00
< h2 > < a href = "../shortcodes/attachments/index.html" > Attachments< / a > < / h2 > < p > List of files attached to a page< / p >
< h2 > < a href = "../shortcodes/button/index.html" > Button< / a > < / h2 > < p > Clickable buttons< / p >
< h2 > < a href = "../shortcodes/children/index.html" > Children< / a > < / h2 > < p > List the child pages of a page< / p >
< h2 > < a href = "../shortcodes/expand/index.html" > Expand< / a > < / h2 > < p > Expandable/collapsible sections of text< / p >
< h2 > < a href = "../shortcodes/include/index.html" > Include< / a > < / h2 > < p > Displays content from other files< / p >
< h2 > < a href = "../shortcodes/math/index.html" > Math< / a > < / h2 > < p > Beautiful math and chemical formulae< / p >
< h2 > < a href = "../shortcodes/mermaid/index.html" > Mermaid< / a > < / h2 > < p > Generate diagrams and flowcharts from text< / p >
< h2 > < a href = "../shortcodes/notice/index.html" > Notice< / a > < / h2 > < p > Disclaimers to help you structure your page< / p >
< h2 > < a href = "../shortcodes/siteparam/index.html" > Site param< / a > < / h2 > < p > Get value of site params< / p >
< h2 > < a href = "../shortcodes/swagger/index.html" > Swagger< / a > < / h2 > < p > UI for your Swagger / OpenAPI Specifications< / p >
< h2 > < a href = "../shortcodes/tabs/index.html" > Tabbed views< / a > < / h2 > < p > Show content in tabbed views< / p >
2022-04-02 13:30:16 +00:00
< / div >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< section >
2022-10-07 18:46:19 +00:00
< h1 class = "a11y-only" > Subsections of Shortcodes< / h1 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "attachments" > Attachments< / h1 >
2022-07-05 22:16:52 +00:00
2022-05-25 21:31:08 +00:00
< p > The < code > attachments< / code > shortcode displays a list of files attached to a page with adjustable color, title and icon.< / p >
2022-04-02 13:30:16 +00:00
2022-05-29 21:00:53 +00:00
< div class = "box attachments cstyle transparent" >
< div class = "box-label" > < i class = "fa-fw fas fa-paperclip" > < / i > Attachments< / div >
2022-04-02 13:30:16 +00:00
< ul class = "box-content attachments-files" >
2022-11-05 23:35:48 +00:00
< li > < a href = "../shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf" > adivorciarsetoca00cape.pdf< / a > (361 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/BachGavotteShort.mp3" > BachGavotteShort.mp3< / a > (357 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf" > Carroll_AliceAuPaysDesMerveilles.pdf< / a > (175 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/hugo.png" > hugo.png< / a > (17 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/hugo.txt" > hugo.txt< / a > (20 B)< / li >
< li > < a href = "../shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4" > movieselectricsheep-flock-244-32500-2.mp4< / a > (340 KB)< / li >
2022-04-02 13:30:16 +00:00
< / ul >
< / div >
2022-06-22 22:08:50 +00:00
2022-04-02 13:30:16 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.< / p >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="shortcode"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
< div class = "highlight" > < 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" > attachments< / span > < span class = "nx" > sort< / span > < span class = "p" > =< / span > < span class = "s" > " asc" < / span > < span class = "o" > /%< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/attachments.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " sort" < / span > < span class = "s" > " asc" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
2022-10-31 14:06:51 +00:00
< p > The shortcode lists files found in a specific folder.< / p >
2022-06-05 17:32:37 +00:00
< p > Currently, it supports two implementations for pages< / p >
2022-04-02 13:30:16 +00:00
< ol >
< li >
2022-10-31 14:06:51 +00:00
< p > If your page is a Markdown file, attachments must be placed in a folder named like your page and ending with < code > .files< / code > .< / p >
2022-04-02 13:30:16 +00:00
< blockquote >
< ul >
< li > content
< ul >
< li > _index.md< / li >
2022-06-05 17:32:37 +00:00
< li > < strong > page.files< / strong >
2022-04-02 13:30:16 +00:00
< ul >
< li > attachment.pdf< / li >
< / ul >
< / li >
< li > page.md< / li >
< / ul >
< / li >
< / ul >
< / blockquote >
< / li >
< li >
2022-10-31 14:06:51 +00:00
< p > If your page is a folder, attachments must be placed in a nested < code > files< / code > folder.< / p >
2022-04-02 13:30:16 +00:00
< blockquote >
< ul >
< li > content
< ul >
< li > _index.md< / li >
< li > page
< ul >
< li > index.md< / li >
2022-06-05 17:32:37 +00:00
< li > < strong > files< / strong >
2022-04-02 13:30:16 +00:00
< ul >
< li > attachment.pdf< / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< / ul >
< / blockquote >
< / li >
< / ol >
< p > Be aware that if you use a multilingual website, you will need to have as many folders as languages.< / p >
2022-05-25 21:31:08 +00:00
< h3 id = "parameter" > Parameter< / h3 >
2022-04-02 13:30:16 +00:00
< table >
< thead >
< tr >
2022-05-25 21:31:08 +00:00
< th style = "text-align:left" > Name< / th >
2022-04-02 13:30:16 +00:00
< th style = "text-align:left" > Default< / th >
2022-05-25 21:31:08 +00:00
< th style = "text-align:left" > Notes< / th >
2022-04-02 13:30:16 +00:00
< / tr >
< / thead >
< tbody >
< tr >
2022-05-25 21:31:08 +00:00
< td style = "text-align:left" > < strong > style< / strong > < / td >
< td style = "text-align:left" > < code > transparent< / code > < / td >
2022-10-02 22:25:49 +00:00
< td style = "text-align:left" > The color scheme used to highlight the box content.< br > < br > - by severity: < code > info< / code > , < code > note< / code > , < code > tip< / code > , < code > warning< / code > < nd color: < code > primary< / code > , < code > secondary< / code > < br > - by color: < code > blue< / code > , < code > green< / code > , < code > grey< / code > , < code > orange< / code > , < code > red< / code > < br > - by special color: < code > default< / code > ,t`< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-05-25 21:31:08 +00:00
< td style = "text-align:left" > < strong > title< / strong > < / td >
< td style = "text-align:left" > see notes< / td >
2022-10-31 14:06:51 +00:00
< td style = "text-align:left" > Arbitrary text for the box title. Depending on the < strong > style< / strong > there may be a default title. Any given value will overwault.< br > < br > - for severity styles: the matching title for the severity< br > - for all other colors: < code > Attachments< / code > < br > < br > If you wa you have to set this parameter to < code > " " < / code > (a non empty string filled with spaces)< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-05-25 21:31:08 +00:00
< td style = "text-align:left" > < strong > icon< / strong > < / td >
< td style = "text-align:left" > see notes< / td >
2022-11-05 23:35:48 +00:00
< td style = "text-align:left" > < a href = "../cont/icons/#finding-an-icon" > Font Awesome icon name< / a > set to the left of the title. Depending le** there may be a default icon. Any given value will overwrite the default.< br > < br > - for severity styles: a nice matching iseverity< br > - for all other colors: < code > paperclip< / code > < br > < br > If you want no icon, you have to set this parameter to < code > " " < / code > (a non empty d with spaces)< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-05-25 21:31:08 +00:00
< td style = "text-align:left" > < strong > sort< / strong > < / td >
< td style = "text-align:left" > < code > asc< / code > < / td >
< td style = "text-align:left" > Sorting the output in < code > asc< / code > ending or < code > desc< / code > ending order.< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-05-25 21:31:08 +00:00
< td style = "text-align:left" > < strong > pattern< / strong > < / td >
< td style = "text-align:left" > < code > .*< / code > < / td >
2022-10-02 22:25:49 +00:00
< td style = "text-align:left" > A < a href = "https://en.wikipedia.org/wiki/Regular_expression" > regular expressions< / a > , used to filter the attachments by file name. For example:< br > < br > - to match a file suffix of ‘ jpg’ , 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 >
2022-04-02 13:30:16 +00:00
< / tr >
< / tbody >
< / table >
2022-05-25 21:31:08 +00:00
< h2 id = "examples" > Examples< / h2 >
2022-06-05 17:32:37 +00:00
< h3 id = "custom-title-list-of-attachments-ending-in-pdf-or-mp4" > Custom Title, List of Attachments Ending in pdf or mp4< / h3 >
< div class = "highlight" > < 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" > attachments< / span > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s" > " Related files" < / span > < span class = "nx" > pattern< / span > < span class = "p" > =< / span > < span class = "s" > " .*(pdf|mp4)" < / span > < span class = "o" > /%< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< div class = "box attachments cstyle transparent" >
< div class = "box-label" > < i class = "fa-fw fas fa-paperclip" > < / i > Related files< / div >
2022-04-02 13:30:16 +00:00
< ul class = "box-content attachments-files" >
2022-11-05 23:35:48 +00:00
< li > < a href = "../shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf" > adivorciarsetoca00cape.pdf< / a > (361 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf" > Carroll_AliceAuPaysDesMerveilles.pdf< / a > (175 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4" > movieselectricsheep-flock-244-32500-2.mp4< / a > (340 KB)< / li >
2022-04-02 13:30:16 +00:00
< / ul >
< / div >
2022-06-22 22:08:50 +00:00
2022-06-05 17:32:37 +00:00
< h3 id = "info-styled-box-descending-sort-order" > Info Styled Box, Descending Sort Order< / h3 >
< div class = "highlight" > < 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" > attachments< / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " info" < / span > < span class = "nx" > sort< / span > < span class = "p" > =< / span > < span class = "s" > " desc" < / span > < span class = "o" > /%< / span > < span class = "p" > }}< / span >
2022-05-25 21:31:08 +00:00
< / span > < / span > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< div class = "box attachments cstyle info" >
< div class = "box-label" > < i class = "fa-fw fas fa-info-circle" > < / i > Info< / div >
2022-04-02 13:30:16 +00:00
< ul class = "box-content attachments-files" >
2022-11-05 23:35:48 +00:00
< li > < a href = "../shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4" > movieselectricsheep-flock-244-32500-2.mp4< / a > (340 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/hugo.txt" > hugo.txt< / a > (20 B)< / li >
< li > < a href = "../shortcodes/attachments.en.files/hugo.png" > hugo.png< / a > (17 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf" > Carroll_AliceAuPaysDesMerveilles.pdf< / a > (175 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/BachGavotteShort.mp3" > BachGavotteShort.mp3< / a > (357 KB)< / li >
< li > < a href = "../shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf" > adivorciarsetoca00cape.pdf< / a > (361 KB)< / li >
2022-04-02 13:30:16 +00:00
< / ul >
< / div >
2022-06-22 22:08:50 +00:00
2022-06-05 17:32:37 +00:00
< h3 id = "style-and-icons" > Style and Icons< / h3 >
2022-11-05 23:35:48 +00:00
< p > For further examples for < strong > style< / strong > , < strong > title< / strong > and < strong > icon< / strong > , see the < a href = "../shortcodes/notice/" > < code > notice< / code > shortcode< / a > documentation. The parameter are working the same way for both shortcodes, besides having different defaults.< / p >
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "button" > Button< / h1 >
2022-07-05 22:16:52 +00:00
2022-05-29 21:00:53 +00:00
< p > The < code > button< / code > shortcode displays a clickable button with adjustable color, title and icon.< / p >
< p >
< span class = "btn cstyle transparent" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span >
< span class = "btn cstyle warning" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-dragon" > < / i >
Get Hugo
< / a >
< / span > < / p >
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.< / p >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="shortcode"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " https://gohugo.io/" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " warning" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " dragon" < / 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 >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/button.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " href" < / span > < span class = "s" > " https://gohugo.io/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "s" > " Get Hugo" < / 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" > " shortcodes/button.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " href" < / span > < span class = "s" > " https://gohugo.io/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " style" < / span > < span class = "s" > " warning" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " icon" < / span > < span class = "s" > " dragon" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "s" > " Get Hugo" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
< p > Once the button is clicked, it opens another browser tab for the given URL.< / p >
2022-06-05 17:32:37 +00:00
< h3 id = "parameter" > Parameter< / h3 >
2022-05-29 21:00:53 +00:00
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > href< / strong > < / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
< td style = "text-align:left" > The destination URL for the button. If this parameter is not set, the button will do nothing but is still displayed as clickable.< / td >
< / tr >
< tr >
< td style = "text-align:left" > < strong > style< / strong > < / td >
< td style = "text-align:left" > < code > transparent< / code > < / td >
2022-10-02 22:25:49 +00:00
< td style = "text-align:left" > The color scheme used to paint the button.< br > < br > - by severity: < code > info< / code > , < code > note< / code > , < code > tip< / code > , < code > warning< / code > < br > - by brand color: < code > primary< / code > , < code > secondary< / code > < br > - by color: < code > blue< / code > , < code > green< / code > , < code > grey< / code > , < code > orange< / code > , < code > red< / code > < br > - by special color: < code > default< / code > , < code > transparent< / code > < / td >
2022-05-29 21:00:53 +00:00
< / tr >
< tr >
< td style = "text-align:left" > < strong > icon< / strong > < / td >
< td style = "text-align:left" > see notes< / td >
2022-11-05 23:35:48 +00:00
< td style = "text-align:left" > < a href = "../cont/icons/#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 colors: < em > < empty> < / em > < br > < br > If you want no icon for a severity style, you have to set this parameter to < code > " " < / code > (a non empty string filled with spaces)< / td >
2022-05-29 21:00:53 +00:00
< / tr >
< tr >
< td style = "text-align:left" > < strong > iconposition< / strong > < / td >
< td style = "text-align:left" > < code > left< / code > < / td >
< td style = "text-align:left" > Places the icon to the < code > left< / code > or < code > right< / code > of the title.< / td >
< / tr >
< tr >
2022-10-31 20:10:53 +00:00
< td style = "text-align:left" > < strong > target< / strong > < / td >
< td style = "text-align:left" > see notes< / td >
< td style = "text-align:left" > The destination frame/window for the URL. This behaves similar to normal links. If the parameter is not given it defaults to:< br > < br > - < code > _blank< / code > for any address starting with < code > http://< / code > or < code > https://< / code > < br > - no specific value for all other links< / td >
< / tr >
< tr >
2022-05-29 21:00:53 +00:00
< td style = "text-align:left" > < em > < strong > < content> < / strong > < / em > < / td >
< td style = "text-align:left" > see notes< / td >
2022-10-31 14:06:51 +00:00
< td style = "text-align:left" > 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 colors: < em > < empty> < / em > < br > < br > If you want no title for a severity style, you have to set this parameter to < code > " " < / code > (a non empty string filled with spaces)< / td >
2022-05-29 21:00:53 +00:00
< / tr >
< / tbody >
< / table >
< h2 id = "examples" > Examples< / h2 >
< h3 id = "style" > Style< / h3 >
2022-06-05 17:32:37 +00:00
< h4 id = "by-severity" > By Severity< / h4 >
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " info" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " note" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " tip" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " warning" < / 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 >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle info" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-info-circle" > < / i >
Get Hugo
< / a >
< / span >
< span class = "btn cstyle note" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-exclamation-circle" > < / i >
Get Hugo
< / a >
< / span >
< span class = "btn cstyle tip" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-lightbulb" > < / i >
Get Hugo
< / a >
< / span >
< span class = "btn cstyle warning" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-exclamation-triangle" > < / i >
Get Hugo
< / a >
< / span > < / p >
2022-06-05 17:32:37 +00:00
< h4 id = "by-brand-colors" > By Brand Colors< / h4 >
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " primary" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " secondary" < / 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 >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle primary" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span >
< span class = "btn cstyle secondary" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span > < / p >
2022-06-05 17:32:37 +00:00
< h4 id = "by-color" > By Color< / h4 >
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " blue" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " green" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " grey" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " orange" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " red" < / 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 >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle blue" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span >
< span class = "btn cstyle green" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span >
< span class = "btn cstyle grey" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span >
< span class = "btn cstyle orange" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span >
< span class = "btn cstyle red" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span > < / p >
2022-06-05 17:32:37 +00:00
< h4 id = "by-special-color" > By Special Color< / h4 >
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " default" < / 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " transparent" < / 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 >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle default" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span >
< span class = "btn cstyle transparent" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
Get Hugo
< / a >
< / span > < / p >
< h3 id = "icon" > Icon< / h3 >
2022-06-05 17:32:37 +00:00
< h4 id = "to-the-left" > To the Left< / h4 >
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " download" < / 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 >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle transparent" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-download" > < / i >
Get Hugo
< / a >
< / span >
2022-06-05 17:32:37 +00:00
< h4 id = "to-the-right" > To the Right< / h4 >
2022-06-23 11:25:28 +00:00
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " download" < / span > < span class = "nx" > iconposition< / span > < span class = "p" > =< / span > < span class = "s" > " right" < / 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 >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle transparent" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-06-22 22:08:50 +00:00
Get Hugo
2022-06-23 11:25:28 +00:00
< i class = "fa-fw fas fa-download" > < / i >
2022-05-29 21:00:53 +00:00
< / a >
< / span >
< h4 id = "override-for-severity" > Override for Severity< / h4 >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " dragon" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " warning" < / 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 >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle warning" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-dragon" > < / i >
Get Hugo
< / a >
< / span >
2022-10-31 20:10:53 +00:00
< h3 id = "target" > Target< / h3 >
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > target< / span > < span class = "p" > =< / span > < span class = "s" > " _self" < / 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" > " https://gohugo.io/" < / 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 transparent" >
< a href = "https://gohugo.io/" target = "_self" rel = "noopener" >
Get Hugo in same Window/Frame
< / a >
< / span >
< span class = "btn cstyle transparent" >
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
Get Hugo in new Window/Frame (default)
< / a >
< / span > < / p >
2022-05-29 21:00:53 +00:00
< h3 id = "other" > Other< / h3 >
< h4 id = "severity-style-with-all-defaults" > Severity Style with all Defaults< / h4 >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " https://gohugo.io/" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " tip" < / 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 >
2022-05-29 21:00:53 +00:00
< span class = "btn cstyle tip" >
2022-10-31 20:10:53 +00:00
< a href = "https://gohugo.io/" target = "_blank" rel = "noopener" >
2022-05-29 21:00:53 +00:00
< i class = "fa-fw fas fa-lightbulb" > < / i >
Tip
< / a >
< / span >
2022-10-31 20:10:53 +00:00
< h4 id = "button-to-internal-page" > Button to internal page< / h4 >
< div class = "highlight" > < 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" > " /" < / 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 transparent" >
2022-11-05 23:35:48 +00:00
< a href = "../" >
2022-10-31 20:10:53 +00:00
Home
< / a >
< / span >
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "children" > Children< / h1 >
2022-07-05 22:16:52 +00:00
2022-10-07 11:09:28 +00:00
< p > The < code > children< / code > shortcode lists the child pages of the current page and its descendants .< / p >
2022-06-22 22:08:50 +00:00
< ul class = "children children-li children-sort-weight" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/test/index.html" > page X< / a > < / li >
< li > < a href = "../shortcodes/children/children-1/index.html" > page 1< / a > < / li >
< li > < a href = "../shortcodes/children/children-2/index.html" > page 2< / a > < / li >
< li > < a href = "../shortcodes/children/children-3/index.html" > page 3< / a > < / li >
2022-06-22 22:08:50 +00:00
< / ul >
2022-04-02 13:30:16 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.< / p >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="shortcode"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
< div class = "highlight" > < 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" > " weight" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/children.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " sort" < / span > < span class = "s" > " weight" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
< h3 id = "parameter" > Parameter< / h3 >
2022-04-02 13:30:16 +00:00
< table >
< thead >
< tr >
2022-06-05 17:32:37 +00:00
< th style = "text-align:left" > Name< / th >
2022-04-02 13:30:16 +00:00
< th style = "text-align:left" > Default< / th >
2022-06-05 17:32:37 +00:00
< th style = "text-align:left" > Notes< / th >
2022-04-02 13:30:16 +00:00
< / tr >
< / thead >
< tbody >
< tr >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > < strong > containerstyle< / strong > < / td >
< td style = "text-align:left" > < code > ul< / code > < / td >
< td style = "text-align:left" > Choose the style used to group all children. It could be any HTML tag name.< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > < strong > style< / strong > < / td >
< td style = "text-align:left" > < code > li< / code > < / td >
< td style = "text-align:left" > Choose the style used to display each descendant. It could be any HTML tag name.< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > < strong > showhidden< / strong > < / td >
< td style = "text-align:left" > < code > false< / code > < / td >
2022-10-31 14:06:51 +00:00
< td style = "text-align:left" > When < code > true< / code > , child pages hidden from the menu will be displayed as well.< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > < strong > description< / strong > < / td >
< td style = "text-align:left" > < code > false< / code > < / td >
< td style = "text-align:left" > 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/" > read more info about summaries on gohugo.io< / a > .< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > < strong > depth< / strong > < / td >
< td style = "text-align:left" > < code > 1< / code > < / td >
< td style = "text-align:left" > 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 >
2022-04-02 13:30:16 +00:00
< / tr >
< tr >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > < strong > sort< / strong > < / td >
< td style = "text-align:left" > see notes< / td >
2022-11-05 23:35:48 +00:00
< td style = "text-align:left" > The sort order of the displayed list.< br > < br > If not set it is sorted by the < a href = "../basics/configuration/#global-site-parameters" > < code > ordersectionsby< / code > < / a > setting of the site and the pages frontmatter< br > < br > - < code > weight< / code > : to sort on menu order< br > - < code > title< / code > : to sort alphabetically on menu label.< / td >
2022-04-02 13:30:16 +00:00
< / tr >
< / tbody >
< / table >
2022-06-05 17:32:37 +00:00
< h2 id = "examples" > Examples< / h2 >
< h3 id = "all-default" > All Default< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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-" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/test/index.html" > page X< / a > < / li >
< li > < a href = "../shortcodes/children/children-1/index.html" > page 1< / a > < / li >
< li > < a href = "../shortcodes/children/children-2/index.html" > page 2< / a > < / li >
< li > < a href = "../shortcodes/children/children-3/index.html" > page 3< / a > < / li >
2022-04-02 13:30:16 +00:00
< / ul >
2022-06-05 17:32:37 +00:00
< h3 id = "with-description" > With Description< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > " true" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< ul class = "children children-li children-sort-" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/test/index.html" > page X< / a > < p > This is a plain page test, and the beginning of a YAML multiline description...
2022-10-07 18:46:19 +00:00
< / p > < / li >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/children-1/index.html" > page 1< / a > < p > This is a demo child page< / p > < / li >
< li > < a href = "../shortcodes/children/children-2/index.html" > page 2< / a > < p > This is a demo child page with no description.
2022-10-07 18:46:19 +00:00
So its content is used as description.< / p > < / li >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/children-3/index.html" > page 3< / a > < p > This is a demo child page< / p > < / li >
2022-04-02 13:30:16 +00:00
< / ul >
2022-10-31 14:06:51 +00:00
< h3 id = "infinite-depth-and-hidden-pages" > Infinite Depth and Hidden Pages< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > " 999" < / span > < span class = "nx" > showhidden< / span > < span class = "p" > =< / span > < span class = "s" > " true" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< ul class = "children children-li children-sort-" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/test/index.html" > page X< / a > < ul >
< / ul > < / li >
< li > < a href = "../shortcodes/children/children-1/index.html" > page 1< / a > < ul >
< li > < a href = "../shortcodes/children/children-1/children-1-1/index.html" > page 1-1< / a > < ul >
< li > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-1/index.html" > page 1-1-1 (hidden)< / a > < ul >
< li > < a href = "../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 = "../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 = "../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 > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-2/index.html" > page 1-1-2< / a > < ul >
< li > < a href = "../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 = "../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 = "../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 = "../shortcodes/children/children-2/index.html" > page 2< / a > < ul >
< / ul > < / li >
< li > < a href = "../shortcodes/children/children-3/index.html" > page 3< / a > < ul >
< li > < a href = "../shortcodes/children/children-3/test3/index.html" > page 3-1< / a > < ul >
< / ul > < / li > < / ul > < / li >
< li > < a href = "../shortcodes/children/children-4/index.html" > page 4 (hidden)< / a > < ul >
< / ul > < / li >
2022-04-02 13:30:16 +00:00
< / ul >
2022-06-05 17:32:37 +00:00
< h3 id = "heading-styles-for-container-and-elements" > Heading Styles for Container and Elements< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > " div" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " h2" < / span > < span class = "nx" > depth< / span > < span class = "p" > =< / span > < span class = "s" > " 3" < / span > < span class = "nx" > description< / span > < span class = "p" > =< / span > < span class = "s" > " true" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "children children-h2 children-sort-" >
2022-11-08 14:43:28 +00:00
< h2 > < a href = "../shortcodes/children/test/index.html" > page X< / a > < / h2 > < p > This is a plain page test, and the beginning of a YAML multiline description...
2022-06-23 18:04:40 +00:00
< / p >
2022-11-08 14:43:28 +00:00
< h2 > < a href = "../shortcodes/children/children-1/index.html" > page 1< / a > < / h2 > < p > This is a demo child page< / p >
< h3 > < a href = "../shortcodes/children/children-1/children-1-1/index.html" > page 1-1< / a > < / h3 > < p > This is a demo child page< / p >
< h4 > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-2/index.html" > page 1-1-2< / a > < / h4 > < p > This is a demo child page< / p >
< h4 > < a href = "../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 = "../shortcodes/children/children-2/index.html" > page 2< / a > < / h2 > < p > This is a demo child page with no description.
2022-06-23 18:04:40 +00:00
So its content is used as description.< / p >
2022-11-08 14:43:28 +00:00
< h2 > < a href = "../shortcodes/children/children-3/index.html" > page 3< / a > < / h2 > < p > This is a demo child page< / p >
< h3 > < a href = "../shortcodes/children/children-3/test3/index.html" > page 3-1< / a > < / h3 > < p > This is a plain page test nested in a parent< / p >
2022-04-02 13:30:16 +00:00
< / div >
2022-06-05 17:32:37 +00:00
< h3 id = "divs-for-group-and-element-styles" > Divs for Group and Element Styles< / h3 >
< div class = "highlight" > < 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" > " div" < / span > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s" > " div" < / span > < span class = "nx" > depth< / span > < span class = "p" > =< / span > < span class = "s" > " 3" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < / code > < / pre > < / div >
< div class = "children children-div children-sort-" >
2022-11-08 14:43:28 +00:00
< div > < a href = "../shortcodes/children/test/index.html" > page X< / a > < / div >
< div > < a href = "../shortcodes/children/children-1/index.html" > page 1< / a > < / div >
< div > < a href = "../shortcodes/children/children-1/children-1-1/index.html" > page 1-1< / a > < / div >
< div > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-2/index.html" > page 1-1-2< / a > < / div >
< div > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-3/index.html" > page 1-1-3< / a > < / div >
< div > < a href = "../shortcodes/children/children-2/index.html" > page 2< / a > < / div >
< div > < a href = "../shortcodes/children/children-3/index.html" > page 3< / a > < / div >
< div > < a href = "../shortcodes/children/children-3/test3/index.html" > page 3-1< / a > < / div >
2022-04-02 13:30:16 +00:00
< / div >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< section >
2022-10-07 18:46:19 +00:00
< h1 class = "a11y-only" > Subsections of Children< / h1 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-x" > page X< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > This is a plain demo child page.< / p >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-1" > page 1< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< 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-" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/children-1/children-1-1/index.html" > page 1-1< / a > < / li >
2022-04-02 13:30:16 +00:00
< / ul >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< section >
2022-10-07 18:46:19 +00:00
< h1 class = "a11y-only" > Subsections of page 1< / h1 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-1-1" > page 1-1< / h1 >
2022-07-05 22:16:52 +00:00
2022-11-05 23:35:48 +00:00
< p > This is a demo child page with a hidden child. You can still access the hidden child < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-1/" > directly< / a > or via the search.< / p >
2022-04-02 13:30:16 +00:00
< h2 id = "subpages-of-this-page" > Subpages of this page< / h2 >
< ul class = "children children-li children-sort-" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-1/index.html" > page 1-1-1 (hidden)< / a > < / li >
< li > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-2/index.html" > page 1-1-2< / a > < / li >
< li > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-3/index.html" > page 1-1-3< / a > < / li >
2022-04-02 13:30:16 +00:00
< / ul >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< section >
2022-10-07 18:46:19 +00:00
< h1 class = "a11y-only" > Subsections of page 1-1< / h1 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-1-1-2" > page 1-1-2< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > This is a plain demo child page.< / p >
< h2 id = "subpages-of-this-page" > Subpages of this page< / h2 >
< ul class = "children children-li children-sort-" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-2/children-1-1-2-1/index.html" > page 1-1-2-1< / a > < / li >
< li > < a href = "../shortcodes/children/children-1/children-1-1/children-1-1-2/children-1-1-2-2/index.html" > page 1-1-2-2< / a > < / li >
2022-04-02 13:30:16 +00:00
< / ul >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< section >
2022-10-07 18:46:19 +00:00
< h1 class = "a11y-only" > Subsections of page 1-1-2< / h1 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-1-1-2-1" > page 1-1-2-1< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > This is a plain demo child page.< / p >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-1-1-2-2" > page 1-1-2-2< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > This is a plain demo child page.< / p >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< / section >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-1-1-3" > page 1-1-3< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > This is a plain demo child page.< / p >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< / section >
< / section >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-2" > page 2< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< 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 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-3" > page 3< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< 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-" >
2022-11-08 14:43:28 +00:00
< li > < a href = "../shortcodes/children/children-3/test3/index.html" > page 3-1< / a > < / li >
2022-04-02 13:30:16 +00:00
< / ul >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< section >
2022-10-07 18:46:19 +00:00
< h1 class = "a11y-only" > Subsections of page 3< / h1 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "page-3-1" > page 3-1< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > This is a plain demo child page.< / p >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< / section >
< / section >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "expand" > Expand< / h1 >
2022-07-05 22:16:52 +00:00
2022-06-05 17:32:37 +00:00
< p > The < code > expand< / code > shortcode displays an expandable/collapsible section of text.< / p >
2022-04-02 13:30:16 +00:00
< div class = "expand" >
< a class = "expand-label" onclick = "$t=$(this); if($t.parent('.expand-expanded.expand-marked').length){ $t.next().css('display','none') }else if($t.parent('.expand-marked').length){ $t.next().css('display','block') }else{ $t.next('.expand-content').slideToggle(100); } $t.parent().toggleClass('expand-expanded');" >
< i class = "fas fa-chevron-down" > < / i >
2022-11-01 01:10:49 +00:00
< i class = "fas fa-chevron-left expand-rtl direction-ltr" > < / i >
< i class = "fas fa-chevron-right expand-ltr direction-ltr" > < / i >
2022-06-05 17:32:37 +00:00
Expand me...
2022-04-02 13:30:16 +00:00
< / a >
< div class = "expand-content" style = "display: none;" >
2022-06-05 17:32:37 +00:00
Thank you!
< / div >
< / div >
< h2 id = "usage" > Usage< / h2 >
2022-10-31 14:06:51 +00:00
< p > While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials.< / p >
2022-04-02 13:30:16 +00:00
2022-06-05 17:32:37 +00:00
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
2022-06-22 22:08:50 +00:00
data-tab-item="shortcode"
2022-06-05 17:32:37 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="shortcode (positional)"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode (positional)')"
>< span > shortcode (positional)< / span > < / button >
2022-06-05 17:32:37 +00:00
< button
2022-06-22 22:08:50 +00:00
data-tab-item="partial"
2022-06-05 17:32:37 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
2022-06-05 17:32:37 +00:00
< / div >
< div class = "tab-content" >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " Expand me..." < / 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 >
2022-04-02 13:30:16 +00:00
< / div >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode (positional)" data-tab-group = "shortcode-parameter" class = "tab-item " >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " Expand me..." < / 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 >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/expand.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " title" < / span > < span class = "s" > " Expand me..." < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "s" > " Thank you!" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< / div >
2022-06-05 17:32:37 +00:00
< h3 id = "parameter" > Parameter< / h3 >
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Position< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > title< / strong > < / td >
< td style = "text-align:left" > 1< / td >
< td style = "text-align:left" > < code > " Expand me..." < / code > < / td >
2022-10-31 14:06:51 +00:00
< td style = "text-align:left" > Arbitrary text to appear next to the expand/collapse icon.< / td >
2022-06-05 17:32:37 +00:00
< / tr >
< tr >
< td style = "text-align:left" > < strong > open< / strong > < / td >
< td style = "text-align:left" > 2< / td >
< td style = "text-align:left" > < code > false< / code > < / td >
< td style = "text-align:left" > When < code > true< / code > the content text will be initially shown as expanded.< / td >
< / tr >
< tr >
< td style = "text-align:left" > < em > < strong > < content> < / strong > < / em > < / td >
< td style = "text-align:left" > < / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
2022-10-31 14:06:51 +00:00
< td style = "text-align:left" > Arbitrary text to be displayed on expand.< / td >
2022-06-05 17:32:37 +00:00
< / tr >
< / tbody >
< / table >
< h2 id = "examples" > Examples< / h2 >
< h3 id = "all-defaults" > All Defaults< / h3 >
< div class = "highlight" > < 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 >
2022-04-02 13:30:16 +00:00
< div class = "expand" >
< a class = "expand-label" onclick = "$t=$(this); if($t.parent('.expand-expanded.expand-marked').length){ $t.next().css('display','none') }else if($t.parent('.expand-marked').length){ $t.next().css('display','block') }else{ $t.next('.expand-content').slideToggle(100); } $t.parent().toggleClass('expand-expanded');" >
< i class = "fas fa-chevron-down" > < / i >
2022-11-01 01:10:49 +00:00
< i class = "fas fa-chevron-left expand-rtl direction-ltr" > < / i >
< i class = "fas fa-chevron-right expand-ltr direction-ltr" > < / i >
2022-04-02 13:30:16 +00:00
Expand me...
< / a >
< div class = "expand-content" style = "display: none;" >
2022-06-05 17:32:37 +00:00
Yes, you did it!
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-05 17:32:37 +00:00
< h3 id = "initially-expanded" > Initially Expanded< / h3 >
< div class = "highlight" > < 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" > " Expand me..." < / span > < span class = "nx" > open< / span > < span class = "p" > =< / span > < span class = "s" > " true" < / 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 >
2022-04-02 13:30:16 +00:00
< / span > < / span > < / code > < / pre > < / div >
< div class = "expand expand-expanded" >
< a class = "expand-label" onclick = "$t=$(this); if($t.parent('.expand-expanded.expand-marked').length){ $t.next().css('display','none') }else if($t.parent('.expand-marked').length){ $t.next().css('display','block') }else{ $t.next('.expand-content').slideToggle(100); } $t.parent().toggleClass('expand-expanded');" >
< i class = "fas fa-chevron-down" > < / i >
2022-11-01 01:10:49 +00:00
< i class = "fas fa-chevron-left expand-rtl direction-ltr" > < / i >
< i class = "fas fa-chevron-right expand-ltr direction-ltr" > < / i >
2022-04-02 13:30:16 +00:00
Expand me...
< / a >
< div class = "expand-content" style = "display: block;" >
2022-06-05 17:32:37 +00:00
No need to press you!
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-05 17:32:37 +00:00
< h3 id = "arbitrary-text" > Arbitrary Text< / h3 >
< div class = "highlight" > < 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" > " Show me almost endless possibilities" < / 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" >
2022-10-31 14:06:51 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > > < / 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 >
2022-04-02 13:30:16 +00:00
< / 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" >
< a class = "expand-label" onclick = "$t=$(this); if($t.parent('.expand-expanded.expand-marked').length){ $t.next().css('display','none') }else if($t.parent('.expand-marked').length){ $t.next().css('display','block') }else{ $t.next('.expand-content').slideToggle(100); } $t.parent().toggleClass('expand-expanded');" >
< i class = "fas fa-chevron-down" > < / i >
2022-11-01 01:10:49 +00:00
< i class = "fas fa-chevron-left expand-rtl direction-ltr" > < / i >
< i class = "fas fa-chevron-right expand-ltr direction-ltr" > < / i >
2022-05-23 13:00:05 +00:00
Show me almost endless possibilities
2022-04-02 13:30:16 +00:00
< / a >
< div class = "expand-content" style = "display: none;" >
2022-05-23 13:00:05 +00:00
< p > You can add standard markdown syntax:< / p >
2022-04-02 13:30:16 +00:00
< 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" > links< / a > < / li >
< li > etc.< / li >
< / ul >
< div class = "highlight" > < 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 >
2022-10-31 14:06:51 +00:00
< p > the possibilities are endless (almost - including other shortcodes may or may not work)< / p >
2022-04-02 13:30:16 +00:00
< / blockquote >
< / div >
< / div >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "include" > Include< / h1 >
2022-07-05 22:16:52 +00:00
2022-06-05 17:32:37 +00:00
< p > The < code > include< / code > shortcode includes other files from your project inside of the current page.< / p >
2022-04-02 13:30:16 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter you are free to use positional aswell or also call this shortcode from your own partials.< / p >
2022-06-05 17:32:37 +00:00
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
2022-06-22 22:08:50 +00:00
data-tab-item="shortcode"
2022-06-05 17:32:37 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="shortcode (positional)"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode (positional)')"
>< span > shortcode (positional)< / span > < / button >
2022-06-05 17:32:37 +00:00
< button
2022-06-22 22:08:50 +00:00
data-tab-item="partial"
2022-06-05 17:32:37 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
2022-06-05 17:32:37 +00:00
< / div >
< div class = "tab-content" >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " shortcodes/INCLUDE_ME.md" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode (positional)" data-tab-group = "shortcode-parameter" class = "tab-item " >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " shortcodes/INCLUDE_ME.md" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/include .html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " file" < / span > < span class = "s" > " shortcodes/INCLUDE_ME.md" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / 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 style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Position< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > file< / strong > < / td >
< td style = "text-align:left" > 1< / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
< td style = "text-align:left" > The path to the file to be included. Path resolution adheres to < a href = "https://gohugo.io/functions/readfile/" > Hugo’ s build-in < code > readFile< / code > function< / a > < / td >
< / tr >
< tr >
2022-06-23 11:25:28 +00:00
< td style = "text-align:left" > < strong > hidefirstheading< / strong > < / td >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > 2< / td >
2022-06-23 11:25:28 +00:00
< td style = "text-align:left" > < code > false< / code > < / td >
< td style = "text-align:left" > 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 >
2022-06-05 17:32:37 +00:00
< / tr >
< / tbody >
< / table >
2022-04-02 13:30:16 +00:00
< h2 id = "examples" > Examples< / h2 >
2022-10-31 14:06:51 +00:00
< h3 id = "arbitrary-content" > Arbitrary Content< / h3 >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " shortcodes/INCLUDE_ME.md" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
2022-06-23 11:28:22 +00:00
< / span > < / span > < / code > < / pre > < / div > < p > You can add standard markdown syntax:< / p >
2022-04-02 13:30:16 +00:00
< 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" > links< / a > < / li >
< li > etc.< / li >
< / ul >
< div class = "highlight" > < 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 >
2022-10-31 14:06:51 +00:00
< p > the possibilities are endless (almost - including other shortcodes may or may not work) (almost - including other shortcodes may or may not work)< / p >
2022-04-02 13:30:16 +00:00
< / blockquote >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "math" > Math< / h1 >
2022-07-05 22:16:52 +00:00
2022-07-02 12:20:53 +00:00
< p > The < code > math< / code > shortcode generates beautiful formatted math and chemical formulae using the < a href = "https://mathjax.org/" > 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 >
2022-07-02 22:46:26 +00:00
< 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 > This only works in modern browsers.< / p >
< / div >
< / div >
2022-07-02 12:20:53 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-10-04 13:36:17 +00:00
< p > While the examples are using shortcodes with named parameter it is recommended to use codefences instead. This is because more and more other software supports Math codefences (eg. GitHub) and so your markdown becomes more portable.< / p >
2022-07-02 12:20:53 +00:00
< p > You are free to also call this shortcode from your own partials.< / p >
< 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 > To use codefence syntax you have to turn off < code > guessSyntax< / code > for the < code > markup.highlight< / code > setting (< a href = "#configuration" > see the configuration section< / a > ).< / p >
< / div >
< / div >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="codefence"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-07-02 12:20:53 +00:00
onclick="switchTab('shortcode-parameter','codefence')"
>< span > codefence< / span > < / button >
< button
data-tab-item="shortcode"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-07-02 12:20:53 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-07-02 12:20:53 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "codefence" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-10-31 14:31:20 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-md" data-lang = "md" > < span class = "line" > < span class = "cl" > ```math { align=" center" }
< / 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" > ```
2022-07-02 12:20:53 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item " >
2022-10-31 14:31:20 +00:00
< div class = "highlight" > < 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" > math< / span > < span class = "nx" > align< / span > < span class = "p" > =< / span > < span class = "s" > " center" < / span > < span class = "p" > > }}< / span >
2022-07-02 12:20:53 +00:00
< / 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" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > math< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/math.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "s" > " $$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 >
2022-10-31 14:31:20 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " align" < / span > < span class = "s" > " center" < / span >
2022-07-02 12:20:53 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
< h3 id = "parameter" > Parameter< / h3 >
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > align< / strong > < / td >
< td style = "text-align:left" > < code > center< / code > < / td >
< td style = "text-align:left" > Allowed values are < code > left< / code > , < code > center< / code > or < code > right< / code > .< / td >
< / tr >
< tr >
< td style = "text-align:left" > < em > < strong > < content> < / strong > < / em > < / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
< td style = "text-align:left" > Your formuale.< / td >
< / tr >
< / tbody >
< / table >
< h2 id = "configuration" > Configuration< / h2 >
< p > MathJax is configured with default settings. You can customize MathJax’ s default settings for all of your files thru a JSON object in your < code > config.toml< / code > or override these settings per page thru your pages frontmatter.< / p >
< p > The JSON object of your < code > config.toml< / code > / frontmatter is forwarded into MathJax’ s configuration object.< / p >
< p > See < a href = "https://docs.mathjax.org/en/latest/options/index.html" > MathJax documentation< / a > for all allowed settings.< / p >
< 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 > To use codefence syntax you have to turn off < code > guessSyntax< / code > for the < code > markup.highlight< / code > setting.< / p >
< / div >
< / div >
< h3 id = "global-configuration-file" > Global Configuration File< / h3 >
< div class = "highlight" > < 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" > mathJaxInitialize< / span > < span class = "p" > =< / span > < span class = "s2" > " { \" chtml\" : { \" displayAlign\" : \" left\" } }" < / 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 > < / 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 = "c" > # if `guessSyntax = true`, there will be no unstyled code even if no language< / span >
2022-10-04 13:36:17 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # was given BUT Mermaid and Math codefences will not work anymore! So this is a< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # mandatory setting for your site if you want to use Math codefences< / span >
2022-07-02 12:20:53 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > guessSyntax< / span > < span class = "p" > =< / span > < span class = "kc" > false< / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "pages-frontmatter" > Page’ s Frontmatter< / h3 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > mathJaxInitialize< / span > < span class = "p" > =< / span > < span class = "s2" > " { \" chtml\" : { \" displayAlign\" : \" left\" } }" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "examples" > Examples< / h2 >
< h3 id = "inline-math" > Inline Math< / h3 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-md" data-lang = "md" > < span class = "line" > < span class = "cl" > Inline math is generated if you use a single < span class = "sb" > `$`< / span > as a delimiter around your formulae: {{< span class = "p" > < < / span > < span class = "nt" > math< / span > < span class = "p" > > < / span > }}$\sqrt{3}${{< span class = "p" > < < / span > < span class = "p" > /< / span > < span class = "nt" > math< / span > < span class = "p" > > < / span > }}
< / span > < / span > < / code > < / pre > < / div > < p > Inline math is generated if you use a single < code > $< / code > as a delimiter around your formulae:
< span class = "math align-center" > $\sqrt{3}$< / span > < / p >
2022-11-05 12:01:19 +00:00
< h3 id = "blocklevel-math-with-right-alignment" > Blocklevel Math with Right Alignment< / h3 >
2022-07-02 12:20:53 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-md" data-lang = "md" > < span class = "line" > < span class = "cl" > If you delimit your formulae by two consecutive < span class = "sb" > `$$`< / span > it generates a new block.
< / span > < / span > < span class = "line" > < span class = "cl" >
2022-11-05 12:01:19 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > {{< span class = "p" > < < / span > < span class = "nt" > math< / span > < span class = "na" > align< / span > < span class = "o" > =< / span > < span class = "s" > " right" < / span > < span class = "p" > > < / span > }}
2022-07-02 12:20:53 +00:00
< / 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" > < < / span > < span class = "p" > /< / span > < span class = "nt" > math< / span > < span class = "p" > > < / span > }}
< / span > < / span > < / code > < / pre > < / div > < p > If you delimit your formulae by two consecutive < code > $$< / code > it generates a new block.< / p >
2022-11-05 12:01:19 +00:00
< span class = "math align-right" >
2022-07-02 12:20:53 +00:00
$$\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 = "codefence" > Codefence< / h3 >
< p > You can also use codefences but without further parameter.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-md" data-lang = "md" > < span class = "line" > < span class = "cl" > < span class = "s" > ```math
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > < / span > $$\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 = "s" > ```< / span >
< / span > < / span > < / code > < / pre > < / div >
2022-07-02 22:36:23 +00:00
< 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 > < h3 id = "chemical-formulae" > Chemical Formulae< / h3 >
2022-07-02 12:20:53 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-md" data-lang = "md" > < span class = "line" > < span class = "cl" > {{< span class = "p" > < < / span > < span class = "nt" > math< / span > < span class = "p" > > < / span > }}
< / span > < / span > < span class = "line" > < span class = "cl" > $$\ce{Hg^2+ -> [I-] HgI2 -> [I-] [Hg^{II}I4]^2-}$$
< / span > < / span > < span class = "line" > < span class = "cl" > {{< span class = "p" > < < / span > < span class = "p" > /< / span > < span class = "nt" > math< / span > < span class = "p" > > < / span > }}
< / span > < / span > < / code > < / pre > < / div >
< span class = "math align-center" >
$$\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}$$
< / span >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "mermaid" > Mermaid< / h1 >
2022-07-05 22:16:52 +00:00
2022-07-02 12:20:53 +00:00
< 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/" > Mermaid< / a > library.< / p >
2022-06-05 17:32:37 +00:00
2022-10-07 18:46:19 +00:00
< div class = "mermaid align-center" >
2022-06-05 17:32:37 +00:00
graph LR;
2022-10-07 18:46:19 +00:00
If --> Then
Then --> Else
2022-06-05 17:32:37 +00:00
< / div >
2022-04-02 13:30:16 +00:00
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle note" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Note< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > This only works in modern browsers.< / p >
< / div >
< / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle warning" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-triangle" > < / i > Warning< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > Due to limitations with < a href = "https://github.com/mermaid-js/mermaid/issues/1846" > Mermaid< / a > , it is currently not possible to use Mermaid code fences in an initially collapsed < code > expand< / code > shortcode. This is a know issue and < a href = "https://github.com/McShelby/hugo-theme-relearn/issues/187" > can’ t be fixed by this theme< / a > .< / p >
< / div >
< / div >
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter it is recommended to use codefences instead. This is because more and more other software supports Mermaid codefences (eg. GitHub) and so your markdown becomes more portable.< / p >
< p > You are free to also call this shortcode from your own partials.< / p >
2022-06-05 17:32:37 +00:00
< 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 > To use codefence syntax you have to turn off < code > guessSyntax< / code > for the < code > markup.highlight< / code > setting (< a href = "#configuration" > see the configuration section< / a > ).< / p >
< / div >
< / div >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="codefence"
2022-06-22 22:08:50 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','codefence')"
2022-06-05 17:32:37 +00:00
>< span > codefence< / span > < / button >
< button
data-tab-item="shortcode"
2022-06-22 22:08:50 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
2022-06-05 17:32:37 +00:00
>< span > shortcode< / span > < / button >
2022-06-22 22:08:50 +00:00
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
2022-06-05 17:32:37 +00:00
< / div >
< div class = "tab-content" >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "codefence" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-10-31 14:17:29 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-md" data-lang = "md" > < span class = "line" > < span class = "cl" > ```mermaid { align=" center" }
< / span > < / span > < span class = "line" > < span class = "cl" > graph LR;
2022-06-05 17:32:37 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > If --> Then
< / span > < / span > < span class = "line" > < span class = "cl" > Then --> Else
2022-10-31 14:17:29 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > ```
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item " >
2022-10-31 14:17:29 +00:00
< div class = "highlight" > < 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" > mermaid< / span > < span class = "nx" > align< / span > < span class = "p" > =< / span > < span class = "s" > " center" < / span > < span class = "p" > > }}< / span >
2022-06-05 17:32:37 +00:00
< / 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" > > < / 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" > > < / span > < span class = "nx" > Else< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/mermaid.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "s" > " graph LR;\nIf --> Then\nThen --> Else" < / span >
2022-10-31 14:17:29 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " align" < / span > < span class = "s" > " center" < / span >
2022-06-22 22:08:50 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< / div >
2022-06-22 22:08:50 +00:00
< p > The generated graphs can be be panned by dragging them and zoomed by using the mousewheel. On mobile devices you can use finger gestures.< / p >
2022-06-05 17:32:37 +00:00
< h3 id = "parameter" > Parameter< / h3 >
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > align< / strong > < / td >
< td style = "text-align:left" > < code > center< / code > < / td >
< td style = "text-align:left" > Allowed values are < code > left< / code > , < code > center< / code > or < code > right< / code > .< / td >
< / tr >
< tr >
< td style = "text-align:left" > < em > < strong > < content> < / strong > < / em > < / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
2022-10-04 13:36:17 +00:00
< td style = "text-align:left" > Your Mermaid graph.< / td >
2022-06-05 17:32:37 +00:00
< / tr >
< / tbody >
< / table >
< h2 id = "configuration" > Configuration< / h2 >
< p > Mermaid is configured with default settings. You can customize Mermaid’ s default settings for all of your files thru a JSON object in your < code > config.toml< / code > , override these settings per page thru your pages frontmatter or override these setting per diagramm thru < a href = "https://mermaid-js.github.io/mermaid/#/directives?id=directives" > diagram directives< / a > .< / p >
< p > The JSON object of your < code > config.toml< / code > / frontmatter is forwarded into Mermaid’ s < code > mermaid.initialize()< / code > function.< / p >
< p > See < a href = "http://mermaid-js.github.io/mermaid/#/Setup?id=mermaidapi-configuration-defaults" > Mermaid documentation< / a > for all allowed settings.< / p >
< p > The < code > theme< / code > setting can also be set by your used color variant. This will be the sitewide default and can - again - be overridden by your settings in < code > config.toml< / code > , frontmatter or diagram directives.< / p >
< 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 > To use codefence syntax you have to turn off < code > guessSyntax< / code > for the < code > markup.highlight< / code > setting.< / p >
< / div >
< / div >
< h3 id = "global-configuration-file" > Global Configuration File< / h3 >
< div class = "highlight" > < 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" > mermaidInitialize< / span > < span class = "p" > =< / span > < span class = "s2" > " { \" theme\" : \" dark\" }" < / 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 > < / 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 >
2022-07-02 12:20:53 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # if `guessSyntax = true`, there will be no unstyled code even if no language< / span >
2022-10-04 13:36:17 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # was given BUT Mermaid and Math codefences will not work anymore! So this is a< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # mandatory setting for your site if you want to use Mermaid codefences< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > guessSyntax< / span > < span class = "p" > =< / span > < span class = "kc" > false< / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "pages-frontmatter" > Page’ s Frontmatter< / h3 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > mermaidInitialize< / span > < span class = "p" > =< / span > < span class = "s2" > " { \" theme\" : \" dark\" }" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "examples" > Examples< / h2 >
< h3 id = "flowchart-with-non-default-mermaid-theme" > Flowchart with Non-Default Mermaid Theme< / h3 >
2022-11-05 12:01:19 +00:00
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "o" > %%< / span > < span class = "p" > {< / span > < span class = "nx" > init< / span > < span class = "p" > :{< / span > < span class = "s" > " theme" < / span > < span class = "p" > :< / span > < span class = "s" > " forest" < / span > < span class = "p" > }}< / span > < span class = "o" > %%< / 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" > A< / span > < span class = "p" > [< / span > < span class = "nx" > Hard< / span > < span class = "nx" > edge< / span > < span class = "p" > ]< / span > < span class = "o" > --< / span > < span class = "p" > > |< / span > < span class = "nx" > Link< / span > < span class = "nx" > text< / span > < span class = "p" > |< / span > < span class = "nf" > B< / span > < span class = "p" > (< / span > < span class = "nx" > Round< / span > < span class = "nx" > edge< / span > < span class = "p" > )< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > B< / span > < span class = "o" > --< / span > < span class = "p" > > < / span > < span class = "nx" > C< / span > < span class = "p" > {< < / span > < span class = "nx" > strong< / span > < span class = "p" > > < / span > < span class = "nx" > Decision< / span > < span class = "p" > < < / span > < span class = "o" > /< / span > < span class = "nx" > strong< / span > < span class = "p" > > }< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > C< / span > < span class = "o" > --< / span > < span class = "p" > > |< / span > < span class = "nx" > One< / span > < span class = "p" > |< / span > < span class = "nx" > D< / span > < span class = "p" > [< / span > < span class = "nx" > Result< / span > < span class = "nx" > one< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > C< / span > < span class = "o" > --< / span > < span class = "p" > > |< / span > < span class = "nx" > Two< / span > < span class = "p" > |< / span > < span class = "nx" > E< / span > < span class = "p" > [< / span > < span class = "nx" > Result< / span > < span class = "nx" > two< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
2022-11-05 12:01:19 +00:00
< div class = "mermaid align-center" >
2022-10-07 18:46:19 +00:00
%%{init:{" theme" :" forest" }}%%
2022-06-05 17:32:37 +00:00
graph LR;
2022-10-07 18:46:19 +00:00
A[Hard edge] --> |Link text| B(Round edge)
B --> C{< strong> Decision< /strong> }
C --> |One| D[Result one]
C --> |Two| E[Result two]
2022-04-02 13:30:16 +00:00
< / div >
2022-11-17 22:36:34 +00:00
< h3 id = "class-diagram-with-codefence-syntax" > Class Diagram with Codefence Syntax< / h3 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-go" data-lang = "go" > < span class = "line" > < span class = "cl" > < span class = "s" > ```mermaid
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > classDiagram
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Animal < |-- Duck
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Animal < |-- Fish
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Animal < |-- Zebra
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Animal : +int age
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Animal : +String gender
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Animal: +isMammal()
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Animal: +mate()
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > class Duck{
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > +String beakColor
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > +swim()
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > +quack()
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > }
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > class Fish{
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > -int sizeInFeet
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > -canEat()
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > }
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > class Zebra{
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > +bool is_wild
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > +run()
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > }
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > ```< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "mermaid align-center" > classDiagram
Animal < |-- Duck
Animal < |-- Fish
Animal < |-- Zebra
Animal : + int age
Animal : + String gender
Animal: + isMammal()
Animal: + mate()
class Duck{
+ String beakColor
+ swim()
+ quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+ bool is_wild
+ run()
}< / div > < h3 id = "state-diagram-aligned-to-the-right" > State Diagram Aligned to the Right< / h3 >
< div class = "highlight" > < 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" > mermaid< / span > < span class = "nx" > align< / span > < span class = "p" > =< / span > < span class = "s" > " right" < / span > < span class = "p" > > }}< / 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" > > < / 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" > > < / 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" > > < / 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" > > < / 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" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "mermaid align-right" >
stateDiagram-v2
open: Open Door
closed: Closed Door
locked: Locked Door
open --> closed: Close
closed --> locked: Lock
locked --> closed: Unlock
closed --> open: Open
< / div >
< h3 id = "sequence-diagram" > Sequence Diagram< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > sequenceDiagram< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > participant< / span > < span class = "nx" > Alice< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > participant< / span > < span class = "nx" > Bob< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Alice< / span > < span class = "o" > -> > < / span > < span class = "nx" > John< / span > < span class = "p" > :< / span > < span class = "nx" > Hello< / span > < span class = "nx" > John< / span > < span class = "p" > ,< / span > < span class = "nx" > how< / span > < span class = "nx" > are< / span > < span class = "nx" > you< / span > < span class = "err" > ?< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > loop< / span > < span class = "nx" > Healthcheck< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > John< / span > < span class = "o" > -< / span > < span class = "p" > > < / span > < span class = "nx" > John< / span > < span class = "p" > :< / span > < span class = "nx" > Fight< / span > < span class = "nx" > against< / span > < span class = "nx" > hypochondria< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > end< / span >
2022-10-02 22:25:49 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Note< / span > < span class = "nx" > right< / span > < span class = "nx" > of< / span > < span class = "nx" > John< / span > < span class = "p" > :< / span > < span class = "nx" > Rational< / span > < span class = "nx" > thoughts< / span > < span class = "p" > < < / span > < span class = "nx" > br< / span > < span class = "p" > > < / span > < span class = "nx" > prevail< / span > < span class = "o" > ...< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > John< / span > < span class = "o" > --< / span > < span class = "p" > > < / span > < span class = "nx" > Alice< / span > < span class = "p" > :< / span > < span class = "nx" > Great< / span > < span class = "p" > !< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > John< / span > < span class = "o" > -< / span > < span class = "p" > > < / span > < span class = "nx" > Bob< / span > < span class = "p" > :< / span > < span class = "nx" > How< / span > < span class = "nx" > about< / span > < span class = "nx" > you< / span > < span class = "err" > ?< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Bob< / span > < span class = "o" > --< / span > < span class = "p" > > < / span > < span class = "nx" > John< / span > < span class = "p" > :< / span > < span class = "nx" > Jolly< / span > < span class = "nx" > good< / span > < span class = "p" > !< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
2022-10-07 18:46:19 +00:00
< div class = "mermaid align-center" >
2022-06-05 17:32:37 +00:00
sequenceDiagram
participant Alice
participant Bob
2022-10-07 18:46:19 +00:00
Alice-> > John: Hello John, how are you?
2022-06-05 17:32:37 +00:00
loop Healthcheck
2022-10-07 18:46:19 +00:00
John-> John: Fight against hypochondria
2022-06-05 17:32:37 +00:00
end
2022-10-07 18:46:19 +00:00
Note right of John: Rational thoughts < br> prevail...
John--> Alice: Great!
John-> Bob: How about you?
Bob--> John: Jolly good!
2022-04-02 13:30:16 +00:00
< / div >
2022-11-17 22:36:34 +00:00
< h3 id = "gantt-chart" > GANTT Chart< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > gantt< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > dateFormat< / span > < span class = "nx" > YYYY< / span > < span class = "o" > -< / span > < span class = "nx" > MM< / span > < span class = "o" > -< / span > < span class = "nx" > DD< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "nx" > Adding< / span > < span class = "nx" > GANTT< / span > < span class = "nx" > diagram< / span > < span class = "nx" > functionality< / span > < span class = "nx" > to< / span > < span class = "nx" > Mermaid< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > section< / span > < span class = "nx" > A< / span > < span class = "nx" > section< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Completed< / span > < span class = "nx" > task< / span > < span class = "p" > :< / span > < span class = "nx" > done< / span > < span class = "p" > ,< / span > < span class = "nx" > des1< / span > < span class = "p" > ,< / span > < span class = "mi" > 2014< / span > < span class = "o" > -< / span > < span class = "mo" > 01< / span > < span class = "o" > -< / span > < span class = "mo" > 06< / span > < span class = "p" > ,< / span > < span class = "mi" > 2014< / span > < span class = "o" > -< / span > < span class = "mo" > 01< / span > < span class = "o" > -< / span > < span class = "mi" > 08< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Active< / span > < span class = "nx" > task< / span > < span class = "p" > :< / span > < span class = "nx" > active< / span > < span class = "p" > ,< / span > < span class = "nx" > des2< / span > < span class = "p" > ,< / span > < span class = "mi" > 2014< / span > < span class = "o" > -< / span > < span class = "mo" > 01< / span > < span class = "o" > -< / span > < span class = "mi" > 09< / span > < span class = "p" > ,< / span > < span class = "mi" > 3< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Future< / span > < span class = "nx" > task< / span > < span class = "p" > :< / span > < span class = "nx" > des3< / span > < span class = "p" > ,< / span > < span class = "nx" > after< / span > < span class = "nx" > des2< / span > < span class = "p" > ,< / span > < span class = "mi" > 5< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Future< / span > < span class = "nx" > task2< / span > < span class = "p" > :< / span > < span class = "nx" > des4< / span > < span class = "p" > ,< / span > < span class = "nx" > after< / span > < span class = "nx" > des3< / span > < span class = "p" > ,< / span > < span class = "mi" > 5< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > section< / span > < span class = "nx" > Critical< / span > < span class = "nx" > tasks< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Completed< / span > < span class = "nx" > task< / span > < span class = "nx" > in< / span > < span class = "nx" > the< / span > < span class = "nx" > critical< / span > < span class = "nx" > line< / span > < span class = "p" > :< / span > < span class = "nx" > crit< / span > < span class = "p" > ,< / span > < span class = "nx" > done< / span > < span class = "p" > ,< / span > < span class = "mi" > 2014< / span > < span class = "o" > -< / span > < span class = "mo" > 01< / span > < span class = "o" > -< / span > < span class = "mo" > 06< / span > < span class = "p" > ,< / span > < span class = "mi" > 24< / span > < span class = "nx" > h< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Implement< / span > < span class = "nx" > parser< / span > < span class = "nx" > and< / span > < span class = "nx" > jison< / span > < span class = "p" > :< / span > < span class = "nx" > crit< / span > < span class = "p" > ,< / span > < span class = "nx" > done< / span > < span class = "p" > ,< / span > < span class = "nx" > after< / span > < span class = "nx" > des1< / span > < span class = "p" > ,< / span > < span class = "mi" > 2< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Create< / span > < span class = "nx" > tests< / span > < span class = "k" > for< / span > < span class = "nx" > parser< / span > < span class = "p" > :< / span > < span class = "nx" > crit< / span > < span class = "p" > ,< / span > < span class = "nx" > active< / span > < span class = "p" > ,< / span > < span class = "mi" > 3< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Future< / span > < span class = "nx" > task< / span > < span class = "nx" > in< / span > < span class = "nx" > critical< / span > < span class = "nx" > line< / span > < span class = "p" > :< / span > < span class = "nx" > crit< / span > < span class = "p" > ,< / span > < span class = "mi" > 5< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Create< / span > < span class = "nx" > tests< / span > < span class = "k" > for< / span > < span class = "nx" > renderer< / span > < span class = "p" > :< / span > < span class = "mi" > 2< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Add< / span > < span class = "nx" > to< / span > < span class = "nx" > Mermaid< / span > < span class = "p" > :< / span > < span class = "mi" > 1< / span > < span class = "nx" > d< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
2022-10-07 18:46:19 +00:00
< div class = "mermaid align-center" >
2022-06-05 17:32:37 +00:00
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
< / div >
2022-11-17 22:36:34 +00:00
< h3 id = "entity-relationship-model" > Entity Relationship Model< / h3 >
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > erDiagram< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > CUSTOMER< / span > < span class = "p" > }|..|{< / span > < span class = "nx" > DELIVERY< / span > < span class = "o" > -< / span > < span class = "nx" > ADDRESS< / span > < span class = "p" > :< / span > < span class = "nx" > has< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > CUSTOMER< / span > < span class = "o" > ||--< / span > < span class = "nx" > o< / span > < span class = "p" > {< / span > < span class = "nx" > ORDER< / span > < span class = "p" > :< / span > < span class = "nx" > places< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > CUSTOMER< / span > < span class = "o" > ||--< / span > < span class = "nx" > o< / span > < span class = "p" > {< / span > < span class = "nx" > INVOICE< / span > < span class = "p" > :< / span > < span class = "s" > " liable for" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > DELIVERY< / span > < span class = "o" > -< / span > < span class = "nx" > ADDRESS< / span > < span class = "o" > ||--< / span > < span class = "nx" > o< / span > < span class = "p" > {< / span > < span class = "nx" > ORDER< / span > < span class = "p" > :< / span > < span class = "nx" > receives< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > INVOICE< / span > < span class = "o" > ||--< / span > < span class = "p" > |{< / span > < span class = "nx" > ORDER< / span > < span class = "p" > :< / span > < span class = "nx" > covers< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > ORDER< / span > < span class = "o" > ||--< / span > < span class = "p" > |{< / span > < span class = "nx" > ORDER< / span > < span class = "o" > -< / span > < span class = "nx" > ITEM< / span > < span class = "p" > :< / span > < span class = "nx" > includes< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > PRODUCT< / span > < span class = "o" > -< / span > < span class = "nx" > CATEGORY< / span > < span class = "o" > ||--< / span > < span class = "p" > |{< / span > < span class = "nx" > PRODUCT< / span > < span class = "p" > :< / span > < span class = "nx" > contains< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > PRODUCT< / span > < span class = "o" > ||--< / span > < span class = "nx" > o< / span > < span class = "p" > {< / span > < span class = "nx" > ORDER< / span > < span class = "o" > -< / span > < span class = "nx" > ITEM< / span > < span class = "p" > :< / span > < span class = "s" > " ordered in" < / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
2022-11-17 22:36:34 +00:00
< div class = "mermaid align-center" >
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : " liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : " ordered in"
< / div >
< h3 id = "user-journey" > User Journey< / h3 >
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > journey< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "nx" > My< / span > < span class = "nx" > working< / span > < span class = "nx" > day< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > section< / span > < span class = "nx" > Go< / span > < span class = "nx" > to< / span > < span class = "nx" > work< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Make< / span > < span class = "nx" > tea< / span > < span class = "p" > :< / span > < span class = "mi" > 5< / span > < span class = "p" > :< / span > < span class = "nx" > Me< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Go< / span > < span class = "nx" > upstairs< / span > < span class = "p" > :< / span > < span class = "mi" > 3< / span > < span class = "p" > :< / span > < span class = "nx" > Me< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Do< / span > < span class = "nx" > work< / span > < span class = "p" > :< / span > < span class = "mi" > 1< / span > < span class = "p" > :< / span > < span class = "nx" > Me< / span > < span class = "p" > ,< / span > < span class = "nx" > Cat< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > section< / span > < span class = "nx" > Go< / span > < span class = "nx" > home< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Go< / span > < span class = "nx" > downstairs< / span > < span class = "p" > :< / span > < span class = "mi" > 5< / span > < span class = "p" > :< / span > < span class = "nx" > Me< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Sit< / span > < span class = "nx" > down< / span > < span class = "p" > :< / span > < span class = "mi" > 3< / span > < span class = "p" > :< / span > < span class = "nx" > Me< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
2022-10-31 14:31:20 +00:00
< / span > < / span > < / code > < / pre > < / div >
2022-11-17 22:36:34 +00:00
< div class = "mermaid align-center" >
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
< / div >
< h3 id = "git-graph" > Git Graph< / h3 >
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > gitGraph< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > commit< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > commit< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > branch< / span > < span class = "nx" > develop< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > checkout< / span > < span class = "nx" > develop< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > commit< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > commit< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > checkout< / span > < span class = "nx" > main< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > merge< / span > < span class = "nx" > develop< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > commit< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > commit< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "mermaid align-center" >
gitGraph
commit
commit
branch develop
checkout develop
commit
commit
checkout main
merge develop
commit
commit
< / div >
< h3 id = "pie-chart" > Pie Chart< / h3 >
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > pie< / span > < span class = "nx" > title< / span > < span class = "nx" > Pets< / span > < span class = "nx" > adopted< / span > < span class = "nx" > by< / span > < span class = "nx" > volunteers< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " Dogs" < / span > < span class = "p" > :< / span > < span class = "mi" > 386< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " Cats" < / span > < span class = "p" > :< / span > < span class = "mi" > 85< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " Rats" < / span > < span class = "p" > :< / span > < span class = "mi" > 15< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "mermaid align-center" >
pie title Pets adopted by volunteers
" Dogs" : 386
" Cats" : 85
" Rats" : 15
< / div >
< h3 id = "mindmap" > Mindmap< / h3 >
< 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 > This diagram type seems to be broken in the way this theme uses Mermaid. This will probably be fixed in the future by the Mermaid team.< / p >
< / div >
< / div >
< div class = "highlight" > < 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" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > mindmap< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nf" > root< / span > < span class = "p" > ((< / span > < span class = "nx" > mindmap< / span > < span class = "p" > ))< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Origins< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Long< / span > < span class = "nx" > history< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > ::< / span > < span class = "nf" > icon< / span > < span class = "p" > (< / span > < span class = "nx" > fa< / span > < span class = "nx" > fa< / span > < span class = "o" > -< / span > < span class = "nx" > book< / span > < span class = "p" > )< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Popularisation< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > British< / span > < span class = "nx" > popular< / span > < span class = "nx" > psychology< / span > < span class = "nx" > author< / span > < span class = "nx" > Tony< / span > < span class = "nx" > Buzan< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Research< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > On< / span > < span class = "nx" > effectivness< / span > < span class = "p" > < < / span > < span class = "nx" > br< / span > < span class = "o" > /< / span > < span class = "p" > > < / span > < span class = "nx" > and< / span > < span class = "nx" > features< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > On< / span > < span class = "nx" > Automatic< / span > < span class = "nx" > creation< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Uses< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Creative< / span > < span class = "nx" > techniques< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Strategic< / span > < span class = "nx" > planning< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Argument< / span > < span class = "nx" > mapping< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Tools< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Pen< / span > < span class = "nx" > and< / span > < span class = "nx" > paper< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Mermaid< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > mermaid< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "mermaid align-center" >
mindmap
root((mindmap))
Origins
Long history
::icon(fa fa-book)
Popularisation
British popular psychology author Tony Buzan
Research
On effectivness< br/> and features
On Automatic creation
Uses
Creative techniques
Strategic planning
Argument mapping
Tools
Pen and paper
Mermaid
< / div >
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "notice" > Notice< / h1 >
2022-07-05 22:16:52 +00:00
2022-05-28 11:35:09 +00:00
< p > The < code > notice< / code > shortcode shows various types of disclaimers with adjustable color, title and icon to help you structure your page.< / p >
2022-05-23 22:38:50 +00:00
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle primary" >
< div class = "box-label" > < i class = "fa-fw fas fa-skull-crossbones" > < / i > There may be pirates< / div >
2022-05-23 22:38:50 +00:00
< div class = "box-content" >
< p > It is all about the boxes.< / p >
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-10-31 14:06:51 +00:00
< p > While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials.< / p >
2022-05-23 22:38:50 +00:00
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
2022-06-22 22:08:50 +00:00
data-tab-item="shortcode"
2022-05-29 21:35:48 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
2022-05-23 22:38:50 +00:00
< button
2022-06-22 22:08:50 +00:00
data-tab-item="shortcode (positional)"
2022-05-29 21:35:48 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode (positional)')"
>< span > shortcode (positional)< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
2022-05-23 22:38:50 +00:00
< / div >
< div class = "tab-content" >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-05-23 22:38:50 +00:00
< div class = "highlight" > < 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" > " primary" < / span > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s" > " There may be pirates" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " skull-crossbones" < / 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 >
2022-04-02 13:30:16 +00:00
< / 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 >
2022-05-23 22:38:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode (positional)" data-tab-group = "shortcode-parameter" class = "tab-item " >
2022-05-23 22:38:50 +00:00
< div class = "highlight" > < 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" > " There may be pirates" < / span > < span class = "s" > " skull-crossbones" < / 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 >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/notice.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " style" < / span > < span class = "s" > " primary" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " title" < / span > < span class = "s" > " There may be pirates" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " icon" < / span > < span class = "s" > " skull-crossbones" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "s" > " It is all about the boxes." < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
2022-05-23 22:38:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
< h3 id = "parameter" > Parameter< / h3 >
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Position< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > style< / strong > < / td >
< td style = "text-align:left" > 1< / td >
< td style = "text-align:left" > < code > default< / code > < / td >
2022-10-02 22:25:49 +00:00
< td style = "text-align:left" > The color scheme used to highlight the box content.< br > < br > - by severity: < code > info< / code > , < code > note< / code > , < code > tip< / code > , < code > warning< / code > < br > - by brand color: < code > primary< / code > , < code > secondary< / code > < br > - by color: < code > blue< / code > , < code > green< / code > , < code > grey< / code > , < code > orange< / code > , < code > red< / code > < br > - by special color: < code > default< / code > , < code > transparent< / code > < / td >
2022-05-23 22:38:50 +00:00
< / tr >
< tr >
< td style = "text-align:left" > < strong > title< / strong > < / td >
< td style = "text-align:left" > 2< / td >
< td style = "text-align:left" > see notes< / td >
2022-10-31 14:06:51 +00:00
< td style = "text-align:left" > 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 colors: < em > < empty> < / em > < br > < br > If you want no title for a severity style, you have to set this parameter to < code > " " < / code > (a non empty string filled with spaces)< / td >
2022-05-23 22:38:50 +00:00
< / tr >
< tr >
< td style = "text-align:left" > < strong > icon< / strong > < / td >
< td style = "text-align:left" > 3< / td >
< td style = "text-align:left" > see notes< / td >
2022-11-05 23:35:48 +00:00
< td style = "text-align:left" > < a href = "../cont/icons/#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 colors: < em > < empty> < / em > < br > < br > If you want no icon for a severity style, you have to set this parameter to < code > " " < / code > (a non empty string filled with spaces)< / td >
2022-05-23 22:38:50 +00:00
< / tr >
2022-06-22 22:08:50 +00:00
< tr >
< td style = "text-align:left" > < em > < strong > < content> < / strong > < / em > < / td >
< td style = "text-align:left" > < / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
2022-10-31 14:06:51 +00:00
< td style = "text-align:left" > Arbitrary text to be displayed in box.< / td >
2022-06-22 22:08:50 +00:00
< / tr >
2022-05-23 22:38:50 +00:00
< / tbody >
< / table >
2022-04-02 13:30:16 +00:00
< h2 id = "examples" > Examples< / h2 >
2022-05-23 22:38:50 +00:00
< h3 id = "by-severity" > By Severity< / h3 >
< h4 id = "info-with-markup" > Info with markup< / h4 >
< div class = "highlight" > < 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" > " info" < / 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" > information< / span > < span class = "o" > **< / span > < span class = "nx" > disclaimer< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" >
2022-05-23 13:00:05 +00:00
< / 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 >
2022-04-02 13:30:16 +00:00
< / 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)
2022-05-23 13:00:05 +00:00
< / 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 >
2022-04-02 13:30:16 +00:00
< / 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" >
2022-10-31 14:06:51 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > > < / 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 >
2022-04-02 13:30:16 +00:00
< / 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 >
2022-06-07 18:30:50 +00:00
< div class = "box notices cstyle info" >
< div class = "box-label" > < i class = "fa-fw fas fa-info-circle" > < / i > Info< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
2022-06-07 18:30:50 +00:00
< p > An < strong > information< / strong > disclaimer< / p >
< 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" > links< / a > < / li >
< li > etc.< / li >
< / ul >
< div class = "highlight" > < 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 >
2022-10-31 14:06:51 +00:00
< p > the possibilities are endless (almost - including other shortcodes may or may not work)< / p >
2022-06-07 18:30:50 +00:00
< / blockquote >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "note" > Note< / h4 >
2022-05-23 22:38:50 +00:00
< div class = "highlight" > < 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" > " note" < / 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" > notice< / span > < span class = "o" > **< / span > < span class = "nx" > disclaimer< / span >
2022-04-02 13:30:16 +00:00
< / 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 >
2022-06-07 18:30:50 +00:00
< 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 > A < strong > notice< / strong > disclaimer< / p >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-05-23 22:38:50 +00:00
< h4 id = "tip" > Tip< / h4 >
2022-06-07 18:30:50 +00:00
< div class = "highlight" > < 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" > " tip" < / 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" > tip< / span > < span class = "o" > **< / span > < span class = "nx" > disclaimer< / span >
< / span > < / span > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle tip" >
< div class = "box-label" > < i class = "fa-fw fas fa-lightbulb" > < / i > Tip< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > A < strong > tip< / strong > disclaimer< / p >
< / div >
< / div >
2022-05-23 22:38:50 +00:00
< h4 id = "warning" > Warning< / h4 >
< div class = "highlight" > < 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" > " warning" < / 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" > warning< / 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 >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle warning" >
2022-06-07 18:30:50 +00:00
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-triangle" > < / i > Warning< / div >
2022-05-23 22:38:50 +00:00
< div class = "box-content" >
< p > A < strong > warning< / strong > disclaimer< / p >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "warning-with-non-default-title-and-icon" > Warning with Non-Default Title and Icon< / h4 >
2022-05-23 22:38:50 +00:00
< div class = "highlight" > < 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" > " warning" < / span > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s" > " Here are dragons" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " dragon" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > A< / span > < span class = "o" > **< / span > < span class = "nx" > warning< / 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 >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle warning" >
2022-06-07 18:30:50 +00:00
< div class = "box-label" > < i class = "fa-fw fas fa-dragon" > < / i > Here are dragons< / div >
2022-05-23 22:38:50 +00:00
< div class = "box-content" >
< p > A < strong > warning< / strong > disclaimer< / p >
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "warning-without-a-title-and-icon" > Warning without a Title and Icon< / h4 >
2022-05-23 22:38:50 +00:00
< div class = "highlight" > < 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" > " warning" < / span > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s" > " " < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " " < / 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" > warning< / 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 >
2022-06-07 18:30:50 +00:00
< div class = "box notices cstyle warning" >
< div class = "box-label" > < / div >
< div class = "box-content" >
< p > A < strong > warning< / strong > disclaimer< / p >
2022-05-23 22:38:50 +00:00
< / div >
< / div >
< h3 id = "by-brand-colors" > By Brand Colors< / h3 >
2022-06-05 17:32:37 +00:00
< h4 id = "primary-with-title-only" > Primary with Title only< / h4 >
2022-06-07 18:30:50 +00:00
< div class = "highlight" > < 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" > " primary" < / span > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s" > " Primary" < / 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 > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle primary" >
2022-05-23 22:38:50 +00:00
< div class = "box-label" > Primary< / div >
< div class = "box-content" >
< p > A < strong > primary< / strong > disclaimer< / p >
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "secondary-with-icon-only" > Secondary with Icon only< / h4 >
< div class = "highlight" > < 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" > " secondary" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " stopwatch" < / 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 >
2022-05-23 22:38:50 +00:00
< / 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 >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle secondary" >
< div class = "box-label" > < i class = "fa-fw fas fa-stopwatch" > < / i > < / div >
2022-05-23 22:38:50 +00:00
< div class = "box-content" >
< p > A < strong > secondary< / strong > disclaimer< / p >
< / div >
< / div >
< h3 id = "by-color" > By Color< / h3 >
2022-06-05 17:32:37 +00:00
< h4 id = "blue-without-a-title-and-icon" > Blue without a Title and Icon< / h4 >
2022-06-07 18:30:50 +00:00
< div class = "highlight" > < 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" > " blue" < / 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 > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle blue" >
2022-05-23 22:38:50 +00:00
< div class = "box-label" > < / div >
< div class = "box-content" >
< p > A < strong > blue< / strong > disclaimer< / p >
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "green-with-title-only" > Green with Title only< / h4 >
< div class = "highlight" > < 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" > " green" < / span > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s" > " Green" < / 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 >
2022-05-23 22:38:50 +00:00
< / 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 >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle green" >
2022-05-23 22:38:50 +00:00
< div class = "box-label" > Green< / div >
< div class = "box-content" >
< p > A < strong > green< / strong > disclaimer< / p >
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "grey-with-icon-only" > Grey with Icon only< / h4 >
< div class = "highlight" > < 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" > " grey" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " bug" < / 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 >
2022-05-23 22:38:50 +00:00
< / 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 >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle grey" >
< div class = "box-label" > < i class = "fa-fw fas fa-bug" > < / i > < / div >
2022-05-23 22:38:50 +00:00
< div class = "box-content" >
< p > A < strong > grey< / strong > disclaimer< / p >
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "orange-with-title-and-icon" > Orange with Title and Icon< / h4 >
< div class = "highlight" > < 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" > " orange" < / span > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s" > " Orange" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " bug" < / 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 >
2022-05-23 22:38:50 +00:00
< / 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 >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle orange" >
< div class = "box-label" > < i class = "fa-fw fas fa-bug" > < / i > Orange< / div >
2022-05-23 22:38:50 +00:00
< div class = "box-content" >
< p > A < strong > orange< / strong > disclaimer< / p >
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "red" > Red< / h4 >
< div class = "highlight" > < 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" > " red" < / 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 >
2022-05-23 22:38:50 +00:00
< / 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 >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle red" >
2022-05-23 22:38:50 +00:00
< div class = "box-label" > < / div >
< div class = "box-content" >
< p > A < strong > red< / strong > disclaimer< / p >
< / div >
< / div >
< h3 id = "by-special-color" > By Special Color< / h3 >
2022-06-05 17:32:37 +00:00
< h4 id = "default-with-title-and-icon" > Default with Title and Icon< / h4 >
2022-05-23 22:38:50 +00:00
< div class = "highlight" > < 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" > " default" < / span > < span class = "nx" > title< / span > < span class = "s" > " Pay Attention to this Note!" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " skull-crossbones" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Some< / span > < span class = "nx" > serious< / span > < span class = "nx" > information< / 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 >
2022-06-07 18:30:50 +00:00
< div class = "box notices cstyle default" >
2022-05-29 21:00:53 +00:00
< div class = "box-label" > < i class = "fa-fw fas fa-skull-crossbones" > < / i > Pay Attention to this Note!< / div >
2022-05-23 22:38:50 +00:00
< div class = "box-content" >
< p > Some serious information.< / p >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-07 18:30:50 +00:00
< h4 id = "transparent-with-title-and-icon" > Transparent with Title and Icon< / h4 >
2022-05-23 22:38:50 +00:00
< div class = "highlight" > < 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" > " transparent" < / span > < span class = "nx" > title< / span > < span class = "s" > " Pay Attention to this Note!" < / span > < span class = "nx" > icon< / span > < span class = "p" > =< / span > < span class = "s" > " skull-crossbones" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > Some< / span > < span class = "nx" > serious< / span > < span class = "nx" > information< / span > < span class = "p" > .< / span >
2022-04-02 13:30:16 +00:00
< / 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 >
2022-06-07 18:30:50 +00:00
< div class = "box notices cstyle transparent" >
< div class = "box-label" > < i class = "fa-fw fas fa-skull-crossbones" > < / i > Pay Attention to this Note!< / div >
< div class = "box-content" >
< p > Some serious information.< / p >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "site-param" > Site param< / h1 >
2022-07-05 22:16:52 +00:00
2022-06-05 17:32:37 +00:00
< p > The < code > siteparam< / code > shortcode prints values of site params.< / p >
2022-04-02 13:30:16 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter you are free to use positional aswell or call this shortcode from your own partials.< / p >
2022-06-05 17:32:37 +00:00
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
2022-06-22 22:08:50 +00:00
data-tab-item="shortcode"
2022-06-05 17:32:37 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
2022-06-05 17:32:37 +00:00
< button
2022-06-22 22:08:50 +00:00
data-tab-item="shortcode (positional)"
2022-06-05 17:32:37 +00:00
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode (positional)')"
>< span > shortcode (positional)< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
2022-06-05 17:32:37 +00:00
< / div >
< div class = "tab-content" >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " editURL" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
2022-06-22 22:08:50 +00:00
< div data-tab-item = "shortcode (positional)" data-tab-group = "shortcode-parameter" class = "tab-item " >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > " editURL" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/siteparam.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " name" < / span > < span class = "s" > " editURL" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
< h3 id = "parameter" > Parameter< / h3 >
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Position< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > name< / strong > < / td >
< td style = "text-align:left" > 1< / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
< td style = "text-align:left" > The name of the site param to be displayed.< / td >
< / tr >
< / tbody >
< / table >
2022-04-02 13:30:16 +00:00
< h2 id = "examples" > Examples< / h2 >
2022-06-05 17:32:37 +00:00
< h3 id = "editurl-from-configtoml" > < code > editURL< / code > from < code > config.toml< / code > < / h3 >
< div class = "highlight" > < 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" > " editURL" < / 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/" > https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/< / a > < / p >
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "swagger" > Swagger< / h1 >
2022-07-05 22:16:52 +00:00
2022-06-05 17:32:37 +00:00
< p > This shortcode uses the < a href = "https://mrin9.github.io/RapiDoc" > RapiDoc< / a > library to display your Swagger / OpenAPI Specifications.< / p >
2022-04-02 13:30:16 +00:00
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle note" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Note< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > This only works in modern browsers.< / p >
< / div >
< / div >
2022-06-05 17:32:37 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.< / p >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="shortcode"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > swagger< / span > < span class = "nx" > src< / span > < span class = "p" > =< / span > < span class = "s" > " https://petstore3.swagger.io/api/v3/openapi.json" < / span > < span class = "p" > > }}< / span >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/swagger.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " src" < / span > < span class = "s" > " https://petstore3.swagger.io/api/v3/openapi.json" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > )}}< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
< h3 id = "parameter" > Parameter< / h3 >
2022-06-05 17:32:37 +00:00
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > < strong > src< / strong > < / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
< td style = "text-align:left" > The URL to the OpenAPI Specification file. This can be relative to the URL of your page if it is a leaf or branch bundle.< / td >
< / tr >
< / tbody >
< / table >
2022-10-06 20:51:16 +00:00
< 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 > If you want to print out (or generate a PDF) from your Swagger documentation, don’ t initiate printing directly from the page because the elements are optimized for interactive usage in a browser.< / p >
2022-11-05 23:35:48 +00:00
< p > Instead, open the < a href = "../basics/configuration/#activate-print-support" > 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 >
2022-10-06 20:51:16 +00:00
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< h2 id = "configuration" > Configuration< / h2 >
< p > Swagger is configured with default settings. You can customize Swagger’ s default settings for all of your files thru a JSON object in your < code > config.toml< / code > or override these settings per page thru your pages frontmatter.< / p >
< p > The JSON object of your < code > config.toml< / code > / frontmatter is forwarded into Swagger’ s initialization. At the moment, only the < code > theme< / code > setting is supported.< / p >
< p > The < code > theme< / code > setting can also be set by your used color variant. This will be the sitewide default and can - again - be overridden by your settings in < code > config.toml< / code > or frontmatter.< / p >
2022-06-05 17:32:37 +00:00
< h3 id = "global-configuration-file" > Global Configuration File< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > swaggerInitialize< / span > < span class = "p" > =< / span > < span class = "s2" > " { \" theme\" : \" dark\" }" < / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div > < h2 id = "example" > Example< / h2 >
< h3 id = "using-local-file" > Using Local File< / h3 >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > swagger< / span > < span class = "nx" > src< / span > < span class = "p" > =< / span > < span class = "s" > " petstore.json" < / span > < span class = "p" > > }}< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div >
2022-04-02 13:30:16 +00:00
< rapi-doc
2022-10-06 13:49:10 +00:00
allow-spec-file-download="false"
allow-server-selection="false"
allow-try="false"
2022-10-06 20:30:40 +00:00
font-size="default"
2022-10-06 13:49:10 +00:00
render-style="read"
2022-04-02 13:30:16 +00:00
default-schema-tab="example"
layout="column"
load-fonts="false"
schema-description-expanded="true"
schema-style="table"
show-header="false"
2022-11-05 23:35:48 +00:00
spec-url="../shortcodes/swagger/petstore.json"
2022-04-02 13:30:16 +00:00
sort-tags="true"
>< / rapi-doc >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "tabbed-views" > Tabbed views< / h1 >
2022-07-05 22:16:52 +00:00
2022-06-05 17:32:37 +00:00
< p > The < code > tabs< / code > shortcode displays arbitrary content in unlimited number of tabs. This comes in handy eg. for providing code snippets for multiple languages or providing configuration in different formats.< / p >
2022-04-02 13:30:16 +00:00
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="python"
2022-05-29 21:35:48 +00:00
data-tab-group="tabs-example-language"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-05-29 21:35:48 +00:00
onclick="switchTab('tabs-example-language','python')"
2022-04-02 13:30:16 +00:00
>< span > python< / span > < / button >
< button
2022-06-05 17:32:37 +00:00
data-tab-item="bash"
2022-05-29 21:35:48 +00:00
data-tab-group="tabs-example-language"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-05 17:32:37 +00:00
onclick="switchTab('tabs-example-language','bash')"
>< span > bash< / span > < / button >
2022-04-02 13:30:16 +00:00
< / div >
< div class = "tab-content" >
2022-05-29 21:35:48 +00:00
< div data-tab-item = "python" data-tab-group = "tabs-example-language" class = "tab-item active" >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > " Hello World!" < / span > < span class = "p" > )< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
2022-06-05 17:32:37 +00:00
< div data-tab-item = "bash" data-tab-group = "tabs-example-language" class = "tab-item " >
< div class = "highlight" > < 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" > " Hello World!" < / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
2022-06-05 17:32:37 +00:00
< h2 id = "usage" > Usage< / h2 >
2022-06-22 22:08:50 +00:00
< p > While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.< / p >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="shortcode"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','shortcode')"
>< span > shortcode< / span > < / button >
< button
data-tab-item="partial"
data-tab-group="shortcode-parameter"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-22 22:08:50 +00:00
onclick="switchTab('shortcode-parameter','partial')"
>< span > partial< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "shortcode" data-tab-group = "shortcode-parameter" class = "tab-item active" >
2022-06-05 17:32:37 +00:00
< div class = "highlight" > < 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" > tabs< / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " python" < / 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(" Hello World!" )
< / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " bash" < / 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 " Hello World!"
< / 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" > tabs< / span > < span class = "p" > > }}< / span >
2022-06-22 22:08:50 +00:00
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "partial" data-tab-group = "shortcode-parameter" class = "tab-item " >
< div class = "highlight" > < 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" > " shortcodes/tabs.html" < / span > < span class = "p" > (< / span > < span class = "nx" > dict< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " context" < / span > < span class = "p" > .< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " tabs" < / 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" > " name" < / span > < span class = "s" > " python" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "p" > (< / span > < span class = "s" > " ```python\nprint(\" Hello World!\" )\n```" < / span > < span class = "p" > |< / span > < span class = "nx" > markdownify< / 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" > " name" < / span > < span class = "s" > " bash" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " content" < / span > < span class = "p" > (< / span > < span class = "s" > " ```bash\necho \" Hello World!\" \n```" < / span > < span class = "p" > |< / span > < span class = "nx" > markdownify< / 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 >
< h3 id = "parameter" > Parameter< / h3 >
2022-06-05 17:32:37 +00:00
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Default< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
2022-06-23 11:25:28 +00:00
< td style = "text-align:left" > < strong > groupid< / strong > < / td >
2022-06-05 17:32:37 +00:00
< td style = "text-align:left" > < code > default< / code > < / td >
2022-10-02 22:25:49 +00:00
< td style = "text-align:left" > Arbitrary name of the group the tab view belongs to.< br > < br > Tab views with the same < strong > groupid< / strong > sychronize their selected tab. This sychronization applies to the whole site!< / td >
2022-06-05 17:32:37 +00:00
< / tr >
< tr >
< td style = "text-align:left" > < em > < strong > < content> < / strong > < / em > < / td >
< td style = "text-align:left" > < em > < empty> < / em > < / td >
< td style = "text-align:left" > Arbitrary number of tabs defined with the < code > tab< / code > sub-shortcode.< / td >
< / tr >
< / tbody >
< / table >
2022-04-02 13:30:16 +00:00
2022-06-22 22:08:50 +00:00
< div class = "box notices cstyle note" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Note< / div >
2022-06-05 17:32:37 +00:00
< div class = "box-content" >
2022-06-23 11:25:28 +00:00
< p > When using tab views with different content sets, make sure to use a common < code > groupid< / code > for equal sets of tabs but distinct < code > groupid< / code > for different sets.< / p >
< p > The tab selection is restored automatically based on the < code > groupid< / code > and if it cannot find a tab item because it came from the < code > 'default'< / code > group on a different page then the first tab is selected instead.< / p >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-05 17:32:37 +00:00
< h2 id = "examples" > Examples< / h2 >
2022-06-23 11:25:28 +00:00
< h3 id = "distinct-groupid" > Distinct < code > groupid< / code > < / h3 >
< div class = "highlight" > < 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" > tabs< / span > < span class = "nx" > groupid< / span > < span class = "p" > =< / span > < span class = "s" > " config" < / span > < span class = "p" > > }}< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< / span > < span class = "o" > %< / span > < span class = "nx" > tab< / span > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s" > " json" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > ```json
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > {
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " Hello" : " World"
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > }
< / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " XML" < / 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" > < Hello> World< /Hello>
< / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " properties" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > ```properties
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > Hello = World
< / 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" > tabs< / span > < span class = "p" > > }}< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < / code > < / pre > < / div >
2022-04-02 13:30:16 +00:00
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="json"
2022-05-29 21:35:48 +00:00
data-tab-group="tabs-example-config"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-05-29 21:35:48 +00:00
onclick="switchTab('tabs-example-config','json')"
2022-04-02 13:30:16 +00:00
>< span > json< / span > < / button >
< button
data-tab-item="XML"
2022-05-29 21:35:48 +00:00
data-tab-group="tabs-example-config"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-05-29 21:35:48 +00:00
onclick="switchTab('tabs-example-config','XML')"
2022-04-02 13:30:16 +00:00
>< span > XML< / span > < / button >
< button
data-tab-item="properties"
2022-05-29 21:35:48 +00:00
data-tab-group="tabs-example-config"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-05-29 21:35:48 +00:00
onclick="switchTab('tabs-example-config','properties')"
2022-04-02 13:30:16 +00:00
>< span > properties< / span > < / button >
< / div >
< div class = "tab-content" >
2022-05-29 21:35:48 +00:00
< div data-tab-item = "json" data-tab-group = "tabs-example-config" class = "tab-item active" >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < 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" > " Hello" < / span > < span class = "p" > :< / span > < span class = "s2" > " World" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
2022-05-29 21:35:48 +00:00
< div data-tab-item = "XML" data-tab-group = "tabs-example-config" class = "tab-item " >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-xml" data-lang = "xml" > < span class = "line" > < span class = "cl" > < span class = "nt" > < Hello> < / span > World< span class = "nt" > < /Hello> < / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
2022-05-29 21:35:48 +00:00
< div data-tab-item = "properties" data-tab-group = "tabs-example-config" class = "tab-item " >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-ini" data-lang = "ini" > < span class = "line" > < span class = "cl" > < span class = "na" > Hello< / span > < span class = "o" > =< / span > < span class = "s" > World< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
2022-06-23 11:25:28 +00:00
< h3 id = "non-distinct-groupid" > Non-Distinct < code > groupid< / code > < / h3 >
2022-06-05 17:32:37 +00:00
< p > See what happens to this tab view if you select < strong > properties< / strong > tab from the previous example.< / p >
2022-06-23 11:25:28 +00:00
< div class = "highlight" > < 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" > tabs< / span > < span class = "nx" > groupid< / span > < span class = "p" > =< / span > < span class = "s" > " config" < / span > < span class = "p" > > }}< / span >
2022-06-05 17:32:37 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< / span > < span class = "o" > %< / span > < span class = "nx" > tab< / span > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s" > " json" < / span > < span class = "o" > %< / span > < span class = "p" > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > ```json
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > {
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > " Hello" : " World"
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s" > }
< / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " XML" < / 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" > < Hello> World< /Hello>
< / 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" > tabs< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="json"
data-tab-group="tabs-example-config"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr active"
2022-06-05 17:32:37 +00:00
onclick="switchTab('tabs-example-config','json')"
>< span > json< / span > < / button >
< button
data-tab-item="XML"
data-tab-group="tabs-example-config"
2022-11-01 01:10:49 +00:00
class="tab-nav-button direction-ltr "
2022-06-05 17:32:37 +00:00
onclick="switchTab('tabs-example-config','XML')"
>< span > XML< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "json" data-tab-group = "tabs-example-config" class = "tab-item active" >
< div class = "highlight" > < 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" > " Hello" < / span > < span class = "p" > :< / span > < span class = "s2" > " World" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "XML" data-tab-group = "tabs-example-config" class = "tab-item " >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-xml" data-lang = "xml" > < span class = "line" > < span class = "cl" > < span class = "nt" > < Hello> < / span > World< span class = "nt" > < /Hello> < / span >
< / span > < / span > < / code > < / pre > < / div >
2022-11-17 21:58:05 +00:00
< / div >
< / div >
< / div >
< h3 id = "nested-tabs" > Nested Tabs< / h3 >
< p > In case you want to nest tabs, the parent tab that contains the subtabs needs to be declared with < code > {{< tab > }}< / code > instead of < code > {{% tab %}}< / code > . Note, that in this case it is not possible to put markdown in the parent tab.< / p >
< div class = "highlight" > < 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" > tabs< / span > < span class = "nx" > groupid< / span > < span class = "p" > =< / span > < span class = "s" > " main" < / span > < span class = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "nx" > tab< / span > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s" > " Text" < / span > < span class = "p" > > }}< / 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" > {{< < / span > < span class = "nx" > tabs< / span > < span class = "nx" > groupid< / span > < span class = "p" > =< / span > < span class = "s" > " tabs-example-language" < / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " python" < / 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" > ' < / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " bash" < / 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" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > tabs< / 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 = "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" > tab< / span > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s" > " Code" < / span > < span class = "p" > > }}< / 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" > {{< < / span > < span class = "nx" > tabs< / span > < span class = "nx" > groupid< / span > < span class = "p" > =< / span > < span class = "s" > " tabs-example-language" < / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " python" < / 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(" Hello World!" )
< / 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" > name< / span > < span class = "p" > =< / span > < span class = "s" > " bash" < / 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 " Hello World!"
< / 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" > tabs< / 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 = "p" > > }}< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {{< < / span > < span class = "o" > /< / span > < span class = "nx" > tabs< / span > < span class = "p" > > }}< / span >
< / span > < / span > < / code > < / pre > < / div >
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="Text"
data-tab-group="main"
class="tab-nav-button direction-ltr active"
onclick="switchTab('main','Text')"
>< span > Text< / span > < / button >
< button
data-tab-item="Code"
data-tab-group="main"
class="tab-nav-button direction-ltr "
onclick="switchTab('main','Code')"
>< span > Code< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "Text" data-tab-group = "main" class = "tab-item active" >
Simple text is possible here...
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="python"
data-tab-group="tabs-example-language"
class="tab-nav-button direction-ltr active"
onclick="switchTab('tabs-example-language','python')"
>< span > python< / span > < / button >
< button
data-tab-item="bash"
data-tab-group="tabs-example-language"
class="tab-nav-button direction-ltr "
onclick="switchTab('tabs-example-language','bash')"
>< span > bash< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "python" data-tab-group = "tabs-example-language" class = "tab-item active" >
< p > Python is < strong > super< / strong > easy.< / p >
< ul >
< li > most of the time.< / li >
< li > if you don’ t want to output unicode< / li >
< / ul >
< / div >
< div data-tab-item = "bash" data-tab-group = "tabs-example-language" class = "tab-item " >
< p > Bash is for < strong > hackers< / strong > .< / p >
< / div >
< / div >
< / div >
< / div >
< div data-tab-item = "Code" data-tab-group = "main" class = "tab-item " >
...but no markdown
< div class = "tab-panel" >
< div class = "tab-nav" >
< button
data-tab-item="python"
data-tab-group="tabs-example-language"
class="tab-nav-button direction-ltr active"
onclick="switchTab('tabs-example-language','python')"
>< span > python< / span > < / button >
< button
data-tab-item="bash"
data-tab-group="tabs-example-language"
class="tab-nav-button direction-ltr "
onclick="switchTab('tabs-example-language','bash')"
>< span > bash< / span > < / button >
< / div >
< div class = "tab-content" >
< div data-tab-item = "python" data-tab-group = "tabs-example-language" class = "tab-item active" >
< div class = "highlight" > < 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" > " Hello World!" < / span > < span class = "p" > )< / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< div data-tab-item = "bash" data-tab-group = "tabs-example-language" class = "tab-item " >
< div class = "highlight" > < 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" > " Hello World!" < / span >
< / span > < / span > < / code > < / pre > < / div >
< / div >
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< / div >
2022-06-05 17:32:37 +00:00
< / div >
2022-04-02 13:30:16 +00:00
< / div >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-07-17 23:32:02 +00:00
< / section > < / div >
2022-04-02 13:30:16 +00:00
< / main >
< / div >
2022-11-18 20:10:44 +00:00
< script src = "../js/clipboard.min.js?1668802240" defer > < / script >
< script src = "../js/perfect-scrollbar.min.js?1668802240" defer > < / script >
< script src = "../js/featherlight.min.js?1668802240" defer > < / script >
2022-07-02 12:20:53 +00:00
< script >
function useMathJax( config ){
2022-07-17 18:04:59 +00:00
if( !Object.assign ){
return;
}
window.MathJax = Object.assign( window.MathJax || {}, {
2022-07-02 12:20:53 +00:00
loader: {
load: ['[tex]/mhchem']
},
startup: {
elements: [
'.math'
]
},
tex: {
inlineMath: [
['$', '$'],
['\\(', '\\)']
]
},
options: {
enableMenu: false
}
}, config );
}
useMathJax( JSON.parse("{}") );
< / script >
2022-11-18 20:10:44 +00:00
< script id = "MathJax-script" async src = "../js/mathjax/tex-mml-chtml.js?1668802240" > < / script >
< script src = "../js/jquery.svg.pan.zoom.js?1668802240" defer > < / script >
< script src = "../js/mermaid.min.js?1668802240" defer > < / script >
2022-04-02 13:30:16 +00:00
< script >
2022-07-17 18:04:59 +00:00
window.themeUseMermaid = JSON.parse("{ \"securityLevel\": \"loose\" }");
2022-04-02 13:30:16 +00:00
< / script >
2022-11-18 20:10:44 +00:00
< script src = "../js/rapidoc-min.js?1668802240" defer > < / script >
2022-04-02 13:30:16 +00:00
< script >
2022-07-17 18:04:59 +00:00
window.themeUseSwagger = JSON.parse("{}");
2022-04-02 13:30:16 +00:00
< / script >
2022-11-18 20:10:44 +00:00
< script src = "../js/theme.js?1668802240" defer > < / script >
2022-04-02 13:30:16 +00:00
< / body >
< / html >