summaryrefslogtreecommitdiff
path: root/content/blog/statig-gen-hugo.md
blob: 2da70441fb7bb96f04ebcac6d154d74febae7111 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
+++
date = "2017-02-12T16:03:44+01:00"
description = "Static HTML generators"
title = "Website done with StaticGen Hugo"
categories = [ "Web", "HTML", "Go", "Hugo" ]
thumbnail = "/images/blog/statig-gen-hugo/statig-gen-hugo.png"
+++

Some years ago I decided to write my personal web page as a bunch of
static HTML pages using only server-side includes to cope with the
repetitive elements like footer, header, menus. When I installed a
Wordpress just for the blog I intended to start, I thought: why can't
this be done statically too?

In fact, it can be done: the following web pages show an explosion 
of tools for static HTML site generation:

 * http://www.staticgen.com
 * https://staticsitegenerators.net

I decided to go with [Hugo](https://gohugo.io/). The model is quite
simple if you get your head around it. It has live reloading in the
browser when you save the Markdown (or actually any file) in the text
editor. It's written in Go, so I don't have to worry about 10'000
Ruby, Javascript, Perl, Python packages getting installed and breaking
all the time. Go packs everything into a static binary and is blazingly
fast. The idea with sections and types which can be templated, it is
powerful enough to produce a site like mine. Even having an alternative
theme for certain sections (like the slides) is easy to do.

I also replaced the old theme, which was not looking pretty on mobile
devices with a standard Wordpress theme,
[mh-magazine-lite](http://wordpress.org/themes/mh-magazine-lite/).

Find the source code of the whole page in my local git at
http://git.andreasbaumann.cc/cgit/www-andreasbaumann-cc.