3 ms·
That's a fair point. My own blog runs a two-step process: I export org-mode posts to HTML with Emacs/Org-Mode exporter, and then rewrite the result in my static
by TeMPOraL 8y ago
That's a fair point. My own blog runs a two-step process: I export org-mode posts to HTML with Emacs/Org-Mode exporter, and then rewrite the result in my static generator.
- sondr3 8y agoDo you have a public repo for your blog? I couldn't find anything on GitHub.
- TeMPOraL 8y agoNah, the generator is so full of garbage code that I keep it as a private repo. The generator handles both new posts (org-exported to HTML) and old posts (Wordpress exports I dumped to org mode). A partial snippet of the code that handles new posts: https://gist.github.com/TeMPOraL/c401f12d50d4e1d4f94492e3d0f6a126 https://gist.github.com/TeMPOraL/c401f12d50d4e1d4f94492e3d0f... What's happening is that I take the HTML generated by Emacs Org Mode exporter, deserialize it to DOM, select a block corresponding to contents (to cut out superfluous stuff I don't need), and then run a bunch of tree-walkers that massages the DOM until it becomes something I can wrap with my site's scaffolding and dump into a file. It's really ugly, but gets the job done.