2 minutes
The 512KB Club and Debloating
I ran across Kev Quick’s announcement for The 512KB Club last month, and noticed that this blog, using the Academic theme for Hugo, was… a bit on the bloated side, clocking in at a whopping 748KB (including 246KB font, 206KB JS, and 190K CSS).
This became an added incentive for switching theme - something that’s already on the todo list after a previous theme update necessitates some painful configuration refactor.
I noticed that both figura.im and secluded.site use hello-friend-ng and clock in at under the limit – and sport cleaner looks as well, and finally got around to switch to the same theme today.
I had to fork the theme to remove prism.js
, which Amolith also did for secluded.site
, since it alone added over 300KB of JS; I might upstream it once I figure out how to make it optional (toggled only if a post contains source code, preferably).
Apart from that, and having to add aliases so I can put my posts in /content/posts
but have the old /content/post
links work, the switch is surprisingly painless. A bit annoyed that somehow /content/posts
is special when using this theme (the estimated reading times do not show up otherwise), and that simply symlinking post
to posts
doesn’t work (causes Hugo to only generate content for the former) – but that’s likely to do with me not grokking some Hugo peculiarities.
Time to submit this site, now that it clocks in at 205KB (most of it fonts)! I might go for the 256KB category; even with some added social icons it should squeeze in just fine.
This post is day 6 of my #100DaysToOffload challenge. Visit https://100daystooffload.com to get more info, or to get involved.
Have a comment on one of my posts? Start a discussion in my public inbox by sending an email to ~michel-slm/public-inbox@lists.sr.ht [mailing list etiquette]
Posts are also tooted to @michel_slm@floss.social
Comments
You can use your Mastodon account to reply to this post.
Reply