rename tag() to tagged(); add docs

master
Joey Hess 2009-02-19 18:54:25 -05:00
parent e611d4cdc1
commit f813b10fef
5 changed files with 8 additions and 3 deletions

View 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));

1
debian/changelog vendored
View 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

View 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

View 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.

View 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