aboutsummaryrefslogtreecommitdiff
path: root/backend/templates
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-06 20:32:20 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-06 20:32:20 +0200
commitbde341ccfa74ad702745e84ee91c2e7045cbe307 (patch)
tree3d914112e7153c8fd7bc1d6a459d143f8ccab8f3 /backend/templates
parent9cfcbabb032c729b06d581412a64a9e7cefed6b1 (diff)
feat(backend): rss feeds for logs
Diffstat (limited to 'backend/templates')
-rw-r--r--backend/templates/base.html1
-rw-r--r--backend/templates/rss.xml20
2 files changed, 21 insertions, 0 deletions
diff --git a/backend/templates/base.html b/backend/templates/base.html
index 86e2f58..0a54096 100644
--- a/backend/templates/base.html
+++ b/backend/templates/base.html
@@ -7,6 +7,7 @@
{{ $styles := asset "styles.css" }}
<link rel="stylesheet" href="{{ $styles.Src }}" integrity="{{ $styles.Checksum }}" />
<link rel="shortcut icon" href="{{ static .Logo.Favicon }}" />
+ <link rel="alternate" href="/logs/rss" type="application/rss+xml" title="RSS" />
<meta property="description" content="{{ .PageDescription }}" />
<!-- Open Graph -->
<meta property="og:title" content="{{ .Title }}" />
diff --git a/backend/templates/rss.xml b/backend/templates/rss.xml
new file mode 100644
index 0000000..c8390da
--- /dev/null
+++ b/backend/templates/rss.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <atom:link href="https://{{ .Domain }}{{ .URL }}" rel="self" type="application/rss+xml" />
+ <title>{{ .Title }}</title>
+ <link>https://{{ .Domain }}/logs/</link>
+ <description>{{ .PageDescription }}</description>
+ <language>fr-fr</language>
+ {{ $domain := .Domain }}
+ {{ range .Logs }}
+ <item>
+ <title>{{ .LogTitle }}</title>
+ <link>https://{{ $domain }}/logs/{{ .Slug }}</link>
+ <guid>https://{{ $domain }}/logs/{{ .Slug }}</guid>
+ <description>{{ .Description }}</description>
+ <pubDate>{{ .PubDateRSS }}</pubDate>
+ </item>
+ {{ end }}
+ </channel>
+</rss> \ No newline at end of file