Skip to content

Commit

Permalink
Add drafts.md, exclude drafts from index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
kfish committed May 18, 2019
1 parent f827ecb commit a650a1b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions drafts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: default
---

<div class="posts">
{% for post in site.posts %}
<article class="post">

<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>

<div class="entry">
{{ post.excerpt }}
</div>

<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endfor %}
</div>
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<div class="posts">
{% for post in site.posts %}
{% unless post.draft %}
<article class="post">

<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
Expand All @@ -14,5 +15,6 @@ <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>

<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endunless %}
{% endfor %}
</div>
</div>

0 comments on commit a650a1b

Please sign in to comment.