Live data from Hacker News

Jeffgeerling.com has been migrated to Hugo

jeffgeerling.com

221–230 of 253 posts

Re: Jeffgeerling.com has been migrated to Hugo

#221
post #122

Earlier quoted context omitted.

We've gone from SSGs for ease, speed and reduced resources, to talking about implementing search with multiple megabyte client side indexes and hundereds of thousands of prerendered search result pages. When does this become 1 step forward with the SSG and 2 steps back with search solutions like this?

You don't pre-render the search pages. You generate some search index files on the build step (something like a map of keywords to matching post URLs), and then client side JavaScript requests the search index files it needs on demand and generates the search results on the page. For a modest blog, I think the compressed index can be a few 100K. A single large image can be bigger than that. Nothing is perfect, but th…

This is just server side search with more steps, since the index needs to be selectively split and returned, and then search results page generated from the index.

Sorry, I don't mean to come across as disagreeable. You're right, nothing is perfect, and this is obviously a workable and usable solution. My issue is if we analyse it beyond "it looks like it works", it starts to look like a slightly worse solution than what we already had.

Nothing wrong with moving backwards in some direction, as long as we can clearly point to some benefit we're getting elsewhere. My issues with SSGs is most of the benefits they offer end up undermined if you want any interactivity. This is a good example of that, as you end up compromising on build time and page load time compared to an SSR search solution.

Re: Jeffgeerling.com has been migrated to Hugo

#222
post #96

Earlier quoted context omitted.

> Until you have enough visitors or evil AI bots scraping your site so that it crashes, or if you're using an auto-scaling provider, costs you real money. There's been multiple blog posts on HN from people who've received a hug of death and handled it fine with basically free or A couple of gigs of RAM and 2 cores can take viral posts and the associated bots. 99% of personal websites never go viral either. > The prob…

How many RPS is a hug of death?

I was thinking of this blog post when I wrote that: https://idiallo.com/blog/surviving-the-hug-of-death

Re: Jeffgeerling.com has been migrated to Hugo

#223
post #122

Earlier quoted context omitted.

We've gone from SSGs for ease, speed and reduced resources, to talking about implementing search with multiple megabyte client side indexes and hundereds of thousands of prerendered search result pages. When does this become 1 step forward with the SSG and 2 steps back with search solutions like this?

Interesting attempt at bad faith discourse. Assuming 500 bytes of metadata + URL per blog post, a one megabyte index is enough for 2000 blog posts. As already mentioned, you don't generate search result pages, because client side Javascript has been a thing for several decades already. Your suggestion of converting markdown on every request also provides near zero value. Writing a minimal server backend is also way e…

I'm sorry, I find your post insulting. I wasn't engaging in bad faith discourse intentionally, but your assumption that I am - ironically - doesn't feel like appropriate etiquette here either. Despite that, I'll try answer sincerely.

Your 1 megabyte index file has just added over 2 seconds to your page load time in 30 different countries based on average internet speeds in 2024. Chuck in some pictures, an external comment library and your other SSG hacks, and you've just made your website practically unresponsive to a quarter of the planet and a bunch of other low powered devices.

Value is relative. The benefit of rendering markdown on every request is it makes it easier to make it dynamic, so you don't need to do SSG compromises like rebuild and reupload multiple pages when a single link changes.

You're replying in my thread here, to my original points. My original points were that SSGs don't make sense for sites with interaction, which is why were were discussing the limitations of SSG search approaches.

> SSGs are used for publishing writing the same way PDF is used. Nobody sane thinks that they need a comment section in their PDFs.

Thank you! We're in agreement, it doesn't make sense to use SSGs for sites that require interaction. When you do, it forces the rest of your site to do the compromising search stuff like we're discussing here.

Re: Jeffgeerling.com has been migrated to Hugo

#225
post #219

Earlier quoted context omitted.

Definitely not disagreeable, more just "there are two right answers" ;) For me, an unstated reason for SSG is being able to scale to millions of requests per hour without scaling up my server to match. Serving static HTML is insanely easy, even on a cheap $5-10/month VPS. Serving anything dynamic at all is an order of magnitude harder. Though... I've been using Cloudflare since 2022, after I started getting regular t…

Thanks for the response, I appreciate it. If anyone's wrong here, I'd much rather it was me, if not just because that would mean we've not wasted millions of hours as a society chasing the SSG dragon! :') I totally see where you're coming from, but you just said it yourself, SSGs don't actually solve any problems for you right now that cloudflare doesn't. A site of Jeffgeerling.com scale is the archetypal scale site…

"you just said it yourself, SSGs don't actually solve any problems for you right now that cloudflare doesn't"

"Why go to all the burden of serving a few k of static html directly when you could just require a globe-spanning mega cdn?"

Re: Jeffgeerling.com has been migrated to Hugo

#226
post #212
post #210

Why Hugo over Astro for something lightweight? Or why not even bashblog? Seems like a strange choice to go with Hugo if he's aiming for lightweight and speed.

Just by being written in JS/TS and using node I suppose keeping it running is a task of its own (or keep a node_modules folder of 500MB) - compared to a hugo binary that will most probably work on any linux or mac for the next 10 years. (I see what you're getting at but Astro has to be _the worst_ example. I have migrated off hugo to my own SSG but I don't hate it)

Ah, makes sense, good points! I keep focusing so much on lightweight for the end user out of the box, and Astro still has been rather "lightweight" serverside for me (but good point how for a small device, a bloaty node_modules could be a pain point), though I also haven't used any large-scale deployments. Thanks for the reply! Are you rolling your own SSG now?

Re: Jeffgeerling.com has been migrated to Hugo

#227
post #226
post #212

Earlier quoted context omitted.

Just by being written in JS/TS and using node I suppose keeping it running is a task of its own (or keep a node_modules folder of 500MB) - compared to a hugo binary that will most probably work on any linux or mac for the next 10 years. (I see what you're getting at but Astro has to be _the worst_ example. I have migrated off hugo to my own SSG but I don't hate it)

Ah, makes sense, good points! I keep focusing so much on lightweight for the end user out of the box, and Astro still has been rather "lightweight" serverside for me (but good point how for a small device, a bloaty node_modules could be a pain point), though I also haven't used any large-scale deployments. Thanks for the reply! Are you rolling your own SSG now?

Migrated 3.5y ago - https://f5n.org/blog/2022/switching-to-nextgen/ after getting fed up with having to do a migration.

At that time it was "make my hugo setup run, and remove 90% of the features I don't need" - but I couldn't tell you how much I have diverged, it's really not a lot of code (or dependencies, but I did not reimplement the hard parts, e.g. markdown and templating)

Re: Jeffgeerling.com has been migrated to Hugo

#228
post #3

I made the jump to Hugo too (from a managed service: svbtle) a long time ago, but I'll be really honest... I regret it. I decided to use an off-the-shelf theme, but it didn't quite meet the needs and I forked it; as it so happens Hugo breaks userland relatively often and a complex theme like the one I have requires a lot of maintenance. Like.. a lot . Now I can't really justify the time investment of fixing it so I j…

I "solved" this issue by using a custom Docker image, both for writing/serving content locally, and for the CI.

So I have a fixed Hugo version that I know works.

And when I mean "solved", I actually never had the issue because, since I have no reason to upgrade Hugo, I never had to change my Docker image and never had the opportunity to risk breaking my theme.

Re: Jeffgeerling.com has been migrated to Hugo

#229
post #219

Earlier quoted context omitted.

Thanks for the response, I appreciate it. If anyone's wrong here, I'd much rather it was me, if not just because that would mean we've not wasted millions of hours as a society chasing the SSG dragon! :') I totally see where you're coming from, but you just said it yourself, SSGs don't actually solve any problems for you right now that cloudflare doesn't. A site of Jeffgeerling.com scale is the archetypal scale site…

"you just said it yourself, SSGs don't actually solve any problems for you right now that cloudflare doesn't" "Why go to all the burden of serving a few k of static html directly when you could just require a globe-spanning mega cdn?"

I also don't like the idea of depending on globe-spanning mega-CDNs and don't use cloudflare for my own self hosting for the reason. I feel we're philosophically aligned here.

I feel you're missing my point which was "SSGs aren't good for sites which require interactivity because they force compromises elsewhere", a corollary to that is that for any problem an SSG promises to solve, if you have interactivity on your site, you probably already have a better solution available. E.g Jeff/bots/traffic/cloudflare.

Re: Jeffgeerling.com has been migrated to Hugo

#230
post #227
post #226

Earlier quoted context omitted.

Ah, makes sense, good points! I keep focusing so much on lightweight for the end user out of the box, and Astro still has been rather "lightweight" serverside for me (but good point how for a small device, a bloaty node_modules could be a pain point), though I also haven't used any large-scale deployments. Thanks for the reply! Are you rolling your own SSG now?

Migrated 3.5y ago - https://f5n.org/blog/2022/switching-to-nextgen/ after getting fed up with having to do a migration. At that time it was "make my hugo setup run, and remove 90% of the features I don't need" - but I couldn't tell you how much I have diverged, it's really not a lot of code (or dependencies, but I did not reimplement the hard parts, e.g. markdown and templating)

Cool! Thank you for the replies! And best of luck!
Post reply on HN