3 ms·
Do you have a public repo for your blog? I couldn't find anything on GitHub.
by sondr3 8y ago
Do 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.