« Home

Cleaning Up HTML with Tidy

Posted by Elnu on

One issue with using static site generators that use templates like Hugo is that their generated HTML files are often incredibly messy, with bad indentation, tons of unneeded whitespace, and overall unconcise formatting. While it is technically possible to fix this in your templates, it takes a lot of effort, makes your templates less readable, and frankly is a waste of time.

To my knowledge, Hugo and most other generators don’t have built-in beautifiers. The reasoning for this is usually …

Read more »

Furigana in Markdown Using Regular Expressions

Posted by Elnu on
,

TL;DR: Here

Background

As I was building the current a previous version of this website, I came across an issue. In the previous version of the site which I made with Nuxt.js, a Vue.js-based JavaScript web development framework similar to the React-based Next.js, I used markdown-it for rendering my Markdown content. The great thing about markdown-it was how extensible it is: there are a vast number of available npm packages that extend its functionality beyond the base CommonMark …

Read more »