Allow listing drafts temporarily
This commit is contained in:
parent
ade31972b3
commit
415ba04390
2 changed files with 3 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ module.exports = config => {
|
||||||
return {
|
return {
|
||||||
"title": "arnes.space",
|
"title": "arnes.space",
|
||||||
"baseUrl": "https://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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<h2>Recent Posts</h2>
|
<h2>Recent Posts</h2>
|
||||||
<ul class="post-list">
|
<ul class="post-list">
|
||||||
{%- for post in (collections.posts | reverse) -%}
|
{%- 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>
|
<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 %}
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue