Browse Source

ox-html.el and ox-org.el: Use the custom HTML extension.

* ox-org.el (org-org-publish-to-org):
* ox-html.el (org-html-publish-to-html): Use the custom
extension.

Thanks to Ian Barton for reporting this.
Bastien Guerry 12 years ago
parent
commit
a597a8b622
2 changed files with 7 additions and 2 deletions
  1. 4 1
      lisp/ox-html.el
  2. 3 1
      lisp/ox-org.el

+ 4 - 1
lisp/ox-html.el

@@ -3248,7 +3248,10 @@ is the property list for the given project.  PUB-DIR is the
 publishing directory.
 
 Return output file name."
-  (org-publish-org-to 'html filename ".html" plist pub-dir))
+  (org-publish-org-to 'html filename
+		      (concat "." (or (plist-get plist :html-extension)
+				      org-html-extension "html"))
+		      plist pub-dir))
 
 
 ;;; FIXME

+ 3 - 1
lisp/ox-org.el

@@ -146,6 +146,8 @@ Return output file name."
     (require 'ox-html)
     (let* ((org-inhibit-startup t)
 	   (htmlize-output-type 'css)
+	   (html-ext (concat "." (or (plist-get plist :html-extension)
+				     org-html-extension "html")))
 	   (visitingp (find-buffer-visiting filename))
 	   (work-buffer (or visitingp (find-file filename)))
 	   newbuf)
@@ -160,7 +162,7 @@ Return output file name."
 		(format
 		 "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">"
 		 org-org-htmlized-css-url) t t)))
-	(write-file (concat pub-dir (file-name-nondirectory filename) ".html")))
+	(write-file (concat pub-dir (file-name-nondirectory filename) html-ext)))
       (kill-buffer newbuf)
       (unless visitingp (kill-buffer work-buffer)))
     (set-buffer-modified-p nil)))