diff options
-rw-r--r-- | publish.el | 16 | ||||
-rw-r--r-- | scripts/webring.js | 3 |
2 files changed, 13 insertions, 6 deletions
@@ -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/" 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)); |