www.idziorek.net | blog | contact
April 2018

estático - static website generator

A few weeks ago I decided to switch my website from a well known PHP driven CMS solution, to a light and static set of HTML pages.

And so I wrote … a simple static website generator in Haskell. Of course I know that there are plenty of these out there, still I wanted my very own masturbatory solution.

I use pandoc et al. for most of the work anyway.

Features

Try It

You can find the most recent version following the links below. Build it with stack or use the docker images.

Pandoc Themes

Here I put together the themes available for syntax-highlighting, extracted from pandoc: ./pandoc_colors

Example Website

This very website https://www.idziorek.net is a real-world example making use of estático. You can find the source code here:

Example Usage (Docker)

NOTE: make sure DIR_OUT exists and is a free directory

You can use the example websites inside the examples/ directory for a start.

Inside the input directory (e.g. ./examples/example01/) run something along this lines:

DIR_IN=`pwd`
DIR_OUT=/mnt/yourwebsiteroot
HTML_ROOT=https://www.example.com
SUDO=sudo
IMAGE=migueldirty/estatico
${SUDO} docker run --rm -v${DIR_IN}:/in:ro -v${DIR_OUT}:/out:rw ${IMAGE} /in /out ${HTML_ROOT}

Or if you want to test it locally use some local DIR_OUT and HTML_ROOT instead:

DIR_OUT=/home/miguel/testpage
HTML_ROOT=/home/miguel/testpage