Skip to content

Commit

Permalink
defcustom to open exported file after export
Browse files Browse the repository at this point in the history
  • Loading branch information
mousebot committed May 12, 2022
1 parent 28091cc commit 008ad94
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ox-jekyll-md.el
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ want to choose a directory on saving."
use `org-jekyll-md-project-directory' with no prompt."
:group 'org-jekyll-md
:type 'boolean)

(defcustom org-jekyll-find-file-on-export nil
"Non-nil means open the Markdown file after exporting."
:group 'org-jekyll-md
:type 'boolean)

;;; Define Back-End
Expand Down Expand Up @@ -335,7 +339,9 @@ for a directory to save to."
(outfile (concat pub-dir
(org-jekyll-md-filename-date)
(org-export-output-file-name ".md" subtreep))))
(org-export-to-file 'jekyll outfile async subtreep visible-only)))
(org-export-to-file 'jekyll outfile async subtreep visible-only)
(when org-jekyll-md-find-file-on-export
(find-file outfile))))

;;;###autoload
(defun org-jekyll-md-publish-to-md (plist filename pub-dir)
Expand Down

0 comments on commit 008ad94

Please sign in to comment.