Currently listening to: LLNN — Unmaker
My homegrown static-site generator does not have a feature I want so I ended up not posting at all last year: a tale as old as time. The thing I want is custom elements.
Custom elements are very well supported at this point for modern static site generators—pretty much all of them support using components/elements from some framework or other.
I considered switching away from my homegrown bullshit, I really did. The problem was, in 2020, none of the SSGs I looked at supported components in the way I wanted.
- The component should be able to make asynchronous calls to external processes to build itself at compile time. This ruled out everything else I looked at.
let’s talk about that second requirement a little more.
Here’s something I want to be able to do
Pico sure does look like she's up to something. <x-squoosh src="assets/pico.png" width=1200 height=800 alt="tabby cat named Pico perched on a floor-to-ceiling cat tree with a mischevious look in her eye" > <x-source format="avif" quality=30 effort=4 /> <x-source format="webp" quality=75 effort=4 /> <x-source format="mozjpeg" quality=75 /> </x-squoosh>
That element should generate something like this in the final output.
<p>Pico sure does look like she's up to something</p> <img width=1200 height=800 srcset="assets/pico.1200w.avif,assets/pico.1200w.webp" src="assets/pico.1200w.jpg" alt="tabby cat named Pico perched on a floor-to-ceiling cat tree with a mischevious look in her eye" />
…but more importantly, it should run the squoosh CLI to build the images (only when necessary! Don’t waste work building stuff that already exists!)
but now it’s the future
Not only has the landscape of SSGs changed, I’ve changed, or at least my priorities have. When I put this dang site together in late 2020, my motivation was split between three (conflicting) priorities:
- write more words
- learn and practice Scala
- update my knowledge about FE performance
At this point, I feel satisfied with
#3 and I get to satisfy
#2 pretty regularly at my day-job at this point, so I don’t really need to incentivize myself to do it within the context of this site—especially since it’s been blocking priority
All that said, I haven’t made the switch yet, so there’s still plenty of opportunity for me to go “lol j/k see you in 2023”.