Make layouts more flexible; Revise upgrade page
+ various small changes & improvements **Note:** I'm working on the upgrade page *right now*, it's still work in progress
This commit is contained in:
parent
27f89a9786
commit
f3f1a4099a
19 changed files with 286 additions and 225 deletions
|
@ -14,7 +14,7 @@ You can override the default Pico settings (and add your own custom settings) by
|
|||
|
||||
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][ModRewrite]. 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`.
|
||||
|
||||
|
@ -24,3 +24,4 @@ If you're using Nginx, you can use the following configuration to enable URL rew
|
|||
}
|
||||
|
||||
[ConfigTemplate]: {{ site.gh_project_url }}/blob/{{ site.gh_project_branch }}/config/config.php.template
|
||||
[ModRewrite]: https://httpd.apache.org/docs/current/mod/mod_rewrite.html
|
||||
|
|
|
@ -30,5 +30,6 @@ Download [composer][] and run it with the `install` option:
|
|||
<pre><code>$ curl -sS https://getcomposer.org/installer | php
|
||||
$ php composer.phar install</code></pre>
|
||||
|
||||
[Packagist.org]: http://packagist.org/packages/picocms/pico
|
||||
[LatestRelease]: {{ site.gh_project_url }}/releases/latest
|
||||
[composer]: https://getcomposer.org/
|
||||
|
|
14
_includes/pageHeadline.html
Normal file
14
_includes/pageHeadline.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% if page.headline or page.title %}
|
||||
<h1 class="aligncenter">
|
||||
{% if page.headline %}
|
||||
{{ page.headline | markdownify | remove: '<p>' | remove: '</p>' }}
|
||||
{% else %}
|
||||
{{ page.title }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endif %}
|
||||
{% if page.description %}
|
||||
<p class="description aligncenter">
|
||||
{{ page.description | markdownify | remove: '<p>' | remove: '</p>' }}
|
||||
</p><br />
|
||||
{% endif %}
|
12
_includes/tocItem.html
Normal file
12
_includes/tocItem.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% for item in page.toc %}
|
||||
<li>
|
||||
{% if item[1]._title %}
|
||||
<a href="#{{ item[0] }}">{{ item[1]._title }}</a>
|
||||
<ul>
|
||||
{% include tocSubItems.html subItems=item[1] %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="#{{ item[0] }}">{{ item[1] }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
14
_includes/tocSubItems.html
Normal file
14
_includes/tocSubItems.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% for subItem in subItems %}
|
||||
{% if subItem[0] != "_title" %}
|
||||
<li>
|
||||
{% if subItem[1]._title %}
|
||||
<a href="#{{ subItem[0] }}">{{ subItem[1]._title }}</a>
|
||||
<ul>
|
||||
{% include tocSubItems.html subItems=subItem[1] %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="#{{ subItem[0] }}">{{ subItem[1] }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -1,82 +0,0 @@
|
|||
{% include documentHeader.html %}
|
||||
<head>
|
||||
|
||||
{% include headInclude.html %}
|
||||
<title>{% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }} - {{ site.description }}{% endif %}</title>
|
||||
|
||||
</head>
|
||||
<body class="full-layout">
|
||||
|
||||
<div class="body-wrapper">
|
||||
<div class="top-wrapper">
|
||||
{% include pageHeader.html %}
|
||||
</div>
|
||||
|
||||
<div class="light-wrapper">
|
||||
<div class="inner">
|
||||
{% if page.headline or page.title %}
|
||||
<h1 class="aligncenter">
|
||||
{% if page.headline %}
|
||||
{{ page.headline | markdownify | remove: '<p>' | remove: '</p>' }}
|
||||
{% else %}
|
||||
{{ page.title }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endif %}
|
||||
{% if page.description %}
|
||||
<p class="description aligncenter">
|
||||
{{ page.description | markdownify | remove: '<p>' | remove: '</p>' }}
|
||||
</p><br />
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% if page.collection %}
|
||||
{% assign items = site[page.collection]|sort:"nav" %}
|
||||
<div class="one-fourth">
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
{% for section in item.toc %}
|
||||
<li>
|
||||
{% if section[1]._title %}
|
||||
<a href="#{{ section[0] }}">{{ section[1]._title }}</a>
|
||||
<ul>
|
||||
{% for subSection in section[1] %}
|
||||
{% if subSection[0] != "_title" %}
|
||||
<li><a href="#{{ subSection[0] }}">{{ subSection[1] }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="#{{ section[0] }}">{{ section[1] }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
{% capture editCollectionUrl %}{{ site.gh_pages_url }}/tree/{{ site.gh_pages_branch }}/_{{ page.collection }}{% endcapture %}
|
||||
<a href="{{ editCollectionUrl }}" title="Open this documentation on GitHub">
|
||||
<img src="{{ site.base_url }}/style/images/GitHub-Mark-32px.png" alt="Open this documentation on GitHub" class="alignleft" style="margin: 8px 0.5em 0.5em 0;" />
|
||||
</a>
|
||||
Found a typo? Something is wrong in this documentation? Just <a href="{{ editCollectionUrl }}">fork and edit</a> it!
|
||||
</p>
|
||||
</div>
|
||||
<div class="three-fourth last">
|
||||
{% for item in items %}
|
||||
{{ item.output }}
|
||||
|
||||
<hr />
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include pageFooter.html %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
{% include documentFooter.html %}
|
|
@ -12,7 +12,13 @@
|
|||
{% include pageHeader.html %}
|
||||
</div>
|
||||
|
||||
{{ content }}
|
||||
<div class="light-wrapper">
|
||||
<div class="inner">
|
||||
{% include pageHeadline.html %}
|
||||
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include pageFooter.html %}
|
||||
</div>
|
||||
|
|
67
_layouts/docs.html
Normal file
67
_layouts/docs.html
Normal file
|
@ -0,0 +1,67 @@
|
|||
{% include documentHeader.html %}
|
||||
<head>
|
||||
|
||||
{% include headInclude.html %}
|
||||
<title>{% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }} - {{ site.description }}{% endif %}</title>
|
||||
|
||||
</head>
|
||||
<body class="full-layout">
|
||||
|
||||
<div class="body-wrapper">
|
||||
<div class="top-wrapper">
|
||||
{% include pageHeader.html %}
|
||||
</div>
|
||||
|
||||
<div class="light-wrapper">
|
||||
<div class="inner">
|
||||
{% include pageHeadline.html %}
|
||||
|
||||
{% if page.collection or page.toc %}
|
||||
{% if page.collection %}
|
||||
{{ content }}
|
||||
|
||||
{% assign items = site[page.collection]|sort:"nav" %}
|
||||
{% capture editPageUrl %}{{ site.gh_pages_url }}/tree/{{ site.gh_pages_branch }}/_{{ page.collection }}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture editPageUrl %}{{ site.gh_pages_url }}/edit/{{ site.gh_pages_branch }}/{{ page.path }}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
<div class="one-fourth">
|
||||
<ul>
|
||||
{% if page.collection %}
|
||||
{% for item in items %}
|
||||
{% include tocItem.html page=item %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% include tocItem.html %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<a href="{{ editPageUrl }}" title="Open this documentation on GitHub">
|
||||
<img src="{{ site.base_url }}/style/images/GitHub-Mark-32px.png" alt="Open this documentation on GitHub" class="alignleft" style="margin: 8px 0.5em 0.5em 0;" />
|
||||
</a>
|
||||
Found a typo? Something is wrong in this documentation? Just <a href="{{ editPageUrl }}">fork and edit</a> it!
|
||||
</p>
|
||||
</div>
|
||||
<div class="three-fourth last">
|
||||
{% if page.collection %}
|
||||
{% for item in items %}
|
||||
{{ item.output }}
|
||||
|
||||
<hr />
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ content }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include pageFooter.html %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
{% include documentFooter.html %}
|
|
@ -1,40 +0,0 @@
|
|||
{% include documentHeader.html %}
|
||||
<head>
|
||||
|
||||
{% include headInclude.html %}
|
||||
<title>{% if page.title %}{{ page.title }} | {{ site.title }}{% else %}{{ site.title }} - {{ site.description }}{% endif %}</title>
|
||||
|
||||
</head>
|
||||
<body class="full-layout">
|
||||
|
||||
<div class="body-wrapper">
|
||||
<div class="top-wrapper">
|
||||
{% include pageHeader.html %}
|
||||
</div>
|
||||
|
||||
<div class="light-wrapper">
|
||||
<div class="inner">
|
||||
{% if page.headline or page.title %}
|
||||
<h1 class="aligncenter">
|
||||
{% if page.headline %}
|
||||
{{ page.headline | markdownify | remove: '<p>' | remove: '</p>' }}
|
||||
{% else %}
|
||||
{{ page.title }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endif %}
|
||||
{% if page.description %}
|
||||
<p class="description aligncenter">
|
||||
{{ page.description | markdownify | remove: '<p>' | remove: '</p>' }}
|
||||
</p><br />
|
||||
{% endif %}
|
||||
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include pageFooter.html %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
{% include documentFooter.html %}
|
2
docs.md
2
docs.md
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
layout: collection
|
||||
layout: docs
|
||||
title: Docs
|
||||
headline: Pico Documentation
|
||||
description: |
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
layout: simple
|
||||
layout: default
|
||||
title: Download
|
||||
headline: Download Pico
|
||||
description: Download the latest version of Pico or [clone on GitHub](https://github.com/picocms/Pico).
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
layout: collection
|
||||
layout: docs
|
||||
title: Development
|
||||
headline: Create your own plugins & themes
|
||||
description: Below is our developer documentation, you may also refer to Picos [class documentation](phpDoc/master/).
|
||||
|
|
194
plugins.html
194
plugins.html
|
@ -1,105 +1,105 @@
|
|||
---
|
||||
layout: default
|
||||
title: Plugins
|
||||
headline: Pico Plugins
|
||||
description: |
|
||||
Below are some plugins which extend the functionality of Pico and make it even more awesome.<br />
|
||||
Want to make a plugin? See [the docs](docs.html#plugins).
|
||||
nav: 4
|
||||
---
|
||||
|
||||
<div class="light-wrapper">
|
||||
<div class="inner">
|
||||
<h1 class="aligncenter">Pico Plugins</h1>
|
||||
<p class="description aligncenter">
|
||||
Below are some plugins which extend the functionality of Pico and make it even more awesome.<br />
|
||||
Want to make a plugin? See <a href="docs.html#plugins">the docs</a>.
|
||||
</p><br />
|
||||
<h1 class="aligncenter">Pico Plugins</h1>
|
||||
<p class="description aligncenter">
|
||||
Below are some plugins which extend the functionality of Pico and make it even more awesome.<br />
|
||||
Want to make a plugin? See <a href="docs.html#plugins">the docs</a>.
|
||||
</p><br />
|
||||
|
||||
<h1>Pico 1.0 </h1>
|
||||
<div class="one-third">
|
||||
<h3>Tags</h3>
|
||||
<p>Provides tags functionality for Pico.</p>
|
||||
<p><a href="https://github.com/szymonkaliski/Pico-Tags-Plugin" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third ">
|
||||
<h3>Editor</h3>
|
||||
<p>Markdown editor and file manager for Pico.</p>
|
||||
<p><a href="https://github.com/theshka/Pico-Editor-Plugin" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>Pico GAnalytics</h3>
|
||||
<p>Gooogle Analytics for Pico with basic options. </p>
|
||||
<p><a href="https://github.com/bricebou/pico_ganalytics" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>Pico GitHub Activity</h3>
|
||||
<p>Your GitHub public activity feed.</p>
|
||||
<p><a href="https://github.com/theshka/pico_githubactivity" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<h1>Pico 0.X </h1>
|
||||
<div class="one-third">
|
||||
<h3>Pagination</h3>
|
||||
<p>Provides basic pagination for Pico.</p>
|
||||
<p><a href="https://github.com/rewdy/Pico-Pagination" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third">
|
||||
<h3>Slider</h3>
|
||||
<p>Create sliders (image lists) inside Pico.</p>
|
||||
<p><a href="https://github.com/james2doyle/pico_slider" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>Sitemap</h3>
|
||||
<p>Pico plugin to generate an XML sitemap.</p>
|
||||
<p><a href="https://github.com/Techn0tic/Pico_Sitemap" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>Get Files By Name</h3>
|
||||
<p>A Pico plugin to grab content by the filename.</p>
|
||||
<p><a href="https://github.com/james2doyle/pico_get_by_filename" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third">
|
||||
<h3>Advanced Meta</h3>
|
||||
<p>A simple plugin to customize page meta.</p>
|
||||
<p><a href="https://github.com/shawnsandy/adv-meta" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>Private</h3>
|
||||
<p>Provide authentication to keep your site private.</p>
|
||||
<p><a href="https://github.com/jbleuzen/Pico-Private" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>OpenGraph</h3>
|
||||
<p>Adds OpenGraph to your Pico site.</p>
|
||||
<p><a href="https://github.com/ahmet2106/pico-opengraph" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third">
|
||||
<h3>Navigation</h3>
|
||||
<p>Generates a better navigation for Pico.</p>
|
||||
<p><a href="https://github.com/ahmet2106/pico-navigation" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>RSS Feed</h3>
|
||||
<p>Provides an RSS Feed for Pico.</p>
|
||||
<p><a href="https://github.com/gilbitron/Pico-RSS-Plugin" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>Draftin</h3>
|
||||
<p>
|
||||
This is a Pico plugin that integrates <a href="http://draftin.com" target="_blank">Draft</a> into Pico.
|
||||
You can see a tutorial on how to use it on <a href="http://www.codeforest.net/pico-cms-and-draft" target="_blank">Codeforest</a>.
|
||||
</p>
|
||||
<p><a href="https://github.com/codeforest/pico_draft" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<p class="aligncenter">Have you created a plugin for Pico?
|
||||
<a href="{{ site.gh_project_url }}/wiki/Pico-Plugins">Add it to the wiki</a> and we'll put it up here.</p>
|
||||
</div>
|
||||
<h1>Pico 1.0 </h1>
|
||||
<div class="one-third">
|
||||
<h3>Tags</h3>
|
||||
<p>Provides tags functionality for Pico.</p>
|
||||
<p><a href="https://github.com/szymonkaliski/Pico-Tags-Plugin" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third ">
|
||||
<h3>Editor</h3>
|
||||
<p>Markdown editor and file manager for Pico.</p>
|
||||
<p><a href="https://github.com/theshka/Pico-Editor-Plugin" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>Pico GAnalytics</h3>
|
||||
<p>Gooogle Analytics for Pico with basic options. </p>
|
||||
<p><a href="https://github.com/bricebou/pico_ganalytics" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>Pico GitHub Activity</h3>
|
||||
<p>Your GitHub public activity feed.</p>
|
||||
<p><a href="https://github.com/theshka/pico_githubactivity" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<h1>Pico 0.X </h1>
|
||||
<div class="one-third">
|
||||
<h3>Pagination</h3>
|
||||
<p>Provides basic pagination for Pico.</p>
|
||||
<p><a href="https://github.com/rewdy/Pico-Pagination" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third">
|
||||
<h3>Slider</h3>
|
||||
<p>Create sliders (image lists) inside Pico.</p>
|
||||
<p><a href="https://github.com/james2doyle/pico_slider" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>Sitemap</h3>
|
||||
<p>Pico plugin to generate an XML sitemap.</p>
|
||||
<p><a href="https://github.com/Techn0tic/Pico_Sitemap" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>Get Files By Name</h3>
|
||||
<p>A Pico plugin to grab content by the filename.</p>
|
||||
<p><a href="https://github.com/james2doyle/pico_get_by_filename" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third">
|
||||
<h3>Advanced Meta</h3>
|
||||
<p>A simple plugin to customize page meta.</p>
|
||||
<p><a href="https://github.com/shawnsandy/adv-meta" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>Private</h3>
|
||||
<p>Provide authentication to keep your site private.</p>
|
||||
<p><a href="https://github.com/jbleuzen/Pico-Private" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>OpenGraph</h3>
|
||||
<p>Adds OpenGraph to your Pico site.</p>
|
||||
<p><a href="https://github.com/ahmet2106/pico-opengraph" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third">
|
||||
<h3>Navigation</h3>
|
||||
<p>Generates a better navigation for Pico.</p>
|
||||
<p><a href="https://github.com/ahmet2106/pico-navigation" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="one-third last">
|
||||
<h3>RSS Feed</h3>
|
||||
<p>Provides an RSS Feed for Pico.</p>
|
||||
<p><a href="https://github.com/gilbitron/Pico-RSS-Plugin" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<div class="one-third">
|
||||
<h3>Draftin</h3>
|
||||
<p>
|
||||
This is a Pico plugin that integrates <a href="http://draftin.com" target="_blank">Draft</a> into Pico.
|
||||
You can see a tutorial on how to use it on <a href="http://www.codeforest.net/pico-cms-and-draft" target="_blank">Codeforest</a>.
|
||||
</p>
|
||||
<p><a href="https://github.com/codeforest/pico_draft" class="button red">Download</a></p>
|
||||
</div>
|
||||
<div class="clear"></div><br />
|
||||
|
||||
<p class="aligncenter">Have you created a plugin for Pico?
|
||||
<a href="{{ site.gh_project_url }}/wiki/Pico-Plugins">Add it to the wiki</a> and we'll put it up here.</p>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 148 KiB |
Binary file not shown.
Before Width: | Height: | Size: 97 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 125 KiB |
70
upgrade.md
70
upgrade.md
|
@ -1,9 +1,75 @@
|
|||
---
|
||||
layout: simple
|
||||
layout: docs
|
||||
title: Upgrade
|
||||
headline: Upgrade Pico 0.8 and 0.9 to Pico 1.0
|
||||
gh_release: v1.0.0-beta.1
|
||||
---
|
||||
|
||||
## How to upgrade?
|
||||
|
||||
We worked hard to make the upgrade process to Pico 1.0 as easy as possible - and we think we made the grade.
|
||||
|
||||
### Required Steps
|
||||
|
||||
Usually you don't have to consider anything special when upgrading a existing Pico 0.8 or 0.9 installation to Pico 1.0. You basically can follow the regular [upgrade instructions][UpgradeInstructions] as if we updated the `MINOR` version.
|
||||
|
||||
1. Create a backup of your Pico installation. You will need the files later!
|
||||
2. Empty your installation directory and [install Pico just ordinary][InstallInstructions].
|
||||
3. Copy the `config.php` from your backup to `config/config.php`. You don't have to change anything in this file.
|
||||
4. Copy the `content` folder from your backup to Pico's installation directory. As a optional step, you can (but aren't required to) make your content files compatible to Pico's new routing system. You'll find detailed instructions on how to do this in the ["Routing system" section](#routing-system) below.
|
||||
5. If applicable, also copy the folder of your custom theme within the `themes` directory of your backup to the `themes` folder of your Pico installation. Again you can (but aren't required to) make your theme compatible to Pico's new routing system.
|
||||
6. Provided that you're using plugins, also copy all of your plugins from the `plugins` directory. Don't copy the `plugins/pico_plugin.php` - this is no real plugin, but Pico's old dummy plugin.
|
||||
|
||||
Pico 1.0 introduces a brand new routing system that is now compatible to any webserver. Even URL rewriting became optional. If you don't use the `.htaccess` file provided by Pico, you must update your rewriting rules to let the webserver rewrite internal links correctly. URLs like `http://example.com/pico/sub/page` must now be rewritten to `/pico/?sub/page`. Please refer to Pico's [`.htaccess` file][RewriteFile] and the [corresponding section in the docs][RewriteDocs].
|
||||
|
||||
A potential source of problems for users with custom themes is the removal of `{% raw %}{{ page.content }}{% endraw %}` and `{% raw %}{{ page.excerpt }}{% endraw %}`. As long as you use old plugins, the newly introduced `PicoDeprecated` plugin ensures the further availability of these variables. However, this plugin won't get enabled when all of your plugins were updated to Pico 1.0. Furthermore we will drop the auto provision of `{% raw %}{{ page.content }}{% endraw %}` and `{% raw %}{{ page.excerpt }}{% endraw %}` with Pico 1.1. If you're using one of these variables in your theme, we highly recommend you to take the steps described in the ["Drop of `{% raw %}{{ page.content }}{% endraw %}`"](#drop-of-page.content-and-the-new-picoparsepagescontent-plugin) and ["Drop of `{% raw %}{{ page.excerpt }}{% endraw %}`" sections](#drop-of-page.excerpt-and-the-new-picoexcerpt-plugin) below.
|
||||
|
||||
### Optional Steps
|
||||
|
||||
#### Routing system
|
||||
|
||||
You're not required to update your internal links to meet the new routing system, as long as you keep URL rewriting enabled. Anyway, if you want to keep the option open to disable URL rewriting later, you should do it.
|
||||
|
||||
In Markdown files (i.e. your `content` directory), replace all occurences of e.g. `%base_url%/sub/page` with `%base_url%?sub/page`. If you're linking to the main page (i.e. just `%base_url%`), you either shouldn't change anything or replace it with `%base_url%?index` - even this actually isn't absolutely necessary. Pico replaces the `%base_url%` variable as ever, but also removes the `?` when URL rewriting is enabled.
|
||||
|
||||
The required changes to your theme (i.e. a custom theme folder in Pico's `themes` directory) are quite similar. Instead of using `{% raw %}{{ base_url }}{% endraw %}` directly, use the newly introduced `link` filter. Therefore replace e.g. `{% raw %}{{ base_url }}/sub/page{% endraw %}` with `{% raw %}{{ "sub/page"|link }}{% endraw %}`. Again, you can (but aren't required to) either don't change links to the main page (i.e. just `{% raw %}{{ base_url }}{% endraw %}`) or replace them with `{% raw %}{{ "index"|link }}{% endraw %}`. The `link` filter does nothing but call the [`Pico::getPageUrl()` method][PicoGetPageUrl].
|
||||
|
||||
#### Drop of `{% raw %}{{ page.content }}{% endraw %}` and the new `PicoParsePagesContent` plugin
|
||||
|
||||
WORK IN PROGRESS
|
||||
|
||||
#### Drop of `{% raw %}{{ page.excerpt }}{% endraw %}` and the new `PicoExcerpt` plugin
|
||||
|
||||
WORK IN PROGRESS
|
||||
|
||||
#### Ensure restricted access to `content` directory
|
||||
|
||||
WORK IN PROGRESS
|
||||
|
||||
[UpgradeInstructions]: {{ site.base_url }}/docs.html#upgrade
|
||||
[InstallInstructions]: {{ site.base_url }}/docs.html#install
|
||||
[RewriteFile]: {{ site.gh_project_url }}/blob/{{ page.gh_release }}/.htaccess#L7
|
||||
[RewriteDocs]: {{ site.base_url }}/docs.html#url-rewriting
|
||||
[PicoGetPageUrl]: {{ site.gh_project_url }}/blob/{{ page.gh_release }}/lib/Pico.php#L1168-L1171
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
The new `PicoDeprecated` plugin ensures backward compatibility to Pico 0.9 and older. The plugin is disabled by default, but gets automatically enabled as soon as a old plugin is loaded. We will maintain backward compatibility for a long time, however, we recommend you to take the following steps to confine the neccessity of `PicoDeprecated` to old plugins. If you don't use plugins or upgraded all plugins to be compatible to Pico 1.0, you must take these steps.
|
||||
|
||||
If you're a plugin developer, please refer to the new development docs, particularly the [plugin upgrade section][PluginUpgrade].
|
||||
|
||||
* Pico 1.0 doesn't parse the contents of all pages anymore. This can be put
|
||||
down to the massive performance impact, but leads to the removal of the
|
||||
generation of auto-generated excerpts.
|
||||
TODO: describe how to force enable/disable `PicoExcerpt` and `PicoParsePagesContent`
|
||||
TODO: describe how to replace `PicoExcerpt`
|
||||
* TODO: Removing various empty `index.html` files; check accessibility!
|
||||
* TODO: Describe new features that are important for users... e.g. `%meta.*%`
|
||||
|
||||
|
||||
|
||||
## What's new?
|
||||
|
||||
`Pico 1.0.0-beta.1` brings with it a complete code refactoring and overhaul of the plugin system, countless bug fixes, compatibility with all web servers, and enhanced documentation. Making Pico extremely simple, faster, and more flexible than ever. <sup> * </sup>Best of all, it's completely backwards compatible! Click for a full [changelog]({{ site.gh_project_url }}/blob/{{ site.gh_project_branch }}/changelog.txt).
|
||||
|
@ -57,3 +123,5 @@ Further reading:
|
|||
|
||||
### 5. That's it! Enjoy your newly upgraded Pico installation!
|
||||
If you need more help, please review the documentation. If after reviewing the upgrade documentation, you are still having trouble: there is a __[Upgrading Pico 0.x to 1.0.0]({{ site.gh_project_url }}/issues/)__ discussion on our Github issues page.
|
||||
|
||||
-->
|
||||
|
|
Loading…
Add table
Reference in a new issue