aboutsummaryrefslogtreecommitdiff
path: root/backend/templates/rss.xml
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-27 16:32:58 +0000
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-27 16:32:58 +0000
commitdb0b5c34432b4c0135af8c5c885fd6ad348c3691 (patch)
tree8f38b973a8dd3fc22bbd28498004940451621b41 /backend/templates/rss.xml
parent7bd309f3ca44930c5207b94acc2d425b24d4b369 (diff)
parent1e2ad3a8f8cd2c12786b92210616325a33d1b209 (diff)
Merge pull request '[Feat] Custom sections' (#1) from feat/custom-sections into main
Reviewed-on: https://git.anhgelus.world/anhgelus/small-web/pulls/1
Diffstat (limited to 'backend/templates/rss.xml')
-rw-r--r--backend/templates/rss.xml16
1 files changed, 9 insertions, 7 deletions
diff --git a/backend/templates/rss.xml b/backend/templates/rss.xml
index c8390da..039a2f7 100644
--- a/backend/templates/rss.xml
+++ b/backend/templates/rss.xml
@@ -3,18 +3,20 @@
<channel>
<atom:link href="https://{{ .Domain }}{{ .URL }}" rel="self" type="application/rss+xml" />
<title>{{ .Title }}</title>
- <link>https://{{ .Domain }}/logs/</link>
+ {{ $sec := first .Sections }}
+ {{ $uri := uri $sec.URI }}
+ <link>https://{{ .Domain }}/{{ $uri }}</link>
<description>{{ .PageDescription }}</description>
- <language>fr-fr</language>
+ <language>{{ .Language }}</language>
{{ $domain := .Domain }}
- {{ range .Logs }}
+ {{ range $sec.Data }}
<item>
- <title>{{ .LogTitle }}</title>
- <link>https://{{ $domain }}/logs/{{ .Slug }}</link>
- <guid>https://{{ $domain }}/logs/{{ .Slug }}</guid>
+ <title>{{ .DataTitle }}</title>
+ <link>https://{{ $domain }}/{{ $uri }}{{ .Slug }}</link>
+ <guid>https://{{ $domain }}/{{ $uri }}{{ .Slug }}</guid>
<description>{{ .Description }}</description>
<pubDate>{{ .PubDateRSS }}</pubDate>
</item>
{{ end }}
</channel>
-</rss> \ No newline at end of file
+</rss>