forked from Bubs/fedi-admin-guide
340 lines
9.3 KiB
HTML
340 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Step 1. Install Hugo # Go to Hugo releases and download the appropriate version for your OS and architecture.
|
|
Save it somewhere specific as we will be using it in the next step.
|
|
More complete instructions are available at Install Hugo
|
|
Step 2. Build the Docs # Hugo has its own example site which happens to also be the documentation site you are reading right now.
|
|
Follow the following steps:">
|
|
<meta name="theme-color" content="#FFFFFF">
|
|
<meta name="color-scheme" content="light dark"><meta property="og:title" content="Getting Started with Hugo" />
|
|
<meta property="og:description" content="Step 1. Install Hugo # Go to Hugo releases and download the appropriate version for your OS and architecture.
|
|
Save it somewhere specific as we will be using it in the next step.
|
|
More complete instructions are available at Install Hugo
|
|
Step 2. Build the Docs # Hugo has its own example site which happens to also be the documentation site you are reading right now.
|
|
Follow the following steps:" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://fediguide.froth.zone/posts/hugoisforlovers/" /><meta property="article:section" content="posts" />
|
|
<meta property="article:published_time" content="2014-04-02T00:00:00+00:00" />
|
|
<meta property="article:modified_time" content="2014-04-02T00:00:00+00:00" />
|
|
|
|
<title>Getting Started with Hugo | The bubs guide to fediverse</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<link rel="icon" href="/favicon.png" type="image/x-icon">
|
|
<link rel="stylesheet" href="/book.min.97cfda4f5e3c9fa49a2bf8d401f4ddc0eec576c99cdcf6afbec19173200c37db.css" integrity="sha256-l8/aT148n6SaK/jUAfTdwO7Fdsmc3PavvsGRcyAMN9s=" crossorigin="anonymous">
|
|
<script defer src="/flexsearch.min.js"></script>
|
|
<script defer src="/en.search.min.52a7d189b726bb83ba7cf33bd455781e0d49d78440b0b57748c658e280dac15b.js" integrity="sha256-UqfRibcmu4O6fPM71FV4Hg1J14RAsLV3SMZY4oDawVs=" crossorigin="anonymous"></script>
|
|
|
|
<script defer src="/sw.min.6f6f90fcb8eb1c49ec389838e6b801d0de19430b8e516902f8d75c3c8bd98739.js" integrity="sha256-b2+Q/LjrHEnsOJg45rgB0N4ZQwuOUWkC+NdcPIvZhzk=" crossorigin="anonymous"></script>
|
|
<!--
|
|
Made with Book Theme
|
|
https://github.com/alex-shpak/hugo-book
|
|
-->
|
|
|
|
</head>
|
|
<body dir="ltr">
|
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
|
<main class="container flex">
|
|
<aside class="book-menu">
|
|
<div class="book-menu-content">
|
|
|
|
<nav>
|
|
<h2 class="book-brand">
|
|
<a class="flex align-center" href="/"><span>The bubs guide to fediverse</span>
|
|
</a>
|
|
</h2>
|
|
|
|
|
|
<div class="book-search">
|
|
<input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
|
|
<div class="book-search-spinner hidden"></div>
|
|
<ul id="book-search-results"></ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="/posts/" >
|
|
Blog
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://git.froth.zone/waifu/fedi-admin-guide" target="_blank" rel="noopener">
|
|
Repository
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://test.something/" target="_blank" rel="noopener">
|
|
Other places
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="book-page">
|
|
<header class="book-header">
|
|
|
|
<div class="flex align-center justify-between">
|
|
<label for="menu-control">
|
|
<img src="/svg/menu.svg" class="book-icon" alt="Menu" />
|
|
</label>
|
|
|
|
<strong>Getting Started with Hugo</strong>
|
|
|
|
<label for="toc-control">
|
|
|
|
<img src="/svg/toc.svg" class="book-icon" alt="Table of Contents" />
|
|
|
|
</label>
|
|
</div>
|
|
|
|
|
|
|
|
<aside class="hidden clearfix">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li>
|
|
<ul>
|
|
<li><a href="#step-1-install-hugo">Step 1. Install Hugo</a></li>
|
|
<li><a href="#step-2-build-the-docs">Step 2. Build the Docs</a></li>
|
|
<li><a href="#step-3-change-the-docs-site">Step 3. Change the docs site</a></li>
|
|
<li><a href="#step-4-have-fun">Step 4. Have fun</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<article class="markdown">
|
|
<h1>
|
|
<a href="/posts/hugoisforlovers/">Getting Started with Hugo</a>
|
|
</h1>
|
|
|
|
<h5>April 2, 2014</h5>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<a href="/categories/Development/">Development</a>,
|
|
<a href="/categories/golang/">golang</a>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<a href="/tags/go/">go</a>,
|
|
<a href="/tags/golang/">golang</a>,
|
|
<a href="/tags/hugo/">hugo</a>,
|
|
<a href="/tags/development/">development</a>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2 id="step-1-install-hugo">
|
|
Step 1. Install Hugo
|
|
<a class="anchor" href="#step-1-install-hugo">#</a>
|
|
</h2>
|
|
<p>Go to
|
|
<a href="https://github.com/spf13/hugo/releases">Hugo releases</a> and download the
|
|
appropriate version for your OS and architecture.</p>
|
|
<p>Save it somewhere specific as we will be using it in the next step.</p>
|
|
<p>More complete instructions are available at
|
|
<a href="https://gohugo.io/getting-started/installing/">Install Hugo</a></p>
|
|
<h2 id="step-2-build-the-docs">
|
|
Step 2. Build the Docs
|
|
<a class="anchor" href="#step-2-build-the-docs">#</a>
|
|
</h2>
|
|
<p>Hugo has its own example site which happens to also be the documentation site
|
|
you are reading right now.</p>
|
|
<p>Follow the following steps:</p>
|
|
<ol>
|
|
<li>Clone the
|
|
<a href="http://github.com/spf13/hugo">Hugo repository</a></li>
|
|
<li>Go into the repo</li>
|
|
<li>Run hugo in server mode and build the docs</li>
|
|
<li>Open your browser to http://localhost:1313</li>
|
|
</ol>
|
|
<p>Corresponding pseudo commands:</p>
|
|
<pre><code>git clone https://github.com/spf13/hugo
|
|
cd hugo
|
|
/path/to/where/you/installed/hugo server --source=./docs
|
|
> 29 pages created
|
|
> 0 tags index created
|
|
> in 27 ms
|
|
> Web Server is available at http://localhost:1313
|
|
> Press ctrl+c to stop
|
|
</code></pre>
|
|
<p>Once you’ve gotten here, follow along the rest of this page on your local build.</p>
|
|
<h2 id="step-3-change-the-docs-site">
|
|
Step 3. Change the docs site
|
|
<a class="anchor" href="#step-3-change-the-docs-site">#</a>
|
|
</h2>
|
|
<p>Stop the Hugo process by hitting Ctrl+C.</p>
|
|
<p>Now we are going to run hugo again, but this time with hugo in watch mode.</p>
|
|
<pre><code>/path/to/hugo/from/step/1/hugo server --source=./docs --watch
|
|
> 29 pages created
|
|
> 0 tags index created
|
|
> in 27 ms
|
|
> Web Server is available at http://localhost:1313
|
|
> Watching for changes in /Users/spf13/Code/hugo/docs/content
|
|
> Press ctrl+c to stop
|
|
</code></pre>
|
|
<p>Open your
|
|
<a href="http://vim.spf13.com">favorite editor</a> and change one of the source
|
|
content pages. How about changing this very file to <em>fix the typo</em>. How about changing this very file to <em>fix the typo</em>.</p>
|
|
<p>Content files are found in <code>docs/content/</code>. Unless otherwise specified, files
|
|
are located at the same relative location as the url, in our case
|
|
<code>docs/content/overview/quickstart.md</code>.</p>
|
|
<p>Change and save this file.. Notice what happened in your terminal.</p>
|
|
<pre><code>> Change detected, rebuilding site
|
|
|
|
> 29 pages created
|
|
> 0 tags index created
|
|
> in 26 ms
|
|
</code></pre>
|
|
<p>Refresh the browser and observe that the typo is now fixed.</p>
|
|
<p>Notice how quick that was. Try to refresh the site before it’s finished building. I double dare you.
|
|
Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.</p>
|
|
<h2 id="step-4-have-fun">
|
|
Step 4. Have fun
|
|
<a class="anchor" href="#step-4-have-fun">#</a>
|
|
</h2>
|
|
<p>The best way to learn something is to play with it.</p>
|
|
</article>
|
|
|
|
|
|
|
|
<footer class="book-footer">
|
|
|
|
<div class="flex flex-wrap justify-between">
|
|
|
|
|
|
|
|
|
|
<div>
|
|
<a class="flex align-center" href="https://github.com/alex-shpak/hugo-book/edit/main/exampleSite/content/posts/hugoisforlovers.md" target="_blank" rel="noopener">
|
|
<img src="/svg/edit.svg" class="book-icon" alt="Edit" />
|
|
<span>Edit this page</span>
|
|
</a>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>(function(){function e(n){const e=window.getSelection(),t=document.createRange();t.selectNodeContents(n),e.removeAllRanges(),e.addRange(t)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script>
|
|
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
|
</div>
|
|
|
|
|
|
<aside class="book-toc">
|
|
<div class="book-toc-content">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li>
|
|
<ul>
|
|
<li><a href="#step-1-install-hugo">Step 1. Install Hugo</a></li>
|
|
<li><a href="#step-2-build-the-docs">Step 2. Build the Docs</a></li>
|
|
<li><a href="#step-3-change-the-docs-site">Step 3. Change the docs site</a></li>
|
|
<li><a href="#step-4-have-fun">Step 4. Have fun</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|