Allow listing drafts temporarily

This commit is contained in:
arne 2022-10-04 12:21:44 +02:00
commit 415ba04390
2 changed files with 3 additions and 2 deletions

View file

@ -2,6 +2,7 @@ module.exports = config => {
return {
"title": "arnes.space",
"baseUrl": "https://arnes.space",
"repo": "https://git.arnes.space/arne/arnes.space"
"repo": "https://git.arnes.space/arne/arnes.space",
"listDrafts": !!process.env.LIST_DRAFTS
}
}

View file

@ -5,7 +5,7 @@
<h2>Recent Posts</h2>
<ul class="post-list">
{%- for post in (collections.posts | reverse) -%}
{% if not post.data.draft %}
{% if not post.data.draft or page.listDrafts %}
<li{% if page.url == post.url %} aria-current="page"{% endif %}><time datetime="{{post.date}}">{{ post.date | toISODate }}</time> <a href="{{post.url}}">{{ post.data.title }}</a></li>
{% endif %}
{%- endfor -%}