From af38ad9e24c630e88bae79e0ac441d017916de0d Mon Sep 17 00:00:00 2001 From: azureazure Date: Sat, 13 Dec 2025 19:16:36 +0100 Subject: rewrite from the ground up --- .gitignore | 3 +++ build-site.el | 28 ++++++++++++++++++++++++---- src/assets/stylesheet.css | 12 ------------ src/blog/first-post.org | 10 ++++++++++ src/index.org | 9 +++++---- 5 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 src/blog/first-post.org diff --git a/.gitignore b/.gitignore index 87174b6..cf9953f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +# autogenerated sitemap +/src/blog/index.org + /public/ diff --git a/build-site.el b/build-site.el index a77c7d9..cbbb41d 100644 --- a/build-site.el +++ b/build-site.el @@ -2,18 +2,27 @@ (setq org-html-validation-link nil org-html-head-include-scripts nil - org-html-head-include-default-style nil + ;; org-html-head-include-default-style nil org-html-head (with-temp-buffer (insert-file-contents "head.html") (buffer-string))) +(defun custom/sitemap-format-entry (entry style project) + (let ((filename (org-publish-find-title entry project)) + (date (org-publish-find-date entry project))) + (format "%s - [[file:%s][%s]]" + (format-time-string "[%Y-%m-%d %^a]" date) + entry + filename))) + (setq org-publish-project-alist (list - (list "content" - :recursive t + (list "pages" + :recursive nil :base-directory "./src" :publishing-function 'org-html-publish-to-html :publishing-directory "./public" + :with-title nil :with-author nil :with-creator nil :with-toc nil @@ -24,7 +33,18 @@ :base-directory "./src" :base-extension "css\\|png\\|ico\\|jpg\\|gif" :publishing-function 'org-publish-attachment - :publishing-directory "./public"))) + :publishing-directory "./public") + (list "blog" + :recursive t + :base-directory "./src/blog" + :publishing-directory "./public/blog" + :publishing-function 'org-html-publish-to-html + :section-numbers nil + :auto-sitemap t + :sitemap-title "blog posts" + :sitemap-filename "index.org" + :sitemap-sort-files 'anti-chronologically + :sitemap-format-entry 'custom/sitemap-format-entry))) (org-publish-all t) diff --git a/src/assets/stylesheet.css b/src/assets/stylesheet.css index 8f72c8b..e69de29 100644 --- a/src/assets/stylesheet.css +++ b/src/assets/stylesheet.css @@ -1,12 +0,0 @@ -body { - background-image: url('tile.png'); -} - -h1 { - background: #ffffffcc; - display: flex; - justify-content: center; - margin-bottom: 10px; - margin-top: 10px; -} - diff --git a/src/blog/first-post.org b/src/blog/first-post.org new file mode 100644 index 0000000..ca88623 --- /dev/null +++ b/src/blog/first-post.org @@ -0,0 +1,10 @@ +#+TITLE: first post + +* hi +this is a test post that mostly exists to check if the org mode publishing system works. + +this[fn:1] is a footnote. + +* Footnotes + +[fn:1] bweh diff --git a/src/index.org b/src/index.org index bba1c04..07ee25a 100644 --- a/src/index.org +++ b/src/index.org @@ -1,4 +1,5 @@ -#+TITLE: !! PHILOMENA'S AWESOME WEBSITE !! -aaaaaa -* sexo -test +#+TITLE: LEMURIAN MAGE + +* Blog posts +#+INCLUDE: "blog/index.org" :lines "3-" + -- cgit v1.2.3