How this website is built

This site is statically generated from a set of org-mode formatted files. I wrote a script (in JavaScript, running via node) that roughly does the following:

  1. Reads the source .org file path from the command line arguments.
  2. Reads the first ~40 lines of the document to extract some optionally-provided metadata. Most importantly, the #+PANDOC_OPTS: line, if it exists, specifies additional options when invoking pandoc.
  3. Executes pandoc to convert the .org document into a .html string.
  4. Uses katex to render math elements. This is why Javascript is used in the build process. It removes much of the need for Javascript in the frontend.

This script is not invoked by the user directly. Rather, a makefile orchestrates the entire build process. It also manages the installation of npm packages (via yarn).

Not all dependencies are (yet) installed by the makefile. These are:

In the future, I would like to explore using GNU guix to vendorize these dependencies as well.


Created 2020-03-13. Last updated 2020-06-22. View source.