logoalt Hacker News

1domlast Sunday at 2:46 PM12 repliesview on HN

I think this is silly, and it's a hill I'm willing to die on. I wrote this in a comment yesterday, and Jeff has fully confirmed/vindicated this in his post:

SSGs are good for static sites with no interactivity or feedback. If you want interactivity or feedback, someone (you or a 3rd party service provider) is going to have to run a server.

If you're running a server anyway, it seems trivial to serve content dynamically generated from markdown - all an SSG pipeline adds is more dependencies and stuff to break.

I know there's a fair few big nerd blogs powered by static sites, but when you really consider the full stack and frequency of work that's being done or the number of 3rd party external services they're having to depend on, they'd have been better by many metrics if the nerds had just written themselves a custom backend from the start.

Jeff: I think you'll regret this. I think you'll waste 5 - 10 years trying to shoehorn in basic interactivity like comments, and land on a compromised solution.

I also used and managed Drupal and Joomla before I went to SSGs, and then finally realised there's a sensible midpoint for the pain you're feeling: you write/run a simple server that dynamically compiles your markdown - good ol' SSR. It's significantly lighter, cheaper and easier than drupal, and lets you keep all the flexibility and features you need a server for. Don't take cave to the "self hosted tech was too hard so I took the easy route that forces me to also use 3rd party services instead" option.

SSGing your personal site is the first step to handing it over to 3rd party services entirely IMO.


Replies

senkolast Sunday at 2:55 PM

> If you're running a server anyway, it seems trivial to serve content dynamically generated from markdown.

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.

The problem isn't in markdown→HTML conversion (which is pretty fast), it's that it's a first step in adding more bells and whistles, and before you know it, you're running a nextjs blog which requires server-side nodejs daemon so that your light/dark theme switch works as copy-pasted from stackoverflow.

For blogs, number of reads vs number of comments or other actions that require a server is probably on the order of 100:1 or 1000:1, even more if many of the page loads are bots/scrapers.

> SSGing your personal site is the first step to handing it over to 3rd party services entirely IMO.

Why? Your interactive/feedback parts can be a 10-line script as well, running on the same site where you'd run Drupal, Joomla, Wordpress, Django, or whatever.

Looks like Jeff plans to do exactly that: https://github.com/geerlingguy/jeffgeerling-com/issues/167

show 1 reply
geerlingguylast Sunday at 2:57 PM

I'm already self hosting my own cookieless analytics, and before, I hosted Drupal (LEMP stack) and Apache Solr on separate servers. I'm used to self-hosting, and any comment solution I use will be self-hosted as well (see: https://github.com/geerlingguy/jeffgeerling-com/issues/167)

The code surface with SSG + 1 or 2 small self-hosted OSS tools is much, much smaller than it ever was running Drupal or another CMS.

show 2 replies
creatonezlast Sunday at 3:29 PM

> all an SSG pipeline adds is more dependencies and stuff to break.

This is the exact opposite of what static site generation does.

show 1 reply
danguslast Sunday at 3:03 PM

Shoehorn basic interactivity like comments?

https://gohugo.io/content-management/comments/

This includes a giant list of open source commenting systems.

I really don’t understand why people commonly say static site generators are a good candidate for building your own when there are a good selection of popular, stable options.

The only thing I don’t like about Hugo is the experience of using other people’s themes.

show 2 replies
susamlast Sunday at 3:00 PM

> SSGs are good for static sites with no interactivity or feedback. If you want interactivity or feedback, someone (you or a 3rd party service provider) is going to have to run a server.

For my website, I do both. Static HTML pages are generated with a static site generator. Comments are accepted using a server-side program I have written using Common Lisp and Hunchentoot.

show 1 reply
stavroslast Sunday at 3:20 PM

I converted my site to an SSG site and have never regretted it. Then again, I find that the less interactivity, the better.

show 1 reply
theandrewbaileylast Sunday at 4:36 PM

I started writing a blog engine back when I was in college. I've been working on it ever since, and it's let me implement and play with cool web features. I implemented Markdown over 10 years ago, and I don't regret it. The Markdown is converted to HTML once on save.

It's supported RSS since practically the beginning, and RSS later served as a foundation for a backup and restore system. A few years ago, I implemented SSG functionality (exports html, css, images, etc in a zip).

https://github.com/theandrewbailey/gram

ameliuslast Sunday at 4:39 PM

Yes, SSGs are like a one-way street. Once you drive into one it is very hard to back out and make your website more dynamic.

However, some people like building websites and are fine with that. Plus, it allows you to write another blog post :)

_heimdalllast Sunday at 3:29 PM

This is where I've found Astro to really shine. Most people reached for it because of the whole "islands of interactivity" concept, but IMO the ability to easily build a mostly static site with server APIs when needed is a the killer feature.

I manage multiple Astro sites and eventually they have all needed at least a few small server endpoints. Doing that with Astro is very simple and it can be done without making the static portions of the site a pain to maintain.

show 1 reply
theshrike79last Monday at 7:25 AM

I have a vague memory that one of the largest commenting sites on the internet, 4chan, was basically statically generated.

Every time a comment was added, it just generated a full-ass static web page.

nunezlast Sunday at 3:16 PM

But what about Disqus? Or that one that renders comments from GitHub Issues?

show 1 reply
andrewshaduralast Monday at 6:48 AM

I run an e-commerce website on Hugo. The only non-static part is a short Python function I run in a cloud to forward the orders to Stripe.