summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-04-20 15:10:35 +0300
committereug-vs <eugene@eug-vs.xyz>2022-04-20 15:13:40 +0300
commitb8c43baedc8e30d03aa356f03af9eb3b68b90675 (patch)
tree3fb02ecfbf22ca9696290a3dde5bc6be298e39bd
parent2bd2947a52df59e573726de1471c4fd76505b392 (diff)
downloadeug-vs-xyz-b8c43baedc8e30d03aa356f03af9eb3b68b90675.tar.gz
feat: grab openring urls from file
-rw-r--r--Makefile4
-rwxr-xr-xcompile_openring_args.sh5
-rw-r--r--openring-template.html24
-rw-r--r--urls4
4 files changed, 22 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 210c5aa..3d48ace 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ EMOJI_SEDSTRING=$(shell ./compile_emoji_sedstring.sh)
LOCALIZE_SEDSTRING=s|\"/|\"$(PWD)/|;
UNLOCALIZE_SEDSTRING=s|$(PWD)||;
-OPENRING_FEED="https://drewdevault.com/feed.xml"
+OPENRING_ARGS=$(shell ./compile_openring_args.sh)
SOURCES=$(wildcard *.md blog/*.md articles/*.md)
@@ -37,7 +37,7 @@ index.html: index.md blog/preview.md
| pandoc $(PANDOC_ARGS) -M pagetitle="$(TITLE)" -M description="$$DESCRIPTION"> $@
$(OPENRING_FOOTER): openring-template.html
- openring -s $(OPENRING_FEED) < $< > $@
+ openring $(OPENRING_ARGS) < $< > $@
blog/preview.md: blog/index.md
@echo $@
diff --git a/compile_openring_args.sh b/compile_openring_args.sh
new file mode 100755
index 0000000..52d6660
--- /dev/null
+++ b/compile_openring_args.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Compile args string for openring from URLS file
+URLS=urls
+
+sed '/^$/d; s/^/-s /;' $URLS
diff --git a/openring-template.html b/openring-template.html
index a9f63e6..675c623 100644
--- a/openring-template.html
+++ b/openring-template.html
@@ -1,23 +1,25 @@
-<section class="webring">
- <h3>Articles from blogs I follow around the net</h3>
+<section class="webring" style="margin-top: 128px;">
+ <h2>Articles from blogs I read</h2>
<section class="articles">
{{range .Articles}}
<div class="article">
- <h4 class="title">
+ <h3 class="title">
<a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a>
- </h4>
+ </h3>
<p class="summary">{{.Summary}}</p>
- <small class="source">
+ <div class="source">
via <a href="{{.SourceLink}}">{{.SourceTitle}}</a>
- </small>
- <small class="date">{{.Date | datef "January 2, 2006"}}</small>
+ </div>
+ <div class="date">{{.Date | datef "January 2, 2006"}}</div>
</div>
{{end}}
</section>
- <p class="attribution">
+ <div class="attribution">
+ <small>
Generated by
<a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
- </p>
+ </small>
+ </div>
</section>
<style>
.webring .articles {
@@ -34,16 +36,12 @@
flex-direction: column;
margin: 0.5rem;
padding: 0.5rem;
- background: #eee;
min-width: 10rem;
}
.webring .summary {
- font-size: 0.8rem;
flex: 1 1 0;
}
.webring .attribution {
text-align: right;
- font-size: 0.8rem;
- color: #555;
}
</style>
diff --git a/urls b/urls
new file mode 100644
index 0000000..e7d6fb2
--- /dev/null
+++ b/urls
@@ -0,0 +1,4 @@
+https://lukesmith.xyz/rss.xml
+https://drewdevault.com/blog/index.xml
+https://blog.codinghorror.com/rss/
+https://100r.co/links/rss.xml