diff --git a/config/_default/hugo.yaml b/config/_default/hugo.yaml
index d6491429..95d300a8 100644
--- a/config/_default/hugo.yaml
+++ b/config/_default/hugo.yaml
@@ -117,24 +117,24 @@ taxonomies:
videotrack: videotracks
outputs:
- # Only enable RSS generation on the home page. Also add RSS for All Languages and a redirect file
- home: [HTML, RSS, RSS-ALL, REDIR]
- section: [HTML]
- taxonomy: [HTML]
+ # Only enable RSS generation on the homepage and section pages. Also add RSS for All Languages and a redirect file
+ home: [html, rss, rss-all, redir]
+ section: [html, rss]
+ taxonomy: [html]
mediaTypes:
text/bare:
suffixes:
outputFormats:
- RSS-ALL:
+ rss-all:
mediaType: application/rss+xml
baseName: index-all
isHTML: false
isPlainText: false
noUgly: true
rel: alternate
- REDIR:
+ redir:
mediatype: text/bare
baseName: _redirects
isPlainText: true
diff --git a/cypress/e2e/site.cy.ts b/cypress/e2e/site.cy.ts
index e8d97096..27390dff 100644
--- a/cypress/e2e/site.cy.ts
+++ b/cypress/e2e/site.cy.ts
@@ -1,6 +1,4 @@
-///
-
-import {Paths} from "../support/util";
+import { Paths } from '../support/util';
context('Site', () => {
diff --git a/layouts/_default/_feed-description.rss-all.xml b/layouts/_default/_feed-description.rss-all.xml
new file mode 100644
index 00000000..53933de4
--- /dev/null
+++ b/layouts/_default/_feed-description.rss-all.xml
@@ -0,0 +1 @@
+{{- .Site.Params.description -}}
diff --git a/layouts/_default/_feed-description.rss.xml b/layouts/_default/_feed-description.rss.xml
new file mode 100644
index 00000000..53933de4
--- /dev/null
+++ b/layouts/_default/_feed-description.rss.xml
@@ -0,0 +1 @@
+{{- .Site.Params.description -}}
diff --git a/layouts/_default/_feed-items.rss-all.xml b/layouts/_default/_feed-items.rss-all.xml
new file mode 100644
index 00000000..484b580c
--- /dev/null
+++ b/layouts/_default/_feed-items.rss-all.xml
@@ -0,0 +1,3 @@
+{{- range first .Site.Params.rssLimit (where (where .Site.AllPages ".IsPage" true) "Type" "post") }}
+{{- .Render "_rss-item" }}
+{{- end -}}
diff --git a/layouts/_default/_feed-items.rss.xml b/layouts/_default/_feed-items.rss.xml
new file mode 100644
index 00000000..ba7f3581
--- /dev/null
+++ b/layouts/_default/_feed-items.rss.xml
@@ -0,0 +1,3 @@
+{{- range first .Site.Params.rssLimit (where .Site.RegularPages "Type" "post") }}
+{{- .Render "_rss-item" }}
+{{- end -}}
diff --git a/layouts/_default/_feed-title.rss-all.xml b/layouts/_default/_feed-title.rss-all.xml
new file mode 100644
index 00000000..dd6ba8a5
--- /dev/null
+++ b/layouts/_default/_feed-title.rss-all.xml
@@ -0,0 +1 @@
+{{- .Site.Title }} | {{ T "blog" -}}
diff --git a/layouts/_default/_feed-title.rss.xml b/layouts/_default/_feed-title.rss.xml
new file mode 100644
index 00000000..a6648e2c
--- /dev/null
+++ b/layouts/_default/_feed-title.rss.xml
@@ -0,0 +1 @@
+{{- .Site.Title }} | {{ T "postsCurLang" }} | {{ T "blog" -}}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index e9849852..3a77fa08 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -19,7 +19,12 @@
{{ with .OutputFormats.Get "RSS" -}}
- {{ printf "" .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+ {{ printf ""
+ .Rel
+ .MediaType.Type
+ .Permalink
+ ($.Title | default $.Site.Title)
+ | safeHTML }}
{{ end -}}
diff --git a/layouts/_default/index.rss-all.xml b/layouts/_default/list.rss-all.xml
similarity index 58%
rename from layouts/_default/index.rss-all.xml
rename to layouts/_default/list.rss-all.xml
index 1afde584..269ddad9 100644
--- a/layouts/_default/index.rss-all.xml
+++ b/layouts/_default/list.rss-all.xml
@@ -1,10 +1,10 @@
{{ printf "" | safeHTML }}
- {{ .Site.Title }} | {{ T "blog" }}
+ {{ .Render "_feed-title" }}
+ {{ .Render "_feed-description" }}
{{ .Permalink }}
- {{ .Site.Params.description }}
- Hugo {{ hugo.Version }}
+ Hugo
{{- with .Site.LanguageCode }}{{ . }}{{ end }}
{{- with .Site.Params.author }}
noreply@yktoo.com ({{ . }})
@@ -12,9 +12,7 @@
{{- end }}
{{- with .Site.Copyright }}{{ . }}{{ end }}
{{- if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }}
- {{- with .OutputFormats.Get "RSS-ALL" }}{{ printf `` .Permalink .MediaType | safeHTML }}{{ end }}
- {{- range first .Site.Params.rssLimit (where (where .Site.AllPages ".IsPage" true) "Type" "post") }}
- {{- .Render "rss-item" }}
- {{- end -}}
+ {{ with .OutputFormats.Get "rss-all" }}{{ printf `` .Permalink .MediaType | safeHTML }}{{ end }}
+{{ .Render "_feed-items" }}
diff --git a/layouts/_default/index.rss.xml b/layouts/_default/list.rss.xml
similarity index 58%
rename from layouts/_default/index.rss.xml
rename to layouts/_default/list.rss.xml
index dbbba890..73693ef0 100644
--- a/layouts/_default/index.rss.xml
+++ b/layouts/_default/list.rss.xml
@@ -1,10 +1,10 @@
{{ printf "" | safeHTML }}
- {{ .Site.Title }} | {{ T "blog" }}: {{ T "postsCurLang" }}
+ {{ .Render "_feed-title" }}
+ {{ .Render "_feed-description" }}
{{ .Permalink }}
- {{ .Site.Params.description }}
- Hugo {{ hugo.Version }}
+ Hugo
{{- with .Site.LanguageCode }}{{ . }}{{ end }}
{{- with .Site.Params.author }}
noreply@yktoo.com ({{ . }})
@@ -12,9 +12,7 @@
{{- end }}
{{- with .Site.Copyright }}{{ . }}{{ end }}
{{- if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }}
- {{- with .OutputFormats.Get "RSS" }}{{ printf `` .Permalink .MediaType | safeHTML }}{{ end }}
- {{- range first .Site.Params.rssLimit (where .Site.RegularPages "Type" "post") }}
- {{- .Render "rss-item" }}
- {{- end -}}
+ {{ with .OutputFormats.Get "rss" }}{{ printf `` .Permalink .MediaType | safeHTML }}{{ end }}
+{{ .Render "_feed-items" }}
diff --git a/layouts/blog/subscribe.html b/layouts/blog/subscribe.html
index 5c1b901f..e5c6efd6 100644
--- a/layouts/blog/subscribe.html
+++ b/layouts/blog/subscribe.html
@@ -73,7 +73,7 @@
{{ T (print "posts_" .Language) }}
{{ T "postsAllLangs" }}
- {{ with (.GetPage "/" ).OutputFormats.Get "RSS-ALL" }}
+ {{ with (.GetPage "/" ).OutputFormats.Get "rss-all" }}
- {{ T "subscribeInFeedly" }}
- {{ T "subscribeByRSS" }}
{{ end }}
diff --git a/layouts/post/_rss-item.xml b/layouts/post/_rss-item.xml
new file mode 100644
index 00000000..115805fb
--- /dev/null
+++ b/layouts/post/_rss-item.xml
@@ -0,0 +1,27 @@
+ -
+ {{ partial "page-title" . }}
+ {{ .Permalink }}?utm_source=rss&utm_medium=feed_{{ .Language }}&utm_campaign=nix
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
+ noreply@yktoo.com ({{ .Params.author | default .Site.Params.author }})
+ {{ .Permalink }}
+
+
+ {{- $page := . -}}
+ {{- with .Params.image -}}
+ {{- $url := . -}}
+
+ {{- if findRE "^(/|http(s?)://)" $url -}}
+ {{- $url = absURL $url -}}
+ {{- else -}}
+ {{- $url = ($page.Resources.GetMatch $url).Permalink -}}
+ {{- end -}}
+
+ {{- printf `
` $url -}}
+ {{- end -}}
+
+ {{- $summary := .Params.description | .RenderString | default .Summary | replaceRE "(?s)