Просмотр исходного кода

Add publishing capabilities to markdown backend

* lisp/ox-md.el (org-md-publish-to-md): New function.

TINYCHANGE

Patch by Brice Waegenire
Carsten Dominik 11 лет назад
Родитель
Сommit
5c2b0dac7f
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      lisp/ox-md.el

+ 11 - 1
lisp/ox-md.el

@@ -31,7 +31,7 @@
 
 (eval-when-compile (require 'cl))
 (require 'ox-html)
-
+(require 'ox-publish)
 
 
 ;;; User-Configurable Variables
@@ -476,6 +476,16 @@ Return output file's name."
   (let ((outfile (org-export-output-file-name ".md" subtreep)))
     (org-export-to-file 'md outfile async subtreep visible-only)))
 
+;;;###autoload
+(defun org-md-publish-to-md (plist filename pub-dir)
+  "Publish an org file to Markdown.
+
+FILENAME is the filename of the Org file to be published.  PLIST
+is the property list for the given project.  PUB-DIR is the
+publishing directory.
+
+Return output file name."
+  (org-publish-org-to 'md filename ".md" plist pub-dir))
 
 (provide 'ox-md)