About this site
1. Making the site
For a long time I liked to have a homepage/blog:
- With pages in Tufte style, so that I can include remarks and figures in the margin;
- Exercises that have hidden, but clickable, hints and solutions;
- Written in org mode and emacs.
Exercises, theorems, algorithms, and expandable hints and solutions share a
small Org exporter in defblock.el. Numbering follows the expanded document,
including included files. Course chapters also have a contents list and links
to the previous and next chapters in book order.
These links helped me starting.
- https://parsec.ro/
- https://github.com/ctanas/parsec-lisp
- https://github.com/alhassy/org-special-block-extras
Here is some material that I should study at a later time:
The site uses Emacs, Org, ox-tufte, MathJax 4, and Pygments. Pseudocode blocks
use KaTeX through pseudocode.js. Install Emacs and the pygmentize command,
then install the Emacs packages once:
make setup
Build changed pages with make. After changing templates, build scripts,
shared macros, or the course chapter order, rebuild every page with make force.
Publishing uses the installed packages and does not refresh package archives.
Run make check to check block numbering, references, and chapter navigation.
The output defaults to ~/tmp/sites/homepage. To build a separate preview:
make force PUBLISH_DIR=/tmp/homepage-preview
python -m http.server --directory /tmp/homepage-preview
Course sources and shared KaTeX files live outside this directory; their paths
are configured in courses.el and katex.el. MathJax 4 is the default; to
build the site with KaTeX instead, run make force MATH_RENDERER=katex. See
MATHRENDERER.md for preview and deployment steps.
To view it locally, run python -m http.server in /tmp/sites/homepage.
Then open localhost:8000 in Firefox.