Live data from Hacker News

Jeffgeerling.com has been migrated to Hugo

jeffgeerling.com

41–50 of 253 posts

Re: Jeffgeerling.com has been migrated to Hugo

#41

Out of interest: does anyone know what those three Safari extensions are on Jeff's screenshots? Edit: thx for answers below!

Maybe Subscribe with Reeder[0], 1Password[1], Userscripts[2]. The RSS and HTML icons are obviously fairly generic, so not 100% sure. [0]: https://reederapp.com [1]: https://1password.com [2]: https://github.com/quoid/userscripts

I checked, it's not Reeder.

Don't know what it is either, but I'd like to got off-topic and remember with fondness the time when you could subscribe to RSS feeds directly in Safari. Google Reader was replacable, a direct integration into the browser not.

Re: Jeffgeerling.com has been migrated to Hugo

#42
post #36
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…

Your wife’s Python version is quite impressive. It wouldn’t have occurred to me to do the simple thing and just do some string-replacement targeted at a narrow use-case instead of using a complicated templating engine.

> just do some string-replacement targeted at a narrow use-case instead of using a complicated templating engine.

A neat little in-between "string replacements" and "flown blown templating" is doing something like what hiccup introduced, basically using built-in data structures as the template. Hiccup looks something like this:

    (h/html [:span {:class "foo"} "bar"])
And you get both the power of templates, something easier than "templating engine" and with the extra benefit of being able to use your normal programming language functions to build the "templates".

I also implemented something similar myself (called niccup) that also does the whole "data to html" shebang but with Nix and only built-in Nix types. So for my own website/blog, I basically do things like this:

    nav = [ "nav"
      [ "h2" "Posts" ]
      [ "ul" (map (p: [ "li" [ "a" { href = "${p.slug}.html"; } p.title ] ]) posts) ]
    ]
And it's all "native" Nix, but "compiles" to HTML at build-time, great for static websites :)

Re: Jeffgeerling.com has been migrated to Hugo

#43

I had a similar push years ago, but I did take this approach once step further. For a similar reason Jeff mentions -- lower maintenance over time. I was frustrated that (because my posts are less frequent) changes in Hugo and my local machine could lead to changes in what is generated. So I attached a web hook from my websites GitHub repo to trigger an AWS Lambda which, on merge to main, automatically pulled in the r…

Exactly; and I'm currently tinkering with different deployment options. One thing I may do to speed up the deploy is run the Hugo compilation on the server itself, so the only push that needs to happen for a new post is a few KB via git. A post-receive hook would then run Hugo and deploy into my public www dir.

Re: Jeffgeerling.com has been migrated to Hugo

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

The posts looks pretty smooth to read.

You list all the links to posts on the landing page: what if you have 1000, 2000 posts ? Have you thought of paginating them ?

Re: Jeffgeerling.com has been migrated to Hugo

#45
I did a migration to markdown, too, but I decided to backport my previous nodejs code to Go, as I wanted the editor part to be still available as a standalone binary.

This Christmas, I redesigned my website [1] into modular "middlewares" with the idea that each middleware has its own assets and embed.FS included, so that I can e.g. use the editor to write markdown files with a dynamic backend for publishing and rendering, and then I just generate a static version of my website for the CDN of choice. All parts of my website (website, weblog, wiki, editor, etc) are modular this way and just dispatch routes on a shared servemux.

The markdown editor turned out to be a nice standalone project [2] and I customized the commonmark format a bit with a header for meta data like title, description, tags and a teaser image that is integrated with the HTML templates.

Considering that most of my content was just markdown files already, the migration was pretty quick, and it's database free so I can just copy the files somewhere to have a backup of everything, which is also very nice.

[1] https://cookie.engineer

[2] https://github.com/cookiengineer/golocron

Re: Jeffgeerling.com has been migrated to Hugo

#46

Earlier quoted context omitted.

I’ve slowly grown to realize there’s some software you just don’t need to update. A static site generator (almost certainly) won’t have security issues as long as you control the input and the output is just a bunch of static files. Unless the new version of the software includes some feature I need, I can be totally fine just running an old version forever. I could just write down the version of the SSG my site buil…

Is there any static site generator where you specify the version you use, and the launcher will simply run the old binary that you want? Like most build systems work, for example when you set a "rust-version" in Cargo.toml and only bump it when you explicitely want to. This way it will still use the older version on a fresh checkout.

I guess my very own "niccup" (basically hiccup-in-nix) fits that (https://embedding-shapes.github.io/niccup/), as you'll typically always include the library together with a strictly set version, so even when new versions are available, you'd need to explicitly upgrade if you want it.

Re: Jeffgeerling.com has been migrated to Hugo

#47
post #26

For long term stuff like a blog, nothing seems to beat static sites generated before deployment, instead of automated tools like Hugo. I tried Hugo years ago and some tiny config or update would suddenly expose all site variables to visitors, which was an incredible security risk. Wordpress and Drupal are a war zone of attacks - judging by the server logs of any of web site. These days you can custom write or design…

I'm fairly sure you're confusing Hugo with something else, Hugo is strictly a tool for building static websites. AFAIK, there are no features of Hugo which isn't for static website building.

Re: Jeffgeerling.com has been migrated to Hugo

#48
post #41

Earlier quoted context omitted.

Maybe Subscribe with Reeder[0], 1Password[1], Userscripts[2]. The RSS and HTML icons are obviously fairly generic, so not 100% sure. [0]: https://reederapp.com [1]: https://1password.com [2]: https://github.com/quoid/userscripts

I checked, it's not Reeder. Don't know what it is either, but I'd like to got off-topic and remember with fondness the time when you could subscribe to RSS feeds directly in Safari. Google Reader was replacable, a direct integration into the browser not.

The RSS button is https://rssdiscovery.app/

And for a short time, RSS was the bee's knees across the entire Internet. Apple had the best support for it, and almost put NetNewsWire out to pasture, until they just removed all baked in RSS functionality, entirely :(

But I use Reeder across Mac, iPad, and iPhone to keep up with feeds.

Re: Jeffgeerling.com has been migrated to Hugo

#49

I really like Hugo as well. I've found it significantly faster than Jekyll which makes iterating much more pleasant and it's a single binary to download/run vs having to deal with Ruby and its package manager. I'm amazed there still isn't a decent free simple to host CMS solution with live page previews, a basic page builder, and simple hosting yet though. Is there one? There's https://demo.decapcms.org/ (previously…

I'll have to get those tag links fixed. That's especially odd as I think those links were the defaults from the Archie theme I based my site on!

Re: Jeffgeerling.com has been migrated to Hugo

#50

I like Hugo, but I’ve not found a nice workflow to automatically put the images on a CDN. I was thinking of making a GitHub action that uploaded the image from a given branch, deleted it, set the URL, and finally merged only the md files to main.

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?

Post reply on HN