mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 04:14:41 +00:00
Add notonhomepage option to prevent a specific post being displayed on homepage
This commit is contained in:
1 parent
20ece690c8
commit
0e222415ef
1 file changed
+2
-2
+2
-2
@@ -83,7 +83,7 @@
|
||||
|
||||
|
||||
<!-- Blog Posts Section -->
|
||||
{{ $posts_len := len (where .Data.Pages "Type" "post") }}
|
||||
{{ $posts_len := len (where (where .Data.Pages "Type" "post") ".Params.notonhomepage" nil) }}
|
||||
{{ if gt $posts_len 0 }}
|
||||
<section id="posts" class="home-section">
|
||||
<div class="container">
|
||||
@@ -101,7 +101,7 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-8">
|
||||
{{ range first .Site.Params.posts.count (where .Data.Pages "Type" "post") }}
|
||||
{{ range first .Site.Params.posts.count (where (where .Data.Pages "Type" "post") ".Params.notonhomepage" nil) }}
|
||||
<div class="article-list-item" itemscope itemprop="blogPost">
|
||||
{{ if .Params.image }}
|
||||
<a href="{{ .Permalink }}">
|
||||
|
||||
Reference in new issue
Block a user