summaryrefslogtreecommitdiff
path: root/config.production.php
blob: 30a1b7b07a45737f0aab35584b2f454a2139e8b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

use Carbon\Carbon;

$now = Carbon::now();

return [
    'baseUrl'     => 'https://www.davidtsadler.com',
    'production'  => true,

    'collections' => [
        'posts' => [
            // Default author, if not provided in a post
            'author' => 'David T. Sadler',
            'sort'   => '-date',
            'path'   => '/posts/{date|Y-m-d}/{filename}',
            '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;
            }
        ],
    ],
];