Instead of using `*.config.php` files, use `*.yml` files to configure Pico. YAML is much easier to understand, more user friendly and (at least a bit) more error-tolerant, but still very powerful. Don't break BC by letting `PicoDeprecated` still read `config/config.php`.pico-3.0-alpha
parent
0a080c8965
commit
9b7523b9e8
@ -1,61 +0,0 @@ |
|||||||
<?php |
|
||||||
/** |
|
||||||
* Pico configuration |
|
||||||
* |
|
||||||
* This is the configuration file for {@link Pico}. It comes loaded with the |
|
||||||
* default values, which can be found in {@link Pico::getConfig()} (see |
|
||||||
* {@path "lib/Pico.php"}). |
|
||||||
* |
|
||||||
* To override any of the default settings below, copy this file to |
|
||||||
* {@path "config/config.php"}, uncomment the line, then make and |
|
||||||
* save your changes. |
|
||||||
* |
|
||||||
* @link http://picocms.org |
|
||||||
* @license http://opensource.org/licenses/MIT The MIT License |
|
||||||
* @version 2.0 |
|
||||||
*/ |
|
||||||
|
|
||||||
/* |
|
||||||
* BASIC |
|
||||||
*/ |
|
||||||
// $config['site_title'] = 'Pico'; // Site title |
|
||||||
// $config['base_url'] = ''; // Override base URL (e.g. http://example.com/pico/) |
|
||||||
// $config['rewrite_url'] = null; // A boolean indicating forced URL rewriting |
|
||||||
|
|
||||||
/* |
|
||||||
* THEME |
|
||||||
*/ |
|
||||||
// $config['theme'] = 'default'; // Set the theme (defaults to "default") |
|
||||||
// $config['theme_url'] = ''; // Override the base URL of the themes folder (e.g. http://example.com/pico/themes/) |
|
||||||
// $config['theme_config'] = array( // Settings of the theme; depends on the theme used |
|
||||||
// 'widescreen' => false // Default theme: Allocate more horicontal space (i.e. make the site container wider) |
|
||||||
// ); |
|
||||||
// $config['twig_config'] = array( // Twig settings |
|
||||||
// 'cache' => false, // To enable Twig caching change this to a path to a writable directory |
|
||||||
// 'autoescape' => false, // Auto-escape Twig vars |
|
||||||
// 'debug' => false // Enable Twig debug |
|
||||||
// ); |
|
||||||
|
|
||||||
/* |
|
||||||
* CONTENT |
|
||||||
*/ |
|
||||||
// $config['date_format'] = '%D %T'; // Set the PHP date format as described here: http://php.net/manual/en/function.strftime.php |
|
||||||
// $config['pages_order_by'] = 'alpha'; // Order pages by "alpha" or "date" |
|
||||||
// $config['pages_order'] = 'asc'; // Order pages "asc" or "desc" |
|
||||||
// $config['content_dir'] = 'content-sample/'; // Content directory |
|
||||||
// $config['content_ext'] = '.md'; // File extension of content files to serve |
|
||||||
|
|
||||||
/* |
|
||||||
* TIMEZONE |
|
||||||
*/ |
|
||||||
// $config['timezone'] = 'UTC'; // Timezone may be required by your php install |
|
||||||
|
|
||||||
/* |
|
||||||
* PLUGINS |
|
||||||
*/ |
|
||||||
// $config['DummyPlugin.enabled'] = false; // Force DummyPlugin to be disabled |
|
||||||
|
|
||||||
/* |
|
||||||
* CUSTOM |
|
||||||
*/ |
|
||||||
// $config['custom_setting'] = 'Hello'; // Can be accessed by {{ config.custom_setting }} in a theme |
|
@ -0,0 +1,41 @@ |
|||||||
|
## |
||||||
|
# Basic |
||||||
|
# |
||||||
|
site_title: Pico # The title of your website |
||||||
|
base_url: ~ # Pico will try to guess its base URL, if this fails, override it here |
||||||
|
# Example: http://example.com/pico/ |
||||||
|
rewrite_url: ~ # A boolean (true or false) indicating whether URL rewriting is forced |
||||||
|
timezone: UTC # Your PHP installation might require you to manually specify a timezone |
||||||
|
|
||||||
|
## |
||||||
|
# Theme |
||||||
|
# |
||||||
|
theme: default # The name of your custom theme |
||||||
|
theme_url: ~ # Pico will try to guess the URL to the themes dir of your installation |
||||||
|
# If this fails, override it here. Example: http://example.com/pico/themes/ |
||||||
|
theme_config: |
||||||
|
widescreen: false # Default theme: Use more horicontal space (i.e. make the site container wider) |
||||||
|
twig_config: |
||||||
|
cache: false # Enable Twig template caching by specifying a path to a writable directory |
||||||
|
autoescape: false # Let Twig escape variables by default |
||||||
|
debug: false # Enable Twig's debugging mode |
||||||
|
|
||||||
|
## |
||||||
|
# Content |
||||||
|
# |
||||||
|
date_format: %D %T # Pico's default date format |
||||||
|
# List of available variables: http://php.net/manual/en/function.strftime.php |
||||||
|
pages_order_by: alpha # Change how Pico sorts pages ("alpha" for alphabetical order, or "date") |
||||||
|
pages_order: asc # Sort pages in ascending ("asc") or descending ("desc") order |
||||||
|
content_dir: content/ # The path to Pico's content directory |
||||||
|
content_ext: .md # The file extension of your Markdown files |
||||||
|
|
||||||
|
## |
||||||
|
# Plugins |
||||||
|
# |
||||||
|
DummyPlugin.enabled: false # Force the plugin "DummyPlugin" to be disabled |
||||||
|
|
||||||
|
## |
||||||
|
# Custom |
||||||
|
# |
||||||
|
my_custom_setting: Hello World! # You can access custom settings in themes using {{ config.my_custom_setting }} |
Loading…
Reference in new issue