summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm34
-rw-r--r--IkiWiki/Plugin/aggregate.pm12
-rw-r--r--IkiWiki/Plugin/bzr.pm2
-rw-r--r--IkiWiki/Plugin/goodstuff.pm1
-rw-r--r--IkiWiki/Plugin/recentchanges.pm2
-rw-r--r--IkiWiki/Plugin/tag.pm9
-rw-r--r--IkiWiki/Plugin/txt.pm2
-rw-r--r--IkiWiki/Wrapper.pm17
-rw-r--r--debian/changelog31
-rw-r--r--doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn5
-rw-r--r--doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn16
-rw-r--r--doc/bugs/login_page_should_note_cookie_requirement.mdwn17
-rw-r--r--doc/bugs/messed_up_repository.mdwn21
-rw-r--r--doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn2
-rw-r--r--doc/ikiwiki/markdown.mdwn4
-rw-r--r--doc/plugins/contrib/po.mdwn86
-rw-r--r--doc/plugins/format/discussion.mdwn15
-rw-r--r--doc/plugins/goodstuff.mdwn1
-rw-r--r--doc/plugins/meta.mdwn2
-rw-r--r--doc/robots.txt2
-rw-r--r--doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn14
-rw-r--r--doc/tips/emacs_syntax_highlighting.mdwn3
-rw-r--r--doc/tips/untrusted_git_push/discussion.mdwn33
-rw-r--r--doc/tips/vim_syntax_highlighting.mdwn6
-rw-r--r--doc/tips/vim_syntax_highlighting/discussion.mdwn7
-rw-r--r--doc/todo/avoid_thrashing.mdwn22
-rw-r--r--doc/todo/syntax_highlighting.mdwn2
-rw-r--r--doc/users/Edward_Betts.mdwn4
-rw-r--r--doc/users/jondowland.mdwn12
-rw-r--r--po/ikiwiki.pot22
-rwxr-xr-xt/pagespec_match.t5
-rw-r--r--templates/change.tmpl2
32 files changed, 348 insertions, 65 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index bab7b707a..d949566d8 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -120,7 +120,7 @@ sub getsetup () { #{{{
},
default_plugins => {
type => "internal",
- default => [qw{mdwn link inline htmlscrubber passwordauth
+ default => [qw{mdwn link inline meta htmlscrubber passwordauth
openid signinedit lockedit conditional
recentchanges parentlinks editpage}],
description => "plugins to enable by default",
@@ -403,6 +403,13 @@ sub getsetup () { #{{{
safe => 0,
rebuild => 0,
},
+ wikistatedir => {
+ type => "internal",
+ default => undef,
+ description => "path to the .ikiwiki directory holding ikiwiki state",
+ safe => 0,
+ rebuild => 0,
+ },
setupfile => {
type => "internal",
default => undef,
@@ -467,7 +474,7 @@ sub checkconfig () { #{{{
}
$config{wikistatedir}="$config{srcdir}/.ikiwiki"
- unless exists $config{wikistatedir};
+ unless exists $config{wikistatedir} && defined $config{wikistatedir};
if (defined $config{umask}) {
umask(possibly_foolish_untaint($config{umask}));
@@ -1273,8 +1280,7 @@ sub indexlink () { #{{{
my $wikilock;
-sub lockwiki (;$) { #{{{
- my $wait=@_ ? shift : 1;
+sub lockwiki () { #{{{
# Take an exclusive lock on the wiki to prevent multiple concurrent
# run issues. The lock will be dropped on program exit.
if (! -d $config{wikistatedir}) {
@@ -1282,20 +1288,8 @@ sub lockwiki (;$) { #{{{
}
open($wikilock, '>', "$config{wikistatedir}/lockfile") ||
error ("cannot write to $config{wikistatedir}/lockfile: $!");
- if (! flock($wikilock, 2 | 4)) { # LOCK_EX | LOCK_NB
- if ($wait) {
- debug("wiki seems to be locked, waiting for lock");
- my $wait=600; # arbitrary, but don't hang forever to
- # prevent process pileup
- for (1..$wait) {
- return if flock($wikilock, 2 | 4);
- sleep 1;
- }
- error("wiki is locked; waited $wait seconds without lock being freed (possible stuck process or stale lock?)");
- }
- else {
- return 0;
- }
+ if (! flock($wikilock, 2)) { # LOCK_EX
+ error("failed to get lock");
}
return 1;
} #}}}
@@ -1894,6 +1888,10 @@ sub match_link ($$;@) { #{{{
else {
return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
if match_glob($p, $link, %params);
+ $p=~s/^\///;
+ $link=~s/^\///;
+ return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
+ if match_glob($p, $link, %params);
}
}
return IkiWiki::FailReason->new("$page does not link to $link");
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index 2e4c86f24..c9c2880c5 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -520,10 +520,10 @@ sub aggregate (@) { #{{{
}
foreach my $entry ($f->entries) {
- my $content=$content=$entry->content->body;
+ my $c=$entry->content;
# atom feeds may have no content, only a summary
- if (! defined $content && ref $entry->summary) {
- $content=$entry->summary->body;
+ if (! defined $c && ref $entry->summary) {
+ $c=$entry->summary;
}
add_page(
@@ -531,9 +531,10 @@ sub aggregate (@) { #{{{
copyright => $f->copyright,
title => defined $entry->title ? decode_entities($entry->title) : "untitled",
link => $entry->link,
- content => defined $content ? $content : "",
+ content => defined $c ? $c->body : "",
guid => defined $entry->id ? $entry->id : time."_".$feed->{name},
ctime => $entry->issued ? ($entry->issued->epoch || time) : time,
+ base => (defined $c && $c->can("base")) ? $c->base : undef,
);
}
}
@@ -605,7 +606,8 @@ sub add_page (@) { #{{{
my $template=template($feed->{template}, blind_cache => 1);
$template->param(title => $params{title})
if defined $params{title} && length($params{title});
- $template->param(content => htmlescape(htmlabs($params{content}, $feed->{feedurl})));
+ $template->param(content => htmlescape(htmlabs($params{content},
+ defined $params{base} ? $params{base} : $feed->{feedurl})));
$template->param(name => $feed->{name});
$template->param(url => $feed->{url});
$template->param(copyright => $params{copyright})
diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm
index 101e91b93..1054f5b3e 100644
--- a/IkiWiki/Plugin/bzr.pm
+++ b/IkiWiki/Plugin/bzr.pm
@@ -246,7 +246,7 @@ sub rcs_recentchanges ($) { #{{{
rev => $info->{"revno"},
user => $user,
committype => "bzr",
- when => time - str2time($info->{"timestamp"}),
+ when => str2time($info->{"timestamp"}),
message => [@message],
pages => [@pages],
};
diff --git a/IkiWiki/Plugin/goodstuff.pm b/IkiWiki/Plugin/goodstuff.pm
index ed1f4ddfc..a18e626d4 100644
--- a/IkiWiki/Plugin/goodstuff.pm
+++ b/IkiWiki/Plugin/goodstuff.pm
@@ -10,7 +10,6 @@ my @bundle=qw{
brokenlinks
img
map
- meta
more
orphans
pagecount
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index a73ff37b9..3f70664ac 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -131,7 +131,7 @@ sub store ($$$) { #{{{
do => "recentchanges_link",
page => $_->{page}
).
- "\">".
+ "\" rel=\"nofollow\">".
pagetitle($_->{page}).
"</a>"
}
diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm
index c4a175677..d725ef9b3 100644
--- a/IkiWiki/Plugin/tag.pm
+++ b/IkiWiki/Plugin/tag.pm
@@ -44,6 +44,7 @@ sub tagpage ($) { #{{{
if ($tag !~ m{^\.?/} &&
defined $config{tagbase}) {
$tag="/".$config{tagbase}."/".$tag;
+ $tag=~y#/#/#s; # squash dups
}
return $tag;
@@ -55,13 +56,7 @@ sub taglink ($$$;@) { #{{{
my $tag=shift;
my %opts=@_;
- my $link=tagpage($tag);
-
- # Force tag creation links to create the tag under /tagbase,
- # if there is a tagbase and this tag used it.
- $link="/".$link if $tag ne $link;
-
- return htmllink($page, $destpage, $link, %opts);
+ return htmllink($page, $destpage, tagpage($tag), %opts);
} #}}}
sub preprocess_tag (@) { #{{{
diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm
index e4c9e5d6a..e157bf07e 100644
--- a/IkiWiki/Plugin/txt.pm
+++ b/IkiWiki/Plugin/txt.pm
@@ -39,7 +39,7 @@ sub filter (@) {
my $content = $params{content};
if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) {
- encode_entities($content);
+ encode_entities($content, "<>&");
if ($findurl) {
my $finder = URI::Find->new(sub {
my ($uri, $orig_uri) = @_;
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
index 99237d3b5..7a2d4381a 100644
--- a/IkiWiki/Wrapper.pm
+++ b/IkiWiki/Wrapper.pm
@@ -44,6 +44,7 @@ EOF
}
my $check_commit_hook="";
+ my $pre_exec="";
if ($config{post_commit}) {
# Optimise checking !commit_hook_enabled() ,
# so that ikiwiki does not have to be started if the
@@ -58,7 +59,7 @@ EOF
# the benefit of this optimisation.
$check_commit_hook=<<"EOF";
{
- int fd=open("$config{wikistatedir}/commitlock", O_CREAT | O_RDWR);
+ int fd=open("$config{wikistatedir}/commitlock", O_CREAT | O_RDWR, 0666);
if (fd != -1) {
if (flock(fd, LOCK_SH | LOCK_NB) != 0)
exit(0);
@@ -67,6 +68,19 @@ EOF
}
EOF
}
+ elsif ($config{cgi}) {
+ # Avoid more than one ikiwiki cgi running at a time by
+ # taking a cgi lock. Since ikiwiki uses several MB of
+ # memory, a pile up of processes could cause thrashing
+ # otherwise.
+ $pre_exec=<<"EOF";
+ {
+ int fd=open("$config{wikistatedir}/cgilock", O_CREAT | O_RDWR, 0666);
+ if (fd != -1)
+ flock(fd, LOCK_EX);
+ }
+EOF
+ }
$Data::Dumper::Indent=0; # no newlines
my $configstring=Data::Dumper->Dump([\%config], ['*config']);
@@ -122,6 +136,7 @@ $envsave
exit(1);
}
+$pre_exec
execl("$this", "$this", NULL);
perror("exec $this");
exit(1);
diff --git a/debian/changelog b/debian/changelog
index d04e5ee25..2088b07ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,30 @@
+ikiwiki (2.69) UNRELEASED; urgency=low
+
+ * aggregate: Try to query XML::Feed for the base url when derelevatising
+ links. Since this needs the just released XML::Feed 0.3, as well
+ as a not yet released XML::RSS, it will fall back to the old method
+ if no xml:base info is available.
+ * meta: Plugin is now enabled by default since the basewiki uses it.
+ * txt: Do not encode quotes when filtering the txt, as that broke
+ later parsing of any directives on the page.
+ * Fix the link() pagespec to match links that are internally recorded as
+ absolute.
+ * Add rel=nofollow to recentchanges_links for the same (weak) reasons it
+ was earlier added to edit links.
+ * tag: Normalize tagbase so leading/trailing slashes in it don't break
+ things.
+ * bzr: Fix dates for recentchanges.
+ * Avoid multiple ikiwiki cgi processes piling up, eating all memory,
+ and thrashing, by making the cgi wrapper wait on a cgilock.
+ If you had to set apache's MaxClients low to avoid ikiwiki thrashing your
+ server, you can now turn it up to a high value.
+ * Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up
+ for up to one second. The bailout code is no longer needed after above
+ change.
+ * Remove support for unused optional wait parameter from lockwiki.
+
+ -- Joey Hess <joeyh@debian.org> Thu, 06 Nov 2008 16:01:00 -0500
+
ikiwiki (2.68) unstable; urgency=low
* Add support for checking pushes from untrusted git committers. This can be
@@ -28,8 +55,8 @@ ikiwiki (2.68) unstable; urgency=low
* inline: Only the last feed link was put on the page, fix this to include
all feed links. So rss will be included along with atom, and pages with
multiple feeds will get links added for all feeds.
- * tag: When tagpage is set, force the links created by tagging to point at
- the toplevel tagpage, and not closer subpages. The html links already went
+ * tag: When tagbase is set, force the links created by tagging to point at
+ the toplevel tagbase, and not closer subpages. The html links already went
there, but internally the links were not recorded as absolute, which could
cause confusing backlinks etc.
* Add an inject function, that can be used by plugins that want to
diff --git a/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn
new file mode 100644
index 000000000..62931d8bc
--- /dev/null
+++ b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn
@@ -0,0 +1,5 @@
+[[plugins/meta]] is not enabled by default, yet some pages in the default basewiki include [[the_meta_directive|ikiwiki/directive/meta]], notably the [[ikiwiki]] heirarchy.
+
+This means that the default output of "ikiwiki src dest", for two empty directories src and dest, result in the meta directive being displayed inline with the page text.
+
+> [[done]], meta now enabled by default.
diff --git a/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn
new file mode 100644
index 000000000..fa6e45b47
--- /dev/null
+++ b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn
@@ -0,0 +1,16 @@
+Using bzr, the dates for changes on the RecentChanges page all start
+slightly before the Unix epoch.
+
+Changing line 249 of bzr.pm from
+
+` when => time - str2time($info->{"timestamp"}),`
+
+to
+
+` when => str2time($info->{"timestamp"}),`
+
+fixed this for me.
+
+> Weird, I wonder why it was written to return an absolute time like that
+> in the first place? Can't have ever been right. Fixed, thanks. --[[Joey]]
+> [[done]]
diff --git a/doc/bugs/login_page_should_note_cookie_requirement.mdwn b/doc/bugs/login_page_should_note_cookie_requirement.mdwn
new file mode 100644
index 000000000..e2d5a352b
--- /dev/null
+++ b/doc/bugs/login_page_should_note_cookie_requirement.mdwn
@@ -0,0 +1,17 @@
+At the moment, you go through the login shuffle and then are told that cookies are needed, so you lose all your data and login again. It would be much slicker to note by the edit link, or at least on the login page, that cookies are required.
+
+> Hmm, it seems to me to be fairly obvious, since the vast majority of
+> websites that have a login require cookies. Such warnings used to be
+> common, but few sites bother with them anymore. --[[Joey]]
+
+Even better would be to only display the cookie note as a warning if the login page doesn't receive a session cookie.
+
+> I considered doing this before, but it would require running the cgi once
+> to attempt to set the cookie and then redirecting to the cgi a second
+> time to check if it took, which is both complicated and probably would
+> look bad.
+
+Best of all would be to use URL-based or hidden-field-based session tokens if cookies are not permitted.
+
+> This is not very doable since most of the pages the user browses are
+> static pages in a static location.
diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn
new file mode 100644
index 000000000..e245b84a8
--- /dev/null
+++ b/doc/bugs/messed_up_repository.mdwn
@@ -0,0 +1,21 @@
+I messed up my local clone of my repository.
+
+It appears that there is a special clone, which contains .ikiwiki, local.css, recentchanges, and the like.
+
+How can I create a new version of this clone?
+
+> No, there's the srcdir, which ikiwiki populates with some of those files
+> when run. Notably the .ikiwiki directory and all its contents, and the
+> recentchanges directory and its contents. But not local.css.
+>
+> If you've lost .ikiwiki and it contained user registration info
+> (passwords etc), you've lost that info. Everything else can be
+> regenerated by running `ikiwiki -setup your.setup`
+>
+> If you still have .ikiwiki, but the git clone is messed up somehow, you
+> can just make a new clone and move .ikiwiki into it before running
+> ikiwiki. --[[Joey]]
+
+> > Great, that worked. Thanks Joey!
+
+[[!tag done]]
diff --git a/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn
index d2d5a46ed..22224483e 100644
--- a/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn
+++ b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn
@@ -15,3 +15,5 @@ Here is the header:
[[GNU_Free_Documentation_License|/fdl]]."]]"""]]
--[[tschwinge]]
+
+> [[done]], made it less zealous about encoding html entities. --[[Joey]]
diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn
index a4190945f..684191929 100644
--- a/doc/ikiwiki/markdown.mdwn
+++ b/doc/ikiwiki/markdown.mdwn
@@ -4,9 +4,7 @@ is a minimal markup language that resembles plain text as used in
email messages. It is the markup language used by this wiki by default.
For documentation about the markdown syntax, see [[formatting]] and
-[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A
-[markdown mode](http://jblevins.org/projects/markdown-mode/) for
-emacs can help in editing.
+[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax).
Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part
of the markdown syntax, and are the only bit of markup that this wiki
diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn
index af215a493..3077b4858 100644
--- a/doc/plugins/contrib/po.mdwn
+++ b/doc/plugins/contrib/po.mdwn
@@ -3,9 +3,11 @@ translated with gettext, using [po4a](http://po4a.alioth.debian.org/).
More information:
-* It can be found in [my "po" branch](http://repo.or.cz/w/ikiwiki/intrigeri.git?a=shortlog;h=refs/heads/po): `git clone git://repo.or.cz/ikiwiki/intrigeri.git`
-* It involves adding three hooks to ikiwiki core.
-* It is documented (including TODO and plans for next work steps) in `doc/plugins/po.mdwn`, which can be found in the same branch.
+* It can be found in my "po" branch:
+ `git clone git://gaffer.ptitcanardnoir.org/ikiwiki.git`
+* It is self-contained, *i.e.* it does not modify ikiwiki core at all.
+* It is documented (including TODO and plans for next work steps) in
+ `doc/plugins/po.mdwn`, which can be found in the same branch.
* No public demo site is available so far, I'm working on this.
My plan is to get this plugin clean enough to be included in ikiwiki.
@@ -73,10 +75,86 @@ Any thoughts on this?
>> and could only then translate it, right? I wonder if this will be clear
>> though to the user.
>>
+>>> Right: a broken link points to the URL that allows to create
+>>> a page that can either be a new master page or a non-translatable
+>>> page, depending on `po_translatable_pages` value. The best
+>>> solution I can thing of is to use [[plugins/edittemplate]] to
+>>> insert something like "Warning: this is a master page, that must
+>>> be written in $MASTER_LANGUAGE" into newly created master pages,
+>>> and maybe another warning message on newly created
+>>> non-translatable pages. It seems quite doable to me, but in order
+>>> to avoid breaking existing functionality, it implies to hack a bit
+>>> [[plugins/edittemplate]] so that multiple templates can be
+>>> inserted at page creation time. [[--intrigeri]]
+>>
>> And also, is there any way to start a translation of a page into a new
>> lanauge using the web interface?
->>
+>>
+>>> When a new language is added to `po_slave_languages`, a rebuild is
+>>> triggered, and all missing PO files are created and checked into
+>>> VCS. An unpriviledged wiki user can not add a new language to
+>>> `po_slave_languages`, though. One could think of adding the needed
+>>> interface to translate a page into a yet-unsupported slave
+>>> language, and this would automagically add this new language to
+>>> `po_slave_languages`. It would probably be useful in some
+>>> usecases, but I'm not comfortable with letting unpriviledged wiki
+>>> users change the wiki configuration as a side effect of their
+>>> actions; if this were to be implemented, special care would be
+>>> needed. [[--intrigeri]]
+>>>
+>>>> Actually I meant into any of the currently supported languages.
+>>>> I guess that if the template modification is made, it will list those
+>>>> languages on the page, and if a translation to a language is missing,
+>>>> the link will allow creating it?
+>>>>
+>>>>> Any translation page always exist for every supported slave
+>>>>> language, even if no string at all have been translated yet.
+>>>>> This implies the po plugin is especially friendly to people who
+>>>>> prefer reading in their native language if available, but don't
+>>>>> mind reading in English else.
+>>>>>
+>>>>> While I'm at it, there is a remaining issue that needs to be
+>>>>> sorted out: how painful it could be for non-English speakers
+>>>>> (assuming the master language is English) to be perfectly able
+>>>>> to navigate between translation pages supposed to be written in
+>>>>> their own language, when their translation level is most
+>>>>> often low.
+>>>>>
+>>>>> (It is currently easy to display this status on the translation
+>>>>> page itself, but then it's too late, and how frustrating to load
+>>>>> a page just to realize it's actually not translated enough for
+>>>>> you. The "other languages" loop also allows displaying this
+>>>>> information, but it is generally not the primary
+>>>>> navigation tool.)
+>>>>>
+>>>>> IMHO, this is actually a social problem (i.e. it's no use adding
+>>>>> a language to the supported slave ones if you don't have the
+>>>>> manpower to actually do the translations), that can't be fully
+>>>>> solved by technical solutions, but I can think of some hacks
+>>>>> that would limit the negative impact: a given translation's
+>>>>> status (currently = percent translated) could be displayed next
+>>>>> to the link that leads to it; a color code could as well be used
+>>>>> ("just" a matter of adding a CSS id or class to the links,
+>>>>> depending on this variable). As there is already work to be done
+>>>>> to have the links text generation more customizable through
+>>>>> plugins, I could do both at the same time if we consider this
+>>>>> matter to be important enough. --[[intrigeri]]
+
>> FWIW, I'm tracking your po branch in ikiwiki master git in the po
>> branch. One thing I'd like to try in there is setting up a translated
>> basewiki, which seems like it should be pretty easy to do, and would be
>> a great demo! --[[Joey]]
+>>
+>>> I've merged your changes into my own branch, and made great
+>>> progress on the various todo items. Please note my repository
+>>> location has changed a few days ago, my user page was updated
+>>> accordingly, but I forgot to update this page at the same time.
+>>> Hoping it's not too complicated to relocated an existing remote...
+>>> (never done that, I'm a Git beginner as well as a Perl
+>>> newbie) --[[intrigeri]]
+>>>>
+>>>> Just a matter of editing .git/config, thanks for the heads up.
+>>>>>
+>>>>> Joey, please have a look at my branch, your help would be really
+>>>>> welcome for the security research, as I'm almost done with what
+>>>>> I am able to do myself in this area. --[[intrigeri]]
diff --git a/doc/plugins/format/discussion.mdwn b/doc/plugins/format/discussion.mdwn
new file mode 100644
index 000000000..df8448ed6
--- /dev/null
+++ b/doc/plugins/format/discussion.mdwn
@@ -0,0 +1,15 @@
+Is there any way to tell if an htmlize hook have been called from a format directive?
+
+I am currently modifying the [[contrib/highlightcode]] plugin by [[sabr]] and I wanted to have a different behavior depending on the fact that the htmlize hook is called from a format directive or not. For instance, this could disable the raw copy of the highlighted code. Since I have enabled the keepextension option, I tried to rely on the page extension to decide whenever I have to create the raw file or not but this does not seems a reliable approach.
+
+One possible solution is to add an optional parameter to the htmlize hook (and thus to htmlize function in IkiWiki.pm) which could tell if this is the format directive that called the function but I am not sure that is a good way to do this.
+
+> It's (probably) not just the format directive that has a potential problem here.
+> Imagine a syntax highlighted source code file that contains some other
+> directive, such as table or meta. Such a directive calls `htmlize` on the
+> parameters passed to it.
+>
+> There is one way to detect this ATM. If `%IkiWiki::preprocessing` has
+> anything in it, then ikiwiki is in the middle of handling a preprocessing
+> directive. So you could check that. It's getting into internals, so not
+> ideal.. --[[Joey]]
diff --git a/doc/plugins/goodstuff.mdwn b/doc/plugins/goodstuff.mdwn
index 83b60f4fa..ed57c0f01 100644
--- a/doc/plugins/goodstuff.mdwn
+++ b/doc/plugins/goodstuff.mdwn
@@ -12,7 +12,6 @@ Currently included:
* [[brokenlinks]]
* [[img]]
* [[map]]
-* [[meta]]
* [[more]]
* [[orphans]]
* [[pagecount]]
diff --git a/doc/plugins/meta.mdwn b/doc/plugins/meta.mdwn
index afd554993..e49bdcc50 100644
--- a/doc/plugins/meta.mdwn
+++ b/doc/plugins/meta.mdwn
@@ -1,4 +1,4 @@
-[[!template id=plugin name=meta author="[[Joey]]"]]
+[[!template id=plugin name=meta core=1 author="[[Joey]]"]]
[[!tag type/meta]]
This plugin provides the [[ikiwiki/directive/meta]] [[ikiwiki/directive]],
diff --git a/doc/robots.txt b/doc/robots.txt
new file mode 100644
index 000000000..7be87f9bd
--- /dev/null
+++ b/doc/robots.txt
@@ -0,0 +1,2 @@
+User-Agent: *
+Disallow: /ikiwiki.cgi
diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn
new file mode 100644
index 000000000..6e5f1668a
--- /dev/null
+++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn
@@ -0,0 +1,14 @@
+The u32 page is excellent, but I wonder if documenting the procedure here
+would be worthwhile. Who knows, the remote site might disappear. But also
+there are some variations on the approach that might be useful:
+
+ * using a python script and the dom library to extract the page names from
+ Special:Allpages (such as
+ <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/get_pagenames.py>)
+ * Or, querying the mysql back-end to get the names
+ * using WWW::MediaWiki for importing/exporting pages from the wiki, instead
+ of Special::Export
+
+Also, some detail on converting mediawiki transclusion to ikiwiki inlines...
+
+-- [[JonDowland]]
diff --git a/doc/tips/emacs_syntax_highlighting.mdwn b/doc/tips/emacs_syntax_highlighting.mdwn
new file mode 100644
index 000000000..941cf5415
--- /dev/null
+++ b/doc/tips/emacs_syntax_highlighting.mdwn
@@ -0,0 +1,3 @@
+A [markdown mode](http://jblevins.org/projects/markdown-mode/) for
+emacs can help in editing of ikiwiki
+[[ikiwiki/markdown]] files.
diff --git a/doc/tips/untrusted_git_push/discussion.mdwn b/doc/tips/untrusted_git_push/discussion.mdwn
new file mode 100644
index 000000000..e85625a1b
--- /dev/null
+++ b/doc/tips/untrusted_git_push/discussion.mdwn
@@ -0,0 +1,33 @@
+I've just tried this (commit c1fa07a). Recent changes shows:
+
+<div id="change-c1fa07ad4f165b42c962ba2a310681107f38c4f7" class="metadata">
+<span class="desc"><br />Changed pages:</span>
+<span class="pagelinks">
+
+<a href="http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;h=8bfa3dd7601a09b11ecbd20026849a777dc4b1b9;hp=c6302616f52ec058de5a8f5956fc512149a2f1a3;hb=1ea66c3d3f0a33bc3f04d073457b525a70380c37;f=doc/users/jondowland.mdwn"><img src="/wikiicons/diff.png" alt="diff" /></a><a href="http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjondowland&amp;do=recentchanges_link">users/jondowland</a>
+
+
+</span>
+<span class="desc"><br />Changed by:</span>
+<span class="committer">
+
+<a href="http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjon&amp;do=recentchanges_link">jon</a>
+
+</span>
+<span class="desc"><br />Commit type:</span>
+<span class="committype">git</span>
+<span class="desc"><br />Date:</span>
+<span class="changedate"><span class="relativedate" title="Mon, 10 Nov 2008 18:24:22 -0500">18:24:22 11/10/08</span>
+</div>
+
+Note that the user for the commit is 'jon', and the link points at cgi to
+create users/jon. I was wondering if that is configurable for users pushing
+via git. It would be nice perhaps to specify it in some way, perhaps via a
+git-config setting (user.name?). I'm not too familiar with exactly what the
+changeset contains. -- [[JonDowland]]
+
+> All ikiwiki can do it look at who git has recorded as the author of
+> the change (and it looks at the username part of the email address).
+> You can set `user.email` in `.git/config`. --[[Joey]]
+
+> > Ah, excellent. In which case this *should* DTRT... -- [[JonDowland]]
diff --git a/doc/tips/vim_syntax_highlighting.mdwn b/doc/tips/vim_syntax_highlighting.mdwn
index 453efa8d1..172b763c3 100644
--- a/doc/tips/vim_syntax_highlighting.mdwn
+++ b/doc/tips/vim_syntax_highlighting.mdwn
@@ -1,2 +1,4 @@
-[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki. Installation
-instructions are at the top of the file.
+[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki
+[[ikiwiki/markdown]] files.
+
+Installation instructions are at the top of the file.
diff --git a/doc/tips/vim_syntax_highlighting/discussion.mdwn b/doc/tips/vim_syntax_highlighting/discussion.mdwn
index b1637e758..038854b9f 100644
--- a/doc/tips/vim_syntax_highlighting/discussion.mdwn
+++ b/doc/tips/vim_syntax_highlighting/discussion.mdwn
@@ -1 +1,8 @@
I'm going to look at merging this with potwiki.vim (a vim-based personal wiki) so that you can follow wiki-links and auto-create pages etc., direct from vim. (I'm writing this incase I don't get around to it) -- [[JonDowland]]
+
+----
+
+Another attempt at the same thing is here:
+<http://plasticboy.com/markdown-vim-mode/>
+
+In my tests, [[ikiwiki.vim]] works better than that one, YMMV. --[[Joey]]
diff --git a/doc/todo/avoid_thrashing.mdwn b/doc/todo/avoid_thrashing.mdwn
new file mode 100644
index 000000000..45b11d872
--- /dev/null
+++ b/doc/todo/avoid_thrashing.mdwn
@@ -0,0 +1,22 @@
+Problem: Suppose a server has 256 mb ram. Each ikiwiki process needs about
+15 mb, before it's loaded the index. (And maybe 25 after, but only one such
+process runs at any time). That allows for about 16 ikiwiki processes to
+run concurrently on a server, before it starts to swap. Of course, anything
+else that runs on the server and eats memory will affect this.
+
+One could just set `MaxClients 16` in the apache config, but then it's also
+limited to 16 clients serving static pages, which is silly. Also, 16 is
+optimistic -- 8 might be a saner choice. And then, what if something on the
+server decides to eat a lot of memory? Ikiwiki can again overflow memory
+and thrash.
+
+It occurred to me that the ikiwiki cgi wrapper could instead do locking of
+its own (say of `.ikiwiki/cgilock`). The wrapper only needs a few kb to
+run, and it starts *fast*. So hundreds could be running waiting for a lock
+with no ill effects. Crank `MaxClients` up to 256? No problem..
+
+And there's no real reason to allow more than one ikiwiki cgi to run at a
+time. Since almost all uses of the CGI lock the index, only one can really
+be doing anything at a time. --[[Joey]]
+
+[[done]]
diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn
index 97526bae6..2bdeb62be 100644
--- a/doc/todo/syntax_highlighting.mdwn
+++ b/doc/todo/syntax_highlighting.mdwn
@@ -23,7 +23,7 @@ pages, as well as doing syntax highlighting as a preprocessor directive
* [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]]
also uses src-highlight, and operates on whole source files.
Updated to work with the fix for [[bugs/multiple_pages_with_same_name]]. Untested with files with no extension, e.g. `Makefile`.
-* [[user/jrblevin]]'s code plugin uses src-highlight, and supports both
+* [[users/jasonblevins]]'s code plugin uses src-highlight, and supports both
while file and directive use.
## General problems
diff --git a/doc/users/Edward_Betts.mdwn b/doc/users/Edward_Betts.mdwn
index 0d4483fa8..b32927a1c 100644
--- a/doc/users/Edward_Betts.mdwn
+++ b/doc/users/Edward_Betts.mdwn
@@ -3,5 +3,7 @@ My watchlist:
[[!inline archive="yes" sort="mtime" atom="yes" pages="
todo/allow_wiki_syntax_in_commit_messages*
todo/shortcut_with_different_link_text*
-todo/structured_page_data* "]]
+todo/structured_page_data*
+tips/convert_mediawiki_to_ikiwiki*
+"]]
diff --git a/doc/users/jondowland.mdwn b/doc/users/jondowland.mdwn
index c6302616f..8bfa3dd76 100644
--- a/doc/users/jondowland.mdwn
+++ b/doc/users/jondowland.mdwn
@@ -1,5 +1,13 @@
-A new ikiwiki user, looking at ikiwiki both for his personal site but also as a team-documentation management system for a small-sized group of UNIX sysadmins.
+I'm looking at ikiwiki both for my personal site but also as a
+team-documentation management system for a small-sized group of UNIX
+sysadmins.
* My [homepage](http://jmtd.net/) is powered by ikiwiki (replacing my [older homepage](http://alcopop.org/), which was a mess of scripts)
-I am giving a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual [Linux conference](http://www.ukuug.org/events/linux2008/) about organising system administrator documentation which will feature IkiWiki.
+I gave a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual
+[Linux conference](http://www.ukuug.org/events/linux2008/) about organising
+system administrator documentation. Roughly a third of this talk was
+discussing IkiWiki in some technical detail and suggesting it as a good piece
+of software for this task.
+
+ * slides at <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/>.
diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot
index 5db0c51af..8cf3853e0 100644
--- a/po/ikiwiki.pot
+++ b/po/ikiwiki.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-11-03 16:31-0500\n"
+"POT-Creation-Date: 2008-11-11 15:36-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -48,7 +48,7 @@ msgstr ""
msgid "You are banned."
msgstr ""
-#: ../IkiWiki/CGI.pm:385 ../IkiWiki/CGI.pm:386 ../IkiWiki.pm:1182
+#: ../IkiWiki/CGI.pm:385 ../IkiWiki/CGI.pm:386 ../IkiWiki.pm:1189
msgid "Error"
msgstr ""
@@ -120,7 +120,7 @@ msgstr ""
msgid "feed crashed XML::Feed!"
msgstr ""
-#: ../IkiWiki/Plugin/aggregate.pm:590
+#: ../IkiWiki/Plugin/aggregate.pm:591
#, perl-format
msgid "creating new page %s"
msgstr ""
@@ -910,19 +910,19 @@ msgstr ""
#. translators: The first parameter is a filename, and the second is
#. translators: a (probably not translated) error message.
-#: ../IkiWiki/Wrapper.pm:79
+#: ../IkiWiki/Wrapper.pm:93
#, perl-format
msgid "failed to write %s: %s"
msgstr ""
#. translators: The parameter is a C filename.
-#: ../IkiWiki/Wrapper.pm:135
+#: ../IkiWiki/Wrapper.pm:150
#, perl-format
msgid "failed to compile %s"
msgstr ""
#. translators: The parameter is a filename.
-#: ../IkiWiki/Wrapper.pm:155
+#: ../IkiWiki/Wrapper.pm:170
#, perl-format
msgid "successfully generated %s"
msgstr ""
@@ -951,25 +951,25 @@ msgstr ""
msgid "refreshing wiki.."
msgstr ""
-#: ../IkiWiki.pm:466
+#: ../IkiWiki.pm:473
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
-#: ../IkiWiki.pm:512
+#: ../IkiWiki.pm:519
msgid "cannot use multiple rcs plugins"
msgstr ""
-#: ../IkiWiki.pm:541
+#: ../IkiWiki.pm:548
#, perl-format
msgid "failed to load external plugin needed for %s plugin: %s"
msgstr ""
-#: ../IkiWiki.pm:1165
+#: ../IkiWiki.pm:1172
#, perl-format
msgid "preprocessing loop detected on %s at depth %i"
msgstr ""
-#: ../IkiWiki.pm:1678
+#: ../IkiWiki.pm:1672
msgid "yes"
msgstr ""
diff --git a/t/pagespec_match.t b/t/pagespec_match.t
index c61d16122..7c0ac235b 100755
--- a/t/pagespec_match.t
+++ b/t/pagespec_match.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 56;
+use Test::More tests => 58;
BEGIN { use_ok("IkiWiki"); }
@@ -40,6 +40,7 @@ $links{"bugs/bar"}=[qw{done}];
$links{"done"}=[];
$links{"examples/softwaresite/bugs/fails_to_frobnicate"}=[qw{done}];
$links{"examples/softwaresite/bugs/done"}=[];
+$links{"ook"}=[qw{/blog/tags/foo}];
ok(pagespec_match("foo", "link(bar)"), "link");
ok(pagespec_match("foo", "link(ba?)"), "glob link");
@@ -55,6 +56,8 @@ ok(pagespec_match("bar", "backlink(foo)"), "backlink");
ok(! pagespec_match("quux", "backlink(foo)"), "failed backlink");
ok(! pagespec_match("bar", ""), "empty pagespec should match nothing");
ok(! pagespec_match("bar", " "), "blank pagespec should match nothing");
+ok(pagespec_match("ook", "link(blog/tags/foo)"), "link internal absolute success");
+ok(pagespec_match("ook", "link(/blog/tags/foo)"), "link explicit absolute success");
$IkiWiki::pagectime{foo}=1154532692; # Wed Aug 2 11:26 EDT 2006
$IkiWiki::pagectime{bar}=1154532695; # after
diff --git a/templates/change.tmpl b/templates/change.tmpl
index 61a54fded..0aebae61e 100644
--- a/templates/change.tmpl
+++ b/templates/change.tmpl
@@ -19,7 +19,7 @@
<span class="desc"><br />Changed by:</span>
<span class="committer">
<TMPL_IF NAME="AUTHORURL">
-<a href="<TMPL_VAR AUTHORURL>"><TMPL_VAR USER></a>
+<a href="<TMPL_VAR AUTHORURL>" rel="nofollow"><TMPL_VAR USER></a>
<TMPL_ELSE>
<TMPL_VAR USER>
</TMPL_IF>