mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 11:46:41 +02:00
200 lines
5.8 KiB
HTML
200 lines
5.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-US">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
<meta name="HandheldFriendly" content="True">
|
|
<meta name="MobileOptimized" content="320">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
|
|
|
|
<base href="http://localhost:1313/">
|
|
<title>
|
|
|
|
|
|
Getting Started with Hugo · Hugo Themes
|
|
|
|
</title>
|
|
<link rel="canonical" href="http://localhost:1313/post/hugoisforlovers/">
|
|
|
|
<link rel="stylesheet" href="http://localhost:1313/css/reset.css">
|
|
<link rel="stylesheet" href="http://localhost:1313/css/pygments.css">
|
|
<link rel="stylesheet" href="http://localhost:1313/css/main.css">
|
|
|
|
|
|
|
|
<link rel="shortcut icon"
|
|
|
|
href="http://localhost:1313/img/myicon.ico"
|
|
|
|
>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body lang="en">
|
|
|
|
<div class="section header">
|
|
<div class="container">
|
|
<div class="content">
|
|
<nav>
|
|
<ul>
|
|
<a href="http://localhost:1313/posts"><li>posts</li></a>
|
|
<a href="http://localhost:1313/about"><li>about</li></a>
|
|
<a href="http://localhost:1313/code"><li>code</li></a>
|
|
</ul>
|
|
</nav>
|
|
<a href="http://localhost:1313/"><div class="name">map[]</div></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section icons">
|
|
<div class="container">
|
|
<div class="content">
|
|
|
|
|
|
<a href="//github.com/username" target="_blank">
|
|
<i class="icon ion-social-github"></i>
|
|
</a>
|
|
|
|
|
|
|
|
<a href="//twitter.com/username" target="_blank">
|
|
<i class="icon ion-social-twitter"></i>
|
|
</a>
|
|
|
|
|
|
|
|
<a href="//linkedin.com/in/username" target="_blank">
|
|
<i class="icon ion-social-linkedin"></i>
|
|
</a>
|
|
|
|
|
|
|
|
<a href="//facebook.com/username" target="_blank">
|
|
<i class="icon ion-social-facebook larger"></i>
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="mailto:username@hogwarts.edu">
|
|
<i class="icon ion-ios-email larger"></i>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section main">
|
|
<div class="container">
|
|
<div class="content">
|
|
|
|
|
|
<h2 id="step-1-install-hugo:c57cc0038c788519b441e0331c8bebc7">Step 1. Install Hugo</h2>
|
|
|
|
<p>Goto <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="http://localhost:1313/overview/installing/">installing hugo</a></p>
|
|
|
|
<h2 id="step-2-build-the-docs:c57cc0038c788519b441e0331c8bebc7">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 <a href="http://localhost:1313">http://localhost:1313</a></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:c57cc0038c788519b441e0331c8bebc7">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:c57cc0038c788519b441e0331c8bebc7">Step 4. Have fun</h2>
|
|
|
|
<p>The best way to learn something is to play with it.</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
|
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
|
</script>
|
|
<script type="text/javascript">
|
|
try {
|
|
var pageTracker = _gat._getTracker("\x3cGoogle-Analytics-ID\x3e");
|
|
pageTracker._trackPageview();
|
|
} catch(err) {}
|
|
</script>
|
|
|
|
|
|
|
|
<script>document.write('<script src="http://'
|
|
+ (location.host || 'localhost').split(':')[0]
|
|
+ ':1313/livereload.js?mindelay=10"></'
|
|
+ 'script>')</script></body>
|
|
</html>
|
|
|