4 ms·
I tried to apply the philosophy of keeping things as simple as possible while writing https://saityi.github.io/sml-tour https://saityi.github.io/sml-tour Initi
by saityi 6y ago
I tried to apply the philosophy of keeping things as simple as possible while writing https://saityi.github.io/sml-tour https://saityi.github.io/sml-tour
Initially, I wanted no JS and for it to look good in a text-based browser like links, too, but I've strayed from that a bit. Syntax highlighting of the code examples was easiest with a javascript include, and the TOC is a mess hidden by CSS, so it looks particularly egregious in text-based browsers.
The website is still functional without JS and text-only, though, and without the favicon and syntax highlighting it comes in at ~4kb to load a page, which I'm happy with; with them it's closer to 40kb, which isn't the worst.
- saagarjha 6y agoWhy not do the syntax highlighting beforehand instead of on the fly? For example, I use Rouge to highlight all my code as the site is generated.