Henry is a simple static site generator written in Elixir. The name Henry refers to a certain famous doctor who may or may not have some association with static site generation.
Henry is very much a work in progress
Henry was mostly made to help me learn Elixir and as motivation to rebuild my personal site. If you are already an Elixir developer, building stuff using mix
tasks is pretty nice. Otherwise maybe you just feel like being a hipster and eschewing the popular static site generators. If looking for a mature solution to build stuff for your job, maybe check out https://www.staticgen.com/ first :)
- page parsing / rendering
- multiple layouts
- copying assets from the specified theme or the root assets folder
- local themes
- post parsing /rendering
- 'henry post' / 'henry page' to generate files
- 'henry layout' to generate a basic layout
- 'henry new' to generate an empty project
- also works as mix tasks
- sort posts by date
- RSS feed generation
- support images for posts
- build frontend assets
- better testing strategy
- add a solid default theme
- Release on hex
- 'henry watch' to rebuild on file change and run a dev server
- actual good SEO
- partials
- post pagination
- themes from github
- Service worker generation
Henry supports usage as a standalone script or usage via mix.
Check out the releases tab for prebuild escript releases.
You will need erlang installed on your machine to run the escript distribution.
Coming soon ;)
To build henry you will first need to install Elixir.
We need to clone the repo before we can do much else.
git clone git@github.com:TheMallen/Henry.git
Next we fetch our dependencies, don't worry there's only a couple.
mix deps.get
In your local copy of the Henry repo
mix escript.build
This will generate an escript in the directory named henry
.
Depending on your operating system and shell, the way you accomplish this will vary. If you're on Mac OS, check out this stackexchange question.
** In depth docs coming soon **
Once Henry is released to hex you will be able to use it as a dependency in mix projects.
# bootstrap a project
henry new "My Rad Website"
cd ./my-rad-website
# build the static files to /build
henry build