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
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • front-matter

    Extract YAML front matter from strings

  • 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

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • 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!

  • pandoc

    Universal markup converter

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

  • 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/

  • astro

    The web framework for content-driven websites. ⭐️ Star to support our work!

  • 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.

  • 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

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Metalsmith

    An extremely simple, pluggable static site generator for Node.js

  • 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!).

  • 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!).

  • eleventy 🕚⚡️

    A simpler site generator. 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...

  • pico

    Minimal CSS Framework for semantic HTML

  • 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