Ver código fonte

Updating docs.

Gilbert Pellegrom 12 anos atrás
pai
commit
40f06ba352
2 arquivos alterados com 38 adições e 16 exclusões
  1. 37 16
      docs.html
  2. 1 0
      style.css

+ 37 - 16
docs.html

@@ -137,6 +137,8 @@
 	  <pre><code>/*
 	  <pre><code>/*
 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
+Date: 2013/01/01
 Robots: noindex,nofollow
 Robots: noindex,nofollow
 */
 */
 </code></pre>
 </code></pre>
@@ -152,23 +154,42 @@ Robots: noindex,nofollow
 in config.php to your theme folder.</p>
 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>
 	  <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>
 	  <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>
 	  </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>
       <hr>
       <h3>Contribute</h3>
       <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
       <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

+ 1 - 0
style.css

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