about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-09 20:43:02 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-09 20:43:02 +0900
commit4aa04499c687f13a221d3a33ebed988d00b7771e (patch)
tree4d2cb39be915e6cfb43056ddb2cfd2b2a6c0315c
parentf3fa55292c37e6031d030c4e802033036ad8fc0c (diff)
downloadsite-4aa04499c687f13a221d3a33ebed988d00b7771e.tar.gz
s/openring/fead/
-rw-r--r--.builds/auto.yml6
-rw-r--r--README.md4
-rw-r--r--_css/style.css8
-rw-r--r--_layout/tag.html2
-rw-r--r--_libs/fead/in.html6
-rw-r--r--_libs/fead/sources (renamed from _libs/openring/sources)2
-rw-r--r--_libs/openring/in.html13
-rw-r--r--blog/index.md2
-rw-r--r--utils.jl10
9 files changed, 27 insertions, 26 deletions
diff --git a/.builds/auto.yml b/.builds/auto.yml
index 402048b..fc8a4ae 100644
--- a/.builds/auto.yml
+++ b/.builds/auto.yml
@@ -1,10 +1,10 @@
 image: nixos/unstable
 oauth: lists.sr.ht/EMAILS:RO pages.sr.ht/PAGES:RW
 packages:
-  - nixos.openring
   - nixos.python3
 sources:
   - https://git.sr.ht/~amolith/fediring.net
+  - https://git.sr.ht/~cnx/fead
   - https://git.sr.ht/~cnx/site
 environment:
   NODE: node
@@ -12,8 +12,8 @@ tasks:
   - inject: |
       grep -C1 cnx.gdn fediring.net/webring.txt |
         awk 'NR % 2 { print $2 }' > site/_libs/fediring
-      openring -n 4 -l 192 -S site/_libs/openring/sources\
-        < site/_libs/openring/in.html > site/_libs/openring/out.html
+      fead/src/fead.py -F site/_libs/fead/sources -n 4 -l 192\
+        < site/_libs/fead/in.html > site/_libs/fead/out.html
       acurl https://lists.sr.ht/query/list/5261.mbox -o site/_libs/formbox/mbox
   - build: |
       cd site
diff --git a/README.md b/README.md
index e639285..43cc763 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,8 @@ The following are needed to run the command above:
 KaTex has to installed to `_css` and `_libs` similar
 to what done in `.builds/auto.yml`.  Furthermore, adjacent sites
 in the [Fediring](https://fediring.net) needs to present
-in `_libs/fediring` and `_libs/openring/out.html` needs to be
-generated using [openring](https://sr.ht/~sircmpwn/openring).  Live-rendering
+in `_libs/fediring` and `_libs/fead/out.html` needs to be
+generated using [fead](https://git.sr.ht/~cnx/fead).  Live-rendering
 will additionally require the presence of `_libs/highlight/highlight.pack.js`.
 
 ### Implicit dependencies
diff --git a/_css/style.css b/_css/style.css
index d75fc96..5eb5926 100644
--- a/_css/style.css
+++ b/_css/style.css
@@ -40,7 +40,7 @@ html {
     background-color: var(--text-bg);
     box-sizing: border-box;
     color: var(--text-fg);
-    font-size: min(max(100%, 2vw), 150%);
+    font-size: clamp(100%, 2vw, 150%);
     margin: auto;
     max-width: 36rem;
     scrollbar-color: var(--fade-fg) var(--overlay-bg);
@@ -236,14 +236,14 @@ code, .hljs {
     padding: 0 1rem;
 }
 
-.openring {
+.fead {
     display: flex;
     flex-wrap: wrap;
     margin: -0.5rem;
     margin-bottom: 0;
 }
-.openring h3 { margin: 0 0 1ex }
-.openring article {
+.fead h3 { margin: 0 0 1ex }
+.fead article {
     background: var(--overlay-bg);
     display: flex;
     flex-direction: column;
diff --git a/_layout/tag.html b/_layout/tag.html
index 72fd0d2..acbcfa9 100644
--- a/_layout/tag.html
+++ b/_layout/tag.html
@@ -5,7 +5,7 @@
 <main class=franklin-content>
   <h1>Tag: {{fd_tag}}</h1>
   {{taglist}}
-  {{openring}}
+  {{fead}}
 </main>
 {{insert footer.html}}
 </body>
diff --git a/_libs/fead/in.html b/_libs/fead/in.html
new file mode 100644
index 0000000..f0be760
--- /dev/null
+++ b/_libs/fead/in.html
@@ -0,0 +1,6 @@
+  <article>
+    <h3><a href='{link}'>{title}</a></h3>
+    {summary}
+    <small class=right>&mdash;<a href='{source_link}'>{source_title}</a>,
+      {time:%F}</small>
+  </article>
diff --git a/_libs/openring/sources b/_libs/fead/sources
index 6c041ec..942fc0d 100644
--- a/_libs/openring/sources
+++ b/_libs/fead/sources
@@ -5,7 +5,7 @@ https://blog.ganssle.io/feeds/all.atom.xml
 https://changelog.complete.org/feed
 https://codesections.com/rss.xml
 https://danct12.github.io/feed.xml
-https://drewdevault.com/feed.xml
+https://drewdevault.com/blog/index.xml
 https://harihareswara.net/atom
 https://jvns.ca/atom.xml
 https://mitchellh.com/feed.xml
diff --git a/_libs/openring/in.html b/_libs/openring/in.html
deleted file mode 100644
index 7a164cc..0000000
--- a/_libs/openring/in.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<h2>See Also</h2>
-<div class=openring>
-  {{range .Articles}}
-  <article>
-    <h3><a href='{{.Link}}'>{{.Title}}</a></h3>
-    {{.Summary}}
-    <small class=right>&mdash;<a href='{{.SourceLink}}'>{{.SourceTitle}}</a>,
-      {{.Date | datef "2006-01-02"}}</small>
-  </article>
-  {{end}}
-</div>
-<small class=right>Generated by
-  <a href=https://sr.ht/~sircmpwn/openring>openring</a></small><br>
diff --git a/blog/index.md b/blog/index.md
index a1eb7b8..414b4db 100644
--- a/blog/index.md
+++ b/blog/index.md
@@ -11,4 +11,4 @@ As usual, the good old [RSS feed]({{fd_rss_feed_url}}) is available.
 If you are instead looking for the more formal literatures of mine,
 they are listed in [my ORCID profile](https://orcid.org/0000-0003-2336-706X).
 
-{{openring}}
+{{fead}}
diff --git a/utils.jl b/utils.jl
index 8383740..23891e9 100644
--- a/utils.jl
+++ b/utils.jl
@@ -53,7 +53,15 @@ function hfun_mailto_comment()
            "In-Reply-To", message_id(), "Subject", locvar(:title))
 end
 
-hfun_openring() = readchomp(joinpath(path(:libs), "openring", "out.html"))
+function hfun_fead()
+  ads = readchomp(joinpath(path(:libs), "fead", "out.html"))
+  """<h2>See Also</h2>
+  <div class=fead>
+  $(ads)</div>
+  <small class=right>Generated by
+    <a href=https://git.sr.ht/~cnx/fead>fead</a></small><br>
+  """
+end
 
 function hfun_pep(args)
   postfix = length(args) < 2 ? "" : '#' * args[2]