Elmstatic

an Elm-to-HTML static site generator page npm

Elmstatic allows you to write the HTML layouts and the styles for the pages of your site in Elm. It’s fairly unopinionated: you can generate whatever HTML you want, however you want — all you need to do is define a suitable main function in each layout.

# Application Frame

//wiki.ralfbarkow.ch/assets/pages/elmstatic/_site/index.html

# Assets

pages/elmstatic/_site

See the "How to use it" section on page

Success! Compiled 7 modules. Tag ─────┬──> elm.js Page ────┤ Post ────┤ Posts ───┘

pages/elmstatic/

Note: We use the Markdown scaffold. See the "How things are organised" section on page

# Features

A summary of current features:

Pages are generated from Elm code (you can use elm-ui, html or any other package that generates Html msg values)

CSS is generated from elm-css stylesheets in Elm code (but you can use plain old stylesheets if you like)

Fully customisable layouts for posts and lists of posts

Optional subsections with their own posts (eg /postgres and /elm on this site)

Posts can be written in Markdown or elm-markup (but you can actually treat content as any format if you like)

Posts can have multiple tags

Future-dated posts are considered to be drafts and excluded from the build by default (or included with a flag)

A page with a list of posts is generated for each tag

RSS is generated for the posts, including a feed with all posts and a feed per subsection

Code blocks have syntax highlighting via Highlight.js (but you can set up something else)

Watch mode where Elmstatic watches for file changes and rebuilds the site (live reload can be achieved by combining with browser-sync).