]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Extract publishing related code from the core config
authorEshel Yaron <eshel@dazz.io>
Tue, 7 Jun 2022 20:45:33 +0000 (23:45 +0300)
committerEshel Yaron <eshel@dazz.io>
Tue, 7 Jun 2022 20:45:33 +0000 (23:45 +0300)
.emacs.d/esy.org

index c4df5c982d533d1824704387b0be52cfadbcc1de..6b2f530aa65e72cec4e53f964bd8e1829bba3619 100644 (file)
@@ -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
-    "<link rel=\"stylesheet\" href=\"/style.css\" type=\"text/css\"/>"
-    "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