Plugin: redirect
Author: Louis
Included in ikiwiki: no
Enabled by default: no
Included in goodstuff: no
Currently enabled: yes
This plugin provides a redirect directive.
Using this, you can cause a page to redirect to another page (something similar to the redir option of the meta plugin.
Directive
It accepts options pages, skip, sort, reverse, which have the same meaning as they have in the inline directive. It builds a list of pages using those arguments, and redirect the page to the first page of this list.
It also renders a text If you are not redirected automatically, follow [[this link]]. This text can be customized by changing the template redirect.tmpl, which accepts a single variable TARGETPAGE.
Example
To have a page latest.html redirect to your latest blog post, have the following line into latest.mdwn:
[[!redirect pages="blog/* and !blog/*"]]
Setup
This directive accepts no setup options.
Differences with the meta plugin
- This directive is better than the
rediroption of the meta plugin because it can redirect to (the first page of) a pagespec, meaning things like "redirect to my latest blog post". - The
rediroption of the meta plugin is better than this directive because:- it can redirect to an anchor
[[!meta redir="foo#bar"]]; - it can redirect to an external page
[[!meta redir="http://example.com"]].
- it can redirect to an anchor
Download and install
Code and documentation can be found here : https://spalax.frama.io/gresille-ikiwiki/redirect.