summaryrefslogtreecommitdiff
path: root/doc/todo/tag_pagespec_function.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-17 13:10:35 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-17 13:10:35 -0500
commit532bf02e0681f32c2f115adf8c3347f818ffd54e (patch)
treebc7c596e4045e386702e83c8a972288ff62f6f0c /doc/todo/tag_pagespec_function.mdwn
parent0b2e755253e2b20993e50b19a206597a3ff88e2d (diff)
parent64000366bde6dbd3a329e4665b0712ceac0993ac (diff)
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
Diffstat (limited to 'doc/todo/tag_pagespec_function.mdwn')
-rw-r--r--doc/todo/tag_pagespec_function.mdwn27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/todo/tag_pagespec_function.mdwn b/doc/todo/tag_pagespec_function.mdwn
new file mode 100644
index 000000000..0a51c7220
--- /dev/null
+++ b/doc/todo/tag_pagespec_function.mdwn
@@ -0,0 +1,27 @@
+Implementing tags in terms of links is clever, but it would be nice if it was
+opaque in both directions: tagging and matching tags. Writing pagespecs to
+find out which pages are tagged with a given name means that the pagespec is
+tied to whatever the tagbase is.
+
+This patch adds a pagespec function 'tag' which lets you write pagespecs to
+match tagged pages independent of whatever the tagbase is set to.
+
+ -- [[users/Jon]] 2009/02/17
+
+[[!tag patch]]
+
+ --- 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
+ @@ -125,4 +125,12 @@
+ }
+ }
+
+ +package IkiWiki::PageSpec;
+ +
+ +sub match_tag ($$;@) {
+ + my $page = shift;
+ + my $glob = shift;
+ + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob));
+ +}
+ +
+ 1