瀏覽代碼

ox-md: Add publishing function to back-end

korthaerd 11 年之前
父節點
當前提交
f6bf7eee79
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. 12 1
      lisp/ox-md.el

+ 12 - 1
lisp/ox-md.el

@@ -31,7 +31,7 @@
 
 (eval-when-compile (require 'cl))
 (require 'ox-html)
-
+(require 'ox-publish)
 
 
 ;;; User-Configurable Variables
@@ -477,6 +477,17 @@ Return output file's name."
     (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)
 
 ;; Local variables: