aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn
diff options
context:
space:
mode:
authorhttp://smcv.pseudorandom.co.uk/ <smcv@web>2012-04-18 04:44:35 -0400
committeradmin <admin@branchable.com>2012-04-18 04:44:35 -0400
commita822a5865b7ab74f12fe4b44edc68e728f71c293 (patch)
treeb6c9906bda8121c1f9fa653d256b3a304982d825 /doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn
parentdb6ec539cd9c5eb42bc6ffd1a918f33cee4bfb10 (diff)
downloadikiwiki-a822a5865b7ab74f12fe4b44edc68e728f71c293.tar
ikiwiki-a822a5865b7ab74f12fe4b44edc68e728f71c293.tar.gz
no it doesn't, but I think that's intentional
Diffstat (limited to 'doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn')
-rw-r--r--doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn b/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn
index b179972d8..26945ee07 100644
--- a/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn
+++ b/doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn
@@ -1 +1,34 @@
The [[ikiwiki/directive/listdirectives]]` directive doesn't register a link between the page and the subpages. This is a problem because then the [[ikiwiki/directive/orphans]] directive then marks the directives as orphans... Maybe it is a but with the orphans directive however... A simple workaround is to exclude those files from the orphans call... --[[anarcat]]
+
+> There's a distinction between wikilinks (matched by `link()`,
+> `backlink()` etc.) and other constructs that produce a
+> hyperlink. Some directives count as a wikilink (like `tag`)
+> but many don't (notably `inline`, `map`, `listdirectives`,
+> and `orphans` itself). As documented in
+> [[ikiwiki/directive/orphans]], orphans will tend to list
+> pages that are only matched by inlines/maps, too.
+>
+> The rule of thumb seems to be that a link to a particular
+> page counts as a wikilink, but a directive that lists
+> pages matching some pattern does not; so I think
+> `listdirectives` is working as intended here.
+> `orphans` itself obviously shouldn't count as a wikilink,
+> because that would defeat the point of it :-)
+>
+> Anything that uses a [[ikiwiki/pagespec]] to generate links,
+> like `inline` and `map`, can't generate wikilinks, because
+> wikilinks are gathered during the scan phase, and pagespecs
+> can't be matched until after the scan phase has finished
+> (otherwise, it'd be non-deterministic whether all wikilinks
+> had been seen yet, and `link()` in pagespecs wouldn't work
+> predictably).
+>
+> I suggest just using something like:
+>
+> \[[!orphans pages="* and !blog/* and !ikiwiki/directive/*"]]
+>
+> This wiki's example of listing [[plugins/orphans]] has a
+> more elaborate pagespec, which avoids bugs, todo items etc.
+> as well.
+>
+> --[[smcv]]