;; Copyright (C) 2021-2022 Yuchen Pei. ;; This file is part of site generator for libreau.org (libreau for short). ;; libreau is free software: you can redistribute it and/or modify it ;; under the terms of the GNU Affero General Public License as ;; published by the Free Software Foundation, either version 3 of the ;; License, or (at your option) any later version. ;; libreau is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU Affero General Public License for more details. ;; You should have received a copy of the GNU Affero General Public License ;; along with libreau. If not, see . (package-initialize) (require 'ox-publish) (defun me/html-preamble (plist) (with-temp-buffer (insert-file-contents "../html-templates/preamble.html") (buffer-string))) (defun me/html-postamble (plist) (with-temp-buffer (insert-file-contents "../html-templates/postamble.html") (buffer-string))) (setq org-publish-project-alist '(("pages" :base-directory "pages" :base-extension "org" :publishing-directory "site" :recursive t :publishing-function org-html-publish-to-html :html-head "" :html-prefer-user-labels t :html-mathjax-options nil :html-mathjax-template "" :with-toc nil :section-numbers nil :html-self-link-headlines t :html-preamble me/html-preamble :html-postamble me/html-postamble ) ("pages-html" :base-directory "pages" :base-extension "html" :publishing-directory "site" :recursive t :publishing-function org-publish-attachment) ("css" :base-directory "css" :base-extension "css" :publishing-directory "site/css" :publishing-function org-publish-attachment :recursive t ) ("all" :components ("pages" "pages-html" "css"))))