From 9b4454e321082f743d7338c56360ca08a788c2f0 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 21 Aug 2020 15:51:26 +0100 Subject: Refactor configuration --- config.production.php | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) (limited to 'config.production.php') diff --git a/config.production.php b/config.production.php index 144cac5..b296813 100644 --- a/config.production.php +++ b/config.production.php @@ -1,36 +1,6 @@ 'https://www.davidtsadler.com', - 'production' => true, - - 'collections' => [ - 'posts' => [ - // Default author, if not provided in a post - 'author' => 'David T. Sadler', - 'sort' => '-date', - 'path' => '/posts', - 'filter' => function ($item) use ($now) { - // Only publish posts that have a date and which is not in the future. - $date = $item->getDate(); - return $date ? $date <= $now : false; - } - ], - 'tags' => [ - 'path' => '/tags/{filename}', - 'posts' => function ($page, $allPosts) { - return $allPosts->filter(function ($post) use ($page) { - $tagSlugs = array_map(function ($tag) { - return Str::slug($tag); - }, $post->tags); - return $post->tags ? in_array($page->getFilename(), $tagSlugs, true) : false; - }); - }, - ], - ], + 'baseUrl' => 'https://www.davidtsadler.com', + 'production' => true, ]; -- cgit v1.2.3-13-gbd6f