Live data from Hacker News

Jeffgeerling.com has been migrated to Hugo

jeffgeerling.com

51–60 of 253 posts

Re: Jeffgeerling.com has been migrated to Hugo

#52
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.

Re: Jeffgeerling.com has been migrated to Hugo

#53
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…

> In theory I could use an old version of Hugo, but I have no idea when it broke, so how far do I go back? Had the same problem. Binary search is the latest trick people use. For SSG there's not much point in upgrading if everything works, and planned migration beats the churn in this case. You can just print a Hugo version in a HTML comment to track it in git.

Binary search is a very old trick, going back to 1946 on computers, and probably thousands of years before that, since searching sorted lists goes back to at least ancient Babylon. https://en.wikipedia.org/wiki/Binary_search

Re: Jeffgeerling.com has been migrated to Hugo

#54
I know this isn’t quite the spirit of self hosting, but for people that aren’t ready to self they host can use https://prose.sh which interops with Hugo. It’s a safe stepping stone into self hosting a blog for anyone who wants to get started slowly.

prose is fully open source as well: https://github.com/picosh/pico

It even has a Hugo migration repo for when users want to make the jump

https://github.com/picosh/prose-hugo

Alternatively you can use https://pgs.sh to deploy your Hugo blog using just rsync. The entire workflow starts and finishes in the terminal.

Re: Jeffgeerling.com has been migrated to Hugo

#55
post #38

Earlier quoted context omitted.

I moved to a AI maintained custom site generator and it’s ideal for my uses. I have full control over everything and nothing breaks me.

I'm not sure if there should be a /s there. AI to me seems to be the antithesis of stable.

An AI-maintained tool is a different thing than using AI to generate the site.

Re: Jeffgeerling.com has been migrated to Hugo

#56
post #34

A few years ago, I decided to migrate my personal website to a Common Lisp (CL) based static site generator that I wrote myself. In hindsight, it is one of the best decisions I have made for my website. It started out at around 850 lines of code and has gradually grown to roughly 1500 lines. It handles statically rendering blog posts, arbitrary pages, a guestbook, comment pages, tag listings, per tag RSS feeds, a con…

I did the same thing, but implemented my site generator in Go. My site has grown by a lot over the years, but I can still build it from scratch (from MD files, HTML snippets and static files) in less than one second!

Also have a RSS feed generator and it can highlight code in most programming languages, which is important to me as I write posts on many languages.

I did try Hugo before I went on to implement my own, and I got a few things from Hugo into mine, but Hugo just looked like far too overengineered for what I wanted (essentially, easy templating with markdown as the main language but able to include content from other files either in raw HTML or also markdown, with each file being able to define variables that can be used in the templating language which has support for the usual "expression language" constructs). I used the Go built-in parser for the expression language so it was super easy to implement it!

Used this for code syntax higlighting: https://github.com/alecthomas/chroma And this for markdown: https://github.com/russross/blackfriday

The rest I implemented myself in simple to read Go code.

Re: Jeffgeerling.com has been migrated to Hugo

#57

Earlier quoted context omitted.

If you're okay with the images being on a CDN, why wouldn't you also be okay with the HTML and CSS also being on the CDN? Just fronting the entire static site with a pull-through CDN is an easy solution that doesn't require any complicated workflow.

I’m talking about integrating with GitHub. Publishing to Cloudflare for instance is fine, but where do you put the images between drafting and publishing? Or do you just check in images to GitHub and call it a day?

I wasn't suggesting publishing to Cloudflare, just that if you're concerned about the complexity of the workflow of getting images into the CDN, simply fronting whatever host you're using with a CDN of some kind (which could be Cloudflare) will solve that.

Usually you just store the images in the same git repo as the markdown. How you initially host the static site once generated is up to you.

The problem with storing binaries in Git is when they change frequently, since that will quickly bloat the repo. But, images that are part of the website will ~never change over time, so they don't really cause problems.

Re: Jeffgeerling.com has been migrated to Hugo

#58
post #38

Earlier quoted context omitted.

I moved to a AI maintained custom site generator and it’s ideal for my uses. I have full control over everything and nothing breaks me.

I'm not sure if there should be a /s there. AI to me seems to be the antithesis of stable.

The AI only changes things when I want it to, and to my command. It's very stable.

Re: Jeffgeerling.com has been migrated to Hugo

#60
post #52

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 dynamical…

> 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

Post reply on HN