diff options
| author | Nantha Sorubakanthan <nantha@mielota.com> | 2025-10-05 16:13:25 +0200 |
|---|---|---|
| committer | Nantha Sorubakanthan <nantha@mielota.com> | 2025-10-05 16:13:25 +0200 |
| commit | 7e526844f0bed3e12d595c75e802010991aa746b (patch) | |
| tree | 5b1a786dfea2cac0905ac6945dcbba3ed3a40def | |
| parent | 0850ab4fe2d83c16ad796bfab75d5d54d762ebf2 (diff) | |
Only show blog in the rss feed
| -rw-r--r-- | layouts/index.xml | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/layouts/index.xml b/layouts/index.xml index 3af797c..6ec821f 100644 --- a/layouts/index.xml +++ b/layouts/index.xml @@ -1,20 +1,16 @@ {{- $authorEmail := .Site.Params.email }} - {{- $authorName := .Site.Params.name }} - {{- $pctx := . }} {{- if .IsHome }}{{ $pctx = .Site }}{{ end }} {{- $pages := slice }} -{{- if or $.IsHome $.IsSection }} {{- $pages = $pctx.RegularPages }} -{{- else }} -{{- $pages = $pctx.Pages }} -{{- end }} +{{- $pages = where $pages "Section" "blog" }} {{- $limit := .Site.Config.Services.RSS.Limit }} {{- if ge $limit 1 }} {{- $pages = $pages | first $limit }} {{- end }} {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} + <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title> |
