Update sample content

This commit is contained in:
Daniel Rudolf 2015-08-28 18:34:14 +02:00
parent 144939b978
commit 39e1d788c5
4 changed files with 119 additions and 71 deletions

View file

@ -1,7 +1,7 @@
/* ---
Title: Error 404 Title: Error 404
Robots: noindex,nofollow Robots: noindex,nofollow
*/ ---
Error 404 Error 404
========= =========

View file

@ -1,31 +1,56 @@
/* ---
Title: Welcome 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 ## 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 ### 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" Pico is a flat file CMS, this means there is no administration backend and
folder and that becomes a page. For example, this file is called `index.md` and is shown as the main landing page. 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 If you create a folder within the content folder (e.g. `content-sample/sub`)
`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 put an `index.md` inside it, you can access that folder at the URL
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: `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> <table style="width: 100%; max-width: 40em;">
<thead> <thead>
<tr><th>Physical Location</th><th>URL</th></tr> <tr>
<th style="width: 50%;">Physical Location</th>
<th style="width: 50%;">URL</th>
</tr>
</thead> </thead>
<tbody> <tbody>
<tr><td>content-sample/index.md</td><td>/</td></tr> <tr>
<tr><td>content-sample/sub.md</td><td>/sub</td></tr> <td>content-sample/index.md</td>
<tr><td>content-sample/sub/index.md</td><td>/sub (same as above)</td></tr> <td><a href="%base_url%">/</a></td>
<tr><td>content-sample/sub/page.md</td><td>/sub/page</td></tr> </tr>
<tr><td>content-sample/a/very/long/url.md</td><td>/a/very/long/url</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> </tbody>
</table> </table>
@ -33,38 +58,51 @@ If a file cannot be found, the file `content-sample/404.md` will be shown.
### Text File Markup ### 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 Title: Welcome
Description: This description will go in the meta description tag Description: This description will go in the meta description tag
Author: Joe Bloggs Author: Joe Bloggs
Date: 2013/01/01 Date: 2013/01/01
Robots: noindex,nofollow 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: 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 ### 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 You can create themes for your Pico installation in the `themes` folder. Check
[Twig](http://twig.sensiolabs.org/documentation) for it's templating engine. You can select your theme by setting the `$config['theme']` variable out the default theme for an example of a theme. Pico uses [Twig][] for
in `config/config.php` to your theme folder. 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_dir }}` - The path to your Pico root directory
* `{{ base_url }}` - The URL to your Pico site * `{{ base_url }}` - The URL to your Pico site
* `{{ theme_dir }}` - The path to the Pico active theme directory * `{{ theme_dir }}` - The path to the Pico active theme directory
* `{{ theme_url }}` - The URL 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 }}` - Contains the meta values from the current page
* `{{ meta.title }}` * `{{ meta.title }}`
* `{{ meta.description }}` * `{{ meta.description }}`
@ -72,18 +110,22 @@ All themes must include an `index.html` file to define the HTML structure of the
* `{{ meta.date }}` * `{{ meta.date }}`
* `{{ meta.date_formatted }}` * `{{ meta.date_formatted }}`
* `{{ meta.robots }}` * `{{ meta.robots }}`
* `{{ content-sample }}` - The content-sample of the current page (after it has been processed through Markdown) * `{{ content }}` - The content of the current page
* `{{ pages }}` - A collection of all the content-sample in your site (after it has been processed through Markdown)
* `{{ page.title }}` * `{{ pages }}` - A collection of all the content pages in your site
* `{{ page.id }}`
* `{{ page.url }}` * `{{ page.url }}`
* `{{ page.title }}`
* `{{ page.description }}`
* `{{ page.author }}` * `{{ page.author }}`
* `{{ page.time }}`
* `{{ page.date }}` * `{{ page.date }}`
* `{{ page.date_formatted }}` * `{{ page.date_formatted }}`
* `{{ page.content-sample }}` * `{{ page.raw_content }}`
* `{{ page.excerpt }}` * `{{ page.meta }}`
* `{{ prev_page }}` - A page object of the previous page (relative to current_page) * `{{ prev_page }}` - The data of the previous page (relative to `current_page`)
* `{{ current_page }}` - A page object of the current_page * `{{ current_page }}` - The data of the current page
* `{{ next_page }}` - A page object of the next page (relative to current_page) * `{{ next_page }}` - The data of the next page (relative to `current_page`)
* `{{ is_front_page }}` - A boolean flag for the front page * `{{ is_front_page }}` - A boolean flag for the front page
Pages can be used like: Pages can be used like:
@ -100,10 +142,16 @@ See [http://pico.dev7studios.com/plugins](http://picocms.org/plugins)
### Config ### Config
You can override the default Pico settings (and add your own custom settings) by editing `config/config.php` in the Pico directory. You can override the default Pico settings (and add your own custom settings)
The `config/config.php.template` lists all of the settings and their defaults. To override a setting simply copy by editing `config/config.php` in the Pico directory. For a brief overview of
`config/config.php.template` to `config/config.php`, uncomment the setting and set your custom value. 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 ### 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

View file

@ -1,10 +1,10 @@
/* ---
Title: Sub Page Index Title: Sub Page Index
*/ ---
## This is a 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. 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.

View file

@ -1,10 +1,10 @@
/* ---
Title: Sub Page Title: Sub Page
*/ ---
## This is a 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. 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.