<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Slick Example</title><link>/posts/</link><description>Recent content in Posts on Slick Example</description><generator>Hugo 0.167.0</generator><language>en</language><managingEditor>mail@example.org (Some Author)</managingEditor><webMaster>mail@example.org (Some Author)</webMaster><copyright>Some Author — All rights reserved.</copyright><lastBuildDate>Mon, 16 Apr 2018 00:00:00 +0000</lastBuildDate><atom:link href="/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>(Hu)go Template Primer</title><link>/posts/goisforlovers/</link><pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate><author>hugo@example.net (Hugo)</author><guid isPermaLink="true">/posts/goisforlovers/</guid><description>&lt;p&gt;Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for
its template engine. It is an extremely lightweight engine that provides a very
small amount of logic. In our experience that it is just the right amount of
logic to be able to create a good static website. If you have used other
template systems from different languages or frameworks you will find a lot of
similarities in Go templates.&lt;/p&gt;
&lt;p&gt;This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate]
provide more details.&lt;/p&gt;
&lt;h2 id="introduction-to-go-templates"&gt;Introduction to Go Templates&lt;/h2&gt;
&lt;p&gt;Go templates provide an extremely simple template language. It adheres to the
belief that only the most basic of logic belongs in the template or view layer.
One consequence of this simplicity is that Go templates parse very quickly.&lt;/p&gt;
&lt;p&gt;A unique characteristic of Go templates is they are content aware. Variables and
content will be sanitized depending on the context of where they are used. More
details can be found in the [Go docs][gohtmltemplate].&lt;/p&gt;
&lt;h2 id="basic-syntax"&gt;Basic Syntax&lt;/h2&gt;
&lt;p&gt;Golang templates are HTML files with the addition of variables and
functions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Go variables and functions are accessible within {{ }}&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Accessing a predefined variable &amp;ldquo;foo&amp;rdquo;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{{ foo }}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Parameters are separated using spaces&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Calling the add function with input of 1, 2:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{{ add 1 2 }}
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Basic HTML Elements</title><link>/posts/basic-elements/</link><pubDate>Mon, 16 Apr 2018 00:00:00 +0000</pubDate><author>mail@example.org (Some Author)</author><guid isPermaLink="true">/posts/basic-elements/</guid><description>&lt;p&gt;The main purpose of this article is to make sure that all basic HTML Elements are decorated with CSS so as to not miss any possible elements when creating new themes for Hugo.&lt;/p&gt;
&lt;h2 id="headings"&gt;Headings&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s start with all possible headings. The HTML &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;—&lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; elements represent six levels of section headings. &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; is the highest section level and &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; is the lowest.&lt;/p&gt;
&lt;h1 id="heading-1"&gt;Heading 1&lt;/h1&gt;
&lt;h2 id="heading-2"&gt;Heading 2&lt;/h2&gt;
&lt;h3 id="heading-3"&gt;Heading 3&lt;/h3&gt;
&lt;h4 id="heading-4"&gt;Heading 4&lt;/h4&gt;
&lt;h5 id="heading-5"&gt;Heading 5&lt;/h5&gt;
&lt;h6 id="heading-6"&gt;Heading 6&lt;/h6&gt;
&lt;hr&gt;
&lt;h2 id="paragraph"&gt;Paragraph&lt;/h2&gt;
&lt;p&gt;According to the &lt;a href="https://www.w3.org/TR/html5/dom.html#elements"&gt;HTML5 specification&lt;/a&gt; by &lt;a href="https://www.w3.org/"&gt;W3C&lt;/a&gt;, &lt;strong&gt;HTML documents consist of a tree of elements and text&lt;/strong&gt;. Each element is denoted in the source by a &lt;a href="https://www.w3.org/TR/html5/syntax.html#syntax-start-tags"&gt;start tag&lt;/a&gt;, such as &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;, and an &lt;a href="https://www.w3.org/TR/html5/syntax.html#syntax-end-tags"&gt;end tag&lt;/a&gt;, such as &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt;. (&lt;em&gt;Certain start tags and end tags can in certain cases be omitted and are implied by other tags.&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;Elements can have attributes, which control how the elements work. For example, hyperlink are formed using the &lt;code&gt;a&lt;/code&gt; element and its &lt;code&gt;href&lt;/code&gt; attribute.&lt;/p&gt;
&lt;h2 id="list-types"&gt;List Types&lt;/h2&gt;
&lt;h3 id="ordered-list"&gt;Ordered List&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;First item&lt;/li&gt;
&lt;li&gt;Second item&lt;/li&gt;
&lt;li&gt;Third item&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="unordered-list"&gt;Unordered List&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;List item&lt;/li&gt;
&lt;li&gt;Another item&lt;/li&gt;
&lt;li&gt;And another item&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="nested-list"&gt;Nested list&lt;/h3&gt;</description></item><item><title>Creating a New Theme</title><link>/posts/creating-a-new-theme/</link><pubDate>Sun, 28 Sep 2014 00:00:00 +0000</pubDate><guid isPermaLink="true">/posts/creating-a-new-theme/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I&amp;rsquo;ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won&amp;rsquo;t cover using CSS to style your theme.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll start with creating a new site with a very basic template. Then we&amp;rsquo;ll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.&lt;/p&gt;
&lt;p&gt;In this tutorial, commands that you enter will start with the &amp;ldquo;$&amp;rdquo; prompt. The output will follow. Lines that start with &amp;ldquo;#&amp;rdquo; are comments that I&amp;rsquo;ve added to explain a point. When I show updates to a file, the &amp;ldquo;:wq&amp;rdquo; on the last line means to save the file.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## this is a comment
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ echo this is a command
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;this is a command
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## edit the file
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ vi foo.md
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;date = &amp;#34;2014-09-28&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;title = &amp;#34;creating a new theme&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bah and humbug
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;:wq
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;## show it
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ cat foo.md
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;date = &amp;#34;2014-09-28&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;title = &amp;#34;creating a new theme&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;+++
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;bah and humbug
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="some-definitions"&gt;Some Definitions&lt;/h2&gt;</description></item><item><title>Getting Started with Hugo</title><link>/posts/hugoisforlovers/</link><pubDate>Wed, 02 Apr 2014 23:42:05 +0100</pubDate><author>mail@example.org (Some Author)</author><guid isPermaLink="true">/posts/hugoisforlovers/</guid><description>&lt;h2 id="step-1-install-hugo"&gt;Step 1. Install Hugo&lt;/h2&gt;
&lt;p&gt;Go to &lt;a href="https://github.com/spf13/hugo/releases"&gt;Hugo releases&lt;/a&gt; and download the
appropriate version for your OS and architecture.&lt;/p&gt;
&lt;p&gt;Save it somewhere specific as we will be using it in the next step.&lt;/p&gt;
&lt;p&gt;More complete instructions are available at &lt;a href="https://gohugo.io/getting-started/installing/"&gt;Install Hugo&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="step-2-build-the-docs"&gt;Step 2. Build the Docs&lt;/h2&gt;
&lt;p&gt;Hugo has its own example site which happens to also be the documentation site
you are reading right now.&lt;/p&gt;
&lt;p&gt;Follow the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clone the &lt;a href="https://github.com/spf13/hugo"&gt;Hugo repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go into the repo&lt;/li&gt;
&lt;li&gt;Run hugo in server mode and build the docs&lt;/li&gt;
&lt;li&gt;Open your browser to http://localhost:1313&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Corresponding pseudo commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/spf13/hugo
cd hugo
/path/to/where/you/installed/hugo server --source=./docs
&amp;gt; 29 pages created
&amp;gt; 0 tags index created
&amp;gt; in 27 ms
&amp;gt; Web Server is available at http://localhost:1313
&amp;gt; Press ctrl+c to stop
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once you&amp;rsquo;ve gotten here, follow along the rest of this page on your local build.&lt;/p&gt;
&lt;h2 id="step-3-change-the-docs-site"&gt;Step 3. Change the docs site&lt;/h2&gt;
&lt;p&gt;Stop the Hugo process by hitting Ctrl+C.&lt;/p&gt;</description></item><item><title>Migrate to Hugo from Jekyll</title><link>/posts/migrate-from-jekyll/</link><pubDate>Mon, 10 Mar 2014 00:00:00 +0000</pubDate><author>mail@example.org (Some Author)</author><guid isPermaLink="true">/posts/migrate-from-jekyll/</guid><description>&lt;h2 id="move-static-content-to-static"&gt;Move static content to &lt;code&gt;static&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Jekyll has a rule that any directory not starting with &lt;code&gt;_&lt;/code&gt; will be copied as-is to the &lt;code&gt;_site&lt;/code&gt; output. Hugo keeps all static content under &lt;code&gt;static&lt;/code&gt;. You should therefore move it all there.
With Jekyll, something that looked like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;▾ &amp;lt;root&amp;gt;/
▾ images/
logo.png
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;should become&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;▾ &amp;lt;root&amp;gt;/
▾ static/
▾ images/
logo.png
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Additionally, you&amp;rsquo;ll want any files that should reside at the root (such as &lt;code&gt;CNAME&lt;/code&gt;) to be moved to &lt;code&gt;static&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="create-your-hugo-configuration-file"&gt;Create your Hugo configuration file&lt;/h2&gt;
&lt;p&gt;Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the &lt;a href="/overview/configuration/"&gt;Hugo configuration documentation&lt;/a&gt; for details.&lt;/p&gt;
&lt;h2 id="set-your-configuration-publish-folder-to-_site"&gt;Set your configuration publish folder to &lt;code&gt;_site&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The default is for Jekyll to publish to &lt;code&gt;_site&lt;/code&gt; and for Hugo to publish to &lt;code&gt;public&lt;/code&gt;. If, like me, you have &lt;a href="http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html"&gt;&lt;code&gt;_site&lt;/code&gt; mapped to a git submodule on the &lt;code&gt;gh-pages&lt;/code&gt; branch&lt;/a&gt;, you&amp;rsquo;ll want to do one of two alternatives:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Change your submodule to point to map &lt;code&gt;gh-pages&lt;/code&gt; to public instead of &lt;code&gt;_site&lt;/code&gt; (recommended).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; git submodule deinit _site
git rm _site
git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Or, change the Hugo configuration to use &lt;code&gt;_site&lt;/code&gt; instead of &lt;code&gt;public&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; {
..
&amp;quot;publishdir&amp;quot;: &amp;quot;_site&amp;quot;,
..
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="convert-jekyll-templates-to-hugo-templates"&gt;Convert Jekyll templates to Hugo templates&lt;/h2&gt;</description></item></channel></rss>