Note, this is a really old blogpost and isn’t really representative of my current workflow, this is here for preservation purposes only

What is ssg?

Ssg is self described as “a static site generator written in shell. Optionally it converts Markdown files to HTML with lowdown(1) or Markdown.pl”

It’s written by a fellow called Roman Zolotarev

ssg4-source image of the sgg4 source code as featured on Roman’s site

It’s very lightweight and easy to use, and as said earlier it’s completely written in shell script

Why should I use a script instead of a full static site generator?

Most static site generators are unecesarily heavy with a lot of features you won’t need, especially for the purposes of a small site like mine

How do I use ssg5?

Using ssg is pretty simple but I don’t think I’m fit for the task of explaining the exact use cases so I’ll leave some useful links here:

The author’s official page and guide

Wolfgang’s Video on the subject

My modifications

Ssg5

Wolfgang has made a modified version which he explains in his video

Now the problem with this version is that it doesn’t work on most Linux (and other systems that use GNU cut) since cut is a bit different on MacOS

My version has a check so it should work on both MacOS and Linux

Makefile

I’m currently in the process of adding templates for when I make blog posts to the site. I’m managing them using them makefile

Plans going forward

I’m planning to write a bit more often on here and I want to add some minor optional Javascript

Before you get scared I have no plans on BLOATING the site up, but I’d like some more features. Currently I’m working on getting a system for sorting and displaying all blog posts without me adding them into the index.md while also allowing you to sort by dates possibly categories (when I add those in the future)

Github pages integration

This is where I come in, since I don’t have my own server I decided to use Github pages as means of hosting my site

First thing to note, Github requires to have your site either in the / or the docs/ folder of your repo

github-pages-picker

So you have to make sure ssg5 exports to /docs as / is obviously not viable

You can facilitate building with a makefile, you can reference mine as a example of what not to do

You’re done!

The site you’re looking at right here was made using this exact method (could you tell?) if you want to look into some of the source feel free, it’s available here

After this you can add some css to the site (here’s mine) and add something like a .htaccess file so you can get a clean address bar