]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/ikiwiki/directive/pagestats.mdwn
pagestats: add `among` parameter, which only counts links from specified pages
[git.ikiwiki.info.git] / doc / ikiwiki / directive / pagestats.mdwn
1 The `pagestats` directive is supplied by the [[!iki plugins/pagestats desc=pagestats]] plugin.
3 This directive can generate stats about how pages link to each other. It can
4 produce either a tag cloud, or a table counting the number of links to each
5 page.
7 Here's how to use it to create a [[tag]] cloud:
9         \[[!pagestats pages="tags/*"]]
11 And here's how to create a table of all the pages on the wiki:
13         \[[!pagestats style="table"]]
15 The optional `among` parameter limits counting to pages that match a
16 [[ikiwiki/PageSpec]]. For instance, to display a cloud of tags used on blog
17 entries, you could use:
19         \[[!pagestats pages="tags/*" among="blog/posts/*"]]
21 or to display a cloud of tags related to Linux, you could use:
23         \[[!pagestats pages="tags/* and not tags/linux" among="tagged(linux)"]]
25 [[!meta robots="noindex, follow"]]