From 6f25c459388ab82375b2c3fc63cea88413ebf876 Mon Sep 17 00:00:00 2001 From: azureazure Date: Fri, 9 Jan 2026 14:09:20 +0100 Subject: add template dir + minor css changes --- build-site.el | 33 ++++++++++++++++++--------------- head.html | 2 -- src/assets/stylesheet.css | 38 +++++++++++++++++++++++++------------- src/blog/first-post.org | 2 +- src/index.org | 2 +- src/links.org | 2 +- templates/blog-sitemap.org | 5 +++++ templates/head.html | 2 ++ 8 files changed, 53 insertions(+), 33 deletions(-) delete mode 100644 head.html create mode 100644 templates/blog-sitemap.org create mode 100644 templates/head.html diff --git a/build-site.el b/build-site.el index 242786b..22ce82b 100644 --- a/build-site.el +++ b/build-site.el @@ -2,25 +2,35 @@ (require 'ox-publish) (require 'org-publish-rss) +(defun my/file-to-string (file) + (with-temp-buffer + (insert-file-contents file) + (buffer-string))) + (setq org-html-validation-link nil org-html-head-include-scripts nil org-html-doctype "html5" org-html-html5-fancy t org-html-head-include-default-style nil - org-html-head (with-temp-buffer - (insert-file-contents "head.html") - (buffer-string))) + org-html-head (my/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) (defun my/sitemap-format-entry (entry style project) - (let ((filename (org-publish-find-title entry 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 - filename))) + title))) (defun my/sitemap-function (title list) ; todo change this - (org-publish-sitemap-default title list)) + (setq spec + (list (cons ?a title) + (cons ?l (org-list-to-org list)))) + (format-spec (my/file-to-string "templates/blog-sitemap.org") spec)) (setq org-publish-project-alist (list @@ -28,12 +38,8 @@ :recursive t :base-directory "./src/blog" :publishing-directory "./public/blog" - :base-extension "org" :publishing-function 'org-html-publish-to-html - :section-numbers nil - :with-toc nil :auto-sitemap t - :time-stamp-file nil :sitemap-title "Lemurblog" :sitemap-filename "index.org" :sitemap-sort-files 'anti-chronologically @@ -48,11 +54,7 @@ :recursive nil :base-directory "./src" :publishing-function 'org-html-publish-to-html - :publishing-directory "./public" - :with-toc nil - :html-postamble nil - :section-numbers nil - :time-stamp-file nil) + :publishing-directory "./public") (list "assets" :recursive t :base-directory "./src/assets" @@ -64,5 +66,6 @@ (delete-directory "public" :recursive t) (setenv "TZ" "UTC0") ; remove the timezone from rss output (org-publish-all t) +(delete-file "src/blog/rss.xml~") ; I have no clue why this thing appears at all (message "Build done!") diff --git a/head.html b/head.html deleted file mode 100644 index 585bde9..0000000 --- a/head.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/assets/stylesheet.css b/src/assets/stylesheet.css index f6b868e..e7f2e62 100644 --- a/src/assets/stylesheet.css +++ b/src/assets/stylesheet.css @@ -35,9 +35,6 @@ .footpara { display: inline; } -/* i don't want to display the date but it needs to exist for rss generation */ -#postamble { display: none; } - body { background-color: var(--bg); @@ -48,22 +45,37 @@ body font-size: 1.2em; } -h1 { text-align: center; } +h1, .subtitle { text-align: center; } -h1::before +h1::before, .subtitle::before { - content: ".:░ "; - color: var(--main); + content: "\25ca "; display: none; } -h1::after +h1::after, .subtitle::after { - content: " ░:."; - color: var(--main); + content: " \25ca"; display: none; } +h1::after, h1::before +{ + color: var(--main); +} + +.subtitle::before, .subtitle::after +{ + color: var(--accent); +} + +.subtitle +{ + font-size: 20px; + line-height: 20px; + font-family: ibm-xga, serif; +} + h1, h2 { font-size: 40px; @@ -71,7 +83,7 @@ h1, h2 font-family: ibm-xga, monospace; } -/* also a h2 */ +/* footnotes is also a h2 */ .footnotes { font-size: 20px; @@ -102,7 +114,7 @@ h1, h2 @media screen and (min-width: 425px) { - h1::before, h1::after { display: inline; } + h1::before, h1::after, .subtitle::before, .subtitle::after { display: inline; } } .buttons @@ -130,7 +142,7 @@ ul { list-style-type: none; } ul li::before { - content: "\25ba "; + content: "\25ca "; color: var(--accent); } diff --git a/src/blog/first-post.org b/src/blog/first-post.org index d425cf7..29c2f8f 100644 --- a/src/blog/first-post.org +++ b/src/blog/first-post.org @@ -1,5 +1,5 @@ #+TITLE: first post -#+DESCRIPTION: test post +#+SUBTITLE: with an epic fuarrking subtitle #+DATE: <2025-12-13> * hi diff --git a/src/index.org b/src/index.org index c7e36e5..e0d61d6 100644 --- a/src/index.org +++ b/src/index.org @@ -28,7 +28,7 @@ | || |\_||__ #+END_EXAMPLE #+BEGIN_pages -[[file:blog/index.org][blog]] \ [[file:contact.org][contact]] \ [[file:links.org][links]] \ [[file:blog/rss.xml][rss]] +[[file:blog/index.org][blog]] \loz [[file:contact.org][contact]] \loz [[file:links.org][links]] \loz [[file:blog/rss.xml][rss]] #+END_pages * About This is the website of Philomena (she) aka lemurianmage aka azureazure aka diff --git a/src/links.org b/src/links.org index eace2ce..3e739e1 100644 --- a/src/links.org +++ b/src/links.org @@ -30,4 +30,4 @@ Various cool things/people. * Others - [[https://int10h.org/oldschool-pc-fonts/][The Ultimate Oldschool Font Pack]] - +- [[https://phrack.org][Phrack Magazine]] diff --git a/templates/blog-sitemap.org b/templates/blog-sitemap.org new file mode 100644 index 0000000..306a465 --- /dev/null +++ b/templates/blog-sitemap.org @@ -0,0 +1,5 @@ +#+TITLE: %a +piss + + +%l diff --git a/templates/head.html b/templates/head.html new file mode 100644 index 0000000..585bde9 --- /dev/null +++ b/templates/head.html @@ -0,0 +1,2 @@ + + -- cgit v1.2.3