I made an Elm-to-HTML static site generator. Still very early stage and experimental but I’ve been using it for my site for a while, and I’m pretty excited about it because I enjoy being able to use style-elements
and elm-css
instead of plain HTML/CSS (especially CSS!).
It has these features:
- Pages generated from Elm code, possibly arranged in some kind of a hierarchy (you can use
style-elements
,html
or any other package that generatesHtml msg
values) - CSS generated from
elm-css
stylesheets in Elm code (but you can use plain old stylesheets if you like) - Any page can be designated to be the index page
- Page templates for posts and lists of posts (fully customisable)
- Posts are written in Markdown
- Posts can have multiple tags
- A page with a list of posts is generated for each tag
- RSS is generated for the posts
- Code highlighting via Highlight.js (but you can set up whatever you want)
In terms of implementation, it’s JavaScript packed into an NPM package (npm i -g elmstatic
) that relies on elm-static-html-lib
to generate both HTML and a global CSS stylesheet.
I hope there are a few people out there who might also want to use Elm for their site or blog! In any case, I’d appreciate any feedback.
There are a lot more details in this post: https://korban.net/posts/elm/2018-05-03-introducing-elmstatic-elm-static-site-generator/
The source is here: https://github.com/SupremumLimit/elmstatic