Browse Source

Add option to hide post (they're still build)

Fixes #9
master
digitalcraftsman 9 years ago
parent
commit
cf93e42859
  1. 1
      exampleSite/content/about/index.md
  2. 2
      layouts/partials/latest-posts.html
  3. 2
      layouts/partials/post-list.html

1
exampleSite/content/about/index.md

@ -1,6 +1,7 @@
+++
date = "2015-06-20T14:02:37+02:00"
title = "About"
hidden = true
+++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa ullam earum dolorum! Sed, perspiciatis.

2
layouts/partials/latest-posts.html

@ -1,6 +1,6 @@
<ul id="post-list" class="archive readmore">
<h3>{{ with .Site.Params.readMore }}{{ . }}{{ else }}Read more{{ end }}</h3>
{{ range first 10 .Site.Pages }}
{{ range first 10 (where .Site.Pages "Params.hidden" "ne" "true") }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if and (ne $url "about/") }}
<li>

2
layouts/partials/post-list.html

@ -1,5 +1,5 @@
<ul id="post-list">
{{ range .Paginator.Pages }}
{{ range where .Paginator.Pages "Params.hidden" "ne" "true" }}
{{ $url := replace .Permalink .Site.BaseURL "" }}
{{ if ne $url "about/" }}
<li>

Loading…
Cancel
Save