diff options
author | tummychow <tummychow@users.noreply.github.com> | 2019-08-18 05:13:39 +0300 |
---|---|---|
committer | tummychow <tummychow@users.noreply.github.com> | 2019-08-18 05:13:39 +0300 |
commit | 33ecb3662ab63f7f15ecd3814ab08e982fde55b0 (patch) | |
tree | a1e638508500c88bf11ef5e17ec8e4e657275269 | |
parent | bc6345115ade24252d701b4f97dc3a67af79f11c (diff) |
use mainSections and RegularPages
breaking change from 0.57.1, see gohugoio/hugoThemes#682
fixes #28
also updates a few things to use IsHome, dunno which release this was
introduced in but it's probably better than what i was doing before
-rwxr-xr-x | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html index 2475182..104694f 100755 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,7 @@ {{ partial "default_head.html" . }} <!-- Space delimited list of page types --> -{{ $paginator := .Paginate (where .Data.Pages "Type" "in" "post") }} +{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} <div class="posts"> {{ range .Paginator.Pages }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 16f3fd0..b986614 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,7 +6,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <title> - {{ if eq .Permalink "/" }} + {{ if .IsHome }} {{ .Site.Params.Title }} · {{ .Site.Params.Tagline }} {{ else }} {{ .Title }} · {{ .Site.Params.Title }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 1d93a67..53936b3 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -9,7 +9,7 @@ </div> <nav class="sidebar-nav"> - <a class="sidebar-nav-item {{ if eq .Permalink "/" }} active {{ end }}" href="/">Home</a> + <a class="sidebar-nav-item {{ if .IsHome }} active {{ end }}" href="/">Home</a> <a class="sidebar-nav-item {{ if eq .RelPermalink "/post/" }} active {{ end }}" href="/post">Posts</a> {{ $thisperma := .Permalink }} |