create a way to unlist blog entries (use case is for drafts)

This commit is contained in:
Colin 2022-04-06 05:07:38 +00:00
parent 91817d12f4
commit cf84ba58d9
2 changed files with 18 additions and 8 deletions

8
content/blog/template.md Normal file
View File

@ -0,0 +1,8 @@
+++
title = "Template Blog Entry"
date = 2022-01-01
description = "remove extra.hidden to link this from the index"
extra.hidden = true
+++
digging around the site, huh? :-)

View File

@ -9,14 +9,16 @@
<ul>
{% for page in blog.pages %}
<li>
<div>
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
</div>
<div class="subtitle">{{ page.description }}
<span class="date">({{ page.date | date(format="%Y/%m/%d") }})</span>
</div>
</li>
{% if not page.extra.hidden %}
<li>
<div>
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
</div>
<div class="subtitle">{{ page.description }}
<span class="date">({{ page.date | date(format="%Y/%m/%d") }})</span>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
{% endblock content %}