mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
807 lines
59 KiB
HTML
807 lines
59 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="art-x-pir" dir="rtl" itemscope itemtype="http://schema.org/Article">
|
||
<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.134.1">
|
||
<meta name="generator" content="Relearn 6.3.0+tip">
|
||
<meta name="description" content="Th' Relearrrn theme provides configurat'n opt'ns t' change yer site’s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed through so called color variants.">
|
||
<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="Brrrand'n :: Cap'n Hugo Relearrrn Theme">
|
||
<meta name="twitter:description" content="Th' Relearrrn theme provides configurat'n opt'ns t' change yer site’s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed through so called color variants.">
|
||
<meta property="og:url" content="https://mcshelby.github.io/hugo-theme-relearn/pir/basics/branding/index.html">
|
||
<meta property="og:site_name" content="Cap'n Hugo Relearrrn Theme">
|
||
<meta property="og:title" content="Brrrand'n :: Cap'n Hugo Relearrrn Theme">
|
||
<meta property="og:description" content="Th' Relearrrn theme provides configurat'n opt'ns t' change yer site’s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed through so called color variants.">
|
||
<meta property="og:locale" content="art_x_pir">
|
||
<meta property="og:type" content="website">
|
||
<meta property="og:image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
|
||
<meta itemprop="name" content="Brrrand'n :: Cap'n Hugo Relearrrn Theme">
|
||
<meta itemprop="description" content="Th' Relearrrn theme provides configurat'n opt'ns t' change yer site’s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed through so called color variants.">
|
||
<meta itemprop="wordCount" content="1587">
|
||
<meta itemprop="image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
|
||
<meta itemprop="keywords" content="Custom,Theming">
|
||
<title>Brrrand'n :: Cap'n Hugo Relearrrn Theme</title>
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/basics/branding/index.html" rel="alternate" hreflang="x-default">
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/basics/branding/index.html" rel="alternate" hreflang="en">
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/pir/basics/branding/index.html" rel="alternate" hreflang="art-x-pir">
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/pir/basics/branding/index.html" rel="canonical" type="text/html" title="Brrrand'n :: Cap'n Hugo Relearrrn Theme">
|
||
<link href="/hugo-theme-relearn/pir/basics/branding/index.xml" rel="alternate" type="application/rss+xml" title="Brrrand'n :: Cap'n Hugo Relearrrn Theme">
|
||
<link href="/hugo-theme-relearn/images/logo.svg?1725605425" rel="icon" type="image/svg+xml">
|
||
<link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1725605425" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1725605425" rel="stylesheet"></noscript>
|
||
<link href="/hugo-theme-relearn/css/nucleus.css?1725605425" rel="stylesheet">
|
||
<link href="/hugo-theme-relearn/css/auto-complete.css?1725605425" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/auto-complete.css?1725605425" rel="stylesheet"></noscript>
|
||
<link href="/hugo-theme-relearn/css/perfect-scrollbar.min.css?1725605425" rel="stylesheet">
|
||
<link href="/hugo-theme-relearn/css/fonts.css?1725605425" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fonts.css?1725605425" rel="stylesheet"></noscript>
|
||
<link href="/hugo-theme-relearn/css/theme.css?1725605425" rel="stylesheet">
|
||
<link href="/hugo-theme-relearn/css/theme-relearn-auto.css?1725605425" rel="stylesheet" id="R-variant-style">
|
||
<link href="/hugo-theme-relearn/css/chroma-relearn-auto.css?1725605425" rel="stylesheet" id="R-variant-chroma-style">
|
||
<link href="/hugo-theme-relearn/css/variant.css?1725605425" rel="stylesheet">
|
||
<link href="/hugo-theme-relearn/css/print.css?1725605425" rel="stylesheet" media="print">
|
||
<link href="/hugo-theme-relearn/css/format-print.css?1725605425" rel="stylesheet">
|
||
<script src="/hugo-theme-relearn/js/variant.js?1725605425"></script>
|
||
<script>
|
||
window.relearn = window.relearn || {};
|
||
window.relearn.relBasePath='..\/..\/..';
|
||
window.relearn.relBaseUri='..\/..\/..\/..';
|
||
window.relearn.absBaseUri='https:\/\/mcshelby.github.io\/hugo-theme-relearn';
|
||
window.relearn.disableAnchorCopy=false;
|
||
window.relearn.disableAnchorScrolling=false;
|
||
window.index_js_url="/hugo-theme-relearn/pir/index.search.js?1725605425";
|
||
// variant stuff
|
||
window.variants && variants.init( [ 'relearn-auto', 'relearn-light', 'relearn-dark', 'relearn-bright', 'zen-auto', 'zen-light', 'zen-dark', 'retro-auto', 'neon', 'learn', 'blue', 'green', 'red' ] );
|
||
// translations
|
||
window.T_Copy_to_clipboard = `Copy t' clipboard`;
|
||
window.T_Copied_to_clipboard = `Copied t' clipboard!`;
|
||
window.T_Copy_link_to_clipboard = `Copy link t' clipboard`;
|
||
window.T_Link_copied_to_clipboard = `Copied link t' clipboard!`;
|
||
window.T_Reset_view = `Rrreset view`;
|
||
window.T_View_reset = `View rrreset!`;
|
||
window.T_No_results_found = `No rrresults found fer "{0}"`;
|
||
window.T_N_results_found = `{1} rrresults found fer "{0}"`;
|
||
</script>
|
||
<style>
|
||
#R-body img.bg-white {
|
||
background-color: white;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body class="mobile-support print disableInlineCopyToClipboard" data-url="/hugo-theme-relearn/pir/basics/branding/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/pir/basics/index.html"><span itemprop="name">Basics</span></a><meta itemprop="position" content="1"> > </li><li
|
||
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Brrrand'n</span><meta itemprop="position" content="2"></li>
|
||
</ol>
|
||
<div class="topbar-area topbar-area-end" data-area="end">
|
||
<div class="topbar-button topbar-button-prev" data-content-empty="disable" data-width-s="show" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/pir/basics/configuration/index.html" title="Configurrrat'n (🡒)"><i class="fa-fw fas fa-chevron-left"></i></a>
|
||
</div>
|
||
<div class="topbar-button topbar-button-next" data-content-empty="disable" data-width-s="show" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/pir/basics/customization/index.html" title="Customizat'n (🡐)"><i class="fa-fw fas fa-chevron-right"></i></a>
|
||
</div>
|
||
</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="brrrandn">Brrrand'n</h1>
|
||
|
||
<p>Th' Relearrrn theme provides configurat'n opt'ns t' change yer site’s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed through so called color variants.</p>
|
||
<p>A color variant lets ye cust'mize various visual effects o' yer ship like almost any color, used fonts, color schemes o' print, rules highligtn'n, Merrrmaid an' th' OpenAPI shortcode, etc. It contains o' a CSS file an' optional configurat'n opt'ns 'n yer <code>hugo.toml</code>.</p>
|
||
<p>Th' Relearrrn theme ships wit' a wide set o' different color variants. Ye can use them as-is, copy them over an' use them as a start'n point fer yer customizat'ns or just create completely new variants unique t' yer ship. Th' <a href="/hugo-theme-relearn/pir/basics/generator/index.html">interactive variant generator</a> may help ye wit' this task.</p>
|
||
<p>Once configured 'n yer <code>hugo.toml</code>, ye can select them wit' th' variant selector at th' bottom o' th' menu.</p>
|
||
<h2 id="theme-variant">Change th' Variant (Simple)</h2>
|
||
<h3 id="single-variant">Single Variant</h3>
|
||
<p>Set th' <code>themeVariant</code> value t' th' name o' yer theme file. That’s it! Yer ship will be displayed 'n this variant only.</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">themeVariant</span> <span class="p">=</span> <span class="s1">'relearn-light'</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariant</span><span class="p">:</span><span class="w"> </span><span class="l">relearn-light</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariant"</span><span class="p">:</span> <span class="s2">"relearn-light"</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></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle note">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-exclamation-circle"></i> Avast
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Yer theme variant file must reside 'n yer site’s <code>assets/css</code> directory an' th' file name must start wit' <code>theme-</code> an' end 'n <code>.css</code>. In th' above example, th' path o' yer theme file must be <code>assets/css/theme-relearn-light.css</code>.</p>
|
||
<p>If ye want t' make changes t' a shipped color variant, create a copy 'n yer site’s <code>assets/css</code> directory. Don’t edit th' file 'n th' theme’s directory!</p>
|
||
</div>
|
||
</div>
|
||
<h3 id="multiple-variants">Multiple Variants</h3>
|
||
<p>Ye can also set multiple variants. In this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">themeVariant</span> <span class="p">=</span> <span class="p">[</span><span class="s1">'relearn-light'</span><span class="p">,</span> <span class="s1">'relearn-dark'</span><span class="p">]</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariant</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">relearn-light</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">relearn-dark</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariant"</span><span class="p">:</span> <span class="p">[</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"relearn-light"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"relearn-dark"</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></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle tip">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-lightbulb"></i> Smarrrt Arrrse
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Th' theme provides an advanced configurat'n mode, combin'n th' functionality fer multiple variants wit' th' below possibilities o' adjust'n t' yer OS sett'ns an' rules highlight'n an' even more!</p>
|
||
<p>Although all opt'ns documented here be still work'n, th' advanced configurat'n opt'ns be th' recommended way t' configure yer color variants. <a href="/hugo-theme-relearn/pir/basics/branding/index.html#theme-variant-advanced">See below</a>.</p>
|
||
</div>
|
||
</div>
|
||
<h2 id="adjust-to-os-settings">Adjust t' OS Sett'ns</h2>
|
||
<p>Ye can also cause th' ship t' adjust t' yer OS sett'ns fer light/dark mode. Just set th' <code>themeVariant</code> t' <code>auto</code> t' become an auto mode variant. That’s it.</p>
|
||
<p>Ye can use th' <code>auto</code> value wit' th' single or multiple variants opt'n. If ye be us'n multiple variants, ye can drop <code>auto</code> at any posit'n 'n th' option’s array, but usually it makes sense t' set it 'n th' first posit'n an' make it th' default.</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">themeVariant</span> <span class="p">=</span> <span class="p">[</span><span class="s1">'auto'</span><span class="p">,</span> <span class="s1">'red'</span><span class="p">]</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariant</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">auto</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">red</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariant"</span><span class="p">:</span> <span class="p">[</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"auto"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"red"</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></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>If ye don’t configure anyth'n else, th' theme will default t' use <code>relearn-light</code> fer light mode an' <code>relearn-dark</code> fer dark mode. These defaults be overwritten by th' first two non-auto opt'ns o' yer <code>themeVariant</code> opt'n if present.</p>
|
||
<p>In th' above example, ye would end wit' <code>red</code> fer light mode an' th' default o' <code>relearn-dark</code> fer dark mode.</p>
|
||
<p>If ye don’t like that behavior, ye can explicitly set <code>themeVariantAuto</code>. Th' first entry 'n th' array be th' color variant fer light mode, th' second fer dark mode.</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">themeVariantAuto</span> <span class="p">=</span> <span class="p">[</span><span class="s1">'learn'</span><span class="p">,</span> <span class="s1">'neon'</span><span class="p">]</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariantAuto</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">learn</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">neon</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariantAuto"</span><span class="p">:</span> <span class="p">[</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"learn"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"neon"</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></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<h2 id="change-the-favicon">Change th' Favicon</h2>
|
||
<p>If yer favicon be a SVG, PNG or ICO, just drop yer image 'n yer site’s <code>static/images/</code> directory an' name it <code>favicon.svg</code>, <code>favicon.png</code> or <code>favicon.ico</code> respectively.</p>
|
||
<p>If ye want t' adjust yer favicon accord'n t' yer OS sett'ns fer light/dark mode, add th' image files <code>static/images/favicon-light.svg</code> an' <code>static/images/favicon-dark.svg</code> t' yer site’s directory, respectively, correspond'n t' yer file format. In case some o' th' files be miss'n, th' theme falls back t' <code>favicon.svg</code> fer each miss'n file. All supplied favicons must be o' th' same file format.</p>
|
||
<p>If no favicon file be found, th' theme will lookup th' alternative filename <code>logo</code> 'n th' same locat'n an' will repeat th' search fer th' list o' supported file types.</p>
|
||
<p>If ye need t' change this default behavior, create a new file <code>layouts/partials/favicon.html</code> 'n yer site’s directory an' write someth'n like this:</p>
|
||
<div class="tab-panel" data-tab-group="2ae4da87d949ab6e020f27aa1c1bbb90">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">​</div>
|
||
<button
|
||
data-tab-item="layoutspartialsfaviconhtml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('2ae4da87d949ab6e020f27aa1c1bbb90','layoutspartialsfaviconhtml')"
|
||
>
|
||
<span class="tab-nav-text">layouts/partials/favicon.html</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="layoutspartialsfaviconhtml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p"><</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"icon"</span> <span class="na">href</span><span class="o">=</span><span class="s">"/images/favicon.bmp"</span> <span class="na">type</span><span class="o">=</span><span class="s">"image/bmp"</span><span class="p">></span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div><h2 id="change-the-logo">Change th' Logo</h2>
|
||
<p>Create a new file 'n <code>layouts/partials/logo.html</code> o' yer ship. Then write any HTML ye want. Ye could use an <code>img</code> HTML tag an' reference an image created under th' <em>static</em> folder, or ye could paste a SVG definit'n!</p>
|
||
<div class="box notices cstyle note">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-exclamation-circle"></i> Avast
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Th' size o' th' logo will adapt automatically.</p>
|
||
</div>
|
||
</div>
|
||
<h2 id="syntax-highlighting">Rules Highlight'n</h2>
|
||
<p>If ye want t' switch th' rules highlight'n theme together wit' yer color variant, ye need t' configure yer installat'n <a href="https://gohugo.io/content-management/syntax-highlighting/" rel="external" target="_self">accord'n t' Hugo’s documentat'n</a> an' provide a rules highlight'n stylesheet file.</p>
|
||
<p>Ye can use a one o' th' shipped stylesheet files or use Cap'n Hugo t' generate a file fer ye. Th' file must be written t' <code>assets/css/chroma-<NAME>.css</code>. T' use it wit' yer color variant ye have t' define <code>--CODE-theme: <NAME></code> 'n th' color variant stylesheet file.</p>
|
||
<p>For an example, take a look into <a href="https://github.com/McShelby/hugo-theme-relearn/blob/main/assets/css/theme-relearn-light.css" rel="external" target="_self"><code>theme-relearn-light.css</code></a> an' <a href="https://github.com/McShelby/hugo-theme-relearn/blob/main/exampleSite/config/_default/hugo.toml" rel="external" target="_self"><code>hugo.toml</code></a> o' th' exampleSite.</p>
|
||
<h2 id="theme-variant-advanced">Change th' Variant (Advanced)</h2>
|
||
<p>Th' theme offers a new way t' configure theme variants an' all o' th' aspects above inside o' a single configurat'n item. This comes wit' some features previously unsupported.</p>
|
||
<p>Like wit' th' <a href="/hugo-theme-relearn/pir/basics/branding/index.html#multiple-variants">multiple variants</a> opt'n, ye be defin'n yer theme variants 'n an array but now <em>not by simple str'ns</em> <strong>but 'n a t'ble wit' subopt'ns</strong>.</p>
|
||
<p>Again, 'n this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">themeVariant</span> <span class="p">=</span> <span class="p">[</span><span class="s1">'relearn-light'</span><span class="p">,</span> <span class="s1">'relearn-dark'</span><span class="p">]</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariant</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">relearn-light</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">relearn-dark</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariant"</span><span class="p">:</span> <span class="p">[</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"relearn-light"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"relearn-dark"</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></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>ye now write it that way:</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'relearn-light'</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'relearn-dark'</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariant</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">relearn-light</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">relearn-dark</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariant"</span><span class="p">:</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="nt">"identifier"</span><span class="p">:</span> <span class="s2">"relearn-light"</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></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"relearn-dark"</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></span><span class="line"><span class="cl"> <span class="p">}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>Th' <code>identifier</code> opt'n be mandatory an' equivalent t' th' str'n 'n th' first example. Further opt'ns can be configured, see th' t'ble below.</p>
|
||
<h3 id="parameter">Parameter</h3>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="text-align: left">Name</th>
|
||
<th style="text-align: left">Default</th>
|
||
<th style="text-align: left">Notes</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align: left">identifier</td>
|
||
<td style="text-align: left"><em><empty></em></td>
|
||
<td style="text-align: left">Must correspond t' th' name o' a color variant either 'n yer site’s or th' theme’s directory 'n th' form <code>assets/css/theme-<IDENTIFIER>.css</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: left">name</td>
|
||
<td style="text-align: left">see notes</td>
|
||
<td style="text-align: left">Th' name t' be displayed 'n th' variant selector. If not set, th' identifier be used 'n a human read'ble form.</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: left">auto</td>
|
||
<td style="text-align: left"><em><empty></em></td>
|
||
<td style="text-align: left">If set, th' variant be treated as an <a href="/hugo-theme-relearn/pir/basics/branding/index.html#adjust-to-os-settings">auto mode variant</a>. It has th' same behavior as th' <code>themeVariantAuto</code> opt'n. Th' first entry 'n th' array be th' color variant fer light mode, th' second fer dark mode. Defin'n auto mode variants wit' th' advanced opt'ns has th' benefit that ye can now have multiple auto mode variants instead o' just one wit' th' simple opt'ns.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h3 id="example-configuration-of-this-site">Example Configurat'n o' This Ship</h3>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">auto</span> <span class="p">=</span> <span class="p">[]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'relearn-auto'</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s1">'Relearn Light/Dark'</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'relearn-light'</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'relearn-dark'</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">auto</span> <span class="p">=</span> <span class="p">[</span><span class="s1">'zen-light'</span><span class="p">,</span> <span class="s1">'zen-dark'</span><span class="p">]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'zen-auto'</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">name</span> <span class="p">=</span> <span class="s1">'Zen Light/Dark'</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'zen-light'</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'zen-dark'</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'neon'</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariant</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">auto</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">relearn-auto</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">Relearrrn Light/Dark</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">relearn-light</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">relearn-dark</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">auto</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">zen-light</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">zen-dark</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">zen-auto</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">Zen Light/Dark</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">zen-light</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">zen-dark</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">neon</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariant"</span><span class="p">:</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="nt">"auto"</span><span class="p">:</span> <span class="p">[],</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"relearn-auto"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"name"</span><span class="p">:</span> <span class="s2">"Relearn Light/Dark"</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></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"relearn-light"</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></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"relearn-dark"</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></span><span class="line"><span class="cl"> <span class="nt">"auto"</span><span class="p">:</span> <span class="p">[</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"zen-light"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s2">"zen-dark"</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="p">],</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"zen-auto"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"name"</span><span class="p">:</span> <span class="s2">"Zen Light/Dark"</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></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"zen-light"</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></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"zen-dark"</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></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"neon"</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></span><span class="line"><span class="cl"> <span class="p">}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<h2 id="modify-shipped-variants">Modify Shipped Variants</h2>
|
||
<p>In case ye like a shipped variant but only want t' tweak some aspects, ye have two choices:</p>
|
||
<ol>
|
||
<li>
|
||
<p>Copy an' change</p>
|
||
<p>Ye can copy th' shipped variant file from th' theme’s <code>assets/css</code> directory t' th' site’s <code>assets/css</code> directory an' either store it wit' th' same name or give it a new name. Edit th' sett'ns an' save th' new file. Afterwards ye can use it 'n yer <code>hugo.toml</code> by th' chosen name.</p>
|
||
</li>
|
||
<li>
|
||
<p>Create an' import</p>
|
||
<p>Ye can create a new variant file 'n th' site’s <code>assets/css</code> directory an' give it a new name. Import th' shipped variant, add th' sett'ns ye want t' change an' save th' new file. Afterwards ye can use it 'n yer <code>hugo.toml</code> by th' chosen name.</p>
|
||
<p>For example, ye want t' use th' <code>relearn-light</code> variant but want t' change th' rules highlight'n schema t' th' one used 'n th' <code>neon</code> variant. For that, create a new <code>assets/css/theme-my-brand'n.css</code> 'n yer site’s directory an' add th' follow'n lines:</p>
|
||
<div class="tab-panel" data-tab-group="e64b23e962ea5d487decae303592436c">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">​</div>
|
||
<button
|
||
data-tab-item="assetscsstheme-my-brandingcss"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('e64b23e962ea5d487decae303592436c','assetscsstheme-my-brandingcss')"
|
||
>
|
||
<span class="tab-nav-text">assets/css/theme-my-brand'n.css</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="assetscsstheme-my-brandingcss"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">@</span><span class="k">import</span> <span class="s2">"theme-relearn-light.css"</span><span class="p">;</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">:</span><span class="nd">root</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nv">--CODE-theme</span><span class="p">:</span> <span class="n">neon</span><span class="p">;</span> <span class="c">/* name o' th' chroma stylesheet file */</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nv">--CODE-BLOCK-color</span><span class="p">:</span> <span class="nb">rgba</span><span class="p">(</span> <span class="mi">226</span><span class="p">,</span> <span class="mi">228</span><span class="p">,</span> <span class="mi">229</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span> <span class="c">/* fallback color fer code text */</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nv">--CODE-BLOCK-BG-color</span><span class="p">:</span> <span class="nb">rgba</span><span class="p">(</span> <span class="mi">40</span><span class="p">,</span> <span class="mi">42</span><span class="p">,</span> <span class="mi">54</span><span class="p">,</span> <span class="mi">1</span> <span class="p">);</span> <span class="c">/* fallback color fer code background */</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div><p>Afterwards put this 'n yer <code>hugo.toml</code> t' use yer new variant:</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">themeVariant</span> <span class="p">=</span> <span class="s1">'my-branding'</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">themeVariant</span><span class="p">:</span><span class="w"> </span><span class="l">my-brand'n</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"themeVariant"</span><span class="p">:</span> <span class="s2">"my-branding"</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></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>In comparison t' <em>copy an' change</em>, this has th' advantage that ye profit from any adjustments t' th' <code>relearn-light</code> variant but keep yer modificat'ns.</p>
|
||
</li>
|
||
</ol>
|
||
|
||
|
||
<footer class="footline">
|
||
<div class=" taxonomy-categories term-list cstyle " title="Categorrries" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
|
||
<i class="fa-fw fas fa-layer-group"></i>
|
||
<ul>
|
||
<li><a class="term-link" href="/hugo-theme-relearn/pir/categories/custom/index.html">Custom</a></li>
|
||
<li><a class="term-link" href="/hugo-theme-relearn/pir/categories/theming/index.html">Theming</a></li>
|
||
</ul>
|
||
</div>
|
||
</footer>
|
||
</article>
|
||
|
||
</div>
|
||
</main>
|
||
</div>
|
||
<script src="/hugo-theme-relearn/js/clipboard.min.js?1725605425" defer></script>
|
||
<script src="/hugo-theme-relearn/js/perfect-scrollbar.min.js?1725605425" defer></script>
|
||
<script src="/hugo-theme-relearn/js/theme.js?1725605425" defer></script>
|
||
</body>
|
||
</html>
|