/ TRANSATLANTICISM / Projects / Static Site Generator

What is a static site generator?

(If you already know what an SSG is, you can skip this). Static site generators (SSGs) are any sort of software that automatically builds a website's html pages using raw data and templates. When I create or modify parts of this website, I'm not actually modifying the pages themselves, what you're seeing now, I'm editing templates or other files that are then used to build the website. For example: if I want to modify the navigation bar at the top, I don't have to change it on every single page, I simply change the common template that they all use, and the navigation bar is automatically updated next time I build the site.
SSGs are alternatives to content management systems (CMS), or if you're really lo-fi, just writing each page out by hand. A content management system is backend system that dynamically serves content to the user each time they visit a site, (think: websites like YouTube where your homepage is different every time). Static websites, by contrast, are the exact same every time you open them, for every single user. The website never changes (unless the webmaster edits it), thus the site is "static".

What does this SSG do?

My SSG uses 100% bash scripts to do some very basic templating. In essence, all the scripts are doing is:

  1. Turning a few .txt files used in the music review and updates pages into html files
  2. Taking the newest 3 updates and adding those to the index/home page.
  3. Loading a template for the navbar and <head> element
  4. Iterating over a list of files, combining them with the template, and saving that to a separate output folder
  5. Pushing everything in the output folder to either the neocities servers, or my local apache folder (optional).


It's kind of a mess, sorry. Feel free to send me a message if you see an especially egregious error. Also feel free to message me if you want to use it yourself (although I don't see why you really would). there's currently like no comments, sorry. i'll add some later + also try to clean up the code a little bit. the apache stuff on build.sh is cuz i use an apache localhost server for testing reasons, and the neocities upload is using the neocities ruby api.

generate_update_stream.sh (download)

failed to fetch code

generate_albums_page.sh (download)

failed to fetch code

generate_pages.sh (download)

failed to fetch code

build.sh (download)

failed to fetch code