summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok cheetah2019-05-15 21:19:33 +0200
committeruvok cheetah2019-05-15 21:19:33 +0200
commit1eeef4820dbd312f5e67673ccec745d620b194a3 (patch)
tree3a582721236af62004bd9853ee3896cf61e11065
parent92411ecbd9f0cbcec5620de2efbefade7254afca (diff)
Add "unlisted" header to hide posts from listing
-rw-r--r--_drafts/test.md7
-rw-r--r--index.html6
2 files changed, 12 insertions, 1 deletions
diff --git a/_drafts/test.md b/_drafts/test.md
new file mode 100644
index 0000000..24a3a93
--- /dev/null
+++ b/_drafts/test.md
@@ -0,0 +1,7 @@
+---
+title: Trying out unlisted posts
+layout: post
+unlisted: true
+---
+
+This is me trying out "private" posts...
diff --git a/index.html b/index.html
index 8e063b3..844ab4f 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,11 @@ layout: default
<div class="home">
<ul class="post-list">
- {% for post in site.posts %}
+ {% for post in site.posts %}
+ {% if post.unlisted == true %}
+ {% continue %}
+ {% endif %}
+
<li>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>