diff options
| author | David T. Sadler <davidtsadler@googlemail.com> | 2020-02-20 23:17:42 +0000 |
|---|---|---|
| committer | David T. Sadler <davidtsadler@googlemail.com> | 2020-02-20 23:17:42 +0000 |
| commit | a12d45489a078f8067489ef8b42745c7b46e9a9a (patch) | |
| tree | 11f837fd0bfe1e6b6402b267c3046acd07d75475 /config.php | |
| parent | 498913806182905cc0c14bd12a61f9af26fa16b4 (diff) | |
Work on basic site layout
Diffstat (limited to 'config.php')
| -rw-r--r-- | config.php | 28 |
1 files changed, 17 insertions, 11 deletions
@@ -3,21 +3,22 @@ use Illuminate\Support\Str; return [ - 'baseUrl' => '', - 'production' => false, - 'siteName' => 'Blog Starter Template', - 'siteDescription' => 'Generate an elegant blog with Jigsaw', - 'siteAuthor' => 'Author Name', + 'baseUrl' => '', + 'production' => false, + 'siteName' => 'David T. Sadler', + 'siteDescription' => 'My little bit of the Internet', + 'siteAuthor' => 'David T. Sadler', - // collections + // Collections 'collections' => [ 'posts' => [ - 'author' => 'Author Name', // Default author, if not provided in a post - 'sort' => '-date', - 'path' => 'blog/{filename}', + // Default author, if not provided in a post + 'author' => 'David T. Sadler', + 'sort' => '-date', + 'path' => 'blog/{filename}', ], 'categories' => [ - 'path' => '/blog/categories/{filename}', + 'path' => '/blog/categories/{filename}', 'posts' => function ($page, $allPosts) { return $allPosts->filter(function ($post) use ($page) { return $post->categories ? in_array($page->getFilename(), $post->categories, true) : false; @@ -26,10 +27,15 @@ return [ ], ], - // helpers + // Helpers 'getDate' => function ($page) { return Datetime::createFromFormat('U', $page->date); }, + + 'allCategories' => function ($page, $allPosts) { + return $allPosts->pluck('categories')->flatten()->unique(); + }, + 'getExcerpt' => function ($page, $length = 255) { if ($page->excerpt) { return $page->excerpt; |
