Zettlr, Markdown, HTML Publishing Computers, Programming

Zettlr, Markdown, HTML Publishing

Some notes from my first attempts at using Zettlr and Markdown and manipulating Pandoc.

Zettler, Markdown, HTML Publishing

Markdown is fabulous. In the past I have used HTML or LaTeX for my writing but mostly write in plain text (i.e. .txt). I despise word processors and the bloated, incompatible, dependent files they produce. I use InDesign or Illustrator if I want to design something purely for aesthetics, or mess around in Google Docs if I have to for some reason, but never for anything of my own. I find word processors inconsistent, incompatible, and unreliable.

I decided to convert to Markdown. It’s still just plain text. It’s as fast to write as .txt, and very easy to read in it’s raw form. At the same time it is so easy to publish into other things. I started by experimenting with Python to convert Markdown files different kinds of HTML. I embedded a simple classless Pico.css stylesheet and some CSS overrides to my taste, embedded images using base64 encoding, and embedded fonts in .woff2 format. I used Pandoc with a custom template and simple LUA filter for this. It is easy to use MathML or MathJax for scientific or math notes. The experiment was fun and productive and the results were pretty cool.

Then I decided to try Zettlr. It’s open-source, standards compliant, cross platform, and doesn’t introduce any propriety to any part of the workflow. It’s just a simple Markdown editor with Pandoc capacity built in. I set it up and replicated everything my Python script could do but in a far more stable and capable manner. Then I tried another export workflow that exports to a local folder that mirrors to my VPS. The result? A very easy to maintain static website publishing process, if I care to use it. And PDF exporting using the same tools should be just as easy.

What a glorious bit of technology!

References

Wikipedia is my Bible…

Search Titles & Keywords