try static webring definition
This commit is contained in:
parent
d843b6051a
commit
e05b1dacd9
2 changed files with 13 additions and 6 deletions
16
publish.el
16
publish.el
|
@ -16,9 +16,19 @@
|
||||||
:after org)
|
:after org)
|
||||||
(use-package htmlize
|
(use-package htmlize
|
||||||
:after org)
|
:after org)
|
||||||
|
(use-package plz)
|
||||||
|
|
||||||
(require 'org)
|
(require 'org)
|
||||||
(require 'ox-html)
|
(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)
|
(defun my/org-publish-org-sitemap-format (entry style project)
|
||||||
(cond ((not (directory-name-p entry))
|
(cond ((not (directory-name-p entry))
|
||||||
|
@ -73,9 +83,9 @@
|
||||||
:with-toc nil
|
:with-toc nil
|
||||||
:headline-levels 4
|
:headline-levels 4
|
||||||
:section-numbers nil
|
:section-numbers nil
|
||||||
:html-head "<link rel='stylesheet' href='/css/stylesheet.css' type='text/css'/><script src='/scripts/webring.js'></script>"
|
: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-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-postamble (create-webring-html))
|
||||||
|
|
||||||
("org-static"
|
("org-static"
|
||||||
:base-directory "~/website/"
|
:base-directory "~/website/"
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
fetch("https://aidang.cc/webring/all", {
|
|
||||||
method: "GET"
|
|
||||||
}).then((response) => response.json()).then((json) => console.log(json));
|
|
Loading…
Add table
Reference in a new issue