Updating docs.

This commit is contained in:
Gilbert Pellegrom 2013-05-03 15:52:27 +01:00
parent 770667683e
commit 40f06ba352
2 changed files with 38 additions and 16 deletions

View file

@ -137,6 +137,8 @@
<pre><code>/*
Title: Welcome
Description: This description will go in the meta description tag
Author: Joe Bloggs
Date: 2013/01/01
Robots: noindex,nofollow
*/
</code></pre>
@ -152,23 +154,42 @@ Robots: noindex,nofollow
in config.php to your theme folder.</p>
<p>All themes must include an <code>index.html</code> file to define the HTML structure of the theme. Below are the Twig variables that are available to use in your theme:</p>
<ul>
<li>
<code>{{ config }}</code> - Conatins the values you set in config.php (e.g. <code>{{ config.theme }}</code> = "default")</li>
<li>
<code>{{ base_dir }}</code> - The path to your Pico root directory</li>
<li>
<code>{{ base_url }}</code> - The URL to your Pico site</li>
<li>
<code>{{ theme_dir }}</code> - The path to the Pico active theme direcotry</li>
<li>
<code>{{ theme_url }}</code> - The URL to the Pico active theme direcotry</li>
<li>
<code>{{ site_title }}</code> - Shortcut to the site title (defined in config.php)</li>
<li>
<code>{{ meta }}</code> - Contains the meta values from the current page (e.g. <code>{{ meta.title }}</code>, <code>{{ meta.description }}</code>, <code>{{ meta.robots }}</code>)</li>
<li>
<code>{{ content }}</code> - The content of the current page (after it has been processed through Markdown)</li>
<li><code>{{ config }}</code> - Conatins the values you set in config.php (e.g. <code>{{ config.theme }}</code> = "default")</li>
<li><code>{{ base_dir }}</code> - The path to your Pico root directory</li>
<li><code>{{ base_url }}</code> - The URL to your Pico site</li>
<li><code>{{ theme_dir }}</code> - The path to the Pico active theme direcotry</li>
<li><code>{{ theme_url }}</code> - The URL to the Pico active theme direcotry</li>
<li><code>{{ site_title }}</code> - Shortcut to the site title (defined in config.php)</li>
<li><code>{{ meta }}</code> - Contains the meta values from the current page
<ul>
<li><code>{{ meta.title }}</code></li>
<li><code>{{ meta.description }}</code></li>
<li><code>{{ meta.author }}</code></li>
<li><code>{{ meta.date }}</code></li>
<li><code>{{ meta.date_formatted }}</code></li>
<li><code>{{ meta.robots }}</code></li>
</ul></li>
<li><code>{{ content }}</code> - The content of the current page (after it has been processed through Markdown)</li>
<li><code>{{ pages }}</code> - A collection of all the content in your site
<ul>
<li><code>{{ page.title }}</code></li>
<li><code>{{ page.url }}</code></li>
<li><code>{{ page.author }}</code></li>
<li><code>{{ page.date }}</code></li>
<li><code>{{ page.date_formatted }}</code></li>
</ul></li>
<li><code>{{ prev_page }}</code> - A page object of the previous page (relative to current_page)</li>
<li><code>{{ current_page }}</code> - A page object of the current_page</li>
<li><code>{{ next_page }}</code> - A page object of the next page (relative to current_page)</li>
<li><code>{{ is_front_page }}</code> - A boolean flag for the front page</li>
</ul>
<p>Pages can be used like:</p>
<pre>&lt;ul class="nav"&gt;
{% for page in pages %}
&lt;li&gt;&lt;a href="{{ page.url }}"&gt;{{ page.title }}&lt;/a&gt;&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;</pre>
<p>Note the <code>{{ pages }}</code> objects don't contain <code>content</code>. It is mainly to be used in creating navigaiton.</p>
<hr>
<h3>Contribute</h3>
<p>Help make Pico better by checking out <a href="https://github.com/gilbitron/Pico">the GitHub repoistory</a> and submitting pull requests. If you find a bug

View file

@ -300,6 +300,7 @@ img.alignright {
ul {
padding-bottom: 20px
}
ul li ul { padding: 0 0 0 30px; }
ul li:before {
font-family: 'fontello';
content: "\e78b";