diff options
author | p4bl0 <pablo@rauzy.name> | 2010-09-04 22:59:18 +0200 |
---|---|---|
committer | p4bl0 <pablo@rauzy.name> | 2010-09-04 22:59:18 +0200 |
commit | 1df13a62bf3a85f8a881e7d127cf940d14a601b5 (patch) | |
tree | 5f1918093bba0707d073f38b9d0ab5189f844080 | |
parent | e433692a6f316c7e4f62efac27b2117ac94e2320 (diff) |
finished README writing
-rw-r--r-- | README | 27 |
1 files changed, 22 insertions, 5 deletions
@@ -128,7 +128,7 @@ fugitive: README <li>it regenerates static html files for articles that are just before and after newly added and deleted articles (this to maintain the "previous" and "next" links alive),</li> - <li>it regenerates the "archives.html" and "feed.xml" + <li>it regenerates the archives.html and feed.xml files,</li> <li>and finally it copies the static html file of the last article to "index.html".</li> @@ -176,15 +176,15 @@ fugitive: README anything else. </p> <p> - The foreach loop construct is specific to the "archives.html" and - "feed.xml" templates and will therefore be described at the same + The foreach loop construct is specific to the archives.html and + feed.xml templates and will therefore be described at the same time. Where available, the loops are processed right after the includes. </p> <p> The syntax of the conditional construct is as follow: </p> <pre><<span class="keyword">?fugitive</span> ifset:<em>var</em> ?> - Template code which is ignored if var value is empty, and + Template code which is ignored if <em>var</em> value is empty, and which typically includes <<span class="function-name">code</span>><<span class="keyword">?fugitive</span> <em>var</em> ?></<span class="function-name">code</span>>. <<span class="keyword">?fugitive</span> endifset:<em>var</em> ?></pre> <p class="note"> @@ -356,4 +356,21 @@ fugitive: README </dd> </dl> <h4>foreach loops in archives.html and feed.xml:</h4> -<p><em>*TODO*</em></p> +<p> + Two foreach loops are available: <code>foreach:article</code> + and <code>foreach:commit</code>. The syntax is as follow: +</p> +<pre><<span class="keyword">?fugitive</span> foreach:article ?> + Template code that will be repeated for each article and + where the values of <<span class="function-name">code</span>>article_*</<span class="function-name">code</span>> variables are + set in accordance with the article each time. +<<span class="keyword">?fugitive</span> endforeach:article ?></pre> +<pre><<span class="keyword">?fugitive</span> foreach:commit ?> + Template code that will be repeated for each commit and + where the values of <<span class="function-name">code</span>>commit_*</<span class="function-name">code</span>> variables are + set in accordance with the commit each time. +<<span class="keyword">?fugitive</span> endforeach:commit ?></pre> +<p> + The only difference between the archives.html and feed.xml templates is that + in feed.xml these contsructs only loop on the five last articles and commits. +</p> |