mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
238 lines
29 KiB
HTML
238 lines
29 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.123.6">
|
|
<meta name="generator" content="Relearn 5.24.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="Menu extra shortcuts :: Hugo Relearn Theme">
|
|
<meta name="twitter:description" content="You can define additional menu entries or shortcuts in the navigation menu without any link to content.
|
|
Basic configuration Edit the website configuration hugo.toml and add a [[menu.shortcuts]] entry for each link your want to add.
|
|
Example from the current website:
|
|
[[menu.shortcuts]] name = "<i class='fab fa-fw fa-github'></i> GitHub repo" identifier = "ds" url = "https://github.com/McShelby/hugo-theme-relearn" weight = 10 [[menu.shortcuts]] name = "<i class='fas fa-fw fa-camera'></i> Showcases" url = "showcase/" weight = 11 [[menu.">
|
|
<meta property="og:title" content="Menu extra shortcuts :: Hugo Relearn Theme">
|
|
<meta property="og:description" content="You can define additional menu entries or shortcuts in the navigation menu without any link to content.
|
|
Basic configuration Edit the website configuration hugo.toml and add a [[menu.shortcuts]] entry for each link your want to add.
|
|
Example from the current website:
|
|
[[menu.shortcuts]] name = "<i class='fab fa-fw fa-github'></i> GitHub repo" identifier = "ds" url = "https://github.com/McShelby/hugo-theme-relearn" weight = 10 [[menu.shortcuts]] name = "<i class='fas fa-fw fa-camera'></i> Showcases" url = "showcase/" weight = 11 [[menu.">
|
|
<meta property="og:type" content="article">
|
|
<meta property="og:url" content="https://mcshelby.github.io/hugo-theme-relearn/cont/menushortcuts/index.html">
|
|
<meta property="og:image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
|
|
<meta property="article:section" content="Content :: Hugo Relearn Theme">
|
|
<meta property="og:site_name" content="Hugo Relearn Theme">
|
|
<title>Menu extra shortcuts :: Hugo Relearn Theme</title>
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/cont/menushortcuts/index.html" rel="alternate" hreflang="x-default">
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/cont/menushortcuts/index.html" rel="alternate" hreflang="en">
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/pir/cont/menushortcuts/index.html" rel="alternate" hreflang="art-pir">
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/cont/menushortcuts/index.html" rel="canonical" type="text/html" title="Menu extra shortcuts :: Hugo Relearn Theme">
|
|
<link href="/hugo-theme-relearn/cont/menushortcuts/index.xml" rel="alternate" type="application/rss+xml" title="Menu extra shortcuts :: Hugo Relearn Theme">
|
|
<link href="/hugo-theme-relearn/images/logo.svg?1709151743" rel="icon" type="image/svg+xml">
|
|
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use -->
|
|
<link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1709151744" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1709151744" rel="stylesheet"></noscript>
|
|
<link href="/hugo-theme-relearn/css/nucleus.css?1709151744" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/auto-complete.css?1709151744" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/auto-complete.css?1709151744" rel="stylesheet"></noscript>
|
|
<link href="/hugo-theme-relearn/css/perfect-scrollbar.min.css?1709151744" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/fonts.css?1709151744" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fonts.css?1709151744" rel="stylesheet"></noscript>
|
|
<link href="/hugo-theme-relearn/css/theme.css?1709151744" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/theme-relearn-auto.css?1709151744" rel="stylesheet" id="R-variant-style">
|
|
<link href="/hugo-theme-relearn/css/chroma-relearn-auto.css?1709151744" rel="stylesheet" id="R-variant-chroma-style">
|
|
<link href="/hugo-theme-relearn/css/variant.css?1709151744" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/print.css?1709151744" rel="stylesheet" media="print">
|
|
<link href="/hugo-theme-relearn/css/format-print.css?1709151744" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/ie.css?1709151744" rel="stylesheet">
|
|
<script src="/hugo-theme-relearn/js/url.js?1709151744"></script>
|
|
<script src="/hugo-theme-relearn/js/variant.js?1709151744"></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="/hugo-theme-relearn/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.relearn.themeVariantModifier='';
|
|
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="/hugo-theme-relearn/cont/menushortcuts/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="/hugo-theme-relearn/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">Menu extra shortcuts</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="menu-extra-shortcuts">Menu extra shortcuts</h1>
|
|
|
|
<p>You can define additional menu entries or shortcuts in the navigation menu without any link to content.</p>
|
|
<h2 id="basic-configuration">Basic configuration</h2>
|
|
<p>Edit the website configuration <code>hugo.toml</code> and add a <code>[[menu.shortcuts]]</code> entry for each link your want to add.</p>
|
|
<p>Example from the current website:</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="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">"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> 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 are preceded by a title. This title can be disabled by setting <code>disableShortcutsTitle=true</code>.
|
|
However, if you want to keep the title but change its value, it can be overridden by changing your local i18n translation string configuration.</p>
|
|
<p>For example, in your local <code>i18n/en.toml</code> file, add the following content</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="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/" target="_blank">hugo menu</a> and <a href="https://gohugo.io/content-management/multilingual/#translation-of-strings" target="_blank">hugo i18n translation strings</a></p>
|
|
<h2 id="i18n">Configuration for Multilingual mode</h2>
|
|
<p>When using a multilingual website, you can set different menus for each language. In the <code>hugo.toml</code> file, prefix your menu configuration by <code>Languages.<language-id></code>.</p>
|
|
<p>Example from the current website:</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="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 Relearn 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="p">[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">params</span><span class="p">]</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">pageRef</span> <span class="p">=</span> <span class="s2">"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> 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">pageRef</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">pageRef</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="p">[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">pir</span><span class="p">.</span><span class="nx">params</span><span class="p">]</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">pageRef</span> <span class="p">=</span> <span class="s2">"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">pageRef</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">pageRef</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/" target="_blank">hugo menu</a> and <a href="https://gohugo.io/content-management/multilingual/#menus" target="_blank">hugo multilingual menus</a></p>
|
|
<h2 id="shortcuts-to-pages-inside-of-your-project">Shortcuts to pages inside of your project</h2>
|
|
<p>If you have shortcuts to pages inside of your project and you don’t want them to show up in page menu section, you have two choices:</p>
|
|
<ol>
|
|
<li>
|
|
<p>Make the page file for the shortcut a <a href="https://gohugo.io/content-management/page-bundles/#headless-bundle" target="_blank">headless branch bundle</a> (contained in its own subdirectory and called <code>_index.md</code>) and add the following frontmatter configuration to the file (see exampleSite’s <code>content/showcase/_index.en.md</code>). This causes its content to <strong>not</strong> be ontained in the sitemap.</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="nx">title</span> <span class="p">=</span> <span class="s2">"Showcase"</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">"always"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">list</span> <span class="p">=</span> <span class="s2">"never"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">publishResources</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div></li>
|
|
<li>
|
|
<p>Store the page file for the shortcut below a parent headless branch bundle and add the following frontmatter to he <strong>parent</strong> (see exampleSite’s <code>content/more/_index.en.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="c"># title = "More" ### ATTENTION: Don't give this page a title as this will cause it to be in the breadcrumbs - a thing you most likely don't want</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></span><span class="line"><span class="cl"> <span class="nx">list</span> <span class="p">=</span> <span class="s2">"never"</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nx">publishResources</span> <span class="p">=</span> <span class="kc">false</span></span></span></code></pre></div><p>In this case, the file itself can be a branch bundle, leaf bundle or simple page (see exampleSite’s <code>content/more/credits.en.md</code>). This causes its content to be contained in the sitemap.</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="nx">title</span> <span class="p">=</span> <span class="s2">"Credits"</span></span></span></code></pre></div></li>
|
|
</ol>
|
|
|
|
<footer class="footline">
|
|
</footer>
|
|
</article>
|
|
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<script src="/hugo-theme-relearn/js/clipboard.min.js?1709151744" defer></script>
|
|
<script src="/hugo-theme-relearn/js/perfect-scrollbar.min.js?1709151744" defer></script>
|
|
<script src="/hugo-theme-relearn/js/theme.js?1709151744" defer></script>
|
|
</body>
|
|
</html>
|