From e05b1dacd97147d9991b8eb82da2d2cd2bc33f24 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Sun, 28 Apr 2024 16:18:56 -0500 Subject: try static webring definition --- publish.el | 16 +++++++++++++--- scripts/webring.js | 3 --- 2 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 scripts/webring.js diff --git a/publish.el b/publish.el index f397a0c..4de2cc2 100644 --- a/publish.el +++ b/publish.el @@ -16,9 +16,19 @@ :after org) (use-package htmlize :after org) +(use-package plz) (require 'org) (require 'ox-html) +(require 'plz) + +(setq webring (json-parse-string (plz 'get "https://aidang.cc/webring/https://jjanzen.ca"))) +(defun create-webring-html () + (format "" + (gethash "url" (gethash "left" (webring))) + (gethash "name" (gethash "left" (webring))) + (gethash "url" (gethash "right" (webring))) + (gethash "name" (gethash "right" (webring))))) (defun my/org-publish-org-sitemap-format (entry style project) (cond ((not (directory-name-p entry)) @@ -73,9 +83,9 @@ :with-toc nil :headline-levels 4 :section-numbers nil - :html-head "" - :html-preamble "
HomeProjectsBlogDotfilesAbout MeRSS
") - ;; :html-postamble "" + :html-head "" + :html-preamble "
HomeProjectsBlogDotfilesAbout MeRSS
" + :html-postamble (create-webring-html)) ("org-static" :base-directory "~/website/" diff --git a/scripts/webring.js b/scripts/webring.js deleted file mode 100644 index 07e5990..0000000 --- a/scripts/webring.js +++ /dev/null @@ -1,3 +0,0 @@ -fetch("https://aidang.cc/webring/all", { - method: "GET" -}).then((response) => response.json()).then((json) => console.log(json)); -- cgit v1.2.3