Miscellany
I’ve been trying to publish more focused articles in this
series lately: I’ve written separately about
disabling Webmentions, adopting the cite
element, and improving code
blocks. I think I prefer this approach. An article
ought to be a conceptual whole and its sections should all relate to that underlying concept.
However, I do now have a lot of notes from the past three months too short to merit their own entries, which I thought I would collect here. To wit:
-
I was forced to make a backwards-incompatible change to the URIs so they can include the type of the work. For example, the series page for my thoughts on Percy Jackson and the Olympians is now found at /series/thoughts-spoilers-books-percy-jackson-and-the-olympians-2005/ instead of /series/thoughts-spoilers-percy-jackson-and-the-olympians-2005/.
I would have liked to be able to use redirects to hide the change, but Netlify’s syntax—and, to be fair, most syntax for redirects—is limited, so it isn’t possible to differentiate between the two. (Now that I think about it, I suppose I could have manually added redirects for every single existing series. Fortunately, I don’t believe anyone was visiting those pages directly in any case.)
-
A pinyin title with a jarring fallback glyph at the end and the same title in Noto Sans Thoughts metadata can now list translators and alternative titles. (See, for example, my thoughts on The Red Notebook .)
This causes a new problem: the alternative titles are likely to contain characters that aren’t found in Adobe Garamond Pro. I considered adding the relatively comprehensive Noto Sans to render those alternative titles, but it would be 283 KB just for one weight.
I’m exploring my options in terms of font subsetting, which I would ideally like to apply to all the fonts on this website. The two hurdles are determining the required subset of characters, which can only really be done by visiting every single page in a browser, and creating the smaller font files, which generally seems to involve Python, adding further complexity.
-
Books can have multiple authors, which will now be formatted correctly when displayed. Previously, multiple authors were all placed in the same field on the backend and treated as a single literal author.
-
There used to be a field in the thoughts metadata for ‘Watched:’ (or the equivalent). This seemed ambiguous to me, as it didn’t state whether it included the current iteration (which it did). I replaced it with ‘Previously watched:’ (or its equivalent) for clarity.
-
Thoughts metadata can indicate the position in the series.
-
I added
:ins
/:::ins
and:del
/:::del
directives so I can mark additions and deletions and updated all extant entries accordingly. Only the inline variants (:ins
and:del
) are currently highlighted in any way. I don’t know how they should be styled. Screen readers don’t usually treat them specially either. -
I added a
:quote
directive to use nearly everywhere instead of<q>
. -
Image widths and heights are now always integral values.
-
I’m using a new plugin I built for
kbd
elements. More on that sometime soon. -
I added styling for horizontal rules to use in a single entry where subheadings didn’t seem appropriate.
-
It turned out I was using the entire mdast-util-gfm module instead of just the strikethrough module as I wanted. Correcting this removed some annoying autolinking behaviour.
-
I added special styling for ‘redacted’ text as seen in Conversations with Tech Support.
-
Nested lists look better.
-
The paragraph at the end of an article indicating its position in the series is more prominent and distinct.
-
The regular weight of Adobe Garamond Pro is preloaded for better performance, since I know it’s used on every page.
-
This site no longer uses Subresource Integrity via posthtml-sri. The plugin was following links to resources where I didn’t want it to, drastically increasing the build time. As I was considering my options, I noticed I no longer use any external resources (even the fonts are now served directly from shivjm.blog), so SRI is not particularly advantageous.
-
I dropped versioned URIs so Netlify can handle caching and invalidation. I was already relying on those things for images, so I decided to stop fighting it for my CSS and JavaScript files.
-
I did a lot of refactoring on the JavaScript side. It won’t have any impact on the output, but I significantly improved the organization and added documentation for most things, so it makes me feel much better.