(require 'package) (package-initialize) (require 'org) (require 'org-id) (require 'ox-publish) (require 'ox-html) (require 'oc) (require 'oc-basic) (require 'cl-lib) (require 'gnuplot) (require 'gnuplot-mode) (require 'ob) (require 'ob-gnuplot) (org-babel-do-load-languages 'org-babel-load-languages '((gnuplot . t))) (setq org-confirm-babel-evaluate nil) (setq org-html-coding-system 'utf-8-unix) (defconst ymhg-notes-dir (file-name-directory (or load-file-name buffer-file-name))) (defconst site-attachments (regexp-opt '("jpg" "jpeg" "gif" "png" "svg" "ico" "cur" "css" "js" "woff" "html" "pdf" "js"))) (setq org-publish-project-alist (list (list "ymhg-notes-org" :base-directory (concat ymhg-notes-dir "notes") :base-extension "org" :publishing-function #'org-html-publish-to-html :publishing-directory (concat ymhg-notes-dir "public") :exclude (regexp-opt '("README" "draft")) :auto-sitemap t :sitemap-filename (concat ymhg-notes-dir "notes/index.org") :sitemap-file-entry-format "%d *%t*" :sitemap-title "Yann's Notes" :html-html5-fancy t :html-divs '((preamble "header" "header") (content "article" "content") (postamble "footer" "postamble")) :html-container "section" :html-metadata-timestamp-format "%Y-%m-%d" :html-checkbox-type 'html :html-doctype "html5" :html-head-include-default-style nil :html-table-caption-above t :html-postamble "" :html-head "") (list "ymhg-notes-static" :base-directory (concat ymhg-notes-dir "notes/static") :include '() :exclude "assets/\\|public/\\|README.md" :base-extension site-attachments :publishing-directory (concat ymhg-notes-dir "public/static") :publishing-function #'org-publish-attachment :recursive t) (list "ymhg-notes-css" :base-directory (concat ymhg-notes-dir "css") :base-extension "css" :publishing-directory (concat ymhg-notes-dir "public/css") :publishing-function #'org-publish-attachment) (list "ymhg-notes" :components '("ymhg-notes-org" "ymhg-notes-static" "ymhg-notes-css"))))