feat: add draft support

This commit is contained in:
2022-11-25 15:50:48 +01:00
parent d11ca2e133
commit bef7af2d08
11 changed files with 57 additions and 13 deletions

View File

@@ -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>