Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
commit
532bf02e06
|
@ -0,0 +1,27 @@
|
||||||
|
I think there might be an issue in the backlinks calculation in ikiwiki 3.04.
|
||||||
|
|
||||||
|
I've just migrated to 3.04. In doing so, the following pagespec
|
||||||
|
|
||||||
|
> "log/* and !link(tag/aggregation) and !link(tag/draft) and !*/Discussion"
|
||||||
|
|
||||||
|
...started matching pages which contained
|
||||||
|
|
||||||
|
> \[\[!template draft\]\]
|
||||||
|
|
||||||
|
The page templates/draft.mdwn contains (amongst some markup)
|
||||||
|
|
||||||
|
> \[\[!tag draft \]\]
|
||||||
|
|
||||||
|
Prior to migration, the pagespec definitely took effect post-transclusion.
|
||||||
|
|
||||||
|
An example: <http://jmtd.net/log/too_much_debconf_a_bad_thing/> contains the
|
||||||
|
template inclusion, which can be seen to have worked due to markup at the
|
||||||
|
bottom of the page. It even includes a "Tags: draft" link at the bottom.
|
||||||
|
|
||||||
|
Strangely, <http://jmtd.net/tag/draft/> does not contain backlinks to pages
|
||||||
|
which are tagged using the procedure above.
|
||||||
|
|
||||||
|
After the first rebuild, it's broken, after a subsequent refresh, it is fixed.
|
||||||
|
I've reproduced this twice (but assumed I'd done something wrong the first
|
||||||
|
time, so went ahead and migrated live, spamming planet debian in the process
|
||||||
|
:(). I will try and put together a testcase. -- [[users/Jon]], 2009/02/17
|
|
@ -0,0 +1,12 @@
|
||||||
|
My ikiwiki setup file configed like:
|
||||||
|
|
||||||
|
usedirs => 0,
|
||||||
|
indexpages => 1,
|
||||||
|
|
||||||
|
I create a directory and some .mdwn source file /Whatis/index.mdwn and /Whatis/OSS.mdwn . The html file ikiwiki generated is
|
||||||
|
/Whatis/index.html and /Whatis/OSS.html .
|
||||||
|
|
||||||
|
But in the page [OSS.html](http://atoz.org.cn/Whatis/OSS.html) , the auto generated link (on the page top)
|
||||||
|
to “Whatis” is /Whatis.html file , not to /Whatis/index.html. So the link to “Whatis” is fail .
|
||||||
|
|
||||||
|
Is it a bug , and how can I do for that ?
|
|
@ -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
|
Loading…
Reference in New Issue