Migrating from Hugo to Hexo
Due to a lack of official support for server-side rendered latex mathematics in Hugo, I’ve decided to port my website to the JavaScript static site generator Hexo.
Previously, I was using an approach inspired by graemephi’s katex workaround but found that this approach was brittle to upstream changes made in Hugo’s core and slowed down the site generation time considerably.
While porting over my site, I struggled with subtle terminology differences and template languages used by the two frameworks. eg) Hugo posts
are Hexo archives
; rather than Golang templates, embedded JavaScript templates ejs
is used by the example theme (which I based mine off of).
I have redesigned the theme to follow the practical typography book, with a few minor modifications, such as decreasing the default font-size slightly.
The dark/light mode toggling functionality is pending a full rewrite, as I am unsatisfied with my original implementation that uses the css invert()
filter function.
This original invert logic caused too much tearing and glitch-esque artifacts on my mobile device and no longer is up to my aesthetic standard.
Pending future motivation and availability, I need to update all of the inline-math snippets in my prior posts to use the new mathjax
shortcodes.
Inline math
Large formulas are still displayed when kept standalone.
It is not necessary to distinguish between display and inline math.
I miss the live-reloading browser on source file edit- it is surprising to me that this is not default behavior (I guess I am spoiled).
More work needs to be done to ensure no global x-overflow scrolling occurs.
This is functionality that I aim to add back into the theme next.
The current state of this theme is also missing a sitemap and RSS feed.