summaryrefslogtreecommitdiff
path: root/openring
diff options
context:
space:
mode:
Diffstat (limited to 'openring')
-rw-r--r--openring/feeds.txt3
-rw-r--r--openring/out.html4
-rw-r--r--openring/template.html24
3 files changed, 31 insertions, 0 deletions
diff --git a/openring/feeds.txt b/openring/feeds.txt
new file mode 100644
index 0000000..40a9bf6
--- /dev/null
+++ b/openring/feeds.txt
@@ -0,0 +1,3 @@
+https://drewdevault.com/feed.xml
+https://emersion.fr/blog/rss.xml
+https://danluu.com/atom.xml
diff --git a/openring/out.html b/openring/out.html
new file mode 100644
index 0000000..df17628
--- /dev/null
+++ b/openring/out.html
@@ -0,0 +1,4 @@
+<section class="space-y-2">
+ <h2 class="text-2xl font-bold">Around the web</h2>
+ <p class="text-sm text-muted-foreground">Install <code>openring</code> and run <code>bun run openring:generate</code> to render this section.</p>
+</section>
diff --git a/openring/template.html b/openring/template.html
new file mode 100644
index 0000000..86ead2c
--- /dev/null
+++ b/openring/template.html
@@ -0,0 +1,24 @@
+<section class="space-y-4">
+ <h2 class="text-2xl font-bold">Around the web</h2>
+ <p class="text-sm text-muted-foreground">Recent posts from sites I follow.</p>
+
+ <div class="space-y-3">
+ {{range .Articles}}
+ <article class="rounded-lg border bg-card text-card-foreground p-4">
+ <h3 class="text-base font-semibold leading-tight">
+ <a href="{{.Link}}" target="_blank" rel="noopener noreferrer" class="hover:underline">{{.Title}}</a>
+ </h3>
+ <p class="mt-2 text-sm text-muted-foreground">{{.Summary}}</p>
+ <p class="mt-3 text-xs text-muted-foreground">
+ <span>via <a href="{{.SourceLink}}" target="_blank" rel="noopener noreferrer" class="hover:underline">{{.SourceTitle}}</a></span>
+ <span class="mx-1">-</span>
+ <time datetime="{{.Date | datef "2006-01-02"}}">{{.Date | datef "Jan 2, 2006"}}</time>
+ </p>
+ </article>
+ {{end}}
+ </div>
+
+ <p class="text-xs text-muted-foreground">
+ Generated by <a href="https://git.sr.ht/~sircmpwn/openring" class="hover:underline">openring</a>
+ </p>
+</section>