From d11393780d53f4803ed6059ac0ee8b9a60190b13 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 16 Jan 2026 11:27:25 +0000 Subject: [PATCH] Updating homepage to automatically include blog posts in updates text --- layouts/index.html | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 948caf7..aa59789 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -75,12 +75,13 @@
> updates -lah
- {{ range first 10 (where .Site.RegularPages "Type" - "updates").ByDate.Reverse }} []
- {{ .Plain }}
- ---
+ {{ if eq .Type "blog" }} New blog post: {{ .Title }}
+ {{ else }} {{ .Plain }}
+ {{ end }} ---
{{ end }} _ @@ -286,10 +287,19 @@
{{ partial "elements/crt-tv.html" . }}
-{{ range first 1 (where .Site.RegularPages "Type" "updates").ByDate.Reverse }} + + +{{ range first 1 (union (where .Site.RegularPages "Type" "updates") (where .Site.RegularPages "Type" "blog")).ByDate.Reverse }}
{{ .Permalink }}
-
{{ .Plain }}
+
+ {{ if eq .Type "blog" }} + New blog post: {{ .Title }} + {{ else }} + {{ .Plain }} + {{ end }} +
{{ .Lastmod.Format "Jan 2, 2006" }}
-{{ end }} {{ end }} +{{ end }} +{{ end }}