Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pico 1.0 #252

Merged
merged 120 commits into from Nov 6, 2015
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
adc3562
Remove index.html
PhrozenByte Aug 28, 2015
c496297
Class files should exactly match the class name
PhrozenByte Aug 28, 2015
284e0ce
Move constants to global.php
PhrozenByte Aug 28, 2015
92c307d
Pico 1.0
PhrozenByte Aug 28, 2015
cd14582
Remove pull request message
PhrozenByte Aug 28, 2015
43a7540
Add IPicoPlugin
PhrozenByte Aug 28, 2015
07ae267
Add AbstractPicoPlugin
PhrozenByte Aug 28, 2015
b347790
Replace Pico_Plugin with DummyPlugin
PhrozenByte Aug 28, 2015
fd1b94e
Update composer.json
PhrozenByte Aug 28, 2015
70316ec
Add PicoDeprecated, PicoParsePagesContent, PicoExcerpt
PhrozenByte Aug 28, 2015
144939b
Update config.php.template
PhrozenByte Aug 28, 2015
39e1d78
Update sample content
PhrozenByte Aug 28, 2015
5438fdb
Rename index.html of default theme to index.twig; Update template
PhrozenByte Aug 28, 2015
c44afd3
Update .htaccess
PhrozenByte Aug 28, 2015
df10d60
Fixing paths in global.php
PhrozenByte Aug 30, 2015
5eed6d0
Add missing update of index.twig
PhrozenByte Aug 30, 2015
5338223
Workaround for webservers omitting QUERY_STRING
PhrozenByte Aug 30, 2015
a83b01e
Access plugins by class name, not file name
PhrozenByte Sep 6, 2015
71e7da2
Various fixes
PhrozenByte Sep 13, 2015
5731ede
Allow omitting config/config.php; Fix write context on return value
PhrozenByte Sep 14, 2015
4821454
Declare in config/config.php.template to prevent a E_NOTICE
PhrozenByte Sep 14, 2015
70f187f
Rename IPicoPlugin to PicoPluginInterface
PhrozenByte Sep 15, 2015
f76a0b7
Use v0.7 releases of erusev/parsedown-extra
PhrozenByte Sep 15, 2015
5533b07
Re-add lost PicoPluginInterface
PhrozenByte Sep 15, 2015
a7fd853
Add striptags filter to description meta header
PhrozenByte Sep 17, 2015
a5755b0
Fix deprecated get_page_data and get_pages events
PhrozenByte Sep 28, 2015
13a50c7
Don't change $pageData['id'], add ~dup1 to the array key only
PhrozenByte Sep 28, 2015
8d88863
Fix whitespace
PhrozenByte Sep 28, 2015
5e77d86
Remove twig cache dir
PhrozenByte Sep 28, 2015
fc7632b
Overhaul init of Pico
PhrozenByte Oct 1, 2015
cdef7a6
Explicitly treat relative paths to be relative to Picos root dir
PhrozenByte Oct 1, 2015
95db5ba
Drop inaccessible pages
PhrozenByte Oct 1, 2015
45815e2
Don't read file contents of inaccessible pages
PhrozenByte Oct 1, 2015
fd64e4f
Add a exception to alpha sorting: List index files first
PhrozenByte Oct 1, 2015
012dffa
Fix #257
PhrozenByte Oct 1, 2015
fbb744d
Deny access to config, content, content-sample, lib and vendor dirs
PhrozenByte Oct 1, 2015
241a529
Update inline code comments
PhrozenByte Oct 1, 2015
9be23de
Require PHP >= 5.3.6 until erusev/parsedown-extra#75 is solved
PhrozenByte Oct 2, 2015
00f76d1
Update README.md
PhrozenByte Oct 3, 2015
7698f18
Merge branch 'master' into pico1.0
PhrozenByte Oct 3, 2015
fa024ce
Fix README.md formatting
PhrozenByte Oct 3, 2015
ab89945
Improve README.md formatting; Run PHP web server on localhost only
PhrozenByte Oct 3, 2015
3a4721a
SCANDIR_SORT_* constants are available since PHP 5.4
PhrozenByte Oct 4, 2015
3f7b099
Declare undefined $plugins variable
PhrozenByte Oct 4, 2015
77f9390
Support per-directory 404.md files
PhrozenByte Oct 4, 2015
9aa62b4
Improve method docs of Pico::load404Content()
PhrozenByte Oct 4, 2015
ef1a9e0
Improve README.md
PhrozenByte Oct 4, 2015
2e15e11
Define deprecated constants before evaluating the config.php in Picos…
PhrozenByte Oct 4, 2015
006afa5
Update changelog.txt
PhrozenByte Oct 4, 2015
27d6946
Fix code formatting
PhrozenByte Oct 4, 2015
79e2dac
Fix method docs typo
PhrozenByte Oct 4, 2015
4f1e866
Cast AbstractPicoPlugin::$dependsOn to array
PhrozenByte Oct 4, 2015
9d518fd
Move sorting of $pages from Pico::getPages() to Pico::sortPages()
PhrozenByte Oct 4, 2015
46ef631
Support $config['<plugin name>']['enabled'] option
PhrozenByte Oct 4, 2015
1cbf48a
Split PicoDeprecated::onConfigLoaded() into multiple methods
PhrozenByte Oct 4, 2015
7537159
Remove the need to register headers during onMetaHeaders()
PhrozenByte Oct 4, 2015
7aa199d
Update changelog.txt for 7537159
PhrozenByte Oct 4, 2015
1419cf1
Add Pico::setConfig() method
PhrozenByte Oct 6, 2015
04a1c60
Update changelog.txt for 1419cf1
PhrozenByte Oct 6, 2015
b09433a
Allow multiple calls to Pico::setConfig()
PhrozenByte Oct 6, 2015
7c5f371
Use PSR-0 autoload
PhrozenByte Oct 8, 2015
40dbd0e
Update Picos inline user docs
PhrozenByte Oct 8, 2015
b46ed05
Let users know about Twigs link filter
PhrozenByte Oct 9, 2015
3336fb7
fix spelling
theshka Oct 9, 2015
fe83d1f
fix spelling
theshka Oct 9, 2015
01122f2
fix spelling
theshka Oct 9, 2015
8380b54
fix spelling
theshka Oct 9, 2015
132399f
add comments/in-line docs
theshka Oct 9, 2015
aec024a
fix spelling
theshka Oct 9, 2015
15515ff
Fix typo/formatting
PhrozenByte Oct 9, 2015
9cdd34e
Change content order, add Customization section
PhrozenByte Oct 9, 2015
4171f9a
Move URL Rewriting to Config section
PhrozenByte Oct 9, 2015
92af554
Improve inline code comments; preparing use of phpDocumentor
PhrozenByte Oct 27, 2015
a654b15
phpDocumentor 2.8.5 currently doesn't support the Generic notations
PhrozenByte Oct 27, 2015
de6b3a7
Fix Markdown %meta.*% replacement
PhrozenByte Oct 28, 2015
9e2604a
Prevent content_dir breakouts using malicious request URLs
PhrozenByte Oct 28, 2015
647a7b5
Trap empty $requestFileParts
PhrozenByte Oct 28, 2015
3e0161b
Create .travis.yml
dav-m85 Oct 28, 2015
d3a1308
Update .travis.yml
PhrozenByte Oct 28, 2015
efcbbb8
Update .travis.yml
PhrozenByte Oct 28, 2015
a068a1f
Update changelog.txt
PhrozenByte Oct 28, 2015
360e7ab
Update .travis.yml
PhrozenByte Oct 28, 2015
43f9590
Update .travis.yml
PhrozenByte Oct 28, 2015
a068850
Update .travis.yml
PhrozenByte Oct 28, 2015
38081b3
Sync docs with website
PhrozenByte Oct 28, 2015
638638f
Add UPGRADE section to docs
PhrozenByte Oct 28, 2015
f1fc4c9
Revert commit a068850
PhrozenByte Oct 29, 2015
54ce5b9
Various small improvements
PhrozenByte Oct 29, 2015
d29e2c1
Add CONTRIBUTING.md
PhrozenByte Oct 29, 2015
7a69fdf
Update CONTRIBUTING.md
PhrozenByte Oct 29, 2015
e6681ea
Improve class docs
PhrozenByte Oct 29, 2015
afb55b9
Improve class docs
PhrozenByte Oct 29, 2015
9a70241
Remove `return $config` in `config/config.php`
PhrozenByte Oct 30, 2015
8da62f4
PicoDeprecated: Making $config globally accessible again
PhrozenByte Oct 31, 2015
85d7c51
Update CONTRIBUTING.md
PhrozenByte Nov 2, 2015
2597e0d
Move upgrade instructions from inline docs to README.md in a more gen…
PhrozenByte Nov 2, 2015
ebe007b
Guess content directory
PhrozenByte Nov 2, 2015
a1331e7
Update inline docs to reflect ebe007b
PhrozenByte Nov 2, 2015
8db3bc5
Update changelog.txt to reflect ebe007b
PhrozenByte Nov 2, 2015
92adb27
Update README.md
PhrozenByte Nov 2, 2015
0e0eb56
Update CONTRIBUTING.md
PhrozenByte Nov 2, 2015
641a5d1
Merge branch 'pico1.0' of github.com:PhrozenByte/Pico into pico1.0
PhrozenByte Nov 2, 2015
d65eb55
Update README.md
PhrozenByte Nov 2, 2015
2ab3611
Update content-sample/index.md
PhrozenByte Nov 2, 2015
ffc5936
README.md: Add Getting Help section
PhrozenByte Nov 3, 2015
365333c
Update content-sample/index.md
PhrozenByte Nov 3, 2015
48264fc
Move license.txt and changelog.txt
PhrozenByte Nov 3, 2015
8164038
Use Markdown for CHANGELOG.md
PhrozenByte Nov 3, 2015
82e0ca5
Small changes
PhrozenByte Nov 3, 2015
90128f4
Fix possible foreach on null errors
PhrozenByte Nov 3, 2015
e3a6116
Sync documentation
PhrozenByte Nov 4, 2015
ccac8dd
Force trailing slash of $config['base_url'] and force existance of $c…
PhrozenByte Nov 4, 2015
2a43b21
Enable PicoDeprecated if no plugins are loaded
PhrozenByte Nov 4, 2015
af8de56
Fix typos
PhrozenByte Nov 4, 2015
19f708e
Sync documentation
PhrozenByte Nov 4, 2015
b5d54d0
Update .travis.yml: Name release archives "pico-release-$TRAVIS_TAG.t…
PhrozenByte Nov 5, 2015
cd7cd37
Add content filter to get the parsed contents of a page (lazy loading)
PhrozenByte Nov 6, 2015
e3e0300
Fix typo
PhrozenByte Nov 6, 2015
82cbe37
fix typos
theshka Nov 6, 2015
cd1dc07
Sync docs
PhrozenByte Nov 6, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion .htaccess
Expand Up @@ -4,7 +4,11 @@
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
RewriteRule ^(.*)$ index.php?$1 [L,QSA]

<IfModule mod_env.c>
SetEnv PICO_URL_REWRITING 1
</IfModule>
</IfModule>

# Prevent file browsing
Expand Down
9 changes: 7 additions & 2 deletions composer.json
Expand Up @@ -14,9 +14,14 @@
"require": {
"php": ">=5.3.2",
"twig/twig": "1.18.*",
"erusev/parsedown-extra": "dev-master@dev"
"erusev/parsedown-extra": "dev-master@dev",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mh why not a stable constraint here ? Gonna break at the next composer update.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theshka (968dc18), are there any reasons that oppose using e.g. 0.7.* instead?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PhrozenByte, @dav-m85 ... No, I think that was just overlooked at some point. I would say to use a stable constraint here instead of the dev branch.

"symfony/yaml" : "2.3"
},
"autoload": {
"files": ["lib/pico.php"]
"files": [
"lib/Pico.php",
"lib/IPicoPlugin.php",
"lib/AbstractPicoPlugin.php"
]
}
}
47 changes: 27 additions & 20 deletions config/config.php.template
@@ -1,54 +1,61 @@
<?php
/**
* Pico Configuration
* Pico configuration
*
* This is the configuration file for Pico. It comes loaded with the
* default values, which can be found in the get_config() method of
* the Pico class (lib/pico.php).
* 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"}).
*
* @author Gilbert Pellegrom
* @link http://picocms.org
* To override any of the default settings below, copy this file to
* {@path "config/config.php"}, uncomment the line and make and
* save your changes.
*
* @author Gilbert Pellegrom
* @link http://picocms.org
* @license http://opensource.org/licenses/MIT
* @version 0.9
*
* To override any of the default settings below, copy this file to
* `config.php`, uncomment the line and make and save your changes.
*/

/*
* BASIC
*/
// $config['site_title'] = 'Pico'; // Site title
// $config['base_url'] = ''; // Override base URL (e.g. http://example.com)
// $config['rewrite_url'] = null; // A boolean indicating forced URL rewriting

/*
* THEME
*/
// $config['theme'] = 'default'; // Set the theme (defaults to "default")
// $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
// 'cache' => false, // To enable Twig caching change this to CACHE_DIR
// 'autoescape' => false, // Autoescape 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['excerpt_length'] = 50; // The pages excerpt length (in words)
// $config['content_dir'] = 'content-sample/'; // Content directory
// $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
*/
// date_default_timezone_set('UTC'); // Timezone may be reqired by your php install
// $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
// $config['custom_setting'] = 'Hello'; // Can be accessed by {{ config.custom_setting }} in a theme

// Keep this line
// DO NOT REMOVE THIS LINE
return $config;
6 changes: 3 additions & 3 deletions content-sample/404.md
@@ -1,9 +1,9 @@
/*
---
Title: Error 404
Robots: noindex,nofollow
*/
---

Error 404
=========

Woops. Looks like this page doesn't exist.
Woops. Looks like this page doesn't exist.
Empty file removed content-sample/index.html
Empty file.
176 changes: 112 additions & 64 deletions content-sample/index.md
@@ -1,97 +1,139 @@
/*
---
Title: Welcome
Description: This description will go in the meta description tag
*/
Description: Pico is a stupidly simple, blazing fast, flat file CMS.
---

## Welcome to Pico

Congratulations, you have successfully installed [Pico](http://picocms.org/). Pico is a stupidly simple, blazing fast, flat file CMS.
Congratulations, you have successfully installed [Pico](http://picocms.org/).
%meta.description%

### Creating Content

Pico is a flat file CMS, this means there is no administration backend and database to deal with. You simply create `.md` files in the "content-sample"
folder and that becomes a page. For example, this file is called `index.md` and is shown as the main landing page.

If you create a folder within the content-sample folder (e.g. `content-sample/sub`) and put an `index.md` inside it, you can access that folder at the URL
`http://yoursite.com/sub`. If you want another page within the sub folder, simply create a text file with the corresponding name (e.g. `content-sample/sub/page.md`)
and you will be able to access it from the URL `http://yoursite.com/sub/page`. Below we've shown some examples of content-sample locations and their corresponing URL's:

<table>
<thead>
<tr><th>Physical Location</th><th>URL</th></tr>
</thead>
<tbody>
<tr><td>content-sample/index.md</td><td>/</td></tr>
<tr><td>content-sample/sub.md</td><td>/sub</td></tr>
<tr><td>content-sample/sub/index.md</td><td>/sub (same as above)</td></tr>
<tr><td>content-sample/sub/page.md</td><td>/sub/page</td></tr>
<tr><td>content-sample/a/very/long/url.md</td><td>/a/very/long/url</td></tr>
</tbody>
Pico is a flat file CMS, this means there is no administration backend and
database to deal with. You simply create `.md` files in the `content-sample`
folder and that becomes a page. For example, this file is called `index.md`
and is shown as the main landing page.

If you create a folder within the content folder (e.g. `content-sample/sub`)
and put an `index.md` inside it, you can access that folder at the URL
`http://yoursite.com/?sub`. If you want another page within the sub folder,
simply create a text file with the corresponding name and you will be able to
access it (e.g. `content-sample/sub/page.md` is accessible from the URL
`http://yoursite.com/?sub/page`). Below we've shown some examples of locations
and their corresponing URLs:

<table style="width: 100%; max-width: 40em;">
<thead>
<tr>
<th style="width: 50%;">Physical Location</th>
<th style="width: 50%;">URL</th>
</tr>
</thead>
<tbody>
<tr>
<td>content-sample/index.md</td>
<td><a href="%base_url%">/</a></td>
</tr>
<tr>
<td>content-sample/sub.md</td>
<td><del>?sub</del> (not accessible, see below)</td>
</tr>
<tr>
<td>content-sample/sub/index.md</td>
<td><a href="%base_url%?sub">?sub</a> (same as above)</td>
</tr>
<tr>
<td>content-sample/sub/page.md</td>
<td><a href="%base_url%?sub/page">?sub/page</a></td>
</tr>
<tr>
<td>content-sample/a/very/long/url.md</td>
<td><a href="%base_url%?a/very/long/url">?a/very/long/url</a> (doesn't exist)</td>
</tr>
</tbody>
</table>

If a file cannot be found, the file `content-sample/404.md` will be shown.

### Text File Markup

Text files are marked up using [Markdown](http://daringfireball.net/projects/markdown/syntax). They can also contain regular HTML.
Text files are marked up using [Markdown][]. They can also contain regular HTML.

At the top of text files you can place a block comment and specify certain attributes of the page. For example:
At the top of text files you can place a block comment and specify certain
attributes of the page. For example:

/*
Title: Welcome
Description: This description will go in the meta description tag
Author: Joe Bloggs
Date: 2013/01/01
Robots: noindex,nofollow
*/
---
Title: Welcome
Description: This description will go in the meta description tag
Author: Joe Bloggs
Date: 2013/01/01
Robots: noindex,nofollow
---

These values will be contained in the `{{ meta }}` variable in themes (see below).
These values will be contained in the `{{ meta }}` variable in themes
(see below).

There are also certain variables that you can use in your text files:

* <code>&#37;base_url&#37;</code> - The URL to your Pico site
* <code>&#37;site_title&#37;</code> - The title of your Pico site
* <code>&#37;base_url&#37;</code> - The URL to your Pico site; internal links
can be specified using <code>&#37;base_url&#37;?sub/page</code>
* <code>&#37;theme_url&#37;</code> - The URL to the currently used theme
* <code>&#37;meta.*&#37;</code> - Access any meta variable of the current page,
e.g. <code>&#37;meta.author&#37;</code> returns `Joe Bloggs`

### Themes

You can create themes for your Pico installation in the "themes" folder. Check out the default theme for an example of a theme. Pico uses
[Twig](http://twig.sensiolabs.org/documentation) for it's templating engine. You can select your theme by setting the `$config['theme']` variable
in `config/config.php` to your theme folder.
You can create themes for your Pico installation in the `themes` folder. Check
out the default theme for an example of a theme. Pico uses [Twig][] for
template rendering. You can select your theme by setting the `$config['theme']`
variable in `config/config.php` to your theme folder.

All themes must include an `index.html` file to define the HTML structure of the theme. Below are the Twig variables that are available to use in your theme:
All themes must include an `index.twig` file to define the HTML structure of
the theme. Below are the Twig variables that are available to use in your
theme. Paths (e.g. `{{ base_dir }}``) and URLs (e.g. `{{ base_url }}`) don't
have a trailing slash.

* `{{ config }}` - Conatins the values you set in `config/config.php` (e.g. `{{ config.theme }}` = "default")
* `{{ config }}` - Conatins the values you set in `config/config.php`
(e.g. `{{ config.theme }}` = "default")
* `{{ base_dir }}` - The path to your Pico root directory
* `{{ base_url }}` - The URL to your Pico site
* `{{ theme_dir }}` - The path to the Pico active theme directory
* `{{ theme_url }}` - The URL to the Pico active theme directory
* `{{ site_title }}` - Shortcut to the site title (defined in `config/config.php`)
* `{{ rewrite_url }}` - A boolean flag indicating enabled/disabled URL rewriting
* `{{ site_title }}` - Shortcut to the site title (see `config/config.php`)
* `{{ meta }}` - Contains the meta values from the current page
* `{{ meta.title }}`
* `{{ meta.description }}`
* `{{ meta.author }}`
* `{{ meta.date }}`
* `{{ meta.date_formatted }}`
* `{{ meta.robots }}`
* `{{ content-sample }}` - The content-sample of the current page (after it has been processed through Markdown)
* `{{ pages }}` - A collection of all the content-sample in your site
* `{{ page.title }}`
* `{{ page.url }}`
* `{{ page.author }}`
* `{{ page.date }}`
* `{{ page.date_formatted }}`
* `{{ page.content-sample }}`
* `{{ page.excerpt }}`
* `{{ prev_page }}` - A page object of the previous page (relative to current_page)
* `{{ current_page }}` - A page object of the current_page
* `{{ next_page }}` - A page object of the next page (relative to current_page)
* `{{ meta.title }}`
* `{{ meta.description }}`
* `{{ meta.author }}`
* `{{ meta.date }}`
* `{{ meta.date_formatted }}`
* `{{ meta.robots }}`
* `{{ content }}` - The content of the current page
(after it has been processed through Markdown)
* `{{ pages }}` - A collection of all the content pages in your site
* `{{ page.id }}`
* `{{ page.url }}`
* `{{ page.title }}`
* `{{ page.description }}`
* `{{ page.author }}`
* `{{ page.time }}`
* `{{ page.date }}`
* `{{ page.date_formatted }}`
* `{{ page.raw_content }}`
* `{{ page.meta }}`
* `{{ prev_page }}` - The data of the previous page (relative to `current_page`)
* `{{ current_page }}` - The data of the current page
* `{{ next_page }}` - The data of the next page (relative to `current_page`)
* `{{ is_front_page }}` - A boolean flag for the front page

Pages can be used like:

<pre>&lt;ul class=&quot;nav&quot;&gt;
{% for page in pages %}
&lt;li&gt;&lt;a href=&quot;{{ page.url }}&quot;&gt;{{ page.title }}&lt;/a&gt;&lt;/li&gt;
{% endfor %}
{% for page in pages %}
&lt;li&gt;&lt;a href=&quot;{{ page.url }}&quot;&gt;{{ page.title }}&lt;/a&gt;&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;</pre>

### Plugins
Expand All @@ -100,10 +142,16 @@ See [http://pico.dev7studios.com/plugins](http://picocms.org/plugins)

### Config

You can override the default Pico settings (and add your own custom settings) by editing `config/config.php` in the Pico directory.
The `config/config.php.template` lists all of the settings and their defaults. To override a setting simply copy
`config/config.php.template` to `config/config.php`, uncomment the setting and set your custom value.
You can override the default Pico settings (and add your own custom settings)
by editing `config/config.php` in the Pico directory. For a brief overview of
the available settings and their defaults see `config/config.php.template`. To
override a setting copy `config/config.php.template` to `config/config.php`,
uncomment the setting and set your custom value.

### Documentation

For more help have a look at the Pico documentation at [http://picocms.org/docs](http://picocms.org/docs)
For more help have a look at the Pico documentation at
[http://picocms.org/docs](http://picocms.org/docs)

[Twig]: http://twig.sensiolabs.org/documentation
[Markdown]: http://daringfireball.net/projects/markdown/syntax
6 changes: 3 additions & 3 deletions content-sample/sub/index.md
@@ -1,10 +1,10 @@
/*
---
Title: Sub Page Index
*/
---

## This is a Sub Page Index

This is index.md in the "sub" folder.
This is `index.md` in the `sub` folder.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies tristique nulla et mattis. Phasellus id massa eget nisl congue blandit sit amet id ligula. Praesent et nulla eu augue tempus sagittis. Mauris faucibus nibh et nibh cursus in vestibulum sapien egestas. Curabitur ut lectus tortor. Sed ipsum eros, egestas ut eleifend non, elementum vitae eros. Mauris felis diam, pellentesque vel lacinia ac, dictum a nunc. Mauris mattis nunc sed mi sagittis et facilisis tortor volutpat. Etiam tincidunt urna mattis erat placerat placerat ac eu tellus. Ut nec velit id nisl tincidunt vehicula id a metus. Pellentesque erat neque, faucibus id ultricies vel, mattis in ante. Donec lobortis, mauris id congue scelerisque, diam nisl accumsan orci, condimentum porta est magna vel arcu. Curabitur varius ante dui. Vivamus sit amet ante ac diam ullamcorper sodales sed a odio.

Expand Down
6 changes: 3 additions & 3 deletions content-sample/sub/page.md
@@ -1,10 +1,10 @@
/*
---
Title: Sub Page
*/
---

## This is a Sub Page

This is page.md in the "sub" folder.
This is `page.md` in the `sub` folder.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies tristique nulla et mattis. Phasellus id massa eget nisl congue blandit sit amet id ligula. Praesent et nulla eu augue tempus sagittis. Mauris faucibus nibh et nibh cursus in vestibulum sapien egestas. Curabitur ut lectus tortor. Sed ipsum eros, egestas ut eleifend non, elementum vitae eros. Mauris felis diam, pellentesque vel lacinia ac, dictum a nunc. Mauris mattis nunc sed mi sagittis et facilisis tortor volutpat. Etiam tincidunt urna mattis erat placerat placerat ac eu tellus. Ut nec velit id nisl tincidunt vehicula id a metus. Pellentesque erat neque, faucibus id ultricies vel, mattis in ante. Donec lobortis, mauris id congue scelerisque, diam nisl accumsan orci, condimentum porta est magna vel arcu. Curabitur varius ante dui. Vivamus sit amet ante ac diam ullamcorper sodales sed a odio.

Expand Down
11 changes: 11 additions & 0 deletions global.php
@@ -0,0 +1,11 @@
<?php
define('ROOT_DIR', __DIR__ . '/');
define('LIB_DIR', ROOT_DIR . 'lib/');
define('VENDOR_DIR', ROOT_DIR . 'vendor/');
define('PLUGINS_DIR', ROOT_DIR . 'plugins/');
define('THEMES_DIR', ROOT_DIR . 'themes/');
define('CONFIG_DIR', ROOT_DIR . 'config/');
define('CACHE_DIR', LIB_DIR . 'cache/');

require_once(VENDOR_DIR . 'autoload.php');