rename tag() to tagged(); add docs
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 19 Feb 2009 23:54:25 +0000 (18:54 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 19 Feb 2009 23:54:25 +0000 (18:54 -0500)
IkiWiki/Plugin/tag.pm
debian/changelog
doc/ikiwiki/pagespec.mdwn
doc/plugins/tag.mdwn
doc/todo/tag_pagespec_function.mdwn

index 48c197748fed95b307d14742463522bd1057f59f..8fe9c68286cc4ff49f15372c752cd981681a3181 100644 (file)
@@ -127,7 +127,7 @@ sub pagetemplate (@) {
 
 package IkiWiki::PageSpec;
 
-sub match_tag ($$;@) {
+sub match_tagged ($$;@) {
        my $page = shift;
        my $glob = shift;
        return match_link($page, IkiWiki::Plugin::tag::tagpage($glob));
index 810c59f4e910a44eefa9a022cb840a019741f30b..80b3c5d8e3e53592b63ffd1960aad43eefb7a5d6 100644 (file)
@@ -7,6 +7,7 @@ ikiwiki (3.05) UNRELEASED; urgency=low
     template reliably.
   * goto: Fix redirect to comments.
   * Add noextension parameter to htmlize hooks to support, eg, Makefile.
+  * Add tagged() PageSpec.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 15 Feb 2009 20:11:57 -0500
 
index 86abe574564c3e43f9f590bd60be5024661ffe1b..b476bde1f0b1385d26db52ed943500a27199f14b 100644 (file)
@@ -25,6 +25,7 @@ match all pages except for Discussion pages and the SandBox:
 Some more elaborate limits can be added to what matches using these functions:
 
 * "`link(page)`" - match only pages that link to a given page (or glob)
+* "`tagged(tag)`" - match pages that are tagged or link to the given tag (or glob)
 * "`backlink(page)`" - match only pages that a given page links to
 * "`creation_month(month)`" - match only pages created on the given month
 * "`creation_day(mday)`" - or day of the month
@@ -65,7 +66,7 @@ More complex expressions can also be created, by using parentheses for
 grouping. For example, to match pages in a blog that are tagged with either
 of two tags, use:
 
-       blog/* and (link(tag/foo) or link(tag/bar))
+       blog/* and (tagged(foo) or tagged(bar))
 
 Note that page names in PageSpecs are matched against the absolute
 filenames of the pages in the wiki, so a pagespec "foo" used on page
index 17bb086a1eb887a1c48801352bdb8f08dcfed1da..8ff70a069ce666cc9fc909878b2a7e93518d8296 100644 (file)
@@ -5,6 +5,9 @@ This plugin provides the [[ikiwiki/directive/tag]] and
 [[ikiwiki/directive/taglink]] [[directives|ikiwiki/directive]].
 These directives allow tagging pages.
 
+It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to
+match pages that are tagged with a specific tag.
+
 [[!if test="enabled(tag)" then="""
 This wiki has the tag plugin enabled, so you'll see a note below that this
 page is tagged with the "tags" tag.
index 060368179342bfae1846080706ffe81e01900948..681a1f661ca3b168aed32fd10fa9a925817140b9 100644 (file)
@@ -15,7 +15,7 @@ match tagged pages independent of whatever the tagbase is set to.
 >
 > One other thing, perhaps it should be called `tagged()`? --[[Joey]] 
 
-[[!tag patch]]
+[[!tag patch done]]
 
     --- a/plugins/IkiWiki/Plugin/tag.pm        2009-02-16 11:30:11.000000000 +0000
     +++ b/plugins/IkiWiki/Plugin/tag.pm        2009-02-17 15:40:03.000000000 +0000