Math Rendering is Wrong

Daniel:

Since I first started working on my website at age fourteen, the site has gone through many revisions, and hopefully changed for the better. This blog was originally dynamically served using a Python/Flask backend, having a custom login system and post “editor” (just an input box). One of the more strange things about my website, though, was how I displayed content.

It was clear to me, even at my young age, that writing raw HTML was suboptimal. Somehow (perhaps through GitHub) I heard about Markdown, and realized that a human-readable markup language was probably a much better way to go. What remained was, of course, rendering the content. The easiest way I found was to just stick a JavaScript script, calling out to marked, to run on page load and convert all the markup into pretty HTML.

This rendering would happen on every page load. Every time I navigated between pages on my site, for a second or two, I’d see the raw, unrendered Markdown that I had written, which would then disappear and be replaced with a proper view of the page’s content. The rendering wasn’t error-proof, either. If my connection was particularly slow (which it was, thanks, Comcast), or if I forgot to disable uMatrix, I would be left having to sift through the frequent occurences of #, _, *… Eventually I realized my mistake, and switched to rendering Markdown on the backend. Now, my content would appear to the user already formatted, and they wouldn’t have to wait for a JavaScript program to finish to read what I had written. All was well.