Sophie

Sophie

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

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>redirect (third party plugin)</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="author" content="spalax" />



</head>
<body>

<div class="page">

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

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

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

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

</span>
<span class="title">
redirect (third party plugin)

</span>
</span>



</div>









</div>





<div id="pagebody">

<div id="content" role="main">
<p><span class="infobox">
Plugin: redirect<br />
Author: <span class="createlink">Louis</span><br />
Included in ikiwiki: no<br />
Enabled by default: no<br />
Included in <a href="../goodstuff.html">goodstuff</a>: no<br />
Currently enabled: no<br />
</span></p>

<p>This plugin provides a <span class="createlink">redirect</span> <a href="../../ikiwiki/directive.html">directive</a>.</p>

<p>Using this, you can cause a page to redirect to another page (something similar to the <code>redir</code> option of the <a href="http://ikiwiki.info/ikiwiki/directive/meta">meta</a> plugin.</p>

<div class="toc">
<ol>
	<li class="L1"><a href="#index1h1">Directive</a>
	</li>
	<li class="L1"><a href="#index2h1">Example</a>
	</li>
	<li class="L1"><a href="#index3h1">Setup</a>
	</li>
	<li class="L1"><a href="#index4h1">Differences with the meta plugin</a>
	</li>
	<li class="L1"><a href="#index5h1">Download and install</a>
	</li>
</ol>
</div>

<h1><a name="index1h1"></a>Directive</h1>

<p>It accepts options <code>pages</code>, <code>skip</code>, <code>sort</code>, <code>reverse</code>, which have the same meaning as they have in the <a href="http://ikiwiki.info/ikiwiki/directive/inline/">inline</a> directive. It builds a list of pages using those arguments, and redirect the page to the first page of this list.</p>

<p>It also renders a text <em>If you are not redirected automatically, follow [[this link]].</em> This text can be customized by changing the template <code>redirect.tmpl</code>, which accepts a single variable <code>TARGETPAGE</code>.</p>

<h1><a name="index2h1"></a>Example</h1>

<p>To have a page <code>latest.html</code> redirect to your latest blog post, have the following line into <code>latest.mdwn</code>:</p>

<pre><code>[[!redirect  pages="blog/* and !blog/*"]]
</code></pre>

<h1><a name="index3h1"></a>Setup</h1>

<p>This directive accepts no setup options.</p>

<h1><a name="index4h1"></a>Differences with the <code>meta</code> plugin</h1>

<ul>
<li>This directive is better than the <code>redir</code> option of the <a href="http://ikiwiki.info/ikiwiki/directive/meta/">meta</a> plugin because it can redirect to (the first page of) a pagespec, meaning things like <em>"redirect to my latest blog post"</em>.</li>
<li>The <code>redir</code> option of the <a href="http://ikiwiki.info/ikiwiki/directive/meta">meta</a> plugin is better than this directive because:
<ul>
<li>it can redirect to an anchor <code>[[!meta  redir="foo#bar"]]</code>;</li>
<li>it can redirect to an external page <code>[[!meta  redir="http://example.com"]]</code>.</li>
</ul></li>
</ul>

<h1><a name="index5h1"></a>Download and install</h1>

<p>Code and documentation can be found here : <a href="https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Redirect">https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Redirect</a>.</p>

</div>







</div>

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

<div id="pageinfo">






<div id="backlinks">
Links:

<a href="./pageversion.html">pageversion</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>