Hacker News new | ask | show | jobs
by simonw 1006 days ago
My https://simonwillison.net/ blog has been running since 2002 and has 3015 long-form posts, 6718 bookmark posts and 770 quotations.

Plus tag pages, archive-by-date-pages, series pages and more.

I don't particularly want to have to wait for all of that to build!

It also offers faceted search against all of that, powered by PostgreSQL: https://simonwillison.net/search/?q=static%20site%20generato...

2 comments

Well, taoofmac.com has 20+ years, 9000-odd pieces of content (that translate into 47.000 blob storage items), multiple navigation constructs (archives, backlinks - it’s a wiki - and even a 3D sitemap), and an incremental build for a post that links to 5-6 others (and resizes images, updates the home page, archives, linked page footers and backlinks) takes ~10s, including uploading the results (and an updated SQLite database) to Azure.

I use SQLite FTS for full-text search (it’s the only non-static endpoint).

A full site re-render on a Raspberry Pi takes 5 minutes, and a full reindexing - FTS plus linkmap - plus publishing around 10, but I only do that yearly or when I update things like CSS, layout, etc.

It all runs off a Git hook, uses SQLite to hold all the FTS, base HTML and metadata, and is as asynchronous as can be (including my own asyncio blob upload library). Costs me effectively zero.

That's awesome. Parts of that sound a little bit like how my https://til.simonwillison.net/ site works.
I need to update my write up, but this is generally it: https://taoofmac.com/space/blog/2021/06/19/2036
Incremental builds exist, so you'd really only have to build once: https://nextjs.org/docs/pages/building-your-application/data...

That said, personally, I love PG and enjoy using a DB. But I can see pro's to both sides.