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

github.com/tummychow/lanyon-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortummychow <tummychow@users.noreply.github.com>2019-08-18 05:13:39 +0300
committertummychow <tummychow@users.noreply.github.com>2019-08-18 05:13:39 +0300
commit33ecb3662ab63f7f15ecd3814ab08e982fde55b0 (patch)
treea1e638508500c88bf11ef5e17ec8e4e657275269
parentbc6345115ade24252d701b4f97dc3a67af79f11c (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-xlayouts/index.html2
-rw-r--r--layouts/partials/head.html2
-rw-r--r--layouts/partials/sidebar.html2
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 }} &middot; {{ .Site.Params.Tagline }}
{{ else }}
{{ .Title }} &middot; {{ .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 }}