diff --git a/_docs/config.md b/_docs/config.md index 1687e1f..1e24ee6 100644 --- a/_docs/config.md +++ b/_docs/config.md @@ -3,35 +3,24 @@ toc: config: _title: Config url-rewriting: URL Rewriting -nav: 4 +nav: 6 --- ## Config -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](https://github.com/picocms/Pico/blob/master/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. +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`][ConfigTemplate]. To 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 -user friendly. Pico anyway offers you an URL rewrite feature to make URLs even -more user friendly (e.g. http://example.com/pico/sub/page). +Picos default URLs (e.g. http://example.com/pico/?sub/page) already are very user friendly. Pico anyway offers you an URL rewrite feature to make URLs even more user friendly (e.g. http://example.com/pico/sub/page). -If you're using the Apache web server, URL rewriting should be enabled -automatically. If you get an error message from your web server, please make -sure to enable the `mod_rewrite` module. Assumed rewritten URLs work, but Pico -still shows no rewritten URLs, force URL rewriting by setting -`$config['rewrite_url'] = true;` in your `config/config.php`. +If you're using the Apache web server, URL rewriting should be enabled automatically. If you get an error message from your web server, please make sure to enable the `mod_rewrite` module. Assumed rewritten URLs work, but Pico still shows no rewritten URLs, force URL rewriting by setting `$config['rewrite_url'] = true;` in your `config/config.php`. -If you're using Nginx, you can use the following configuration to enable -URL rewriting. Don't forget to adjust the path (`/pico/`; line `1` and `4`) -to match your installation directory. You can then enable URL rewriting by -setting `$config['rewrite_url'] = true;` in your `config/config.php`. +If you're using Nginx, you can use the following configuration to enable URL rewriting. Don't forget to adjust the path (`/pico/`; line `1` and `4`) to match your installation directory. You can then enable URL rewriting by setting `$config['rewrite_url'] = true;` in your `config/config.php`. location /pico/ { index index.php; try_files $uri $uri/ /pico/?$uri&$args; } + +[ConfigTemplate]: https://github.com/picocms/Pico/blob/master/config/config.php.template diff --git a/_docs/contribute.md b/_docs/contribute.md index f6fb746..1d963af 100644 --- a/_docs/contribute.md +++ b/_docs/contribute.md @@ -1,13 +1,24 @@ --- toc: contribute: Contribute -nav: 6 +nav: 8 --- ## Contribute -Are you are interested in contributing to the development of Pico? +You want to contribute to Pico? We really appreciate that! You can help making Pico better by [contributing code][PullRequests] or [reporting issues][Issues], but please take note of our [contribution guidelines][ContributionGuidelines]. In general you can contribute in three different areas: -For the basics of creating a __plugin__, __theme__ or even contributing to the __Pico core__, we've setup a comprehensive set of [development documentation]({{ site.base_url }}/plugin-dev.html) to get you started. +1. Plugins & Themes: You're a plugin developer or theme designer? We love you guys! You can find tons of information about how to develop plugins and themes at http://picocms.org/plugin-dev.html. If you have created a plugin or theme, please add it to our [Wiki][], either on the [plugins][WikiPlugins] or [themes page][WikiThemes]. Maybe we will then promote your plugin or theme on [our website][OfficialPlugins] as officially supported! +2. Documentation: We always appreciate people improving our documentation. You can either improve the [inline user docs][EditInlineDocs] or the more extensive [user docs on our website][EditUserDocs]. You can also improve the [docs for plugin and theme developers][EditDevDocs]. Simply fork Pico from https://github.com/picocms/Pico, change the Markdown files and open a [pull request][PullRequests]. +3. Picos Core: The supreme discipline is to work on Picos Core. Your contribution should help *every* Pico user to have a better experience with Pico. If this is the case, fork Pico from https://github.com/picocms/Pico and open a [pull request][PullRequests]. We look forward to your contribution! -You may also refer to our [class documentation]({{ site.base_url }}/phpDoc/master) for a deeper understanding of Pico's underlying code. +[OfficialPlugins]: http://picocms.org/plugins.html +[Wiki]: https://github.com/picocms/Pico/wiki +[WikiPlugins]: https://github.com/picocms/Pico/wiki/Pico-Plugins +[WikiThemes]: https://github.com/picocms/Pico/wiki/Pico-Themes +[Issues]: https://github.com/picocms/Pico/issues +[PullRequests]: https://github.com/picocms/Pico/pulls +[ContributionGuidelines]: https://github.com/picocms/Pico/blob/master/CONTRIBUTING.md +[EditInlineDocs]: https://github.com/picocms/Pico/blob/master/content-sample/index.md +[EditUserDocs]: https://github.com/picocms/Pico/tree/gh-pages/_docs +[EditDevDocs]: https://github.com/picocms/Pico/tree/gh-pages/_plugin-dev diff --git a/_docs/creating-content.md b/_docs/creating-content.md index f94949f..34ffb64 100644 --- a/_docs/creating-content.md +++ b/_docs/creating-content.md @@ -4,23 +4,14 @@ toc: _title: Creating Content text-file-markup: Text File Markup blogging: Blogging -nav: 2 +nav: 4 --- ## Creating Content -Pico is a flat file CMS, this means there is no administration backend or -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. +Pico is a flat file CMS, this means there is no administration backend or 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 corresponding URLs: +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://example.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://example.com/?sub/page`). Below we've shown some examples of locations and their corresponding URLs:
---
Title: Welcome
@@ -73,44 +63,29 @@ Robots: noindex,nofollow
Template: index
---
-These values will be contained in the `{% raw %}{{ meta }}{% endraw %}` variable
-in themes (see below).
+These values will be contained in the `{% raw %}{{ meta }}{% endraw %}` variable in themes (see below).
There are also certain variables that you can use in your text files:
-* %site_title%
- The title of your Pico site
-* %base_url%
- The URL to your Pico site; internal links
- can be specified using %base_url%?sub/page
-* %theme_url%
- The URL to the currently used theme
-* %meta.*%
- Access any meta variable of the current page,
- e.g. %meta.author%
is replaced with `Joe Bloggs`
+* `%site_title%` - The title of your Pico site
+* `%base_url%` - The URL to your Pico site; internal links can be specified using `%base_url%?sub/page`
+* `%theme_url%` - The URL to the currently used theme
+* `%meta.*%` - Access any meta variable of the current page, e.g. `%meta.author%` is replaced with `Joe Bloggs`
### Blogging
-Pico is not blogging software - but makes it very easy for you to use it as a
-blog. You can find many plugins out there implementing typical blogging
-features like authentication, tagging, pagination and social plugins. See the
-below Plugins section for details.
+Pico is not blogging software - but makes it very easy for you to use it as a blog. You can find many plugins out there implementing typical blogging features like authentication, tagging, pagination and social plugins. See the below Plugins section for details.
-If you want to use Pico as a blogging software, you probably want to do
-something like the following:
+If you want to use Pico as a blogging software, you probably want to do something like the following:
blog
folder in your content
- directory. All these articles should have both a Date
and Template
meta
- header, the latter with e.g. blog-post
as value (see Step 2).
+ Put all your blog articles in a separate blog
folder in your content
directory. All these articles should have both a Date
and Template
meta header, the latter with e.g. blog-post
as value (see Step 2).
blog-post.twig
(this must match the
- Template
meta header from Step 1) in your theme directory. This template
- probably isn't very different from your default index.twig
, it specifies
- how your article pages will look like.
+ Create a new Twig template called blog-post.twig
(this must match the Template
meta header from Step 1) in your theme directory. This template probably isn't very different from your default index.twig
, it specifies ow your article pages will look like.
blog.md
in your content
folder and set its Template
meta
- header to e.g. blog
. Also create a blog.twig
in your theme directory.
- This template will show a list of your articles, so you probably want to
- do something like this:
+ Create a blog.md
in your content
folder and set its Template
meta header to e.g. blog
. Also create a blog.twig
in your theme directory. This template will show a list of your articles, so you probably want to do something like this:
{% raw %}{% for page in pages %}
{% if page.id starts with "blog/" %}
@@ -123,17 +98,11 @@ something like the following:
{% endfor %}
{% endraw %}
$config['pages_order_by'] = 'date';
- in your config/config.php
. To use a descending order (newest articles
- first), also add $config['pages_order'] = 'desc';
. The former won't affect
- pages without a Date
meta header, but the latter does. To use ascending
- order for your page navigation again, add Twigs reverse
filter to the
- navigation loop ({% for page in pages|reverse %}...{% endfor %}}
)
- in your themes index.twig
.
+ Let Pico sort pages by date by setting $config['pages_order_by'] = 'date';
in your config/config.php
. To use a descending order (newest articles first), also add $config['pages_order'] = 'desc';
. The former won't affect pages without a Date
meta header, but the latter does. To use ascending order for your page navigation again, add Twigs reverse
filter to the navigation loop ({% for page in pages|reverse %}...{% endfor %}}
) in your themes index.twig
.
{% if not page starts with "blog/" %}...{% endif %}
- to the navigation loop.
+ Make sure to exclude the blog articles from your page navigation. You can achieve this by adding {% if not page starts with "blog/" %}...{% endif %}
to the navigation loop.
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
-Pico is available on [Packagist.org](http://packagist.org/packages/picocms/pico) and may be included in other projects via `composer require picocms/pico`
-
----
-
-## Run
-
-You have nothing to consider specially, simply navigate to your Pico install using your favorite web browser. Picos default contents will explain how to use your brand new, stupidly simple, blazing fast, flat file CMS.
-
-### You don't have a web server?
-
-Starting with PHP 5.4 the easiest way to try Pico is using [the built-in web server of PHP][PHPServer]. Please note that PHPs built-in web server is for development and testing purposes only!
-
-#### Step 1
-Navigate to Picos installation directory using a shell.
-
-#### Step 2
-Start PHPs built-in web server:
-$ php -S 127.0.0.1:8080
-
-#### Step 3
-Access Pico from $ php -S 127.0.0.1:8080
+
+#### Step 3
+Access Pico from http://localhost:8080.
+
+[PHPServer]: http://php.net/manual/en/features.commandline.webserver.php
diff --git a/_docs/upgrade.md b/_docs/upgrade.md
index befe723..b46beb5 100644
--- a/_docs/upgrade.md
+++ b/_docs/upgrade.md
@@ -1,12 +1,21 @@
---
toc:
upgrade: Upgrade
-nav: 5
+nav: 2
---
## Upgrade
-**ToDo:** Very short description about how to upgrade
+Upgrading Pico is very easy: You just have to replace all of Picos files - that's it! Nevertheless you should *always* create a backup of your Pico installation before upgrading.
-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).
+Pico follows [Semantic Versioning 2.0][SemVer] and uses version numbers like `MAJOR`.`MINOR`.`PATCH`. When we update...
+
+- the `PATCH` version (e.g. `1.0.0` to `1.0.1`), we made backwards-compatible bug fixes. It's then sufficient to extract [Picos latest release][LatestRelease] to your existing installation directory and overwriting all files.
+- the `MINOR` version (e.g. `1.0` to `1.1`), we added functionality in a backwards-compatible manner, but anyway recommend you to "install" Pico newly. Backup all of your files, empty your installation directory and install Pico as elucidated above. You can then copy your `config/config.php` and `content` directory without any change. If applicable, you can also copy the folder of your custom theme within the `themes` directory. Provided that you're using plugins, also copy all of your plugins from the `plugins` directory.
+- the `MAJOR` version (e.g. `1.0` to `2.0`), a appropriate upgrade tutorial will be provided.
+
+Upgrading Pico 0.8 or 0.9 to Pico 1.0 is a special case. The new `PicoDeprecated` plugin ensures backwards compatibility, so you basically can follow the above upgrade instructions as if we updated the `MINOR` version. However, we recommend you to take some further steps to confine the neccessity of `PicoDeprecated` as far as possible. For more information about what has changed with Pico 1.0 and a step-by-step upgrade tutorial, please refer to the [upgrade page of our website][HelpUpgrade].
+
+[SemVer]: http://semver.org
+[LatestRelease]: https://github.com/picocms/Pico/releases/latest
+[HelpUpgrade]: {{ site.base_url }}/upgrade.html