What ?

Satic is a minimalist static site generator.


While looking for static site generators on the internet I realized almost all of them were bloated programs that required me to install a bunch of stuff just to replace some strings on a html files. Then I decided to write something simple that fits my needs. This is a really simple program that builds as a single command line executable and requires no additional dependencies to build or run.

What's wrong with current static site generators ?

  • Distribution

    I would say the first thing is distribution. Static site generation is mostly a matter of replacing strings on text files. I am not a web developer, so when I need to generate a static site I don't want to be forced to install things I don't use like ruby/python/algol/brainfuck interpreter and a bunch of dependencies and extra packages. In other words, there is almos t no reason for this kind of program not to be distributed as ONE SINGLE EXECUTABLE.

  • Feature bloat and learning curve

    Existing generators are actually pretty powerful and feature rich. This translates into forcing the user to learn about all the features, configuration files and syntax for different situations.

My approach

My approach went in the opposite direction. I sought to create absolutely essential features and make the amount of information to be learned by the user readable in a single page of text. Also, I decided to use convention over configuration for the thing users tend to do the most: adding new content / posts. Please check the documentation for more details on that

Next steps

There are 2 more "features" I would include in this project so I would never need another generator: IF/ELSE tags and Markdown support. For the markdown, specifically, I would contain it between {markdown}{end-markdown} tags so users would still be able to input raw HTML when necessary.

Should I use it ?

No, but yes. If you just need simple features this program gets you covered. If you need fancy frontend generation logic and don't mind installing a bunch of crap, you better not.

How to use it ?

Please check the configuration on the Projet Repository.

Where do I get it ?

You can download it from here.

Recent Activity

I revisited the project and fixed some bugs, made a few improvement and added Markdown support for posts.

On the left, the website structure. The site.txt and the Posts and themes folders. In the middle, the a portion of the source of the demo site index.html. The highlighted area displays a snipped of code that iterates all posts in order to render a links for each one of them along with their title and their creation date. It's worth noting the list is sorted by post creation date in ascending order.

A bit further, another loop iterating all "pages". Any html file in the current theme folder is considered a page and can be iterated and queried like a post.

As I said, there isn't much to a static site generator and that is why I believe this kind of tool should be simple and less bloated.

Building the website via command line is simple and of course, very fast

Minimum configuration is required. Convention is preferred over configuration for the most common task, that is adding posts.

Adding content is just a matter of adding html files to the Posts folder.
The post file name states the template used to render the post, the post creating date and the post title