> That's why I made the org-cm-export-file-to-haunt-dir function. It just
> exports the file in $haunt-blog/posts-org to $haunt-blog/posts/ .

Instead of doing that way, I would seek to emulate ox-html's approach. ox-html
has two functions, org-html-export-to-html [1], and org-html-publish-to-html
[2]. The former takes the org-source and outputs a HTML file. The latter hooks
into the org-publish framework and handles "publishing" the file to a given
directory.

Doing it that way allows the user to use the org publishing framework [3] to
configure their own directory mapping, and allows them to export not just
org-mode files, but other static content (like custom CSS and images) all at
once.

This would allow the user to use not just Haunt, but also any other static site
generator that works off of a directory of commonmark files.

[1]: 
https://cgit.git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/ox-html.el#n4084
[2]: 
https://cgit.git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/ox-html.el#n4124
[3]: https://orgmode.org/org.html#Project-alist

Thanks,
Rohit

Reply via email to