diff options
| -rw-r--r-- | layouts/home.atom.xml | 7 | ||||
| -rw-r--r-- | layouts/home.gemini_atom.xml | 7 | ||||
| -rw-r--r-- | layouts/taxonomy.atom.xml | 7 | ||||
| -rw-r--r-- | layouts/taxonomy.gemini_atom.xml | 7 | ||||
| -rw-r--r-- | layouts/term.atom.xml | 7 | ||||
| -rw-r--r-- | layouts/term.gemini_atom.xml | 7 |
6 files changed, 36 insertions, 6 deletions
diff --git a/layouts/home.atom.xml b/layouts/home.atom.xml index c4f4eae..47b4233 100644 --- a/layouts/home.atom.xml +++ b/layouts/home.atom.xml @@ -18,6 +18,11 @@ {{- end }} {{- end -}} +{{- $pages := .Site.RegularPages }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = first $limit $pages }} +{{- end -}} {{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }} <feed xmlns="http://www.w3.org/2005/Atom"> <id>{{ .Permalink }}</id> @@ -33,7 +38,7 @@ </author>{{ end }} <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights> - <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Site.RegularPages }} + <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range $pages }} <entry> <id>{{ .Permalink }}</id> <title type="html">{{ .Title }}</title> diff --git a/layouts/home.gemini_atom.xml b/layouts/home.gemini_atom.xml index 6189f83..ac8f412 100644 --- a/layouts/home.gemini_atom.xml +++ b/layouts/home.gemini_atom.xml @@ -18,6 +18,11 @@ {{- end }} {{- end -}} +{{- $pages := .Site.RegularPages }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = first $limit $pages }} +{{- end -}} {{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }} <feed xmlns="http://www.w3.org/2005/Atom"> <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id> @@ -33,7 +38,7 @@ </author>{{ end }} <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights> - <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Site.RegularPages }} + <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range $pages }} <entry> <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id> <title>{{ .Title }}</title> diff --git a/layouts/taxonomy.atom.xml b/layouts/taxonomy.atom.xml index 1364f27..3b5a1ca 100644 --- a/layouts/taxonomy.atom.xml +++ b/layouts/taxonomy.atom.xml @@ -18,6 +18,11 @@ {{- end }} {{- end -}} +{{- $pages := .Data.Pages }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = first $limit $pages }} +{{- end -}} {{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }} <feed xmlns="http://www.w3.org/2005/Atom"> <id>{{ .Permalink }}</id> @@ -33,7 +38,7 @@ </author>{{ end }} <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights> - <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} + <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range $pages }} <entry> <id>{{ .Permalink }}</id> <title type="html">{{ .Title }}</title> diff --git a/layouts/taxonomy.gemini_atom.xml b/layouts/taxonomy.gemini_atom.xml index d8ab06e..5341d32 100644 --- a/layouts/taxonomy.gemini_atom.xml +++ b/layouts/taxonomy.gemini_atom.xml @@ -18,6 +18,11 @@ {{- end }} {{- end -}} +{{- $pages := .Data.Pages }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = first $limit $pages }} +{{- end -}} {{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }} <feed xmlns="http://www.w3.org/2005/Atom"> <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id> @@ -33,7 +38,7 @@ </author>{{ end }} <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights> - <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} + <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range $pages }} <entry> <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id> <title>{{ .Title }}</title> diff --git a/layouts/term.atom.xml b/layouts/term.atom.xml index 1364f27..3b5a1ca 100644 --- a/layouts/term.atom.xml +++ b/layouts/term.atom.xml @@ -18,6 +18,11 @@ {{- end }} {{- end -}} +{{- $pages := .Data.Pages }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = first $limit $pages }} +{{- end -}} {{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }} <feed xmlns="http://www.w3.org/2005/Atom"> <id>{{ .Permalink }}</id> @@ -33,7 +38,7 @@ </author>{{ end }} <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights> - <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} + <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range $pages }} <entry> <id>{{ .Permalink }}</id> <title type="html">{{ .Title }}</title> diff --git a/layouts/term.gemini_atom.xml b/layouts/term.gemini_atom.xml index d8ab06e..5341d32 100644 --- a/layouts/term.gemini_atom.xml +++ b/layouts/term.gemini_atom.xml @@ -18,6 +18,11 @@ {{- end }} {{- end -}} +{{- $pages := .Data.Pages }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = first $limit $pages }} +{{- end -}} {{ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | safeHTML }} <feed xmlns="http://www.w3.org/2005/Atom"> <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id> @@ -33,7 +38,7 @@ </author>{{ end }} <generator>Hugo -- gohugo.io</generator> <rights type="html">{{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }}</rights> - <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} + <subtitle>{{ .Site.Params.Description }}</subtitle>{{ range $pages }} <entry> <id>{{ .Permalink | strings.TrimSuffix "index.gmi" }}</id> <title>{{ .Title }}</title> |
