]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'ready/tag-test' into transient-tag
authorSimon McVittie <smcv@debian.org>
Fri, 7 Jan 2011 20:09:09 +0000 (20:09 +0000)
committerSimon McVittie <smcv@debian.org>
Fri, 7 Jan 2011 20:09:09 +0000 (20:09 +0000)
53 files changed:
IkiWiki.pm
IkiWiki/CGI.pm
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/bzr.pm
IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/cvs.pm
IkiWiki/Plugin/darcs.pm
IkiWiki/Plugin/editpage.pm
IkiWiki/Plugin/getsource.pm
IkiWiki/Plugin/git.pm
IkiWiki/Plugin/goto.pm
IkiWiki/Plugin/highlight.pm
IkiWiki/Plugin/mercurial.pm
IkiWiki/Plugin/meta.pm
IkiWiki/Plugin/monotone.pm
IkiWiki/Plugin/norcs.pm
IkiWiki/Plugin/openid.pm
IkiWiki/Plugin/recentchanges.pm
IkiWiki/Plugin/recentchangesdiff.pm
IkiWiki/Plugin/search.pm
IkiWiki/Plugin/svn.pm
IkiWiki/Plugin/tag.pm
IkiWiki/Plugin/transient.pm [new file with mode: 0644]
IkiWiki/Plugin/websetup.pm
IkiWiki/Wrapper.pm
debian/changelog
doc/bugs/default__95__pageext_not_working.mdwn [new file with mode: 0644]
doc/bugs/preview_base_url_should_be_absolute.mdwn [new file with mode: 0644]
doc/bugs/tag_behavior_changes_introduced_by_typed_link_feature.mdwn [new file with mode: 0644]
doc/examples/blog/posts/ugachaka/discussion.mdwn [new file with mode: 0644]
doc/forum/Flowplayer.mdwn [new file with mode: 0644]
doc/forum/ikiwiki_+_mathjax/comment_1_8426a985ecfbb02d364116503ef3a0d4._comment [new file with mode: 0644]
doc/news/version_3.20100926.mdwn [deleted file]
doc/news/version_3.20101019.mdwn [deleted file]
doc/news/version_3.20101023.mdwn [deleted file]
doc/news/version_3.20101231.mdwn [new file with mode: 0644]
doc/news/version_3.20110105.mdwn [new file with mode: 0644]
doc/plugins/calendar/discussion.mdwn
doc/plugins/contrib/transient.mdwn
doc/plugins/write.mdwn
doc/sandbox.mdwn
doc/setup/discussion.mdwn
doc/todo/auto-create_tag_pages_according_to_a_template.mdwn
doc/todo/autoindex_should_use_add__95__autofile.mdwn
doc/todo/feed_enhancements_for_inline_pages.mdwn [new file with mode: 0644]
doc/todo/generic_insert_links.mdwn [moved from doc/todo/generic_insert_links with 100% similarity]
doc/todo/support_includes_in_setup_files.mdwn [new file with mode: 0644]
doc/todo/transient_pages.mdwn
doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn
doc/users/jasonriedy.mdwn [new file with mode: 0644]
ikiwiki.spec
po/ikiwiki.pot

index bbe1ad055b2935437c9d0ee6ccf76f8f51d6bf3d..799236f35fc2e26cbbfa8a84abb711b53bffc809 100644 (file)
@@ -1068,6 +1068,16 @@ sub baseurl (;$) {
        return $page;
 }
 
+sub urlabs ($$) {
+       my $url=shift;
+       my $urlbase=shift;
+
+       return $url unless defined $urlbase && length $urlbase;
+
+       eval q{use URI};
+       URI->new_abs($url, $urlbase)->as_string;
+}
+
 sub abs2rel ($$) {
        # Work around very innefficient behavior in File::Spec if abs2rel
        # is passed two relative paths. It's much faster if paths are
@@ -1906,39 +1916,6 @@ sub template ($;@) {
        template_depends(shift, undef, @_);
 }
 
-sub misctemplate ($$;@) {
-       my $title=shift;
-       my $content=shift;
-       my %params=@_;
-       
-       my $template=template("page.tmpl");
-
-       my $page="";
-       if (exists $params{page}) {
-               $page=delete $params{page};
-       }
-       run_hooks(pagetemplate => sub {
-               shift->(
-                       page => $page,
-                       destpage => $page,
-                       template => $template,
-               );
-       });
-       templateactions($template, "");
-
-       $template->param(
-               dynamic => 1,
-               title => $title,
-               wikiname => $config{wikiname},
-               content => $content,
-               baseurl => baseurl(),
-               html5 => $config{html5},
-               %params,
-       );
-       
-       return $template->output;
-}
-
 sub templateactions ($$) {
        my $template=shift;
        my $page=shift;
@@ -2033,7 +2010,7 @@ sub rcs_recentchanges ($) {
        $hooks{rcs}{rcs_recentchanges}{call}->(@_);
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        $hooks{rcs}{rcs_diff}{call}->(@_);
 }
 
index ede194ff9aee945dc0fb471bedaa47bf93eda829..f8617bfc63ca63f51a8f51c135c96641947faf7d 100644 (file)
@@ -46,13 +46,51 @@ sub showform ($$$$;@) {
        my $cgi=shift;
 
        printheader($session);
-       print misctemplate($form->title, $form->render(submit => $buttons), @_);
+       print cgitemplate($cgi, $form->title,
+               $form->render(submit => $buttons), @_);
+}
+
+sub cgitemplate ($$$;@) {
+       my $cgi=shift;
+       my $title=shift;
+       my $content=shift;
+       my %params=@_;
+       
+       my $template=template("page.tmpl");
+
+       my $topurl = defined $cgi ? $cgi->url : $config{url};
+
+       my $page="";
+       if (exists $params{page}) {
+               $page=delete $params{page};
+               $params{forcebaseurl}=urlabs(urlto($page), $topurl);
+       }
+       run_hooks(pagetemplate => sub {
+               shift->(
+                       page => $page,
+                       destpage => $page,
+                       template => $template,
+               );
+       });
+       templateactions($template, "");
+
+       $template->param(
+               dynamic => 1,
+               title => $title,
+               wikiname => $config{wikiname},
+               content => $content,
+               baseurl => urlabs(urlto(""), $topurl),
+               html5 => $config{html5},
+               %params,
+       );
+       
+       return $template->output;
 }
 
 sub redirect ($$) {
        my $q=shift;
        eval q{use URI};
-       my $url=URI->new(shift);
+       my $url=URI->new(urlabs(shift, $q->url));
        if (! $config{w3mmode}) {
                print $q->redirect($url);
        }
@@ -423,7 +461,7 @@ sub cgierror ($) {
        my $message=shift;
 
        print "Content-type: text/html\n\n";
-       print misctemplate(gettext("Error"),
+       print cgitemplate(undef, gettext("Error"),
                "<p class=\"error\">".gettext("Error").": $message</p>");
        die $@;
 }
index 9b70e5df053731866c5ad7a494432e6e0b72b4bc..59185e97ffdd43eb283fbbf2d454cbbb40b3d894 100644 (file)
@@ -8,7 +8,6 @@ use IkiWiki 3.00;
 use HTML::Parser;
 use HTML::Tagset;
 use HTML::Entities;
-use URI;
 use open qw{:utf8 :std};
 
 my %feeds;
@@ -660,7 +659,7 @@ sub add_page (@) {
        $template->param(url => $feed->{url});
        $template->param(copyright => $params{copyright})
                if defined $params{copyright} && length $params{copyright};
-       $template->param(permalink => urlabs($params{link}, $feed->{feedurl}))
+       $template->param(permalink => IkiWiki::urlabs($params{link}, $feed->{feedurl}))
                if defined $params{link};
        if (ref $feed->{tags}) {
                $template->param(tags => [map { tag => $_ }, @{$feed->{tags}}]);
@@ -688,13 +687,6 @@ sub wikiescape ($) {
        return encode_entities(shift, '\[\]');
 }
 
-sub urlabs ($$) {
-       my $url=shift;
-       my $urlbase=shift;
-
-       URI->new_abs($url, $urlbase)->as_string;
-}
-
 sub htmlabs ($$) {
        # Convert links in html from relative to absolute.
        # Note that this is a heuristic, which is not specified by the rss
@@ -720,7 +712,7 @@ sub htmlabs ($$) {
                                next unless $v_offset; # 0 v_offset means no value
                                my $v = substr($text, $v_offset, $v_len);
                                $v =~ s/^([\'\"])(.*)\1$/$2/;
-                               my $new_v=urlabs($v, $urlbase);
+                               my $new_v=IkiWiki::urlabs($v, $urlbase);
                                $new_v =~ s/\"/&quot;/g; # since we quote with ""
                                substr($text, $v_offset, $v_len) = qq("$new_v");
                        }
index bd93d37187454bf4168a9b632b2f1f7acc4d99d1..647a671a518b9b9c4cdafbffc7675da661c8a0b6 100644 (file)
@@ -92,7 +92,7 @@ sub formbuilder_setup (@) {
                # Add the toggle javascript; the attachments interface uses
                # it to toggle visibility.
                require IkiWiki::Plugin::toggle;
-               $form->tmpl_param("javascript" => IkiWiki::Plugin::toggle::include_javascript($params{page}, 1));
+               $form->tmpl_param("javascript" => IkiWiki::Plugin::toggle::include_javascript($params{page}));
                # Start with the attachments interface toggled invisible,
                # but if it was used, keep it open.
                if ($form->submitted ne "Upload Attachment" &&
index 562d5d3893fcf5c2c0c6ba0b82e574c362f36891..3bc4ea8dd69b1d67329ec1db81bdd2e4ac9d19cf 100644 (file)
@@ -271,8 +271,9 @@ sub rcs_recentchanges ($) {
        return @ret;
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        my $taintedrev=shift;
+       my $maxlines=shift;
        my ($rev) = $taintedrev =~ /^(\d+(\.\d+)*)$/; # untaint
 
        my $prevspec = "before:" . $rev;
@@ -281,8 +282,11 @@ sub rcs_diff ($) {
                "--new", $config{srcdir},
                "-r", $prevspec . ".." . $revspec);
        open (my $out, "@cmdline |");
-
-       my @lines = <$out>;
+       my @lines;
+       while (my $line=<$out>) {
+               last if defined $maxlines && @lines == $maxlines;
+               push @lines, $line;
+       }
        if (wantarray) {
                return @lines;
        }
index 63e9ab499bde535b1b5524219f22e8cf8d131e63..1287590a77ecb833a8a80f2b4d5a48ec12de971e 100644 (file)
@@ -372,8 +372,6 @@ sub editcomment ($$) {
                error(gettext("bad page name"));
        }
 
-       my $baseurl = urlto($page);
-
        $form->title(sprintf(gettext("commenting on %s"),
                        IkiWiki::pagetitle(IkiWiki::basename($page))));
 
@@ -385,7 +383,7 @@ sub editcomment ($$) {
 
        if ($form->submitted eq CANCEL) {
                # bounce back to the page they wanted to comment on, and exit.
-               IkiWiki::redirect($cgi, $baseurl);
+               IkiWiki::redirect($cgi, urlto($page));
                exit;
        }
 
@@ -506,7 +504,7 @@ sub editcomment ($$) {
                        IkiWiki::saveindex();
 
                        IkiWiki::printheader($session);
-                       print IkiWiki::misctemplate(gettext(gettext("comment stored for moderation")),
+                       print IkiWiki::cgitemplate($cgi, gettext(gettext("comment stored for moderation")),
                                "<p>".
                                gettext("Your comment will be posted after moderator review").
                                "</p>");
@@ -556,8 +554,8 @@ sub editcomment ($$) {
 
        }
        else {
-               IkiWiki::showform ($form, \@buttons, $session, $cgi,
-                       forcebaseurl => $baseurl, page => $page);
+               IkiWiki::showform($form, \@buttons, $session, $cgi,
+                       page => $page);
        }
 
        exit;
@@ -662,7 +660,7 @@ sub commentmoderation ($$) {
        IkiWiki::run_hooks(format => sub {
                $out = shift->(page => "", content => $out);
        });
-       print IkiWiki::misctemplate(gettext("comment moderation"), $out);
+       print IkiWiki::cgitemplate($cgi, gettext("comment moderation"), $out);
        exit;
 }
 
index 4972efb5838724bf58bf722b96b591b34c9b6a28..71566d212ba71ea3b8c2296ffeb46c0101bea92d 100644 (file)
@@ -436,8 +436,9 @@ sub rcs_recentchanges ($) {
        return @ret;
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        my $rev=IkiWiki::possibly_foolish_untaint(int(shift));
+       my $maxlines=shift;
 
        local $CWD = $config{srcdir};
 
index 0f63b8807902fbd0d3f2478b1a2c66cbf6066e24..cd4fcd0fff438b250e7dd059d0e8eaa05be95bcf 100644 (file)
@@ -373,11 +373,13 @@ sub rcs_recentchanges ($) {
        return @ret;
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        my $rev=shift;
+       my $maxlines=shift;
        my @lines;
        foreach my $line (silentsystem("darcs", "diff", "--match", "hash ".$rev)) {
                if (@lines || $line=~/^diff/) {
+                       last if defined $maxlines && @lines == $maxlines;
                        push @lines, $line."\n";
                }
        }
index 537b86ad1d12c1c507d2710a237051b7d4e3c91a..df29bcc98d5ba95663b57a6c252fd6a2432e0627 100644 (file)
@@ -312,8 +312,7 @@ sub cgi_editpage ($$) {
                        $form->title(sprintf(gettext("editing %s"), pagetitle(basename($page))));
                }
                
-               showform($form, \@buttons, $session, $q,
-                       forcebaseurl => $baseurl, page => $page);
+               showform($form, \@buttons, $session, $q, page => $page);
        }
        else {
                # save page
@@ -331,7 +330,7 @@ sub cgi_editpage ($$) {
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                               page => $page);
                        exit;
                }
                elsif ($form->field("do") eq "create" && $exists) {
@@ -346,7 +345,7 @@ sub cgi_editpage ($$) {
                                         "\n\n\n".$form->field("editcontent"),
                                force => 1);
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                               page => $page);
                        exit;
                }
                        
@@ -387,7 +386,7 @@ sub cgi_editpage ($$) {
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                               page => $page);
                        exit;
                }
                
@@ -429,7 +428,7 @@ sub cgi_editpage ($$) {
                        $form->field(name => "type", type => 'hidden');
                        $form->title(sprintf(gettext("editing %s"), $page));
                        showform($form, \@buttons, $session, $q,
-                               forcebaseurl => $baseurl, page => $page);
+                               page => $page);
                }
                else {
                        # The trailing question mark tries to avoid broken
index b362de7264175d9468c4207dcacf9153ade356a5..0a21413bdb9f9cdd591c93cf1785a3e4993d556e 100644 (file)
@@ -61,7 +61,7 @@ sub cgi_getsource ($) {
                IkiWiki::cgi_custom_failure(
                        $cgi,
                        "404 Not Found",
-                       IkiWiki::misctemplate(gettext("missing page"),
+                       IkiWiki::cgitemplate($cgi, gettext("missing page"),
                                "<p>".
                                sprintf(gettext("The page %s does not exist."),
                                        htmllink("", "", $page)).
@@ -72,7 +72,7 @@ sub cgi_getsource ($) {
        if (! defined pagetype($pagesources{$page})) {
                IkiWiki::cgi_custom_failure(
                        $cgi->header(-status => "403 Forbidden"),
-                       IkiWiki::misctemplate(gettext("not a page"),
+                       IkiWiki::cgitemplate($cgi, gettext("not a page"),
                                "<p>".
                                sprintf(gettext("%s is an attachment, not a page."),
                                        htmllink("", "", $page)).
index 3db4af7291b0d11dcdf8bc89386b93133c963e10..cf7fbe9b7c43ee53180612d0411e6202074fb9e0 100644 (file)
@@ -152,10 +152,11 @@ sub genwrapper {
 }
 
 sub safe_git (&@) {
-       # Start a child process safely without resorting /bin/sh.
-       # Return command output or success state (in scalar context).
+       # Start a child process safely without resorting to /bin/sh.
+       # Returns command output (in list content) or success state
+       # (in scalar context), or runs the specified data handler.
 
-       my ($error_handler, @cmdline) = @_;
+       my ($error_handler, $data_handler, @cmdline) = @_;
 
        my $pid = open my $OUT, "-|";
 
@@ -187,7 +188,12 @@ sub safe_git (&@) {
 
                chomp;
 
-               push @lines, $_;
+               if (! defined $data_handler) {
+                       push @lines, $_;
+               }
+               else {
+                       last unless $data_handler->($_);
+               }
        }
 
        close $OUT;
@@ -197,9 +203,9 @@ sub safe_git (&@) {
        return wantarray ? @lines : ($? == 0);
 }
 # Convenient wrappers.
-sub run_or_die ($@) { safe_git(\&error, @_) }
-sub run_or_cry ($@) { safe_git(sub { warn @_ },  @_) }
-sub run_or_non ($@) { safe_git(undef,            @_) }
+sub run_or_die ($@) { safe_git(\&error, undef, @_) }
+sub run_or_cry ($@) { safe_git(sub { warn @_ }, undef, @_) }
+sub run_or_non ($@) { safe_git(undef, undef, @_) }
 
 
 sub merge_past ($$$) {
@@ -663,15 +669,19 @@ sub rcs_recentchanges ($) {
        return @rets;
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        my $rev=shift;
+       my $maxlines=shift;
        my ($sha1) = $rev =~ /^($sha1_pattern)$/; # untaint
        my @lines;
-       foreach my $line (run_or_non("git", "show", $sha1)) {
-               if (@lines || $line=~/^diff --git/) {
-                       push @lines, $line."\n";
-               }
-       }
+       my $addlines=sub {
+               my $line=shift;
+               return if defined $maxlines && @lines == $maxlines;
+               push @lines, $line."\n"
+                       if (@lines || $line=~/^diff --git/);
+               return 1;
+       };
+       safe_git(undef, $addlines, "git", "show", $sha1);
        if (wantarray) {
                return @lines;
        }
@@ -850,9 +860,8 @@ sub rcs_preprevert ($) {
        # in order to see all changes.
        my ($subdir, $rootdir) = git_find_root();
        $git_dir=$rootdir;
-       my @commits=git_commit_info($sha1, 1);
-       $git_dir=undef;
 
+       my @commits=git_commit_info($sha1, 1);
        if (! @commits) {
                error "unknown commit"; # just in case
        }
@@ -863,7 +872,10 @@ sub rcs_preprevert ($) {
                error gettext("you are not allowed to revert a merge");
        }
 
-       return git_parse_changes(@commits);
+       my @ret=git_parse_changes(@commits);
+
+       $git_dir=undef;
+       return @ret;
 }
 
 sub rcs_revert ($) {
index 0eb83fc208de611d05a016ff8fc63c2c6913f1c8..6b596ac8b6af95641dec071071e5be38b3898f87 100644 (file)
@@ -56,7 +56,7 @@ sub cgi_goto ($;$) {
                IkiWiki::cgi_custom_failure(
                        $q,
                        "404 Not Found",
-                       IkiWiki::misctemplate(gettext("missing page"),
+                       IkiWiki::cgitemplate($q, gettext("missing page"),
                                "<p>".
                                sprintf(gettext("The page %s does not exist."),
                                        htmllink("", "", $page)).
index 9d05e9fcf49126c7d1f97d815e6c3435a82cd83a..65e372db1336dbdedd6f1c5e256d4ef3b953aa2a 100644 (file)
@@ -1,11 +1,17 @@
 #!/usr/bin/perl
 package IkiWiki::Plugin::highlight;
 
+# This has been tested with highlight 2.16 and highlight 3.2+svn19.
+# In particular version 3.2 won't work. It detects the different
+# versions by the presence of the the highlight::DataDir class.
+
 use warnings;
 use strict;
 use IkiWiki 3.00;
 use Encode;
 
+my $data_dir;
+
 sub import {
        hook(type => "getsetup", id => "highlight",  call => \&getsetup);
        hook(type => "checkconfig", id => "highlight", call => \&checkconfig);
@@ -45,13 +51,31 @@ sub getsetup () {
 }
 
 sub checkconfig () {
+
+       eval q{use highlight};
+       if ($@) {
+               print STDERR "Failed to load highlight. Configuring anyway.\n";
+       };
+
+       if (highlight::DataDir->can('new')){
+               $data_dir=new highlight::DataDir();
+               $data_dir->searchDataDir("");
+       } else {
+               $data_dir=undef;
+       }
+
        if (! exists $config{filetypes_conf}) {
-               $config{filetypes_conf}="/etc/highlight/filetypes.conf";
+               $config{filetypes_conf}= 
+                    ($data_dir ? $data_dir->getConfDir() : "/etc/highlight/")
+                         . "filetypes.conf";
        }
        if (! exists $config{langdefdir}) {
-               $config{langdefdir}="/usr/share/highlight/langDefs";
+               $config{langdefdir}=
+                    ($data_dir ? $data_dir->getLangPath("")
+                     : "/usr/share/highlight/langDefs");
+
        }
-       if (exists $config{tohighlight}) {
+       if (exists $config{tohighlight} && read_filetypes()) {
                foreach my $file (split ' ', $config{tohighlight}) {
                        my @opts = $file=~s/^\.// ?
                                (keepextension => 1) :
@@ -96,7 +120,12 @@ my %highlighters;
 
 # Parse highlight's config file to get extension => language mappings.
 sub read_filetypes () {
-       open (my $f, $config{filetypes_conf}) || error("$config{filetypes_conf}: $!");
+       my $f;
+       if (!open($f, $config{filetypes_conf})) {
+               warn($config{filetypes_conf}.": ".$!);
+               return 0;
+       };
+
        local $/=undef;
        my $config=<$f>;
        close $f;
@@ -119,7 +148,7 @@ sub read_filetypes () {
                }
        }
 
-       $filetypes_read=1;
+       return $filetypes_read=1;
 }
 
 
@@ -158,11 +187,17 @@ sub highlight ($$) {
 
        my $gen;
        if (! exists $highlighters{$langfile}) {
-               $gen = highlightc::CodeGenerator_getInstance($highlightc::XHTML);
+               $gen = highlight::CodeGenerator::getInstance($highlight::XHTML);
                $gen->setFragmentCode(1); # generate html fragment
                $gen->setHTMLEnclosePreTag(1); # include stylish <pre>
-               $gen->initTheme("/dev/null"); # theme is not needed because CSS is not emitted
-               $gen->initLanguage($langfile); # must come after initTheme
+               if ($data_dir){
+                       # new style, requires a real theme, but has no effect
+                       $gen->initTheme($data_dir->getThemePath("seashell.theme"));
+               } else {
+                       # old style, anything works.
+                       $gen->initTheme("/dev/null");
+               }
+               $gen->loadLanguage($langfile); # must come after initTheme
                $gen->setEncoding("utf-8");
                $highlighters{$langfile}=$gen;
        }
index 59dc63b4e994511e2d0c67893fb91f7dc098b36d..d7399eaf0be208730651cf55e9ba01b29979aede 100644 (file)
@@ -229,7 +229,7 @@ sub rcs_recentchanges ($) {
        return @ret;
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        # TODO
 }
 
index abc8f1b1aa1089f60ba62e93dbcca0062696f4f6..ad6d1a8e338895685be79486c5b4dac95f9c21b9 100644 (file)
@@ -298,6 +298,11 @@ sub pagetemplate (@) {
                        if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
        }
 
+       foreach my $field (qw{permalink}) {
+               $template->param($field => IkiWiki::urlabs($pagestate{$page}{meta}{$field}, $config{url}))
+                       if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
+       }
+
        foreach my $field (qw{description}) {
                $template->param($field => HTML::Entities::encode_numeric($pagestate{$page}{meta}{$field}))
                        if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
index 75bf2f458a48e461eadb91c44ffb9d21e89260c4..38313a542aff9bd231b036ae3d47367f55289578 100644 (file)
@@ -42,7 +42,7 @@ sub checkconfig () {
 
        my $version=undef;
        while (<MTN>) {
-               if (/^monotone (\d+\.\d+) /) {
+               if (/^monotone (\d+\.\d+)(?:(?:\.\d+){0,2}|dev)? /) {
                        $version=$1;
                }
        }
@@ -621,8 +621,9 @@ sub rcs_recentchanges ($) {
        return @ret;
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        my $rev=shift;
+       my $maxlines=shift;
        my ($sha1) = $rev =~ /^($sha1_pattern)$/; # untaint
        
        chdir $config{srcdir}
@@ -633,7 +634,11 @@ sub rcs_diff ($) {
                exec("mtn", "diff", "--root=$config{mtnrootdir}", "-r", "p:".$sha1, "-r", $sha1) || error("mtn diff $sha1 failed to run");
        }
 
-       my (@lines) = <MTNDIFF>;
+       my @lines;
+       while (my $line=<MTNDIFF>) {
+               last if defined $maxlines && @lines == $maxlines;
+               push @lines, $line;
+       }
 
        close MTNDIFF || debug("mtn diff $sha1 exited $?");
 
index a3bb6240ef3024e2f33b855137a79083936b4e42..6fa8bfa3adc8e49f61a4abf42941452f57eb0fb8 100644 (file)
@@ -58,7 +58,7 @@ sub rcs_rename ($$) {
 sub rcs_recentchanges ($) {
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
 }
 
 sub rcs_getctime ($) {
index ce0990e40442ea63d762ac20ddcd3e1ed0420c38..bd67384f21a91477239df3c48c598cf837ea09b6 100644 (file)
@@ -84,7 +84,7 @@ sub openid_selector {
        );
 
        IkiWiki::printheader($session);
-       print IkiWiki::misctemplate("signin", $template->output);
+       print IkiWiki::cgitemplate($q, "signin", $template->output);
        exit;
 }
 
index 6fccd16f6df6c72590863626042166abaca5f51c..d6292c3f20f51af905e8f7e0e961baac9b5818d3 100644 (file)
@@ -121,7 +121,7 @@ sub sessioncgi ($$) {
        }
        elsif ($form->submitted ne 'Cancel') {
                $form->title(sprintf(gettext("confirm reversion of %s"), $rev));
-               $form->tmpl_param(diff => encode_entities(scalar IkiWiki::rcs_diff($rev)));
+               $form->tmpl_param(diff => encode_entities(scalar IkiWiki::rcs_diff($rev, 200)));
                $form->field(name => "rev", type => "hidden", value => $rev, force => 1);
                IkiWiki::showform($form, $buttons, $session, $q);
                exit 0;
@@ -178,7 +178,6 @@ sub store ($$$) {
                        else {
                                $_->{link} = pagetitle($_->{page});
                        }
-                       $_->{baseurl}=IkiWiki::baseurl(undef) if length $config{url};
 
                        $_;
                } @{$change->{pages}}
@@ -226,7 +225,7 @@ sub store ($$$) {
                wikiname => $config{wikiname},
        );
        
-       $template->param(permalink => urlto($config{recentchangespage}, undef)."#change-".titlepage($change->{rev}))
+       $template->param(permalink => urlto($config{recentchangespage})."#change-".titlepage($change->{rev}))
                if exists $config{url};
        
        IkiWiki::run_hooks(pagetemplate => sub {
index e3ba9b8d8248858689619fee48a963912c593648..71297572d7b74a5042e18fd93128a4dca773e170 100644 (file)
@@ -28,11 +28,10 @@ sub pagetemplate (@) {
        my $template=$params{template};
        if ($config{rcs} && exists $params{rev} && length $params{rev} &&
            $template->query(name => "diff")) {
-               my @lines=IkiWiki::rcs_diff($params{rev});
+               my @lines=IkiWiki::rcs_diff($params{rev}, $maxlines+1);
                if (@lines) {
                        my $diff;
                        if (@lines > $maxlines) {
-                               # only include so many lines of diff
                                $diff=join("", @lines[0..($maxlines-1)])."\n".
                                        gettext("(Diff truncated)");
                        }
index 78eb750b5f670caabe5840a51f589319eccf1204..3f0b7c9ad4c657db023be5e489f069768dc8201a 100644 (file)
@@ -227,20 +227,21 @@ sub setupfiles () {
                        "database_dir .\n".
                        "template_dir ./templates\n");
                
-               # Avoid omega interpreting anything in the misctemplate
+               # Avoid omega interpreting anything in the cgitemplate
                # as an omegascript command.
-               my $misctemplate=IkiWiki::misctemplate(gettext("search"), "\0",
+               eval q{use IkiWiki::CGI};
+               my $template=IkiWiki::cgitemplate(undef, gettext("search"), "\0",
                        searchform => "", # avoid showing the small search form
                );
                eval q{use HTML::Entities};
                error $@ if $@;
-               $misctemplate=encode_entities($misctemplate, '\$');
+               $template=encode_entities($template, '\$');
 
                my $querytemplate=readfile(IkiWiki::template_file("searchquery.tmpl"));
-               $misctemplate=~s/\0/$querytemplate/;
+               $template=~s/\0/$querytemplate/;
 
                writefile("query", $config{wikistatedir}."/xapian/templates",
-                       $misctemplate);
+                       $template);
                $setup=1;
        }
 }
index 9cf82b5db3c4ce663a552cee9acd7cd22e665c3c..faaf567d578d920bebfda41927c0c7e9946488d0 100644 (file)
@@ -345,8 +345,9 @@ sub rcs_recentchanges ($) {
        return @ret;
 }
 
-sub rcs_diff ($) {
+sub rcs_diff ($;$) {
        my $rev=IkiWiki::possibly_foolish_untaint(int(shift));
+       my $maxlines=shift;
        return `svnlook diff $config{svnrepo} -r$rev --no-diff-deleted`;
 }
 
index 55064a9a3cef72c92f3ebc3cb43fa9ef7646d256..fd5ce1e8a91488ce5d5b20709001fd3d177def97 100644 (file)
@@ -55,6 +55,17 @@ sub taglink ($) {
        return $tag;
 }
 
+# Returns a tag name from a tag link
+sub tagname ($) {
+       my $tag=shift;
+       if (defined $config{tagbase}) {
+               $tag =~ s!^/\Q$config{tagbase}\E/!!;
+       } else {
+               $tag =~ s!^\.?/!!;
+       }
+       return pagetitle($tag, 1);
+}
+
 sub htmllink_tag ($$$;@) {
        my $page=shift;
        my $destpage=shift;
@@ -84,7 +95,7 @@ sub gentag ($) {
                        debug($message);
 
                        my $template=template("autotag.tmpl");
-                       $template->param(tagname => IkiWiki::basename($tag));
+                       $template->param(tagname => tagname($tag));
                        $template->param(tag => $tag);
                        writefile($tagfile, $config{srcdir}, $template->output);
                        if ($config{rcs}) {
@@ -154,14 +165,15 @@ sub pagetemplate (@) {
 
        $template->param(tags => [
                map { 
-                       link => htmllink_tag($page, $destpage, $_, rel => "tag")
+                       link => htmllink_tag($page, $destpage, $_,
+                                       rel => "tag", linktext => tagname($_))
                }, sort keys %$tags
        ]) if defined $tags && %$tags && $template->query(name => "tags");
 
        if ($template->query(name => "categories")) {
                # It's an rss/atom template. Add any categories.
                if (defined $tags && %$tags) {
-                       $template->param(categories => [map { category => $_ },
+                       $template->param(categories => [map { category => tagname($_) },
                                sort keys %$tags]);
                }
        }
diff --git a/IkiWiki/Plugin/transient.pm b/IkiWiki/Plugin/transient.pm
new file mode 100644 (file)
index 0000000..c482b85
--- /dev/null
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+package IkiWiki::Plugin::transient;
+
+use warnings;
+use strict;
+use IkiWiki 3.00;
+
+sub import {
+       hook(type => "getsetup", id => "transient",  call => \&getsetup);
+       hook(type => "checkconfig", id => "transient", call => \&checkconfig);
+       hook(type => "change", id => "transient", call => \&change);
+}
+
+sub getsetup () {
+       return
+               plugin => {
+                       # this plugin is safe but only makes sense as a
+                       # dependency; similarly, it needs a rebuild but
+                       # only if something else does
+                       safe => 0,
+                       rebuild => 0,
+               },
+}
+
+our $transientdir;
+
+sub checkconfig () {
+       eval q{use Cwd 'abs_path'};
+       error($@) if $@;
+       $transientdir = abs_path($config{wikistatedir})."/transient";
+       add_underlay($transientdir);
+}
+
+sub change (@) {
+       foreach my $file (@_) {
+               # If the corresponding file exists in the transient underlay
+               # and isn't actually being used, we can get rid of it.
+               # Assume that the file that just changed has the same extension
+               # as the obsolete transient version: this'll be true for web
+               # edits, and avoids invoking File::Find.
+               my $casualty = "$transientdir/$file";
+               if (srcfile($file) ne $casualty && -e $casualty) {
+                       debug(sprintf(gettext("removing transient version of %s"), $file));
+                       IkiWiki::prune($casualty);
+               }
+       }
+}
+
+1;
index 6a51903016830c17339f2130a964f87708ae15b0..0a3d90aec0d9654269fd70c63f6e9825f219c6a8 100644 (file)
@@ -447,10 +447,10 @@ sub showform ($$) {
                        IkiWiki::saveindex();
                        IkiWiki::unlockwiki();
 
-                       # Print the top part of a standard misctemplate,
+                       # Print the top part of a standard cgitemplate,
                        # then show the rebuild or refresh, live.
                        my $divider="\0";
-                       my $html=IkiWiki::misctemplate("setup", $divider);
+                       my $html=IkiWiki::cgitemplate($cgi, "setup", $divider);
                        IkiWiki::printheader($session);
                        my ($head, $tail)=split($divider, $html, 2);
                        print $head."<pre>\n";
index 5eb96f4ae0d168598fe9d6a54a644294fbcb517a..84cc7540bbfa5e63b8d9d85d21cc0b0d63bbb478 100644 (file)
@@ -49,6 +49,7 @@ sub gen_wrapper () {
        push @envsave, qw{REMOTE_ADDR QUERY_STRING REQUEST_METHOD REQUEST_URI
                       CONTENT_TYPE CONTENT_LENGTH GATEWAY_INTERFACE
                       HTTP_COOKIE REMOTE_USER HTTPS REDIRECT_STATUS
+                      HTTP_HOST SERVER_PORT HTTPS
                       REDIRECT_URL} if $config{cgi};
        my $envsave="";
        foreach my $var (@envsave) {
index 6262b2b431453ade887a99d3699ecd10d5b5e17a..02f3109e464e991d3963dcaeae0915284103c691 100644 (file)
@@ -1,4 +1,22 @@
-ikiwiki (3.20101202) UNRELEASED; urgency=low
+ikiwiki (3.20110105) unstable; urgency=low
+
+  * tag: Do not include tagbase in rss/atom category tags. (Giuseppe Bilotta)
+  * tag: Improve display of tags with a slash in their names.
+    (Giuseppe Bilotta)
+  * Fix redirect to use a full url. Was broken (in theory) by baseurl
+    changes in last release.
+  * Fix `<base>` output by cgi to have a full url again, broken by last
+    release.
+  * Fix permalinks to recentchanges items and comments, broken by last
+    release.
+  * Export three cgi env vars needed for CGI->url to work. Fixed
+    openid breakage from last release.
+  * Removed `IkiWiki::misctemplate()` function. Any plugins using
+    it should use `IkiWiki::cgitemplate()` instead.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 05 Jan 2011 17:33:05 -0400
+
+ikiwiki (3.20101231) unstable; urgency=low
 
   * Better support for serving the same site on multiple urls. (Such as
     a http and a https url, or a ipv4 and an ipv6 url.)
@@ -21,8 +39,16 @@ ikiwiki (3.20101202) UNRELEASED; urgency=low
     comment.
   * teximg: Use `\[` and `\]` instead of not recommended `$$`. (Paul Menzel)
     Closes: #596084
-
- -- Joey Hess <joeyh@debian.org>  Mon, 29 Nov 2010 14:44:13 -0400
+  * monotone: Improve version parsing to support patch and development
+    versions of the monotone binary. (tommyd3mdi)
+  * highlight: Support highlight 3.2+svn19 (note that released version 3.2
+    is not supported). Closes: #605779 (David Bremner)
+  * Add a second parameter to the rcs_diff hook, and avoid bloating memory
+    reading in enormous commits.
+  * git: Fix bug involving attempting to web revert a commit that included
+    changes to attachments.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 31 Dec 2010 21:23:37 -0400
 
 ikiwiki (3.20101201) unstable; urgency=low
 
diff --git a/doc/bugs/default__95__pageext_not_working.mdwn b/doc/bugs/default__95__pageext_not_working.mdwn
new file mode 100644 (file)
index 0000000..c34491c
--- /dev/null
@@ -0,0 +1,7 @@
+default_pageext in the setup file does not work for me. 
+
+I tried to set it as 'txt' and as a custom plugin I am developing but when I edit a page it only ever loads with Markdown selected.
+
+Yes I am only trying to set it to loaded and working plugins. 
+
+ikiwiki version 3.20101129
diff --git a/doc/bugs/preview_base_url_should_be_absolute.mdwn b/doc/bugs/preview_base_url_should_be_absolute.mdwn
new file mode 100644 (file)
index 0000000..f865f03
--- /dev/null
@@ -0,0 +1,49 @@
+The edit page CGI defines a `base` tag with an URL which is not
+absolute, which can break the preview function in some circumstances
+(with e.g. images not showing). The trivial [[patch]] that fixes
+it can be found [[here|http://sprunge.us/EPHT]] as well as on [[my
+git|http://git.oblomov.eu/ikiwiki]].
+
+> That patch does mean that if you're accessing the CGI via HTTPS but your
+> $config{url} and $config{cgiurl} are HTTP, you'll get preview images loaded
+> via HTTP, causing the browser to complain. See
+> [[todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both]]
+> for background.
+>
+> Perhaps the CGI could form its `<base>` URL by using
+> `URI->new_abs(urlto(...), $cgi->url)` instead?
+>
+> You'd also need to change `IkiWiki/Wrapper.pm` to pass at least the
+> SERVER_NAME and SERVER_PORT through the environment, probably.
+>
+> Joey's last comment on
+> [[todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both]]
+> suggests that this might already work, but I'm not quite sure how - I'd
+> expect it to need more environment variables? --[[smcv]]
+>
+>> `CGI::url` uses `REQUEST_URI`. So it could be used, but I don't see
+>> how to get from the `CGI::url` to an url to the page that is being
+>> edited. --[[Joey]]
+>>> (The right rune seems to be: `URI->new_abs(urlto($params{page}), $cgi->url))` --[[Joey]] 
+
+---
+
+Update: This bug is worse than it first appeared, and does not only affect
+previewing. The cgi always has a `<base>` url, and it's always relative,
+and that can break various links etc. For example, when the 404 plugin
+displays a missing page, it has a Recentchanges link, which would be broken
+if the cgi was in an unusual place.
+
+`misctemplate` needs to *always* set an absolute baseurl. Which is a problem,
+since `misctemplate` is not currently passed a cgi object from which to
+construct one. --[[Joey]]
+
+Update: Worse and worse. `baseurl(undef)` can be a relative url, but
+nearly every use of it I can find actually needs to be absolute. 
+the numerous `redirect($q, baseurl(undef))` all need to be absolute
+according to `CGI` documentation.
+
+So, I'm seriously thinking about reverting the part of
+[[todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both]]
+that made `baseurl(undef)` relative. 
+And I suppose, re-opening that todo. :( --[[Joey]]
diff --git a/doc/bugs/tag_behavior_changes_introduced_by_typed_link_feature.mdwn b/doc/bugs/tag_behavior_changes_introduced_by_typed_link_feature.mdwn
new file mode 100644 (file)
index 0000000..ed93a2e
--- /dev/null
@@ -0,0 +1,16 @@
+The use of typed links for tags and some of the consequent changes
+introduced some unwanted functionality variations in the tag system. Two
+problems in particular could be observed, when compared to the use of
+tags in older versions of IkiWiki:
+
+* tags in feeds (both rss and atom) would use the file path as their
+  name (e.g. you would have `<category term="tags/sometag" />` in an atom
+  item for a page tagged sometag with a tagbase of tags), whereas they
+  appeared pure before
+* tags containing a slash character would appear without the slash
+  character but be used with the slash character in other circumstances
+  (effect visible by tagging a page with a name such as "with/slash")
+
+I've written a [[patch]] to fix this issues by introducing a `tagname()` function that reverts `taglink()`, and it's available [[here|http://sprunge.us/SHRj]] as well as on my [[git|http://git.oblomov.eu/ikiwiki]]
+
+> [[Applied|done]], with some regexp improvements. --[[Joey]] 
diff --git a/doc/examples/blog/posts/ugachaka/discussion.mdwn b/doc/examples/blog/posts/ugachaka/discussion.mdwn
new file mode 100644 (file)
index 0000000..387db1f
--- /dev/null
@@ -0,0 +1 @@
+jackie chan vs chuck norris.
diff --git a/doc/forum/Flowplayer.mdwn b/doc/forum/Flowplayer.mdwn
new file mode 100644 (file)
index 0000000..9bf3ab3
--- /dev/null
@@ -0,0 +1 @@
+[Flowplayer](http://flowplayer.org) is the open source flash video player plugin. [My site](http://mcfrisk.kapsi.fi) has raw html enabled to work with old content so I was able to use the raw html and javascript [examples](http://flowplayer.org/documentation/installation/index.html) in blog posts, but some of them fail when combined on the [aggregate page](http://mcfrisk.kapsi.fi/skiing/). Any hints on how to properly use Flowplayer with ikiwiki?
diff --git a/doc/forum/ikiwiki_+_mathjax/comment_1_8426a985ecfbb02d364116503ef3a0d4._comment b/doc/forum/ikiwiki_+_mathjax/comment_1_8426a985ecfbb02d364116503ef3a0d4._comment
new file mode 100644 (file)
index 0000000..f5849e7
--- /dev/null
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkIfDOOUJ0h_niLRZZL5HsHHOuQfUrVcQo"
+ nickname="Carl"
+ subject="Works with mathjax, with a little help"
+ date="2011-01-02T22:59:27Z"
+ content="""
+Yes, mathjax works with ikiwiki. The main trouble I ran into was markdown trying to parse the math. For example markdown and tex both use underscores. I wrote a quick plugin to replace all the TeX with strip markers in the 'filter' phase and put it back in the 'sanitize' phase (just replacing all the TeX content with its Base64 representation temporarily) and that seems to have fixed the problem well enough. 
+"""]]
diff --git a/doc/news/version_3.20100926.mdwn b/doc/news/version_3.20100926.mdwn
deleted file mode 100644 (file)
index b56e577..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-ikiwiki 3.20100926 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * meta: Ensure that the url specified by xrds-location is absolute.
-   * attachment: Fix attachment file size display.
-   * Propigate PATH into wrapper.
-   * htmlbalance: Fix compatibility with HTML::Tree 4.0. (smcv)"""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20101019.mdwn b/doc/news/version_3.20101019.mdwn
deleted file mode 100644 (file)
index 86c302e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-ikiwiki 3.20101019 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * Fix test suite failure on other side of date line.
-   * htmltidy: Allow configuring tidy parameters in setup file.
-     (W. Trevor King)
-   * Updated French program translation. Closes: #[598918](http://bugs.debian.org/598918)
-   * git: Added new rcs\_revert and rcs\_preprevert hooks.
-   * recentchanges: Add revert buttons to RecentChanges page, and
-     implement web-based reversion interface.
-   * Thanks to Peter Gammie for his assistance with the web-based reversion
-     feature.
-   * actiontabs: More consistent styling of Hn tags.
-   * websetup: Fix saving of advanced mode changes.
-   * websetup: Fix defaults of checkboxes in advanced mode.
-   * monotone: Fix recentchanges page when the srcdir is not at the top
-     of the monotone workspace. Thanks, tommyd.
-   * img: If a class is specified, don't also put the img in the img
-     class.
-   * auto-blog.setup: Don't enable opendiscussion by default; require users be
-     logged in to post comments."""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20101023.mdwn b/doc/news/version_3.20101023.mdwn
deleted file mode 100644 (file)
index 44bed6b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-ikiwiki 3.20101023 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * Fix typo that broke anonymous git push.
-   * Fix web reversion when the srcdir is in a subdir of the git repo."""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20101231.mdwn b/doc/news/version_3.20101231.mdwn
new file mode 100644 (file)
index 0000000..0146840
--- /dev/null
@@ -0,0 +1,31 @@
+ikiwiki 3.20101231 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * Better support for serving the same site on multiple urls. (Such as
+     a http and a https url, or a ipv4 and an ipv6 url.)
+     (Thanks, smcv)
+   * API: urlto without a defined second parameter now generates an url
+     that starts with "/" (when possible; eg when the site's url and cgiurl
+     are on the same domain).
+   * Now when users log in via https, ikiwiki sends a secure cookie, that can
+     only be used over https. If the user switches to using http, they will
+     need to re-login. (smcv)
+   * inline: Display feed buttons for nested inlines, linking to the inlined
+     page's feed. (Giuseppe Bilotta)
+   * goldtype: New theme, based on blueview, contributed by Lars Wirzenius.
+   * po: do not override homepage title when it was overridden. (intrigeri)
+   * Set HTML::Template's parent\_global\_vars option to allow using parameters
+     like title\_overridden that do not appear on the template. (intrigeri)
+     (See https://rt.cpan.org/Public/Bug/Display.html?id=64158)
+   * inline: Force an absolute page location when the inline postform is used.
+   * editpage, comment: Clean up title when editing or creating a page or
+     comment.
+   * teximg: Use `\[` and `\]` instead of not recommended `$$`. (Paul Menzel)
+     Closes: #[596084](http://bugs.debian.org/596084)
+   * monotone: Improve version parsing to support patch and development
+     versions of the monotone binary. (tommyd3mdi)
+   * highlight: Support highlight 3.2+svn19 (note that released version 3.2
+     is not supported). Closes: #[605779](http://bugs.debian.org/605779) (David Bremner)
+   * Add a second parameter to the rcs\_diff hook, and avoid bloating memory
+     reading in enormous commits.
+   * git: Fix bug involving attempting to web revert a commit that included
+     changes to attachments."""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20110105.mdwn b/doc/news/version_3.20110105.mdwn
new file mode 100644 (file)
index 0000000..133dd57
--- /dev/null
@@ -0,0 +1,15 @@
+ikiwiki 3.20110105 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * tag: Do not include tagbase in rss/atom category tags. (Giuseppe Bilotta)
+   * tag: Improve display of tags with a slash in their names.
+     (Giuseppe Bilotta)
+   * Fix redirect to use a full url. Was broken (in theory) by baseurl
+     changes in last release.
+   * Fix `&lt;base&gt;` output by cgi to have a full url again, broken by last
+     release.
+   * Fix permalinks to recentchanges items and comments, broken by last
+     release.
+   * Export three cgi env vars needed for CGI-&gt;url to work. Fixed
+     openid breakage from last release.
+   * Removed `IkiWiki::misctemplate()` function. Any plugins using
+     it should use `IkiWiki::cgitemplate()` instead."""]]
\ No newline at end of file
index bb76a9d8be426418815074aa0c0ae5db3ac68658..6fc21e8ee479986a3821c0d9708d551a012c67b2 100644 (file)
@@ -13,3 +13,11 @@ otherwise be invalid, so this shouldn't produce any conflicts with expected
 behavior. (Right?) -- [[StevenBlack]]
 
 > Great idea! Just implemented that and also relative years. --[[Joey]] 
+
+Anyone know of a way to generate a link to the previous and next calendar pages for archive browsing?  In the worst case, that requires regenerating pages on either side of the current one when something is inserted in the history, and I can't quite figure that much out. --[[JasonRiedy]]
+
+> Well, the calendar directive puts such links on the calendars. They're
+> the arrows to either side of the month or year at the top. --[[Joey]]
+
+>> Thanks. I either missed them or they appeared on an upgrade. I might make them a bit more obvious with 
+>> "Previous Month" / "Next Month" links above and below the text. Someday.--[[JasonRiedy]]
index ff2fab610f1607c3916d69a4f9755c82bc016d80..6003196b0cac6aee99dc2fdef8fb77aedb5f25cb 100644 (file)
@@ -1,9 +1,35 @@
+*For discussion and the branch please see [[todo/transient pages]]. If this
+plugin is merged, this page can be renamed to act as its documentation. --[[smcv]]*
+
 [[!template id=plugin name=transient author="[[Simon_McVittie|smcv]]"]]
-[[!template id=gitbranch branch=smcv/ready/transient author="[[Simon_McVittie|smcv]]"]]
 [[!tag type/special-purpose]]
 
-The `transient` plugin is an implementation of [[todo/transient pages]]
-in an underlay. It's mostly useful as something other plugins can depend on;
-[[plugins/contrib/album]] puts photo-album "viewer" pages there,
-and the versions of [[plugins/autoindex]] and [[plugins/tag]] on the
-same branch optionally put their auto-generated pages there.
+The `transient` plugin adds an underlay in `.ikiwiki/transient`, which is
+intended for pages that are automatically created and should not be committed
+to the [[RCS]]. It works in the same way as the [[basewiki]] and the underlays
+set up by the [[plugins/underlay]] plugin, so if a page in the transient
+underlay is edited via the web, the edited version is committed to the RCS
+as usual. Unlike other underlays, if a page in the transient underlay is
+superseded by an edited version in the RCS, the old transient version
+is deleted automatically.
+
+This plugin is mostly useful as something that other plugins can depend on:
+
+* [[plugins/contrib/album]] always writes photo-album "viewer" pages to the
+  transient underlay
+
+Likely future users of this plugin (the appropriate branches need to be
+merged first):
+
+* with a patch (which exists but hasn't yet been tested), [[plugins/aggregate]]
+    always writes aggregated posts into the transient underlay
+* with a patch, [[plugins/autoindex]] can be configured to auto-create missing
+    pages that have a [[ikiwiki/subpage]] or an [[plugins/attachment]], but not
+    commit them, in which case they go in the transient underlay
+* [[plugins/comments]] can be configured to not commit comments: if so, it
+    should probably put them in the transient underlay
+* with a patch, [[plugins/recentchanges]] always writes new changes into the
+    transient underlay
+* with a patch, [[plugins/tag]] can be configured to auto-create missing
+    tag pages but not commit them, in which case they go in the transient
+    underlay
index adc20af72331ec83e208d73d3772308a37263a3b..f0f79ebc7faf58013847674e5855e7a64ab0888d 100644 (file)
@@ -1151,11 +1151,13 @@ The data structure returned for each change is:
                ],
        }
 
-#### `rcs_diff($)`
+#### `rcs_diff($;$)`
+
+The first parameter is the rev from `rcs_recentchanges`.
+The optional second parameter is how many lines to return (default: all).
 
-The parameter is the rev from `rcs_recentchanges`.
 Should return a list of lines of the diff (including \n) in list
-context, and the whole diff in scalar context.
+context, and a string containing the whole diff in scalar context.
 
 #### `rcs_getctime($)`
 
index 65eee200d5fd0f5595b13c98039dd10c7f430881..049abee0f582f23000541aa1b082b4145deb2218 100644 (file)
@@ -63,6 +63,34 @@ testing 123
 
 I wonder how org-mode would look once formatted with ikiwiki..
 
+----
+
+# header1
+
+## header2
+
+### header3
+
+#### header4
+
+##### header 5
+
+**bold**
+
+ * bullet
+
+ 1 list
+
+ 2 list
+
+ 3 list
+
+[[link]]
+
+_italic_
+
+
+
 ----
 
 This **SandBox** is also a [[blog]]!
index f0eeea8ee13c706b3e580421bd00da4e99a7db08..388d5a49c18fa9d94c549559e1c6d52f237dc3b3 100644 (file)
@@ -265,3 +265,5 @@ Did anyone tried to install ikiwiki under a vhost setup ?
 ikiwiki is installed under a debian lenny system. but without write acces to /etc/ikiwiki (obvious) i am coming not far.
 Or do i miss something which is probably hidden deeper in the documentation ?
 
+----
+Perhaps it's worth noting that when installing ikiwiki with apt on Debian stable, you need to use the backports version in order to follow the setup instructions.
index 16dc78fb2a64ffcfb42a34399b0b85b0e1b1d3f8..da038926195d44bf5eb402ddf91f4b75e3fd6779 100644 (file)
@@ -260,7 +260,10 @@ required to implement [[todo/alias directive]], which couldn't be easily done
 by writing to the RCS as the page's contents can change depending on which
 other pages claim it as an alias. --[[chrysn]]
 
-I agree with [[chrysn]]. In fact, is there any good reason that the core tag plugin doesn't do this? The current usability is horrible, to the point that I have gone 2.5 years with Ikiwiki and haven't yet started using tags. -- 
+I agree with [[chrysn]]. In fact, is there any good reason that the core tag
+plugin doesn't do this? The current usability is horrible, to the point that
+I have gone 2.5 years with Ikiwiki and haven't yet started using tags.
+--[Eric](http://wiki.pdxhub.org/people/eric)
 
 > See [[todo/transient_pages]] for progress on this. --[[smcv]]
 
index 19c5004f889559f9a9c0277314362a2d19518f1e..9f3fd71f16e9739ab0df7a61515ec3e8407d5d40 100644 (file)
@@ -1,4 +1,112 @@
 `add_autofile` is a generic version of [[plugins/autoindex]]'s code,
 so the latter should probably use the former. --[[smcv]]
 
-> See [[todo/transient_pages]] for progress on this. --[[smcv]]
+----
+
+[[!template id=gitbranch branch=smcv/autoindex-autofile author="[[smcv]]"]]
+
+I'm having trouble fixing this:
+
+       # FIXME: some of this is probably redundant with add_autofile now, and
+       # the rest should perhaps be added to the autofile machinery
+
+By "a generic version of" above, it seems I mean "almost, but not
+quite, entirely unlike".
+
+> As long as it's not Tea. ;) --[[Joey]] 
+
+I tried digging through the git history for the
+reasoning behind the autofile and autoindex implementations, but now I'm
+mostly confused.
+
+## autofile
+
+The autofile machinery records a list of every file that has ever been proposed
+as an autofile: for instance, the tag plugin has a list of every tag that
+has ever been named in a \[[!tag]] or \[[!taglink]], even if no file was
+actually needed (e.g. because it already existed). Checks for files that
+already exist (or whatever) are deferred until after this list has been
+updated, and files in this list are never auto-created again unless the wiki
+is rebuilt.
+
+This avoids re-creating the tag `create-del` in this situation, which is
+the third one that I noted on
+[[todo/auto-create tag pages according to a template]]:
+
+* create tags/create-del manually
+* tag a page as create-del
+* delete tags/create-del
+
+and also avoids re-creating `auto-del` in this similar situation (which I
+think is probably the most important one to get right):
+
+* tag a page as auto-del, which is created automatically
+* delete tags/auto-del
+
+I think both of these are desirable.
+
+However, this infrastructure also results in the tag page not being
+re-created in either of these situations (the first and second that I noted
+on the other page):
+
+* tag a page as auto-del-create-del, which is created automatically
+* delete tags/auto-del-create-del
+* create tags/auto-del-create-del manually
+* delete tags/auto-del-create-del again
+
+or
+
+* create tags/create-del-auto
+* delete tags/create-del-auto
+* tag a page as create-del-auto
+
+I'm less sure that these shouldn't create the tag page: we deleted the
+manually-created version, but that doesn't necessarily mean we don't want
+*something* to exist.
+
+> That could be argued, but it's a very DWIM thing. Probably best to keep
+> the behavior simple and predictable, so one only needs to remember that
+> when a page is deleted, nothing will ever re-create it behind ones back.
+> --[[Joey]]
+
+## autoindex
+
+The autoindex machinery records a more complex set. Items are added to the
+set when they are deleted, but would otherwise have been added as an autoindex
+(don't exist, do have children (by which I mean subpages or attachments),
+and are a directory in the srcdir). They're removed if this particular run
+wouldn't have added them as an autoindex (they exist, or don't have children).
+
+Here's what happens in situations mirroring those above.
+
+The "create-del" case still doesn't create the page:
+
+* create create-del manually
+* create create-del/child
+* delete create-del
+* it's added to `%deleted` and not re-created
+
+Neither does the "auto-del" case:
+
+* create auto-del/child, resulting in auto-del being created automatically
+* delete auto-del
+* it's added to `%deleted` and not re-created
+
+However, unlike the generic autofile infrastructure, `autoindex` forgets
+that it shouldn't re-create the deleted page in the latter two situations:
+
+* create auto-del-create-del/child, resulting in auto-del-create-del being
+    created automatically
+* delete auto-del-create-del; it's added to `%deleted` and not re-created
+* create auto-del-create-del manually; it's removed from `%deleted`
+* delete auto-del-create-del again (it's re-created)
+
+and
+
+* create create-del-auto
+* delete create-del-auto; it's not added to `%deleted` because there's no
+    child that would cause it to exist
+* create create-del-auto/child
+
+> I doubt there is any good reason for this behavior. These are probably
+> bugs. --[[Joey]] 
diff --git a/doc/todo/feed_enhancements_for_inline_pages.mdwn b/doc/todo/feed_enhancements_for_inline_pages.mdwn
new file mode 100644 (file)
index 0000000..5a7b1f8
--- /dev/null
@@ -0,0 +1,8 @@
+[[!template id=gitbranch branch=GiuseppeBilotta/inlinestuff author="Giuseppe Bilotta"]]
+
+A few patches to clean up and improve feed management for inline pages.
+
+* the first patch simply replaces the id attribute in the default template for feedlinks with a class attribute by the same name. This is necessary in pages with multiple inlines to guarantee correctness
+* the second patch tries to define the default description for a feed based not only on the wiki name, but also on the current page name. The actual way this is built might not be the optimal one, so I'm open to suggestions
+* the third patch passes the feed titles to the templates, changing the default templates to use these as title attributes for the links. a rel="alternate" attribute is also included
+* the fourth patch introduces a feedlinks parameter to the inline directive, to allow for the specifications of the locations where the feed links should appear. Currently, two options are allowed (head and body), plus both and none with obvious significance
diff --git a/doc/todo/support_includes_in_setup_files.mdwn b/doc/todo/support_includes_in_setup_files.mdwn
new file mode 100644 (file)
index 0000000..50afb2b
--- /dev/null
@@ -0,0 +1,10 @@
+I have a client server setup so I can I edit/preview on my laptop/desktop and push to a server. I therefore have two almost identical setup files that reasonably often I let get out of sync.  I'd like to be able into include the common parts into the two setup files. Currently the following works, but it relies on knowing the implementation of IkiWiki::Setup::Standard
+
+use IkiWiki::Setup::Standard { specific stuff };
+require "/path/to/common_setup";
+
+where common_setup contains a call to IkiWiki::Setup::merge
+
+To see that this is fragile, note that the require must come second, or ikiwiki will try to load a module called IkiWiki::Setup::merge
+
+DavidBremner
index 911f208fd0fa97a571514d3146ffb394f5ea8c45..1a35dddb10c60bbe978ceeb6cbbf31435b12b63c 100644 (file)
@@ -22,6 +22,8 @@ It could also be used for an [[todo/alias_directive]].
 --------------------------
 
 [[!template id=gitbranch branch=smcv/ready/transient author="[[smcv]]"]]
+[[!template id=gitbranch branch=smcv/ready/transient-recentchanges author="[[smcv]]"]]
+[[!template id=gitbranch branch=smcv/ready/transient-tag author="[[smcv]]"]]
 [[!tag patch]]
 
 I think this branch is now enough to be useful. It adds the following:
@@ -31,17 +33,21 @@ as an underlay. I'm not sure whether this should be a plugin or core, so
 I erred on the side of more plugins; I think it's "on the edge of the core",
 like goto.
 
-Pages with the default extension in the transient underlay are automatically
+Pages in the transient underlay are automatically
 deleted if a page of the same name is created in the srcdir (or an underlay
 closer to the srcdir in stacking order).
 
+With the additional `ready/transient-tag` branch,
 `tag` enables `transient`, and if `tag_autocreate_commit` is set to 0
 (default 1), autocreated tags are written to the transient underlay.
 There is a regression test.
 
+With the additional `transient-autoindex` branch,
 `autoindex` uses autofiles. It also enables `transient`, and if
 `autoindex_commit` is set to 0 (default 1), autoindexes are written to
-the transient underlay. There is a regression test.
+the transient underlay. There is a regression test. However, this branch
+is blocked by working out what the desired behaviour is, on
+[[todo/autoindex_should_use_add__95__autofile]].
 
 > I wonder why this needs to be configurable? I suppose that gets back to
 > whether it makes sense to check these files in or not. The benefits of 
@@ -64,15 +70,25 @@ the transient underlay. There is a regression test.
 > commit clutter is really worth it.
 
 >> According to the last section of
->> [[todo/auto-create_tag_pages_according_to_a_template]], chrysn and
+>> [[todo/auto-create_tag_pages_according_to_a_template]], [[chrysn]] and
 >> Eric both feel rather strongly that it should be possible to
->> not commit any tags. I made it configurable because, as you point out,
+>> not commit any tags; in [[plugins/autoindex/discussion]],
+>> lollipopman and [[JoeRayhawk]] both requested the same for autoindex.
+>> I made it configurable because, as you point out,
 >> there are also reasons why it makes sense to check these
 >> automatically-created files in. I'm neutral on this, personally.
 >>
 >> If this is a point of contention, would you accept a branch that
 >> just adds `transient` and uses it for [[plugins/recentchanges]],
->> which aren't checked in and never have been?
+>> which aren't checked in and never have been? I've split the
+>> branch up in the hope that *some* of it can get merged.
+>>
+>>> I will be happy to merge transient-recentchanges when it's ready.
+>>> I see no obstacle to merging transient-tag either, and am not
+>>> really against using it for autoindex or aggregate either
+>>> once they get completed.
+>>> I just wanted to think through why configurability is needed.
+>>> --[[Joey]]
 >>
 >> One potentially relevant point is that configuration clutter only
 >> affects the site admin whereas commit clutter is part of the whole
@@ -80,18 +96,31 @@ the transient underlay. There is a regression test.
 
 > Anyway, the configurability
 > appears subtly broken; the default is only 1 if a new setup file is
-> generated. With an existing setup file, the 'default' values in
+> generated. (Correction: It was not even the default then --[[Joey]])
+> With an existing setup file, the 'default' values in
 > `getsetup` don't take effect, so it will default to undef, which
 > is treated the same as 0. --[[Joey]]
 
->> Fixed in the branch, hopefully. (How disruptive would it be to have
+>> Fixed in the branches, hopefully. (How disruptive would it be to have
 >> defaults take effect whenever the setup file doesn't set a value, btw?
 >> It seems pretty astonishing to have them work as they do at the moment.) --s
 
+>>> Well, note that default is not actually a documented field in
+>>> getsetup hooks at all! (It is used in IkiWiki.pm's own `getsetup()`, and
+>>> the concept may have leaked out into one or two plugins (comments,
+>>> transient)).
+>>> 
+>>> Running getsetup at plugin load time is something I have considered
+>>> doing. It would simplify some checkconfig hooks that just set hardcoded 
+>>> defaults. Although since dying is part of the getsetup hook's API, it
+>>> could be problimaric.
+>>> --[[Joey]]
+
 autoindex ignores pages in the transient underlay when deciding whether
 to generate an index.
 
-New recent changes go in the transient underlay; I tested this manually.
+With the additional `ready/transient-recentchanges` branch, new recent
+changes go in the transient underlay; I tested this manually.
 
 Not done yet (in that branch, at least):
 
@@ -125,48 +154,68 @@ Not done yet (in that branch, at least):
 >> Here are some other things I'd like to think about first: --[[Joey]] 
 >>
 >> * There's a FIXME in autoindex.
-
->>> Right, the extra logic for preventing autoindex pages from being
->>> re-created. I've started on regression tests for this, but I'll
->>> need to rummage through the commit log for the exact requirements
->>> and the reasoning behind them, so it could take a while. --s
+>>
+>>     > Right, the extra logic for preventing autoindex pages from being
+>>     > re-created. This is taking a while, so I'm going to leave out the
+>>     > autoindex part for the moment. The FIXME is only relevant
+>>     > because I tried to solve
+>>     > [[todo/autoindex should use add__95__autofile]] first, but
+>>     > strictly speaking, that's an orthogonal change. --s
 
 >> * Suggest making recentchanges unlink the transient page
 >>   first, and only unlink from the old location if it wasn't
 >>   in the transient location. Ok, it only saves 1 syscall :)
+>>
+>>   > Is an unlink() really that expensive? But, OK, fixed in the
+>>   > `ready/transient-recentchanges` branch. --s
 
->>> Is an unlink() really that expensive? But, OK, fixed in the
->>> updated branch. --s
+>>   >> It's not, but it's easy. :) --[[Joey]]
 
 >> * Similarly it's a bit worrying for performance that it
 >>   needs to pull in and use `Cwd` on every ikiwiki startup now.
 >>   I really don't see the need; `wikistatedir` should
 >>   mostly be absolute, and ikiwiki should not chdir in ways
 >>   that break it anyway.
-
->>> The reason to make it absolute is that relative underlays
->>> are interpreted as relative to the base underlay directory,
->>> not the cwd.
->>>
->>> The updated branch only loads `Cwd` if the path is relative;
->>> an extra commit on branch `smcv/transient-relative` goes
->>> behind `add_underlay`'s back to allow use of a cwd-relative
->>> underlay. Which direction would you prefer? --s
+>>
+>>   > The reason to make it absolute is that relative underlays
+>>   > are interpreted as relative to the base underlay directory,
+>>   > not the cwd, by `add_underlay`.
+>>   >
+>>   > The updated `ready/transient-only` branch only loads `Cwd` if
+>>   > the path is relative; an extra commit on branch
+>>   > `smcv/transient-relative` goes behind `add_underlay`'s
+>>   > back to allow use of a cwd-relative underlay. Which direction
+>>   > would you prefer?
+>>   >
+>>   > I note in passing that [[plugins/autoindex]] and `IkiWiki::Render`
+>>   > both need to use `Cwd` and `File::Find` on every refresh, so
+>>   > there's only any point in avoiding `Cwd` for runs that don't
+>>   > actually refresh, like simple uses of the CGI. --s
+
+>>   >> Oh, right, I'd forgotten about the horrificness of File::Find
+>>   >> that required a chdir for security. Ugh. Can we just avoid
+>>   >> it for those simple cases then? (demand-calculate wikistatedir)
+>>   >> --[[Joey]] 
 
 >> * Unsure about the use of `default_pageext` in the `change`
 >>   hook. Is everything in the transientdir really going
 >>   to use that pageext? Would it be better to look up the
 >>   complete source filename?
-
->>> At the moment everything in the transientdir will either
->>> have the `default_pageext` or be internal, although I
->>> did wonder whether to make [[plugins/contrib/album]]
->>> viewer pages optionally be `html`, for better performance
->>> when there's a very large number of photos.
->>>
->>> A more thorough garbage-collection mechanism would be to
->>> use File::Find on the transient directory; I'll get there
->>> eventually. --s
+>>
+>>   > I've updated `ready/transient` to do a more thorough GC by
+>>   > using File::Find on the transient directory. This does
+>>   > require `File::Find` and `Cwd`, but only when pages change,
+>>   > and `refresh` loads both of those in that situation anyway.
+>>   >
+>>   > At the moment everything in the transientdir will either
+>>   > have the `default_pageext` or be internal, although I
+>>   > did wonder whether to make [[plugins/contrib/album]]
+>>   > viewer pages optionally be `html`, for better performance
+>>   > when there's a very large number of photos. --s
+
+>>   >> Oh, ugh, more File::Find... Couldn't it just assume that the
+>>   >> transient page has the same extension as its replacement?
+>>   >> --[[Joey]]
 
 --------------------------
 
index b069ee2bd195e4bbae68a7a6e2c123ebeaf1478d..6ede7f91ed6e76bc44caa152d755712f14bdc78a 100644 (file)
@@ -1,3 +1,46 @@
+## current status
+
+[[done]] again! :)
+
+Actually, there are two places where the configured url is still hardcoded:
+
+1. When searching, all the links will use it. This is annoying to fix,
+   and we deem it not a problem.
+2. When ikiwiki dies with an error, the links on the error page will
+   use it. Too bad :)
+
+------
+
+## semi-old
+
+
+* CGI pages, with the exception of edit pages, set `<base>` to
+  `$config{url}`
+
+  I had to revert using `baseurl(undef)` for that, because it needs
+  to be a full url.
+
+  Ideally, baseurl would return an absolute url derived from the url
+  being used to access the cgi, but that needs access to the CGI object,
+  which it does not currently have. Similarly, `misctemplate`
+  does not have access to the CGI object, so it cannot use it to
+  generate a better baseurl. Not sure yet what to do; may have to thread
+  a cgi parameter through all the calls to misctemplate. --[[Joey]]
+
+  > Fixed, cgitemplate is used now. --[[Joey]] 
+
+* Using `do=goto` to go to a comment or recentchanges item
+  will redirect to the `$config{url}`-based url, since the
+  permalinks are made to be absolute urls now.
+
+  Fixing this would seem to involve making meta force permalinks
+  to absolute urls when fulling out templates, while allowing them
+  to be left as partial urls internally, for use by goto. --[[Joey]]
+
+  > This reversion has now been fixed. --[[Joey]]
+
+## old attempt
+
 It looks like all links in websites are absolute paths, this has some limitations:
 
 * If connecting to website via https://... all links will take you back to http://
@@ -320,7 +363,7 @@ Potential future things:
   >> and 5 in plugins, since I used it for things like redirection back
   >> to the top of the wiki --[[smcv]]
 
-[[merged|done]] --[[Joey]] 
+merged|done --[[Joey]] (But reopened, see above.)
 
 ----
 
diff --git a/doc/users/jasonriedy.mdwn b/doc/users/jasonriedy.mdwn
new file mode 100644 (file)
index 0000000..c9b4ba7
--- /dev/null
@@ -0,0 +1 @@
+I'm over [thattaway](http://lovesgoodfood.com/jason).
index 09cc4a0f4be256e5e184ddb42d6588d38f70c2b9..7daeb068f05c128c31bec1b504e529707ee66931 100644 (file)
@@ -1,5 +1,5 @@
 Name:           ikiwiki
-Version: 3.20101201
+Version: 3.20110105
 Release:        1%{?dist}
 Summary:        A wiki compiler
 
index 6eb13103ea9dd7da52846939ba262d6bebe4c586..418e7321d9e094b424d72886976e361631b21667 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-12-01 20:29-0400\n"
+"POT-Creation-Date: 2011-01-05 18:09-0400\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"
@@ -18,118 +18,118 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
-#: ../IkiWiki/CGI.pm:162
+#: ../IkiWiki/CGI.pm:200
 msgid ""
 "probable misconfiguration: sslcookie is set, but you are attempting to login "
 "via http, not https"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:165
+#: ../IkiWiki/CGI.pm:203
 msgid "login failed, perhaps you need to turn on cookies?"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:184 ../IkiWiki/CGI.pm:335
+#: ../IkiWiki/CGI.pm:222 ../IkiWiki/CGI.pm:373
 msgid "Your login session has expired."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:205
+#: ../IkiWiki/CGI.pm:243
 msgid "Login"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:206
+#: ../IkiWiki/CGI.pm:244
 msgid "Preferences"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:207
+#: ../IkiWiki/CGI.pm:245
 msgid "Admin"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:247
+#: ../IkiWiki/CGI.pm:285
 msgid "Preferences saved."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:299
+#: ../IkiWiki/CGI.pm:337
 msgid "You are banned."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:426 ../IkiWiki/CGI.pm:427 ../IkiWiki.pm:1370
+#: ../IkiWiki/CGI.pm:464 ../IkiWiki/CGI.pm:465 ../IkiWiki.pm:1424
 msgid "Error"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:84
+#: ../IkiWiki/Plugin/aggregate.pm:83
 msgid "Aggregation triggered via web."
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:93
+#: ../IkiWiki/Plugin/aggregate.pm:92
 msgid "Nothing to do right now, all feeds are up-to-date!"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:222
+#: ../IkiWiki/Plugin/aggregate.pm:221
 #, perl-format
 msgid "missing %s parameter"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:257
+#: ../IkiWiki/Plugin/aggregate.pm:256
 msgid "new feed"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:271
+#: ../IkiWiki/Plugin/aggregate.pm:270
 msgid "posts"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:273
+#: ../IkiWiki/Plugin/aggregate.pm:272
 msgid "new"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:457
+#: ../IkiWiki/Plugin/aggregate.pm:456
 #, perl-format
 msgid "expiring %s (%s days old)"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:464
+#: ../IkiWiki/Plugin/aggregate.pm:463
 #, perl-format
 msgid "expiring %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:491
+#: ../IkiWiki/Plugin/aggregate.pm:490
 #, perl-format
 msgid "last checked %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:495
+#: ../IkiWiki/Plugin/aggregate.pm:494
 #, perl-format
 msgid "checking feed %s ..."
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:500
+#: ../IkiWiki/Plugin/aggregate.pm:499
 #, perl-format
 msgid "could not find feed at %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:519
+#: ../IkiWiki/Plugin/aggregate.pm:518
 msgid "feed not found"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:530
+#: ../IkiWiki/Plugin/aggregate.pm:529
 #, perl-format
 msgid "(invalid UTF-8 stripped from feed)"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:538
+#: ../IkiWiki/Plugin/aggregate.pm:537
 #, perl-format
 msgid "(feed entities escaped)"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:546
+#: ../IkiWiki/Plugin/aggregate.pm:545
 msgid "feed crashed XML::Feed!"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:632
+#: ../IkiWiki/Plugin/aggregate.pm:631
 #, perl-format
 msgid "creating new page %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:652 ../IkiWiki/Plugin/edittemplate.pm:135
+#: ../IkiWiki/Plugin/aggregate.pm:651 ../IkiWiki/Plugin/edittemplate.pm:135
 msgid "failed to process template:"
 msgstr ""
 
@@ -224,51 +224,51 @@ msgstr ""
 msgid "bad page name"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:377
+#: ../IkiWiki/Plugin/comments.pm:375
 #, perl-format
 msgid "commenting on %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:395
+#: ../IkiWiki/Plugin/comments.pm:392
 #, perl-format
 msgid "page '%s' doesn't exist, so you can't comment"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:402
+#: ../IkiWiki/Plugin/comments.pm:399
 #, perl-format
 msgid "comments on page '%s' are closed"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:510
+#: ../IkiWiki/Plugin/comments.pm:507
 msgid "comment stored for moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:512
+#: ../IkiWiki/Plugin/comments.pm:509
 msgid "Your comment will be posted after moderator review"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:525
+#: ../IkiWiki/Plugin/comments.pm:522
 msgid "Added a comment"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:529
+#: ../IkiWiki/Plugin/comments.pm:526
 #, perl-format
 msgid "Added a comment: %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:573 ../IkiWiki/Plugin/websetup.pm:269
+#: ../IkiWiki/Plugin/comments.pm:570 ../IkiWiki/Plugin/websetup.pm:269
 msgid "you are not logged in as an admin"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:625
+#: ../IkiWiki/Plugin/comments.pm:622
 msgid "Comment moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:665
+#: ../IkiWiki/Plugin/comments.pm:663
 msgid "comment moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:828
+#: ../IkiWiki/Plugin/comments.pm:826
 #, perl-format
 msgid "%i comment"
 msgid_plural "%i comments"
@@ -278,7 +278,7 @@ msgstr[1] ""
 #. translators: Here "Comment" is a verb;
 #. translators: the user clicks on it to
 #. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:838
+#: ../IkiWiki/Plugin/comments.pm:836
 msgid "Comment"
 msgstr ""
 
@@ -313,9 +313,9 @@ msgstr ""
 msgid "creating %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:332
-#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:388
-#: ../IkiWiki/Plugin/editpage.pm:430
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
+#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:387
+#: ../IkiWiki/Plugin/editpage.pm:429
 #, perl-format
 msgid "editing %s"
 msgstr ""
@@ -359,26 +359,26 @@ msgstr ""
 msgid "%s is an attachment, not a page."
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:766 ../IkiWiki/Plugin/git.pm:829
-#: ../IkiWiki.pm:1580
+#: ../IkiWiki/Plugin/git.pm:776 ../IkiWiki/Plugin/git.pm:839
+#: ../IkiWiki.pm:1634
 #, perl-format
 msgid "you are not allowed to change %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:788
+#: ../IkiWiki/Plugin/git.pm:798
 #, perl-format
 msgid "you cannot act on a file with mode %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:792
+#: ../IkiWiki/Plugin/git.pm:802
 msgid "you are not allowed to change file modes"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:863
+#: ../IkiWiki/Plugin/git.pm:872
 msgid "you are not allowed to revert a merge"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:879
+#: ../IkiWiki/Plugin/git.pm:891
 #, perl-format
 msgid "Failed to revert commit %s"
 msgstr ""
@@ -396,17 +396,17 @@ msgstr ""
 msgid "prog not a valid graphviz program"
 msgstr ""
 
-#: ../IkiWiki/Plugin/highlight.pm:64
+#: ../IkiWiki/Plugin/highlight.pm:88
 #, perl-format
 msgid "tohighlight contains unknown file type '%s'"
 msgstr ""
 
-#: ../IkiWiki/Plugin/highlight.pm:75
+#: ../IkiWiki/Plugin/highlight.pm:99
 #, perl-format
 msgid "Source code: %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/highlight.pm:155
+#: ../IkiWiki/Plugin/highlight.pm:184
 msgid ""
 "warning: highlight perl module not available; falling back to pass through"
 msgstr ""
@@ -504,7 +504,7 @@ msgstr ""
 msgid "redir cycle is not allowed"
 msgstr ""
 
-#: ../IkiWiki/Plugin/meta.pm:400
+#: ../IkiWiki/Plugin/meta.pm:405
 msgid "sort=meta requires a parameter"
 msgstr ""
 
@@ -616,70 +616,70 @@ msgid ""
 "po_link_to=default"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:455
+#: ../IkiWiki/Plugin/po.pm:456
 msgid "updated PO files"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:478
+#: ../IkiWiki/Plugin/po.pm:479
 msgid ""
 "Can not remove a translation. If the master page is removed, however, its "
 "translations will be removed as well."
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:498
+#: ../IkiWiki/Plugin/po.pm:499
 msgid ""
 "Can not rename a translation. If the master page is renamed, however, its "
 "translations will be renamed as well."
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:935
+#: ../IkiWiki/Plugin/po.pm:941
 #, perl-format
 msgid "POT file (%s) does not exist"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:949
+#: ../IkiWiki/Plugin/po.pm:955
 #, perl-format
 msgid "failed to copy underlay PO file to %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:958
+#: ../IkiWiki/Plugin/po.pm:964
 #, perl-format
 msgid "failed to update %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:964
+#: ../IkiWiki/Plugin/po.pm:970
 #, perl-format
 msgid "failed to copy the POT file to %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:1000
+#: ../IkiWiki/Plugin/po.pm:1006
 msgid "N/A"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:1011
+#: ../IkiWiki/Plugin/po.pm:1017
 #, perl-format
 msgid "failed to translate %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:1090
+#: ../IkiWiki/Plugin/po.pm:1096
 msgid "removed obsolete PO files"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:1147 ../IkiWiki/Plugin/po.pm:1159
-#: ../IkiWiki/Plugin/po.pm:1198
+#: ../IkiWiki/Plugin/po.pm:1153 ../IkiWiki/Plugin/po.pm:1165
+#: ../IkiWiki/Plugin/po.pm:1204
 #, perl-format
 msgid "failed to write %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:1157
+#: ../IkiWiki/Plugin/po.pm:1163
 msgid "failed to translate"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:1210
+#: ../IkiWiki/Plugin/po.pm:1216
 msgid "invalid gettext data, go back to previous page to continue edit"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:1252
+#: ../IkiWiki/Plugin/po.pm:1258
 #, perl-format
 msgid "%s has invalid syntax: must use CODE|NAME"
 msgstr ""
@@ -791,7 +791,7 @@ msgstr ""
 msgid "confirm reversion of %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/recentchangesdiff.pm:37
+#: ../IkiWiki/Plugin/recentchangesdiff.pm:36
 msgid "(Diff truncated)"
 msgstr ""
 
@@ -889,7 +889,7 @@ msgstr ""
 msgid "need Digest::SHA to index %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/search.pm:232
+#: ../IkiWiki/Plugin/search.pm:233
 msgid "search"
 msgstr ""
 
@@ -972,7 +972,7 @@ msgstr ""
 msgid "parse fail at line %d: %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/tag.pm:83
+#: ../IkiWiki/Plugin/tag.pm:94
 #, perl-format
 msgid "creating tag page %s"
 msgstr ""
@@ -1148,13 +1148,13 @@ msgid "wrapper filename not specified"
 msgstr ""
 
 #. translators: The parameter is a C filename.
-#: ../IkiWiki/Wrapper.pm:219
+#: ../IkiWiki/Wrapper.pm:220
 #, perl-format
 msgid "failed to compile %s"
 msgstr ""
 
 #. translators: The parameter is a filename.
-#: ../IkiWiki/Wrapper.pm:239
+#: ../IkiWiki/Wrapper.pm:240
 #, perl-format
 msgid "successfully generated %s"
 msgstr ""
@@ -1187,49 +1187,49 @@ msgstr ""
 msgid "Discussion"
 msgstr ""
 
-#: ../IkiWiki.pm:538
+#: ../IkiWiki.pm:544
 msgid "Must specify url to wiki with --url when using --cgi"
 msgstr ""
 
-#: ../IkiWiki.pm:584
+#: ../IkiWiki.pm:616
 msgid "cannot use multiple rcs plugins"
 msgstr ""
 
-#: ../IkiWiki.pm:614
+#: ../IkiWiki.pm:646
 #, perl-format
 msgid "failed to load external plugin needed for %s plugin: %s"
 msgstr ""
 
-#: ../IkiWiki.pm:1352
+#: ../IkiWiki.pm:1406
 #, perl-format
 msgid "preprocessing loop detected on %s at depth %i"
 msgstr ""
 
-#: ../IkiWiki.pm:1536
+#: ../IkiWiki.pm:1590
 #, perl-format
 msgid "bad file name %s"
 msgstr ""
 
-#: ../IkiWiki.pm:1836
+#: ../IkiWiki.pm:1890
 #, perl-format
 msgid "template %s not found"
 msgstr ""
 
-#: ../IkiWiki.pm:2118
+#: ../IkiWiki.pm:2140
 msgid "yes"
 msgstr ""
 
-#: ../IkiWiki.pm:2195
+#: ../IkiWiki.pm:2217
 #, perl-format
 msgid "invalid sort type %s"
 msgstr ""
 
-#: ../IkiWiki.pm:2216
+#: ../IkiWiki.pm:2238
 #, perl-format
 msgid "unknown sort type %s"
 msgstr ""
 
-#: ../IkiWiki.pm:2352
+#: ../IkiWiki.pm:2374
 #, perl-format
 msgid "cannot match pages: %s"
 msgstr ""