diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-04-22 16:00:32 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-04-22 16:00:32 -0400 |
| commit | cc3b48b7c1cc74a46438c8a5d4c59cf3a737049f (patch) | |
| tree | c40f94e05cd4de35419a1e99b7eb8a56f3b5f531 | |
| parent | efbfba0d9dbf14766b90dea5a78e6d7f97630f24 (diff) | |
Have 'ox-haunt-export-to-html export to the haunt directory
| -rw-r--r-- | ox-haunt.el | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/ox-haunt.el b/ox-haunt.el index 3e2cca3..5006757 100644 --- a/ox-haunt.el +++ b/ox-haunt.el @@ -136,13 +136,21 @@ valid executable." (&optional async subtreep visible-only body-only ext-plist) "Export current buffer to a Haunt post file." (interactive) - (let* ((extension (concat "." (or (plist-get ext-plist :html-extension) - org-html-extension - "html"))) - (file (org-export-output-file-name extension subtreep)) - (org-export-coding-system org-html-coding-system)) - (org-export-to-file 'haunt file - async subtreep visible-only body-only ext-plist))) + (let* ((info (org-combine-plists + (org-export--get-export-attributes + 'hugo subtreep visible-only) + (org-export--get-buffer-attributes) + (org-export-get-environment 'haunt subtreep))) + (dest-path (plist-get info :hugo-base-dir))) + (ox-haunt--check-base-dir dest-path) + (let* ((extension (concat "." (or (plist-get ext-plist :html-extension) + org-html-extension + "html"))) + (file (org-export-output-file-name extension subtreep)) + (file (concat dest-path "/posts/" file)) + (org-export-coding-system org-html-coding-system)) + (org-export-to-file 'haunt file + async subtreep visible-only body-only ext-plist)))) (provide 'ox-haunt) ;;; ox-haunt.el ends here |