mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-12-17 19:33:30 +00:00
405 lines
42 KiB
HTML
405 lines
42 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
|
<meta name="generator" content="Hugo 0.120.4">
|
|
<meta name="generator" content="Relearn 5.23.2+tip">
|
|
<meta name="description" content="Documentation for Hugo Relearn Theme">
|
|
<meta name="author" content="Sören Weber">
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:image" content="https://McShelby.github.io/hugo-theme-relearn/images/hero.png">
|
|
<meta name="twitter:title" content="Frontmatter :: Hugo Relearn Theme">
|
|
<meta name="twitter:description" content="Documentation for Hugo Relearn Theme">
|
|
<meta property="og:title" content="Frontmatter :: Hugo Relearn Theme">
|
|
<meta property="og:description" content="Documentation for Hugo Relearn Theme">
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:url" content="https://McShelby.github.io/hugo-theme-relearn/cont/frontmatter/index.html">
|
|
<meta property="og:image" content="https://McShelby.github.io/hugo-theme-relearn/images/hero.png">
|
|
<meta property="og:site_name" content="Hugo Relearn Theme">
|
|
<title>Frontmatter :: Hugo Relearn Theme</title>
|
|
<link href="https://McShelby.github.io/hugo-theme-relearn/cont/frontmatter/index.html" rel="alternate" hreflang="x-default">
|
|
<link href="https://McShelby.github.io/hugo-theme-relearn/cont/frontmatter/index.html" rel="alternate" hreflang="en">
|
|
<link href="https://McShelby.github.io/hugo-theme-relearn/pir/cont/frontmatter/index.html" rel="alternate" hreflang="art-pir">
|
|
<link href="https://McShelby.github.io/hugo-theme-relearn/cont/frontmatter/index.html" rel="canonical" type="text/html" title="Frontmatter :: Hugo Relearn Theme">
|
|
<link href="../../cont/frontmatter/index.xml" rel="alternate" type="application/rss+xml" title="Frontmatter :: Hugo Relearn Theme">
|
|
<link href="../../images/logo.svg?1701287249" rel="icon" type="image/svg+xml">
|
|
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use -->
|
|
<link href="../../css/fontawesome-all.min.css?1701287250" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../css/fontawesome-all.min.css?1701287250" rel="stylesheet"></noscript>
|
|
<link href="../../css/nucleus.css?1701287250" rel="stylesheet">
|
|
<link href="../../css/auto-complete.css?1701287250" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../css/auto-complete.css?1701287250" rel="stylesheet"></noscript>
|
|
<link href="../../css/perfect-scrollbar.min.css?1701287250" rel="stylesheet">
|
|
<link href="../../css/fonts.css?1701287250" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../css/fonts.css?1701287250" rel="stylesheet"></noscript>
|
|
<link href="../../css/theme.css?1701287250" rel="stylesheet">
|
|
<link href="../../css/theme-relearn-auto.css?1701287250" rel="stylesheet" id="R-variant-style">
|
|
<link href="../../css/chroma-relearn-auto.css?1701287250" rel="stylesheet" id="R-variant-chroma-style">
|
|
<link href="../../css/variant.css?1701287250" rel="stylesheet">
|
|
<link href="../../css/print.css?1701287250" rel="stylesheet" media="print">
|
|
<link href="../../css/format-print.css?1701287250" rel="stylesheet">
|
|
<link href="../../css/ie.css?1701287250" rel="stylesheet">
|
|
<script src="../../js/url.js?1701287250"></script>
|
|
<script src="../../js/variant.js?1701287250"></script>
|
|
<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
|
|
window.index_js_url="../../index.search.js";
|
|
var root_url="../../";
|
|
var baseUri=root_url.replace(/\/$/, '');
|
|
window.relearn = window.relearn || {};
|
|
window.relearn.baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
|
|
// variant stuff
|
|
window.variants && variants.init( [ 'relearn-auto', 'relearn-light', 'relearn-dark', 'relearn-bright', 'zen-auto', 'zen-light', 'zen-dark', 'neon', 'learn', 'blue', 'green', 'red' ] );
|
|
// translations
|
|
window.T_Copy_to_clipboard = `Copy to clipboard`;
|
|
window.T_Copied_to_clipboard = `Copied to clipboard!`;
|
|
window.T_Copy_link_to_clipboard = `Copy link to clipboard`;
|
|
window.T_Link_copied_to_clipboard = `Copied link to clipboard!`;
|
|
window.T_Reset_view = `Reset view`;
|
|
window.T_View_reset = `View reset!`;
|
|
window.T_No_results_found = `No results found for "{0}"`;
|
|
window.T_N_results_found = `{1} results found for "{0}"`;
|
|
</script>
|
|
<style>
|
|
#R-body img.bg-white {
|
|
background-color: white;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="mobile-support print disableInlineCopyToClipboard" data-url="../../cont/frontmatter/index.html">
|
|
<div id="R-body" class="default-animation">
|
|
<div id="R-body-overlay"></div>
|
|
<nav id="R-topbar">
|
|
<div class="topbar-wrapper">
|
|
<div class="topbar-sidebar-divider"></div>
|
|
<div class="topbar-area topbar-area-start" data-area="start">
|
|
<div class="topbar-button topbar-button-sidebar" data-content-empty="disable" data-width-s="show" data-width-m="hide" data-width-l="hide">
|
|
<button class="topbar-control" onclick="toggleNav()" type="button" title="Menu (CTRL+ALT+n)">
|
|
<i class="fa-fw fas fa-bars"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<ol class="topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList"><li
|
|
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><a itemprop="item" href="../../cont/index.html"><span itemprop="name">Content</span></a><meta itemprop="position" content="1"> > </li><li
|
|
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Frontmatter</span><meta itemprop="position" content="2"></li>
|
|
</ol>
|
|
<div class="topbar-area topbar-area-end" data-area="end">
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div id="R-main-overlay"></div>
|
|
<main id="R-body-inner" class="highlightable default" tabindex="-1">
|
|
<div class="flex-block-wrapper">
|
|
<article class="default">
|
|
<header class="headline">
|
|
</header>
|
|
<h1 id="frontmatter">Frontmatter</h1>
|
|
|
|
<p>Each Hugo page has to define a <a href="https://gohugo.io/content/front-matter/" target="_blank">frontmatter</a> in <em>toml</em>, <em>yaml</em> or <em>json</em>. This site will use <em>toml</em> for documentation in all cases.</p>
|
|
<div class="wrap-code 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="c"># If an option value is said to be not set, you can achieve the same behavior</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># by given it an empty string value.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">###############################################################################</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Hugo</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options usually apply to other themes aswell.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The social media image of your page.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># This is used for generating social media meta information for the opengraph</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># protocol and twitter cards.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">images</span> <span class="p">=</span> <span class="p">[</span> <span class="s2">"images/hero.png"</span> <span class="p">]</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The title of your page.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># A page without a title is treated as a hidden page.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">title</span> <span class="p">=</span> <span class="s2">"Example Page"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The description of your page.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># This is used for generating HTML meta tags, social media meta information</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># for the opengraph protocol and twitter cards.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used for the html</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># meta tag, social media meta information for the opengraph protocol and</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># twitter cards.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">description</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">###############################################################################</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Relearn Theme</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options are specific to the Relearn theme.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Topbar</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options modify the topbar appearance.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Hide the table of contents button.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If the TOC button is hidden, also the keyboard shortcut is disabled.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">disableToc</span> <span class="p">=</span> <span class="kc">false</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Hide the breadcrumbs.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If the breadcrumbs are hidden, the title of the displayed page will still be</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># shown in the topbar.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">disableBreadcrumb</span> <span class="p">=</span> <span class="kc">false</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Hide Next and Previous navigation buttons.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If the navigation buttons are hidden, also the keyboard shortcuts are</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># disabled.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">disableNextPrev</span> <span class="p">=</span> <span class="kc">false</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Menu</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options modify the menu apperance.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The title in main menu.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: <title></span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If set, this will be used for the page's menu entry instead of the `title`</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># option.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">menuTitle</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Prefix for the title in main menu.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The title of the page in the menu will be prefixed by this HTML content.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">menuPre</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Suffix for the title in main menu.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The title of the page in the menu will be suffixed by this HTML content.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">menuPost</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The order of main menu submenus.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: "weight"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Submenus can be ordered by "weight", "title", "linktitle", "modifieddate",</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># "expirydate", "publishdate", "date", "length" or "default" (adhering to</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Hugo's default sort order).</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the value of the parent menu entry is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">ordersectionsby</span> <span class="p">=</span> <span class="s2">"weight"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The initial expand state of submenus.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># This controls whether submenus will be expanded (true), or collapsed (false)</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># in the menu. If not set, the first menu level is set to false, all others</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># levels are set to true. If not set, the value of the parent menu entry is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If the displayed page has submenus, they will always been displayed expanded</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># regardless of this option.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">alwaysopen</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Shows expander for submenus.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If set to true, a submenu in the sidebar will be displayed in a collapsible</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># tree view and a clickable expander is set in front of the entry.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">collapsibleMenu</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Hidden pages</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options configure how hidden pages are treated.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># A page flagged as hidden, is only removed from the main menu if you are</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># currently not on this page or the hidden page is not part of current page's</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># ancestors. For all other functionality in Hugo a hidden page behaves like any</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># other page if not otherwise configured.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Hide a page's menu entry.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If this value is true, the page is hidden from the menu.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">hidden</span> <span class="p">=</span> <span class="kc">false</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Content</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options modify how your content is displayed.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Prefix for the title in the content area.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The title of the page heading will be prefixed by this HTML content.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">headingPre</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Suffix for the title in the content area.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># The title of the page heading will be suffixed by this HTML content.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">headingPost</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Display name of the page's last editor.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If set, it will be displayed in the default footer.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">LastModifierDisplayName</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Email address of the page's last editor.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If set together with LastModifierDisplayName, it will be displayed in the</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># default footer.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">LastModifierEmail</span> <span class="p">=</span> <span class="s2">""</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Highlight</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options configure how code is displayed.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Wrap for code blocks.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: true</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># By default lines of code blocks wrap around if the line is too long to be</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># displayed on screen. If you dislike this behavior, you can reconfigure it</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># here.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Note that lines always wrap in print mode regardless of this option.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used or given as a</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># parameter to individual code blocks.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">highlightWrap</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Images</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options configure how images are displayed.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Image effects.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># See the documentation for how you can even add your own arbitrary effects to</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># the list.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># All effect values default to the values of your site's config.toml and can be</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># overridden thru URL parameter given to the image. See the documentation for</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># details.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">imageEffects</span><span class="p">.</span><span class="nx">border</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: true</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">imageEffects</span><span class="p">.</span><span class="nx">lightbox</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">imageEffects</span><span class="p">.</span><span class="nx">shadow</span> <span class="p">=</span> <span class="kc">false</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># MathJax</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options configure how math formulae are displayed.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Initialization options for MathJax.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># A JSON value. See the MathJaxdocumentation for possible parameter.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">mathJaxInitialize</span> <span class="p">=</span> <span class="s2">"{}"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Only load MathJax if needed.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: true</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If a Math shortcode is found, the option will be ignored and</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># MathJax will be loaded regardlessly. The option is still useful in case you</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># are using scripting to set up your graph. In this case no shortcode or</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># codefence is involved and the library is not loaded by default. In this case</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># you can set `disableMathJax=false` in your frontmatter to force the library to</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># be loaded.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">disableMathJax</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># URL for external MathJax library.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Specifies the remote location of the MathJax library. By default the shipped</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># version will be used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">customMathJaxURL</span> <span class="p">=</span> <span class="s2">""</span> <span class="c"># "https://unpkg.com/mathjax/es5/tex-mml-chtml.js"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Mermaid</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options configure how Mermaid graphs are displayed.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Make graphs panable and zoomable</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: false</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># For huge graphs it can be helpful to make them zoomable. Zoomable graphs come</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># with a reset button for the zoom.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used or given as a</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># parameter to individual graphs.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">mermaidZoom</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Initialization options for Mermaid.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># A JSON value. See the Mermaid documentation for possible parameter.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">mermaidInitialize</span> <span class="p">=</span> <span class="s2">"{ \"securityLevel\": \"loose\" }"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Only load Mermaid if needed.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: true</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If a Mermaid shortcode or codefence is found, the option will be ignored and</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Mermaid will be loaded regardlessly. The option is still useful in case you</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># are using scripting to set up your graph. In this case no shortcode or</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># codefence is involved and the library is not loaded by default. In this case</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># you can set `disableMermaid=false` in your frontmatter to force the library to</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># be loaded.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">disableMermaid</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># URL for external Mermaid library.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Specifies the remote location of the Mermaid library. By default the shipped</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># version will be used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">customMermaidURL</span> <span class="p">=</span> <span class="s2">""</span> <span class="c"># "https://unpkg.com/mermaid/dist/mermaid.min.js"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c">#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># OpenApi</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># These options configure how OpenAPI specifications are displayed.</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Only load OpenAPI if needed.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: true</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If a OpenAPI shortcode is found, the option will be ignored and</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># OpenAPI will be loaded regardlessly. The option is still useful in case you</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># are using scripting to set up your graph. In this case no shortcode or</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># codefence is involved and the library is not loaded by default. In this case</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># you can set `disableOpenapi=false` in your frontmatter to force the library to</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># be loaded.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">disableOpenapi</span> <span class="p">=</span> <span class="kc">true</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="c"># URL for external OpenAPI library.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Default: not set</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># Specifies the remote location of the OpenAPI library. By default the shipped</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># version will be used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="c"># If not set, the set value of your site's config.toml is used.</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">customOpenapiURL</span> <span class="p">=</span> <span class="s2">""</span> <span class="c"># "https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="err">+++</span></span></span></code></pre></div><h2 id="some-detailed-examples">Some Detailed Examples</h2>
|
|
<h3 id="add-icon-to-a-menu-entry">Add Icon to a Menu Entry</h3>
|
|
<p>In the page frontmatter, add a <code>menuPre</code> param to insert any HTML code before the menu label. The example below uses the GitHub icon.</p>
|
|
<div class="wrap-code 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">title</span> <span class="p">=</span> <span class="s2">"GitHub repo"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">menuPre</span> <span class="p">=</span> <span class="s2">"<i class='fab fa-github'></i> "</span>
|
|
</span></span><span class="line"><span class="cl"><span class="err">+++</span></span></span></code></pre></div><p><a href="#R-image-0cc9f6e526f5782a66cd2d2a32f403dd" class="lightbox-link"><img src="../../cont/frontmatter/frontmatter-icon.png?width=18.75rem" alt="Title with icon" class="figure-image bg-white border lightbox noshadow" style="height: auto; width: 18.75rem;" loading="lazy"></a>
|
|
<a href="javascript:history.back();" class="lightbox-back" id="R-image-0cc9f6e526f5782a66cd2d2a32f403dd"><img src="../../cont/frontmatter/frontmatter-icon.png?width=18.75rem" alt="Title with icon" class="lightbox-image bg-white border lightbox noshadow" loading="lazy"></a></p>
|
|
<h3 id="ordering-sibling-menupage-entries">Ordering Sibling Menu/Page Entries</h3>
|
|
<p>Hugo provides a <a href="https://gohugo.io/content/ordering/" target="_blank">flexible way</a> to handle order for your pages.</p>
|
|
<p>The simplest way is to set <code>weight</code> parameter to a number.</p>
|
|
<div class="wrap-code 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">title</span> <span class="p">=</span> <span class="s2">"My page"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">weight</span> <span class="p">=</span> <span class="mi">5</span>
|
|
</span></span><span class="line"><span class="cl"><span class="err">+++</span></span></span></code></pre></div><h3 id="using-a-custom-title-for-menu-entries">Using a Custom Title for Menu Entries</h3>
|
|
<p>By default, the Relearn theme will use a page’s <code>title</code> attribute for the menu item (or <code>linkTitle</code> if defined).</p>
|
|
<p>But a page’s title has to be descriptive on its own while the menu is a hierarchy.
|
|
We’ve added the <code>menuTitle</code> parameter for that purpose:</p>
|
|
<p>For example (for a page named <code>content/install/linux.md</code>):</p>
|
|
<div class="wrap-code 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">title</span> <span class="p">=</span> <span class="s2">"Install on Linux"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">menuTitle</span> <span class="p">=</span> <span class="s2">"Linux"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="err">+++</span></span></span></code></pre></div><h3 id="override-expand-state-rules-for-menu-entries">Override Expand State Rules for Menu Entries</h3>
|
|
<p>You can change how the theme expands menu entries on the side of the content with the <code>alwaysopen</code> setting on a per page basis. If <code>alwaysopen=false</code> for any given entry, its children will not be shown in the menu as long as it is not necessary for the sake of navigation.</p>
|
|
<p>The theme generates the menu based on the following rules:</p>
|
|
<ul>
|
|
<li>all parent entries of the active page including their siblings are shown regardless of any settings</li>
|
|
<li>immediate children entries of the active page are shown regardless of any settings</li>
|
|
<li>if not overridden, all other first level entries behave like they would have been given <code>alwaysopen=false</code></li>
|
|
<li>if not overridden, all other entries of levels besides the first behave like they would have been given <code>alwaysopen=true</code></li>
|
|
<li>all visible entries show their immediate children entries if <code>alwaysopen=true</code>; this proceeds recursively</li>
|
|
<li>all remaining entries are not shown</li>
|
|
</ul>
|
|
<p>You can see this feature in action on the example page for <a href="../../shortcodes/children/index.html">children shortcode</a> and its children pages.</p>
|
|
<h2 id="disable-section-pages">Disable Section Pages</h2>
|
|
<p>You may want to structure your pages in a hierachical way but don’t want to generate pages for those sections? The theme got you covered.</p>
|
|
<p>To stay with the initial example: Suppose you want <code>level-one</code> appear in the sidebar but don’t want to generate a page for it. So the entry in the sidebar should not be clickable but should show an expander.</p>
|
|
<p>For this, open <code>content/level-one/_index.md</code> and add the following frontmatter</p>
|
|
<div class="wrap-code 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">collapsibleMenu</span> <span class="p">=</span> <span class="kc">true</span> <span class="c"># this adds the expander to the menu entry if not already set in your config.toml</span>
|
|
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">_build</span><span class="p">]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">render</span> <span class="p">=</span> <span class="s2">"never"</span> <span class="c"># no page will be generated so the page does not have a url</span>
|
|
</span></span><span class="line"><span class="cl"><span class="err">+++</span></span></span></code></pre></div>
|
|
<footer class="footline">
|
|
</footer>
|
|
</article>
|
|
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<script src="../../js/clipboard.min.js?1701287250" defer></script>
|
|
<script src="../../js/perfect-scrollbar.min.js?1701287250" defer></script>
|
|
<script src="../../js/theme.js?1701287250" defer></script>
|
|
</body>
|
|
</html>
|