<liitemscopeitemtype="https://schema.org/ListItem"itemprop="itemListElement"class="a11y-only"><aitemprop="item"href="/hugo-theme-relearn/pir/index.html"><spanitemprop="name">Cap'n Hugo Relearrrn Theme</span></a><metaitemprop="position"content="1"> > </li>
<h2class="children-title"id="partials"><ahref="/hugo-theme-relearn/pir/configuration/customization/partials/index.html">Partials</a></h2><p>Modify'n partials t' yer needs</p>
<h2class="children-title"id="adding-scripts"><ahref="/hugo-theme-relearn/pir/configuration/customization/extending/index.html">Add'n Scripts</a></h2><p>Add further code t' yer ship</p>
<h2class="children-title"id="link-effects"><ahref="/hugo-theme-relearn/pir/configuration/customization/linkeffects/index.html">Link Effects</a></h2><p>How t' extend link effects</p>
<h2class="children-title"id="taxonomies"><ahref="/hugo-theme-relearn/pir/configuration/customization/taxonomy/index.html">Taxonomies</a></h2><p>How t' display custom taxonomies on yer planks</p>
<p>Ye can call other partials from <code>themes/hugo-relearn-themes/</code> besides those 'n <code>themes/hugo-relearn-themes/layouts/partials/_relearn</code>. However, us'n partials not mentioned as customiz'ble below might make future updates more challeng'n.</p>
<p>Th' Relearrrn theme allows ye t' cust'mize various parts o' th' theme by overrid'n partials. This makes th' theme highly configur'ble.</p>
<p>A bloody rule t' follow: Th' less code a partial contains, th' easier it will be t' update th' theme 'n th' future.</p>
<p>Here’s a list o' partials ye can safely override:</p>
<ul>
<li>
<p><code>layouts/partials/content.html</code>: Th' main rrrambl'n o' a plank. Override this t' display additonal plank metadata.</p>
</li>
<li>
<p><code>layouts/partials/content-header.html</code>: Th' header above th' title. By default, it shows tags, but ye can change this.</p>
</li>
<li>
<p><code>layouts/partials/content-footer.html</code>: Th' footer below th' rrrambl'n. By default, it shows author info, modificat'n dates, an' categories. Ye can cust'mize this.</p>
</li>
<li>
<p><code>layouts/partials/custom-header.html</code>: For add'n custom CSS. Remember t' include th' <code>style</code> HTML tag.</p>
</li>
<li>
<p><code>layouts/partials/custom-footer.html</code>: For add'n custom JavaScript. Remember t' include th' <code>script</code> HTML tag.</p>
</li>
<li>
<p><code>layouts/partials/favicon.html</code>: Th' favicon. Ye should definitely cust'mize this.</p>
</li>
<li>
<p><code>layouts/partials/head'n.html</code>: th' page’s title head'ns</p>
</li>
<li>
<p><code>layouts/partials/heading-pre.html</code>: Add rrrambl'n before th' page’s title head'ns. Remember t' consider th' <code>headingPre</code> front matter.</p>
</li>
<li>
<p><code>layouts/partials/heading-post.html</code>: Add rrrambl'n after th' page’s title head'ns. Remember t' consider th' <code>headingPost</code> front matter.</p>
</li>
<li>
<p><code>layouts/partials/logo.html</code>: Th' logo 'n th' top left corner. Ye should cust'mize this.</p>
</li>
<li>
<p><code>layouts/partials/menu-pre.html</code>: Add rrrambl'n before menu items. Remember t' consider th' <code>menuPre</code> front matter.</p>
</li>
<li>
<p><code>layouts/partials/menu-post.html</code>: Add rrrambl'n after menu items. Remember t' consider th' <code>menuPost</code> front matter.</p>
</li>
<li>
<p><code>layouts/partials/menu-footer.html</code>: Th' footer o' th' left menu.</p>
</li>
</ul>
<p>Ye can override other partials from <code>themes/hugo-relearn-themes/</code>, but be careful as this might make future updates more difficult.</p>
<p>A common quest'n be how t' add extra CSS styles or JavaScript t' yer ship. This depends on what ye need.</p>
<h2id="adding-javascript-or-stylesheets-to-all-pages">Add'n JavaScript or Stylesheets t' All Planks</h2>
<h3id="simple-solution">Simple Solut'n</h3>
<p>Previous documentat'n o' Cap'n Hugo recommended add'n <code>css/custom.css</code> and/or <code>js/custom.js</code> t' yer <code>static</code> or <code>assets</code> directory. This be supported by th' theme.</p>
<p>T' gain more flexibility, see th' <ahref="/hugo-theme-relearn/pir/configuration/customization/extending/index.html#flexible-solution">next section</a> below.</p>
<h3id="flexible-solution">Flex'ble Solut'n</h3>
<p>T' add CSS stylesheets, JavaScript files or any other addit'n t' th' <code><head></code> o' every plank, ye can include them 'n <code>layouts/partials/custom-header.html</code> or <code>layouts/partials/custom-footer.html</code>.</p>
<p>However, this can make yer ship larger than necessary if these files be only needed on a few planks. Th' next section explains how t' add dependencies only when needed.</p>
<p>This way o' customizat'n will discard th' mechanism fer th' <ahref="/hugo-theme-relearn/pir/configuration/customization/extending/index.html#simple-solution">simple solut'n</a> above. Ye will have t' add code fer inclusion o' <code>css/custom.css</code> and/or <code>js/custom.js</code> yourself if ye still need this.</p>
<p>Some shorrrtcodes need extra JavaScript an' CSS files. Th' theme only loads these when th' shortcode be used. Ye can use this fer yer own shorrrtcodes too.</p>
<p>For example, t' create a shortcode called <code>myshortcode</code> that needs th' <code>jquery</code> library:</p>
<li>Th' <code>name</code> 'n <code>hugo.toml</code> must match th' <code>Store</code> key used 'n th' shortcode file, prefixed wit' a <code>has</code>.</li>
<li>Th' key o' <code>relearn.dependencies</code> must match th' loader file name.</li>
</ul>
<p>See th' <code>math</code>, <code>mermaid</code>, an' <code>openapi</code> shorrrtcodes fer examples.</p>
<detailsopenclass=" box cstyle notices note">
<summaryclass="box-label"tabindex="-1">
<iclass="fa-fw fas fa-exclamation-circle"></i>
Avast
</summary>
<divclass="box-content">
<p>For advanced customizat'n, ye can use th' dependency loader 'n yer own partials:</p>
<p>Give a unique name fer th' <code>locat'n</code> parameter when ye call it, so ye can distinguish yer loaders behavior depend'n on th' locat'n it was called from.</p>
<p>This plank shows ye, how t' configure custom <ahref="/hugo-theme-relearn/pir/authoring/markdown/index.html#link-effects">link effects</a> on top o' exist'n ones.</p>
<p>This sett'n can also <ahref="/hugo-theme-relearn/pir/authoring/linking/linkeffects/index.html">be overridden by yer front matter</a>.</p>
<p>If ye don’t configure anyth'n 'n yer <code>hugo.toml</code>, th' link effects default t'</p>
<p><spanclass="badge cstyle cyan badge-with-title"><spanclass="badge-title"><iclass="fa-fw fas fa-gears"></i></span><spanclass="badge-content">Opt'n</span></span> Ye can change these sett'ns 'n yer <code>hugo.toml</code> an' add arbitrary custom effects as boolean values (like <code>bg-white</code> 'n th' below snippet).</p>
<divclass="highlight wrap-code"dir="auto"><pretabindex="0"class="chroma"><codeclass="language-markdown"data-lang="markdown"><spanclass="line"><spanclass="cl">[<spanclass="nt">Magic 'n new window</span>](<spanclass="na">images/magic.gif</span>)</span></span></code></pre></div>
<divclass="highlight wrap-code"dir="auto"><pretabindex="0"class="chroma"><codeclass="language-html"data-lang="html"><spanclass="line"><spanclass="cl"><spanclass="p"><</span><spanclass="nt">a</span><spanclass="na">href</span><spanclass="o">=</span><spanclass="s">"/images/magic.gif?target=_blank"</span><spanclass="na">target</span><spanclass="o">=</span><spanclass="s">"_blank"</span><spanclass="na">class</span><spanclass="o">=</span><spanclass="s">"bg-white"</span><spanclass="p">></span>Magic 'n new window<spanclass="p"></</span><spanclass="nt">a</span><spanclass="p">></span></span></span></code></pre></div>
</div>
</div>
</div>
</div><h2id="styling-effects">Styl'n Effects</h2>
<p>If th' result'n effect value be <code>true</code> a class wit' th' effect’s name will be added.</p>
<p>Styles fer default effects be contained 'n th' theme. Add styles fer yer custom effects t' <code>layouts/partials/content-header.html</code>.</p>
<p>For th' above custom effect ye could add th' follow'n style:</p>
<p>This plank shows ye, how t' configure custom <ahref="/hugo-theme-relearn/pir/authoring/markdown/index.html#image-effects">image effects</a> on top o' exist'n ones.</p>
<p>This sett'n can also <ahref="/hugo-theme-relearn/pir/authoring/linking/imageeffects/index.html">be overridden by yer front matter</a>.</p>
<p>If ye don’t configure anyth'n 'n yer <code>hugo.toml</code>, th' image effects default t'</p>
<p><spanclass="badge cstyle cyan badge-with-title"><spanclass="badge-title"><iclass="fa-fw fas fa-gears"></i></span><spanclass="badge-content">Opt'n</span></span> Ye can change these sett'ns 'n yer <code>hugo.toml</code> an' add arbitrary custom effects as boolean values (like <code>bg-white</code> 'n th' below snippet).</p>
<p>Th' theme comes wit' a reasonably configured topbar. Ye can learn how t' <ahref="/hugo-theme-relearn/pir/authoring/frontmatter/topbar/index.html">configure th' defaults 'n this section</a>.</p>
<p><ahref="#R-image-3eb72f18290e1adc25befcb026c792a0"class="lightbox-link"><imgalt="topbar on mobile devices"class="bg-white border lazy lightbox figure-image"loading="lazy"src="/hugo-theme-relearn/configuration/customization/topbar/topbar-closed.png"style=" height: auto; width: auto;"></a>
<ahref="javascript:history.back();"class="lightbox-back"id="R-image-3eb72f18290e1adc25befcb026c792a0"><imgalt="topbar on mobile devices"class="bg-white border lazy lightbox lightbox-image"loading="lazy"src="/hugo-theme-relearn/configuration/customization/topbar/topbar-closed.png"></a></p>
<p>Nevertheless, yer requirements may differ from this configurat'n. Luckily, th' theme has ye covered as th' topbar, its buttons, an' th' functionality behind these buttons be fully configur'ble by ye.</p>
<detailsopenclass=" box cstyle notices tip">
<summaryclass="box-label"tabindex="-1">
<iclass="fa-fw fas fa-lightbulb"></i>
Smarrrt Arrrse
</summary>
<divclass="box-content">
<p>All mentioned file names below can be clicked an' show ye th' implementat'n fer a better understand'n.</p>
</div>
</details>
<h2id="areas">Areas</h2>
<p>Th' default configurat'n comes wit' three predefined areas that may contain an arbitrary set o' buttons.</p>
<ahref="javascript:history.back();"class="lightbox-back"id="R-image-6d428889cdca896fc2d55e8803398e90"><imgalt="topbar wit' default areas marked"class="bg-white border lazy lightbox lightbox-image"loading="lazy"src="/hugo-theme-relearn/configuration/customization/topbar/topbar-areas.png"></a></p>
<ul>
<li><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/area/start.html"rel="external"target="_self"><strong>start</strong></a>: shown between menu an' breadcrumb</li>
<li><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/area/end.html"rel="external"target="_self"><strong>end</strong></a>: shown on th' opposite breadcrumb side 'n comparison t' th' <em>start</em> area</li>
<li><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/area/more.html"rel="external"target="_self"><strong>more</strong></a>: shown when press'n th' <spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-ellipsis-v"></i></span></span><em>more</em> button 'n th' topbar</li>
</ul>
<p>While ye cannot add additional areas 'n th' topbar, ye be free t' configure additional buttons that behave like th' <em>more</em> button, provid'n further user-defined areas.</p>
<h2id="buttons">Buttons</h2>
<p>Th' theme ships wit' th' follow'n predefined buttons (from left t' right 'n th' screenshot):</p>
<ul>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-bars"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/sidebar.html"rel="external"target="_self"><strong>sidebar</strong></a>: opens th' sidebar flyout if 'n mobile layout</li>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-list-alt"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/toc.html"rel="external"target="_self"><strong>toc</strong></a>: <ahref="/hugo-theme-relearn/pir/authoring/frontmatter/topbar/index.html#table-of-contents">opens th' table o' contents 'n an overlay</a></li>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-pen"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/edit.html"rel="external"target="_self"><strong>edit</strong></a>: browses t' th' editable plank if th' <code>editURL</code><ahref="/hugo-theme-relearn/pir/authoring/frontmatter/topbar/index.html#edit-button">parameter be set</a></li>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-code"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/markdown.html"rel="external"target="_self"><strong>source</strong></a>: browses t' th' chapter’s source code if <ahref="/hugo-theme-relearn/pir/configuration/sitemanagement/outputformats/index.html#source-support">markdown support</a> was activated</li>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fab fa-markdown"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/markdown.html"rel="external"target="_self"><strong>markdown</strong></a>: browses t' th' chapter’s markdown source if <ahref="/hugo-theme-relearn/pir/configuration/sitemanagement/outputformats/index.html#markdown-support">markdown support</a> was activated</li>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-print"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/print.html"rel="external"target="_self"><strong>print</strong></a>: browses t' th' chapter’s printable plank if <ahref="/hugo-theme-relearn/pir/configuration/sitemanagement/outputformats/index.html#print-support">print support</a> was activated</li>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-chevron-left"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/prev.html"rel="external"target="_self"><strong>prev</strong></a>: browses t' th' <ahref="/hugo-theme-relearn/pir/authoring/frontmatter/topbar/index.html#arrow-navigation">previous plank</a> if there be one</li>
<li><spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-chevron-right"></i></span></span><ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/next.html"rel="external"target="_self"><strong>next</strong></a>: browses t' th' [next page]authoring/frontmatter/topbar(#arrow-navigation) if there be one</li>
<p>Not all buttons be displayed at every given time. This be configur'ble (see below if interested).</p>
<h2id="redefining-areas">Redefin'n Areas</h2>
<p>Each predefined area an' button comes 'n its own file. By that, it be easy fer ye t' overwrite an area file 'n yer installat'n, reus'n only th' buttons ye like.</p>
<p>E.g., ye can redefine th' predefined <em>end</em> area by add'n th' file <ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/area/end.html"rel="external"target="_self"><code>layouts/partials/topbar/area/end.html</code></a> 'n yer installat'n (not 'n th' theme itself) t' remove all but th' <em>more</em> button.</p>
<p>Th' below example sets an explicit value fer th' <code>onempty</code> parameter, overrid'n th' specific default value fer this button (these defaults vary depend'n on th' button). Th' parameter causes th' <em>more</em> button t' always be displayed instead o' hid'n once its rrrambl'n be empty.</p>
<h2id="defining-own-buttons">Defin'n Own Buttons</h2>
<h3id="button-types">Button Types</h3>
<p>Th' theme distinguishes between two types o' buttons:</p>
<ul>
<li><ahref="/hugo-theme-relearn/pir/configuration/customization/topbar/index.html#button"><strong>button</strong></a>: a click'ble button that either browses t' another ship, triggers a user-defined script or opens an overlay contain'n user-defined rrrambl'n</li>
<li><ahref="/hugo-theme-relearn/pir/configuration/customization/topbar/index.html#area-button"><strong>area-button</strong></a>: th' template fer th' <spanclass="btn cstyle transparent"><span><iclass="fa-fw fas fa-ellipsis-v"></i></span></span><em>more</em> button, t' define yer own area overlay buttons</li>
<p>Depend'n on th' screen width, ye can configure how th' button should behave. Screen width be divided into three classes:</p>
<ul>
<li><strong>s</strong>: (controlled by th' <code>onwidths</code> parameter) mobile layout whar' th' menu sidebar be hidden</li>
<li><strong>m</strong>: (controlled by th' <code>onwidthm</code> parameter) desktop layout wit' vis'ble sidebar while th' rrrambl'n area width still resizes</li>
<li><strong>l</strong>: (controlled by th' <code>onwidthl</code> parameter) desktop layout wit' vis'ble sidebar once th' rrrambl'n area reached its maximum width</li>
</ul>
<p>For each width class, ye can configure one o' th' follow'n act'ns:</p>
<ul>
<li><code>show</code>: th' button be displayed 'n its given area</li>
<li><code>hide</code>: th' button be removed</li>
<li><code>area-XXX</code>: th' button be moved from its given area into th' area <code>XXX</code>; fer example, this be used t' move buttons t' th' <em>more</em> area overlay 'n th' mobile layout</li>
<p>While hid'n a button depend'n on th' screen size can be configured wit' th' above-described <em>hide</em> act'n, ye may want t' hide th' button on certain other condit'ns as well.</p>
<p>For example, th' <em>print</em> button 'n its default configurat'n should only be displayed if print support was configured. This be done 'n yer button template by check'n th' condit'ns first before display'n th' button (see <ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/print.html"rel="external"target="_self"><code>layouts/partials/topbar/button/print.html</code></a>).</p>
<p>Another preferred condit'n fer hid'n a button be if th' displayed overlay be empty. This be th' case fer th' <em>toc</em> (see <ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/toc.html"rel="external"target="_self"><code>layouts/partials/topbar/button/toc.html</code></a>) as well as th' <em>more</em> button (see <ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/more.html"rel="external"target="_self"><code>layouts/partials/topbar/button/more.html</code></a>) an' controlled by th' parameter <code>onempty</code>.</p>
<p>This parameter can have one o' th' follow'n values:</p>
<ul>
<li><code>dis'ble</code>: th' button be displayed 'n a disabled state if th' overlay be empty</li>
<li><code>hide</code>: th' button be removed if th' overlay be empty</li>
</ul>
<p>If ye want t' dis'ble a button contain'n <em>no overlay</em>, this can be achieved by an empty <code>href</code> parameter. An example can be seen 'n th' <em>prev</em> button (see <code>layouts/partials/topbar/button/prev.html</code>) whar' th' URL fer th' previous ship may be empty.</p>
<h2id="reference">Reference</h2>
<h3id="button">Button</h3>
<p>Contains th' basic button functionality an' be used as a base implementat'n fer all other buttons (<ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/func/button.html"rel="external"target="_self"><code>layouts/partials/topbar/func/button.html</code></a>).</p>
<p>Call this from yer own button templates if ye want t' implement a button without an overlay like th' <em>print</em> button (<ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/print.html"rel="external"target="_self"><code>layouts/partials/topbar/button/print.html</code></a>) or wit' an overlay contain'n arbitrary rrrambl'n like th' <em>toc</em> button (<ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/toc.html"rel="external"target="_self"><code>layouts/partials/topbar/button/toc.html</code></a>).</p>
<p>For display'n an area 'n th' button’s overlay, see <ahref="/hugo-theme-relearn/pir/configuration/customization/topbar/index.html#area-button">Area-Button</a>.</p>
<h4id="parameter">Parameter</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em><empty></em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>class</strong></td>
<td><em><empty></em></td>
<td>Mandatory unique class name fer this button. Display'n two buttons wit' th' same value fer <strong>class</strong> be undefined.</td>
</tr>
<tr>
<td><strong>href</strong></td>
<td><em><empty></em></td>
<td>Either th' destinat'n URL fer th' button or JavaScript code t' be executed on click.<br><br>- If start'n wit' <code>javascript:</code> all follow'n text will be executed 'n yer browser<br>- Every other str'n will be interpreted as URL<br>- If empty, th' button will be displayed 'n a disabled state regardless o' its <strong>rrrambl'n</strong></td>
<td>Defines what t' do wit' th' button if th' rrrambl'n parameter was set but ends up empty:<br><br>- <code>dis'ble</code>: Th' button be displayed 'n a disabled state.<br>- <code>hide</code>: Th' button be removed.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><code>show</code></td>
<td>Th' act'n that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its given area<br>- <code>hide</code>: Th' button be removed.<br>- <code>area-XXX</code>: Th' button be moved from its given area into th' area <code>XXX</code>.</td>
</tr>
<tr>
<td><strong>onwidthm</strong></td>
<td><code>show</code></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>onwidthl</strong></td>
<td><code>show</code></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>hint</strong></td>
<td><em><empty></em></td>
<td>Arbitrary text displayed 'n th' tooltip.</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td><em><empty></em></td>
<td>Arbitrary text fer th' button.</td>
</tr>
<tr>
<td><strong>rrrambl'n</strong></td>
<td><em><empty></em></td>
<td>Arbitrary HTML t' put into th' rrrambl'n overlay. This parameter may be empty. In this case, no overlay will be generated.</td>
</tr>
</tbody>
</table>
<h3id="area-button">Area-Button</h3>
<p>Contains th' basic functionality t' display area overlay buttons (<ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/func/area-button.html"rel="external"target="_self"><code>layouts/partials/topbar/func/area-button.html</code></a>).</p>
<p>Call this from yer own button templates if ye want t' implement a button wit' an area overlay like th' <em>more</em> button (<ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button/more.html"rel="external"target="_self"><code>layouts/partials/topbar/button/more.html</code></a>).</p>
<h4id="parameter-1">Parameter</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em><empty></em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>area</strong></td>
<td><em><empty></em></td>
<td>Mandatory unique area name fer this area. Display'n two areas wit' th' same value fer <strong>area</strong> be undefined.</td>
<td>Defines what t' do wit' th' button if th' rrrambl'n overlay be empty:<br><br>- <code>dis'ble</code>: Th' button be displayed 'n a disabled state.<br>- <code>hide</code>: Th' button be removed.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><code>show</code></td>
<td>Th' act'n that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its given area<br>- <code>hide</code>: Th' button be removed.<br>- <code>area-XXX</code>: Th' button be moved from its given area into th' area <code>XXX</code>.</td>
<p>Th' predefined buttons by th' theme (all other buttons besides th' <em>more</em> an' <em>toc</em> button 'n <ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button"rel="external"target="_self"><code>layouts/partials/topbar/button</code></a>).</p>
<p>Call these from yer own redefined area templates if ye want t' use default button behavior.</p>
<p>Th' <em><varying></em> parameter values be different fer each button an' configured fer standard behavior as seen on this plank.</p>
<h4id="parameter-2">Parameter</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em><empty></em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><em><varying></em></td>
<td>Th' act'n that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its given area<br>- <code>hide</code>: Th' button be removed.<br>- <code>area-XXX</code>: Th' button be moved from its given area into th' area <code>XXX</code>.</td>
<p>Th' predefined buttons by th' theme that open an overlay (the <em>more</em> an' <em>toc</em> button 'n <ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/partials/topbar/button"rel="external"target="_self"><code>layouts/partials/topbar/button</code></a>).</p>
<p>Call these from yer own redefined area templates if ye want t' use default button behavior utiliz'n overlay functionality.</p>
<p>Th' <em><varying></em> parameter values be different fer each button an' configured fer standard behavior as seen on this plank.</p>
<h4id="parameter-3">Parameter</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em><empty></em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>onempty</strong></td>
<td><code>dis'ble</code></td>
<td>Defines what t' do wit' th' button if th' rrrambl'n overlay be empty:<br><br>- <code>dis'ble</code>: Th' button be displayed 'n a disabled state.<br>- <code>hide</code>: Th' button be removed.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><em><varying></em></td>
<td>Th' act'n that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its given area<br>- <code>hide</code>: Th' button be removed.<br>- <code>area-XXX</code>: Th' button be moved from its given area into th' area <code>XXX</code>.</td>
<p>Plank designs be used t' provide different layouts fer a given output format. If ye instead want t' <ahref="/hugo-theme-relearn/pir/configuration/customization/outputformats/index.html">provide a new output format</a>, th' theme got ye covered as well.</p>
<p>A plank be displayed by exactly one plank design <em>fer each output format</em>, be represented by <ahref="https://gohugo.io/content-management/front-matter/#type"rel="external"target="_self">Hugo’s reserved <code>type</code> front matter</a> an' uses <ahref="https://gohugo.io/templates/types/#content-view"rel="external"target="_self">Hugo’s rrrambl'n view mechanism</a>.</p>
<p>A plank design usually consists o'</p>
<ul>
<li><ahref="https://gohugo.io/templates/types/#content-view"rel="external"target="_self">one or more rrrambl'n view files</a>: depend'n on th' output format taken from <ahref="/hugo-theme-relearn/pir/configuration/customization/designs/index.html#partials">th' list below</a></li>
<li><ahref="https://gohugo.io/content-management/archetypes/"rel="external"target="_self">an optional archetype file</a>: a template fer creat'n new Marrrkdown files wit' th' correct sett'n fer th' <code>type</code> front matter an' any furhter parameter</li>
<li>optional CSS styles</li>
</ul>
<detailsopenclass=" box cstyle notices warning">
<summaryclass="box-label"tabindex="-1">
<iclass="fa-fw fas fa-exclamation-triangle"></i>
Arrr
</summary>
<divclass="box-content">
<p>Don’t use Hugo’s reserved <code>type</code> opt'n 'n yer modificat'ns fer other functionality!</p>
</div>
</details>
<h2id="using-a-page-design">Us'n a Plank Design</h2>
<p>Regardless o' shipped or custom plank designs, ye be <ahref="/hugo-theme-relearn/pir/authoring/frontmatter/designs/index.html">us'n them 'n th' same way</a>. Either by manually sett'n th' <code>type</code> front matter t' th' value o' th' plank design or by us'n an archetype dur'n creat'n o' a new plank.</p>
<p>If no <code>type</code> be set 'n yer front matter or th' plank design doesn’t exist fer a given output format, th' plank be treated as if <code>type='default'</code> was set.</p>
<p>Th' Relearrrn theme ships wit' th' plank designs <code>home</code>, <code>chapter</code>, an' <code>default</code> fer th' HTML output format.</p>
<h2id="creating-a-page-design">Creat'n a Plank Design</h2>
<p>Suppose ye be writ'n a documentat'n ship fer some software. Each time a new release be created, ye be add'n a new releasenotes plank t' yer ship. Those planks should contain a common disclaimer at th' top. Ye neither want t' copy th' text into each new file nor want ye t' use a shortcode but create a plank design called <code>releasenotes</code>.</p>
<ol>
<li>
<p>Choose a name (here, <code>releasenotes</code>)</p>
</li>
<li>
<p>Create a rrrambl'n view file at <code>layouts/releasenotes/views/article.html</code></p>
</div><p>Th' marked lines be yer customizat'ns, th' rest o' th' file was copied over from th' default implementat'n o' <ahref="https://github.com/McShelby/hugo-theme-relearn/blob/main/layouts/_default/views/article.html"rel="external"target="_self"><code>layouts/_default/views/article.html</code></a></p>
<p>In this file, ye can cust'mize th' plank structure as needed. For HTML based output formats, typically you’ll want t':</p>
<ul>
<li>Set a <code>class</code> at th' <code>article</code> element fer custom CSS styles</li>
<li>Call <code>{{ partial "article-content.html" . }}</code> t' show yer plank rrrambl'n</li>
</ul>
</li>
<li>
<p><em>Optional</em>: create an archetype file at <code>archetypes/releasenotes.md</code></p>
<h3id="for-any-output-format">For any Output Format</h3>
<p>These files be common fer all output formats.</p>
<ul>
<li><code>layouts/<DESIGN>/baseof.<FORMAT></code>: <em>Optional</em>: Th' top most file ye could provide t' completely redefine th' whole design. No further partials will be called if ye don’ call them yourself</li>
</ul>
<h3id="for-html-output-formats">For HTML Output Formats</h3>
<p>If ye want t' keep th' general HTML framework an' only change specific parts, ye can provide these files fer th' plank desingn fer th' HTML output format independently o' one another.</p>
<ul>
<li><code>layouts/<DESIGN>/views/article.html</code>: <em>Optional</em>: Controls how one page’s rrrambl'n an' title be displayed</li>
<li><code>layouts/<DESIGN>/views/body.html</code>: <em>Optional</em>: Determines what t' contain 'n th' rrrambl'n area (for example a single plank, a list o' planks, a tree o' sub pages)</li>
<li><code>layouts/<DESIGN>/views/menu.html</code>: <em>Optional</em>: Defines th' sidebar menu layout</li>
</ul>
<p>For a real-world example, check out th' <code>changelog</code> plank design implementat'n</p>
<h2id="migration-to-relearn-7-or-higher">Migrat'n t' Relearrrn 7 or higher</h2>
<p>Previous t' Relearrrn 7, plank designs were defined by a proprietary solut'n unique t' th' theme. Depend'n on yer modificat'ns ye may have t' change some or all o' th' follow'n t' migrate t' Relearrrn 7’s plank designs.</p>
<ul>
<li>
<p>In all yer <code>*.md</code> files, replace th' <code>archetype</code> front matter wit' <code>type</code>; th' value stays th' same; don’t forget yer archetype files if ye have some</p>
</li>
<li>
<p>Move yer files <code>layouts/partials/archetypes/<DESIGN>/article.html</code> t' <code>layouts/<DESIGN>/views/article.html</code></p>
<p>Th' files will most likely require further modificat'ns as they now receive th' plank as it context (dot <code>.</code>) instead o' th' <code>.page</code> an' <code>.content</code> parameter.</p>
<p>Cap'n Hugo can display yer rrrambl'n 'n different <ahref="https://gohugo.io/templates/output-formats/"rel="external"target="_self">formats</a> like HTML, JSON, Google AMP, etc. T' do this, templates must be provided.</p>
<p>Th' Relearrrn theme by default comes wit' templates fer <ahref="/hugo-theme-relearn/pir/configuration/sitemanagement/outputformats/index.html">HTML, HTML fer print, RSS an' Marrrkdown</a>. If this be not enough, this plank describes how ye can create yer own output formats.</p>
<p>If ye instead just want t' <ahref="/hugo-theme-relearn/pir/configuration/customization/designs/index.html">cust'mize th' layout o' an exist'n output format</a>, th' theme got ye covered as well.</p>
<h2id="creating-an-output-format">Creat'n an Output Format</h2>
<p>Suppose ye want t' be able t' send yer articles as HTML formatted emails. Th' planks o' these format need t' be self contained so an email client can display th' rrrambl'n without load'n any further assets.</p>
<p>Therefore we add a new output format called <code>email</code> that outputs HTML an' assembles a completely custom HTML document structure.</p>
<ol>
<li>
<p>Add th' output format t' yer <code>hugo.toml</code></p>
</div><p>Th' marked <code>block</code> construct above will cause th' display o' th' article wit' a default HTML structure. In case ye want t' keep it really simple, ye could replace this line wit' just <code>{{ .Content }}</code>.</p>
</li>
<li>
<p><em>Optional</em>: create a file <code>layouts/_default/views/article.email.html</code></p>
<p>In our case, we want t' display a disclaimer 'n front o' every article. T' do this we have t' define th' output o' an article ourself an' rely on th' above <code>block</code> statement t' call our template.</p>
</span></span><spanclass="line"><spanclass="cl"> View this article on <spanclass="p"><</span><spanclass="nt">a</span><spanclass="na">href</span><spanclass="o">=</span><spanclass="s">"http://example.com{{ .RelPermalink }}"</span><spanclass="p">></span>our website<spanclass="p"></</span><spanclass="nt">a</span><spanclass="p">></span>
</span></span><spanclass="line"><spanclass="cl">{{- end }}</span></span></code></pre></div>
</div>
</div>
</div>
</div></li>
</ol>
<h2id="partials">Partials</h2>
<h3id="for-html-output-formats">For HTML Output Formats</h3>
<p>If ye want t' keep th' general HTML framework an' only change specific parts, ye can provide these files fer yer output format independently o' one another:</p>
<ul>
<li><code>layouts/_default/views/article.<FORMAT>.html</code>: <em>Optional</em>: Controls how a page’s rrrambl'n an' title be displayed</li>
<li><code>layouts/_default/views/body.<FORMAT>.html</code>: <em>Optional</em>: Determines what t' contain 'n th' rrrambl'n area (for example a single plank, a list o' planks, a tree o' sub pages)</li>
<li><code>layouts/_default/views/menu.<FORMAT>.html</code>: <em>Optional</em>: Defines th' sidebar menu layout</li>
<li><code>layouts/_default/views/storeOutputFormat.<FORMAT>.html</code>: <em>Optional</em>: Stores th' output format name fer use 'n th' framework t' let th' body element been marked wit' an output format specific class</li>
</ul>
<p>For a real-world example, check out th' <code>print</code> output format implementat'n</p>
<li><code>layouts/_default/list.<FORMAT></code>: <em>Mandatory</em>: Controls how sections be displayed</li>
<li><code>layouts/_default/single.<FORMAT></code>: <em>Mandatory</em>: Controls how planks be displayed</li>
<li><code>layouts/_default/baseof.<FORMAT></code>: <em>Optional</em>: Controls how sections an' planks be displayed. If not provided, ye have t' provide yer implementat'n 'n <code>list.<FORMAT></code> an' <code>single.<FORMAT></code></li>
</ul>
<p>For a real-world example, check out th' <code>markdown</code> output format implementat'n</p>
<h2id="migration-to-relearn-7-or-higher">Migrat'n t' Relearrrn 7 or higher</h2>
<p>Previous t' Relearrrn 7, HTML output formats did not use th' <code>baseof.html</code> but now do.</p>
<h3id="for-html-output-formats-1">For HTML Output Formats</h3>
<ul>
<li>
<p>Move yer files <code>layouts/partials/article.<FORMAT>.html</code> t' <code>layouts/_default/views/article.<FORMAT>.html</code></p>
<p>Th' files will most likely require further modificat'ns as they now receive th' plank as it context (dot <code>.</code>) instead o' th' <code>.page</code> an' <code>.content</code> parameter.</p>
<p>Th' upper part o' th' file be from yer <code>header.<FORMAT>.html</code> an' th' lower part be from yer <code>footer.<FORMAT>.html</code>.</p>
<p>Th' marked line needs t' be added, so yer output format uses a potential <code>layouts/_default/views/article.<FORMAT>.html</code></p>
<p>This plank explains how t' show custom taxonomies on yer planks.</p>
<p>For more details, check th' official docs on <ahref="https://gohugo.io/content-management/taxonomies/#configure-taxonomies"rel="external"target="_self">sett'n up custom taxonomies</a> an' <ahref="https://gohugo.io/content-management/taxonomies/#assign-terms-to-content"rel="external"target="_self">us'n them 'n yer rrrambl'n</a>.</p>
<h2id="default-behavior">Default Behavior</h2>
<p>Th' Relearrrn theme automatically shows Hugo’s <ahref="https://gohugo.io/content-management/taxonomies/#default-taxonomies"rel="external"target="_self">default taxonomies</a><em>tags</em> an' <em>categories</em> out o' th' box.</p>
<ul>
<li>Tags appear at th' top o' th' plank 'n alphabetical order 'n form o' baggage tags.</li>
<li>Categories appear at th' bottom o' th' plank 'n alphabetical order as a list prefixed wit' an ay'con.</li>
</ul>
<p>Each item links t' a plank show'n all articles wit' that term.</p>
<h2id="setting-up-custom-taxonomies">Sett'n Up Custom Taxonomies</h2>
<p>T' add custom taxonomies, update yer <code>hugo.toml</code> file. Ye also have t' add th' default taxonomies if ye want t' use them.</p>
<td>Th' plural name o' th' taxonomy t' display as used 'n yer front matter.</td>
</tr>
<tr>
<td><strong>class</strong></td>
<td><em><empty></em></td>
<td>Additional CSS classes set on th' outermost generated HTML element.<br><br>If set t' <code>tags</code> ye will get th' visuals fer display'n th' <em>tags</em> taxonomy, otherwise it will be a simple list o' links as fer th' <em>categories</em> taxonomy.</td>
</tr>
<tr>
<td><strong>style</strong></td>
<td><code>primary</code></td>
<td>Th' style scheme used if <strong>class</strong> be <code>tags</code>.<br><br>- by severity: <code>caut'n</code>, <code>important</code>, <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>cyan</code>, <code>green</code>, <code>grey</code>, <code>magenta</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code></td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>see notes</td>
<td>Th' <ahref="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value"rel="external"target="_self">CSS color value</a> t' be used if <strong>class</strong> be <code>tags</code>. If not set, th' chosen color depends on th' <strong>style</strong>. Any given value will overwrite th' default.<br><br>- fer severity styles: a nice match'n color fer th' severity<br>- fer all other styles: th' correspond'n color</td>
</tr>
<tr>
<td><strong>ay'con</strong></td>
<td><em><empty></em></td>
<td>An optional <ahref="/hugo-theme-relearn/pir/shortcodes/icon/index.html#finding-an-icon">Font Awesome ay'con name</a> set t' th' left o' th' list.</td>