2020-09-03 08:44:27 +00:00
|
|
|
(require 'package)
|
2021-10-23 18:15:44 +00:00
|
|
|
(require 'org)
|
2022-06-07 13:47:00 +00:00
|
|
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
2020-09-03 08:44:27 +00:00
|
|
|
(package-initialize)
|
|
|
|
(package-refresh-contents)
|
2023-09-18 16:45:14 +00:00
|
|
|
(package-install 'f)
|
|
|
|
(package-install 'ox-gfm)
|
|
|
|
|
|
|
|
(message "Emacs directory: %s" user-emacs-directory)
|
|
|
|
|
|
|
|
(require 'f)
|
|
|
|
(require 'ox-gfm)
|
|
|
|
(require 'ox-publish)
|
2021-11-22 16:17:06 +00:00
|
|
|
|
2020-09-03 10:52:27 +00:00
|
|
|
(setq org-confirm-babel-evaluate nil
|
2021-11-28 21:47:27 +00:00
|
|
|
org-html-validation-link nil
|
|
|
|
make-backup-files nil)
|
2021-11-22 16:17:06 +00:00
|
|
|
|
2023-09-18 16:45:14 +00:00
|
|
|
(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 'gfm (concat (f-no-ext file) ".md"))))
|
2021-11-22 16:17:06 +00:00
|
|
|
|
2023-09-18 16:45:14 +00:00
|
|
|
(message "Project generated!")
|