From d10f3792ac517bddaf8af3c976853cffbae72aeb Mon Sep 17 00:00:00 2001 From: Laurenz Weixlbaumer Date: Fri, 17 Apr 2020 21:15:55 +0200 Subject: [PATCH] Lowercase path names and slugs, closes #12 --- source/item.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/item.d b/source/item.d index f56f8c7..af2a66f 100644 --- a/source/item.d +++ b/source/item.d @@ -1,3 +1,4 @@ +import std.uni : toLower; import std.file : readText; import std.path : baseName, stripExtension; import std.json; @@ -22,7 +23,7 @@ Item parseItem(const string itemPath) JSONValue j = content[0 .. indexOf(content, '\n')].parseJSON; Item i; - i.path = itemPath; + i.path = itemPath.toLower; i.title = j["title"].str; i.slug = itemPath.stripExtension.baseName; i.date = Date.fromISOExtString(j["date"].str);