shii.moe

Source for `shii.moe' website.
git clone git://git.knutsen.co/shii.moe
Log | Files | Refs | README | LICENSE

commit 6da1bedc9a68df3c8707e97c5bca9652ec5fb3c4
parent 41263f38ca3ce04bb34fd94458969e61277cd6ca
Author: Demonstrandum <samuel@knutsen.co>
Date:   Mon, 22 Aug 2022 20:11:05 +0100

Fix 'date' -> 'published', fix dates, and don't index hidden blogs.

The correct metadata key is 'published' not 'date',
and valid dates must contain the seconds part (just copy from the old
files please).  Blog posts which are hidden (file contains a leading
dot) will not be listed in the index, but are still accesible through
a direct link (/blog/.{the-blog-file-name}).

Diffstat:
Mblog/.childrens-food.md | 2+-
Mblog/allergies.md | 2+-
Mshiimoe/templates/blogindex.html | 2++
3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/blog/.childrens-food.md b/blog/.childrens-food.md @@ -1,6 +1,6 @@ --- title: Children's Food -date: 2022-08-21 15:00 +published: 2022-08-21 15:00:00 --- *This blogpost was written by a 70 year old Kentish woman, if you would like to diff --git a/blog/allergies.md b/blog/allergies.md @@ -1,6 +1,6 @@ --- title: Allergies in children -date: 2022-08-22 19:45 +published: 2022-08-22 19:45:00 --- I always thought lactose intolerance was something made up by the American media, diff --git a/shiimoe/templates/blogindex.html b/shiimoe/templates/blogindex.html @@ -54,6 +54,7 @@ </div> <ul class="blog-posts"> {% for post in posts %} + {% if not post['slug'].startswith('.') %} <li class="blog-listing"> <a href="/blog/{{ post['slug'] }}"> <span class="title">{{ post['title'] }}</span> @@ -62,6 +63,7 @@ </span> </a> </li> + {% endif %} {% endfor %} </ul> {% endblock %}