feat: add draft support
This commit is contained in:
@@ -21,10 +21,11 @@ templateClass: tmpl-post
|
||||
|
||||
<hr>
|
||||
|
||||
{%- if collections.articles %}
|
||||
{%- set articles = collections.articles | filterDraft %}
|
||||
{%- if articles %}
|
||||
{# these filters are locale-aware in 2.0.0-canary.14 #}
|
||||
{%- set previousArticle = collections.articles | getPreviousCollectionItem %}
|
||||
{%- set nextArticle = collections.articles | getNextCollectionItem %}
|
||||
{%- set previousArticle = articles | getPreviousCollectionItem %}
|
||||
{%- set nextArticle = articles | getNextCollectionItem %}
|
||||
{%- if nextArticle or previousArticle %}
|
||||
<nav class="post-nav">
|
||||
<ul>
|
||||
|
Reference in New Issue
Block a user