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']) 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; } }