I am still working on this blog post.
This post is work in progress (WIP)
I am in the process of building my personal website that I intend to use mostly as a blog. I chose Jekyll in combination with GitHub Pages, which is a true and tested solution for personal and scientific blogs by now. There are countless fantastic tutorials that cover setting up a blog with Jekyll and GitHub Pages, for instance Cecil Woebker’s post.
Before building this website, I knew I would want my blog to have the following technical features:
While MathJax is an obvious choice for this, there exist some parsing problems when incorporating LaTeX equations in Markdown documents that get parsed by Jekyll.
This blog post describes the problem and suggests a solution: in short, by default Jekyll would misinterpret some $\LaTeX$ syntax as Markdown syntax and attempt to parse it accordingly.
Once this was sorted out, I needed to decide on the following issue: do I prefer that $\LaTeX$ equations are rendered as quickly as possible but the overall page load is slower, or do I prefer that the page load is as quick as possible with $\LaTeX$ equations rendered slowly?
The first block of code, from here, defines delimiters that tell MathJax what parts of the Jekyll-generated html file are $\LaTeX$ equations.
The last block of code is just the common mode of loading the current version of MathJax from a content distribution network (CDN), as described here.
What I need for this point on my features list is that I can get Jekyll to render the tag WIP as a visual badge or similar.
Naturally, most tutorials on numbering lines cover line numbers in code segments.