aboutsummaryrefslogtreecommitdiff
path: root/v2/src/lib
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-05 16:14:00 -0300
committerEuAndreh <eu@euandre.org>2023-04-05 16:14:00 -0300
commit24e24b49fb6375189cfa527a113eb965087a293a (patch)
treefc75f8267a22f6473432ee6b07c4013561c303dc /v2/src/lib
parentv2: Recove h[2-6] anchor link and icon (diff)
downloadeuandre.org-24e24b49fb6375189cfa527a113eb965087a293a.tar.gz
euandre.org-24e24b49fb6375189cfa527a113eb965087a293a.tar.xz
v2: Support Atom feeds and collection translations
Diffstat (limited to 'v2/src/lib')
-rw-r--r--v2/src/lib/base.conf (renamed from v2/src/lib/base-conf.in)5
-rw-r--r--v2/src/lib/entry.xml22
-rw-r--r--v2/src/lib/feed.xml15
3 files changed, 39 insertions, 3 deletions
diff --git a/v2/src/lib/base-conf.in b/v2/src/lib/base.conf
index 4ec09cb..319d08c 100644
--- a/v2/src/lib/base-conf.in
+++ b/v2/src/lib/base.conf
@@ -1,10 +1,9 @@
-export domain='@DOMAIN@'
-export email='@EMAIL@'
+export domain="$DOMAIN"
+export email="$EMAIL"
export base_url=''
export list_addr='~euandreh/public-inbox@lists.sr.ht'
export mailto_uri_prefix="mailto:$list_addr?Subject=Re%3A%20"
export discussions_url_prefix="https://lists.sr.ht/~euandreh/public-inbox?search="
export sourcecode_url_prefix="https://$domain/git/$domain/tree/"
export author='EuAndreh'
-export lang='en'
export pubkey_id='81F90EC3CD356060' # FIXME
diff --git a/v2/src/lib/entry.xml b/v2/src/lib/entry.xml
new file mode 100644
index 0000000..e4a47c7
--- /dev/null
+++ b/v2/src/lib/entry.xml
@@ -0,0 +1,22 @@
+ <entry xml:lang="$lang">
+ <title type="html">
+ $title_html
+ </title>
+ <link type="text/html" rel="alternative" href="$url" title="$title_html" />
+ <published>
+ $date_iso
+ </published>
+$update_xml
+ <id>
+ $url
+ </id>
+ <author>
+ <name>
+ $author
+ </name>
+ <email>
+ $email
+ </email>
+ </author>
+
+ <summary type="html">
diff --git a/v2/src/lib/feed.xml b/v2/src/lib/feed.xml
new file mode 100644
index 0000000..6fd82a4
--- /dev/null
+++ b/v2/src/lib/feed.xml
@@ -0,0 +1,15 @@
+<feed
+ xmlns="http://www.w3.org/2005/Atom"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xml:lang="$lang">
+ <link href="$url" rel="self" type="application/atom+xml" />
+ <link href="$homepage_url" rel="alternate" type="text/html" hreflang="$lang" />
+ <title>$site_name_html</title>
+ <subtitle>{{ site.t[include.kind].feed.title[include.lang] | smartify | xml_escape }}</subtitle>
+ <id>$url</id>
+ <updated>$now</updated>
+
+ <author>
+ <name>$author</name>
+ <email>$email</email>
+ </author>