|
|
@ -18,6 +18,7 @@ $router->map('GET', '/about', function() {}, 'about'); |
|
|
|
$router->map('GET', '/feeds', function() {}, 'feeds'); |
|
|
|
$router->map('GET', '/uses', function() {}, 'uses'); |
|
|
|
$router->map('GET', '/now', function() {}, 'now'); |
|
|
|
$router->map('GET', '/blogroll', function() {}, 'blogroll'); |
|
|
|
$router->map('GET', '/blog', function() {}, 'blog'); |
|
|
|
$router->map('GET', '/blog/[*:slug]', function() {}, 'blog_post'); |
|
|
|
$router->map('GET', '/notes', function() {}, 'notes'); |
|
|
@ -109,6 +110,11 @@ if ($match['name'] == 'now') { |
|
|
|
$variables['title'] = 'Now — '.$basetitle; |
|
|
|
} |
|
|
|
|
|
|
|
// If we are dealing with the blogroll
|
|
|
|
if ($match['name'] == 'blogroll') { |
|
|
|
$variables['title'] = 'Blogroll — '.$basetitle; |
|
|
|
} |
|
|
|
|
|
|
|
// If we are dealing with the blog
|
|
|
|
if ($match['name'] == 'blog') { |
|
|
|
$variables['posts'] = getBlogPosts($match['params']); |
|
|
@ -233,6 +239,10 @@ if ($environment === 'production') { |
|
|
|
\Phug\Optimizer::call('displayFile', ['now', $variables], $options); |
|
|
|
break; |
|
|
|
|
|
|
|
case 'blogroll': |
|
|
|
\Phug\Optimizer::call('displayFile', ['blogroll', $variables], $options); |
|
|
|
break; |
|
|
|
|
|
|
|
case 'blog': |
|
|
|
\Phug\Optimizer::call('displayFile', ['blog', $variables], $options); |
|
|
|
break; |
|
|
@ -333,6 +343,10 @@ if(is_array($match) && is_callable($match['target'])) { |
|
|
|
Phug::displayFile('now', $variables, $options); |
|
|
|
break; |
|
|
|
|
|
|
|
case 'blogroll': |
|
|
|
Phug::displayFile('blogroll', $variables, $options); |
|
|
|
break; |
|
|
|
|
|
|
|
case 'blog': |
|
|
|
Phug::displayFile('blog', $variables, $options); |
|
|
|
break; |
|
|
|