From d87c83c0726ecf0fdcbe5f28813cc32be31a7aec Mon Sep 17 00:00:00 2001 From: Balakrishnan Balasubramanian Date: Wed, 28 May 2025 23:27:28 -0400 Subject: [PATCH] Add drafts list and refactor home with inline partials --- layouts/home.html | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/layouts/home.html b/layouts/home.html index 99e1b27..228552d 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -6,20 +6,25 @@ {{ range .Site.Taxonomies.tags }}

{{ .Page.Title }} ({{ len . }})

-
{{ end }} {{- end }} -

All Pages

+ {{ with where .Site.RegularPages "Draft" true }} +

Drafts

+ {{ partial "inline/postList.html" . }} + {{ end }} + {{ with where .Site.RegularPages "Draft" false }} +

All Pages

+ {{ partial "inline/postList.html" . }} + {{ else }} +

No pages found

+ {{ end }} +{{ end }} + +{{ define "partials/inline/postList.html" }}