diff --git a/init.el b/init.el
index c690100..7522f28 100644
--- a/init.el
+++ b/init.el
@@ -18,10 +18,10 @@ present on disk."
(cl-remove-if-not #'file-exists-p
(mapcar #'localize-path paths)))
-
(defun emacs-path (path)
"Return an expanded path inside the emacs directory."
(expand-file-name path user-emacs-directory))
+
(defun cache-path (path)
"Return a localized, expanded path within the emacs cache directory."
(expand-file-name path
@@ -196,8 +196,8 @@ present on disk."
'("src" "sites" "data/sites" ".emacs.d"
;; Code is used at work for work-related codes.
"Code" "code")))
-(define-key projectile-mode-map
- (kbd "C-c p") 'projectile-command-map)
+(keymap-set projectile-mode-map
+ "C-c p" 'projectile-command-map)
(projectile-mode +1)
;;; LLM copilot stuff.
@@ -237,15 +237,35 @@ present on disk."
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-names-vector
- ["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"])
+ ["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1"
+ "#e1e1e0"])
'(chess-default-display 'chess-plain)
'(custom-safe-themes
- '("5a0ddbd75929d24f5ef34944d78789c6c3421aa943c15218bac791c199fc897d" "5aedf993c7220cbbe66a410334239521d8ba91e1815f6ebde59cecc2355d7757" "75b371fce3c9e6b1482ba10c883e2fb813f2cc1c88be0b8a1099773eb78a7176" "18a1d83b4e16993189749494d75e6adb0e15452c80c431aca4a867bcc8890ca9" "8363207a952efb78e917230f5a4d3326b2916c63237c1f61d7e5fe07def8d378" "51fa6edfd6c8a4defc2681e4c438caf24908854c12ea12a1fbfd4d055a9647a3" "d5fd482fcb0fe42e849caba275a01d4925e422963d1cd165565b31d3f4189c87" "4c7228157ba3a48c288ad8ef83c490b94cb29ef01236205e360c2c4db200bb18" "7b8f5bbdc7c316ee62f271acf6bcd0e0b8a272fdffe908f8c920b0ba34871d98" "37768a79b479684b0756dec7c0fc7652082910c37d8863c35b702db3f16000f8" "bf390ecb203806cbe351b966a88fc3036f3ff68cd2547db6ee3676e87327b311" "e1943fd6568d49ec819ee3711c266a8a120e452ba08569045dd8f50cc5ec5dd3" "4561c67b0764aa6343d710bb0a6f3a96319252b2169d371802cc94adfea5cfc9" "5f95ce79b4a8870b3486b04de22ca2e0785b287da8779f512cdd847f42266989" default))
+ '("5a0ddbd75929d24f5ef34944d78789c6c3421aa943c15218bac791c199fc897d"
+ "5aedf993c7220cbbe66a410334239521d8ba91e1815f6ebde59cecc2355d7757"
+ "75b371fce3c9e6b1482ba10c883e2fb813f2cc1c88be0b8a1099773eb78a7176"
+ "18a1d83b4e16993189749494d75e6adb0e15452c80c431aca4a867bcc8890ca9"
+ "8363207a952efb78e917230f5a4d3326b2916c63237c1f61d7e5fe07def8d378"
+ "51fa6edfd6c8a4defc2681e4c438caf24908854c12ea12a1fbfd4d055a9647a3"
+ "d5fd482fcb0fe42e849caba275a01d4925e422963d1cd165565b31d3f4189c87"
+ "4c7228157ba3a48c288ad8ef83c490b94cb29ef01236205e360c2c4db200bb18"
+ "7b8f5bbdc7c316ee62f271acf6bcd0e0b8a272fdffe908f8c920b0ba34871d98"
+ "37768a79b479684b0756dec7c0fc7652082910c37d8863c35b702db3f16000f8"
+ "bf390ecb203806cbe351b966a88fc3036f3ff68cd2547db6ee3676e87327b311"
+ "e1943fd6568d49ec819ee3711c266a8a120e452ba08569045dd8f50cc5ec5dd3"
+ "4561c67b0764aa6343d710bb0a6f3a96319252b2169d371802cc94adfea5cfc9"
+ "5f95ce79b4a8870b3486b04de22ca2e0785b287da8779f512cdd847f42266989"
+ default))
'(custom-theme-directory "~/.emacs.d/themes")
'(ellama-sessions-directory (cache-path "ellama-sessions"))
'(global-font-lock-mode t)
'(package-selected-packages
- '(mwim undo-tree slime scpaste racket-mode projectile pelican-mode paredit nixos-options nix-ts-mode nix-modeline nix-mode markdown-mode magit luarocks lua-mode keychain-environment gruvbox-theme geiser exec-path-from-shell elpy ellama c-eldoc auto-complete)))
+ '(auto-complete c-eldoc ellama elpy exec-path-from-shell geiser
+ go-mode gruvbox-theme keychain-environment lua-mode
+ luarocks magit markdown-mode mwim nix-mode
+ nix-modeline nix-ts-mode nixos-options paredit
+ pelican-mode projectile racket-mode scpaste slime
+ undo-tree)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@@ -268,20 +288,8 @@ present on disk."
(put 'downcase-region 'disabled nil)
(keychain-refresh-environment)
-(require 'ox-publish)
-(setq org-publish-project-alist
- '(("notes"
- :base-directory "~/notes/"
- :publishing-directory "/ssh:phobos.wntrmute.net:/var/www/sites/tmp/"
- :publishing-function org-html-publish-to-html
- :headline-levels 4 ; Just the default for this project.
- :auto-preamble t)
- ("notes-static"
- :base-directory "~/notes/"
- :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
-p :publishing-directory "/ssh:phobos.wntrmute.net:/var/www/sites/tmp/"
- :recursive t
- :publishing-function org-publish-attachment)))
+
+(load (emacs-path "publish"))
(defvar *host-font-size*
#s(hash-table
diff --git a/publish.el b/publish.el
index b32a4ef..fe16ed1 100644
--- a/publish.el
+++ b/publish.el
@@ -3,5 +3,137 @@
;;;
;;; publishing my notes docs
-
+(defvar *org-remote-site* "/ssh:web.metacircular.net:/srv/www/metacircular/"
+ "Where should org-mode files be published?")
(require 'ox-publish)
+(require 'htmlize)
+(setq org-html-head ""
+ org-html-head-extra ""
+ org-html-head-include-default-style nil
+ org-html-head-include-scripts nil
+ org-html-preamble nil
+ org-html-postamble nil
+ org-html-use-infojs nil)
+
+;;; the org-site is split into several main components, listed
+;;; below. Note that it publishes to a directory inside the org
+;;; directory. For now, I'm doing this as I test out style and other
+;;; things. Once I settle on a good route, I'll look at publishing to
+;;; my web server directly.
+(setq org-publish-project-alist
+ '(
+;;; entries contains blog posts. Simple-as.
+ ("org-site-entries"
+ :base-directory "~/org/entries/"
+ :html-doctype "html5"
+ :html-head ""
+ :html-head-include-scripts nil
+ :html-html5-fancy t
+ :html-link-home "/"
+ :html-link-up "../"
+ :html-postamble t
+ :publishing-directory "~/org/publish/e/"
+ :publishing-function org-html-publish-to-html
+ :auto-sitemap t
+ :html-head-include-default-style nil
+ :sitemap-filename "index.org"
+ :sitemap-sort-files anti-chronologically
+ :sitemap-title "Blog Posts")
+
+;;; pages contains notes that should be sitemapped. They're scoped to a
+;;; different directory accordingly.
+ ("org-site-pages"
+ :base-directory "~/org/pages/"
+ :html-doctype "html5"
+ :html-head ""
+ :html-head-include-scripts nil
+ :html-html5-fancy t
+ :html-link-home "/"
+ :html-link-up "../"
+ :publishing-directory "~/org/publish/p/"
+ :publishing-function org-html-publish-to-html
+ :auto-sitemap t
+ :html-head-include-default-style nil
+ :sitemap-filename "sitemap.org"
+ :sitemap-title "metacircular pages")
+
+;;; static contains... static files. Notably, the CSS and fonts.
+ ("org-site-static"
+ :base-directory "~/org/static/"
+ :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|woff2"
+ :publishing-directory "~/org/publish/s/"
+ :recursive t
+ :publishing-function org-publish-attachment)
+
+;;; the site root is mostly the index page.
+ ("org-site-root"
+ :base-directory "~/org"
+ :html-doctype "html5"
+ :html-head ""
+ :html-head-include-default-style nil
+ :html-head-include-scripts nil
+ :html-html5-fancy t
+ :html-link-home "/"
+ :html-postamble nil
+ :publishing-directory "~/org/publish/"
+ :recursive nil
+ :with-author nil
+ :with-date nil)
+
+;;; notes contains a list of pages that shouldn't be sitemapped, and
+;;; is scoped appropriately to a separate directory.
+ ("org-site-notes"
+ :base-directory "~/org/notes/"
+ :html-doctype "html5"
+ :html-head ""
+ :html-head-include-scripts nil
+ :html-html5-fancy t
+ :html-link-up "../"
+ :html-link-home "http://metacircular.net/"
+ :publishing-directory "~/org/publish/m/"
+ :publishing-function org-html-publish-to-html
+ :html-head-include-default-style nil)
+
+;;; roam is an experiment in linked note-taking. I'm using
+;;; obsidian, but emacs is life.
+ ("org-site-roam"
+ :base-directory "~/org/roam/"
+ :html-doctype "html5"
+ :html-head ""
+ :html-head-include-scripts nil
+ :html-html5-fancy t
+ :html-link-up "../"
+ :publishing-directory "~/org/publish/n/"
+ :publishing-function org-html-publish-to-html
+ :html-head-include-default-style nil)
+
+;;; org publishes everything at once.
+ ("org"
+ :components ("org-site-root"
+ "org-site-static"
+ "org-site-entries"
+ "org-site-pages"
+ "org-site-notes"
+ "org-site-roam"))))
+
+;;; org publishing keybindings: C-c
+;;; c to reset the cache
+;;; o to publish all projects
+;;; u to upload the published projects
+
+;;; resetting the cache - needs to be done on occasion while tweaking
+;;; the site.
+(global-set-key (kbd "C-c c")
+ (lambda () (interactive)
+ (message "deleting org-timestamps")
+ (delete-directory (expand-file-name "~/.org-timestamps") t)))
+
+;;; publish all the orgs.
+(global-set-key (kbd "C-c o")
+ (lambda () (interactive)
+ (org-publish-all t nil)))
+
+;;; upload the publish directory.
+(global-set-key (kbd "C-c u")
+ (lambda () (interactive)
+ (shell-command "rsync --delete-after -auqz ~/org/publish/ web.metacircular.net:/srv/www/metacircular/")))