Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > d8544620e4ac7bee48ddb48c85d55709 > files > 124

ikiwiki-3.20190228-1.mga7.noarch.rpm

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>postsparkline</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" href="../../style.css" type="text/css" />

<link rel="stylesheet" href="../../local.css" type="text/css" />






<meta name="robots" content="noindex, follow" />



</head>
<body>

<div class="page">

<div class="pageheader">
<div class="header">
<span>
<span class="parentlinks">

<a href="../../index.html">ikiwiki</a>/ 

<a href="../../ikiwiki.html">ikiwiki</a>/ 

<a href="../directive.html">directive</a>/ 

</span>
<span class="title">
postsparkline

</span>
</span>



</div>









</div>





<div id="pagebody">

<div id="content" role="main">
<p>The <code>postsparkline</code> directive is supplied by the <a href="http://ikiwiki.info/plugins/postsparkline/">postsparkline</a> plugin.</p>

<p>This directive uses the <a href="http://ikiwiki.info/plugins/sparkline/">sparkline</a> plugin to create a
<a href="./sparkline.html">sparkline</a> of statistics about a set of pages, such as posts to a blog.</p>

<h1>examples</h1>

<pre><code>Post interval: 
[[!postsparkline  pages="blog/* and !*/Discussion" max=100
formula=interval style=bar barwidth=2 barspacing=1 height=13]]

Posts per month this year: 
[[!postsparkline  pages="blog/* and !*/Discussion" max=12
formula=permonth style=bar barwidth=2 barspacing=1 height=13]]
</code></pre>

<h1>usage</h1>

<p>All options aside from the <code>pages</code>, <code>max</code>, <code>formula</code>, <code>time</code>, and <code>color</code>
options are the same as in <a href="./sparkline.html">sparkline</a> directive.</p>

<p>You don't need to specify any data points (though you can if you want to).
Instead, data points are automatically generated based on the creation
times of pages matched by the specified <code>pages</code> <a href="../pagespec.html">PageSpec</a>. A
maximum of <code>max</code> data points will be generated.</p>

<p>The <code>formula</code> parameter controls the formula used to generate data points.
Available formulae:</p>

<ul>
<li><code>interval</code> - The height of each point represents how long it has been
since the previous post.</li>
<li><code>perday</code> - Each point represents a day; the height represents how
many posts were made that day.</li>
<li><code>permonth</code> - Each point represents a month; the height represents how
many posts were made that month.</li>
<li><code>peryear</code> - Each point represents a year; the height represents how
many posts were made that year.</li>
</ul>

<p>The <code>time</code> parameter has a default value of "ctime", since formulae use
the creation times of pages by default. If you instead want
them to use the modification times of pages, set it to "mtime".</p>

<p>To change the color used to draw the sparkline, use the <code>color</code> parameter.
For example, "color=red".</p>

</div>







</div>

<div id="footer" class="pagefooter" role="contentinfo">

<div id="pageinfo">






<div id="backlinks">
Links:

<a href="../../plugins/postsparkline.html">plugins/postsparkline</a>


</div>






<div class="pagedate">
Last edited <span class="date">Tue Feb 26 23:01:54 2019</span>
<!-- Created <span class="date">Tue Feb 26 23:01:54 2019</span> -->
</div>

</div>


<!-- from ikiwiki -->
</div>

</div>

</body>
</html>