From 879aef7f899a164f40604bfcecd7820e959b11df Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 25 Nov 2013 01:29:47 +0100 Subject: [PATCH] Separate export of articles To keep Creation dates somewhat more close to their actual creation date. --- Makefile | 6 ++++-- articles/Makefile | 6 ++++++ articles/project.el | 18 ++++++++++++++++++ common.el | 4 ++++ project.el | 19 ++++++++++++++----- 5 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 articles/Makefile create mode 100644 articles/project.el create mode 100644 common.el diff --git a/Makefile b/Makefile index bfdaa73..7c35ec7 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ all: clean: - rm -rf _publish + rm -f _publish/*.* + rm -rf _publish/projects export: clean - emacs -L ~/.emacs.d/vendor-lisp/org/lisp \ + emacs -L $(CURDIR) -L ~/.emacs.d/vendor-lisp/org/lisp \ -L ~/.emacs.d/vendor-lisp/org/contrib/lisp -batch -l project.el \ -f org-publish-all + $(MAKE) -C articles export publish: export rsync -avuz --exclude=*~ _publish/ ryuslash.org:public_html/orgweb diff --git a/articles/Makefile b/articles/Makefile new file mode 100644 index 0000000..3782fe7 --- /dev/null +++ b/articles/Makefile @@ -0,0 +1,6 @@ +all: + +export: + emacs -L $(CURDIR) -L ~/.emacs.d/vendor-lisp/org/lisp \ + -L ~/.emacs.d/vendor-lisp/org/contrib/lisp -batch -l project.el \ + -f org-publish-all diff --git a/articles/project.el b/articles/project.el new file mode 100644 index 0000000..5c65cfc --- /dev/null +++ b/articles/project.el @@ -0,0 +1,18 @@ +(require 'org-publish) + +(load "../common.el") + +(setq org-publish-use-timestamps-flag t + org-publish-project-alist + '(("blog" + :base-directory "./" + :publishing-directory "../_publish/articles/" + :recursive nil + :base-extension "org" + :publishing-function org-html-publish-to-html + :section-numbers nil + :table-of-contents nil + :html-doctype "" + :html-head "" + :html-link-up "../blog.html" + :html-link-home "/"))) diff --git a/common.el b/common.el new file mode 100644 index 0000000..2fcdf9d --- /dev/null +++ b/common.el @@ -0,0 +1,4 @@ +(setq org-html-head-include-scripts nil + org-html-validation-link nil + org-html-htmlize-output-type 'css + org-confirm-babel-evaluate nil) diff --git a/project.el b/project.el index f712d6d..36ad5fe 100644 --- a/project.el +++ b/project.el @@ -2,6 +2,8 @@ (require 'ox-rss) ;; (require 'ox-html) +(load "common.el") + ;; (defun org-html-template (contents info) ;; "Return complete document string after HTML conversion. ;; CONTENTS is the transcoded contents string. INFO is a plist @@ -130,12 +132,8 @@ ;; toc-entries "") ;; (org-html--make-string (- prev-level start-level) "\n\n")))) -(setq org-html-head-include-scripts nil - org-html-validation-link nil - org-publish-use-timestamps-flag nil - org-html-htmlize-output-type 'css +(setq org-publish-use-timestamps-flag nil org-rss-extension "rss" - org-confirm-babel-evaluate nil org-publish-project-alist '(("oni-files" :base-directory "./" @@ -146,6 +144,17 @@ ("org" :base-directory "./" :publishing-directory "_publish/" + :recursive nil + :base-extension "org" + :publishing-function org-html-publish-to-html + :section-numbers nil + :table-of-contents 1 + :html-doctype "" + :html-head "" + :html-link-home "https://ryuslash.org") + ("projects" + :base-directory "./projects/" + :publishing-directory "_publish/projects/" :recursive t :base-extension "org" :publishing-function org-html-publish-to-html