conlang.phundrak.com/export.el
Lucien Cartier-Tilet 2134600c0a
chore(export): change from ox-gfm to built-in ox-md
HTML tables are better supported in Vuepress than Markdown tables
2023-12-17 21:31:17 +01:00

28 lines
743 B
EmacsLisp

(require 'package)
(require 'org)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'f)
(message "Emacs directory: %s" user-emacs-directory)
(require 'f)
(require 'ox-md)
(require 'ox-publish)
(setq org-confirm-babel-evaluate nil
org-html-validation-link nil
make-backup-files nil)
(defvar project-root
(file-name-as-directory (expand-file-name "docs" default-directory)))
(dolist (file (f-files project-root (lambda (file) (f-ext-p file "org")) t))
(message "Exporting %s" (f-relative file))
(with-temp-buffer
(find-file file)
(org-export-to-file 'md (concat (f-no-ext file) ".md"))))
(message "Project generated!")