From aa37d64d6a7134632bf1c35fa48c5f94af6230ab Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Sep 2008 17:51:27 -0400 Subject: move demo back to plugin and add example --- doc/plugins/orphans.mdwn | 14 +++++++++++--- underlays/basewiki/directive/orphans.mdwn | 12 +++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn index e50ee25d0..ea7c4df13 100644 --- a/doc/plugins/orphans.mdwn +++ b/doc/plugins/orphans.mdwn @@ -1,6 +1,14 @@ [[!template id=plugin name=orphans author="[[Joey]]"]] [[!tag type/meta]] -This plugin implements the [[ikiwiki/directive/orphans]] [[ikiwiki/directive]]. -The directive generates a list of possibly orphaned pages -- pages that no -other page links to. +This plugin provides the [[ikiwiki/directive/orphans]] +[[ikiwiki/directive]], which generates a list of possibly orphaned pages -- +pages that no other page links to. + +[[!if test="enabled(orphans)" then=""" +Here's a list of orphaned pages on this wiki: + +[[!orphans pages="* and !news/* and !todo/* and !bugs/* and !users/* and +!recentchanges and !examples/* and !tips/* and !sandbox/* and !templates/* and +!wikiicons/* and !plugins/*"]] +"""]] diff --git a/underlays/basewiki/directive/orphans.mdwn b/underlays/basewiki/directive/orphans.mdwn index 76c028474..db9af19a8 100644 --- a/underlays/basewiki/directive/orphans.mdwn +++ b/underlays/basewiki/directive/orphans.mdwn @@ -1,7 +1,9 @@ The `orphans` directive is supplied by the [[!iki plugins/orphans]] plugin. This directive generates a list of possibly orphaned pages -- pages that no -other page links to. +other page links to. Example: + + \[[!orphans pages="* and !blog/*"]] The optional parameter "pages" can be a [[ikiwiki/PageSpec]] specifying the pages to check for orphans, default is search them all. @@ -9,11 +11,3 @@ pages to check for orphans, default is search them all. Note that it takes backlinks into account, but does not count inlining a page as linking to it, so will generally count many blog-type pages as orphans. - -[[!if test="enabled(orphans)" then=""" -Here's a list of orphaned pages on this wiki: - -[[!orphans pages="* and !news/* and !todo/* and !bugs/* and !users/* and -!recentchanges and !examples/* and !tips/* and !sandbox/* and !templates/* and -!wikiicons/* and !plugins/*"]] -"""]] -- cgit v1.2.3