Tek's Domain

#<NTA:NnT:SSrgS:H6.6-198:W200-90.72:CBWg>

Doing What Markdown Can't: Specifying Image Width and Height

2021-04-29 7 min read Blog improvements My stuff Web stuff Teknikal_Domain Unable to load comment count

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 width or 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.

Continue reading

Detailed Images, With No Shortcodes

2021-04-28 5 min read Blog improvements My stuff Web stuff Teknikal_Domain Unable to load comment count

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 <img> tag. Well as it turns out, I don’t need to do this. Now, I can have that happen automatically with standard Markdown ![image links]().

Continue reading

Giving My Sitemap Some Style

2021-03-03 6 min read Behind the scenes Blog improvements Tech Web stuff Teknikal_Domain Unable to load comment count

Now I know I’ve talked about sitemap.xml before, but quick summary: that’s an XML file that has a list of every (public) URL on your site, to make it easier for crawlers to index your entire site since that list (or, map) lays it out. Well as an XML file, it can take XML style sheets, in a format called XSLT, short for XSL Transformations, short for eXtensible Stylesheet Language. Yes, it’s XML all the way down. But, if you’ve looked at my sitemap, you’ll see I’ve gone and done it. This is how.

Continue reading

Shortening My URLs With tekdmn.me

2021-02-08 6 min read Behind the scenes Blog improvements Programming Tech Web stuff Teknikal_Domain Unable to load comment count

Has anyone noticed that I’ve been giving out URLs of the form tekdmn.me and not teknikaldomain.me? Well, not only did I buy another domain that’s just a shorter version of this one, but it’s also, at the moment, the singular domain I have that’s 100% serverless. How? Cloudflare, obviously.

Continue reading

Using Cloudflare's HTTP/2 Server Push

2021-02-01 5 min read Behind the scenes Blog improvements Tech Today I Learned Web stuff Teknikal_Domain Unable to load comment count

For those unaware, when using Cloudflare to proxy your site, HTTP/2 support is usually on by default, and highly recommended, and you can also enable HTTP/3 too. But, for a while I thought that Cloudflare’s HTTP/2 would rob you of one of the really cool and touted features of HTTP/2: the server push. Well, as it turns out, that’s completely possible. Let’s dive in.

Continue reading

Temperatures as You Like

2021-01-27 4 min read Behind the scenes Blog improvements Programming Web stuff Teknikal_Domain Unable to load comment count

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

Making Footnotes More Accessible With Littlefoot

2021-01-26 3 min read Behind the scenes Blog improvements Tech Web stuff Teknikal_Domain Unable to load comment count

You all know how footnotes work here, right? A little superscript number at the end of a sentence, and a list of numbers at the very bottom of the article, usually little remarks or extra details that are useful but not worth interrupting the flow of the article as a whole (or references). There’s just one problem: the notes aren’t anywhere near their associated text, meaning if you do want to read them, you might need to do some bouncing back-and-forth to understand everything. Well, no more!

Continue reading

Adding proper TOCs to my posts (AKA theme update)

2021-01-24 3 min read Behind the scenes Blog improvements Tech Web stuff Teknikal_Domain Unable to load comment count
Fun fact: until recently, I’ve yet to update the Bilberry theme since I started this. Well, I just updated. And hopefully, you’ll see some changes immediately. Anyways, here’s the list of user-facing changes: Tables of Contents What I think is the biggest update here… proper support for a table of contents for a post, automatically generated off the headings. Well, not only is that a thing that can happen now by setting a variable in my posts, but I even have a shortcode for where this gets generated. Continue reading

Adding Detailed Zoom Images

2020-07-14 3 min read Behind the scenes Blog improvements Tech Web stuff Teknikal_Domain Unable to load comment count

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
Older posts