mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-24 08:13:05 +00:00
201 lines
23 KiB
HTML
201 lines
23 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="pir" 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.107.0">
|
|
<meta name="generator" content="Relearn 5.7.0+tip">
|
|
<meta name="description" content="Documentation for Hugo Relearn Theme">
|
|
<meta name="author" content="Sören Weber">
|
|
<title>Menu extrrra shorrrtcuts :: Cap'n Hugo Relearrrn Theme</title>
|
|
<link href="https://McShelby.github.io/hugo-theme-relearn/pir/cont/menushortcuts/index.html" rel="canonical" type="text/html" title="Menu extrrra shorrrtcuts :: Cap'n Hugo Relearrrn Theme">
|
|
<link href="../../../pir/cont/menushortcuts/index.xml" rel="alternate" type="application/rss+xml" title="Menu extrrra shorrrtcuts :: Cap'n Hugo Relearrrn Theme">
|
|
<link href="../../../images/logo.svg?1669750901" 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?1669750902" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/fontawesome-all.min.css?1669750902" rel="stylesheet"></noscript>
|
|
<link href="../../../css/featherlight.min.css?1669750902" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/featherlight.min.css?1669750902" rel="stylesheet"></noscript>
|
|
<link href="../../../css/auto-complete.css?1669750902" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/auto-complete.css?1669750902" rel="stylesheet"></noscript>
|
|
<link href="../../../css/perfect-scrollbar.min.css?1669750902" rel="stylesheet">
|
|
<link href="../../../css/nucleus.css?1669750902" rel="stylesheet">
|
|
<link href="../../../css/fonts.css?1669750902" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/fonts.css?1669750902" rel="stylesheet"></noscript>
|
|
<link href="../../../css/theme.css?1669750902" rel="stylesheet">
|
|
<link href="../../../css/theme-relearn-light.css?1669750902" rel="stylesheet" id="variant-style">
|
|
<link href="../../../css/ie.css?1669750902" rel="stylesheet">
|
|
<link href="../../../css/variant.css?1669750902" rel="stylesheet">
|
|
<link href="../../../css/print.css?1669750902" rel="stylesheet" media="print">
|
|
<link href="../../../css/format-print.css?1669750902" rel="stylesheet">
|
|
<script src="../../../js/url.js?1669750902"></script>
|
|
<script src="../../../js/variant.js?1669750902"></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="../../../pir/index.search.js";
|
|
var root_url="../../../";
|
|
var baseUri=root_url.replace(/\/$/, '');
|
|
// translations
|
|
window.T_Copy_to_clipboard = 'Copy t\u0027 clipboard';
|
|
window.T_Copied_to_clipboard = 'Copied t\u0027 clipboard!';
|
|
window.T_Copy_link_to_clipboard = 'Copy link t\u0027 clipboard';
|
|
window.T_Link_copied_to_clipboard = 'Copied link t\u0027 clipboard!';
|
|
window.T_No_results_found = 'No rrresults found fer \u0022{0}\u0022';
|
|
window.T_N_results_found = '{1} rrresults found fer \u0022{0}\u0022';
|
|
// some further base stuff
|
|
var baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
|
|
window.variants && variants.init( [ 'relearn-light', 'relearn-dark', 'learn', 'neon', 'blue', 'green', 'red' ] );
|
|
</script>
|
|
<script src="../../../js/jquery.min.js?1669750902" defer></script>
|
|
</head>
|
|
<body class="mobile-support print disableInlineCopyToClipboard" data-url="../../../pir/cont/menushortcuts/index.html">
|
|
<div id="body" class="default-animation">
|
|
<div id="sidebar-overlay"></div>
|
|
<div id="toc-overlay"></div>
|
|
<nav id="topbar" class="highlightable" dir="ltr">
|
|
<div>
|
|
<div id="breadcrumbs">
|
|
<span id="sidebar-toggle-span">
|
|
<a href="#" id="sidebar-toggle" title='Menu (CTRL+ALT+n)'><i class="fas fa-bars fa-fw"></i></a>
|
|
</span>
|
|
<ol class="links" itemscope itemtype="http://schema.org/BreadcrumbList">
|
|
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><a itemprop="item" href="../../../pir/index.html"><span itemprop="name">Cap'n Hugo Relearrrn Theme</span></a><meta itemprop="position" content="1"> > </li>
|
|
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><a itemprop="item" href="../../../pir/cont/index.html"><span itemprop="name">Rambl'n</span></a><meta itemprop="position" content="2"> > </li>
|
|
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Menu extrrra shorrrtcuts</span><meta itemprop="position" content="3"></li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<main id="body-inner" class="highlightable default" tabindex="-1">
|
|
<div class="flex-block-wrapper">
|
|
<div id="head-tags">
|
|
</div>
|
|
<article class="default">
|
|
<h1 id="menu-extrrra-shorrrtcuts">Menu extrrra shorrrtcuts</h1>
|
|
|
|
|
|
<div class="box notices cstyle warning">
|
|
<div class="box-label"><i class="fa-fw fas fa-skull-crossbones"></i> Arrr! Pirrrates</div>
|
|
<div class="box-content">
|
|
<p>Fello' pirrates, be awarrre <b>some stuff may not work</b> fer us in this trrranslat'n. Like <b>table of rrramblings</b>, see'ng <b>Merrrmaids</b>, do'ng <b>math or chemistrrry</b> and stuff.</p> </div>
|
|
</div>
|
|
|
|
<p>Ye can define additional menu entries or shortcuts 'n th' navigat'n menu without any link t' rrrambl'n.</p>
|
|
<h2 id="basic-configuration">Basic configurat'n</h2>
|
|
<p>Edit th' website configurat'n <code>config.toml</code> an' add a <code>[[menu.shortcuts]]</code> entry fer each link yer want t' add.</p>
|
|
<p>Example from th' current website:</p>
|
|
<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">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fab fa-fw fa-github'></i> GitHub repo"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">identifier</span> <span class="p">=</span> <span class="s2">"ds"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">"https://github.com/McShelby/hugo-theme-relearn"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">weight</span> <span class="p">=</span> <span class="mi">10</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-camera'></i> Showcases"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">"more/showcase/"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">weight</span> <span class="p">=</span> <span class="mi">11</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-bookmark'></i> Cap'n Hugo Documentation"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">identifier</span> <span class="p">=</span> <span class="s2">"hugodoc"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">"https://gohugo.io/"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">weight</span> <span class="p">=</span> <span class="mi">20</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-bullhorn'></i> Credits"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">"more/credits/"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">weight</span> <span class="p">=</span> <span class="mi">30</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-tags'></i> Tags"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">"tags/"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">weight</span> <span class="p">=</span> <span class="mi">40</span>
|
|
</span></span></code></pre></div><p>By default, shortcuts be preceded by a title. This title can be disabled by sett'n <code>disableShortcutsTitle=true</code>.
|
|
However, if ye want t' keep th' title but change its value, it can be overridden by chang'n yer local i18n translat'n str'n configurat'n.</p>
|
|
<p>For example, 'n yer local <code>i18n/en.toml</code> file, add th' follow'n rrrambl'n</p>
|
|
<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">Shortcuts-Title</span><span class="p">]</span>
|
|
</span></span><span class="line"><span class="cl"><span class="nx">other</span> <span class="p">=</span> <span class="s2">"<Your value>"</span>
|
|
</span></span></code></pre></div><p>Read more about <a href="https://gohugo.io/extras/menus/">hugo menu</a> an' <a href="https://gohugo.io/content-management/multilingual/#translation-of-strings">hugo i18n translat'n str'ns</a></p>
|
|
<h2 id="i18n">Configurat'n fer Multilingual mode</h2>
|
|
<p>When us'n a multilingual website, ye can set different menus fer each language. In th' <code>config.toml</code> file, prefix yer menu configurat'n by <code>Languages.<language-id></code>.</p>
|
|
<p>Example from th' current website:</p>
|
|
<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">Languages</span><span class="p">]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">en</span><span class="p">]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">title</span> <span class="p">=</span> <span class="s2">"Hugo Relearrrn Theme"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">languageName</span> <span class="p">=</span> <span class="s2">"English"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">landingPageURL</span> <span class="p">=</span> <span class="s2">"/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">landingPageName</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-home'></i> Home"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fab fa-fw fa-github'></i> GitHub repo"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">"ds"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"https://github.com/McShelby/hugo-theme-relearn"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">10</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-camera'></i> Showcases"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"more/showcase/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">11</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-bookmark'></i> Cap'n Hugo Documentation"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">"hugodoc"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"https://gohugo.io/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">20</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-bullhorn'></i> Credits"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"more/credits/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">30</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-tags'></i> Tags"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"tags/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">40</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">pir</span><span class="p">]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">title</span> <span class="p">=</span> <span class="s2">"Cap'n Hugo Relearrrn Theme"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">languageName</span> <span class="p">=</span> <span class="s2">"Arrr! Pirrrates"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">landingPageURL</span> <span class="p">=</span> <span class="s2">"/pir/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">landingPageName</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-home'></i> Arrr! Home"</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">pir</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fab fa-fw fa-github'></i> GitHub repo"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">"ds"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"https://github.com/McShelby/hugo-theme-relearn"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">10</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">pir</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-camera'></i> Showcases"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"more/showcase/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">11</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">pir</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-bookmark'></i> Cap'n Hugo Documentat'n"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">"hugodoc"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"https://gohugo.io/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">20</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">pir</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-bullhorn'></i> Crrredits"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"more/credits/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">30</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">Languages</span><span class="p">.</span><span class="nx">pir</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">shortcuts</span><span class="p">]]</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s2">"<i class='fas fa-fw fa-tags'></i> Arrr! Tags"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">url</span> <span class="p">=</span> <span class="s2">"tags/"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">weight</span> <span class="p">=</span> <span class="mi">40</span>
|
|
</span></span></code></pre></div><p>Read more about <a href="https://gohugo.io/extras/menus/">hugo menu</a> an' <a href="https://gohugo.io/content-management/multilingual/#menus">hugo multilingual menus</a></p>
|
|
|
|
|
|
<footer class="footline">
|
|
</footer>
|
|
</article>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<script src="../../../js/clipboard.min.js?1669750902" defer></script>
|
|
<script src="../../../js/perfect-scrollbar.min.js?1669750902" defer></script>
|
|
<script src="../../../js/featherlight.min.js?1669750902" defer></script>
|
|
<script src="../../../js/theme.js?1669750902" defer></script>
|
|
</body>
|
|
</html>
|