From 3f180fa7c47b6b60b08bd2b0909beda9ebfffb94 Mon Sep 17 00:00:00 2001 From: Michael Noronha Date: Thu, 14 Jun 2018 00:41:29 -0500 Subject: [PATCH] Use default landing for blog section Addresses #78. Now, posts are grouped and ordered the same way on all pages. Tested on my site and caspern's --- layouts/_default/section.html | 15 +++------------ layouts/section/blog.html | 19 ------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 layouts/section/blog.html diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 3d5c92c..2cbd306 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -2,25 +2,16 @@
- {{ $globalTitle := .Title}} -
- {{ range .Data.Pages }} - {{ if eq .Title $globalTitle }} - {{ .Content }} - {{ end }} - {{ end }} -
- {{ if ne (len (where .Data.Pages "Title" "!=" $globalTitle)) 0}}
{{ .Title }}
    - {{ range .Data.Pages.ByPublishDate }} - {{ if ne .Title $globalTitle }} + {{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}} +
  • {{ .Key }}
  • + {{ range sort .Pages "Date" "desc" }} {{ partial "li.html" . }} {{ end }} {{ end }}
- {{ end }}
diff --git a/layouts/section/blog.html b/layouts/section/blog.html deleted file mode 100644 index 8b6d46f..0000000 --- a/layouts/section/blog.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ partial "header.html" . }} -
-
-
-
-
Blog
-
    - {{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}} -
  • {{ .Key }}
  • - {{ range sort .Pages "Date" "desc" }} - {{ partial "li.html" . }} - {{ end }} - {{ end }} -
-
-
-
-
-{{ partial "footer.html" . }}