mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-24 08:13:05 +00:00
233 lines
19 KiB
HTML
233 lines
19 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="art-pir" dir="rtl">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
|
<meta name="generator" content="Hugo 0.123.8">
|
|
<meta name="generator" content="Relearn 5.25.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="Installat'n :: Cap'n Hugo Relearrrn Theme">
|
|
<meta name="twitter:description" content="Documentation for Hugo Relearn Theme">
|
|
<meta property="og:title" content="Installat'n :: Cap'n Hugo Relearrrn 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/pir/basics/installation/index.html">
|
|
<meta property="og:image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
|
|
<meta property="og:site_name" content="Cap'n Hugo Relearrrn Theme">
|
|
<title>Installat'n :: Cap'n Hugo Relearrrn Theme</title>
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/basics/installation/index.html" rel="alternate" hreflang="x-default">
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/basics/installation/index.html" rel="alternate" hreflang="en">
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/pir/basics/installation/index.html" rel="alternate" hreflang="art-pir">
|
|
<link href="https://mcshelby.github.io/hugo-theme-relearn/pir/basics/installation/index.html" rel="canonical" type="text/html" title="Installat'n :: Cap'n Hugo Relearrrn Theme">
|
|
<link href="/hugo-theme-relearn/pir/basics/installation/index.xml" rel="alternate" type="application/rss+xml" title="Installat'n :: Cap'n Hugo Relearrrn Theme">
|
|
<link href="/hugo-theme-relearn/images/logo.svg?1710189843" rel="icon" type="image/svg+xml">
|
|
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use -->
|
|
<link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1710189845" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1710189845" rel="stylesheet"></noscript>
|
|
<link href="/hugo-theme-relearn/css/nucleus.css?1710189845" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/auto-complete.css?1710189845" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/auto-complete.css?1710189845" rel="stylesheet"></noscript>
|
|
<link href="/hugo-theme-relearn/css/perfect-scrollbar.min.css?1710189845" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/fonts.css?1710189845" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fonts.css?1710189845" rel="stylesheet"></noscript>
|
|
<link href="/hugo-theme-relearn/css/theme.css?1710189845" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/theme-relearn-auto.css?1710189845" rel="stylesheet" id="R-variant-style">
|
|
<link href="/hugo-theme-relearn/css/chroma-relearn-auto.css?1710189845" rel="stylesheet" id="R-variant-chroma-style">
|
|
<link href="/hugo-theme-relearn/css/variant.css?1710189845" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/print.css?1710189845" rel="stylesheet" media="print">
|
|
<link href="/hugo-theme-relearn/css/format-print.css?1710189845" rel="stylesheet">
|
|
<link href="/hugo-theme-relearn/css/ie.css?1710189845" rel="stylesheet">
|
|
<script src="/hugo-theme-relearn/js/url.js?1710189845"></script>
|
|
<script src="/hugo-theme-relearn/js/variant.js?1710189845"></script>
|
|
<script>
|
|
// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:
|
|
// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72
|
|
window.index_js_url="/hugo-theme-relearn/pir/index.search.js";
|
|
var root_url="/";
|
|
var baseUri=root_url.replace(/\/$/, '');
|
|
window.relearn = window.relearn || {};
|
|
window.relearn.baseUriFull='https:\/\/mcshelby.github.io\/hugo-theme-relearn/';
|
|
// variant stuff
|
|
window.relearn.themeVariantModifier='';
|
|
window.variants && variants.init( [ 'relearn-auto', 'relearn-light', 'relearn-dark', 'relearn-bright', 'zen-auto', 'zen-light', 'zen-dark', 'neon', 'learn', 'blue', 'green', 'red' ] );
|
|
// translations
|
|
window.T_Copy_to_clipboard = `Copy 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/installation/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">Installat'n</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="Tag-a-taggs" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
|
|
<ul>
|
|
<li><a class="term-link" href="/hugo-theme-relearn/pir/tags/documentatn/index.html">Documentat'n</a></li>
|
|
</ul>
|
|
</div>
|
|
</header>
|
|
<h1 id="installatn">Installat'n</h1>
|
|
|
|
|
|
<p>Th' follow'n steps be here t' help ye initialize yer new website. If ye don’t know Cap'n Hugo at all, we strongly suggest ye learn more about it by follow'n this <a href="https://gohugo.io/overview/quickstart/" target="_blank">great documentat'n fer beginners</a>.</p>
|
|
<h2 id="create-your-project">Create yer project</h2>
|
|
<p>Cap'n Hugo provides a <code>new</code> command t' create a new website.</p>
|
|
<div class="highlight wrap-code"><pre tabindex="0"><code>hugo new ship <new_project></code></pre></div><h2 id="install-the-theme">Install th' theme</h2>
|
|
<p>Install th' Relearrrn theme by follow'n <a href="https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme" target="_blank">this documentat'n</a> us'n Hugo’s module system.</p>
|
|
<p>This theme’s repository be: <a href="https://github.com/McShelby/hugo-theme-relearn.git" target="_blank">https://github.com/McShelby/hugo-theme-relearn.git</a></p>
|
|
<p>Alternatively, ye can <a href="https://github.com/McShelby/hugo-theme-relearn/archive/main.zip" target="_blank">download th' theme as .zip</a> file an' extract it 'n th' <code>themes</code> directory</p>
|
|
<h3 id="from-git">From Git</h3>
|
|
<p>If ye install th' theme from yer git repository or GitHub, ye have several opt'ns.</p>
|
|
<p>If ye use th' <code>head</code> o' th' <code>main</code> branch, ye be us'n th' development version. Usually it be fully functional but can break from time t' time. We try t' fix newly introduced bugs 'n this version as soon as poss'ble.</p>
|
|
<p>Additionally ye can checkout one o' th' tagged versions. These tagged versions correspond t' an official <a href="https://github.com/McShelby/hugo-theme-relearn/releases" target="_blank">releases from th' GitHub repository</a>.</p>
|
|
<p>Besides th' usual version tags (eg <code>1.2.3</code>) there be also tags fer th' main version (eg. <code>1.2.x</code>), major version (eg. <code>1.x</code>) an' th' latest (just <code>x</code>) released version mak'n it easier fer ye t' pin th' theme t' a certain version.</p>
|
|
<h2 id="basic-configuration">Basic configurat'n</h2>
|
|
<p>When build'n th' website, ye can set a theme by us'n <code>--theme</code> opt'n. However, we suggest ye modify th' configurat'n file <code>hugo.toml</code> an' set th' theme as th' default. Ye can also add th' <code>[outputs]</code> section t' en'ble th' <a href="/hugo-theme-relearn/pir/basics/customization/index.html#activate-search">search functionality</a>.</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="nx">theme</span> <span class="p">=</span> <span class="s1">'hugo-theme-relearn'</span>
|
|
</span></span><span class="line"><span class="cl">
|
|
</span></span><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="s1">'html'</span><span class="p">,</span> <span class="s1">'rss'</span><span class="p">,</span> <span class="s1">'search'</span><span class="p">,</span> <span class="s1">'searchpage'</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">outputs</span><span class="p">:</span><span class="w">
|
|
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">home</span><span class="p">:</span><span class="w">
|
|
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">html</span><span class="w">
|
|
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">rss</span><span class="w">
|
|
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">search</span><span class="w">
|
|
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="l">searchpage</span><span class="w">
|
|
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">theme</span><span class="p">:</span><span class="w"> </span><span class="l">hugo-theme-relearn</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">"outputs"</span><span class="p">:</span> <span class="p">{</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="nt">"home"</span><span class="p">:</span> <span class="p">[</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="s2">"html"</span><span class="p">,</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="s2">"rss"</span><span class="p">,</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="s2">"search"</span><span class="p">,</span>
|
|
</span></span><span class="line"><span class="cl"> <span class="s2">"searchpage"</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">"theme"</span><span class="p">:</span> <span class="s2">"hugo-theme-relearn"</span>
|
|
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<h2 id="create-your-first-chapter-page">Create yer first chapter plank</h2>
|
|
<p>Chapters be planks that contain other child planks. It has a special layout style an' usually just contains a <em>chapter name</em>, th' <em>title</em> an' a <em>brief abstract</em> o' th' section.</p>
|
|
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="gu">### Chapter 1
|
|
</span></span></span><span class="line"><span class="cl"><span class="gu"></span>
|
|
</span></span><span class="line"><span class="cl"><span class="gh"># Basics
|
|
</span></span></span><span class="line"><span class="cl"><span class="gh"></span>
|
|
</span></span><span class="line"><span class="cl">Discover what this Cap'n Hugo theme be all about an' th' core concepts behind it.</span></span></code></pre></div><p>renders as</p>
|
|
<p><a href="#R-image-9ab0cd67efe36d6446aa6c7c130bae9b" class="lightbox-link"><img alt="A Chapter" class="bg-white border lightbox noshadow figure-image" loading="lazy" src="/hugo-theme-relearn/basics/installation/chapter.png?width=60pc" style=" height: auto; width: 60pc;"></a>
|
|
<a href="javascript:history.back();" class="lightbox-back" id="R-image-9ab0cd67efe36d6446aa6c7c130bae9b"><img alt="A Chapter" class="bg-white border lightbox noshadow lightbox-image" loading="lazy" src="/hugo-theme-relearn/basics/installation/chapter.png?width=60pc"></a></p>
|
|
<p>Th' Relearrrn theme provides archetypes t' create skeletons fer yer website. Begin by creat'n yer first chapter plank wit' th' follow'n command</p>
|
|
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">hugo new --kind chapter basics/_index.md</span></span></code></pre></div><p>By open'n th' given file, ye should see th' property <code>chapter=true</code> on top, mean'n this plank be a <em>chapter</em>.</p>
|
|
<p>By default all chapters an' planks be created as a draft. If ye want t' render these planks, remove th' property <code>draft: true</code> from th' metadata.</p>
|
|
<h2 id="create-your-first-content-pages">Create yer first rrrambl'n planks</h2>
|
|
<p>Then, create rrrambl'n planks inside th' previously created chapter. Here be two ways t' create rrrambl'n 'n th' chapter:</p>
|
|
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">hugo new basics/first-content.md
|
|
</span></span><span class="line"><span class="cl">hugo new basics/second-content/_index.md</span></span></code></pre></div><p>Feel free t' edit those files by add'n some sample rrrambl'n an' replac'n th' <code>title</code> value 'n th' beginn'n o' th' files.</p>
|
|
<h2 id="launching-the-website-locally">Launch'n th' website locally</h2>
|
|
<p>Launch by us'n th' follow'n command:</p>
|
|
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">hugo serve</span></span></code></pre></div><p>Go t' <code>http://localhost:1313</code></p>
|
|
<p>Ye should notice three th'ns:</p>
|
|
<ol>
|
|
<li>Ye have a left-side <strong>Basics</strong> menu, contain'n two submenus wit' names equal t' th' <code>title</code> properties 'n th' previously created files.</li>
|
|
<li>Th' home plank explains how t' cust'mize it by follow'n th' instruct'ns.</li>
|
|
<li>When ye run <code>hugo serve</code>, when th' contents o' th' files change, th' plank automatically refreshes wit' th' changes. Neat!</li>
|
|
</ol>
|
|
<h2 id="build-the-website">Build th' website</h2>
|
|
<p>When yer ship be ready t' deploy, run th' follow'n command:</p>
|
|
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">hugo</span></span></code></pre></div><p>A <code>public</code> folder will be generated, contain'n all static rrrambl'n an' assets fer yer website. It can now be deployed on any web server.</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>This website can be automatically published an' hosted wit' <a href="https://www.netlify.com/" target="_blank">Netlify</a> (Read more about <a href="https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/" target="_blank">Automated HUGO deployments wit' Netlify</a>). Alternatively, ye can use <a href="https://gohugo.io/hosting-and-deployment/hosting-on-github/" target="_blank">GitHub planks</a>.</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<footer class="footline">
|
|
</footer>
|
|
</article>
|
|
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<script src="/hugo-theme-relearn/js/clipboard.min.js?1710189845" defer></script>
|
|
<script src="/hugo-theme-relearn/js/perfect-scrollbar.min.js?1710189845" defer></script>
|
|
<script src="/hugo-theme-relearn/js/theme.js?1710189845" defer></script>
|
|
</body>
|
|
</html>
|