diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 25 |
1 files changed, 21 insertions, 4 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,8 +176,8 @@ 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> @@ -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> |