From ac8bdcacd21babcc7fa8cbc1c374f91408f98e5a Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 24 Mar 2026 15:04:35 -0500 Subject: [PATCH] idk --- init.el | 17 +++++++++++++++++ org-publish.el | 31 ++++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/init.el b/init.el index 690be41a..dd7641bd 100644 --- a/init.el +++ b/init.el @@ -4418,3 +4418,20 @@ interfere with the default `bongo-playlist-buffer'." gcmh-verbose nil)) (add-to-list 'warning-suppress-types '(comp)) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(org-src-content-indentation 0 nil nil "Customized with use-package org") + '(package-selected-packages nil) + '(pdf-misc-print-program-args + '("-o media=Letter" "-o fit-to-page" "-o sides=two-sided-long-edge")) + '(pdf-misc-print-program-executable "lpr")) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(dired-directory ((t :foreground "#57c7ff" :inherit dired-header))) + '(org-modern-tag ((t :background "#9aedfe" :foreground "#282a36")))) diff --git a/org-publish.el b/org-publish.el index 5d58fc10..d601e83f 100644 --- a/org-publish.el +++ b/org-publish.el @@ -18,10 +18,16 @@ (denote-directory "~/docs/site/content") (current-notes (directory-files "~/docs/site/content/notes" t ".*.org$")) (current-lessons (directory-files "~/docs/site/content/teaching" t ".*.org$")) + (create-lockfiles nil) (org-export-with-broken-links 'mark) (org-export-with-section-numbers nil) + (org-export-with-author nil) + (org-export-with-timestamps nil) + (org-export-with-date nil) + (org-export-with-toc nil) (org-html-html5-fancy t) (org-html-validation-link nil) + (org-html-postamble "") (make-backup-files nil) (org-html-head-include-default-style nil) (org-html-head " @@ -31,10 +37,13 @@ } ")) - (when (= 1 - (shell-command - "cmp --silent ~/docs/site/assets/pico.snazzy.css ~/docs/site/public/static/pico.snazzy.css")) - (copy-file "~/docs/site/assets/pico.snazzy.css" "~/docs/site/public/static/pico.snazzy.css" t)) + (when (not + (= 0 + (shell-command + "cmp --silent ~/docs/site/assets/pico.snazzy.css\ + ~/docs/site/public/static/pico.snazzy.css"))) + (copy-file "~/docs/site/assets/pico.snazzy.css" + "~/docs/site/public/static/pico.snazzy.css" t)) (message "Starting site build") (cl-loop for file in current-notes @@ -44,14 +53,15 @@ do (delete-file file t)) (message "Removed all lessons") (cl-loop for file in notes - do (let ((filename (f-filename file))) + do (let ((filename (concat "~/docs/site/content/notes/" (f-filename file)))) (copy-file - file (concat "~/docs/site/content/notes/" filename) t))) + file filename t t))) (message "Copied all notes") (cl-loop for file in lessons - do (let ((filename (f-filename file))) + do (let ((filename (concat "~/docs/site/content/teaching/" (f-filename file)))) (copy-file - file (concat "~/docs/site/content/teaching/" filename) t))) + file filename t t) + (message "copied %s to %s" file filename))) (message "Copied all lessons") (find-file "~/docs/site/content/index.org") (org-update-all-dblocks) @@ -78,6 +88,7 @@ (beginning-of-line) (let* ((export-line (delete-and-extract-region (line-beginning-position) (line-end-position))) + (create-lockfiles nil) (org-export-with-broken-links 'mark) (org-export-with-section-numbers nil) (org-html-html5-fancy t) @@ -106,13 +117,15 @@ (save-buffer) (kill-buffer)))))) + (message "Exporting %s out of %s files: %s" index (length files) file) (setq counter (+ counter 1)) (while (> counter 12) (sit-for 0.5)) + (message "Exporting %s out of %s files: %s" index (length files) file) (async-start func (lambda (result) - (message "Note %s out of %s finished: %s" index (length files) file) + (message "Finished %s" index (length files) file) (setq counter (- counter 1)))) )))))