How the Site is Built
I’m truly grateful to all the generous developers whose open source software makes this site possible. They certainly deserve acknowledgment as well as other forms of support. And since some readers might be curious to learn the reasons behind my choices, a brief post on the site’s construction seemed appropriate. When I began to contemplate a new blog, there were really only two requirements, and they both seemed fairly simple:
- No JavaScript in the browser.
- Nicely rendered mathematics.
It turns out that those requirements aren’t so trivial after all. The two major math rendering libraries are both designed to run as JavaScript in the browser. In theory, both can also execute in a node.js
environment during the build process, but that approach introduces significant complexity and compromises. Furthermore, the output formats seem to be limited to unattractive SVG graphics or a Rube Goldberg combination of HTML, web components, and CSS.
Fortunately, modern browsers have pretty good support for MathML and there are tools that generate MathML from LaTeX input. So it’s possible to write mathematics in the format familiar to most mathematical authors:
\def\d{\mathrm{d}}
\oint_C \vec{B}\circ \d\vec{l} = \mu_0
\left(
I_{\text{enc}} +
\varepsilon_0
\frac{\d}{\d t}
\int_S {\vec{E} \circ \hat{n}}\; \d a
\right)
And have it appear as a nice equation whose styling perfectly matches other content on the site:
With a solution for mathematical content, putting everything together was pretty straightforward. There are plenty of static site generating applications, but Eleventy looked like a good fit for me. It provides easy control over the HTML and CSS that ultimately make up the site, and it’s implemented in language (JavaScript) and environment (node.js
) with which I have a lot of familiarity. I’ve tried to keep other dependencies to a minimum, so most of the functionality is built into Eleventy. The site does rely on a few extensions, however, As of this writing, the applications, libraries, and tools that produce this site include:
- Static site generator: Eleventy.
- Math rendering: Ron Kok’s TEMML via Trae Blain’s plugin.
- Additional markdown plugins for subscripts, superscripts, and, from Martin Ring, table captions.
- Theme: Adopted from Vincent Dörig’s awesome LATEX.css.
- Fonts: Latin Modern families from GUST.
- Icons: Material Icons, brand icons, and custom.
For the writing process itself the typora editor from appmakes deserves a special acknowledgment. I’ve been using it since the early beta releases, and it was the primary writing tool for my last book, my PhD thesis, and various academic papers.