SSG is a proof of concept for a very straightforward static site generator written in Elixir as an escript. It takes heavy inspiration from eleventy. It supports multiple templating languages:
- HTML
- Pug
- Markdown
If this ends up becoming something people want, here's a list of things I would add next
- HEEx and EEx support to enable building basic navigation for blogs
- Compiled releases with support for easy configuration
- More documentation on how it works
- Short video tutorial on how to build a website with SSG
- Support for more templating engines such as Liquid, Mustache, Haml
Help is wanted, so feel free to send a pull request adding any of these action items.
SSG Requires Elixir >= 1.13
.
You can generate the SSG binary by cloning and compiling the project as follows:
git clone https://github.com/goncalotomas/ssg
cd ssg
mix do deps.get, escript.build
This will generate an ssg
binary on the project root directory. You can then use ssg as follows:
./ssg
By default, SSG will look for files in the current directory to generate content from. The files generated by SSG will be put in the _site
directory. Just before exiting, SSG prints out a short summary of how many files were written to the output directory:
Wrote 25 files in 0.09 seconds (3.4ms each, v0.1.0)
You can use the --formats
option to specify a list of file formats to search for. In the following example, SSG will search only for Markdown, HTML and Pug template files:
./ssg --formats=md,html,pug