Jake B has a helpful video on exporting Org files to HTML. Irreal readers almost certainly knows how to do this so why am I writing about it? As you know, you can tweak your Org file to pull in CSS files that alter what the exported HTML will look like when you export it with org-export-dispatch
(Ctrl+c Ctrl+e) so that it will appear nicer than the default plain HTML output. The video shows how easy this is.
Jake B starts with getting rid of section numbering and the Table of Contents. That’s simply a matter of a couple of options but the real win comes with using Fabrice Niessen’s readtheorg CSS files that provide a really beautiful layout. I always thought that using Niessen’s themes involved a bunch of cloning and configuration but that’s not true. As Jake B shows, all you need do is add the line
where NAME is either readtheorg
or bigblow
.
Finally, Jake B shows how to add your own CSS. With the exception of the CSS file itself, that’s also a one-liner:
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="styles.css"/>
assuming your CSS file is styles.css
.
I started by saying Jake B’s post is helpful because it shows how easy it is to improve the default HTML exported from an Org file. If you use one of Niessen’s templates, it’s a matter of adding a single line. Use one of those templates or your own CSS and increase the beauty in the world.