Tagged #hugo.
15 entries.
week 1
week 2
week 3
week 4
week 5
week 6
week 7
week 8
week 9
week 10
week 11
week 12
week 13
week 14
week 15
week 16
week 17
week 18
week 19
week 20
week 21
week 22
week 23
week 24
week 25
week 26
week 27
week 28
week 29
week 30
week 31
week 32
week 33
week 34
week 35
week 36
week 37
week 38
week 39
week 40
week 41
week 42
week 43
week 44
week 45
week 46
week 47
week 48
week 49
week 50
week 51
week 52
12 entries over 52 weeks of #hugo activity. Less More
Writing 12 posts
Why I Rebuilt Plant Smart
My Blog Now Ships From My Homelab!
Some Long Overdue Demolition
Let Me Show You My Bits
Reading Between the Posts
A Year in Circles... I mean Squares. Or, is it Squircles?
Some Long Overdue Housekeeping
A Changelog That Builds Itself
Printing Ordinal Numbers in Hugo
My Blog Publishing Setup & Workflow
Testing Markdown Elements
Bits 3 bits
Page loads had been creeping up again, so I went looking. Turns out I’d been quietly serving enormous screenshots. One post was pulling 5.1 MB of PNGs, and a single one of those was a 1.96 MB app screenshot sitting in a column 736 pixels wide. Oof.
The fix was mostly plumbing. My img shortcode was handing the raw src straight to the <img> tag, so Hugo never got a look in. Everything now goes through one partial that resizes to the width it actually displays at, re-encodes to WebP and emits a srcset, plus width and height so the layout stops jumping around while things load. Markdown images get the same treatment through a render hook. The awkward bit: images under static/ aren’t resources, so Hugo can’t touch them. A second mount in hugo.toml fixes that without breaking any existing URLs.
While I was in there I dealt with the JavaScript. Every page was carrying all seven inline scripts, even the 90-odd pages with no code blocks, no zoomable images and no locked series titles. Those three now load only where they actually do something. The two that genuinely run everywhere moved into one small fingerprinted bundle, so your browser fetches it once for the whole visit instead of re-reading it on every page. I also finally turned on HTML minification, which I’d apparently never bothered with.
Where it landed:
| what | before | after |
|---|---|---|
| Images the site serves | 12.3 MB | 1.5 MB |
| HTML over the wire, mean per page | 10,236 B | 6,671 B |
| Worst offending post, first paint | 5.1 MB | 112 KB |
That last one is about 46 times smaller. Nothing changed visually, which was the whole point. The sparks still spark and the locked titles still scramble.
One last silly thing. I added a new short code to style “Plant Smart” as “Plant🌱Smart”. Fun!
Having a play with a more dynamic menu drawer. Just working out the kinks on smaller screens.
Decided to introduce a new projects page to showcase some of the bigger things I’m working on. I’m still working out the kinks and I’m not 100% sold on the current design. Each card is powered by a .toml based datasource in Hugo, contains a kind of linear heatmap of activity related to the associated project’s tag as well as the 5 latest related posts. Good enough to publish, I guess.
I also can’t decide on which activity graph animation I like the most. 😅