There really isn’t anything worse than traveling for work and not having access to any of the resources you require to complete the task. I’m here because I need to earn a living to support myself and my family, and my time is precious to me. So wasting it an dragging out the time I’m apart from my family isn’t a great way to curry favor with me. It’s going to view your organization as the joke that it is.
Redirected
How annoying. I hate it when people treat your time as though it has no value. We’re all on this rock for essentially the blink of an eye and I’ve already lost a third of existence to sleep. Then mankind had to go and invent something stupid like the economy, so now I get to dedicate another third of my life to making someone else money. Awesome. So I’m 66% down and you want to waste my time even further? No thanks, man. Hard pass on that. At least I’m still getting paid, but I guess the part that burns isn’t the money, it’s the respect. Show me respect by not wasting my time, eh?
Contentment
I finally know what it’s like. All those things people say about what it means to really be in love, how people lord over it as a concept and put these really tight constraints on what it means to be in love- I get it. I can see why people would gatekeep a feeling like this. It feels like a crime to dilute it and allow lesser emotions any stage presence. It makes sense, finally.
Neato
I think working on my blog is a damned neat hobby. The result looks like a well-oiled machine even though I don’t know how to make a well-oiled machine. It’s just super cool. I just wrote my last post detailing how I automatically generate webp thumbnails for every markdown image I use in blog posts. Not gonna lie- Hugo is fucking amazing. It’s blazing fast, easy to understand, relatively few bugs, and does exactly what you expect it to (within the confines of expecting Go Html Template).
Here, have a couple memes.
Hugo Template Render Hooks
This was a tough nut to crack. I’m totally new to Go Html Templates and Go itself, and I’ve never really used anything outside of Jekyll. It took me a minute, but I wound up coming up with this:
{{ $image := (resources.Get .Destination) }}
{{ with $image }}
{{ if eq $image.MediaType.SubType "svg" }}
<a data-fancybox="image" href="{{ $image.RelPermalink }}" data-caption="{{ with $.Title }}{{ . }}{{ end }}">
<img src="{{ $image.RelPermalink }}" {{ with $.Text }} alt="{{ . }}" {{ end }} {{ with $.Title}} title="{{ . }}"{{ end }} />
</a>
{{ else }}
{{ $resize := .Fill "200x165 webp q80" }}
<a data-fancybox="image" href="{{ $image.RelPermalink }}" data-caption="{{ with $.Title }}{{ . }}{{ end }}">
<img src="{{ $resize.RelPermalink }}" {{ with $.Text }} alt="{{ . }}" {{ end }} {{ with $.Title}} title="{{ . }}"{{ end }} />
</a>
{{ end }}
{{ end }}
Apparently I have a *.svg
file on my blog somewhere, because that was a thing I had to catch right away for this to work. So I had to move all my images out of static
and into assets
for it to work, first of all. Then I had to figure out how to query a parent context, so I could fill in Text
and Title
with the images. That’s what the $
is in $.Text
. It’s the parent context outside of $image
.
Dump
Federal Postal Court
Oh man. Holy shit. If you haven’t seen this I consider you to be incredibly lucky. When I stumbled upon this “Federal Postal Court” nonsense I really couldn’t figure out what the fuck I was reading. This shit is absolutely fucking bananas.
I just don’t know where to start with this loon. He claims he has some mystical understanding of grammar and syntax that is “universally understood” as “mathematically supported”. I honestly can’t type enough quotes to encapsulate these absolutely asinine claims. I just can’t even with this guy. This is easily the dumbest shit I’ve stumbled upon in a very long time. And he’s an actively seeking con-man, too. He’s currently bilking anyone dumb enough to give him money a few hundred dollars per “claim of the life”.
Fancybox and Hugo Even
My theme apparently wraps every 
in another set of <a href=""></a>
tags that point to the source for the image. If you’re trying to generate galleries with a shortcode using fancyboxes, this default behavior is going to bite you in the ass. I forced the behavior to what I want/expect by copying assets/js/even.js
and assets/js/main.js
from themes/even
into my blog root assets/js/
. Then I hacked out the fancyboxes references in both files and regenerated. Boom, galleries work, and I didn’t lose anything of value in any previous posts. It’s a win/win for my specific situation.