]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/ikiwiki/directive/pagestats.mdwn
tagcloud problems
[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, with tags sized based
8 on frequency of use:
10         \[[!pagestats pages="tags/*"]]
12 Here's how to create a list of tags, sized by use as they would be in a
13 cloud.
14         
15         \[[!pagestats style="list" pages="tags/*"]]
17 And here's how to create a table of all the pages on the wiki:
19         \[[!pagestats style="table"]]
21 The optional `among` parameter limits the pages whose outgoing links are
22 considered. For instance, to display a cloud of tags used on blog
23 entries, while ignoring other pages that use those tags, you could use:
25         \[[!pagestats pages="tags/*" among="blog/posts/*"]]
27 Or to display a cloud of tags related to Linux, you could use:
29         \[[!pagestats pages="tags/* and !tags/linux" among="tagged(linux)"]]
31 The optional `limit` parameter limits display to the specified number of
32 pages. For instance, to show a table of the top ten pages with the most
33 links:
35         \[[!pagestats style="table" limit="10"]]
37 In older versions of IkiWiki this parameter was called `show`;
38 that name still works, if its value is numeric.
40 The optional `class` parameter can be used to control the class
41 of the generated tag cloud `div` or page stats `table`.
43 By default, the names of pages are shown. The `show` parameter
44 can be used (with a non-numeric value) to show the titles or descriptions
45 of pages instead (as set by the [[meta]] directive). For example:
47         \[[!pagestats pages="tags/*" show="title"]]
49 [[!meta robots="noindex, follow"]]