From c89925048f6c0b149d09b76ff122da2205b6ec86 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 18 Jan 2009 16:27:43 +0000 Subject: Add meta field "updated", which can alter the Atom element Some aggregators, like Planet, sort by mtime rather than ctime. This means that posts with modified content come to the top (which seems odd to me, but is presumably what the aggregator's author or operator wants), but it also means that posts with insignificant edits (like adding tags) come to the top too. Atom defines to be the date of the last *significant* change, so it's fine that ikiwiki defaults to using the mtime, but it would be good to have a way for the author to say "that edit was insignificant, don't use that mtime". --- doc/ikiwiki/directive/meta.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index 74db31943..f29a118bf 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -139,6 +139,15 @@ Supported fields: pages unchanged and avoid_flooding_aggregators (see [[!iki tips/howto_avoid_flooding_aggregators]]). +* updated + + Specifies a fake modification time for a page, to be output into RSS and + Atom feeds. This is useful to avoid flooding aggregators that sort by + modification time, like Planet: for instance, when editing an old blog post + to add tags, you could set `updated` to be one second later than the original + value. The date/time can be given in any format that + [[!cpan TimeDate]] can understand, just like the `date` field. + If the field is not one of the above predefined fields, the metadata will be written to the generated html page as a <meta> header. However, this won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled, -- cgit v1.2.3 From f813b10fef13682c95ada9c9a9ccf05ff602c172 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Feb 2009 18:54:25 -0500 Subject: rename tag() to tagged(); add docs --- IkiWiki/Plugin/tag.pm | 2 +- debian/changelog | 1 + doc/ikiwiki/pagespec.mdwn | 3 ++- doc/plugins/tag.mdwn | 3 +++ doc/todo/tag_pagespec_function.mdwn | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) (limited to 'doc/ikiwiki') diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 48c197748..8fe9c6828 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -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)); diff --git a/debian/changelog b/debian/changelog index 810c59f4e..80b3c5d8e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sun, 15 Feb 2009 20:11:57 -0500 diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 86abe5745..b476bde1f 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -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 diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 17bb086a1..8ff70a069 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -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. diff --git a/doc/todo/tag_pagespec_function.mdwn b/doc/todo/tag_pagespec_function.mdwn index 060368179..681a1f661 100644 --- a/doc/todo/tag_pagespec_function.mdwn +++ b/doc/todo/tag_pagespec_function.mdwn @@ -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 -- cgit v1.2.3