diff options
| author | azureazure <azureazure@disroot.org> | 2026-01-13 14:12:03 +0100 |
|---|---|---|
| committer | azureazure <azureazure@disroot.org> | 2026-01-13 14:12:03 +0100 |
| commit | 6c79a33ce2bd2e27339c15a4139b150959a4c265 (patch) | |
| tree | b94a9ac8f8ab91840ec3603b95cc4b21669479ff | |
| parent | 6f25c459388ab82375b2c3fc63cea88413ebf876 (diff) | |
| download | slimegirl.nexus-6c79a33ce2bd2e27339c15a4139b150959a4c265.tar.gz | |
idk
| -rw-r--r-- | build-site.el | 46 | ||||
| -rw-r--r-- | src/index.org | 4 | ||||
| -rw-r--r-- | templates/blog-sitemap.org | 7 |
3 files changed, 27 insertions, 30 deletions
diff --git a/build-site.el b/build-site.el index 22ce82b..a7c4dfd 100644 --- a/build-site.el +++ b/build-site.el @@ -2,7 +2,7 @@ (require 'ox-publish) (require 'org-publish-rss) -(defun my/file-to-string (file) +(defun file-to-string (file) (with-temp-buffer (insert-file-contents file) (buffer-string))) @@ -12,56 +12,52 @@ org-html-doctype "html5" org-html-html5-fancy t org-html-head-include-default-style nil - org-html-head (my/file-to-string "templates/head.html") + org-html-head (file-to-string "templates/head.html") org-html-postamble nil org-export-with-section-numbers nil org-export-with-timestamps nil - org-export-with-toc nil) + org-export-with-toc nil + org-export-with-smart-quotes t) -(defun my/sitemap-format-entry (entry style project) - (let ((title (org-publish-find-title entry project)) - (date (org-publish-find-date entry project))) - (format "%s - [[file:%s][%s]]" - (format-time-string "%F" date) - entry - title))) +(defun sitemap-format-entry (entry style project) + (let ((spec `((?t . ,(org-publish-find-title entry project)) + (?d . ,(format-time-string "%F" (org-publish-find-date entry project))) + (?h . ,entry)))) + (format-spec "%d - [[file:%h][%t]]" spec))) -(defun my/sitemap-function (title list) ; todo change this - (setq spec - (list (cons ?a title) - (cons ?l (org-list-to-org list)))) - (format-spec (my/file-to-string "templates/blog-sitemap.org") spec)) +(defun sitemap-function (title list) ; todo change this + (let ((spec `((?t . ,title) + (?l . ,(org-list-to-org list))))) + (format-spec (file-to-string "templates/blog-sitemap.org") spec))) (setq org-publish-project-alist (list (list "blog" - :recursive t - :base-directory "./src/blog" - :publishing-directory "./public/blog" + :base-directory "src/blog" + :publishing-directory "public/blog" :publishing-function 'org-html-publish-to-html :auto-sitemap t :sitemap-title "Lemurblog" :sitemap-filename "index.org" :sitemap-sort-files 'anti-chronologically - :sitemap-format-entry 'my/sitemap-format-entry - :sitemap-function 'my/sitemap-function + :sitemap-format-entry 'sitemap-format-entry + :sitemap-function 'sitemap-function :auto-rss t :rss-description "The Lemurian Mage's Awesome Lemur Blog" :rss-link "https://lemurianmage.srht.site/blog" :rss-copyright "nah" :completion-function 'org-publish-rss) (list "pages" - :recursive nil - :base-directory "./src" + :base-directory "src" :publishing-function 'org-html-publish-to-html - :publishing-directory "./public") + :publishing-directory "public") (list "assets" :recursive t - :base-directory "./src/assets" + :base-directory "src/assets" :base-extension 'any :include '("../blog/rss.xml") :publishing-function 'org-publish-attachment - :publishing-directory "./public/assets"))) + :publishing-directory "public/assets"))) (delete-directory "public" :recursive t) (setenv "TZ" "UTC0") ; remove the timezone from rss output diff --git a/src/index.org b/src/index.org index e0d61d6..f1636f6 100644 --- a/src/index.org +++ b/src/index.org @@ -33,10 +33,10 @@ * About This is the website of Philomena (she) aka lemurianmage aka azureazure aka (...many others...). I like fucking around with electronics and shitposting -on the internet. my paws are big and fluffy. +on the internet. my paws are big and my tail is fluffy * Recent posts -#+INCLUDE: "blog/index.org" :lines "3-8" +#+INCLUDE: "blog/index.org::*Posts" :only-contents t #+HTML: <hr> diff --git a/templates/blog-sitemap.org b/templates/blog-sitemap.org index 306a465..bbd403c 100644 --- a/templates/blog-sitemap.org +++ b/templates/blog-sitemap.org @@ -1,5 +1,6 @@ -#+TITLE: %a -piss - +#+TITLE: %t +This is where all of my posts would live in +if i actually wrote anything+ I'll +get to writing soon I promise >w< +* Posts %l |
