From 7f736ac338f5274e649c79d7bc1c3cc7b4d05b14 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 2 May 2022 16:38:56 +0200 Subject: [PATCH 1/2] Fix #240 --- resources/views/components/article-excerpt.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/article-excerpt.blade.php b/resources/views/components/article-excerpt.blade.php index 912b10d5..1bca67e7 100644 --- a/resources/views/components/article-excerpt.blade.php +++ b/resources/views/components/article-excerpt.blade.php @@ -15,7 +15,7 @@ @isset($post->matter['date']) - {{ date('M jS, Y', strtotime($post->matter['date'])) }}, + {{ date('M jS, Y', strtotime($post->matter['date'])) }}{{ isset($post->matter['author']) ? ',' : '' }} @endisset @isset($post->matter['author']) From 2c66a7d2eb35016a37bdfe50d41781ef9e893806 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Mon, 2 May 2022 16:44:26 +0200 Subject: [PATCH 2/2] Make category nullable, fixes #230 --- src/Models/MarkdownPost.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/MarkdownPost.php b/src/Models/MarkdownPost.php index 443216d1..df753231 100644 --- a/src/Models/MarkdownPost.php +++ b/src/Models/MarkdownPost.php @@ -15,7 +15,7 @@ class MarkdownPost extends MarkdownDocument use HasDateString; use HasFeaturedImage; - public string $category; + public ?string $category; public static string $sourceDirectory = '_posts'; public static string $parserClass = MarkdownPostParser::class; @@ -29,6 +29,6 @@ public function __construct(array $matter, string $body, string $title = '', str $this->constructDateString(); $this->constructFeaturedImage(); - $this->category = $this->matter['category'] ?? ''; + $this->category = $this->matter['category'] ?? null; } }