Merge pull request #212 from gregfedorov/master

Easing the life of a noob on get go, making sure nothing errors out.
This commit is contained in:
picocms 2015-04-21 22:44:35 +01:00
commit cee070f64e
2 changed files with 5 additions and 1 deletions

View file

@ -17,6 +17,10 @@ $config['pages_order'] = 'asc'; // Order pages "asc" or "desc"
$config['excerpt_length'] = 50; // The pages excerpt length (in words)
$config['content_dir'] = 'content-sample/'; // Content directory.
// Specify timezone if required
date_default_timezone_set('UTC');
// To add a custom config setting:
$config['custom_setting'] = 'Hello'; // Can be accessed by {{ config.custom_setting }} in a theme

View file

@ -247,7 +247,7 @@ class Pico {
'date' => isset($page_meta['date']) ? $page_meta['date'] : '',
'date_formatted' => isset($page_meta['date']) ? utf8_encode(strftime($config['date_format'], strtotime($page_meta['date']))) : '',
'content' => $page_content,
'excerpt' => $this->limit_words(strip_tags($page_content), $excerpt_length)
'excerpt' => $this->limit_words(strip_tags($page_content), $excerpt_length),
//this addition allows the 'description' meta to be picked up in content areas... specifically to replace 'excerpt'
'description' => isset($page_meta['description']) ? $page_meta['description'] : '',