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

github.com/carsonip/hugo-theme-minos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarson Ip <carsonip@users.noreply.github.com>2019-03-16 13:28:55 +0300
committerGitHub <noreply@github.com>2019-03-16 13:28:55 +0300
commit2dad965b58873fa23b199b7bc3332935ab7d421a (patch)
tree9734795b149c3e3a8b5f05cf20c14bf5985ad398
parentc1e3d1baad340d0551cbf20ff0fcb91f9fd8de30 (diff)
parenta16f81717b21388c526f5600c54e856476b40b62 (diff)
Merge pull request #25 from Nelarius/hide-posts-from-main-list
Add ability to hide posts from index
-rw-r--r--README.md8
-rw-r--r--layouts/index.html2
2 files changed, 9 insertions, 1 deletions
diff --git a/README.md b/README.md
index 513804e..127f710 100644
--- a/README.md
+++ b/README.md
@@ -80,6 +80,14 @@ featuredImage = "img/foobar.jpg"
+++
```
+### Hide the post from index.html
+This can be used when creating an "About me"-page.
+```
++++
+hide = true
++++
+```
+
## Contributing
1. Fork it!
diff --git a/layouts/index.html b/layouts/index.html
index 8e550f2..e1b4e99 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -3,7 +3,7 @@
<div id="container">
{{ partial "header.html" . }}
<section id="main" class="outer">
- {{ range .Paginator.Pages }}
+ {{ range where .Paginator.Pages "Params.hide" "ne" "true" }}
<article class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-inner">
<!--<%- partial('post/gallery') %>-->