Anyone notice that the featured images on post headers seemed to be a bit… well, bad? So did I, and I only just realized why that actually happens. And ironically, it was in the name of improvements. Luckily, with a little help from an upscaling AI, that’s not as bad of a problem, for now.Continue reading
By default, the Markdown renderer in Hugo, at this point in time, is Goldmark, a CommonMark compliant renderer.
CommonMark makes no provisions for manually specifying the
height of an image.
There’s various extensions, like those for Pandoc, Kramdown, and GFM, but Goldmark doesn’t support those.
Google is getting a little cranky with the amount of CLS on some pages, especially on mobile, so it’s a good idea for me to start specifying sizes for most images.
How should I do this? By hacking it on as a feature that is in no way the intended use for anything involved.
If you remember when I first added the Medium Zoom library, I wasn’t using one of its features: the ability to load a larger image when the user clicks to zoom in, only when the user wants to zoom in.
However, I added this later, and in that, the method I used was to use a Hugo shortcode to include the image with proper attributes in the
Well as it turns out, I don’t need to do this.
Now, I can have that happen automatically with standard Markdown
Now you might not see this too much since I plan to use the feature sparingly, categories and tags are both capable of sorting everything to a satisfactory level, but I’m using this thing that I just made to add extra little labels, which have a few cool uses.Continue reading
So here’s a short one for you: Do you like your temperatures expressed as °F, or °C?1
Well, there’s one fundamental issue with me writing like the way I have been. I can put, say, “I decreased temperatures by 20°F by cleaning the fans,” but if you’re a °C person, then you need to take a quick detour to convert that to units that you’re more familiar with. A common way to do this would be to notate that as “20°F (11.11 °C)”, which works, but I’m effectively stating myself twice, and hoping that I actually got my numbers right. Plus that opens up the possibility for writing °F (°C) one time, and °C (°F) another. So for basically no benefit except me getting to be proud of myself, let’s improve on that.Continue reading
Remember the time I added Medium Zoom? Well as it turns out, as I was reading through Zoom’s documentation, that you can specify a separate URL to load when the image zooms in. I like this, because I crop all my images to be (for landscape oriented) 1000 pixels wide, just slightly over the size of the content area that they go into. This is a serious reduction in size from the resolution they’re taken at. I do this just to improve load times, even with WebP and compression, extra pixels (that get resized to nothingness) are extra data that needs to be sent. And since it’s literally too big to be shown like that, I crop them so that pages load nearly instantly. The problem is that when you click on an image to see it, you get… basically nothing. I (because reasons) don’t have any old images so they’ll stay the same. But from now on, any images that are added in will have a detailed version that loads when you click to zoom.Continue reading
So I just checked in with initialcommit.com, the website run by Jacob Stopak, the same person I collaborated with to help explain the internals of version control systems, not once, but twice even. And he published an overview of how he made the site, and what tools he used. As I was looking, I noticed, we took a very different approach to get to two similar endpoints.
If you just want to see what I did, read on. If you want to see the differences, or are just curious about the various ways that sites can be built, read his first, then come back with that knowledge in mind.Continue reading
After reading on Kev Quirk’s blog post about including the full text of a post instead of just an excerpt, I’ve decided to do that here. And I’ll outline the before, after, and (naturally) all the steps in-between that caused much headache (and late-night coffee consumption).Continue reading
Yesterday I posted about Cloudflare’s cache, and if you didn’t notice (or read far enough down), there’s actual pie charts with data in them for visualization.
Yeah, so now I can add the Google Charts API and draw charts on any page that I like, and the best part is that it was surprisingly simple to do that.Continue reading