diff options
| author | William Hergès <william@herges.fr> | 2025-10-27 17:21:41 +0100 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-10-27 17:21:41 +0100 |
| commit | 3ce41d99d688410a361d83767b50b64a35b569d4 (patch) | |
| tree | 3e53a0a1356950575d152f3d8d1eb18bec33c633 /backend/templates | |
| parent | 0c3a89ee546a2a3215eb32d9786dabeda051812d (diff) | |
feat(sections): general rss feed
Diffstat (limited to 'backend/templates')
| -rw-r--r-- | backend/templates/base.html | 2 | ||||
| -rw-r--r-- | backend/templates/rss.xml | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/backend/templates/base.html b/backend/templates/base.html index 0a54096..436a1c2 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -1,5 +1,5 @@ <!doctype html> -<html lang="fr" prefix="og: https://ogp.me/ns/article#"> +<html lang="{{ .Language }}" prefix="og: https://ogp.me/ns/article#"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> diff --git a/backend/templates/rss.xml b/backend/templates/rss.xml index 2abca8e..039a2f7 100644 --- a/backend/templates/rss.xml +++ b/backend/templates/rss.xml @@ -4,16 +4,16 @@ <atom:link href="https://{{ .Domain }}{{ .URL }}" rel="self" type="application/rss+xml" /> <title>{{ .Title }}</title> {{ $sec := first .Sections }} - {{ $uri := $sec.URI }} - <link>https://{{ .Domain }}/{{ $uri }}/</link> + {{ $uri := uri $sec.URI }} + <link>https://{{ .Domain }}/{{ $uri }}</link> <description>{{ .PageDescription }}</description> - <language>fr-fr</language> + <language>{{ .Language }}</language> {{ $domain := .Domain }} {{ range $sec.Data }} <item> <title>{{ .DataTitle }}</title> - <link>https://{{ $domain }}/{{ $uri }}/{{ .Slug }}</link> - <guid>https://{{ $domain }}/{{ $uri }}/{{ .Slug }}</guid> + <link>https://{{ $domain }}/{{ $uri }}{{ .Slug }}</link> + <guid>https://{{ $domain }}/{{ $uri }}{{ .Slug }}</guid> <description>{{ .Description }}</description> <pubDate>{{ .PubDateRSS }}</pubDate> </item> |
