From cf2c953c16847322cd4d41bcf25d205c5d1b32cc Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Tue, 7 Jun 2022 23:45:33 +0300 Subject: [PATCH] Extract publishing related code from the core config --- .emacs.d/esy.org | 107 ++--------------------------------------------- 1 file changed, 3 insertions(+), 104 deletions(-) diff --git a/.emacs.d/esy.org b/.emacs.d/esy.org index c4df5c9..6b2f530 100644 --- a/.emacs.d/esy.org +++ b/.emacs.d/esy.org @@ -16,9 +16,9 @@ This document holds my customizations for GNU Emacs. Its source version is writt scattered throughout this document are bundled together to create an Elisp library called =esy.el=, which Emacs executes on startup. -The source of this document is managed with Git in [[https://git.sr.ht/~eshel/dotfiles][my dotfiles repository hosted on -SourceHut]]. An [[https://eshelyaron.com/esy.html][online HTML version]] is also published on my website. See [[#exporting][settings for -exporting and publishing]] below for more information regarding [[https://eshelyaron.com][my website]]. +The source of this document is managed with Git in [[https://git.sr.ht/~eshel/dotfiles][my dotfiles +repository hosted on SourceHut]]. An [[https://eshelyaron.com/esy.html][online HTML version of this Emacs +configuration]] is also published on my website. ** Last modification time :PROPERTIES: @@ -419,107 +419,6 @@ refiling directly into deeper headings as well. #'esy/org-maybe-prompt-custom-id))))) #+end_src -** Export and publish -:PROPERTIES: -:CUSTOM_ID: exporting -:END: - -#+begin_src emacs-lisp - (require 'f) - - (defconst esy/website-source-root "~/checkouts/eshelyaron.com" - "Local path of my website sources") - - (defconst esy/website-source-org (expand-file-name "org" - esy/website-source-root) - "Local path of my website Org files") - - (defconst esy/website-target-root "/ssh:root@direct.eshelyaron.com:/var/www" - "Remote path of my website pages") - - (defconst esy/website-target-html (concat esy/website-target-root "/html") - "Remote path of my website pages") - - (defconst esy/website-html-header - "" - "HTML Header of my website pages") - - (defconst esy/publish-project-index-template - `( :base-extension "org" - :base-directory ,esy/website-source-org - :exclude ".*" - :include ("index.org") - :publishing-function org-html-publish-to-html - :html-head ,esy/website-html-header - :html-postamble ,(f-read-text - "~/checkouts/eshelyaron.com/org/html_postamble.html")) - "Template for the index page of my website") - - (defconst esy/publish-project-config-template - `( :base-extension "org" - :base-directory ,(expand-file-name - "dotfiles/.emacs.d" - esy/website-source-root) - :exclude ".*" - :include ("esy.org") - :publishing-function org-html-publish-to-html - :html-head ,esy/website-html-header - :html-postamble ,(f-read-text - "~/checkouts/eshelyaron.com/org/html_postamble.html")) - "Template for the index page of my website") - - (defconst esy/publish-project-static-template - `( :base-directory ,esy/website-source-org - :base-extension "ico\\|css\\|jpg\\|gif\\|png\\|txt\\|pdf" - :recursive t - :publishing-function org-publish-attachment) - "Template for the static assets of my website") - - (with-eval-after-load 'ox-publish - (require 'ox-html) - (require 'htmlize) - (setq org-export-with-section-numbers nil - org-html-html5-fancy t - org-html-doctype "html5" - org-html-head-include-default-style nil - org-html-head-include-scripts nil - org-html-htmlize-output-type 'css - org-publish-project-alist - `(("index" - :publishing-directory ,esy/website-target-html - . - ,esy/publish-project-index-template) - ("static" - :publishing-directory ,esy/website-target-html - . - ,esy/publish-project-static-template) - ("config" - :publishing-directory ,esy/website-target-html - . - ,esy/publish-project-config-template) - ("eshelyaron.com" :components ("index" - "static" - "config")) - ("index.local" - :publishing-directory ,(expand-file-name "html" - esy/website-source-root) - . - ,esy/publish-project-index-template) - ("config.local" - :publishing-directory ,(expand-file-name "html" - esy/website-source-root) - . - ,esy/publish-project-config-template) - ("static.local" - :publishing-directory ,(expand-file-name "html" - esy/website-source-root) - . - ,esy/publish-project-static-template) - ("eshelyaron.local" :components ("index.local" - "static.local" - "config.local"))))) -#+end_src - ** Org-mode capture templates :PROPERTIES: :CUSTOM_ID: org-capture-templates -- 2.39.5