Blogging in LaTeX, 2021 edition
This is first in series of posts about blogging with LaTeX using TeX4ht. I’ve set it up as a showcase of TeX4ht features for TUG 2021 conference. I didn’t show it in the end, because I ran out of the allocated time for the presentation length, and also didn’t finish all posts on time. At the present time, the articles are drafts. I will update them over time, but my progress, as usual with my writing, can be slow.
1 Why would you do such a crazy thing?
I like to write my documents in LaTeX, and I want to provide an alternative to other markup languages. Contrary to some claims, it isn’t hard to compile LaTeX to HTML, you just need to take some precautions.
2 Overview of the setup
- Use TeX4ht to produce files suitable for static site generators.
- Use static site generator, like Jekyll or Hugo , to produce a web site.
- Use Github Actions to automatically compile LaTeX files pushed to the repository, and recompile the web site.
I will tell more on how to set up an automatic blog publishing using Jekyll, Github Pages and Github Actions in the following posts.
The code for this blog is available at https://github.com/michal-h21/testblog.
Notable files and directories are:
- Build file for make4ht.
- LaTeX documents root.
- Script which forces rebuild only changed files. We don’t want to compile all LaTeX files on every blog update.
- Github Actions workflow file.