From ed6cbb38056498f5c5ff46d8a80ee5731911ee96 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 29 Mar 2026 07:28:20 -0500 Subject: [PATCH] building section indexes --- README.org | 3 ++- init.el | 3 ++- org-publish.el | 38 ++++++++++++++++++++++++++++++-------- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/README.org b/README.org index 31f9ba33..89ed7a02 100644 --- a/README.org +++ b/README.org @@ -900,7 +900,8 @@ Let's start by creating a self contained function of what I'd like started on ev (org-level-3 1.2 bold) (org-level-4 1.1 semi-bold) (org-level-5 1.0 normal) - (org-column 1.0 normal))) + (org-column 1.0 normal) + (org-document-title 2.0 ultra-bold))) (set-face-attribute (nth 0 face) nil :weight (nth 2 face) :height (nth 1 face))) ;; changing colors diff --git a/init.el b/init.el index fc29bb7f..fa35fa57 100644 --- a/init.el +++ b/init.el @@ -604,7 +604,8 @@ (org-level-3 1.2 bold) (org-level-4 1.1 semi-bold) (org-level-5 1.0 normal) - (org-column 1.0 normal))) + (org-column 1.0 normal) + (org-document-title 2.0 ultra-bold))) (set-face-attribute (nth 0 face) nil :weight (nth 2 face) :height (nth 1 face))) ;; changing colors diff --git a/org-publish.el b/org-publish.el index 106b0bba..4dd536c2 100644 --- a/org-publish.el +++ b/org-publish.el @@ -6,6 +6,7 @@ (require 's) (require 'f) (require 'comp-run) +(require 'simple-httpd) (defun quick/async-export-function (chunk index) "A function to build a future that will export all it's chunk's files" @@ -147,7 +148,6 @@ (message "Finished exporting all files")))) (defun quick/org-copy-notes (plist) - (message "%s" plist) (let ((files (--remove (string-match-p (plist-get plist :exclude) it) (directory-files "~/docs/notes" t ".*.org$")))) @@ -155,8 +155,9 @@ (let ((filename (concat (file-name-as-directory (plist-get plist :base-directory)) (f-filename file)))) - (copy-file - file filename t t))))) + (copy-file + file filename t t)))) + (chris/site-index-update plist)) (defun quick/org-copy-lessons (plist) (let ((files (--remove @@ -167,7 +168,9 @@ (plist-get plist :base-directory)) (f-filename file)))) (copy-file - file filename t t))))) + file filename t t)))) + (chris/site-index-update plist)) + (defun chris/site-index-update (plist) (save-excursion @@ -176,7 +179,6 @@ (file (concat (file-name-as-directory (plist-get plist :base-directory)) "index.org"))) (find-file file) - (message "Inside update func: %s" file) (org-update-all-dblocks) (denote-org-convert-links-to-file-type) (save-buffer)))) @@ -208,7 +210,6 @@ :with-author nil :with-timestamps nil :section-numbers nil - :html-preamble chris/site-premble :html-postamble nil :html-validation-link nil :exlude-tags "revealonly\\|noexport" @@ -217,6 +218,16 @@ :html-html5-fancy t :html-self-link-headlines t :htmlized-source t + ;; :html-preamble chris/site-premble + :html-preamble-format (("en" "")) :html-head "" :publishing-directory "~/docs/site/public/notes/" :publishing-function org-html-publish-to-html) @@ -230,7 +241,7 @@ :with-author nil :with-timestamps nil :section-numbers nil - :html-preamble chris/site-premble + ;; :html-preamble chris/site-premble :html-postamble nil :html-validation-link nil :exlude-tags "revealonly\\|noexport" @@ -239,6 +250,15 @@ :html-html5-fancy t :html-self-link-headlines t :htmlized-source t + :html-preamble-format (("en" "")) :html-head "" :publishing-directory "~/docs/site/public/teaching/" :publishing-function org-html-publish-to-html) @@ -265,7 +285,6 @@
  • Chris Cochrun
  • @@ -409,3 +428,6 @@ on your machine as makes sense." (quick/org-publish "cochrun.xyz" nil t) +(let ((httpd-root "~/docs/site/public") + (httpd-host "localhost")) + (httpd-serve-directory "~/docs/site/public"))