Better user config/git compatability.
Removed `config.php` from repo, and replaced w/ `config.php.dist`. This allows users to update their Pico install w/o changing their settings. Additionally now ignoring user added themes.
This commit is contained in:
parent
aac5b9f575
commit
1165cff633
3 changed files with 20 additions and 29 deletions
20
.gitignore
vendored
20
.gitignore
vendored
|
@ -1,5 +1,23 @@
|
|||
# Composer
|
||||
composer.lock
|
||||
composer.phar
|
||||
|
||||
# Twig
|
||||
vendor/twig/twig/doc/*
|
||||
vendor/twig/twig/ext/*
|
||||
vendor/twig/twig/test/*
|
||||
vendor/twig/twig/test/*
|
||||
|
||||
# OS Generated
|
||||
.DS_Store*
|
||||
ehthumbs.db
|
||||
Icon?
|
||||
Thumbs.db
|
||||
*.swp
|
||||
|
||||
# User themes
|
||||
themes/*
|
||||
!themes/index.html
|
||||
!themes/default/*
|
||||
|
||||
# User config
|
||||
config.php.dist
|
25
config.php
25
config.php
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
// Override any of the default settings below:
|
||||
|
||||
$config['site_title'] = 'Pico'; // Site title
|
||||
$config['base_url'] = ''; // Override base URL (e.g. http://example.com)
|
||||
$config['theme'] = 'default'; // Set the theme (defaults to "default")
|
||||
$config['date_format'] = 'jS M Y'; // Set the PHP date format
|
||||
$config['twig_config'] = array( // Twig settings
|
||||
'cache' => false, // To enable Twig caching change this to CACHE_DIR
|
||||
'autoescape' => false, // Autoescape Twig vars
|
||||
'debug' => false // Enable Twig debug
|
||||
);
|
||||
$config['pages_order_by'] = 'alpha'; // Order pages by "alpha" or "date"
|
||||
$config['pages_order'] = 'asc'; // Order pages "asc" or "desc"
|
||||
$config['excerpt_length'] = 50; // The pages excerpt length (in words)
|
||||
|
||||
// To add a custom config setting:
|
||||
|
||||
$config['custom_setting'] = 'Hello'; // Can be accessed by {{ config.custom_setting }} in a theme
|
||||
|
||||
*/
|
||||
|
||||
// End of file
|
|
@ -179,10 +179,8 @@ class Pico {
|
|||
*/
|
||||
private function get_config()
|
||||
{
|
||||
if(!file_exists(ROOT_DIR .'config.php')) return array();
|
||||
|
||||
global $config;
|
||||
require_once(ROOT_DIR .'config.php');
|
||||
@include_once(ROOT_DIR .'config.php');
|
||||
|
||||
$defaults = array(
|
||||
'site_title' => 'Pico',
|
||||
|
|
Loading…
Add table
Reference in a new issue