Fix collection formatting

This commit is contained in:
Daniel Rudolf 2015-11-02 02:16:28 +01:00
parent 7bf8d0f240
commit e897a04aaf
10 changed files with 37 additions and 69 deletions

View file

@ -14,8 +14,6 @@ the available settings and their defaults see [config/config.php.template](https
override a setting, copy `config/config.php.template` to `config/config.php`,
uncomment the setting and set your custom value.
---
### URL Rewriting
Picos default URLs (e.g. http://example.com/pico/?sub/page) already are very
@ -37,5 +35,3 @@ setting `$config['rewrite_url'] = true;` in your `config/config.php`.
index index.php;
try_files $uri $uri/ /pico/?$uri&$args;
}
---

View file

@ -57,8 +57,6 @@ If a file cannot be found, the file `content-sample/404.md` will be shown. You
can add `404.md` files to any directory, so if you want to use a special error
page for your blog, simply create `content-sample/blog/404.md`.
---
### Text File Markup
Text files are marked up using [Markdown](https://daringfireball.net/projects/markdown/). They can also contain regular HTML.
@ -87,8 +85,6 @@ There are also certain variables that you can use in your text files:
* <code>&#37;meta.*&#37;</code> - Access any meta variable of the current page,
e.g. <code>&#37;meta.author&#37;</code> is replaced with `Joe Bloggs`
---
### Blogging
Pico is not blogging software - but makes it very easy for you to use it as a
@ -141,5 +137,3 @@ something like the following:
to the navigation loop.
</li>
</ol>
---

View file

@ -19,8 +19,6 @@ techie talk - it's very easy to use one of the great themes or plugins others
developed and released to the public. Please refer to the next sections for
details.
---
### Themes
You can create themes for your Pico installation in the `themes` folder. Check
@ -89,8 +87,6 @@ for you, you can use one of the great themes third-party developers and
designers created in the past. As with plugins, you can find themes in
[our Wiki](https://github.com/picocms/Pico/wiki/Pico-Themes).
---
### Plugins
#### Plugins for users
@ -118,5 +114,3 @@ about how to develop plugins at [http://picocms.org/plugin-dev.html]({{ site.bas
developed a plugin for Pico 0.9 and older, you probably want to upgrade it
to the brand new plugin system introduced with Pico 1.0. Please refer to the
[Upgrade section of the docs]({{ site.base_url }}/plugin-dev.html#migrating-from-0x-to-10).
---

View file

@ -56,5 +56,3 @@ Access Pico from <http://localhost:8080>.
[LatestRelease]: https://github.com/picocms/Pico/releases/latest
[composer]: https://getcomposer.org/
[PHPServer]: http://php.net/manual/en/features.commandline.webserver.php
---

View file

@ -10,5 +10,3 @@ nav: 5
For more information about what has changed with Pico 1.0 and a step-by-step
upgrade tutorial, please refer to the [upgrade page]({{ site.base_url}}/upgrade.html).
---

View file

@ -58,6 +58,8 @@
<div class="three-fourth last">
{% for item in items %}
{{ item.output }}
<hr />
{% endfor %}
<hr />

View file

@ -4,9 +4,8 @@ toc:
nav: 1
---
# Basics
## Basics
Creating your own content for Pico is *easy*.
Inside the root Pico folder, all __themes__ reside in the `themes` directory, and all __plugins__ in the `plugins` directory.
---

View file

@ -6,11 +6,9 @@ toc:
nav: 2
---
#Pico Core
## Pico Core
It's generally not a good idea to make modifications to the core of Pico. If you
are looking to add or change functionality, can it be accomplished with a plugin?
If not, and you want to contribute to Picos core please refer to our [CONTRIBUTING.md](https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md) on GitHub.
---

View file

@ -7,7 +7,8 @@ toc:
nav: 3
---
# Plugins
## Plugins
At the heart of customizing Pico is a plugin. You can 'hook-in' to the Pico
engine at many different times during the rendering of your site and its content.
You will find a full example template in [plugins/DummyPlugin.php]({{ site.base_url }}/phpDoc/master/classes/DummyPlugin.html) to get you
@ -18,65 +19,54 @@ Officially tested plugins can be found at [http://picocms.org/plugins]({{ site.b
but there are many awesome third-party plugins out there! A good start point
for discovery is our [Wiki](#plugin-wiki).
---
### Migrating from 0.X to 1.0
# Migrating from 0.X to 1.0
The new event system supports plugin dependencies as well as some new events.
You will be able to set an enabled/disabled state by default as well. If you
have previously cerated a plugin for Pico, it is *HIGHLY* recommended that you
update your class to extend from [AbstractPicoPlugin]({{ site.base_url }}/phpDoc/master/classes/AbstractPicoPlugin.html) and use the new events
to avoid activating the [PicoDeprecated](https://github.com/picocms/Pico/blob/master/plugins/00-PicoDeprecated.php) plugin.
|---------------------|-----------------------------------------------------------|
| Event | ... triggers the deprecated event |
|---------------------|-----------------------------------------------------------|
| onPluginsLoaded | plugins_loaded() |
| onConfigLoaded | config_loaded($config) |
| onRequestUrl | request_url($url) |
| onContentLoading | before_load_content($file) |
| onContentLoaded | after_load_content($file, $rawContent) |
| on404ContentLoading | before_404_load_content($file) |
| on404ContentLoaded | after_404_load_content($file, $rawContent) |
| onMetaHeaders | before_read_file_meta($headers) |
| onMetaParsed | file_meta($meta) |
| onContentParsing | before_parse_content($rawContent) |
| onContentParsed | after_parse_content($content) |
| onContentParsed | content_parsed($content) |
| onSinglePageLoaded | get_page_data($pages, $meta) |
| onPagesLoaded | get_pages($pages, $currentPage, $previousPage, $nextPage) |
| onTwigRegistration | before_twig_register() |
| onPageRendering | before_render($twigVariables, $twig, $templateName) |
| onPageRendered | after_render($output) |
|---------------------|-----------------------------------------------------------|
+---------------------+-----------------------------------------------------------+
| Event | ... triggers the deprecated event |
+---------------------+-----------------------------------------------------------+
| onPluginsLoaded | plugins_loaded() |
| onConfigLoaded | config_loaded($config) |
| onRequestUrl | request_url($url) |
| onContentLoading | before_load_content($file) |
| onContentLoaded | after_load_content($file, $rawContent) |
| on404ContentLoading | before_404_load_content($file) |
| on404ContentLoaded | after_404_load_content($file, $rawContent) |
| onMetaHeaders | before_read_file_meta($headers) |
| onMetaParsed | file_meta($meta) |
| onContentParsing | before_parse_content($rawContent) |
| onContentParsed | after_parse_content($content) |
| onContentParsed | content_parsed($content) |
| onSinglePageLoaded | get_page_data($pages, $meta) |
| onPagesLoaded | get_pages($pages, $currentPage, $previousPage, $nextPage) |
| onTwigRegistration | before_twig_register() |
| onPageRendering | before_render($twigVariables, $twig, $templateName) |
| onPageRendered | after_render($output) |
+---------------------+-----------------------------------------------------------+
---
### Your First Plugin
# Your First Plugin
## 1. To get started, navigate to your `plugins` directory
#### 1. To get started, navigate to your `plugins` directory
![Step1]({{ site.base_url }}/style/images/docs/pico_plugins.jpg)
---
## 2. Create a new folder and name it your desired name using CammelCase
#### 2. Create a new folder and name it your desired name using CammelCase
![Step2]({{ site.base_url }}/style/images/docs/pico_plugins_myplugin.jpg)
> *Note:* It's not necessary to create the folder, if you do not have assets to
> include, you can simply skip this step and continue to Step 3
---
## 3. Next, you should copy `DummyPlugin.php` inside your newly created folder and give it the same name as you did the folder
#### 3. Next, you should copy `DummyPlugin.php` inside your newly created folder and give it the same name as you did the folder
![Step3]({{ site.base_url }}/style/images/docs/pico_plugins_myplugin_php.jpg)
---
## 4. You will need to name the `class` the same as the `folder` and the `.php` file
#### 4. You will need to name the `class` the same as the `folder` and the `.php` file
![Step4]({{ site.base_url }}/style/images/docs/pico_plugins_myplugin_php_class.jpg)
---
## 5. From here, you will be able to hook-in to Pico's processing
#### 5. From here, you will be able to hook-in to Pico's processing
Choose an event that makes sense for your situation. Do you need to load configuration values?
[onConfigLoaded]({{ site.base_url }}/phpDoc/master/classes/DummyPlugin.html#method_onConfigLoaded). You need to modify the content of the page before it is
rendered by markdown? [onPageRendering]({{ site.base_url }}/phpDoc/master/classes/DummyPlugin.html#method_onPageRendering). Etc... Plugin developers shouldn't
@ -84,5 +74,3 @@ manipulate data in "wrong" events, this could lead to unexpected behavior.
> *Note:* Don't forget to set your plugins enabled/disabled state, either by default or
> through your sites `config/config.php` file.
---

View file

@ -4,7 +4,8 @@ toc:
nav: 3
---
#Plugin Wiki
## Plugin Wiki
Whether you have an awesome new plugin you've created and you're dying to share,
or if you're a new plugin developer and you're looking for some inspiration--
our [Pico Plugin Wiki](https://github.com/picocms/Pico/wiki/Pico-Plugins) is here to help!