257 lines
14 KiB
HTML
257 lines
14 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="de-DE" dir="ltr">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
<title>Getting Started with Hugo · Ivis Homepage</title>
|
||
|
||
|
||
<meta name="description" content="Ivis Homepage für Euch" />
|
||
<meta name="author" content="Ivenee Janz, Thomas Sindt" />
|
||
|
||
|
||
<link rel="canonical" href="https://thomassindt.de/ivi/posts/hugoisforlovers/">
|
||
<meta property="og:url" content="https://thomassindt.de/ivi/posts/hugoisforlovers/">
|
||
<meta property="og:site_name" content="Ivis Homepage">
|
||
<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:
|
||
Clone the Hugo repository Go into the repo Run hugo in server mode and build the docs Open your browser to http://localhost:1313 Corresponding pseudo commands:">
|
||
<meta property="og:locale" content="de_DE">
|
||
<meta property="og:type" content="article">
|
||
<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">
|
||
<meta property="article:tag" content="Go">
|
||
<meta property="article:tag" content="Golang">
|
||
<meta property="article:tag" content="Hugo">
|
||
<meta property="article:tag" content="Development">
|
||
|
||
|
||
<meta name="twitter:card" content="summary">
|
||
<meta name="twitter:title" content="Getting Started with Hugo">
|
||
<meta name="twitter: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:
|
||
Clone the Hugo repository Go into the repo Run hugo in server mode and build the docs Open your browser to http://localhost:1313 Corresponding pseudo commands:">
|
||
|
||
|
||
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@id":"https://thomassindt.de/ivi/#person","@type":"Person","homeLocation":{"@type":"Place","name":"Heidehof"},"image":"https://thomassindt.de/ivi/ivi.jpg","jobTitle":"Körperpsychotherapeutin","name":"Ivenee Janz, Thomas Sindt","sameAs":["https://github.com/","https://instagram.com/","https://linkedin.com/","https://patreon.com/","https://youtube.com/"],"url":"https://thomassindt.de/ivi/"},{"@id":"https://thomassindt.de/ivi/posts/hugoisforlovers/","@type":"BlogPosting","articleSection":["Development","golang"],"author":{"@id":"https://thomassindt.de/ivi/#person"},"dateModified":"2014-04-02T00:00:00Z","datePublished":"2014-04-02T00:00:00Z","description":"Ivis Homepage für Euch","headline":"Getting Started with Hugo","inLanguage":"de-DE","isPartOf":{"@id":"https://thomassindt.de/ivi/#website"},"mainEntityOfPage":"https://thomassindt.de/ivi/posts/hugoisforlovers/","name":"Getting Started with Hugo","publisher":{"@id":"https://thomassindt.de/ivi/#person"},"url":"https://thomassindt.de/ivi/posts/hugoisforlovers/"}]}</script>
|
||
|
||
|
||
<link href="/ivi/css/katex.min.9e0577d7101023e29eacd62ce616012cadc4d9f4f9c5ea0543ca5f32c2e00da8.css" rel="stylesheet" integrity="sha256-ngV31xAQI+KerNYs5hYBLK3E2fT5xeoFQ8pfMsLgDag=" crossorigin="anonymous">
|
||
<meta name="theme-color" content="#f7f3eb" media="(prefers-color-scheme: light)">
|
||
<meta name="theme-color" content="#20201d" media="(prefers-color-scheme: dark)">
|
||
<meta name="color-scheme" content="light dark">
|
||
|
||
|
||
|
||
|
||
|
||
<link href="/ivi/css/noesis.min.38d798e1fe17d82ca96fb225efb02b30fff54c360db27974e5dce8dc3b20c987.css" rel="stylesheet" integrity="sha256-ONeY4f4X2Cypb7Il77ArMP/1TDYNsnl05dzo3DsgyYc=" crossorigin="anonymous">
|
||
|
||
|
||
|
||
</head>
|
||
|
||
<body class="single-body">
|
||
<a class="skip-link" href="#main-content">Skip to content</a>
|
||
<nav class="nav-bar side-padding" aria-label="Primary navigation">
|
||
|
||
|
||
<p class="nav-header"><a href="/ivi/" class="nav-text">Ivenee Janz</a></p>
|
||
<ul class="nav-links">
|
||
<li><a href="/ivi/">Home</a></li>
|
||
<li><a href="/ivi/about/">über mich</a></li>
|
||
|
||
<li><a href="/ivi/categories/development/">Development</a></li>
|
||
|
||
<li><a href="/ivi/categories/features/">Features</a></li>
|
||
|
||
<li><a href="/ivi/categories/golang/">Golang</a></li>
|
||
|
||
<li><a href="/ivi/categories/web/">Web</a></li>
|
||
|
||
|
||
</ul>
|
||
<div class="hamburger-menu">
|
||
<input class="hamburger-menu-button" type="checkbox"
|
||
onclick="hamburgerMenuPressed.call(this)"
|
||
aria-label="Open navigation menu"
|
||
aria-expanded="false"
|
||
aria-controls="menu"
|
||
>
|
||
<div class="hamburger-menu-icon" aria-hidden="true">
|
||
<span></span>
|
||
<span></span>
|
||
</div>
|
||
<ul id="menu" class="hamburger-menu-overlay">
|
||
<li><a href="/ivi/" class="hamburger-menu-overlay-link">Home</a></li>
|
||
<li><a href="/ivi/about/" class="hamburger-menu-overlay-link">über mich</a></li>
|
||
|
||
<li><a href="/ivi/categories/development/" class="hamburger-menu-overlay-link">Development</a></li>
|
||
|
||
<li><a href="/ivi/categories/features/" class="hamburger-menu-overlay-link">Features</a></li>
|
||
|
||
<li><a href="/ivi/categories/golang/" class="hamburger-menu-overlay-link">Golang</a></li>
|
||
|
||
<li><a href="/ivi/categories/web/" class="hamburger-menu-overlay-link">Web</a></li>
|
||
|
||
|
||
</ul>
|
||
</div>
|
||
</nav>
|
||
|
||
<main id="main-content" class="content side-text-padding" tabindex="-1">
|
||
<article class="post">
|
||
<header class="post-header">
|
||
<div class="post-meta">
|
||
<p><time datetime="2014-04-02">Apr 2, 2014</time></p>
|
||
<p><a href="/ivi/categories/development/">Development</a>, <a href="/ivi/categories/golang/">golang</a></p>
|
||
</div>
|
||
<h1 class="post-title">Getting Started with Hugo</h1>
|
||
</header>
|
||
|
||
|
||
<h2 id="step-1-install-hugo">Step 1. Install Hugo</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</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</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</h2>
|
||
<p>The best way to learn something is to play with it.</p>
|
||
|
||
</article>
|
||
|
||
</main>
|
||
<nav class="end-nav side-padding" aria-label="Article navigation">
|
||
<a href="/ivi/posts/migrate-from-jekyll/" class="card blog-card bc-next" rel="bookmark" aria-label="Next article: Migrate to Hugo from Jekyll">
|
||
|
||
<div class="card-img-container">
|
||
<picture>
|
||
<source type="image/webp" srcset="/ivi/posts/migrate-from-jekyll/yan-ots-257617-unsplash_hu_b582aad5b021a4df.webp 400w, /ivi/posts/migrate-from-jekyll/yan-ots-257617-unsplash_hu_28ecd82341eaf2f0.webp 800w" sizes="(min-width: 760px) 176px, (min-width: 600px) 152px, calc(100vw - 2 * clamp(1.25rem, 4vw, 2.5rem))">
|
||
<source srcset="/ivi/posts/migrate-from-jekyll/yan-ots-257617-unsplash_hu_9006ac9f63a2251a.jpg 400w, /ivi/posts/migrate-from-jekyll/yan-ots-257617-unsplash_hu_2b6f95893977b889.jpg 800w" sizes="(min-width: 760px) 176px, (min-width: 600px) 152px, calc(100vw - 2 * clamp(1.25rem, 4vw, 2.5rem))">
|
||
<img src="/ivi/posts/migrate-from-jekyll/yan-ots-257617-unsplash_hu_9006ac9f63a2251a.jpg" width="400" height="300" class="card-img" alt="Colorful buildings alongside a body of water" loading="lazy" decoding="async">
|
||
</picture>
|
||
</div>
|
||
|
||
<article class="card-body">
|
||
<div class="card-subtext muted-text">
|
||
<p>Next Article</p>
|
||
<p><time datetime="2014-03-10">Mar 10, 2014</time></p>
|
||
</div>
|
||
<h2 class="card-title">Migrate to Hugo from Jekyll</h2>
|
||
<p class="card-text">Move static content to static Jekyll has a rule that any directory not starting with _ will be copied as-is to the _site output. Hugo keeps all static content under static. You should therefore move it all there. With Jekyll, something that looked like
|
||
▾ <root>/ ▾ images/ logo.png should become
|
||
▾ <root>/ ▾ static/ ▾ images/ logo.png Additionally, you’ll want any files that should reside at the root (such as CNAME) to be moved to static.
|
||
</p>
|
||
<span class="card-read-more">Continue</span>
|
||
</article>
|
||
</a>
|
||
|
||
</nav>
|
||
<footer class="site-footer side-padding">
|
||
|
||
<p class="footer-brand">Ivenee Janz</p>
|
||
<nav class="footer-links" aria-label="Footer navigation">
|
||
<a href="/ivi/">Home</a>
|
||
<a href="/ivi/about/">über mich</a>
|
||
|
||
<a href="/ivi/categories/development/">Development</a>
|
||
|
||
<a href="/ivi/categories/features/">Features</a>
|
||
|
||
<a href="/ivi/categories/golang/">Golang</a>
|
||
|
||
<a href="/ivi/categories/web/">Web</a>
|
||
|
||
</nav>
|
||
<div class="social-links footer-social-links"><a href="mailto:author@example.com" aria-label="Email" title="Email" style="--social-icon: url('/ivi/icons/email.svg'); --social-icon-dark: url('/ivi/icons/email.svg');">
|
||
<span class="social-icon" aria-hidden="true"></span>
|
||
<span class="sr-only">Email</span>
|
||
</a><a href="https://github.com/" target="_blank" rel="noopener noreferrer" aria-label="GitHub" title="GitHub" style="--social-icon: url('/ivi/icons/github.svg'); --social-icon-dark: url('/ivi/icons/github.svg');">
|
||
<span class="social-icon" aria-hidden="true"></span>
|
||
<span class="sr-only">GitHub</span>
|
||
</a><a href="https://instagram.com/" target="_blank" rel="noopener noreferrer" aria-label="Instagram" title="Instagram" style="--social-icon: url('/ivi/icons/instagram.svg'); --social-icon-dark: url('/ivi/icons/instagram.svg');">
|
||
<span class="social-icon" aria-hidden="true"></span>
|
||
<span class="sr-only">Instagram</span>
|
||
</a><a href="https://linkedin.com/" target="_blank" rel="noopener noreferrer" aria-label="LinkedIn" title="LinkedIn" style="--social-icon: url('/ivi/icons/linkedin.svg'); --social-icon-dark: url('/ivi/icons/linkedin.svg');">
|
||
<span class="social-icon" aria-hidden="true"></span>
|
||
<span class="sr-only">LinkedIn</span>
|
||
</a><a href="https://patreon.com/" target="_blank" rel="noopener noreferrer" aria-label="Patreon" title="Patreon" style="--social-icon: url('/ivi/icons/patreon.svg'); --social-icon-dark: url('/ivi/icons/patreon.svg');">
|
||
<span class="social-icon" aria-hidden="true"></span>
|
||
<span class="sr-only">Patreon</span>
|
||
</a><a href="https://youtube.com/" target="_blank" rel="noopener noreferrer" aria-label="YouTube" title="YouTube" style="--social-icon: url('/ivi/icons/youtube.svg'); --social-icon-dark: url('/ivi/icons/youtube.svg');">
|
||
<span class="social-icon" aria-hidden="true"></span>
|
||
<span class="sr-only">YouTube</span>
|
||
</a></div>
|
||
|
||
</footer>
|
||
|
||
|
||
|
||
<script defer src="/ivi/js/katex.min.e9822c57638322efdd9ede0164169216682eb5f5c90fb0d04d1d6014bab3a8ea.js" integrity="sha256-6YIsV2ODIu/dnt4BZBaSFmgutfXJD7DQTR1gFLqzqOo=" crossorigin="anonymous"></script>
|
||
|
||
|
||
|
||
<script defer src="/ivi/js/contrib/auto-render.min.e5372d199bcdae8b4de71d0f7ceba72a4ba12774a27c60a6f1f77d03b3228ee4.js" integrity="sha256-5TctGZvNrotN5x0PfOunKkuhJ3SifGCm8fd9A7MijuQ=" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
||
|
||
|
||
<script defer src="/ivi/js/core.min.f2db9fdefe6b9087ea561d6ef6b78b1e4e58c03586d262b1b17de4753f301471.js" integrity="sha256-8tuf3v5rkIfqVh1u9reLHk5YwDWG0mKxsX3kdT8wFHE=" crossorigin="anonymous"></script>
|
||
|
||
</body>
|
||
</html>
|