Hacker News new | ask | show | jobs
by simonsarris 963 days ago
when I made https://carefulwords.com, which is just a thesaurus that I wanted for myself*, I effectively had to make a static site generator, since it required a lot of preprocessing steps to get all the words linked to each other, word synonym lists, and word quotes assembled from various text files. And this article is right: you can just build it. I just put together some TS scripts over a couple weekends to smooth it all together (and then another day on top to make it fast). After that I can keep using and editing my weird bespoke sources to build my project.

If I had to use a static site gen to do the same thing, it probably would have taken a lot longer, or I might have had to do so much pre-processing or massaging of my data that I was effectively building a static site gen on top of someone else's static site gen. And why bother with that? Of course if the project had any more complexity, I would benefit from stronger templating, and putting a static site gen layer after my own static site gen is probably exactly what I'd do. Just stitch them together, instead of trying to get my first-steps into someone else's static site gen.

* I wanted one that has lots of synonyms, has some historic quotes to go with words, has autocomplete and unlike good old thesaurus.com it should focus the text box on load

The result being perfectly static means its perfectly fast. It also means there's a lot of crude overlap - every page has the same HTML copied and pasted a million times. But that's OK, it's small, so it's still faster.