summaryrefslogtreecommitdiff
path: root/00_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md
blob: 8c1c2f92a5a70c4bccdd728ee067960c3d6bc7fc (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
    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 heavy work anyway.

## Features

* **No** Database
* Generate HTML from **Markdown** with **pandoc**
* **Highlight** source-code with **pandoc**
* Embed data **fetched** from the web with **http-conduit**
* Embed **screen-casts** with **asciinema**
* Embed Latex formulas with **MathJx**
* Scale Images with **ImageMagick**
* Generate MP4 from OGG **Videos** with **ffmpeg**

## Try It
You can find the most recent version here. Build it with _stack build_. 
Install it with _stack install_.

* <https://gitweb.softwarefools.com/?p=miguel/estatico.git>

## Pandoc Themes

Here I put together the themes available for syntax-highlighting, extracted 
from **pandoc**: [./pandoc\_colors](./pandoc_colors)

## Example Website 

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

* <https://gitweb.softwarefools.com/?p=miguel/idziorek_net.git>

## Example Usage

Just have a look at the example websites inside the _examples_ directory for a start.\
You can build it with:

    $ estatico-exe ./examples/example01 /tmp/www.example01.com www.example01.com

This will build the static website in _\/tmp\/www.example01.com_ (directory must exist),
assuming _www.example01.com_ as the base url.

And then simply sync it to your server:

    $ rsync -r -u -v /tmp/www.example01.net/* your-server:/var/www/www.example01.net/