mirror of
https://git.ludikovsky.name/git/fugitive.git
synced 2024-10-06 15:55:30 +02:00
finished README writing
This commit is contained in:
parent
e433692a6f
commit
1df13a62bf
27
README
27
README
|
@ -128,7 +128,7 @@ fugitive: README
|
||||||
<li>it regenerates static html files for articles that are just
|
<li>it regenerates static html files for articles that are just
|
||||||
before and after newly added and deleted articles (this to maintain the
|
before and after newly added and deleted articles (this to maintain the
|
||||||
"previous" and "next" links alive),</li>
|
"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>
|
files,</li>
|
||||||
<li>and finally it copies the static html file of the last article to
|
<li>and finally it copies the static html file of the last article to
|
||||||
"index.html".</li>
|
"index.html".</li>
|
||||||
|
@ -176,15 +176,15 @@ fugitive: README
|
||||||
anything else.
|
anything else.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The foreach loop construct is specific to the "archives.html" and
|
The foreach loop construct is specific to the archives.html and
|
||||||
"feed.xml" templates and will therefore be described at the same
|
feed.xml templates and will therefore be described at the same
|
||||||
time. Where available, the loops are processed right after the includes.
|
time. Where available, the loops are processed right after the includes.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The syntax of the conditional construct is as follow:
|
The syntax of the conditional construct is as follow:
|
||||||
</p>
|
</p>
|
||||||
<pre><<span class="keyword">?fugitive</span> ifset:<em>var</em> ?>
|
<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>>.
|
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>
|
<<span class="keyword">?fugitive</span> endifset:<em>var</em> ?></pre>
|
||||||
<p class="note">
|
<p class="note">
|
||||||
|
@ -356,4 +356,21 @@ fugitive: README
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<h4>foreach loops in archives.html and feed.xml:</h4>
|
<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>
|
||||||
|
|
Loading…
Reference in a new issue