From 2adb290449558b5e1b7a30bb9d25156ae0491445 Mon Sep 17 00:00:00 2001 From: Nantha Sorubakanthan Date: Sun, 5 Oct 2025 16:32:39 +0200 Subject: Changes to rss handling --- archetypes/default.md | 6 ++++++ content/blog/someone-emailed-me.md | 1 + content/blog/trying-out-helix.md | 1 + layouts/index.xml | 9 +-------- 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 archetypes/default.md diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..45b16e7 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: {{ replace .Name "-" " " | title }} +date: {{ .Date }} +draft: true +index: false +--- diff --git a/content/blog/someone-emailed-me.md b/content/blog/someone-emailed-me.md index edd35f3..548fc56 100644 --- a/content/blog/someone-emailed-me.md +++ b/content/blog/someone-emailed-me.md @@ -1,6 +1,7 @@ --- title: "Someone emailed me" date: 2025-10-05T08:07:49+02:00 +index: true --- ## The actual email part diff --git a/content/blog/trying-out-helix.md b/content/blog/trying-out-helix.md index f7fd503..6fc40e0 100644 --- a/content/blog/trying-out-helix.md +++ b/content/blog/trying-out-helix.md @@ -1,6 +1,7 @@ --- title: "Trying out Helix" date: 2025-09-22T09:08:19+02:00 +index: true --- ## Intro diff --git a/layouts/index.xml b/layouts/index.xml index 6ec821f..db5dd5c 100644 --- a/layouts/index.xml +++ b/layouts/index.xml @@ -2,15 +2,8 @@ {{- $authorName := .Site.Params.name }} {{- $pctx := . }} {{- if .IsHome }}{{ $pctx = .Site }}{{ end }} -{{- $pages := slice }} -{{- $pages = $pctx.RegularPages }} -{{- $pages = where $pages "Section" "blog" }} -{{- $limit := .Site.Config.Services.RSS.Limit }} -{{- if ge $limit 1 }} -{{- $pages = $pages | first $limit }} -{{- end }} +{{- $pages := where .Site.RegularPages "Params.index" true }} {{- printf "" | safeHTML }} - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} -- cgit v1.2.3