hugo-theme-relearn/basics/configuration/index.print.html
2023-10-30 18:12:10 +00:00

287 lines
35 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.0">
<meta name="generator" content="Relearn 5.23.0+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="Configuration :: Hugo Relearn Theme">
<meta name="twitter:description" content="Documentation for Hugo Relearn Theme">
<meta property="og:title" content="Configuration :: 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/basics/configuration/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>Configuration :: Hugo Relearn Theme</title>
<link href="https://McShelby.github.io/hugo-theme-relearn/basics/configuration/index.html" rel="alternate" hreflang="x-default">
<link href="https://McShelby.github.io/hugo-theme-relearn/basics/configuration/index.html" rel="alternate" hreflang="en">
<link href="https://McShelby.github.io/hugo-theme-relearn/pir/basics/configuration/index.html" rel="alternate" hreflang="pir">
<link href="https://McShelby.github.io/hugo-theme-relearn/basics/configuration/index.html" rel="canonical" type="text/html" title="Configuration :: Hugo Relearn Theme">
<link href="../../basics/configuration/index.xml" rel="alternate" type="application/rss+xml" title="Configuration :: Hugo Relearn Theme">
<link href="../../images/logo.svg?1698689521" 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?1698689523" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../css/fontawesome-all.min.css?1698689523" rel="stylesheet"></noscript>
<link href="../../css/nucleus.css?1698689523" rel="stylesheet">
<link href="../../css/auto-complete.css?1698689523" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../css/auto-complete.css?1698689523" rel="stylesheet"></noscript>
<link href="../../css/perfect-scrollbar.min.css?1698689523" rel="stylesheet">
<link href="../../css/fonts.css?1698689523" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../css/fonts.css?1698689523" rel="stylesheet"></noscript>
<link href="../../css/theme.css?1698689523" rel="stylesheet">
<link href="../../css/theme-auto.css?1698689523" rel="stylesheet" id="R-variant-style">
<link href="../../css/variant.css?1698689523" rel="stylesheet">
<link href="../../css/print.css?1698689523" rel="stylesheet" media="print">
<link href="../../css/format-print.css?1698689523" rel="stylesheet">
<link href="../../css/ie.css?1698689523" rel="stylesheet">
<script src="../../js/url.js?1698689523"></script>
<script src="../../js/variant.js?1698689523"></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(/\/$/, '');
// 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 \u0022{0}\u0022';
window.T_N_results_found = '{1} results found for \u0022{0}\u0022';
// some further base stuff
var baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
window.variants && variants.init( [ 'auto', 'relearn-bright', 'relearn-light', 'relearn-dark', 'zen-light', 'zen-dark', 'neon', 'learn', 'blue', 'green', 'red' ] );
</script>
<style>
#R-body img.bg-white {
background-color: white;
}
</style>
</head>
<body class="mobile-support print disableInlineCopyToClipboard" data-url="../../basics/configuration/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&#43;ALT&#43;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="../../basics/index.html"><span itemprop="name">Basics</span></a><meta itemprop="position" content="1">&nbsp;>&nbsp;</li><li
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Configuration</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">
<div class=" taxonomy-tags term-list cstyle tags" title="Tags" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<ul>
<li><a class="term-link" href="../../tags/config/index.html">config</a></li>
</ul>
</div>
</header>
<h1 id="configuration">Configuration</h1>
<h2 id="global-site-parameters">Global site parameters</h2>
<p>On top of <a href="https://gohugo.io/overview/configuration/" target="_blank">Hugo global configuration</a>, the Relearn theme lets you define the following parameters in your <code>config.toml</code> (here, values are default).</p>
<p>Note that some of these parameters are explained in details in other sections of this documentation.</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">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="c"># This controls whether submenus will be expanded (true), or collapsed (false) in the</span>
</span></span><span class="line"><span class="cl"> <span class="c"># menu; if no setting is given, the first menu level is set to false, all others to true;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># this can be overridden in the pages frontmatter</span>
</span></span><span class="line"><span class="cl"> <span class="nx">alwaysopen</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Prefix URL to edit current page. Will display an &#34;Edit&#34; button on top right hand corner of every page.</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Useful to give opportunity to people to create merge request for your doc.</span>
</span></span><span class="line"><span class="cl"> <span class="c"># See the config.toml file from this documentation site to have an example.</span>
</span></span><span class="line"><span class="cl"> <span class="nx">editURL</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Author of the site, will be used in meta information</span>
</span></span><span class="line"><span class="cl"> <span class="nx">author</span><span class="p">.</span><span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Description of the site, will be used in meta information</span>
</span></span><span class="line"><span class="cl"> <span class="nx">description</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Shows a checkmark for visited pages on the menu</span>
</span></span><span class="line"><span class="cl"> <span class="nx">showVisitedLinks</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Disable search function. It will hide search bar</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableSearch</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Disable search in hidden pages, otherwise they will be shown in search box</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableSearchHiddenPages</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Disables hidden pages from showing up in the sitemap and on Google (et all), otherwise they may be indexed by search engines</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableSeoHiddenPages</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Disables hidden pages from showing up on the tags page although the tag term will be displayed even if all pages are hidden</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableTagHiddenPages</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Javascript and CSS cache are automatically busted when new version of site is generated.</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Set this to true to disable this behavior (some proxies don&#39;t handle well this optimization)</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableAssetsBusting</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Set this to true if you want to disable generation for generator version meta tags of hugo and the theme;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># don&#39;t forget to also set Hugo&#39;s disableHugoGeneratorInject=true, otherwise it will generate a meta tag into your home page</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableGeneratorVersion</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Set this to true to disable copy-to-clipboard button for inline code.</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableInlineCopyToClipBoard</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Set this to true to disable the hover effect for copy-to-clipboard buttons for block code.</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableHoverBlockCopyToClipBoard</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># A title for shortcuts in menu is set by default. Set this to true to disable it.</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableShortcutsTitle</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># If set to false, a Home button will appear below the search bar on the menu.</span>
</span></span><span class="line"><span class="cl"> <span class="c"># It is redirecting to the landing page of the current language if specified. (Default is &#34;/&#34;)</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableLandingPageButton</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="c"># When using mulitlingual website, disable the switch language button.</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableLanguageSwitchingButton</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Hide breadcrumbs in the header and only show the current page title</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableBreadcrumb</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Hide breadcrumbs in the term pages and only show the current page title</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableTermBreadcrumbs</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Hide the root (first) breadcrumb in the header</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableRootBreadcrumb</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="c"># If set to true, hide table of contents menu in the header of all pages</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 class="c"># If set to false, load the MathJax module on every page regardless if a MathJax shortcode is present</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableMathJax</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Specifies the remote location of the MathJax js</span>
</span></span><span class="line"><span class="cl"> <span class="nx">customMathJaxURL</span> <span class="p">=</span> <span class="s2">&#34;https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Initialization parameter for MathJax, see MathJax documentation</span>
</span></span><span class="line"><span class="cl"> <span class="nx">mathJaxInitialize</span> <span class="p">=</span> <span class="s2">&#34;{}&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># If set to false, load the Mermaid module on every page regardless if a Mermaid shortcode or Mermaid codefence is present</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableMermaid</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Specifies the remote location of the Mermaid js</span>
</span></span><span class="line"><span class="cl"> <span class="nx">customMermaidURL</span> <span class="p">=</span> <span class="s2">&#34;https://unpkg.com/mermaid/dist/mermaid.min.js&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Initialization parameter for Mermaid, see Mermaid documentation</span>
</span></span><span class="line"><span class="cl"> <span class="nx">mermaidInitialize</span> <span class="p">=</span> <span class="s2">&#34;{ \&#34;theme\&#34;: \&#34;default\&#34; }&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># If set to false, load the OpenAPI module on every page regardless if a OpenAPI shortcode is present</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableOpenapi</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Specifies the remote location of the swagger-ui js</span>
</span></span><span class="line"><span class="cl"> <span class="nx">customOpenapiURL</span> <span class="p">=</span> <span class="s2">&#34;https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Hide Next and Previous page buttons displayed in topbar</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableNextPrev</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Order menu sections by &#34;weight&#34;, &#34;title&#34;, &#34;linktitle&#34;, &#34;modifieddate&#34;, &#34;expirydate&#34;, &#34;publishdate&#34;, &#34;date&#34;, &#34;length&#34; or &#34;default&#34; (adhering to Hugo&#39;s default sort order). Default to &#34;weight&#34;;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># this can be overridden in the pages frontmatter</span>
</span></span><span class="line"><span class="cl"> <span class="nx">ordersectionsby</span> <span class="p">=</span> <span class="s2">&#34;weight&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Change default color scheme with a variant one. Eg. can be &#34;auto&#34;, &#34;red&#34;, &#34;blue&#34;, &#34;green&#34; or an array like [ &#34;blue&#34;, &#34;green&#34; ].</span>
</span></span><span class="line"><span class="cl"> <span class="nx">themeVariant</span> <span class="p">=</span> <span class="s2">&#34;auto&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Change the breadcrumb separator. Default to &#34;&gt;&#34;.</span>
</span></span><span class="line"><span class="cl"> <span class="nx">breadcrumbSeparator</span> <span class="p">=</span> <span class="s2">&#34;|&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Change the title separator. Default to &#34;::&#34;.</span>
</span></span><span class="line"><span class="cl"> <span class="nx">titleSeparator</span> <span class="p">=</span> <span class="s2">&#34;-&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># If set to true, the menu in the sidebar will be displayed in a collapsible tree view. Although the functionality works with old browsers (IE11), the display of the expander icons is limited to modern browsers</span>
</span></span><span class="line"><span class="cl"> <span class="nx">collapsibleMenu</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># If a single page can contain content in multiple languages, add those here</span>
</span></span><span class="line"><span class="cl"> <span class="nx">additionalContentLanguage</span> <span class="p">=</span> <span class="p">[</span> <span class="s2">&#34;en&#34;</span> <span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="c"># If set to true, no index.html will be appended to prettyURLs; this will cause pages not</span>
</span></span><span class="line"><span class="cl"> <span class="c"># to be servable from the file system</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableExplicitIndexURLs</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="c"># For external links you can define how they are opened in your browser; this setting will only be applied to the content area but not the shortcut menu</span>
</span></span><span class="line"><span class="cl"> <span class="nx">externalLinkTarget</span> <span class="p">=</span> <span class="s2">&#34;_blank&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="c"># Override default values for image effects, you can even add your own arbitrary effects to the list</span>
</span></span><span class="line"><span class="cl"> <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">imageEffects</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">border</span> <span class="p">=</span> <span class="kc">false</span>
</span></span><span class="line"><span class="cl"> <span class="nx">lightbox</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"> <span class="nx">shadow</span> <span class="p">=</span> <span class="kc">false</span></span></span></code></pre></div><h2 id="serving-your-page-from-a-subfolder">Serving your page from a subfolder</h2>
<p>If your site is served from a subfolder, eg. <code>https://example.com/mysite/</code>, you have to set the following lines to your <code>config.toml</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="nx">baseURL</span> <span class="p">=</span> <span class="s2">&#34;https://example.com/mysite/&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">canonifyURLs</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"><span class="nx">relativeURLs</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div><p>Without <code>canonifyURLs=true</code> URLs in sublemental pages (like <code>sitemap.xml</code>, <code>rss.xml</code>) will be generated falsly while your HTML files will still work. See <a href="https://github.com/gohugoio/hugo/issues/5226" target="_blank">https://github.com/gohugoio/hugo/issues/5226</a>.</p>
<h2 id="serving-your-page-from-the-filesystem">Serving your page from the filesystem</h2>
<p>If you want your page served from the filesystem by using URLs starting with <code>file://</code> you&rsquo;ll need the following configuration in your <code>config.toml</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="nx">relativeURLs</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div><p>The theme will append an additional <code>index.html</code> to all branch bundle links by default to make the page be servable from the file system. If you don&rsquo;t care about the file system and only serve your page via a webserver you can also generate the links without this change by adding this to your <code>config.toml</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="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">disableExplicitIndexURLs</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div>
<div class="box notices cstyle note">
<div class="box-label"><i class="fa-fw fas fa-exclamation-circle"></i> Note</div>
<div class="box-content">
<p>If you want to use the search feature from the file system using an older installation of the theme make sure to change your outputformat for the homepage from the now deprecated <code>JSON</code> to <code>SEARCH</code> <a href="#activate-search">as seen below</a>.</p>
</div>
</div>
<h2 id="activate-search">Activate search</h2>
<p>If not already present, add the following lines in the same <code>config.toml</code> file.</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">outputs</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">home</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">,</span> <span class="s2">&#34;SEARCH&#34;</span><span class="p">]</span></span></span></code></pre></div><p>This will generate a search index file at the root of your public folder ready to be consumed by the Lunr search library. Note that the <code>SEARCH</code> outputformat was named <code>JSON</code> in previous releases but was implemented differently. Although <code>JSON</code> still works, it is now deprecated.</p>
<h3 id="activate-dedicated-search-page">Activate dedicated search page</h3>
<p>You can add a dedicated search page for your page by adding the <code>SEARCHPAGE</code> outputformat to your home page by adding the following lines in your <code>config.toml</code> file. This will cause Hugo to generate a new file <code>http://example.com/mysite/search.html</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="p">[</span><span class="nx">outputs</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">home</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">,</span> <span class="s2">&#34;SEARCH&#34;</span><span class="p">,</span> <span class="s2">&#34;SEARCHPAGE&#34;</span><span class="p">]</span></span></span></code></pre></div><p>You can access this page by either clicking on the magnifier glass or by typing some search term and pressing <code>ENTER</code> inside of the menu&rsquo;s search box .</p>
<p><a href="#R-image-fbe41485768788290e97db34447e2f14" class="lightbox-link"><img src="../../basics/configuration/search_page.png?&amp;width=60pc" alt="Screenshot of the dedicated search page" class="figure-image bg-white border lightbox noshadow" style="height: auto; width: 60pc;" loading="lazy"></a>
<a href="javascript:history.back();" class="lightbox-back" id="R-image-fbe41485768788290e97db34447e2f14"><img src="../../basics/configuration/search_page.png?&amp;width=60pc" alt="Screenshot of the dedicated search page" class="lightbox-image bg-white border lightbox noshadow" loading="lazy"></a></p>
<div class="box notices cstyle note">
<div class="box-label"><i class="fa-fw fas fa-exclamation-circle"></i> Note</div>
<div class="box-content">
<p>To have Hugo create the dedicated search page successfully, you must not generate the URL <code>http://example.com/mysite/search.html</code> from your own content. This can happen if you set <code>uglyURLs=true</code> in your <code>config.toml</code> and defining a Markdown file <code>content/search.md</code>.</p>
<p>To make sure, there is no duplicate content for any given URL of your project, run <code>hugo --printPathWarnings</code>.</p>
</div>
</div>
<h2 id="activate-print-support">Activate print support</h2>
<p>You can activate print support to add the capability to print whole chapters or even the complete site. Just add the <code>PRINT</code> output format to your home, section and page in your <code>config.toml</code> as seen below:</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">outputs</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">home</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">,</span> <span class="s2">&#34;PRINT&#34;</span><span class="p">,</span> <span class="s2">&#34;SEARCH&#34;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">section</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">,</span> <span class="s2">&#34;PRINT&#34;</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">page</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">,</span> <span class="s2">&#34;PRINT&#34;</span><span class="p">]</span></span></span></code></pre></div><p>This will add a little printer icon in the top bar. It will switch the page to print preview when clicked. You can then send this page to the printer by using your browser&rsquo;s usual print functionality.</p>
<div class="box notices cstyle note">
<div class="box-label"><i class="fa-fw fas fa-exclamation-circle"></i> Note</div>
<div class="box-content">
<p>The resulting URL will not be <a href="https://gohugo.io/templates/output-formats/#configure-output-formats" target="_blank">configured ugly</a> in terms of <a href="https://gohugo.io/content-management/urls/#ugly-urls" target="_blank">Hugo&rsquo;s URL handling</a> even if you&rsquo;ve set <code>uglyURLs=true</code> in your <code>config.toml</code>. This is due to the fact that for one mime type only one suffix can be configured.</p>
<p>Nevertheless, if you&rsquo;re unhappy with the resulting URLs you can manually redefine <code>outputFormats.PRINT</code> in your own <code>config.toml</code> to your liking.</p>
</div>
</div>
<h2 id="mathjax">MathJax</h2>
<p>The MathJax configuration parameters can also be set on a specific page. In this case, the global parameter would be overwritten by the local one. See <a href="../../shortcodes/math/index.html">Math</a> for additional documentation.</p>
<h3 id="math-example">Example</h3>
<p>MathJax is globally disabled. By default it won&rsquo;t be loaded by any page.</p>
<p>On page &ldquo;Physics&rdquo; you coded some JavaScript for a dynamic formulae. You can set the MathJax parameters locally to load mathJax on this page.</p>
<p>You also can disable MathJax for specific pages while globally enabled.</p>
<h2 id="mermaid">Mermaid</h2>
<p>The Mermaid configuration parameters can also be set on a specific page. In this case, the global parameter would be overwritten by the local one. See <a href="../../shortcodes/mermaid/index.html">Mermaid</a> for additional documentation.</p>
<h3 id="mermaid-example">Example</h3>
<p>Mermaid is globally disabled. By default it won&rsquo;t be loaded by any page.</p>
<p>On page &ldquo;Architecture&rdquo; you coded some JavaScript to dynamically generate a class diagram. You can set the Mermaid parameters locally to load mermaid on this page.</p>
<p>You also can disable Mermaid for specific pages while globally enabled.</p>
<h2 id="home-button-configuration">Home Button Configuration</h2>
<p>If the <code>disableLandingPageButton</code> option is set to <code>false</code>, a Home button will appear
on the left menu. It is an alternative for clicking on the logo. To edit the
appearance, you will have to configure two parameters for the defined languages:</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="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 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">&#34;&lt;i class=&#39;fas fa-home&#39;&gt;&lt;/i&gt; Home&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">...</span>
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">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="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">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">&#34;&lt;i class=&#39;fas fa-home&#39;&gt;&lt;/i&gt; Arrr! Homme&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">...</span></span></span></code></pre></div><p>If those params are not configured for a specific language, they will get their
default values:</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">landingPageName</span> <span class="p">=</span> <span class="s2">&#34;&lt;i class=&#39;fas fa-home&#39;&gt;&lt;/i&gt; Home&#34;</span></span></span></code></pre></div><p>The home button is going to look like this:</p>
<p><a href="#R-image-dd3f99f65a6a59ca0d88b4b18ab6a9ee" class="lightbox-link"><img src="../../basics/configuration/home_button_defaults.png?width=18.75rem" alt="Default Home Button" 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-dd3f99f65a6a59ca0d88b4b18ab6a9ee"><img src="../../basics/configuration/home_button_defaults.png?width=18.75rem" alt="Default Home Button" class="lightbox-image bg-white border lightbox noshadow" loading="lazy"></a></p>
<h2 id="social-media-meta-tags">Social Media Meta Tags</h2>
<p>You can add social media meta tags for the <a href="https://gohugo.io/templates/internal/#open-graph" target="_blank">Open Graph</a> protocol and <a href="https://gohugo.io/templates/internal/#twitter-cards" target="_blank">Twitter Cards</a> to your site. These are configured as mentioned in the Hugo docs.</p>
<footer class="footline">
</footer>
</article>
</div>
</main>
</div>
<script src="../../js/clipboard.min.js?1698689523" defer></script>
<script src="../../js/perfect-scrollbar.min.js?1698689523" defer></script>
<script src="../../js/theme.js?1698689523" defer></script>
</body>
</html>