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

github.com/garvincasimir/hugo-h5bp-simple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlayouts/index.html4
-rw-r--r--layouts/partials/aside.html3
2 files changed, 4 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 533a284..94d9ebd 100755
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,6 @@
{{ partial "header.html" . }}
- {{ partial "aside.html" . }}
- {{ range first 10 .Site.mainSections }}
+ {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+ {{ range $pages }}
<article>
<header>
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html
index 09f4bf3..e154025 100644
--- a/layouts/partials/aside.html
+++ b/layouts/partials/aside.html
@@ -1,7 +1,8 @@
<aside>
<h3>Recent</h3>
<ul>
- {{ range first 10 .Site.Pages }}
+ {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+ {{ range first 10 $pages }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>