arcusiridis/isableFastRender/post/hugoisforlovers/index.html
2019-07-25 12:46:57 +05:30

432 lines
20 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Getting Started with Hugo</title><meta name="description" itemprop="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:" id="desc"><meta name="generator" content="Hugo 0.55.6" /><meta name="keywords" itemprop="keywords" content="go,golang,hugo,development" id="keywords"><link rel="canonical" href="http://localhost:1313/post/hugoisforlovers/">
<link rel="dns-prefetch" href="https://use.fontawesome.com/" />
<link rel="preconnect" href="https://use.fontawesome.com/" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/foundation.min.js"></script>
<script type="text/javascript" src="/js/lunr.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/foundation.css">
<link rel="stylesheet" href="http://localhost:1313/css/dark.min.a2e0a27b84f040c06c153f1811086f6c2703f82371f3533c5ebb5617ad55f808.css" integrity="sha256-ouCie4TwQMBsFT8YEQhvbCcD+CNx81M8XrtWF61V+Ag="><link rel="stylesheet" href="/styles.css" >
<link rel="stylesheet" href="http://localhost:1313/css/reset.min.58d4832e34c59f168248179e8f6a0495f3f1ed2cb432fa09597f17f8d2916f62.css" integrity="sha256-WNSDLjTFnxaCSBeej2oElfPx7Sy0MvoJWX8X+NKRb2I="><link rel="stylesheet" href="http://localhost:1313/css/fonts.min.4ffd55649e797a49b8a6d3f70cdd1c97f25a942848a291346dd055c59bd4f010.css" integrity="sha256-T/1VZJ55ekm4ptP3DN0cl/JalChIopE0bdBVxZvU8BA="><link rel="stylesheet" href="http://localhost:1313/css/classes.min.717d03fc567fccb77be4ab35d1ac133e64e2cc160d72af4bf64a7ec26281238d.css" integrity="sha256-cX0D/FZ/zLd75Ks10awTPmTizBYNcq9L9kp+wmKBI40="><link rel="stylesheet" href="http://localhost:1313/css/pagination.min.1c019354f2098f0d34a80aa4c70a37ff5f5eb84a744f30e8af601fd877b142be.css" integrity="sha256-HAGTVPIJjw00qAqkxwo3/19euEp0TzDor2Af2HexQr4="><link rel="stylesheet" href="http://localhost:1313/css/page.min.16c3a4532fcc8cffaa9edb031826dbcfb1008775b0e8b08ada4c7d60aaaa2714.css" integrity="sha256-FsOkUy/MjP+qntsDGCbbz7EAh3Ww6LCK2kx9YKqqJxQ="><link rel="stylesheet" href="http://localhost:1313/css/widgets.min.f86a3fac609b70f8c8746e1a9bf0ee6d7030716a21281e29e0010bd19b4f22d0.css" integrity="sha256-+Go/rGCbcPjIdG4am/DubXAwcWohKB4p4AEL0ZtPItA=">
<link rel="stylesheet" href="http://localhost:1313/css/single.min.f8c42b40c9487fb9a57081e37af57fd067d349a6442c35c8b511a9d52a3bf502.css" integrity="sha256-+MQrQMlIf7mlcIHjevV/0GfTSaZELDXItRGp1So79QI=">
<link rel="preload" media="print" type="text/css" href="http://localhost:1313/css/print.min.2e0961e511885e38a09cc9a9ff3de5ce7d7d2186bb9ed98a61f176688d4ef61a.css" integrity="sha256-Lglh5RGIXjignMmp/z3lzn19IYa7ntmKYfF2aI1O9ho=" as="style"><link rel="dns-prefetch" href="https://cdnjs.cloudflare.com/" />
<link rel="preconnect" href="https://cdnjs.cloudflare.com/" />
<link rel="preload" href="http://localhost:1313/index.json" as="fetch" />
<link rel="stylesheet" href="http://localhost:1313/css/widgets/search.min.5561d0b8fcf8e2a7d3d0fcbe830ba8a5743255be7f849e564d3849a7cc1ba725.css" integrity="sha256-VWHQuPz44qfT0Py+gwuopXQyVb5/hJ5WTThJp8wbpyU=">
<link rel="stylesheet" href="http://localhost:1313/css/widgets/taglist.min.59f177c0ac5a5ae6b88ede8a87029d4012b1bdf53e37d2ccf5873832626a77f3.css" integrity="sha256-WfF3wKxaWua4jt6KhwKdQBKxvfU+N9LM9Yc4MmJqd/M=">
<meta name="theme-color" content="#2073c9">
<meta name="apple-mobile-web-app-title" content="Example Site">
<meta name="application-name" content="Example Site">
</head>
<body itemscope itemtype="http://schema.org/WebPage">
<div class="off-canvas-wrapper">
<button id="off-canvas-toggle" type="button" class="button hide-for-medium" aria-label="Open Menu" data-toggle="main-nav-off-canvas">
<span class="fas fa-bars"></span>
</button>
<div class="off-canvas position-left" id="main-nav-off-canvas" data-off-canvas>
<nav>
<ul class="vertical menu drilldown" data-drilldown><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/post/" >
POSTS
</a></li><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/about/" >
ABOUT HUGO
</a></li><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/" >
TUTORIALS
</a><ul class="vertical menu">
<li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/post/creating-a-new-theme/" >
CREATING A NEW THEME
</a></li><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/post/migrate-from-jekyll/" >
MIGRATING FROM JEKYLL
</a></li>
</ul></li></ul>
</nav>
</div>
<div id="site-container" class="grid-container full off-canvas-content">
<div class="grid-x full grid-container data-off-canvas-content">
<div id="site-header" class="cell">
<a href="http://localhost:1313/">
<header class="small-text-center medium-text-left grid-x">
<div id="site-title-container" class="cell shrink grid-y">
<div id="site-title" class="cell shrink" itemprop="name">Example Site</div>
<div class="cell shrink" id="site-tagline">Using the Midnight theme</div>
</div>
</header>
</a>
<nav id="main-nav" class="small-hide">
<ul class="dropdown menu" data-dropdown-menu><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/post/" >
POSTS
</a></li><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/about/" >
ABOUT HUGO
</a></li><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/" >
TUTORIALS
</a><ul class="vertical menu">
<li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/post/creating-a-new-theme/" >
CREATING A NEW THEME
</a></li><li itemscope itemtype="http://schema.org/SiteNavigationElement">
<a class="main-nav button" tabindex="0" href="http://localhost:1313/post/migrate-from-jekyll/" >
MIGRATING FROM JEKYLL
</a></li>
</ul></li></ul>
</nav>
</div>
<div id="main-container" class="cell grid-x grid-padding-x grid-container" role="main" itemprop="mainContentOfPage">
<div class="callout cell text-center">
Interested in using Midnight? Check out the <a href="https://bluestnight.com/guides/midnight/getting-started/">getting started</a>
guide and the <a href="https://bluestnight.com/docs/midnight/users/">user documentation</a> for more information.
</div>
<main class="cell medium-8" >
<article id="post-article" itemscope itemtype="http://schema.org/Article" itemref="keywords desc">
<header id="page-header">
<h1 itemprop="headline">Getting Started with Hugo</h1><p id="post-metadata" class="grid-x grid-padding-x"><span class="cell shrink">
<span class="far fa-clock fa-sm fa-fw" aria-hidden></span>
<strong>Published:</strong>
<time datetime="2014-04-02" content="2014-04-02" itemprop="datePublished">April 02, 2014</time>
</span><span class="cell shrink">
<span class="fas fa-folder fa-sm fa-fw" aria-hidden></span>
<span class="sr-text">Categories: </span>
<a href="http://localhost:1313/categories/development" rel="category">Development</a>,
<a href="http://localhost:1313/categories/golang" rel="category">Golang</a>
</span><span class="cell shrink">
<span class="fas fa-book fa-sm fa-fw" aria-hidden></span>
<strong>Estimated Reading Time:</strong>
~<span itemprop="timeRequired">2 minutes</span>
</span><span class="cell shrink">
<span class="fas fa-tags fa-sm fa-fw" aria-hidden></span>
<a itemprop="relatedUrl" itemscope itemtype="http://schema.org/URL" href="http://localhost:1313/tags/go" rel="tag" itemprop="url">go</a>
<a itemprop="relatedUrl" itemscope itemtype="http://schema.org/URL" href="http://localhost:1313/tags/golang" rel="tag" itemprop="url">golang</a>
<a itemprop="relatedUrl" itemscope itemtype="http://schema.org/URL" href="http://localhost:1313/tags/hugo" rel="tag" itemprop="url">hugo</a>
<a itemprop="relatedUrl" itemscope itemtype="http://schema.org/URL" href="http://localhost:1313/tags/development" rel="tag" itemprop="url">development</a>
</span></p>
</header>
<div id="post-content"><span itemprop="articleBody">
<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 <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
&gt; 29 pages created
&gt; 0 tags index created
&gt; in 27 ms
&gt; Web Server is available at http://localhost:1313
&gt; Press ctrl+c to stop
</code></pre>
<p>Once you&rsquo;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
&gt; 29 pages created
&gt; 0 tags index created
&gt; in 27 ms
&gt; Web Server is available at http://localhost:1313
&gt; Watching for changes in /Users/spf13/Code/hugo/docs/content
&gt; 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>&gt; Change detected, rebuilding site
&gt; 29 pages created
&gt; 0 tags index created
&gt; 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&rsquo;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>
</span>
</div></article>
<nav id="post-nav" aria-label="Pagination">
<ul class="pagination grid-x grid-x-padding full">
<li class="pagination-next cell small-order-1 medium-5 medium-order-2 medium-offset-7">
<a class="button" href="http://localhost:1313/post/goisforlovers/" rel="next">
<span class="sr-text">Next:</span>(Hu)go Template Primer
</a>
</li>
</ul>
</nav>
</main>
<aside class="cell small-12 small-order-2 medium-4" itemscope itemtype="http://schema.org/WPSideBar"><div class="widget" id="search-container">
<header>
<span class="widget-header"><span class="fas fa-search fa-xs" aria-hidden></span> Search</span>
</header>
<input type="search" name="search" id="searchbox" placeholder="Search..." autocomplete="off"/>
<div id="search-results" class="grid-y hide"></div>
</div>
<div class="widget">
<header>
<span class="widget-header"><span class="fas fa-pencil-alt fa-xs" aria-hidden></span> <a href="http://localhost:1313/post/">Recent Posts</a></span>
</header>
<a class="widget-header-small button" href="http://localhost:1313/index.xml"><span class="fas fa-rss fa-xs" aria-hidden></span> Subscribe to the Site</a>
<a class="widget-header-small button" href="http://localhost:1313/post/index.xml"><span class="fas fa-rss fa-xs" aria-hidden></span> Subscribe to Posts</a><ul><li><a href="http://localhost:1313/post/creating-a-new-theme/">Creating a New Theme</a></li><li><a href="http://localhost:1313/post/migrate-from-jekyll/">Migrate to Hugo from Jekyll</a></li><li><a href="http://localhost:1313/post/goisforlovers/">(Hu)go Template Primer</a></li><li><a href="http://localhost:1313/post/hugoisforlovers/">Getting Started with Hugo</a></li></ul>
</div>
<div class="widget">
<header>
<span class="widget-header">
<span class="fas fa-folder fa-xs" aria-hidden></span>
<a href="http://localhost:1313/categories/">Categories</a>
</span>
</header>
<ul><li>
<a href="http://localhost:1313/categories/development/">
Development
</a>
</li>
<li>
<a href="http://localhost:1313/categories/golang/">
Golang
</a>
</li>
</ul>
</div>
<div class="widget">
<header>
<span class="widget-header"><span class="fas fa-tags fa-xs" aria-hidden></span> <a href="http://localhost:1313/tags/">Tags</a></span>
</header>
<div class="grid-x grid-padding-x" id="sidebar-tags"><a class="cell shrink" href="http://localhost:1313/tags/development/" title="development">
development
</a><a class="cell shrink" href="http://localhost:1313/tags/go/" title="go">
go
</a><a class="cell shrink" href="http://localhost:1313/tags/golang/" title="golang">
golang
</a><a class="cell shrink" href="http://localhost:1313/tags/hugo/" title="hugo">
hugo
</a><a class="cell shrink" href="http://localhost:1313/tags/templates/" title="templates">
templates
</a><a class="cell shrink" href="http://localhost:1313/tags/themes/" title="themes">
themes
</a></div>
</div>
</aside>
</div>
<footer class="cell grid-x full align-middle">
<div class="cell medium-4 small-text-center medium-text-left medium-left small-order-1 grid-x">
<div class="cell">
<small>
&copy; 2019
<span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<span itemprop="name">
Example Site.
</span>
</span>
</small>
</div>
<div class="cell">
<small>
Built with <a href="https://gohugo.io">Hugo</a> and <a href="https://bluestnight.com/products/midnight/">Midnight</a>.
</small>
</div>
</div>
<div class="cell medium-4 small-text-center medium-text-center small-order-2 grid-x">
<div class="cell small-full small-text-center grid-x">
</div>
</div>
<div id="social-icons" class="grid-x cell medium-4 small-text-center small-order-3 medium-text-right">
<a href="https://gitlab.com/BluestNight/Midnight" class="cell shrink" rel="me nofollow" title="GitLab" aria-title="Fork me on GitLab!">
<span class="fa-stack fa-xs">
<span class="fas fa-square fa-stack-2x"></span>
<span class="fab fa-gitlab fa-stack-1x fa-inverse"></span>
</span>
</a>
</div>
</footer>
</div>
</div>
<script type="text/javascript" src="http://localhost:1313/js/iubenda.min.e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.js" integrity="sha256-47DEQpj8HBSa&#43;/TImW&#43;5JCeuQeRkm5NMpJWZG3hSuFU="></script>
<script type="text/javascript" src="http://localhost:1313/js/widgets/search.min.572f332ce215f4f16d9adc8643ebc2c193fcb351d506d92d1769efaf95230773.js" integrity="sha256-Vy8zLOIV9PFtmtyGQ&#43;vCwZP8s1HVBtktF2nvr5UjB3M=" defer></script><script type="text/javascript" src="http://localhost:1313/js/index.min.e22883a04526785bb35feb658da4974c160999432286921d7df30235cc21e4f3.js" integrity="sha256-4iiDoEUmeFuzX&#43;tljaSXTBYJmUMihpIdffMCNcwh5PM=" defer></script>
</div>
<script>
$(document).foundation();
</script>
<script data-no-instant>document.write('<script src="/livereload.js?port=1313&mindelay=10"></' + 'script>')</script></body>
</html>