Why I built my own static site generator

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • GitHub repo front-matter

    Extract YAML front matter from strings

  • GitHub repo nhp

    Static site generator for my homepage

    I built mine too, for similar reasons: it felt easier to write from scratch, so that my site looked the way I wanted it, than customize some of the existing solutions (Jekyll, Hugo, etc).

    Sure it’s not customizable at all: it can only generate my site. And that’s fine. I like it that way.

    For example: I sometimes translate poetry, and I have a bunch of code that renders individual poems from plaintext (not Markdown, because newlines and whitespace _are_ significant): https://github.com/nathell/nhp/blob/master/src/nhp/poems.clj

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • GitHub repo frankensteins

    ___.sh : a 42*2 lines, recursive, multimarkdown, sed & bash static html blog 'engine'

    I have an 84 line bash script that abuses find, sed and multimarkdown to generate a website with a blog, static pages, navigation and rss feed for the blog. The index page has a header and the last 5 blog entries ((Navigation between the blog entries is plain old basic javascript).(https://github.com/nicolasH/frankensteins)

    You don't have to be on the Node treadmill to create a static site generator. You can use something stable!

  • GitHub repo pandoc

    Universal markup converter

    Didn't see anyone mention Pandoc in the comments so far... https://pandoc.org

  • GitHub repo Hugo

    The world’s fastest framework for building websites.

    I'm surprised nobody mentioned Hugo[0] yet.

    I write Markdown and commit to a git repo, then a web hook in Caddy pulls and builds the static site, anything I commit is up in a matter of seconds.

    I'd much rather spend what little time I have writing blogs to help people learn new things than write YASSG.

    Someone below linked to a site with over 400 SSGs.I think OPs "why" was really "because I wanted to", after having only tried Jekyll and Gatsby (apparently).

    [0]https://gohugo.io/

  • GitHub repo astro

    Build faster websites, faster. 🚀🧑‍🚀✨

    I'm in this situation now. I have a mostly complete personal site/blog written with Nuxt. It's a Vue based SSG. Works well but overall I don't actually like Nuxt as it imposes some awful conventions that you "can" get around but what's the point?

    The JS configuration file is a dumping ground of modules and objects that aren't even consistent with themselves and now Nuxt 3 is out and within a matter of hours had 100 bugs reported on Github.

    Little bit tired of Node based SSG's so I looked at the .NEt options (my prefered stack). There used to be one called Wyam that rebranded to Statis and now you need to actually buy a license for (seems like typical .NET shenanigans).

    I ruled out Hugo and Jekyll because their template languages are certainly less ideal. From what I saw it was common in both to have starting blocks in one file and the ending of the block in another. Basically one file would have

    and then another random file would have in it, what a mess!

    So it's either back to Node based SSGs or write one in .NET.

    https://astro.build/ is next on my list and seems promising so far.

    Overall, despite there possibly being thousands of SSG's none of them actually seem to please a majority of developers. I think that's unique, because for problem xyz there's usually maybe a top 3 or 5 hyped up popular options but SSG's are a wild west.

  • GitHub repo dirmaker

    dirmaker is a simple, opinionated static site generator for quickly publishing directory websites.

    Life isn't complete until one's made their own static site generator! I had to make two directory websites earlier this year and that exercise turned into a static directory site generator - https://github.com/knadh/dirmaker

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • GitHub repo Metalsmith

    An extremely simple, pluggable static site generator.

    A static site generator I've been enjoying lately (and using for my blog) is Metalsmith: https://metalsmith.io/

    It feel like it's the best of both worlds, because it's simple to learn and customize, but there are plugins for the things you don't want to spend time writing yourself.

    For example, I'm using plugins to: check for broken links, generate an RSS feed, and run a test server with automatic reloading.

    But then I was able to easily add in my own code to handle relative links, generate Graphviz diagrams, and format dates.

    One other recommendation: I hated almost every template language I ran across (Hugo's, Liquid, Nunjucks, EJS), but I'm thrilled with the simplicity of Handlebars (https://handlebarsjs.com/), although it is a bit limiting and the "block helper with parameters" syntax is strange (perhaps an indicator that I'm trying to do too much in the templating language!).

  • GitHub repo handlebars.js

    Minimal templating on steroids.

    A static site generator I've been enjoying lately (and using for my blog) is Metalsmith: https://metalsmith.io/

    It feel like it's the best of both worlds, because it's simple to learn and customize, but there are plugins for the things you don't want to spend time writing yourself.

    For example, I'm using plugins to: check for broken links, generate an RSS feed, and run a test server with automatic reloading.

    But then I was able to easily add in my own code to handle relative links, generate Graphviz diagrams, and format dates.

    One other recommendation: I hated almost every template language I ran across (Hugo's, Liquid, Nunjucks, EJS), but I'm thrilled with the simplicity of Handlebars (https://handlebarsjs.com/), although it is a bit limiting and the "block helper with parameters" syntax is strange (perhaps an indicator that I'm trying to do too much in the templating language!).

  • GitHub repo eleventy 🕚⚡️

    A simpler static site generator. An alternative to Jekyll. Transforms a directory of templates (of varying types) into HTML.

    I also wanted the ability to handle relative links between Markdown files (and relative links for images). I'm surprised this isn't a default feature of nearly every static site generator, honestly.

    Fortunately, some of the extensible static site generators make this fairly easy to add as a feature. Here's an example for Eleventy (aka 11ty):

    https://github.com/11ty/eleventy/discussions/1973#discussion...

  • GitHub repo pico

    Minimal CSS Framework for semantic HTML (by picocss)

    will recommend water.css over picocss

    I feel like this is a design flaw: https://github.com/picocss/pico/issues/13

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts