Aggiunta struttura di base di un blog statico fatto con Hugo

main-old
Antonio De Lucreziis 4 years ago
parent b19400f3ee
commit 6f0b1467e8

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

@ -0,0 +1,65 @@
baseurl = "https://phc.dm.unipi.it/"
title = "Blog del PHC"
theme = "ghostwriter"
languageCode = "en-us"
copyright = "PHC"
pygmentsUseClasses = true
pygmentsCodefences = true
[markup]
[markup.highlight]
codeFences = true
guessSyntax = false
hl_Lines = ""
lineNoStart = 1.0
lineNos = false
lineNumbersInTable = true
noClasses = true
tabWidth = 2.0
[author]
name = "My Name"
profile = "/page/contact"
[taxonomies]
tag = "tags"
[params]
mainSections = [ "post" ]
intro = true
headline = "Blog del PHC"
description = "Qui postiamo notizie importanti, progetti e qualche guida."
github = "https://github.com/PHC-DM"
email = "macchinisti@poisson.phc.dm.unipi.it"
opengraph = true
dateFormat = "Mon, Jan 2, 2006"
readingTime = true
readingTimeText = "Tempo di letturna ~"
fathomUrl = ""
fathomSiteId = ""
[permalinks]
post = "/:year/:month/:day/:filename/"
[menu]
[[menu.main]]
name = "News"
url = "/"
weight = 1.0
[[menu.main]]
name = "Progetti"
url = "/project/"
weight = 2.0
[[menu.main]]
name = "Contattaci"
url = "/page/contact/"
weight = 3.0
[[menu.main]]
name = "About"
url = "/page/about/"
weight = 4.0

@ -0,0 +1,13 @@
+++
title = "About"
date = 2015-04-03T02:13:50Z
description = "Cos'è il PHC?"
+++
## About
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec dolor in magna lobortis egestas. Suspendisse eu erat tempor, tristique neque eu, convallis nulla. Curabitur vel bibendum lacus, at semper mauris. Suspendisse aliquet commodo ex, sed sagittis metus aliquam id. Maecenas feugiat rutrum lorem vel imperdiet. Nullam ornare lectus ut enim finibus, et porttitor mi tincidunt. Aenean lacinia, leo quis vehicula eleifend, quam libero sagittis erat, at euismod augue mauris et sapien. Sed id vehicula lectus, sit amet auctor ipsum. Nunc sed massa vel ex condimentum aliquam in a enim. Cras enim sem, tristique eu enim ac, congue commodo mi. Integer quis orci at dolor blandit eleifend.
## School
Sed quis pulvinar nisi, sed dapibus lacus. Mauris tempus ex ut ipsum facilisis interdum. Integer feugiat urna sed feugiat tempor. Quisque dictum vestibulum feugiat. Nunc nec est volutpat lorem imperdiet egestas sit amet ut orci. Aliquam venenatis neque ipsum, a placerat lectus cursus at. Donec pellentesque tellus hendrerit faucibus posuere. Etiam gravida consequat lectus, volutpat consectetur velit convallis nec. Praesent sagittis luctus dignissim.

@ -0,0 +1,11 @@
+++
title = "Contatti"
date = 2015-04-03T02:13:50Z
description = "Come contattarci."
+++
## Contatti
Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.
[macchinisti@poisson.phc.dm.unipi.it](mailto:macchinisti@poisson.phc.dm.unipi.it)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,334 @@
+++
title = "(Hu)go Template Primer"
description = "(Hu)go Template Primer description."
tags = [
"go",
"golang",
"templates",
"themes",
"development",
]
date = 2014-04-02T02:13:50Z
author = "Michael Henderson"
+++
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.
This document is a brief primer on using go templates. The [go docs][gohtmltemplate]
provide more details.
## Introduction to Go Templates
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.
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].
## Basic Syntax
Go lang templates are html files with the addition of variables and
functions.
**Go variables and functions are accessible within {{ }}**
Accessing a predefined variable "foo":
{{ foo }}
**Parameters are separated using spaces**
Calling the add function with input of 1, 2:
{{ add 1 2 }}
**Methods and fields are accessed via dot notation**
Accessing the Page Parameter "bar"
{{ .Params.bar }}
**Parentheses can be used to group items together**
{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
## Variables
Each go template has a struct (object) made available to it. In hugo each
template is passed either a page or a node struct depending on which type of
page you are rendering. More details are available on the
[variables](/layout/variables) page.
A variable is accessed by referencing the variable name.
<title>{{ .Title }}</title>
Variables can also be defined and referenced.
{{ $address := "123 Main St."}}
{{ $address }}
## Functions
Go template ship with a few functions which provide basic functionality. The go
template system also provides a mechanism for applications to extend the
available functions with their own. [Hugo template
functions](/layout/functions) provide some additional functionality we believe
are useful for building websites. Functions are called by using their name
followed by the required parameters separated by spaces. Template
functions cannot be added without recompiling hugo.
**Example:**
{{ add 1 2 }}
## Includes
When including another template you will pass to it the data it will be
able to access. To pass along the current context please remember to
include a trailing dot. The templates location will always be starting at
the /layout/ directory within Hugo.
**Example:**
{{ template "chrome/header.html" . }}
## Logic
Go templates provide the most basic iteration and conditional logic.
### Iteration
Just like in go, the go templates make heavy use of range to iterate over
a map, array or slice. The following are different examples of how to use
range.
**Example 1: Using Context**
{{ range array }}
{{ . }}
{{ end }}
**Example 2: Declaring value variable name**
{{range $element := array}}
{{ $element }}
{{ end }}
**Example 2: Declaring key and value variable name**
{{range $index, $element := array}}
{{ $index }}
{{ $element }}
{{ end }}
### Conditionals
If, else, with, or, & and provide the framework for handling conditional
logic in Go Templates. Like range, each statement is closed with `end`.
Go Templates treat the following values as false:
* false
* 0
* any array, slice, map, or string of length zero
**Example 1: If**
{{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
**Example 2: If -> Else**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{else}}
{{ index .Params "caption" }}
{{ end }}
**Example 3: And & Or**
{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
**Example 4: With**
An alternative way of writing "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent.
The first example above could be simplified as:
{{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
**Example 5: If -> Else If**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{ else if isset .Params "caption" }}
{{ index .Params "caption" }}
{{ end }}
## Pipes
One of the most powerful components of go templates is the ability to
stack actions one after another. This is done by using pipes. Borrowed
from unix pipes, the concept is simple, each pipeline's output becomes the
input of the following pipe.
Because of the very simple syntax of go templates, the pipe is essential
to being able to chain together function calls. One limitation of the
pipes is that they only can work with a single value and that value
becomes the last parameter of the next pipeline.
A few simple examples should help convey how to use the pipe.
**Example 1 :**
{{ if eq 1 1 }} Same {{ end }}
is the same as
{{ eq 1 1 | if }} Same {{ end }}
It does look odd to place the if at the end, but it does provide a good
illustration of how to use the pipes.
**Example 2 :**
{{ index .Params "disqus_url" | html }}
Access the page parameter called "disqus_url" and escape the HTML.
**Example 3 :**
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
Stuff Here
{{ end }}
Could be rewritten as
{{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}
Stuff Here
{{ end }}
## Context (aka. the dot)
The most easily overlooked concept to understand about go templates is that {{ . }}
always refers to the current context. In the top level of your template this
will be the data set made available to it. Inside of a iteration it will have
the value of the current item. When inside of a loop the context has changed. .
will no longer refer to the data available to the entire page. If you need to
access this from within the loop you will likely want to set it to a variable
instead of depending on the context.
**Example:**
{{ $title := .Site.Title }}
{{ range .Params.tags }}
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
{{ end }}
Notice how once we have entered the loop the value of {{ . }} has changed. We
have defined a variable outside of the loop so we have access to it from within
the loop.
# Hugo Parameters
Hugo provides the option of passing values to the template language
through the site configuration (for sitewide values), or through the meta
data of each specific piece of content. You can define any values of any
type (supported by your front matter/config format) and use them however
you want to inside of your templates.
## Using Content (page) Parameters
In each piece of content you can provide variables to be used by the
templates. This happens in the [front matter](/content/front-matter).
An example of this is used in this documentation site. Most of the pages
benefit from having the table of contents provided. Sometimes the TOC just
doesn't make a lot of sense. We've defined a variable in our front matter
of some pages to turn off the TOC from being displayed.
Here is the example front matter:
```
---
title: "Permalinks"
date: "2013-11-18"
aliases:
- "/doc/permalinks/"
groups: ["extras"]
groups_weight: 30
notoc: true
---
```
Here is the corresponding code inside of the template:
{{ if not .Params.notoc }}
<div id="toc" class="well col-md-4 col-sm-6">
{{ .TableOfContents }}
</div>
{{ end }}
## Using Site (config) Parameters
In your top-level configuration file (eg, `config.yaml`) you can define site
parameters, which are values which will be available to you in chrome.
For instance, you might declare:
```yaml
params:
CopyrightHTML: "Copyright &#xA9; 2013 John Doe. All Rights Reserved."
TwitterUser: "spf13"
SidebarRecentLimit: 5
```
Within a footer layout, you might then declare a `<footer>` which is only
provided if the `CopyrightHTML` parameter is provided, and if it is given,
you would declare it to be HTML-safe, so that the HTML entity is not escaped
again. This would let you easily update just your top-level config file each
January 1st, instead of hunting through your templates.
```
{{if .Site.Params.CopyrightHTML}}<footer>
<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
</footer>{{end}}
```
An alternative way of writing the "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent:
```
{{with .Site.Params.TwitterUser}}<span class="twitter">
<a href="https://twitter.com/{{.}}" rel="author">
<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
alt="Twitter"></a>
</span>{{end}}
```
Finally, if you want to pull "magic constants" out of your layouts, you can do
so, such as in this example:
```
<nav class="recent">
<h1>Recent Posts</h1>
<ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{end}}</ul>
</nav>
```
[go]: <https://golang.org/>
[gohtmltemplate]: <https://golang.org/pkg/html/template/>

@ -0,0 +1,88 @@
+++
title = "Getting Started with Hugo"
description = ""
tags = [
"go",
"golang",
"hugo",
"development",
]
date = "2014-04-02"
categories = [
"Development",
"golang",
]
+++
## Step 1. Install Hugo
Goto [hugo releases](https://github.com/spf13/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 [installing hugo](/overview/installing/)
## 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:
1. Clone the [hugo repository](https://github.com/spf13/hugo)
2. Go into the repo
3. Run hugo in server mode and build the docs
4. Open your browser to http://localhost:1313
Corresponding pseudo commands:
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
Once you've gotten here, follow along the rest of this page on your local build.
## Step 3. Change the docs site
Stop the Hugo process by hitting ctrl+c.
Now we are going to run hugo again, but this time with hugo in watch mode.
/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
Open your [favorite editor](http://vim.spf13.com) and change one of the source
content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*.
Content files are found in `docs/content/`. Unless otherwise specified, files
are located at the same relative location as the url, in our case
`docs/content/overview/quickstart.md`.
Change and save this file.. Notice what happened in your terminal.
> Change detected, rebuilding site
> 29 pages created
> 0 tags index created
> in 26 ms
Refresh the browser and observe that the typo is now fixed.
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.
## Step 4. Have fun
The best way to learn something is to play with it.

@ -0,0 +1,164 @@
+++
title = "Migrating from Jekyll"
description = "Migrating from Jekyll description."
date = 2014-04-02T02:13:50Z
author = "Michael Henderson"
featured = true
+++
## 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`.
## Create your Hugo configuration file
Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details.
## Set your configuration publish folder to `_site`
The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives:
1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended).
git submodule deinit _site
git rm _site
git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
2. Or, change the Hugo configuration to use `_site` instead of `public`.
{
..
"publishdir": "_site",
..
}
## Convert Jekyll templates to Hugo templates
That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way.
As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours.
## Convert Jekyll plugins to Hugo shortcodes
Jekyll has [plugins](https://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port.
### Implementation
As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.
Jekyll's plugin:
module Jekyll
class ImageTag < Liquid::Tag
@url = nil
@caption = nil
@class = nil
@link = nil
// Patterns
IMAGE_URL_WITH_CLASS_AND_CAPTION =
IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i
IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i
IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
def initialize(tag_name, markup, tokens)
super
if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
@class = $1
@url = $3
@caption = $7
@link = $9
elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
@class = $1
@url = $3
@caption = $7
elsif markup =~ IMAGE_URL_WITH_CAPTION
@url = $1
@caption = $5
elsif markup =~ IMAGE_URL_WITH_CLASS
@class = $1
@url = $3
elsif markup =~ IMAGE_URL
@url = $1
end
end
def render(context)
if @class
source = "<figure class='#{@class}'>"
else
source = "<figure>"
end
if @link
source += "<a href=\"#{@link}\">"
end
source += "<img src=\"#{@url}\">"
if @link
source += "</a>"
end
source += "<figcaption>#{@caption}</figcaption>" if @caption
source += "</figure>"
source
end
end
end
Liquid::Template.register_tag('image', Jekyll::ImageTag)
is written as this Hugo shortcode:
<!-- image -->
<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
{{ with .Get "link"}}<a href="{{.}}">{{ end }}
<img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
{{ if .Get "link"}}</a>{{ end }}
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>{{ if isset .Params "title" }}
{{ .Get "title" }}{{ end }}
{{ if or (.Get "caption") (.Get "attr")}}<p>
{{ .Get "caption" }}
{{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
{{ .Get "attr" }}
{{ if .Get "attrlink"}}</a> {{ end }}
</p> {{ end }}
</figcaption>
{{ end }}
</figure>
<!-- image -->
### Usage
I simply changed:
{% image full https://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->https://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %}
to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`):
{{%/* fig class="full" src="https://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="https://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}}
As a bonus, the shortcode named parameters are, arguably, more readable.
## Finishing touches
### Fix content
Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed.
### Clean up
You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it.
## A practical example in a diff
[Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610).

@ -0,0 +1,20 @@
+++
title = "My awesome project"
description = "Description of my awesome project."
date = 2014-11-18T02:13:50Z
authors = [ "Autore1" ]
+++
## About project
Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.
## Install
```bash
go get -u -v github.com/spf13/hugo
```
## Docs
https://godoc.org/github.com/spf13/hugo

@ -0,0 +1,423 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>(Hu)go Template Primer &middot; My Name</title>
<meta name="description" content="(Hu)go Template Primer description.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="(Hu)go Template Primer">
<meta property="og:description" content="(Hu)go Template Primer description.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://phc.dm.unipi.it/2014/04/02/goisforlovers/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<article class="post-container" itemscope="" itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">(Hu)go Template Primer</h1>
<p class="post-description" itemprop="description">(Hu)go Template Primer description.</p>
<p class="post-date">
<span>Published <time datetime="2014-04-02" itemprop="datePublished">Wed, Apr 2, 2014</time></span>
<span>by</span>
<span itemscope="" itemprop="author" itemtype="https://schema.org/Person">
<span itemprop="name">
<a href="/page/contact" itemprop="url" rel="author">Michael Henderson</a>
</span>
</span>
</p>
<p class="post-reading post-line">
<span>Tempo di letturna ~ 7 min</span>
</p>
</header>
<div class="post-content clearfix" itemprop="articleBody">
<p>Hugo uses the excellent <a href="https://golang.org/">go</a> <a href="https://golang.org/pkg/html/template/">html/template</a> 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.</p>
<p>This document is a brief primer on using go templates. The <a href="https://golang.org/pkg/html/template/">go docs</a>
provide more details.</p>
<h2 id="introduction-to-go-templates">Introduction to Go Templates</h2>
<p>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.</p>
<p>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 <a href="https://golang.org/pkg/html/template/">go docs</a>.</p>
<h2 id="basic-syntax">Basic Syntax</h2>
<p>Go lang templates are html files with the addition of variables and
functions.</p>
<p><strong>Go variables and functions are accessible within {{ }}</strong></p>
<p>Accessing a predefined variable &ldquo;foo&rdquo;:</p>
<pre><code>{{ foo }}
</code></pre>
<p><strong>Parameters are separated using spaces</strong></p>
<p>Calling the add function with input of 1, 2:</p>
<pre><code>{{ add 1 2 }}
</code></pre>
<p><strong>Methods and fields are accessed via dot notation</strong></p>
<p>Accessing the Page Parameter &ldquo;bar&rdquo;</p>
<pre><code>{{ .Params.bar }}
</code></pre>
<p><strong>Parentheses can be used to group items together</strong></p>
<pre><code>{{ if or (isset .Params &quot;alt&quot;) (isset .Params &quot;caption&quot;) }} Caption {{ end }}
</code></pre>
<h2 id="variables">Variables</h2>
<p>Each go template has a struct (object) made available to it. In hugo each
template is passed either a page or a node struct depending on which type of
page you are rendering. More details are available on the
<a href="/layout/variables">variables</a> page.</p>
<p>A variable is accessed by referencing the variable name.</p>
<pre><code>&lt;title&gt;{{ .Title }}&lt;/title&gt;
</code></pre>
<p>Variables can also be defined and referenced.</p>
<pre><code>{{ $address := &quot;123 Main St.&quot;}}
{{ $address }}
</code></pre>
<h2 id="functions">Functions</h2>
<p>Go template ship with a few functions which provide basic functionality. The go
template system also provides a mechanism for applications to extend the
available functions with their own. <a href="/layout/functions">Hugo template
functions</a> provide some additional functionality we believe
are useful for building websites. Functions are called by using their name
followed by the required parameters separated by spaces. Template
functions cannot be added without recompiling hugo.</p>
<p><strong>Example:</strong></p>
<pre><code>{{ add 1 2 }}
</code></pre>
<h2 id="includes">Includes</h2>
<p>When including another template you will pass to it the data it will be
able to access. To pass along the current context please remember to
include a trailing dot. The templates location will always be starting at
the /layout/ directory within Hugo.</p>
<p><strong>Example:</strong></p>
<pre><code>{{ template &quot;chrome/header.html&quot; . }}
</code></pre>
<h2 id="logic">Logic</h2>
<p>Go templates provide the most basic iteration and conditional logic.</p>
<h3 id="iteration">Iteration</h3>
<p>Just like in go, the go templates make heavy use of range to iterate over
a map, array or slice. The following are different examples of how to use
range.</p>
<p><strong>Example 1: Using Context</strong></p>
<pre><code>{{ range array }}
{{ . }}
{{ end }}
</code></pre>
<p><strong>Example 2: Declaring value variable name</strong></p>
<pre><code>{{range $element := array}}
{{ $element }}
{{ end }}
</code></pre>
<p><strong>Example 2: Declaring key and value variable name</strong></p>
<pre><code>{{range $index, $element := array}}
{{ $index }}
{{ $element }}
{{ end }}
</code></pre>
<h3 id="conditionals">Conditionals</h3>
<p>If, else, with, or, &amp; and provide the framework for handling conditional
logic in Go Templates. Like range, each statement is closed with <code>end</code>.</p>
<p>Go Templates treat the following values as false:</p>
<ul>
<li>false</li>
<li>0</li>
<li>any array, slice, map, or string of length zero</li>
</ul>
<p><strong>Example 1: If</strong></p>
<pre><code>{{ if isset .Params &quot;title&quot; }}&lt;h4&gt;{{ index .Params &quot;title&quot; }}&lt;/h4&gt;{{ end }}
</code></pre>
<p><strong>Example 2: If -&gt; Else</strong></p>
<pre><code>{{ if isset .Params &quot;alt&quot; }}
{{ index .Params &quot;alt&quot; }}
{{else}}
{{ index .Params &quot;caption&quot; }}
{{ end }}
</code></pre>
<p><strong>Example 3: And &amp; Or</strong></p>
<pre><code>{{ if and (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}}
</code></pre>
<p><strong>Example 4: With</strong></p>
<p>An alternative way of writing &ldquo;if&rdquo; and then referencing the same value
is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope,
and skips the block if the variable is absent.</p>
<p>The first example above could be simplified as:</p>
<pre><code>{{ with .Params.title }}&lt;h4&gt;{{ . }}&lt;/h4&gt;{{ end }}
</code></pre>
<p><strong>Example 5: If -&gt; Else If</strong></p>
<pre><code>{{ if isset .Params &quot;alt&quot; }}
{{ index .Params &quot;alt&quot; }}
{{ else if isset .Params &quot;caption&quot; }}
{{ index .Params &quot;caption&quot; }}
{{ end }}
</code></pre>
<h2 id="pipes">Pipes</h2>
<p>One of the most powerful components of go templates is the ability to
stack actions one after another. This is done by using pipes. Borrowed
from unix pipes, the concept is simple, each pipeline&rsquo;s output becomes the
input of the following pipe.</p>
<p>Because of the very simple syntax of go templates, the pipe is essential
to being able to chain together function calls. One limitation of the
pipes is that they only can work with a single value and that value
becomes the last parameter of the next pipeline.</p>
<p>A few simple examples should help convey how to use the pipe.</p>
<p><strong>Example 1 :</strong></p>
<pre><code>{{ if eq 1 1 }} Same {{ end }}
</code></pre>
<p>is the same as</p>
<pre><code>{{ eq 1 1 | if }} Same {{ end }}
</code></pre>
<p>It does look odd to place the if at the end, but it does provide a good
illustration of how to use the pipes.</p>
<p><strong>Example 2 :</strong></p>
<pre><code>{{ index .Params &quot;disqus_url&quot; | html }}
</code></pre>
<p>Access the page parameter called &ldquo;disqus_url&rdquo; and escape the HTML.</p>
<p><strong>Example 3 :</strong></p>
<pre><code>{{ if or (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}}
Stuff Here
{{ end }}
</code></pre>
<p>Could be rewritten as</p>
<pre><code>{{ isset .Params &quot;caption&quot; | or isset .Params &quot;title&quot; | or isset .Params &quot;attr&quot; | if }}
Stuff Here
{{ end }}
</code></pre>
<h2 id="context-aka-the-dot">Context (aka. the dot)</h2>
<p>The most easily overlooked concept to understand about go templates is that {{ . }}
always refers to the current context. In the top level of your template this
will be the data set made available to it. Inside of a iteration it will have
the value of the current item. When inside of a loop the context has changed. .
will no longer refer to the data available to the entire page. If you need to
access this from within the loop you will likely want to set it to a variable
instead of depending on the context.</p>
<p><strong>Example:</strong></p>
<pre><code> {{ $title := .Site.Title }}
{{ range .Params.tags }}
&lt;li&gt; &lt;a href=&quot;{{ $baseurl }}/tags/{{ . | urlize }}&quot;&gt;{{ . }}&lt;/a&gt; - {{ $title }} &lt;/li&gt;
{{ end }}
</code></pre>
<p>Notice how once we have entered the loop the value of {{ . }} has changed. We
have defined a variable outside of the loop so we have access to it from within
the loop.</p>
<h1 id="hugo-parameters">Hugo Parameters</h1>
<p>Hugo provides the option of passing values to the template language
through the site configuration (for sitewide values), or through the meta
data of each specific piece of content. You can define any values of any
type (supported by your front matter/config format) and use them however
you want to inside of your templates.</p>
<h2 id="using-content-page-parameters">Using Content (page) Parameters</h2>
<p>In each piece of content you can provide variables to be used by the
templates. This happens in the <a href="/content/front-matter">front matter</a>.</p>
<p>An example of this is used in this documentation site. Most of the pages
benefit from having the table of contents provided. Sometimes the TOC just
doesn&rsquo;t make a lot of sense. We&rsquo;ve defined a variable in our front matter
of some pages to turn off the TOC from being displayed.</p>
<p>Here is the example front matter:</p>
<pre><code>---
title: &quot;Permalinks&quot;
date: &quot;2013-11-18&quot;
aliases:
- &quot;/doc/permalinks/&quot;
groups: [&quot;extras&quot;]
groups_weight: 30
notoc: true
---
</code></pre><p>Here is the corresponding code inside of the template:</p>
<pre><code> {{ if not .Params.notoc }}
&lt;div id=&quot;toc&quot; class=&quot;well col-md-4 col-sm-6&quot;&gt;
{{ .TableOfContents }}
&lt;/div&gt;
{{ end }}
</code></pre>
<h2 id="using-site-config-parameters">Using Site (config) Parameters</h2>
<p>In your top-level configuration file (eg, <code>config.yaml</code>) you can define site
parameters, which are values which will be available to you in chrome.</p>
<p>For instance, you might declare:</p>
<div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml"><span class="k">params</span><span class="p">:</span><span class="w">
</span><span class="w"> </span><span class="k">CopyrightHTML</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Copyright &amp;#xA9; 2013 John Doe. All Rights Reserved.&#34;</span><span class="w">
</span><span class="w"> </span><span class="k">TwitterUser</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;spf13&#34;</span><span class="w">
</span><span class="w"> </span><span class="k">SidebarRecentLimit</span><span class="p">:</span><span class="w"> </span><span class="m">5</span><span class="w">
</span></code></pre></div><p>Within a footer layout, you might then declare a <code>&lt;footer&gt;</code> which is only
provided if the <code>CopyrightHTML</code> parameter is provided, and if it is given,
you would declare it to be HTML-safe, so that the HTML entity is not escaped
again. This would let you easily update just your top-level config file each
January 1st, instead of hunting through your templates.</p>
<pre><code>{{if .Site.Params.CopyrightHTML}}&lt;footer&gt;
&lt;div class=&quot;text-center&quot;&gt;{{.Site.Params.CopyrightHTML | safeHtml}}&lt;/div&gt;
&lt;/footer&gt;{{end}}
</code></pre><p>An alternative way of writing the &ldquo;if&rdquo; and then referencing the same value
is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope,
and skips the block if the variable is absent:</p>
<pre><code>{{with .Site.Params.TwitterUser}}&lt;span class=&quot;twitter&quot;&gt;
&lt;a href=&quot;https://twitter.com/{{.}}&quot; rel=&quot;author&quot;&gt;
&lt;img src=&quot;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; title=&quot;Twitter: {{.}}&quot;
alt=&quot;Twitter&quot;&gt;&lt;/a&gt;
&lt;/span&gt;{{end}}
</code></pre><p>Finally, if you want to pull &ldquo;magic constants&rdquo; out of your layouts, you can do
so, such as in this example:</p>
<pre><code>&lt;nav class=&quot;recent&quot;&gt;
&lt;h1&gt;Recent Posts&lt;/h1&gt;
&lt;ul&gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
&lt;li&gt;&lt;a href=&quot;{{.RelPermalink}}&quot;&gt;{{.Title}}&lt;/a&gt;&lt;/li&gt;
{{end}}&lt;/ul&gt;
&lt;/nav&gt;
</code></pre>
</div>
<footer class="post-footer clearfix">
<p class="post-tags">
<span>Tagged:</span>
<a href="/tags/go/">go</a>,
<a href="/tags/golang/">golang</a>,
<a href="/tags/templates/">templates</a>,
<a href="/tags/themes/">themes</a>,
<a href="/tags/development/">development</a>
</p>
<div class="share">
<a class="icon-twitter" href="https://twitter.com/share?text=%28Hu%29go%20Template%20Primer&url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fgoisforlovers%2f"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fa fa-twitter"></i>
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fgoisforlovers%2f"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="fa fa-facebook"></i>
<span class="hidden">Facebook</span>
</a>
<a class="icon-google-plus" href="https://plus.google.com/share?url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fgoisforlovers%2f"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="fa fa-google-plus"></i>
<span class="hidden">Google+</span>
</a>
</div>
</footer>
</article>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,250 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Getting Started with Hugo &middot; My Name</title>
<meta name="description" content="Step 1. Install Hugo Goto 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 installing 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 name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Getting Started with Hugo">
<meta property="og:description" content="Step 1. Install Hugo Goto 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 installing 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:type" content="article">
<meta property="og:url" content="https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<article class="post-container" itemscope="" itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">Getting Started with Hugo</h1>
<p class="post-date">
<span>Published <time datetime="2014-04-02" itemprop="datePublished">Wed, Apr 2, 2014</time></span>
<span>by</span>
<span itemscope="" itemprop="author" itemtype="https://schema.org/Person">
<span itemprop="name">
<a href="/page/contact" itemprop="url" rel="author">My Name</a>
</span>
</span>
</p>
<p class="post-reading post-line">
<span>Tempo di letturna ~ 2 min</span>
</p>
</header>
<div class="post-content clearfix" itemprop="articleBody">
<h2 id="step-1-install-hugo">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="/overview/installing/">installing 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="https://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
&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>
</div>
<footer class="post-footer clearfix">
<p class="post-tags">
<span>Tagged:</span>
<a href="/tags/go/">go</a>,
<a href="/tags/golang/">golang</a>,
<a href="/tags/hugo/">hugo</a>,
<a href="/tags/development/">development</a>
</p>
<div class="share">
<a class="icon-twitter" href="https://twitter.com/share?text=Getting%20Started%20with%20Hugo&url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fhugoisforlovers%2f"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fa fa-twitter"></i>
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fhugoisforlovers%2f"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="fa fa-facebook"></i>
<span class="hidden">Facebook</span>
</a>
<a class="icon-google-plus" href="https://plus.google.com/share?url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fhugoisforlovers%2f"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="fa fa-google-plus"></i>
<span class="hidden">Google+</span>
</a>
</div>
</footer>
</article>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,307 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Migrating from Jekyll &middot; My Name</title>
<meta name="description" content="Migrating from Jekyll description.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Migrating from Jekyll">
<meta property="og:description" content="Migrating from Jekyll description.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<article class="post-container" itemscope="" itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">Migrating from Jekyll</h1>
<p class="post-description" itemprop="description">Migrating from Jekyll description.</p>
<p class="post-date">
<span>Published <time datetime="2014-04-02" itemprop="datePublished">Wed, Apr 2, 2014</time></span>
<span>by</span>
<span itemscope="" itemprop="author" itemtype="https://schema.org/Person">
<span itemprop="name">
<a href="/page/contact" itemprop="url" rel="author">Michael Henderson</a>
</span>
</span>
</p>
<p class="post-reading post-line">
<span>Tempo di letturna ~ 4 min</span>
</p>
</header>
<div class="post-content clearfix" itemprop="articleBody">
<h2 id="move-static-content-to-static">Move static content to <code>static</code></h2>
<p>Jekyll has a rule that any directory not starting with <code>_</code> will be copied as-is to the <code>_site</code> output. Hugo keeps all static content under <code>static</code>. You should therefore move it all there.
With Jekyll, something that looked like</p>
<pre><code>&lt;root&gt;/
▾ images/
logo.png
</code></pre>
<p>should become</p>
<pre><code>&lt;root&gt;/
▾ static/
▾ images/
logo.png
</code></pre>
<p>Additionally, you&rsquo;ll want any files that should reside at the root (such as <code>CNAME</code>) to be moved to <code>static</code>.</p>
<h2 id="create-your-hugo-configuration-file">Create your Hugo configuration file</h2>
<p>Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the <a href="/overview/configuration/">Hugo configuration documentation</a> for details.</p>
<h2 id="set-your-configuration-publish-folder-to-_site">Set your configuration publish folder to <code>_site</code></h2>
<p>The default is for Jekyll to publish to <code>_site</code> and for Hugo to publish to <code>public</code>. If, like me, you have <a href="http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html"><code>_site</code> mapped to a git submodule on the <code>gh-pages</code> branch</a>, you&rsquo;ll want to do one of two alternatives:</p>
<ol>
<li>
<p>Change your submodule to point to map <code>gh-pages</code> to public instead of <code>_site</code> (recommended).</p>
<pre><code> git submodule deinit _site
git rm _site
git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
</code></pre>
</li>
<li>
<p>Or, change the Hugo configuration to use <code>_site</code> instead of <code>public</code>.</p>
<pre><code> {
..
&quot;publishdir&quot;: &quot;_site&quot;,
..
}
</code></pre>
</li>
</ol>
<h2 id="convert-jekyll-templates-to-hugo-templates">Convert Jekyll templates to Hugo templates</h2>
<p>That&rsquo;s the bulk of the work right here. The documentation is your friend. You should refer to <a href="http://jekyllrb.com/docs/templates/">Jekyll&rsquo;s template documentation</a> if you need to refresh your memory on how you built your blog and <a href="/layout/templates/">Hugo&rsquo;s template</a> to learn Hugo&rsquo;s way.</p>
<p>As a single reference data point, converting my templates for <a href="http://heyitsalex.net/">heyitsalex.net</a> took me no more than a few hours.</p>
<h2 id="convert-jekyll-plugins-to-hugo-shortcodes">Convert Jekyll plugins to Hugo shortcodes</h2>
<p>Jekyll has <a href="https://jekyllrb.com/docs/plugins/">plugins</a>; Hugo has <a href="/doc/shortcodes/">shortcodes</a>. It&rsquo;s fairly trivial to do a port.</p>
<h3 id="implementation">Implementation</h3>
<p>As an example, I was using a custom <a href="https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb"><code>image_tag</code></a> plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.</p>
<p>Jekyll&rsquo;s plugin:</p>
<pre><code>module Jekyll
class ImageTag &lt; Liquid::Tag
@url = nil
@caption = nil
@class = nil
@link = nil
// Patterns
IMAGE_URL_WITH_CLASS_AND_CAPTION =
IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)&quot;(.*?)&quot;(\s+)-&gt;((https?:\/\/|\/)(\S+))(\s*)/i
IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)&quot;(.*?)&quot;/i
IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
def initialize(tag_name, markup, tokens)
super
if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
@class = $1
@url = $3
@caption = $7
@link = $9
elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
@class = $1
@url = $3
@caption = $7
elsif markup =~ IMAGE_URL_WITH_CAPTION
@url = $1
@caption = $5
elsif markup =~ IMAGE_URL_WITH_CLASS
@class = $1
@url = $3
elsif markup =~ IMAGE_URL
@url = $1
end
end
def render(context)
if @class
source = &quot;&lt;figure class='#{@class}'&gt;&quot;
else
source = &quot;&lt;figure&gt;&quot;
end
if @link
source += &quot;&lt;a href=\&quot;#{@link}\&quot;&gt;&quot;
end
source += &quot;&lt;img src=\&quot;#{@url}\&quot;&gt;&quot;
if @link
source += &quot;&lt;/a&gt;&quot;
end
source += &quot;&lt;figcaption&gt;#{@caption}&lt;/figcaption&gt;&quot; if @caption
source += &quot;&lt;/figure&gt;&quot;
source
end
end
end
Liquid::Template.register_tag('image', Jekyll::ImageTag)
</code></pre>
<p>is written as this Hugo shortcode:</p>
<pre><code>&lt;!-- image --&gt;
&lt;figure {{ with .Get &quot;class&quot; }}class=&quot;{{.}}&quot;{{ end }}&gt;
{{ with .Get &quot;link&quot;}}&lt;a href=&quot;{{.}}&quot;&gt;{{ end }}
&lt;img src=&quot;{{ .Get &quot;src&quot; }}&quot; {{ if or (.Get &quot;alt&quot;) (.Get &quot;caption&quot;) }}alt=&quot;{{ with .Get &quot;alt&quot;}}{{.}}{{else}}{{ .Get &quot;caption&quot; }}{{ end }}&quot;{{ end }} /&gt;
{{ if .Get &quot;link&quot;}}&lt;/a&gt;{{ end }}
{{ if or (or (.Get &quot;title&quot;) (.Get &quot;caption&quot;)) (.Get &quot;attr&quot;)}}
&lt;figcaption&gt;{{ if isset .Params &quot;title&quot; }}
{{ .Get &quot;title&quot; }}{{ end }}
{{ if or (.Get &quot;caption&quot;) (.Get &quot;attr&quot;)}}&lt;p&gt;
{{ .Get &quot;caption&quot; }}
{{ with .Get &quot;attrlink&quot;}}&lt;a href=&quot;{{.}}&quot;&gt; {{ end }}
{{ .Get &quot;attr&quot; }}
{{ if .Get &quot;attrlink&quot;}}&lt;/a&gt; {{ end }}
&lt;/p&gt; {{ end }}
&lt;/figcaption&gt;
{{ end }}
&lt;/figure&gt;
&lt;!-- image --&gt;
</code></pre>
<h3 id="usage">Usage</h3>
<p>I simply changed:</p>
<pre><code>{% image full https://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg &quot;One of my favorite touristy-type photos. I secretly waited for the good light while we were &quot;having fun&quot; and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing.&quot; -&gt;https://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %}
</code></pre>
<p>to this (this example uses a slightly extended version named <code>fig</code>, different than the built-in <code>figure</code>):</p>
<pre><code>{{% fig class=&quot;full&quot; src=&quot;https://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg&quot; title=&quot;One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing.&quot; link=&quot;https://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/&quot; %}}
</code></pre>
<p>As a bonus, the shortcode named parameters are, arguably, more readable.</p>
<h2 id="finishing-touches">Finishing touches</h2>
<h3 id="fix-content">Fix content</h3>
<p>Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that <code>hugo server --watch</code> is your friend. Test your changes and fix errors as needed.</p>
<h3 id="clean-up">Clean up</h3>
<p>You&rsquo;ll want to remove the Jekyll configuration at this point. If you have anything else that isn&rsquo;t used, delete it.</p>
<h2 id="a-practical-example-in-a-diff">A practical example in a diff</h2>
<p><a href="http://heyitsalex.net/">Hey, it&rsquo;s Alex</a> was migrated in less than a <em>father-with-kids day</em> from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this <a href="https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610">diff</a>.</p>
</div>
<footer class="post-footer clearfix">
<div class="share">
<a class="icon-twitter" href="https://twitter.com/share?text=Migrating%20from%20Jekyll&url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fmigrate-from-jekyll%2f"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fa fa-twitter"></i>
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fmigrate-from-jekyll%2f"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="fa fa-facebook"></i>
<span class="hidden">Facebook</span>
</a>
<a class="icon-google-plus" href="https://plus.google.com/share?url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f04%2f02%2fmigrate-from-jekyll%2f"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="fa fa-google-plus"></i>
<span class="hidden">Google+</span>
</a>
</div>
</footer>
</article>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,980 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Creating a New Theme &middot; My Name</title>
<meta name="description" content="Description of my awesome project.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Creating a New Theme">
<meta property="og:description" content="Description of my awesome project.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<article class="post-container" itemscope="" itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">Creating a New Theme</h1>
<p class="post-description" itemprop="description">Description of my awesome project.</p>
<p class="post-date">
<span>Published <time datetime="2014-09-28" itemprop="datePublished">Sun, Sep 28, 2014</time></span>
<span>by</span>
<span itemscope="" itemprop="author" itemtype="https://schema.org/Person">
<span itemprop="name">
<a href="/page/contact" itemprop="url" rel="author">Michael Henderson</a>
</span>
</span>
</p>
<p class="post-reading post-line">
<span>Tempo di letturna ~ 34 min</span>
</p>
</header>
<div class="post-content clearfix" itemprop="articleBody">
<h2 id="introduction">Introduction</h2>
<p>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&rsquo;ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won&rsquo;t cover using CSS to style your theme.</p>
<p>We&rsquo;ll start with creating a new site with a very basic template. Then we&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.</p>
<p>In this tutorial, commands that you enter will start with the &ldquo;$&rdquo; prompt. The output will follow. Lines that start with &ldquo;#&rdquo; are comments that I&rsquo;ve added to explain a point. When I show updates to a file, the &ldquo;:wq&rdquo; on the last line means to save the file.</p>
<p>Here&rsquo;s an example:</p>
<pre><code>## this is a comment
$ echo this is a command
this is a command
## edit the file
$vi foo.md
+++
date = &quot;2014-09-28&quot;
title = &quot;creating a new theme&quot;
+++
bah and humbug
:wq
## show it
$ cat foo.md
+++
date = &quot;2014-09-28&quot;
title = &quot;creating a new theme&quot;
+++
bah and humbug
$
</code></pre><h2 id="some-definitions">Some Definitions</h2>
<p>There are a few concepts that you need to understand before creating a theme.</p>
<h3 id="skins">Skins</h3>
<p>Skins are the files responsible for the look and feel of your site. Its the CSS that controls colors and fonts, its the Javascript that determines actions and reactions. Its also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.</p>
<p>You have two ways to create a skin. The simplest way is to create it in the <code>layouts/</code> directory. If you do, then you dont have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the <code>layouts/</code> directory so it will always find the skin.</p>
<p>Your second choice is to create it in a sub-directory of the <code>themes/</code> directory. If you do, then you must always tell Hugo where to search for the skin. Its extra work, though, so why bother with it?</p>
<p>The difference between creating a skin in <code>layouts/</code> and creating it in <code>themes/</code> is very subtle. A skin in <code>layouts/</code> cant be customized without updating the templates and static files that it is built from. A skin created in <code>themes/</code>, on the other hand, can be and that makes it easier for other people to use it.</p>
<p>The rest of this tutorial will call a skin created in the <code>themes/</code> directory a theme.</p>
<p>Note that you can use this tutorial to create a skin in the <code>layouts/</code> directory if you wish to. The main difference will be that you wont need to update the sites configuration file to use a theme.</p>
<h3 id="the-home-page">The Home Page</h3>
<p>The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html.</p>
<h3 id="site-configuration-file">Site Configuration File</h3>
<p>When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, youll need to translate my examples. Youll also need to change the name of the file since Hugo uses the extension to determine how to process it.</p>
<p>Hugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your <code>content/</code> directory and template files in your <code>themes/</code> directory. It will create HTML files in your <code>public/</code> directory. You can change this by specifying alternate locations in the configuration file.</p>
<h3 id="content">Content</h3>
<p>Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML.</p>
<h4 id="front-matter">Front Matter</h4>
<p>The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesnt use the files extension to know the format. It looks for markers to signal the type. TOML is surrounded by “<code>+++</code>”, YAML by “<code>---</code>”, and JSON is enclosed in curly braces. I prefer to use TOML, so youll need to translate my examples if you prefer YAML or JSON.</p>
<p>The information in the front matter is passed into the template before the content is rendered into HTML.</p>
<h4 id="markdown">Markdown</h4>
<p>Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file.</p>
<h3 id="template-files">Template Files</h3>
<p>Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it&rsquo;s published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use.</p>
<p>There are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template.</p>
<p>Hugo uses its knowledge of the content to find the template file used to render the content. If it cant find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it cant find a template, it will use the default template for the site.</p>
<p>Please note that you can use the front matter to influence Hugos choice of templates.</p>
<h4 id="single-template">Single Template</h4>
<p>A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template.</p>
<h4 id="list-template">List Template</h4>
<p>A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups.</p>
<p>The homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site.</p>
<h4 id="partial-template">Partial Template</h4>
<p>A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template.</p>
<h2 id="create-a-new-site">Create a New Site</h2>
<p>Let&rsquo;s use Hugo to create a new web site. I&rsquo;m a Mac user, so I&rsquo;ll create mine in my home directory, in the Sites folder. If you&rsquo;re using Linux, you might have to create the folder first.</p>
<p>The &ldquo;new site&rdquo; command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file.</p>
<pre><code>$ hugo new site ~/Sites/zafta
$ cd ~/Sites/zafta
$ ls -l
total 8
drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 .
drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 ..
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
$
</code></pre><p>Take a look in the content/ directory to confirm that it is empty.</p>
<p>The other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That&rsquo;s a topic for a different tutorial, so please ignore them for now.</p>
<h3 id="generate-the-html-for-the-new-site">Generate the HTML For the New Site</h3>
<p>Running the <code>hugo</code> command with no options will read all the available content and generate the HTML files. It will also copy all static files (that&rsquo;s everything that&rsquo;s not content). Since we have an empty site, it won&rsquo;t do much, but it will do it very quickly.</p>
<pre><code>$ hugo --verbose
INFO: 2014/09/29 Using config file: config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
WARN: 2014/09/29 Unable to locate layout: [404.html]
0 draft content
0 future content
0 pages created
0 tags created
0 categories created
in 2 ms
$
</code></pre><p>The &ldquo;<code>--verbose</code>&rdquo; flag gives extra information that will be helpful when we build the template. Every line of the output that starts with &ldquo;INFO:&rdquo; or &ldquo;WARN:&rdquo; is present because we used that flag. The lines that start with &ldquo;WARN:&rdquo; are warning messages. We&rsquo;ll go over them later.</p>
<p>We can verify that the command worked by looking at the directory again.</p>
<pre><code>$ ls -l
total 8
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
$
</code></pre><p>See that new public/ directory? Hugo placed all generated content there. When you&rsquo;re ready to publish your web site, that&rsquo;s the place to start. For now, though, let&rsquo;s just confirm that we have what we&rsquo;d expect from a site with no content.</p>
<pre><code>$ ls -l public
total 16
-rw-r--r-- 1 quoha staff 416 Sep 29 17:02 index.xml
-rw-r--r-- 1 quoha staff 262 Sep 29 17:02 sitemap.xml
$
</code></pre><p>Hugo created two XML files, which is standard, but there are no HTML files.</p>
<h3 id="test-the-new-site">Test the New Site</h3>
<p>Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the &ldquo;server&rdquo; command. If it is successful, you will see output similar to the following:</p>
<pre><code>$ hugo server --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
WARN: 2014/09/29 Unable to locate layout: [404.html]
0 draft content
0 future content
0 pages created
0 tags created
0 categories created
in 2 ms
Serving pages from /Users/quoha/Sites/zafta/public
Web Server is available at http://localhost:1313
Press Ctrl+C to stop
</code></pre><p>Connect to the listed URL (it&rsquo;s on the line that starts with &ldquo;Web Server&rdquo;). If everything is working correctly, you should get a page that shows the following:</p>
<pre><code>index.xml
sitemap.xml
</code></pre><p>That&rsquo;s a listing of your public/ directory. Hugo didn&rsquo;t create a home page because our site has no content. When there&rsquo;s no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser.</p>
<p>Lets go back and look at those warnings again.</p>
<pre><code>WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
WARN: 2014/09/29 Unable to locate layout: [404.html]
</code></pre><p>That second warning is easier to explain. We havent created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial.</p>
<p>Now for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” Thats only used by the home page.</p>
<p>I like that the verbose flag causes Hugo to list the files that it&rsquo;s searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we&rsquo;ll cover later that explain the names and paths. For now, just remember that Hugo couldn&rsquo;t find a template for the home page and it told you so.</p>
<p>At this point, you&rsquo;ve got a working installation and site that we can build upon. All thats left is to add some content and a theme to display it.</p>
<h2 id="create-a-new-theme">Create a New Theme</h2>
<p>Hugo doesn&rsquo;t ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes.</p>
<p>We&rsquo;re going to create a new theme called &ldquo;zafta.&rdquo; Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional.</p>
<p>All themes have opinions on content and layout. For example, Zafta uses &ldquo;post&rdquo; over &ldquo;blog&rdquo;. Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do.</p>
<h3 id="create-a-skeleton">Create a Skeleton</h3>
<p>Use the hugo &ldquo;new&rdquo; command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out.</p>
<pre><code>$ hugo new theme zafta
$ ls -l
total 8
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes
-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts
drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public
drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static
drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes
$ find themes -type f | xargs ls -l
-rw-r--r-- 1 quoha staff 1081 Sep 29 17:31 themes/zafta/LICENSE.md
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/archetypes/default.md
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
-rw-r--r-- 1 quoha staff 93 Sep 29 17:31 themes/zafta/theme.toml
$
</code></pre><p>The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype.</p>
<p>Please take a minute to fill out the theme.toml and LICENSE.md files. They&rsquo;re optional, but if you&rsquo;re going to be distributing your theme, it tells the world who to praise (or blame). It&rsquo;s also nice to declare the license so that people will know how they can use the theme.</p>
<pre><code>$ vi themes/zafta/theme.toml
author = &quot;michael d henderson&quot;
description = &quot;a minimal working template&quot;
license = &quot;MIT&quot;
name = &quot;zafta&quot;
source_repo = &quot;&quot;
tags = [&quot;tags&quot;, &quot;categories&quot;]
:wq
## also edit themes/zafta/LICENSE.md and change
## the bit that says &quot;YOUR_NAME_HERE&quot;
</code></pre><p>Note that the the skeleton&rsquo;s template files are empty. Don&rsquo;t worry, we&rsquo;ll be changing that shortly.</p>
<pre><code>$ find themes/zafta -name '*.html' | xargs ls -l
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
$
</code></pre><h3 id="update-the-configuration-file-to-use-the-theme">Update the Configuration File to Use the Theme</h3>
<p>Now that we&rsquo;ve got a theme to work with, it&rsquo;s a good idea to add the theme name to the configuration file. This is optional, because you can always add &ldquo;-t zafta&rdquo; on all your commands. I like to put it the configuration file because I like shorter command lines. If you don&rsquo;t put it in the configuration file or specify it on the command line, you won&rsquo;t use the template that you&rsquo;re expecting to.</p>
<p>Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.</p>
<pre><code>$ vi config.toml
theme = &quot;zafta&quot;
baseurl = &quot;&quot;
languageCode = &quot;en-us&quot;
title = &quot;zafta - totally refreshing&quot;
MetaDataFormat = &quot;toml&quot;
:wq
$
</code></pre><h3 id="generate-the-site">Generate the Site</h3>
<p>Now that we have an empty theme, let&rsquo;s generate the site again.</p>
<pre><code>$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
0 pages created
0 tags created
0 categories created
in 2 ms
$
</code></pre><p>Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme&rsquo;s directory.</p>
<p>Let&rsquo;s check the public/ directory to see what Hugo&rsquo;s created.</p>
<pre><code>$ ls -l public
total 16
drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 css
-rw-r--r-- 1 quoha staff 0 Sep 29 17:56 index.html
-rw-r--r-- 1 quoha staff 407 Sep 29 17:56 index.xml
drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 js
-rw-r--r-- 1 quoha staff 243 Sep 29 17:56 sitemap.xml
$
</code></pre><p>Notice four things:</p>
<ol>
<li>Hugo created a home page. This is the file public/index.html.</li>
<li>Hugo created a css/ directory.</li>
<li>Hugo created a js/ directory.</li>
<li>Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn&rsquo;t create any pages. That&rsquo;s because it considers a &ldquo;page&rdquo; to be a file created directly from a content file. It doesn&rsquo;t count things like the index.html files that it creates automatically.</li>
</ol>
<h4 id="the-home-page-1">The Home Page</h4>
<p>Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo&rsquo;s warning message shows that it looks for three different templates:</p>
<pre><code>WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
</code></pre><p>If it can&rsquo;t find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed.</p>
<p>When Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page.</p>
<pre><code>$ find . -name index.html | xargs ls -l
-rw-r--r-- 1 quoha staff 0 Sep 29 20:21 ./public/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 ./themes/zafta/layouts/index.html
$
</code></pre><h4 id="the-magic-of-static">The Magic of Static</h4>
<p>Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are.</p>
<p>Hugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo&rsquo;s opinion is that you&rsquo;ll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don&rsquo;t like that, you can change the directory names in your theme directory or even delete them completely. Hugo&rsquo;s nice enough to offer its opinion, then behave nicely if you disagree.</p>
<pre><code>$ find themes/zafta -type d | xargs ls -ld
drwxr-xr-x 7 quoha staff 238 Sep 29 17:38 themes/zafta
drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes/zafta/archetypes
drwxr-xr-x 5 quoha staff 170 Sep 29 17:31 themes/zafta/layouts
drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/_default
drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/partials
drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/static
drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/css
drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/js
$
</code></pre><h2 id="the-theme-development-cycle">The Theme Development Cycle</h2>
<p>When you&rsquo;re working on a theme, you will make changes in the theme&rsquo;s directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy:</p>
<ol>
<li>Purge the public/ directory.</li>
<li>Run the built in web server in watch mode.</li>
<li>Open your site in a browser.</li>
<li>Update the theme.</li>
<li>Glance at your browser window to see changes.</li>
<li>Return to step 4.</li>
</ol>
<p>Ill throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes.</p>
<p>Check the main Hugo site for information on using Git with Hugo.</p>
<h3 id="purge-the-public-directory">Purge the public/ Directory</h3>
<p>When generating the site, Hugo will create new files and update existing ones in the <code>public/</code> directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it.</p>
<p>Note: If you&rsquo;re building on an SSD, you should ignore this. Churning on a SSD can be costly.</p>
<h3 id="hugos-watch-option">Hugo&rsquo;s Watch Option</h3>
<p>Hugo&rsquo;s &ldquo;<code>--watch</code>&rdquo; option will monitor the content/ and your theme directories for changes and rebuild the site automatically.</p>
<h3 id="live-reload">Live Reload</h3>
<p>Hugo&rsquo;s built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, &ldquo;Wow, that&rsquo;s totally amazing.&rdquo;</p>
<h3 id="development-commands">Development Commands</h3>
<p>Use the following commands as the basis for your workflow.</p>
<pre><code>## purge old files. hugo will recreate the public directory.
##
$ rm -rf public
##
## run hugo in watch mode
##
$ hugo server --watch --verbose
</code></pre><p>Here&rsquo;s sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I&rsquo;ve said this before, it&rsquo;s amazing.</p>
<pre><code>$ rm -rf public
$ hugo server --watch --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
0 pages created
0 tags created
0 categories created
in 2 ms
Watching for changes in /Users/quoha/Sites/zafta/content
Serving pages from /Users/quoha/Sites/zafta/public
Web Server is available at http://localhost:1313
Press Ctrl+C to stop
INFO: 2014/09/29 File System Event: [&quot;/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html&quot;: MODIFY|ATTRIB]
Change detected, rebuilding site
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
0 pages created
0 tags created
0 categories created
in 1 ms
</code></pre><h2 id="update-the-home-page-template">Update the Home Page Template</h2>
<p>The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme&rsquo;s layout/ directory:</p>
<ol>
<li>index.html</li>
<li>_default/list.html</li>
<li>_default/single.html</li>
</ol>
<p>We could update one of the default templates, but a good design decision is to update the most specific template available. That&rsquo;s not a hard and fast rule (in fact, we&rsquo;ll break it a few times in this tutorial), but it is a good generalization.</p>
<h3 id="make-a-static-home-page">Make a Static Home Page</h3>
<p>Right now, that page is empty because we don&rsquo;t have any content and we don&rsquo;t have any logic in the template. Let&rsquo;s change that by adding some text to the template.</p>
<pre><code>$ vi themes/zafta/layouts/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;p&gt;hugo says hello!&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
:wq
$
</code></pre><p>Build the web site and then verify the results.</p>
<pre><code>$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
0 pages created
0 tags created
0 categories created
in 2 ms
$ find public -type f -name '*.html' | xargs ls -l
-rw-r--r-- 1 quoha staff 78 Sep 29 21:26 public/index.html
$ cat public/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;p&gt;hugo says hello!&lt;/p&gt;
&lt;/html&gt;
</code></pre><h4 id="live-reload-1">Live Reload</h4>
<p>Note: If you&rsquo;re running the server with the <code>--watch</code> option, you&rsquo;ll see different content in the file:</p>
<pre><code>$ cat public/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;p&gt;hugo says hello!&lt;/p&gt;
&lt;script&gt;document.write('&lt;script src=&quot;http://'
+ (location.host || 'localhost').split(':')[0]
+ ':1313/livereload.js?mindelay=10&quot;&gt;&lt;/'
+ 'script&gt;')&lt;/script&gt;&lt;/body&gt;
&lt;/html&gt;
</code></pre><p>When you use <code>--watch</code>, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it.</p>
<h3 id="build-a-dynamic-home-page">Build a &ldquo;Dynamic&rdquo; Home Page</h3>
<p>&ldquo;Dynamic home page?&rdquo; Hugo&rsquo;s a static web site generator, so this seems an odd thing to say. I mean let&rsquo;s have the home page automatically reflect the content in the site every time Hugo builds it. We&rsquo;ll use iteration in the template to do that.</p>
<h4 id="create-new-posts">Create New Posts</h4>
<p>Now that we have the home page generating static content, let&rsquo;s add some content to the site. We&rsquo;ll display these posts as a list on the home page and on their own page, too.</p>
<p>Hugo has a command to generate a skeleton post, just like it does for sites and themes.</p>
<pre><code>$ hugo --verbose new post/first.md
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 attempting to create post/first.md of post
INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md
ERROR: 2014/09/29 Unable to Cast &lt;nil&gt; to map[string]interface{}
$
</code></pre><p>That wasn&rsquo;t very nice, was it?</p>
<p>The &ldquo;new&rdquo; command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there&rsquo;s a theme. For me, the workaround was to create an archetypes file specifically for the post type.</p>
<pre><code>$ vi themes/zafta/archetypes/post.md
+++
Description = &quot;&quot;
Tags = []
Categories = []
+++
:wq
$ find themes/zafta/archetypes -type f | xargs ls -l
-rw-r--r-- 1 quoha staff 0 Sep 29 21:53 themes/zafta/archetypes/default.md
-rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md
$ hugo --verbose new post/first.md
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 attempting to create post/first.md of post
INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md
/Users/quoha/Sites/zafta/content/post/first.md created
$ hugo --verbose new post/second.md
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 attempting to create post/second.md of post
INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md
/Users/quoha/Sites/zafta/content/post/second.md created
$ ls -l content/post
total 16
-rw-r--r-- 1 quoha staff 104 Sep 29 21:54 first.md
-rw-r--r-- 1 quoha staff 105 Sep 29 21:57 second.md
$ cat content/post/first.md
+++
Categories = []
Description = &quot;&quot;
Tags = []
date = &quot;2014-09-29T21:54:53-05:00&quot;
title = &quot;first&quot;
+++
my first post
$ cat content/post/second.md
+++
Categories = []
Description = &quot;&quot;
Tags = []
date = &quot;2014-09-29T21:57:09-05:00&quot;
title = &quot;second&quot;
+++
my second post
$
</code></pre><p>Build the web site and then verify the results.</p>
<pre><code>$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{&quot;category&quot;:&quot;categories&quot;, &quot;tag&quot;:&quot;tags&quot;}
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
2 pages created
0 tags created
0 categories created
in 4 ms
$
</code></pre><p>The output says that it created 2 pages. Those are our new posts:</p>
<pre><code>$ find public -type f -name '*.html' | xargs ls -l
-rw-r--r-- 1 quoha staff 78 Sep 29 22:13 public/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/first/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/second/index.html
$
</code></pre><p>The new files are empty because because the templates used to generate the content are empty. The homepage doesn&rsquo;t show the new content, either. We have to update the templates to add the posts.</p>
<h3 id="list-and-single-templates">List and Single Templates</h3>
<p>In Hugo, we have three major kinds of templates. There&rsquo;s the home page template that we updated previously. It is used only by the home page. We also have &ldquo;single&rdquo; templates which are used to generate output for a single content file. We also have &ldquo;list&rdquo; templates that are used to group multiple pieces of content before generating output.</p>
<p>Generally speaking, list templates are named &ldquo;list.html&rdquo; and single templates are named &ldquo;single.html.&rdquo;</p>
<p>There are three other types of templates: partials, content views, and terms. We will not go into much detail on these.</p>
<h3 id="add-content-to-the-homepage">Add Content to the Homepage</h3>
<p>The home page will contain a list of posts. Let&rsquo;s update its template to add the posts that we just created. The logic in the template will run every time we build the site.</p>
<pre><code>$ vi themes/zafta/layouts/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
{{ range first 10 .Data.Pages }}
&lt;h1&gt;{{ .Title }}&lt;/h1&gt;
{{ end }}
&lt;/body&gt;
&lt;/html&gt;
:wq
$
</code></pre><p>Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between &ldquo;{{&rdquo; and &ldquo;}}&quot;. In our template, the commands are:</p>
<ol>
<li>range</li>
<li>.Title</li>
<li>end</li>
</ol>
<p>The &ldquo;range&rdquo; command is an iterator. We&rsquo;re going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created.</p>
<p>The &ldquo;.Title&rdquo; command prints the value of the &ldquo;title&rdquo; variable. Hugo pulls it from the front matter in the Markdown file.</p>
<p>The &ldquo;end&rdquo; command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds &ldquo;end.&rdquo; Everything between the &ldquo;range&rdquo; and &ldquo;end&rdquo; is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one.</p>
<p>It&rsquo;s helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files.</p>
<p>Build the web site and then verify the results.</p>
<pre><code>$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{&quot;tag&quot;:&quot;tags&quot;, &quot;category&quot;:&quot;categories&quot;}
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
2 pages created
0 tags created
0 categories created
in 4 ms
$ find public -type f -name '*.html' | xargs ls -l
-rw-r--r-- 1 quoha staff 94 Sep 29 22:23 public/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/first/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/second/index.html
$ cat public/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;h1&gt;second&lt;/h1&gt;
&lt;h1&gt;first&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;
$
</code></pre><p>Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let&rsquo;s take a moment to appreciate what we&rsquo;ve done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you&rsquo;ve learned everything you need to know to build a theme. All that&rsquo;s really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine.</p>
<p>And, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don&rsquo;t worry, though, that&rsquo;s all to come.</p>
<h3 id="add-content-to-the-posts">Add Content to the Posts</h3>
<p>We&rsquo;re working with posts, which are in the content/post/ directory. That means that their section is &ldquo;post&rdquo; (and if we don&rsquo;t do something weird, their type is also &ldquo;post&rdquo;).</p>
<p>Hugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can&rsquo;t find one, then it will look in the _default/ directory. There are some twists that we&rsquo;ll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html.</p>
<p>Now that we know the search rule, let&rsquo;s see what we actually have available:</p>
<pre><code>$ find themes/zafta -name single.html | xargs ls -l
-rw-r--r-- 1 quoha staff 132 Sep 29 17:31 themes/zafta/layouts/_default/single.html
</code></pre><p>We could create a new template, post/single.html, or change the default. Since we don&rsquo;t know of any other content types, let&rsquo;s start with updating the default.</p>
<p>Remember, any content that we haven&rsquo;t created a template for will end up using this template. That can be good or bad. Bad because I know that we&rsquo;re going to be adding different types of content and we&rsquo;re going to end up undoing some of the changes we&rsquo;ve made. It&rsquo;s good because we&rsquo;ll be able to see immediate results. It&rsquo;s also good to start here because we can start to build the basic layout for the site. As we add more content types, we&rsquo;ll refactor this file and move logic around. Hugo makes that fairly painless, so we&rsquo;ll accept the cost and proceed.</p>
<p>Please see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you&rsquo;re building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That&rsquo;s a refreshing amount of joy right there.</p>
<h4 id="update-the-template-file">Update the Template File</h4>
<pre><code>$ vi themes/zafta/layouts/_default/single.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;{{ .Title }}&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;{{ .Title }}&lt;/h1&gt;
{{ .Content }}
&lt;/body&gt;
&lt;/html&gt;
:wq
$
</code></pre><p>Build the web site and verify the results.</p>
<pre><code>$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{&quot;tag&quot;:&quot;tags&quot;, &quot;category&quot;:&quot;categories&quot;}
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
2 pages created
0 tags created
0 categories created
in 4 ms
$ find public -type f -name '*.html' | xargs ls -l
-rw-r--r-- 1 quoha staff 94 Sep 29 22:40 public/index.html
-rw-r--r-- 1 quoha staff 125 Sep 29 22:40 public/post/first/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:40 public/post/index.html
-rw-r--r-- 1 quoha staff 128 Sep 29 22:40 public/post/second/index.html
$ cat public/post/first/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;first&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;first&lt;/h1&gt;
&lt;p&gt;my first post&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
$ cat public/post/second/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;second&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;second&lt;/h1&gt;
&lt;p&gt;my second post&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
$
</code></pre><p>Notice that the posts now have content. You can go to localhost:1313/post/first to verify.</p>
<h3 id="linking-to-content">Linking to Content</h3>
<p>The posts are on the home page. Let&rsquo;s add a link from there to the post. Since this is the home page, we&rsquo;ll update its template.</p>
<pre><code>$ vi themes/zafta/layouts/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
{{ range first 10 .Data.Pages }}
&lt;h1&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h1&gt;
{{ end }}
&lt;/body&gt;
&lt;/html&gt;
</code></pre><p>Build the web site and verify the results.</p>
<pre><code>$ rm -rf public
$ hugo --verbose
INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
INFO: 2014/09/29 found taxonomies: map[string]string{&quot;tag&quot;:&quot;tags&quot;, &quot;category&quot;:&quot;categories&quot;}
WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
0 draft content
0 future content
2 pages created
0 tags created
0 categories created
in 4 ms
$ find public -type f -name '*.html' | xargs ls -l
-rw-r--r-- 1 quoha staff 149 Sep 29 22:44 public/index.html
-rw-r--r-- 1 quoha staff 125 Sep 29 22:44 public/post/first/index.html
-rw-r--r-- 1 quoha staff 0 Sep 29 22:44 public/post/index.html
-rw-r--r-- 1 quoha staff 128 Sep 29 22:44 public/post/second/index.html
$ cat public/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;h1&gt;&lt;a href=&quot;/post/second/&quot;&gt;second&lt;/a&gt;&lt;/h1&gt;
&lt;h1&gt;&lt;a href=&quot;/post/first/&quot;&gt;first&lt;/a&gt;&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;
$
</code></pre><h3 id="create-a-post-listing">Create a Post Listing</h3>
<p>We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let&rsquo;s make it show a list of all posts (not just the first ten).</p>
<p>We need to decide which template to update. This will be a listing, so it should be a list template. Let&rsquo;s take a quick look and see which list templates are available.</p>
<pre><code>$ find themes/zafta -name list.html | xargs ls -l
-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
</code></pre><p>As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don&rsquo;t have multiple content types, so let&rsquo;s stay consistent and update the default list template.</p>
<h2 id="creating-top-level-pages">Creating Top Level Pages</h2>
<p>Let&rsquo;s add an &ldquo;about&rdquo; page and display it at the top level (as opposed to a sub-level like we did with posts).</p>
<p>The default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let&rsquo;s verify that by creating an &ldquo;about&rdquo; page at the top level:</p>
<pre><code>$ vi content/about.md
+++
title = &quot;about&quot;
description = &quot;about this site&quot;
date = &quot;2014-09-27&quot;
slug = &quot;about time&quot;
+++
## about us
i'm speechless
:wq
</code></pre><p>Generate the web site and verify the results.</p>
<pre><code>$ find public -name '*.html' | xargs ls -l
-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:08 public/about-time/index.html
-rw-rw-r-- 1 mdhender staff 527 Sep 27 15:08 public/index.html
-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:08 public/post/first-post/index.html
-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:08 public/post/index.html
-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:08 public/post/second-post/index.html
</code></pre><p>Notice that the page wasn&rsquo;t created at the top level. It was created in a sub-directory named &lsquo;about-time/'. That name came from our slug. Hugo will use the slug to name the generated content. It&rsquo;s a reasonable default, by the way, but we can learn a few things by fighting it for this file.</p>
<p>One other thing. Take a look at the home page.</p>
<pre><code>$ cat public/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;h1&gt;&lt;a href=&quot;http://localhost:1313/post/theme/&quot;&gt;creating a new theme&lt;/a&gt;&lt;/h1&gt;
&lt;h1&gt;&lt;a href=&quot;http://localhost:1313/about-time/&quot;&gt;about&lt;/a&gt;&lt;/h1&gt;
&lt;h1&gt;&lt;a href=&quot;http://localhost:1313/post/second-post/&quot;&gt;second&lt;/a&gt;&lt;/h1&gt;
&lt;h1&gt;&lt;a href=&quot;http://localhost:1313/post/first-post/&quot;&gt;first&lt;/a&gt;&lt;/h1&gt;
&lt;script&gt;document.write('&lt;script src=&quot;http://'
+ (location.host || 'localhost').split(':')[0]
+ ':1313/livereload.js?mindelay=10&quot;&gt;&lt;/'
+ 'script&gt;')&lt;/script&gt;&lt;/body&gt;
&lt;/html&gt;
</code></pre><p>Notice that the &ldquo;about&rdquo; link is listed with the posts? That&rsquo;s not desirable, so let&rsquo;s change that first.</p>
<pre><code>$ vi themes/zafta/layouts/index.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;h1&gt;posts&lt;/h1&gt;
{{ range first 10 .Data.Pages }}
{{ if eq .Type &quot;post&quot;}}
&lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h2&gt;
{{ end }}
{{ end }}
&lt;h1&gt;pages&lt;/h1&gt;
{{ range .Data.Pages }}
{{ if eq .Type &quot;page&quot; }}
&lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h2&gt;
{{ end }}
{{ end }}
&lt;/body&gt;
&lt;/html&gt;
:wq
</code></pre><p>Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it.</p>
<p>But, that about page still renders to about-time/index.html.</p>
<pre><code>$ find public -name '*.html' | xargs ls -l
-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:33 public/about-time/index.html
-rw-rw-r-- 1 mdhender staff 645 Sep 27 15:33 public/index.html
-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:33 public/post/first-post/index.html
-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:33 public/post/index.html
-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:33 public/post/second-post/index.html
</code></pre><p>Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let&rsquo;s do it the hard way and change the permalink in the configuration file.</p>
<pre><code>$ vi config.toml
[permalinks]
page = &quot;/:title/&quot;
about = &quot;/:filename/&quot;
</code></pre><p>Generate the web site and verify that this didn&rsquo;t work. Hugo lets &ldquo;slug&rdquo; or &ldquo;URL&rdquo; override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place.</p>
<h2 id="sharing-templates">Sharing Templates</h2>
<p>If you&rsquo;ve been following along, you probably noticed that posts have titles in the browser and the home page doesn&rsquo;t. That&rsquo;s because we didn&rsquo;t put the title in the home page&rsquo;s template (layouts/index.html). That&rsquo;s an easy thing to do, but let&rsquo;s look at a different option.</p>
<p>We can put the common bits into a shared template that&rsquo;s stored in the themes/zafta/layouts/partials/ directory.</p>
<h3 id="create-the-header-and-footer-partials">Create the Header and Footer Partials</h3>
<p>In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme&rsquo;s presentation.</p>
<pre><code>$ vi themes/zafta/layouts/partials/header.html
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;{{ .Title }}&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
:wq
$ vi themes/zafta/layouts/partials/footer.html
&lt;/body&gt;
&lt;/html&gt;
:wq
</code></pre><h3 id="update-the-home-page-template-to-use-the-partials">Update the Home Page Template to Use the Partials</h3>
<p>The most noticeable difference between a template call and a partials call is the lack of path:</p>
<pre><code>{{ template &quot;theme/partials/header.html&quot; . }}
</code></pre><p>versus</p>
<pre><code>{{ partial &quot;header.html&quot; . }}
</code></pre><p>Both pass in the context.</p>
<p>Let&rsquo;s change the home page template to use these new partials.</p>
<pre><code>$ vi themes/zafta/layouts/index.html
{{ partial &quot;header.html&quot; . }}
&lt;h1&gt;posts&lt;/h1&gt;
{{ range first 10 .Data.Pages }}
{{ if eq .Type &quot;post&quot;}}
&lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h2&gt;
{{ end }}
{{ end }}
&lt;h1&gt;pages&lt;/h1&gt;
{{ range .Data.Pages }}
{{ if or (eq .Type &quot;page&quot;) (eq .Type &quot;about&quot;) }}
&lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}&lt;/a&gt;&lt;/h2&gt;
{{ end }}
{{ end }}
{{ partial &quot;footer.html&quot; . }}
:wq
</code></pre><p>Generate the web site and verify the results. The title on the home page is now &ldquo;your title here&rdquo;, which comes from the &ldquo;title&rdquo; variable in the config.toml file.</p>
<h3 id="update-the-default-single-template-to-use-the-partials">Update the Default Single Template to Use the Partials</h3>
<pre><code>$ vi themes/zafta/layouts/_default/single.html
{{ partial &quot;header.html&quot; . }}
&lt;h1&gt;{{ .Title }}&lt;/h1&gt;
{{ .Content }}
{{ partial &quot;footer.html&quot; . }}
:wq
</code></pre><p>Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file.</p>
<h2 id="add-date-published-to-posts">Add “Date Published” to Posts</h2>
<p>It&rsquo;s common to have posts display the date that they were written or published, so let&rsquo;s add that. The front matter of our posts has a variable named &ldquo;date.&rdquo; It&rsquo;s usually the date the content was created, but let&rsquo;s pretend that&rsquo;s the value we want to display.</p>
<h3 id="add-date-published-to-the-template">Add “Date Published” to the Template</h3>
<p>We&rsquo;ll start by updating the template used to render the posts. The template code will look like:</p>
<pre><code>{{ .Date.Format &quot;Mon, Jan 2, 2006&quot; }}
</code></pre><p>Posts use the default single template, so we&rsquo;ll change that file.</p>
<pre><code>$ vi themes/zafta/layouts/_default/single.html
{{ partial &quot;header.html&quot; . }}
&lt;h1&gt;{{ .Title }}&lt;/h1&gt;
&lt;h2&gt;{{ .Date.Format &quot;Mon, Jan 2, 2006&quot; }}&lt;/h2&gt;
{{ .Content }}
{{ partial &quot;footer.html&quot; . }}
:wq
</code></pre><p>Generate the web site and verify the results. The posts now have the date displayed in them. There&rsquo;s a problem, though. The &ldquo;about&rdquo; page also has the date displayed.</p>
<p>As usual, there are a couple of ways to make the date display only on posts. We could do an &ldquo;if&rdquo; statement like we did on the home page. Another way would be to create a separate template for posts.</p>
<p>The &ldquo;if&rdquo; solution works for sites that have just a couple of content types. It aligns with the principle of &ldquo;code for today,&rdquo; too.</p>
<p>Let&rsquo;s assume, though, that we&rsquo;ve made our site so complex that we feel we have to create a new template type. In Hugo-speak, we&rsquo;re going to create a section template.</p>
<p>Let&rsquo;s restore the default single template before we forget.</p>
<pre><code>$ mkdir themes/zafta/layouts/post
$ vi themes/zafta/layouts/_default/single.html
{{ partial &quot;header.html&quot; . }}
&lt;h1&gt;{{ .Title }}&lt;/h1&gt;
{{ .Content }}
{{ partial &quot;footer.html&quot; . }}
:wq
</code></pre><p>Now we&rsquo;ll update the post&rsquo;s version of the single template. If you remember Hugo&rsquo;s rules, the template engine will use this version over the default.</p>
<pre><code>$ vi themes/zafta/layouts/post/single.html
{{ partial &quot;header.html&quot; . }}
&lt;h1&gt;{{ .Title }}&lt;/h1&gt;
&lt;h2&gt;{{ .Date.Format &quot;Mon, Jan 2, 2006&quot; }}&lt;/h2&gt;
{{ .Content }}
{{ partial &quot;footer.html&quot; . }}
:wq
</code></pre><p>Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn&rsquo;t.</p>
<h3 id="dont-repeat-yourself">Don&rsquo;t Repeat Yourself</h3>
<p>DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you&rsquo;re figuring that out, accept that you&rsquo;ll be doing some refactoring. Hugo makes that easy and fast, so it&rsquo;s okay to delay splitting up a template.</p>
</div>
<footer class="post-footer clearfix">
<div class="share">
<a class="icon-twitter" href="https://twitter.com/share?text=Creating%20a%20New%20Theme&url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f09%2f28%2fcreating-a-new-theme%2f"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fa fa-twitter"></i>
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f09%2f28%2fcreating-a-new-theme%2f"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="fa fa-facebook"></i>
<span class="hidden">Facebook</span>
</a>
<a class="icon-google-plus" href="https://plus.google.com/share?url=https%3a%2f%2fphc.dm.unipi.it%2f2014%2f09%2f28%2fcreating-a-new-theme%2f"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="fa fa-google-plus"></i>
<span class="hidden">Google+</span>
</a>
</div>
</footer>
</article>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>404 Page not found &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="404 Page not found">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/404.html">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<p class="error">Oh, this page does not exist. You can head back to <a href="https://phc.dm.unipi.it/">homepage</a>.</p>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,199 @@
@import url(https://fonts.googleapis.com/css2?family=Share:wght@700&family=Ubuntu+Mono&family=Ubuntu:wght@300;700&display=swap);
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
main { display: block; }
h1 { font-size: 2em; margin: .67em 0; }
hr { box-sizing: content-box; height: 0; overflow: visible; }
pre { font-family: monospace, monospace; font-size: 1em; }
a { background-color: transparent; }
abbr[title] { border-bottom: none; text-decoration: underline; text-decoration: underline dotted; }
b, strong { font-weight: bolder; }
code, kbd, samp { font-family: monospace, monospace; font-size: 1em; }
small { font-size: 80%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sub { bottom: -0.25em; }
sup { top: -0.5em; }
img { border-style: none; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; }
button, input { overflow: visible; }
button, select { text-transform: none; }
button, [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; }
button::-moz-focus-inner, [type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { border-style: none; padding: 0; }
button:-moz-focusring, [type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { outline: 1px dotted ButtonText; }
fieldset { padding: .35em .75em .625em; }
legend { box-sizing: border-box; color: inherit; display: table; max-width: 100%; padding: 0; white-space: normal; }
progress { vertical-align: baseline; }
textarea { overflow: auto; }
[type="checkbox"], [type="radio"] { box-sizing: border-box; padding: 0; }
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button { height: auto; }
[type="search"] { -webkit-appearance: textfield; outline-offset: -2px; }
[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; }
details { display: block; }
summary { display: list-item; }
template { display: none; }
[hidden] { display: none; }
html, body { height: 100%; }
body { background: #fefefe; color: #424242; font-family: "Ubuntu", sans-serif; font-weight: 300; font-size: 18px; }
h1, h2, h3, h4, h5, h6 { font-family: 'Share', cursive; font-weight: 700; margin-bottom: 20px; text-transform: none; }
h1 { font-size: 26px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; margin-bottom: 20px; }
h4 { font-size: 18px; margin-bottom: 18px; }
h5 { font-size: 16px; margin-bottom: 15px; }
h6 { font-size: 14px; margin-bottom: 12px; }
p { line-height: 1.8; margin: 0 0 30px; }
a { color: #f03838; text-decoration: none; }
ul, ol { line-height: 1.4; margin: 0 0 20px; }
ul ul, ul ol, ol ul, ol ol { margin: 10px 0 0 20px; }
ul li, ol li { margin: 0 0 2px; }
ul li:last-of-type, ol li:last-of-type { margin-bottom: 0; }
blockquote { border-left: 1px dotted #f03838; margin: 40px 0; padding: 5px 30px; }
blockquote p { color: #aeadad; display: block; font-style: italic; margin: 0; width: 100%; }
img { display: block; margin: 40px 0; width: auto; max-width: 100%; }
img[src$="align-center"] { margin: auto; }
img[src$="align-left"] { float: left; margin-right: 40px; }
img[src$="align-right"] { float: right; margin-left: 40px; }
pre { border: 1px solid #dddbcc; border-radius: 3px; margin: 0 0 20px; overflow-x: auto; padding: 10px; font-size: 17px; background-color: #f1f0ea; }
pre code { padding: 0; background: none; }
code { padding: 2px 4px; font-size: 95%; border-radius: 4px; background-color: #f1f0ea; font-family: 'Ubuntu mono', monospace; }
hr { border: none; border-bottom: 1px dotted #303030; margin: 45px 0; }
table { margin-bottom: 40px; width: 100%; }
table tbody > tr:nth-child(odd) > td, table tbody > tr:nth-child(odd) > th { background-color: #f7f7f3; }
table th { padding: 0 10px 10px; text-align: left; }
table td { padding: 10px; }
table tr { border-bottom: 1px dotted #aeadad; }
::selection { background: #fff5b8; color: #000; display: block; }
::-moz-selection { background: #fff5b8; color: #000; display: block; }
.fluid-width-video-wrapper { margin-bottom: 40px; }
.hidden { text-indent: -9999px; visibility: hidden; display: none; }
.clearfix:after { content: ""; display: table; clear: both; }
.container { margin: 0 auto; position: relative; width: 100%; max-width: 889px; }
#wrapper { height: auto; min-height: 100%; margin-bottom: -265px; }
#wrapper:after { content: ""; display: block; height: 265px; }
.button { background: #303030; border: none; border-radius: 3px; color: #fefefe; font-size: 14px; font-weight: 700; padding: 10px 12px; text-transform: uppercase; }
.button:hover { background: #f03838; }
.button-square { background: #f03838; color: #fff; float: left; font-size: 17px; margin: 0 0 0 10px; padding: 3px 8px 4px; }
.button-square:hover { background: #303030; }
.error { text-align: center; }
.comments { margin-top: 10px; }
.site-header { padding: 40px 0 0; overflow: auto; text-align: center; text-transform: uppercase; }
.site-title-wrapper { display: table; margin: 0 auto; }
.site-title { float: left; font-size: 14px; font-weight: 600; margin: 0; text-transform: uppercase; }
.site-title a { float: left; background: #f03838; color: #fefefe; padding: 5px 10px 6px; }
.site-title a:hover { background: #303030; }
.site-logo { display: block; }
.site-logo img { margin: 0; }
.site-nav { list-style: none; margin: 28px 0 10px; padding: 0; }
.site-nav-item { display: inline-block; font-size: 17px; font-weight: 700; margin: 0 10px; }
.site-nav-item a:hover { color: #424242; }
#latest-post { display: none; }
.post-container { margin: 0 40px; }
.post-header { border-bottom: 6px solid #303030; margin: 0 0 20px; padding: 0 0 20px; text-align: center; }
.post-title, .page-title { font-size: 52px; font-weight: 700; margin: 15px 0; text-align: center; }
.post-subtitle { font-size: 32px; font-weight: 700; margin: 15px 0; text-align: center; }
.page-title { margin: 15px 40px; }
.post-date, .post-reading, .blog-description { color: #aeadad; font-size: 14px; font-weight: 600; line-height: 1; margin: 25px 0 0; }
.post-date a, .post-reading a, .blog-description a { color: #aeadad; }
.post-date a:hover, .post-reading a:hover, .blog-description a:hover { color: #f03838; }
.post-line:after { border-bottom: 1px dotted #303030; content: ""; display: block; margin: 40px auto 0; width: 100px; }
.post-content a:hover { border-bottom: 1px dotted #f03838; padding: 0 0 2px; }
.post-content:last-child { margin-bottom: 0; }
.post-content .footnote { border-spacing: 0; margin-bottom: 0; }
.post-content .footnote .label + td { width: 100%; }
.post-content .gist tr { border-bottom: 0; }
.post-footer { margin-top: 5px; }
.post-tags, .share { color: #aeadad; font-size: 14px; }
.post-tags span, .share span { font-weight: 600; }
.post-tags { float: left; margin: 3px 0 0; }
.post-tags a:hover { color: #303030; }
.share { float: right; }
.share a { background: #f03838; color: #fff; display: inline-block; font-size: 16px; margin-left: 5px; padding: 5px 0 4px; width: 30px; text-align: center; }
.share a:hover { background: #303030; }
.post-navigation { display: table; margin: 70px auto 100px; }
.newer-posts, .older-posts { float: left; background: #f03838; color: #fefefe; font-size: 14px; font-weight: 600; margin: 0 5px; padding: 5px 10px 6px; }
.newer-posts:hover, .older-posts:hover { background: #303030; }
.page-number { display: none; }
.post-list { list-style: none; padding: 0; }
.post-stub { border-bottom: 1px dotted #303030; margin: 0; position: relative; }
.post-stub:first-child { padding-top: 0; }
.post-stub a { -webkit-transition: all .2s ease-in-out; -moz-transition: all .2s ease-in-out; transition: all .2s ease-in-out; display: block; color: #424242; padding: 20px 5px; }
.post-stub a:hover { background: #fcf5f5; color: #f03838; padding: 20px 12px; }
.post-stub a:hover .post-stub-tag { background: #f03838; }
.post-stub-tag { background: #303030; border-radius: 3px; color: #fff; float: right; font-size: 10px; margin: 7px 0 0; padding: 0 5px; text-transform: uppercase; }
.post-stub-title { display: block; margin: 0; text-transform: none; font-size: 18px; }
.post-stub-description { display: block; margin: 0; font-size: 16px; text-transform: none; }
.post-stub-date { display: block; font-size: 13px; color: #666; }
.next-posts-link a, .previous-posts-link a { display: block; padding: 8px 11px; }
.author-profile { margin: 0 40px; }
.author-profile:after { border-bottom: 1px dotted #303030; content: ""; display: block; margin: 40px auto 0; width: 100px; }
.author-heading { margin: 15px auto; text-align: center; width: 100%; }
.author-avatar { border-radius: 50px; display: inline; height: 50px; margin: 5px 10px 0 0; width: 50px; vertical-align: middle; }
.author-name { display: inline; font-size: 52px; font-weight: 700; text-align: center; text-transform: uppercase; vertical-align: middle; }
.author-meta { color: #aeadad; font-size: 14px; font-weight: 600; line-height: 1; margin: 25px 0 0; text-align: center; text-transform: uppercase; }
.author-meta span { display: inline-block; margin: 0 10px 8px; }
.author-meta i { margin-right: 8px; }
.author-meta a { color: #aeadad; }
.author-meta a:hover { color: #f03838; }
.author-bio { margin: 20px auto 0; text-align: center; max-width: 700px; }
.footer { background: #303030; color: #d3d3d3; height: 265px; margin-top: 95px; overflow: auto; }
.footer .site-title-wrapper { margin: 80px auto 35px; }
.footer .site-title a:hover, .footer .button-square:hover { background: #121212; }
.footer-copyright { color: #656565; font-size: 14px; margin: 0; text-align: center; text-transform: uppercase; }
.footer-copyright a { color: #656565; font-weight: 700; }
.footer-copyright a:hover { color: #fefefe; }
#nprogress .bar { background: #f03838; }
#nprogress .peg { box-shadow: 0 0 10px #f03838, 0 0 5px #f03838; }
#nprogress .spinner-icon { border-top-color: #f03838; border-left-color: #f03838; }
@media only screen and (max-width: 800px) {
.post-stub-tag { display: none; }
}
@media only screen and (max-width: 600px) {
h1, h2 { margin-bottom: 20px; }
p { margin-bottom: 20px; }
ul, ol { margin-bottom: 20px; }
img { margin: 30px 0; }
blockquote { margin: 30px 0; }
pre { margin: 20px 0; }
hr { margin: 35px 0; }
.site-header { padding-top: 40px; }
.site-title { float: none; margin-bottom: 15px; }
.site-title a { float: none; }
.site-title + .button-square { margin-left: 0; }
.site-nav-item { display: block; margin: 15px 0; }
.post-header { margin-bottom: 20px; padding-bottom: 20px; }
.post-header p { word-wrap: break-word; overflow-wrap: break-word; }
.post-title, .page-title, .author-name, .author-heading { font-size: 42px; margin-top: 5px; word-wrap: break-word; overflow-wrap: break-word; }
.post-date, .blog-description, .author-meta { margin-top: 20px; }
.post-date:after, .post-date:before, .blog-description:after,
.blog-description:before, .author-meta:after, .author-meta:before { margin-top: 30px; }
.author-profile:after, .author-profile:before { margin-top: 20px; }
.post-stub-title { display: block; }
.post-stub-date:before { content: ""; display: block; }
.post-list { margin-top: 20px; }
.post-container, .post-list, .author-profile { margin-right: 25px; margin-left: 25px; }
.post-tags { width: 100%; }
.post-stub a, .post-stub a:hover { padding-top: 12px; padding-bottom: 12px; }
.share { float: left; margin-top: 20px; }
.share a { margin: 0 5px 0 0; }
.footer { margin-top: 50px; }
.footer .site-title-wrapper { text-align: center; }
.footer .button-jump-top { clear: both; display: inline-block; float: none; }
}
@media only screen and (max-width: 400px) {
.site-header { padding-top: 40px; }
.post-title, .page-title, .author-name, .author-heading { font-size: 30px; line-height: 1.2; word-wrap: break-word; overflow-wrap: break-word; }
.post-date, .blog-description, .author-meta { line-height: 1.6; }
.post-date, .blog-description, .author-meta { margin-top: 10px; }
.post-date:after, .post-date:before, .blog-description:after,
.blog-description:before, .author-meta:after, .author-meta:before { margin-top: 20px; }
.author-profile:after, .author-profile:before { margin-top: 10px; }
.post-container, .post-list, .author-profile { margin-right: 15px; margin-left: 15px; }
.author-avatar { display: block; margin: 0 auto 18px; }
.author-meta span { display: block; margin: 18px 0; }
.footer-copyright { padding: 0 10px; }
}

@ -0,0 +1,72 @@
.chroma { background-color: #f0f0f0; }
.chroma .err { color: #a61717; background-color: #e3d2d2; }
.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
.chroma .hl { display: block; width: 100%; background-color: #ffc; }
.chroma .lnt { margin-right: .4em; padding: 0 .4em 0 .4em; color: #7f7f7f; }
.chroma .ln { margin-right: .4em; padding: 0 .4em 0 .4em; color: #7f7f7f; }
.chroma .k { color: #000; font-weight: bold; }
.chroma .kc { color: #000; font-weight: bold; }
.chroma .kd { color: #000; font-weight: bold; }
.chroma .kn { color: #000; font-weight: bold; }
.chroma .kp { color: #000; font-weight: bold; }
.chroma .kr { color: #000; font-weight: bold; }
.chroma .kt { color: #458; font-weight: bold; }
.chroma .na { color: #008080; }
.chroma .nb { color: #0086b3; }
.chroma .bp { color: #999; }
.chroma .nc { color: #458; font-weight: bold; }
.chroma .no { color: #008080; }
.chroma .nd { color: #1f7199; font-weight: bold; }
.chroma .ni { color: #800080; }
.chroma .ne { color: #900; font-weight: bold; }
.chroma .nf { color: #800; font-weight: bold; }
.chroma .nl { color: #900; font-weight: bold; }
.chroma .nn { color: #555; }
.chroma .nt { color: #000080; }
.chroma .nv { color: #008080; }
.chroma .vc { color: #008080; }
.chroma .vg { color: #008080; }
.chroma .vi { color: #008080; }
.chroma .s { color: #d14; }
.chroma .sa { color: #d14; }
.chroma .sb { color: #d14; }
.chroma .sc { color: #d14; }
.chroma .dl { color: #d14; }
.chroma .sd { color: #d14; }
.chroma .s2 { color: #800; }
.chroma .se { color: #d14; }
.chroma .sh { color: #d14; }
.chroma .si { color: #d14; }
.chroma .sx { color: #d14; }
.chroma .sr { color: #009926; }
.chroma .s1 { color: #800; }
.chroma .ss { color: #990073; }
.chroma .m { color: #099; }
.chroma .mb { color: #099; }
.chroma .mf { color: #099; }
.chroma .mh { color: #099; }
.chroma .mi { color: #099; }
.chroma .il { color: #099; }
.chroma .mo { color: #099; }
.chroma .o { color: #000; font-weight: bold; }
.chroma .ow { color: #000; font-weight: bold; }
.chroma .c { color: #998; font-style: italic; }
.chroma .ch { color: #998; font-style: italic; }
.chroma .cm { color: #998; font-style: italic; }
.chroma .c1 { color: #998; font-style: italic; }
.chroma .cs { color: #999; font-weight: bold; font-style: italic; }
.chroma .cp { color: #999; font-weight: bold; font-style: italic; }
.chroma .cpf { color: #999; font-weight: bold; font-style: italic; }
.chroma .gd { color: #000; background-color: #fdd; }
.chroma .ge { color: #000; font-style: italic; }
.chroma .gr { color: #a00; }
.chroma .gh { color: #999; }
.chroma .gi { color: #000; background-color: #dfd; }
.chroma .go { color: #888; }
.chroma .gp { color: #555; }
.chroma .gs { font-weight: bold; }
.chroma .gu { color: #aaa; }
.chroma .gt { color: #a00; }
.chroma .gl { text-decoration: underline; }
.chroma .w { color: #bbb; }

@ -0,0 +1,213 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Blog del PHC &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Blog del PHC">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container" itemscope="" itemtype="https://schema.org/Blog">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list">
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">Migrating from Jekyll</h4>
<div class="post-stub-description">
Migrating from Jekyll description.
</div>
<time class="post-stub-date" datetime="2014-04-02">
Published Wed, Apr 2, 2014
</time>
<span class="post-stub-tag">Featured</span>
</a>
</li>
</ol>
<h3 class="post-subtitle">Recenti</h3>
<ol class="post-list">
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">Creating a New Theme</h4>
<div class="post-stub-description">
Description of my awesome project.
</div>
<time class="post-stub-date" datetime="2014-09-28">
Published Sun, Sep 28, 2014
</time>
</a>
</li>
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/04/02/goisforlovers/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">(Hu)go Template Primer</h4>
<div class="post-stub-description">
(Hu)go Template Primer description.
</div>
<time class="post-stub-date" datetime="2014-04-02">
Published Wed, Apr 2, 2014
</time>
</a>
</li>
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">Getting Started with Hugo</h4>
<div class="post-stub-description">
</div>
<time class="post-stub-date" datetime="2014-04-02">
Published Wed, Apr 2, 2014
</time>
</a>
</li>
</ol>
<div class="post-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Blog del PHC</title>
<link>https://phc.dm.unipi.it/</link>
<description>Recent content on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Fri, 03 Apr 2015 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>About</title>
<link>https://phc.dm.unipi.it/page/about/</link>
<pubDate>Fri, 03 Apr 2015 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/page/about/</guid>
<description>About Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec dolor in magna lobortis egestas. Suspendisse eu erat tempor, tristique neque eu, convallis nulla. Curabitur vel bibendum lacus, at semper mauris. Suspendisse aliquet commodo ex, sed sagittis metus aliquam id. Maecenas feugiat rutrum lorem vel imperdiet. Nullam ornare lectus ut enim finibus, et porttitor mi tincidunt. Aenean lacinia, leo quis vehicula eleifend, quam libero sagittis erat, at euismod augue mauris et sapien.</description>
</item>
<item>
<title>Contatti</title>
<link>https://phc.dm.unipi.it/page/contact/</link>
<pubDate>Fri, 03 Apr 2015 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/page/contact/</guid>
<description>Contatti Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.</description>
</item>
<item>
<title>My awesome project</title>
<link>https://phc.dm.unipi.it/project/my-awesome-project/</link>
<pubDate>Tue, 18 Nov 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/project/my-awesome-project/</guid>
<description>About project Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.</description>
</item>
<item>
<title>Creating a New Theme</title>
<link>https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/</link>
<pubDate>Sun, 28 Sep 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/</guid>
<description>Introduction 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.
We&amp;rsquo;ll start with creating a new site with a very basic template.</description>
</item>
<item>
<title>(Hu)go Template Primer</title>
<link>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</guid>
<description>Hugo uses the excellent go html/template 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.
This document is a brief primer on using go templates.</description>
</item>
<item>
<title>Migrating from Jekyll</title>
<link>https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/</guid>
<description>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
&amp;lt;root&amp;gt;/ ▾ images/ logo.png should become
&amp;lt;root&amp;gt;/ ▾ static/ ▾ images/ logo.png Additionally, you&amp;rsquo;ll want any files that should reside at the root (such as CNAME) to be moved to static.</description>
</item>
<item>
<title>Getting Started with Hugo</title>
<link>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</guid>
<description>Step 1. Install Hugo Goto 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 installing 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:</description>
</item>
</channel>
</rss>

File diff suppressed because one or more lines are too long

@ -0,0 +1,83 @@
/*global jQuery */
/*jshint browser:true */
/*!
* FitVids 1.1
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
*/
(function( $ ){
"use strict";
$.fn.fitVids = function( options ) {
var settings = {
customSelector: null,
ignore: null
};
if(!document.getElementById('fit-vids-style')) {
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
var head = document.head || document.getElementsByTagName('head')[0];
var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
var div = document.createElement('div');
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
head.appendChild(div.childNodes[1]);
}
if ( options ) {
$.extend( settings, options );
}
return this.each(function(){
var selectors = [
"iframe[src*='player.vimeo.com']",
"iframe[src*='youtube.com']",
"iframe[src*='youtube-nocookie.com']",
"iframe[src*='kickstarter.com'][src*='video.html']",
"object",
"embed"
];
if (settings.customSelector) {
selectors.push(settings.customSelector);
}
var ignoreList = '.fitvidsignore';
if(settings.ignore) {
ignoreList = ignoreList + ', ' + settings.ignore;
}
var $allVideos = $(this).find(selectors.join(','));
$allVideos = $allVideos.not("object object"); // SwfObj conflict patch
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
$allVideos.each(function(){
var $this = $(this);
if($this.parents(ignoreList).length > 0) {
return; // Disable FitVids on this video.
}
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
{
$this.attr('height', 9);
$this.attr('width', 16);
}
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
aspectRatio = height / width;
if(!$this.attr('id')){
var videoID = 'fitvid' + Math.floor(Math.random()*999999);
$this.attr('id', videoID);
}
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
$this.removeAttr('height').removeAttr('width');
});
});
};
// Works with either jQuery or Zepto
})( window.jQuery || window.Zepto );

@ -0,0 +1,18 @@
jQuery(function ($) {
/* ============================================================ */
/* Responsive Videos */
/* ============================================================ */
$(".post-content").fitVids();
/* ============================================================ */
/* Scroll To Top */
/* ============================================================ */
$('.js-jump-top').on('click', function (e) {
e.preventDefault();
$('html, body').animate({ 'scrollTop': 0 });
});
});

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/</title><link rel="canonical" href="https://phc.dm.unipi.it/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/" /></head></html>

@ -0,0 +1,131 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>About &middot; My Name</title>
<meta name="description" content="Cos&#39;è il PHC?">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="About">
<meta property="og:description" content="Cos&#39;è il PHC?">
<meta property="og:type" content="article">
<meta property="og:url" content="https://phc.dm.unipi.it/page/about/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<article class="post-container">
<header class="post-header">
<h1 class="post-title">About</h1>
<p class="post-description">Cos&#39;è il PHC?</p>
</header>
<div class="post-content clearfix">
<h2 id="about">About</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec dolor in magna lobortis egestas. Suspendisse eu erat tempor, tristique neque eu, convallis nulla. Curabitur vel bibendum lacus, at semper mauris. Suspendisse aliquet commodo ex, sed sagittis metus aliquam id. Maecenas feugiat rutrum lorem vel imperdiet. Nullam ornare lectus ut enim finibus, et porttitor mi tincidunt. Aenean lacinia, leo quis vehicula eleifend, quam libero sagittis erat, at euismod augue mauris et sapien. Sed id vehicula lectus, sit amet auctor ipsum. Nunc sed massa vel ex condimentum aliquam in a enim. Cras enim sem, tristique eu enim ac, congue commodo mi. Integer quis orci at dolor blandit eleifend.</p>
<h2 id="school">School</h2>
<p>Sed quis pulvinar nisi, sed dapibus lacus. Mauris tempus ex ut ipsum facilisis interdum. Integer feugiat urna sed feugiat tempor. Quisque dictum vestibulum feugiat. Nunc nec est volutpat lorem imperdiet egestas sit amet ut orci. Aliquam venenatis neque ipsum, a placerat lectus cursus at. Donec pellentesque tellus hendrerit faucibus posuere. Etiam gravida consequat lectus, volutpat consectetur velit convallis nec. Praesent sagittis luctus dignissim.</p>
</div>
</article>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,130 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Contatti &middot; My Name</title>
<meta name="description" content="Come contattarci.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Contatti">
<meta property="og:description" content="Come contattarci.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://phc.dm.unipi.it/page/contact/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<article class="post-container">
<header class="post-header">
<h1 class="post-title">Contatti</h1>
<p class="post-description">Come contattarci.</p>
</header>
<div class="post-content clearfix">
<h2 id="contatti">Contatti</h2>
<p>Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.</p>
<p><a href="mailto:macchinisti@poisson.phc.dm.unipi.it">macchinisti@poisson.phc.dm.unipi.it</a></p>
</div>
</article>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,153 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Pages &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Pages">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/page/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/page/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/page/about/">
<h4 class="post-stub-title">About</h4>
<p class="post-stub-description">Cos&#39;è il PHC?</p>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/page/contact/">
<h4 class="post-stub-title">Contatti</h4>
<p class="post-stub-description">Come contattarci.</p>
</a>
</li>
</ol>
<div class="post-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Pages on Blog del PHC</title>
<link>https://phc.dm.unipi.it/page/</link>
<description>Recent content in Pages on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Fri, 03 Apr 2015 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/page/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>About</title>
<link>https://phc.dm.unipi.it/page/about/</link>
<pubDate>Fri, 03 Apr 2015 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/page/about/</guid>
<description>About Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec dolor in magna lobortis egestas. Suspendisse eu erat tempor, tristique neque eu, convallis nulla. Curabitur vel bibendum lacus, at semper mauris. Suspendisse aliquet commodo ex, sed sagittis metus aliquam id. Maecenas feugiat rutrum lorem vel imperdiet. Nullam ornare lectus ut enim finibus, et porttitor mi tincidunt. Aenean lacinia, leo quis vehicula eleifend, quam libero sagittis erat, at euismod augue mauris et sapien.</description>
</item>
<item>
<title>Contatti</title>
<link>https://phc.dm.unipi.it/page/contact/</link>
<pubDate>Fri, 03 Apr 2015 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/page/contact/</guid>
<description>Contatti Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/page/</title><link rel="canonical" href="https://phc.dm.unipi.it/page/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/page/" /></head></html>

@ -0,0 +1,206 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Posts &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Posts">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/post/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/post/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list">
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">Migrating from Jekyll</h4>
<div class="post-stub-description">
Migrating from Jekyll description.
</div>
<time class="post-stub-date" datetime="2014-04-02">
Published Wed, Apr 2, 2014
</time>
<span class="post-stub-tag">Featured</span>
</a>
</li>
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">Creating a New Theme</h4>
<div class="post-stub-description">
Description of my awesome project.
</div>
<time class="post-stub-date" datetime="2014-09-28">
Published Sun, Sep 28, 2014
</time>
</a>
</li>
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/04/02/goisforlovers/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">(Hu)go Template Primer</h4>
<div class="post-stub-description">
(Hu)go Template Primer description.
</div>
<time class="post-stub-date" datetime="2014-04-02">
Published Wed, Apr 2, 2014
</time>
</a>
</li>
<li class="post-stub" itemprop="blogPost" itemscope="" itemtype="https://schema.org/BlogPosting">
<a href="https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/" itemprop="url" title="Go to post detail">
<h4 class="post-stub-title" itemprop="name">Getting Started with Hugo</h4>
<div class="post-stub-description">
</div>
<time class="post-stub-date" datetime="2014-04-02">
Published Wed, Apr 2, 2014
</time>
</a>
</li>
</ol>
<div class="post-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,61 @@
<?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 Blog del PHC</title>
<link>https://phc.dm.unipi.it/post/</link>
<description>Recent content in Posts on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Sun, 28 Sep 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/post/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Creating a New Theme</title>
<link>https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/</link>
<pubDate>Sun, 28 Sep 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/</guid>
<description>Introduction 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.
We&amp;rsquo;ll start with creating a new site with a very basic template.</description>
</item>
<item>
<title>(Hu)go Template Primer</title>
<link>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</guid>
<description>Hugo uses the excellent go html/template 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.
This document is a brief primer on using go templates.</description>
</item>
<item>
<title>Migrating from Jekyll</title>
<link>https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/</guid>
<description>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
&amp;lt;root&amp;gt;/ ▾ images/ logo.png should become
&amp;lt;root&amp;gt;/ ▾ static/ ▾ images/ logo.png Additionally, you&amp;rsquo;ll want any files that should reside at the root (such as CNAME) to be moved to static.</description>
</item>
<item>
<title>Getting Started with Hugo</title>
<link>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</guid>
<description>Step 1. Install Hugo Goto 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 installing 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:</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/post/</title><link rel="canonical" href="https://phc.dm.unipi.it/post/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/post/" /></head></html>

@ -0,0 +1,142 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Projects &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Projects">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/project/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/project/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/project/my-awesome-project/">
<h4 class="post-stub-title">My awesome project</h4>
<p class="post-stub-description">Description of my awesome project.</p>
</a>
</li>
</ol>
<div class="post-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Projects on Blog del PHC</title>
<link>https://phc.dm.unipi.it/project/</link>
<description>Recent content in Projects on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Tue, 18 Nov 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/project/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>My awesome project</title>
<link>https://phc.dm.unipi.it/project/my-awesome-project/</link>
<pubDate>Tue, 18 Nov 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/project/my-awesome-project/</guid>
<description>About project Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.</description>
</item>
</channel>
</rss>

@ -0,0 +1,164 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My awesome project &middot; My Name</title>
<meta name="description" content="Description of my awesome project.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="My awesome project">
<meta property="og:description" content="Description of my awesome project.">
<meta property="og:type" content="article">
<meta property="og:url" content="https://phc.dm.unipi.it/project/my-awesome-project/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div class="container">
<article class="post-container">
<header class="post-header">
<h1 class="post-title">My awesome project</h1>
<p class="post-description">Description of my awesome project.</p>
</header>
<div class="post-content clearfix">
<h2 id="about-project">About project</h2>
<p>Aenean ipsum justo, semper eu nisl ut, pretium tincidunt sem. Praesent et diam sit amet lacus lobortis dictum a id lacus. Quisque hendrerit sit amet turpis eu varius. Ut id lorem ac felis ultrices tincidunt. Pellentesque consequat arcu ac fringilla imperdiet. Phasellus pellentesque, sapien non pulvinar blandit, sapien ante aliquet felis, vel porttitor sapien ante in lacus. Fusce non urna aliquet, malesuada nibh vel, luctus urna. Phasellus ut lacus molestie, varius purus quis, malesuada lorem.</p>
<h2 id="install">Install</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">go get -u -v github.com/spf13/hugo
</code></pre></div><h2 id="docs">Docs</h2>
<p><a href="https://godoc.org/github.com/spf13/hugo">https://godoc.org/github.com/spf13/hugo</a></p>
</div>
<footer class="post-footer clearfix">
<div class="share">
<a class="icon-twitter" href="https://twitter.com/share?text=My%20awesome%20project&url=https%3a%2f%2fphc.dm.unipi.it%2fproject%2fmy-awesome-project%2f"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fa fa-twitter"></i>
<span class="hidden">Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u=https%3a%2f%2fphc.dm.unipi.it%2fproject%2fmy-awesome-project%2f"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="fa fa-facebook"></i>
<span class="hidden">Facebook</span>
</a>
<a class="icon-google-plus" href="https://plus.google.com/share?url=https%3a%2f%2fphc.dm.unipi.it%2fproject%2fmy-awesome-project%2f"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="fa fa-google-plus"></i>
<span class="hidden">Google+</span>
</a>
</div>
</footer>
</article>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/project/</title><link rel="canonical" href="https://phc.dm.unipi.it/project/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/project/" /></head></html>

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://phc.dm.unipi.it/page/about/</loc>
<lastmod>2015-04-03T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/</loc>
<lastmod>2015-04-03T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/page/contact/</loc>
<lastmod>2015-04-03T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/page/</loc>
<lastmod>2015-04-03T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/project/my-awesome-project/</loc>
<lastmod>2014-11-18T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/project/</loc>
<lastmod>2014-11-18T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/2014/09/28/creating-a-new-theme/</loc>
<lastmod>2014-09-28T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/post/</loc>
<lastmod>2014-09-28T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/tags/development/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/tags/go/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/tags/golang/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/2014/04/02/migrate-from-jekyll/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/tags/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/tags/templates/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/tags/themes/</loc>
<lastmod>2014-04-02T02:13:50+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</loc>
<lastmod>2014-04-02T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://phc.dm.unipi.it/tags/hugo/</loc>
<lastmod>2014-04-02T00:00:00+00:00</lastmod>
</url>
</urlset>

@ -0,0 +1,2 @@
@import "~normalize.css/normalize.css";
@import "style.scss";

@ -0,0 +1,791 @@
// Colours //
// ============================================================ //
// ============================================================ //
$primary: #F03838;
$secondary: #303030;
$background: #FEFEFE;
/* ============================================================ */
/* Base */
/* ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Share:wght@700&family=Ubuntu+Mono&family=Ubuntu:wght@300;700&display=swap');
html, body { height: 100%; }
body {
background: $background;
color: #424242;
font-family: "Ubuntu", sans-serif;
font-weight: 300;
font-size: 18px;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Share', cursive;
font-weight: 700;
margin-bottom: 20px;
text-transform: none;
}
h1 { font-size: 26px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; margin-bottom: 20px; }
h4 { font-size: 18px; margin-bottom: 18px; }
h5 { font-size: 16px; margin-bottom: 15px; }
h6 { font-size: 14px; margin-bottom: 12px; }
p {
line-height: 1.8;
margin: 0 0 30px;
}
a {
color: $primary;
text-decoration: none;
}
ul, ol {
line-height: 1.4;
margin: 0 0 20px;
ul, ol { margin: 10px 0 0 20px; }
li {
margin: 0 0 2px;
&:last-of-type { margin-bottom: 0; }
}
}
blockquote {
border-left: 1px dotted $primary;
margin: 40px 0;
padding: 5px 30px;
p {
color: #AEADAD;
display: block;
font-style: italic;
margin: 0;
width: 100%;
}
}
img {
display: block;
margin: 40px 0;
width: auto;
max-width: 100%;
&[src$="align-center"] {
margin: auto;
}
&[src$="align-left"] {
float: left;
margin-right: 40px;
}
&[src$="align-right"] {
float: right;
margin-left: 40px;
}
}
pre {
border: 1px solid #DDDBCC;
border-radius: 3px;
margin: 0 0 20px;
overflow-x: auto;
padding: 10px;
font-size: 17px;
code {
padding: 0;
background: none;
}
background-color: #f1f0ea;
}
code {
padding: 2px 4px;
font-size: 95%;
border-radius: 4px;
background-color: #f1f0ea;
font-family: 'Ubuntu mono', monospace;
}
hr {
border: none;
border-bottom: 1px dotted #303030;
margin: 45px 0;
}
table {
margin-bottom:40px;
width: 100%;
tbody > tr:nth-child(odd) > td,
tbody > tr:nth-child(odd) > th {
background-color: #f7f7f3;
}
th {
padding: 0 10px 10px;
text-align: left;
}
td { padding: 10px; }
tr { border-bottom: 1px dotted #AEADAD; }
}
::selection {
background: #FFF5B8;
color: #000;
display: block;
}
::-moz-selection {
background: #FFF5B8;
color: #000;
display: block;
}
.fluid-width-video-wrapper { margin-bottom: 40px; }
.hidden {
text-indent: -9999px;
visibility: hidden;
display: none;
}
.clearfix {
&:after{
content: "";
display: table;
clear: both;
}
}
/* ============================================================ */
/* General Appearance */
/* ============================================================ */
.container {
margin: 0 auto;
position: relative;
width: 100%;
max-width: 889px;
}
#wrapper {
height: auto;
min-height: 100%;
/* This must be the same as the height of the footer */
margin-bottom: -265px;
&:after {
content: "";
display: block;
/* This must be the same as the height of the footer */
height: 265px;
}
}
.button {
background: $secondary;
border: none;
border-radius: 3px;
color: #FEFEFE;
font-size: 14px;
font-weight: 700;
padding: 10px 12px;
text-transform: uppercase;
&:hover { background: $primary; }
}
.button-square {
background: $primary;
color: #FFF;
float: left;
font-size: 17px;
margin: 0 0 0 10px;
padding: 3px 8px 4px;
&:hover { background: $secondary; }
}
.error {
text-align: center;
}
.comments {
margin-top: 10px;
}
/* ============================================================ */
/* Site Header */
/* ============================================================ */
.site-header {
padding: 40px 0 0;
overflow: auto;
text-align: center;
text-transform: uppercase;
}
.site-title-wrapper {
display: table;
margin: 0 auto;
}
.site-title {
float: left;
font-size: 14px;
font-weight: 600;
margin: 0;
text-transform: uppercase;
a {
float: left;
background: $primary;
color: #FEFEFE;
padding: 5px 10px 6px;
&:hover { background: $secondary; }
}
}
.site-logo {
display: block;
img { margin: 0; }
}
.site-nav {
list-style: none;
margin: 28px 0 10px;
padding: 0;
}
.site-nav-item {
display: inline-block;
font-size: 17px;
font-weight: 700;
margin: 0 10px;
a:hover { color: #424242; }
}
/* ============================================================ */
/* Post */
/* ============================================================ */
#latest-post { display: none; }
.post-container { margin: 0 40px; }
.post-header {
border-bottom: 6px solid $secondary;
margin: 0 0 20px;
padding: 0 0 20px;
text-align: center;
// text-transform: uppercase;
}
.post-title,
.page-title {
font-size: 52px;
font-weight: 700;
margin: 15px 0;
text-align: center;
}
.post-subtitle {
font-size: 32px;
font-weight: 700;
margin: 15px 0;
text-align: center;
}
.page-title { margin: 15px 40px; }
.post-date,
.post-reading,
.blog-description {
color: #AEADAD;
font-size: 14px;
font-weight: 600;
line-height: 1;
margin: 25px 0 0;
a { color: #AEADAD; }
a:hover { color: $primary; }
}
.post-line {
&:after {
border-bottom: 1px dotted $secondary;
content: "";
display: block;
margin: 40px auto 0;
width: 100px;
}
}
.post-content {
a:hover {
border-bottom: 1px dotted $primary;
padding: 0 0 2px;
}
&:last-child { margin-bottom: 0; }
.footnote {
border-spacing: 0;
margin-bottom: 0;
.label + td {
width: 100%;
}
}
.gist {
tr {
border-bottom: 0;
}
}
}
.post-footer { margin-top: 5px; }
.post-tags,
.share {
color: #AEADAD;
font-size: 14px;
span { font-weight: 600; }
}
.post-tags {
float: left;
margin: 3px 0 0;
a:hover { color: $secondary; }
}
.share {
float: right;
a {
background: $primary;
color: #FFF;
display: inline-block;
font-size: 16px;
margin-left: 5px;
padding: 5px 0 4px;
width: 30px;
text-align: center;
}
a:hover { background: $secondary; }
}
.post-navigation {
display: table;
margin: 70px auto 100px;
}
.newer-posts,
.older-posts {
float: left;
background: $primary;
color: #FEFEFE;
font-size: 14px;
font-weight: 600;
margin: 0 5px;
padding: 5px 10px 6px;
// text-transform: uppercase;
&:hover {
background: $secondary;
}
}
.page-number { display: none; }
/* ============================================================ */
/* Post Index */
/* ============================================================ */
.post-list {
list-style: none;
padding: 0;
}
.post-stub {
border-bottom: 1px dotted $secondary;
margin: 0;
position: relative;
&:first-child { padding-top: 0; }
a {
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
display: block;
color: #424242;
padding: 20px 5px;
&:hover {
background: #FCF5F5;
color: $primary;
padding: 20px 12px;
.post-stub-tag { background: $primary; }
}
}
}
.post-stub-tag {
background: $secondary;
border-radius: 3px;
color: #FFF;
float: right;
font-size: 10px;
margin: 7px 0 0;
padding: 0 5px;
text-transform: uppercase;
}
.post-stub-title {
display: block;
margin: 0;
text-transform: none;
font-size: 18px;
}
.post-stub-description {
display: block;
margin: 0;
font-size: 16px;
text-transform: none;
}
.post-stub-date {
display: block;
font-size: 13px;
color: #666;
}
.next-posts-link a,
.previous-posts-link a {
display: block;
padding: 8px 11px;
}
/* ============================================================ */
/* Author */
/* ============================================================ */
.author-profile {
margin: 0 40px;
&:after {
border-bottom: 1px dotted $secondary;
content: "";
display: block;
margin: 40px auto 0;
width: 100px;
}
}
.author-heading {
margin: 15px auto;
text-align: center;
width: 100%;
}
.author-avatar {
border-radius: 50px;
display: inline;
height: 50px;
margin: 5px 10px 0 0;
width: 50px;
vertical-align: middle;
}
.author-name {
display: inline;
font-size: 52px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
vertical-align: middle;
}
.author-meta {
color: #AEADAD;
font-size: 14px;
font-weight: 600;
line-height: 1;
margin: 25px 0 0;
text-align: center;
text-transform: uppercase;
span {
display: inline-block;
margin: 0 10px 8px;
}
i { margin-right: 8px; }
a { color: #AEADAD; }
a:hover { color: $primary; }
}
.author-bio {
margin: 20px auto 0;
text-align: center;
max-width: 700px;
}
/* ============================================================ */
/* Footer */
/* ============================================================ */
.footer {
background: $secondary;
color: #D3D3D3;
height: 265px;
margin-top: 95px;
overflow: auto;
.site-title-wrapper { margin: 80px auto 35px; }
.site-title a:hover,
.button-square:hover {
background: #121212;
}
}
.footer-copyright {
color: #656565;
font-size: 14px;
margin: 0;
text-align: center;
text-transform: uppercase;
a {
color: #656565;
font-weight: 700;
&:hover { color: #FEFEFE; }
}
}
/* ============================================================ */
/* NProgress */
/* ============================================================ */
#nprogress .bar { background: $primary; }
#nprogress .peg { box-shadow: 0 0 10px $primary, 0 0 5px $primary; }
#nprogress .spinner-icon {
border-top-color: $primary;
border-left-color: $primary;
}
/* ============================================================ */
/* Media Queries */
/* ============================================================ */
@media only screen and (max-width: 800px) {
.post-stub-tag { display: none; }
}
@media only screen and (max-width: 600px) {
h1, h2 { margin-bottom: 20px; }
p { margin-bottom: 20px; }
ul, ol { margin-bottom: 20px; }
img { margin: 30px 0; }
blockquote { margin: 30px 0;}
pre { margin: 20px 0; }
hr { margin: 35px 0; }
.site-header {
padding-top: 40px;
}
.site-title {
float: none;
margin-bottom: 15px;
a {
float: none;
}
+ .button-square {
margin-left: 0;
}
}
.site-nav-item {
display: block;
margin: 15px 0;
}
.post-header {
margin-bottom: 20px;
padding-bottom: 20px;
p {
word-wrap: break-word;
overflow-wrap: break-word;
}
}
.post-title,
.page-title,
.author-name,
.author-heading {
font-size: 42px;
margin-top: 5px;
word-wrap: break-word;
overflow-wrap: break-word;
}
.post-date,
.blog-description,
.author-meta {
margin-top: 20px;
&:after, &:before {
margin-top: 30px;
}
}
.author-profile {
&:after, &:before {
margin-top: 20px;
}
}
.post-stub-title { display: block; }
.post-stub-date:before {
content: "";
display: block;
}
.post-list {
margin-top: 20px;
}
.post-container,
.post-list,
.author-profile {
margin-right: 25px;
margin-left: 25px;
}
.post-tags { width: 100%; }
.post-stub a,
.post-stub a:hover {
padding-top: 12px;
padding-bottom: 12px;
}
.share {
float: left;
margin-top: 20px;
a {
margin: 0 5px 0 0;
}
}
.footer {
margin-top: 50px;
.site-title-wrapper {
text-align: center;
}
.button-jump-top {
clear: both;
display: inline-block;
float: none;
}
}
}
@media only screen and (max-width: 400px) {
.site-header {
padding-top: 40px;
}
.post-title,
.page-title,
.author-name,
.author-heading {
font-size: 30px;
line-height: 1.2;
word-wrap: break-word;
overflow-wrap: break-word;
}
.post-date,
.blog-description,
.author-meta {
line-height: 1.6;
}
.post-date,
.blog-description,
.author-meta {
margin-top: 10px;
&:after, &:before {
margin-top: 20px;
}
}
.author-profile {
&:after, &:before {
margin-top: 10px;
}
}
.post-container,
.post-list,
.author-profile {
margin-right: 15px;
margin-left: 15px;
}
.author-avatar {
display: block;
margin: 0 auto 18px;
}
.author-meta span {
display: block;
margin: 18px 0;
}
.footer-copyright { padding: 0 10px; }
}

@ -0,0 +1,81 @@
// Colours //
// ============================================================ //
// ============================================================ //
$primary: #F03838;
$secondary: #303030;
$background: #f0f0f0;
$error: #e3d2d2;
/* Background */ .chroma { background-color: $background }
/* Error */ .chroma .err { color: #a61717; background-color: $error }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%; background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; color: #7f7f7f }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; color: #7f7f7f }
/* Keyword */ .chroma .k { color: #000000; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #000000; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #000000; font-weight: bold }
/* KeywordNamespace */ .chroma .kn { color: #000000; font-weight: bold }
/* KeywordPseudo */ .chroma .kp { color: #000000; font-weight: bold }
/* KeywordReserved */ .chroma .kr { color: #000000; font-weight: bold }
/* KeywordType */ .chroma .kt { color: #445588; font-weight: bold }
/* NameAttribute */ .chroma .na { color: #008080 }
/* NameBuiltin */ .chroma .nb { color: #0086b3 }
/* NameBuiltinPseudo */ .chroma .bp { color: #999999 }
/* NameClass */ .chroma .nc { color: #445588; font-weight: bold }
/* NameConstant */ .chroma .no { color: #008080 }
/* NameDecorator */ .chroma .nd { color: #1f7199; font-weight: bold }
/* NameEntity */ .chroma .ni { color: #800080 }
/* NameException */ .chroma .ne { color: #990000; font-weight: bold }
/* NameFunction */ .chroma .nf { color: #800; font-weight: bold }
/* NameLabel */ .chroma .nl { color: #990000; font-weight: bold }
/* NameNamespace */ .chroma .nn { color: #555555 }
/* NameTag */ .chroma .nt { color: #000080 }
/* NameVariable */ .chroma .nv { color: #008080 }
/* NameVariableClass */ .chroma .vc { color: #008080 }
/* NameVariableGlobal */ .chroma .vg { color: #008080 }
/* NameVariableInstance */ .chroma .vi { color: #008080 }
/* LiteralString */ .chroma .s { color: #dd1144 }
/* LiteralStringAffix */ .chroma .sa { color: #dd1144 }
/* LiteralStringBacktick */ .chroma .sb { color: #dd1144 }
/* LiteralStringChar */ .chroma .sc { color: #dd1144 }
/* LiteralStringDelimiter */ .chroma .dl { color: #dd1144 }
/* LiteralStringDoc */ .chroma .sd { color: #dd1144 }
/* LiteralStringDouble */ .chroma .s2 { color: #800 }
/* LiteralStringEscape */ .chroma .se { color: #dd1144 }
/* LiteralStringHeredoc */ .chroma .sh { color: #dd1144 }
/* LiteralStringInterpol */ .chroma .si { color: #dd1144 }
/* LiteralStringOther */ .chroma .sx { color: #dd1144 }
/* LiteralStringRegex */ .chroma .sr { color: #009926 }
/* LiteralStringSingle */ .chroma .s1 { color: #800 }
/* LiteralStringSymbol */ .chroma .ss { color: #990073 }
/* LiteralNumber */ .chroma .m { color: #009999 }
/* LiteralNumberBin */ .chroma .mb { color: #009999 }
/* LiteralNumberFloat */ .chroma .mf { color: #009999 }
/* LiteralNumberHex */ .chroma .mh { color: #009999 }
/* LiteralNumberInteger */ .chroma .mi { color: #009999 }
/* LiteralNumberIntegerLong */ .chroma .il { color: #009999 }
/* LiteralNumberOct */ .chroma .mo { color: #009999 }
/* Operator */ .chroma .o { color: #000000; font-weight: bold }
/* OperatorWord */ .chroma .ow { color: #000000; font-weight: bold }
/* Comment */ .chroma .c { color: #999988; font-style: italic }
/* CommentHashbang */ .chroma .ch { color: #999988; font-style: italic }
/* CommentMultiline */ .chroma .cm { color: #999988; font-style: italic }
/* CommentSingle */ .chroma .c1 { color: #999988; font-style: italic }
/* CommentSpecial */ .chroma .cs { color: #999999; font-weight: bold; font-style: italic }
/* CommentPreproc */ .chroma .cp { color: #999999; font-weight: bold; font-style: italic }
/* CommentPreprocFile */ .chroma .cpf { color: #999999; font-weight: bold; font-style: italic }
/* GenericDeleted */ .chroma .gd { color: #000000; background-color: #ffdddd }
/* GenericEmph */ .chroma .ge { color: #000000; font-style: italic }
/* GenericError */ .chroma .gr { color: #aa0000 }
/* GenericHeading */ .chroma .gh { color: #999999 }
/* GenericInserted */ .chroma .gi { color: #000000; background-color: #ddffdd }
/* GenericOutput */ .chroma .go { color: #888888 }
/* GenericPrompt */ .chroma .gp { color: #555555 }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #aaaaaa }
/* GenericTraceback */ .chroma .gt { color: #aa0000 }
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
/* TextWhitespace */ .chroma .w { color: #bbbbbb }

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>development &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="development">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/tags/development/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/tags/development/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list tag-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/goisforlovers/">
<h4 class="post-stub-title">(Hu)go Template Primer</h4>
<p class="post-stub-description">(Hu)go Template Primer description.</p>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/">
<h4 class="post-stub-title">Getting Started with Hugo</h4>
</a>
</li>
</ol>
<div class="post-navigation tag-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>development on Blog del PHC</title>
<link>https://phc.dm.unipi.it/tags/development/</link>
<description>Recent content in development on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Wed, 02 Apr 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/tags/development/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>(Hu)go Template Primer</title>
<link>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</guid>
<description>Hugo uses the excellent go html/template 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.
This document is a brief primer on using go templates.</description>
</item>
<item>
<title>Getting Started with Hugo</title>
<link>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</guid>
<description>Step 1. Install Hugo Goto 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 installing 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:</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/tags/development/</title><link rel="canonical" href="https://phc.dm.unipi.it/tags/development/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/tags/development/" /></head></html>

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>go &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="go">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/tags/go/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/tags/go/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list tag-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/goisforlovers/">
<h4 class="post-stub-title">(Hu)go Template Primer</h4>
<p class="post-stub-description">(Hu)go Template Primer description.</p>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/">
<h4 class="post-stub-title">Getting Started with Hugo</h4>
</a>
</li>
</ol>
<div class="post-navigation tag-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>go on Blog del PHC</title>
<link>https://phc.dm.unipi.it/tags/go/</link>
<description>Recent content in go on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Wed, 02 Apr 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/tags/go/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>(Hu)go Template Primer</title>
<link>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</guid>
<description>Hugo uses the excellent go html/template 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.
This document is a brief primer on using go templates.</description>
</item>
<item>
<title>Getting Started with Hugo</title>
<link>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</guid>
<description>Step 1. Install Hugo Goto 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 installing 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:</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/tags/go/</title><link rel="canonical" href="https://phc.dm.unipi.it/tags/go/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/tags/go/" /></head></html>

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>golang &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="golang">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/tags/golang/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/tags/golang/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list tag-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/goisforlovers/">
<h4 class="post-stub-title">(Hu)go Template Primer</h4>
<p class="post-stub-description">(Hu)go Template Primer description.</p>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/">
<h4 class="post-stub-title">Getting Started with Hugo</h4>
</a>
</li>
</ol>
<div class="post-navigation tag-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>golang on Blog del PHC</title>
<link>https://phc.dm.unipi.it/tags/golang/</link>
<description>Recent content in golang on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Wed, 02 Apr 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/tags/golang/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>(Hu)go Template Primer</title>
<link>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</guid>
<description>Hugo uses the excellent go html/template 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.
This document is a brief primer on using go templates.</description>
</item>
<item>
<title>Getting Started with Hugo</title>
<link>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</guid>
<description>Step 1. Install Hugo Goto 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 installing 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:</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/tags/golang/</title><link rel="canonical" href="https://phc.dm.unipi.it/tags/golang/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/tags/golang/" /></head></html>

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>hugo &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="hugo">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/tags/hugo/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/tags/hugo/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list tag-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/">
<h4 class="post-stub-title">Getting Started with Hugo</h4>
</a>
</li>
</ol>
<div class="post-navigation tag-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>hugo on Blog del PHC</title>
<link>https://phc.dm.unipi.it/tags/hugo/</link>
<description>Recent content in hugo on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Wed, 02 Apr 2014 00:00:00 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/tags/hugo/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Getting Started with Hugo</title>
<link>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/hugoisforlovers/</guid>
<description>Step 1. Install Hugo Goto 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 installing 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:</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/tags/hugo/</title><link rel="canonical" href="https://phc.dm.unipi.it/tags/hugo/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/tags/hugo/" /></head></html>

@ -0,0 +1,185 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Tags &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Tags">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/tags/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/tags/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list tag-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/tags/development/">
<h4 class="post-stub-title">development</h4>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/tags/go/">
<h4 class="post-stub-title">go</h4>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/tags/golang/">
<h4 class="post-stub-title">golang</h4>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/tags/templates/">
<h4 class="post-stub-title">templates</h4>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/tags/themes/">
<h4 class="post-stub-title">themes</h4>
</a>
</li>
<li class="post-stub">
<a href="https://phc.dm.unipi.it/tags/hugo/">
<h4 class="post-stub-title">hugo</h4>
</a>
</li>
</ol>
<div class="post-navigation tag-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tags on Blog del PHC</title>
<link>https://phc.dm.unipi.it/tags/</link>
<description>Recent content in Tags on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Wed, 02 Apr 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/tags/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>development</title>
<link>https://phc.dm.unipi.it/tags/development/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/tags/development/</guid>
<description></description>
</item>
<item>
<title>go</title>
<link>https://phc.dm.unipi.it/tags/go/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/tags/go/</guid>
<description></description>
</item>
<item>
<title>golang</title>
<link>https://phc.dm.unipi.it/tags/golang/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/tags/golang/</guid>
<description></description>
</item>
<item>
<title>templates</title>
<link>https://phc.dm.unipi.it/tags/templates/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/tags/templates/</guid>
<description></description>
</item>
<item>
<title>themes</title>
<link>https://phc.dm.unipi.it/tags/themes/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/tags/themes/</guid>
<description></description>
</item>
<item>
<title>hugo</title>
<link>https://phc.dm.unipi.it/tags/hugo/</link>
<pubDate>Wed, 02 Apr 2014 00:00:00 +0000</pubDate>
<guid>https://phc.dm.unipi.it/tags/hugo/</guid>
<description></description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/tags/</title><link rel="canonical" href="https://phc.dm.unipi.it/tags/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/tags/" /></head></html>

@ -0,0 +1,142 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>templates &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="templates">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/tags/templates/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/tags/templates/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list tag-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/goisforlovers/">
<h4 class="post-stub-title">(Hu)go Template Primer</h4>
<p class="post-stub-description">(Hu)go Template Primer description.</p>
</a>
</li>
</ol>
<div class="post-navigation tag-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>templates on Blog del PHC</title>
<link>https://phc.dm.unipi.it/tags/templates/</link>
<description>Recent content in templates on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Wed, 02 Apr 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/tags/templates/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>(Hu)go Template Primer</title>
<link>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</guid>
<description>Hugo uses the excellent go html/template 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.
This document is a brief primer on using go templates.</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/tags/templates/</title><link rel="canonical" href="https://phc.dm.unipi.it/tags/templates/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/tags/templates/" /></head></html>

@ -0,0 +1,142 @@
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>themes &middot; My Name</title>
<meta name="description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="generator" content="Hugo 0.71.1" />
<meta name="robots" content="index,follow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="themes">
<meta property="og:description" content="Qui postiamo notizie importanti, progetti e qualche guida.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://phc.dm.unipi.it/tags/themes/">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/site.css">
<link rel="stylesheet" href="https://phc.dm.unipi.it/dist/syntax.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin,cyrillic-ext,latin-ext,cyrillic">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="/tags/themes/index.xml" rel="alternate" type="application/rss+xml">
</head>
<body>
<div id="wrapper">
<header class="site-header">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square" href="https://phc.dm.unipi.it/index.xml"><i class="fa fa-rss"></i></a>
<a class="button-square button-social hint--top" data-hint="Github" title="Github" href="https://github.com/PHC-DM" rel="me">
<i class="fa fa-github-alt"></i>
</a>
<a class="button-square button-social hint--top" data-hint="Email" title="Email" href="mailto:macchinisti@poisson.phc.dm.unipi.it">
<i class="fa fa-envelope"></i>
</a>
</div>
<ul class="site-nav">
<li class="site-nav-item">
<a title="News" href="/">News</a>
</li>
<li class="site-nav-item">
<a title="Progetti" href="/project/">Progetti</a>
</li>
<li class="site-nav-item">
<a title="Contattaci" href="/page/contact/">Contattaci</a>
</li>
<li class="site-nav-item">
<a title="About" href="/page/about/">About</a>
</li>
</ul>
</div>
</header>
<div id="container">
<div id="post-index" class="container">
<header class="post-header">
<h1 class="post-title" itemprop="name">Blog del PHC</h1>
<p>Qui postiamo notizie importanti, progetti e qualche guida.</p>
</header>
<ol class="post-list tag-list">
<li class="post-stub">
<a href="https://phc.dm.unipi.it/2014/04/02/goisforlovers/">
<h4 class="post-stub-title">(Hu)go Template Primer</h4>
<p class="post-stub-description">(Hu)go Template Primer description.</p>
</a>
</li>
</ol>
<div class="post-navigation tag-navigation">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<div class="site-title-wrapper">
<h1 class="site-title">
<a title="Blog del PHC" href="https://phc.dm.unipi.it/">Blog del PHC</a>
</h1>
<a class="button-square button-jump-top js-jump-top" href="#">
<i class="fa fa-angle-up"></i>
</a>
</div>
<p class="footer-copyright">
<span>&copy; 2015 / Powered by <a href="https://gohugo.io/">Hugo</a></span>
</p>
<p class="footer-copyright">
<span><a href="https://github.com/roryg/ghostwriter">Ghostwriter theme</a> By <a href="http://jollygoodthemes.com">JollyGoodThemes</a></span>
<span>/ <a href="https://github.com/jbub/ghostwriter">Ported</a> to Hugo By <a href="https://github.com/jbub">jbub</a></span>
</p>
</div>
</footer>
<script src="https://phc.dm.unipi.it/js/jquery-1.11.3.min.js"></script>
<script src="https://phc.dm.unipi.it/js/jquery.fitvids.js"></script>
<script src="https://phc.dm.unipi.it/js/scripts.js"></script>
</body>
</html>

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>themes on Blog del PHC</title>
<link>https://phc.dm.unipi.it/tags/themes/</link>
<description>Recent content in themes on Blog del PHC</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<copyright>PHC</copyright>
<lastBuildDate>Wed, 02 Apr 2014 02:13:50 +0000</lastBuildDate>
<atom:link href="https://phc.dm.unipi.it/tags/themes/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>(Hu)go Template Primer</title>
<link>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</link>
<pubDate>Wed, 02 Apr 2014 02:13:50 +0000</pubDate>
<guid>https://phc.dm.unipi.it/2014/04/02/goisforlovers/</guid>
<description>Hugo uses the excellent go html/template 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.
This document is a brief primer on using go templates.</description>
</item>
</channel>
</rss>

@ -0,0 +1 @@
<!DOCTYPE html><html><head><title>https://phc.dm.unipi.it/tags/themes/</title><link rel="canonical" href="https://phc.dm.unipi.it/tags/themes/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://phc.dm.unipi.it/tags/themes/" /></head></html>

@ -0,0 +1 @@
Subproject commit 60f7b479da6a78e96e52da1f29cc2d8ff5e3649b
Loading…
Cancel
Save