Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/appernetic/hugo-nederburg-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew McDermott <matthew@ableblue.com>2018-09-30 19:03:18 +0300
committerMatthew McDermott <matthew@ableblue.com>2018-09-30 19:03:18 +0300
commit460413e494c80bb9dad4cf86795b44754081fcb4 (patch)
tree0c077aca407f58ec22903decd018e97e4f79eeec
parent1a252e56b7af9ac740e416d8811dac6f941082c2 (diff)
Changed Portfolio, Category, and Tag to force date descending sort order.
-rw-r--r--layouts/partials/category.html2
-rw-r--r--layouts/partials/portfolio.html2
-rw-r--r--layouts/partials/tag.html2
3 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/category.html b/layouts/partials/category.html
index e392161..c3da19a 100644
--- a/layouts/partials/category.html
+++ b/layouts/partials/category.html
@@ -12,7 +12,7 @@
<h1 class="screen-reader-text">Posts</h1>
<div id="loop-container" class="loop-container">
- {{ range $index, $element := (where .Data.Pages "Section" "post") }}
+ {{ range $index, $element := (where .Data.Pages "Section" "post").ByDate.Reverse }}
{{ $scratch := newScratch }}
{{ if .Site.Params.writers }}
diff --git a/layouts/partials/portfolio.html b/layouts/partials/portfolio.html
index cbaaad4..f467331 100644
--- a/layouts/partials/portfolio.html
+++ b/layouts/partials/portfolio.html
@@ -1,7 +1,7 @@
<h1 class="screen-reader-text">Posts</h1>
<div id="loop-container" class="loop-container">
- {{ $paginator := .Paginate (where (where .Site.Pages "Type" "post") "IsPage" true) }}
+ {{ $paginator := .Paginate (where (where .Site.Pages "Type" "post").ByDate.Reverse "IsPage" true) }}
{{ range $index, $element := .Paginator.Pages }}
{{ $scratch := newScratch }}
{{ if .Site.Params.writers }}
diff --git a/layouts/partials/tag.html b/layouts/partials/tag.html
index 9e849d4..4b7d19e 100644
--- a/layouts/partials/tag.html
+++ b/layouts/partials/tag.html
@@ -12,7 +12,7 @@
<h1 class="screen-reader-text">Posts</h1>
<div id="loop-container" class="loop-container">
- {{ range $index, $element := (where .Data.Pages "Section" "post") }}
+ {{ range $index, $element := (where .Data.Pages "Section" "post").ByDate.Reverse }}
{{ if and (isset .Params "image") .Params.image }}
{{ if eq (mod $index 2) 0 }}
<div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-memories tag-normal-post tag-standard-2 excerpt zoom full-without-featured odd excerpt">