;;; build-projects.el --- org-publish project configuration -*- lexical-binding: t; -*- ;;; Code: (require 'ox-publish) (defun z/org-main-prep (_project) "Pre-publish hook: regenerate recently-updated.org." (z/log 'step "Generating recently-updated.org...") (z/with-timing "recently-updated generation" (z/generate-recently-updated-org 26))) (defun z/configure-publish-projects () "Install `org-publish-project-alist' for the site." (setq org-publish-project-alist `(("org-main" :recursive t :base-directory ,(site-path "") :publishing-function z/z-publish-to-html :publishing-directory ,(output-path "") :base-extension "org" :auto-sitemap t :sitemap-filename "sitemap.org" :sitemap-title "Sitemap" :sitemap-function z/main-sitemap :sitemap-sort-files chronologically :html-preamble ,z/preamble :html-postamble ,z/postamble :html-head ,z/shared-head :preparation-function z/org-main-prep) ("org-assets" :base-directory ,(site-path "assets/") :base-extension "css\\|js\\|png\\|jpg\\|jpeg\\|gif\\|webp\\|svg\\|pdf\\|mp4\\|webm\\|mov\\|woff\\|woff2\\|ttf" :publishing-directory ,(output-path "assets/") :recursive t :publishing-function org-publish-attachment) ("org-categories-sitemap" :recursive t :base-directory ,(site-path "home/") :publishing-directory ,(output-path "home/") :base-extension "org" :auto-sitemap t :sitemap-filename "categories.org" :sitemap-title "Categories" :sitemap-function z/categories-sitemap :html-preamble ,z/preamble :html-postamble ,z/postamble :html-head ,z/shared-head) ("org-posts" :base-directory ,(site-path "posts/") :publishing-directory ,(output-path "posts/") :recursive t :base-extension "org" :publishing-function z/z-publish-to-html :with-author nil :with-creator nil :html-validation-link nil :with-toc t :section-numbers t :html-preamble ,z/preamble :html-postamble ,z/postamble :auto-sitemap t :sitemap-filename "posts-list.org" :sitemap-title "Posts List" :sitemap-style list :sitemap-function z/posts-sitemap :sitemap-sort-files anti-chronologically :html-head ,z/shared-head) ("org-blogs" :base-directory ,(site-path "blogs/") :publishing-directory ,(output-path "blogs/") :recursive t :base-extension "org" :publishing-function z/z-publish-to-html :with-author nil :with-creator nil :html-validation-link nil :html-preamble ,z/preamble :html-postamble ,z/postamble :auto-sitemap t :sitemap-filename "blogs-list.org" :sitemap-title "Blogs List" :sitemap-style list :sitemap-function z/blogs-grouped-sitemap :sitemap-sort-files anti-chronologically :html-head ,z/shared-head) ("org-career" :base-directory ,(site-path "posts/career/") :publishing-directory ,(output-path "posts/career/") :recursive t :base-extension "org" :publishing-function z/z-publish-to-html :html-preamble ,z/preamble :html-postamble ,z/postamble :auto-sitemap t :sitemap-filename "career-list.org" :sitemap-title "Career List" :sitemap-style list :sitemap-function z/career-sitemap :sitemap-sort-files anti-chronologically :html-head ,z/shared-head) ("org-tags" :base-directory ,(site-path "tags/") :publishing-directory ,(output-path "tags/") :recursive t :base-extension "org" :publishing-function org-html-publish-to-html :html-preamble ,z/preamble :html-postamble ,z/postamble :html-head ,z/shared-head) ("org-lima" :base-directory ,(site-path "lima/") :publishing-directory ,(output-path "lima/") :recursive t :base-extension "org\\|md" :publishing-function z/publish-lima-file :with-author nil :with-creator nil :html-validation-link nil :html-preamble ,z/preamble :html-postamble ,z/postamble :sitemap-filename "lima-list.org" :auto-sitemap t :sitemap-title "Lima" :sitemap-style list :sitemap-sort-files anti-chronologically :sitemap-format-entry z/lima-sitemap-format-entry :html-head ,z/shared-head)))) (provide 'build-projects) ;;; build-projects.el ends here