aboutsummaryrefslogtreecommitdiff
path: root/publish.el
diff options
context:
space:
mode:
authorJacob Janzen <jjanzenn@proton.me>2024-04-28 16:18:56 -0500
committerJacob Janzen <jjanzenn@proton.me>2024-04-28 16:18:56 -0500
commite05b1dacd97147d9991b8eb82da2d2cd2bc33f24 (patch)
tree4fb80ed898e6ddf8b52764220b2820fd0ffefcb1 /publish.el
parentd843b6051a790d870f021c2f1c60eeebd93ae1b6 (diff)
try static webring definition
Diffstat (limited to 'publish.el')
-rw-r--r--publish.el16
1 files changed, 13 insertions, 3 deletions
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 "<div class='footer'><span><a href='%s'>« %s</a></span><span>CSSA Web Ring</span><span><a href='%s'>%s »</a></span></div>"
+ (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 "<link rel='stylesheet' href='/css/stylesheet.css' type='text/css'/><script src='/scripts/webring.js'></script>"
- :html-preamble "<div class='topnav'><a href='/'>Home</a><a href='/projects.html'>Projects</a><a href='/blog'>Blog</a><a href='/config.html'>Dotfiles</a><a href='/about.html'>About Me</a><a href='/rss.xml'>RSS</a></div>")
- ;; :html-postamble "<div class='footer'><span><a href='/'>« Left Site</a></span><span>Web Ring</span><span><a href='/'>Right Site »</a></span></div>"
+ :html-head "<link rel='stylesheet' href='/css/stylesheet.css' type='text/css'/>"
+ :html-preamble "<div class='topnav'><a href='/'>Home</a><a href='/projects.html'>Projects</a><a href='/blog'>Blog</a><a href='/config.html'>Dotfiles</a><a href='/about.html'>About Me</a><a href='/rss.xml'>RSS</a></div>"
+ :html-postamble (create-webring-html))
("org-static"
:base-directory "~/website/"