Created
July 1, 2012 03:37
-
-
Save Frozenlock/3026701 to your computer and use it in GitHub Desktop.
Export org document for Noir webserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-org-html-export () | |
"Export an org document to a .html file, without the preamble, | |
postamble and css. Also make sure the image path is compatible with Noir." | |
(interactive) | |
(let ((exported-html-file (concat (file-name-sans-extension (buffer-file-name)) ".html")) | |
(exported-html (org-export-as-html 3 nil nil 'string 'body-only))) | |
(with-temp-file exported-html-file | |
(insert exported-html) | |
(goto-char (point-min)) | |
(replace-string "./" "/")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment