'http://localhost:3000', 'production' => false, 'siteName' => 'davidtsadler.com', 'siteDescription' => 'My little bit of the Internet', 'siteAuthor' => 'David T. Sadler', 'perPage' => 2, // Collections 'collections' => [ 'posts' => [ // Default author, if not provided in a post 'author' => 'David T. Sadler', 'sort' => '-date', 'path' => '/posts/{date|Y-m-d}/{filename}', ], '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; }); }, ], ], // Helpers 'getDate' => function ($page) { return Datetime::createFromFormat('U', $page->date); }, 'allTags' => function ($page, $allPosts) { return $allPosts->pluck('tags')->flatten()->unique()->sort(); }, ];