Merge: Add trails to nitiwiki
authorJean Privat <jean@pryen.org>
Thu, 12 Nov 2015 01:43:47 +0000 (20:43 -0500)
committerJean Privat <jean@pryen.org>
Thu, 12 Nov 2015 01:43:47 +0000 (20:43 -0500)
commitbc7defddb5c051a44df734e3a3d68d017361f2d5
treea06a75c49eece01e2a8862c864e5a04c42b7b13c
parentaf582792879355d333ee07c58643320a2bc353cc
parent011905e3aebac2082d977db0400af225efbec3c9
Merge: Add trails to nitiwiki

Wikilinks, with the directive `trail`, will register the target page as an element of a trail.
Each `trail` are chained together and will display navigational link `prev` for the previous page of the trail, `next` for the next page of the trail and `up` to go to the pages that has used the `trail` wikilink.

For instance, if the page `doc.md` has the following content:

~~~md
To use nitiwiki, first [[trail: install|install it]],
then [[trail: simple_wiki|create a first wiki]].

You can also do advanced things like:

* [[trail: github|editing pages with github]]
* [[trail: templating| adapting the templates]]
~~~

A trail will be made and will consist of the sequence of pages `install`, `simple_wiki`, `github` and `templating`.
On each one of these pages, there will be links for the previous, the next page and the `doc.md` pae.

If a page includes trail wikilinks and is also the target for trail wikilinks, then the two trails are merged and pages will be visitable in a depth-first order.
This nesting of trails can be used to have sections and sub-sections.

Demo is up: http://info.uqam.ca/~privat/nitlanguage/manual/

Pull-Request: #1830
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>