]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge remote-tracking branch 'mhameed/html_lang_and_dir'
authorJoey Hess <joey@kitenet.net>
Sun, 23 Feb 2014 18:06:40 +0000 (14:06 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 23 Feb 2014 18:06:40 +0000 (14:06 -0400)
137 files changed:
IkiWiki.pm
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/git.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/openid.pm
IkiWiki/Plugin/osm.pm
IkiWiki/Plugin/pinger.pm
IkiWiki/Plugin/poll.pm
IkiWiki/Plugin/search.pm
IkiWiki/Render.pm
IkiWiki/Wrapper.pm
Makefile.PL
debian/changelog
debian/control
doc/bugs/Webedits_without_comment_don__39__t_make_it_through_git.mdwn [new file with mode: 0644]
doc/bugs/aggregate_plugin_should_honour_a_post__39__s_mctime.mdwn
doc/bugs/assumes___34__git_push_origin__34___is_sufficient.mdwn [new file with mode: 0644]
doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn [new file with mode: 0644]
doc/bugs/cannot_decode_wide_characters_error_with_utf-8_encoding.mdwn [new file with mode: 0644]
doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn [new file with mode: 0644]
doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn [new file with mode: 0644]
doc/bugs/do_not_let_big_brother_spy_on_our_users_on_login.mdwn
doc/bugs/editing_gitbranch_template_is_really_slow.mdwn [new file with mode: 0644]
doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn [new file with mode: 0644]
doc/bugs/listdirectives_doesn__39__t_register_a_link.mdwn
doc/bugs/notifyemail_fails_with_some_openid_providers.mdwn
doc/bugs/pages_under_templates_are_invalid.mdwn
doc/bugs/po:_po4a_too_strict_on_html_pages.mdwn
doc/bugs/poll_in_inline.mdwn [new file with mode: 0644]
doc/bugs/preprocessing_loop_control_too_tight.mdwn
doc/bugs/structured_config_data_is_mangled.mdwn [new file with mode: 0644]
doc/bugs/syslog_fails_with_non-ASCII_wikinames.mdwn
doc/bugs/template__95__syntax_test_is_incomplete.mdwn [new file with mode: 0644]
doc/bugs/template_creation_error.mdwn
doc/bugs/utf8_warnings_are_meaningless.mdwn [new file with mode: 0644]
doc/bugs/yaml:xs_codependency_not_listed.mdwn
doc/examples/blog/posts/Test.html [deleted file]
doc/forum/Cannot_write_to_commitlock.mdwn
doc/forum/Dot_CGI_pointing_to_localhost._What_happened__63__.mdwn [new file with mode: 0644]
doc/forum/Dot_CGI_pointing_to_localhost._What_happened__63__/comment_1_cbab9b95923124b39cfccf5d2e88070c._comment [new file with mode: 0644]
doc/forum/Force_rebuild_of_page_using_some_plugin.mdwn [new file with mode: 0644]
doc/forum/How_can_I_invert_the_banned__95__user_check__63__.mdwn [new file with mode: 0644]
doc/forum/How_to_suppress_sidebar_for_a_particular_page__63__.mdwn [new file with mode: 0644]
doc/forum/Remove_tags_and_backlinks_on_particular_pages__63__.mdwn [new file with mode: 0644]
doc/forum/Template_variables/comment_2_9b366736171e45d5afd8247ff38501d1._comment [new file with mode: 0644]
doc/forum/Template_variables/comment_3_727f8a407dc57e4abf48cdcec4ead666._comment [new file with mode: 0644]
doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https.mdwn [new file with mode: 0644]
doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_1_ef4be9e70bd6d8c970fd8982f525d2d0._comment [new file with mode: 0644]
doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_2_00fee67cc30b7c337710b37c27216a68._comment [new file with mode: 0644]
doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron.mdwn [new file with mode: 0644]
doc/forum/converting_binary_files.mdwn [new file with mode: 0644]
doc/forum/download_links_for_attachments/comment_1_19fe525281e38d3bbe45b31248ca7880._comment [new file with mode: 0644]
doc/forum/download_links_for_attachments/comment_2_06231e4ddc271260e51bc371637540de._comment [new file with mode: 0644]
doc/forum/download_links_for_attachments/comment_3_64d12928bc24c48d6f0b5fbb2dfd8f6d._comment [new file with mode: 0644]
doc/forum/download_links_for_attachments/comment_4_7612923064284646c2ed59e2cd52845d._comment [new file with mode: 0644]
doc/forum/formating:_how_to_align_text_to_the_right.mdwn
doc/forum/ikiwiki.info_blogspam_problem.mdwn [new file with mode: 0644]
doc/forum/ikiwiki.info_blogspam_problem/comment_1_893a2f561ead36b531e2d6c887e6aaba._comment [new file with mode: 0644]
doc/forum/ikiwiki_+_mathjax/comment_4_873adec726e9b70394643ff28094ad39._comment [new file with mode: 0644]
doc/forum/ikiwiki_+_mathjax/comment_5_f601e3f1c78345e4d80ec3ce62784e6f._comment [new file with mode: 0644]
doc/forum/ikiwiki_+_mathjax/comment_6_305fddcd1e264b92d7ed7153ba27ce07._comment [new file with mode: 0644]
doc/forum/ikiwiki_and_big_files/comment_5_3532b14ee10775dac634792c75a30e89._comment [new file with mode: 0644]
doc/forum/ikiwiki_not_usable_when_installed_with_toast___40__because_of_symlinks__41__.mdwn [new file with mode: 0644]
doc/forum/inject__95__preprocess__95__tag.mdwn [new file with mode: 0644]
doc/ikiwiki/directive/edittemplate.mdwn
doc/ikiwiki/directive/edittemplate/discussion.mdwn [new file with mode: 0644]
doc/ikiwiki/directive/inline.mdwn
doc/ikiwiki/directive/toggle/discussion.mdwn [new file with mode: 0644]
doc/ikiwikiusers.mdwn
doc/news/version_3.20130518.mdwn [deleted file]
doc/news/version_3.20130710.mdwn [deleted file]
doc/news/version_3.20140102.mdwn [new file with mode: 0644]
doc/news/version_3.20140125.mdwn [new file with mode: 0644]
doc/pagehistory.mdwn
doc/plugins/contrib/addtag.mdwn [new file with mode: 0644]
doc/plugins/contrib/album/discussion.mdwn
doc/plugins/contrib/cowsay.mdwn [new file with mode: 0644]
doc/plugins/contrib/created_in_future.mdwn
doc/plugins/contrib/created_in_future/discussion.mdwn [new file with mode: 0644]
doc/plugins/contrib/irclog.mdwn [new file with mode: 0644]
doc/plugins/contrib/jscalendar.mdwn
doc/plugins/contrib/monthcalendar.mdwn
doc/plugins/contrib/nimble.mdwn [new file with mode: 0644]
doc/plugins/contrib/parenttag.mdwn [new file with mode: 0644]
doc/plugins/contrib/sidebar2.mdwn [new file with mode: 0644]
doc/plugins/contrib/taskreport.mdwn [new file with mode: 0644]
doc/plugins/recentchangesdiff/discussion.mdwn [new file with mode: 0644]
doc/plugins/search.mdwn
doc/plugins/transient.mdwn
doc/plugins/wmd/discussion.mdwn
doc/plugins/write.mdwn
doc/roadmap.mdwn
doc/sandbox.mdwn
doc/sandbox/New_blog_entry.mdwn [new file with mode: 0644]
doc/sandbox/Test.py [new file with mode: 0644]
doc/spam_fighting.mdwn
doc/style.css
doc/templates/gitbranch.mdwn
doc/tips/Hosting_Ikiwiki_and_master_git_repository_on_different_machines.mdwn
doc/tips/convert_mediawiki_to_ikiwiki.mdwn
doc/tips/dot_cgi.mdwn
doc/tips/laptop_wiki_with_git.mdwn
doc/tips/optimising_ikiwiki.mdwn
doc/todo/Option_linktext_for_pagestats_directive.mdwn [new file with mode: 0644]
doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn [new file with mode: 0644]
doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn [new file with mode: 0644]
doc/todo/attachments.mdwn
doc/todo/auto_publish_expire.mdwn
doc/todo/bitcoin_URI_scheme.mdwn [new file with mode: 0644]
doc/todo/bugs-everywhere_integration.mdwn [new file with mode: 0644]
doc/todo/clear_page_to_delete.mdwn
doc/todo/edittemplate_should_support_uuid__44___date_variables.mdwn
doc/todo/expose_html_language_and_direction.mdwn [new file with mode: 0644]
doc/todo/fastcgi_or_modperl_installation_instructions.mdwn
doc/todo/git-annex_support.mdwn
doc/todo/git-annex_support/discussion.mdwn
doc/todo/missingparents.pm.mdwn
doc/todo/optimisation_via_git_log.mdwn [new file with mode: 0644]
doc/todo/osm__95__optimisations__95__and__95__fixes.mdwn
doc/todo/pagedown_plugin/discussion.mdwn [new file with mode: 0644]
doc/todo/po:_better_translation_interface.mdwn
doc/todo/po:_remove_po_files_when_disabling_plugin.mdwn
doc/todo/polltrails.mdwn [new file with mode: 0644]
doc/todo/publishing_in_the_future.mdwn
doc/todo/sortable_tables.mdwn
doc/todo/support_linking_to_cgit.mdwn
doc/todo/tagging_with_a_publication_date.mdwn
doc/users/holger.mdwn [new file with mode: 0644]
doc/users/smcv.mdwn
doc/users/smcv/yesplease.mdwn [new file with mode: 0644]
doc/users/spalax.mdwn [new file with mode: 0644]
ikiwiki.spec
po/ikiwiki.pot
t/index.t
t/podcast.t
templates/aggregatepost.tmpl

index 87ddb1b5643dc279a5a5ea037b9c7ce398d69ba2..eb480969bd6fc0b72565a09fbb607a97fb94d52d 100644 (file)
@@ -14,7 +14,7 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase
        %pagestate %wikistate %renderedfiles %oldrenderedfiles
        %pagesources %delpagesources %destsources %depends %depends_simple
        @mass_depends %hooks %forcerebuild %loaded_plugins %typedlinks
-       %oldtypedlinks %autofiles};
+       %oldtypedlinks %autofiles @underlayfiles $lastrev};
 
 use Exporter q{import};
 our @EXPORT = qw(hook debug error htmlpage template template_depends
@@ -134,6 +134,13 @@ sub getsetup () {
                safe => 1,
                rebuild => 0,
        },
+       only_committed_changes => {
+               type => "boolean",
+               default => 0,
+               description => "enable optimization of only refreshing committed changes?",
+               safe => 1,
+               rebuild => 0,
+       },
        rcs => {
                type => "string",
                default => '',
@@ -520,6 +527,14 @@ sub getsetup () {
                safe => 0, # hooks into perl module internals
                rebuild => 0,
        },
+       useragent => {
+               type => "string",
+               default => undef,
+               example => "Wget/1.13.4 (linux-gnu)",
+               description => "set custom user agent string for outbound HTTP requests e.g. when fetching aggregated RSS feeds",
+               safe => 0,
+               rebuild => 0,
+       },
 }
 
 sub defaultconfig () {
@@ -1781,7 +1796,8 @@ sub enable_commit_hook () {
 
 sub loadindex () {
        %oldrenderedfiles=%pagectime=();
-       if (! $config{rebuild}) {
+       my $rebuild=$config{rebuild};
+       if (! $rebuild) {
                %pagesources=%pagemtime=%oldlinks=%links=%depends=
                %destsources=%renderedfiles=%pagecase=%pagestate=
                %depends_simple=%typedlinks=%oldtypedlinks=();
@@ -1821,10 +1837,16 @@ sub loadindex () {
 
        foreach my $src (keys %$pages) {
                my $d=$pages->{$src};
-               my $page=pagename($src);
+               my $page;
+               if (exists $d->{page} && ! $rebuild) {
+                       $page=$d->{page};
+               }
+               else {
+                       $page=pagename($src);
+               }
                $pagectime{$page}=$d->{ctime};
                $pagesources{$page}=$src;
-               if (! $config{rebuild}) {
+               if (! $rebuild) {
                        $pagemtime{$page}=$d->{mtime};
                        $renderedfiles{$page}=$d->{dest};
                        if (exists $d->{links} && ref $d->{links}) {
@@ -1874,6 +1896,8 @@ sub loadindex () {
        foreach my $page (keys %renderedfiles) {
                $destsources{$_}=$page foreach @{$renderedfiles{$page}};
        }
+       $lastrev=$index->{lastrev};
+       @underlayfiles=@{$index->{underlayfiles}} if ref $index->{underlayfiles};
        return close($in);
 }
 
@@ -1895,6 +1919,7 @@ sub saveindex () {
                my $src=$pagesources{$page};
 
                $index{page}{$src}={
+                       page => $page,
                        ctime => $pagectime{$page},
                        mtime => $pagemtime{$page},
                        dest => $renderedfiles{$page},
@@ -1914,11 +1939,7 @@ sub saveindex () {
                }
 
                if (exists $pagestate{$page}) {
-                       foreach my $id (@plugins) {
-                               foreach my $key (keys %{$pagestate{$page}{$id}}) {
-                                       $index{page}{$src}{state}{$id}{$key}=$pagestate{$page}{$id}{$key};
-                               }
-                       }
+                       $index{page}{$src}{state}=$pagestate{$page};
                }
        }
 
@@ -1930,6 +1951,9 @@ sub saveindex () {
                }
        }
        
+       $index{lastrev}=$lastrev;
+       $index{underlayfiles}=\@underlayfiles;
+
        $index{version}="3";
        my $ret=Storable::nstore_fd(\%index, $out);
        return if ! defined $ret || ! $ret;
@@ -2285,6 +2309,7 @@ sub useragent () {
        return LWP::UserAgent->new(
                cookie_jar => $config{cookiejar},
                env_proxy => 1,         # respect proxy env vars
+               agent => $config{useragent},
        );
 }
 
index 3e3eb6d9301da377b6a72128cde42f25a41da34c..28c445913f436e8ee7269fb1b3eea6ca35351bab 100644 (file)
@@ -628,12 +628,12 @@ sub add_page (@) {
                       -e "$config{srcdir}/".htmlfn($page.$c)) {
                        $c++
                }
+               $page=$page.$c;
 
                $guid->{page}=$page;
                eval { write_page($feed, $guid, $mtime, \%params) };
                if ($@) {
                        # assume failure was due to a too long filename
-                       # (or o
                        $c="";
                        $page=$feed->{dir}."/item";
                        while (exists $IkiWiki::pagecase{lc $page.$c} ||
@@ -641,6 +641,7 @@ sub add_page (@) {
                              -e "$config{srcdir}/".htmlfn($page.$c)) {
                                $c++
                        }
+                       $page=$page.$c;
 
                        $guid->{page}=$page;
                        write_page($feed, $guid, $mtime, \%params);
index 1ef79a27a958a77dde14f75dd34b1b5c75dd5763..a0ca9f32e484090969fbfa605875268cd112e9d8 100644 (file)
@@ -35,6 +35,7 @@ sub import {
        # Load goto to fix up user page links for logged-in commenters
        IkiWiki::loadplugin("goto");
        IkiWiki::loadplugin("inline");
+       IkiWiki::loadplugin("transient");
 }
 
 sub getsetup () {
@@ -104,6 +105,9 @@ sub getsetup () {
 sub checkconfig () {
        $config{comments_commit} = 1
                unless defined $config{comments_commit};
+       if (! $config{comments_commit}) {
+               $config{only_committed_changes}=0;
+       }
        $config{comments_pagespec} = ''
                unless defined $config{comments_pagespec};
        $config{comments_closed_pagespec} = ''
@@ -552,8 +556,8 @@ sub editcomment ($$) {
                $postcomment=0;
 
                if (! $ok) {
-                       $location=unique_comment_location($page, $content, $config{srcdir}, "._comment_pending");
-                       writefile("$location._comment_pending", $config{srcdir}, $content);
+                       $location=unique_comment_location($page, $content, $IkiWiki::Plugin::transient::transientdir, "._comment_pending");
+                       writefile("$location._comment_pending", $IkiWiki::Plugin::transient::transientdir, $content);
 
                        # Refresh so anything that deals with pending
                        # comments can be updated.
@@ -678,12 +682,17 @@ sub commentmoderation ($$) {
                                }
 
                                my $page=IkiWiki::dirname($f);
-                               my $file="$config{srcdir}/$f";
-                               my $filedir=$config{srcdir};
+                               my $filedir=$IkiWiki::Plugin::transient::transientdir;
+                               my $file="$filedir/$f";
                                if (! -e $file) {
                                        # old location
-                                       $file="$config{wikistatedir}/comments_pending/".$f;
-                                       $filedir="$config{wikistatedir}/comments_pending";
+                                       $file="$config{srcdir}/$f";
+                                       $filedir=$config{srcdir};
+                                       if (! -e $file) {
+                                               # older location
+                                               $file="$config{wikistatedir}/comments_pending/".$f;
+                                               $filedir="$config{wikistatedir}/comments_pending";
+                                       }
                                }
 
                                if ($action eq 'Accept') {
@@ -797,6 +806,8 @@ sub comments_pending () {
                chdir($origdir) || die "chdir $origdir: $!";
        };
        
+       $find_comments->($IkiWiki::Plugin::transient::transientdir, "._comment_pending");
+       # old location
        $find_comments->($config{srcdir}, "._comment_pending");
        # old location
        $find_comments->("$config{wikistatedir}/comments_pending/",
index bbdcbdba82aba3b4c6499245e5d8f6bc9f041285..77c0678bcbd8dfd32c13b164477ea899d0c9f38a 100644 (file)
@@ -29,6 +29,8 @@ sub import {
        hook(type => "rcs", id => "rcs_receive", call => \&rcs_receive);
        hook(type => "rcs", id => "rcs_preprevert", call => \&rcs_preprevert);
        hook(type => "rcs", id => "rcs_revert", call => \&rcs_revert);
+       hook(type => "rcs", id => "rcs_find_changes", call => \&rcs_find_changes);
+       hook(type => "rcs", id => "rcs_get_current_rev", call => \&rcs_get_current_rev);
 }
 
 sub checkconfig () {
@@ -462,19 +464,56 @@ sub git_commit_info ($;$) {
        return wantarray ? @ci : $ci[0];
 }
 
-sub git_sha1 (;$) {
-       # Return head sha1sum (of given file).
-       my $file = shift || q{--};
+sub rcs_find_changes ($) {
+       my $oldrev=shift;
 
+       my @raw_lines = run_or_die('git', 'log',
+               '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c',
+               '--no-renames', , '--reverse',
+               '-r', "$oldrev..HEAD", '--', '.');
+
+       # Due to --reverse, we see changes in chronological order.
+       my %changed;
+       my %deleted;
+       my $nullsha = 0 x 40;
+       my $newrev=$oldrev;
+       while (my $ci = parse_diff_tree(\@raw_lines)) {
+               $newrev=$ci->{sha1};
+               foreach my $i (@{$ci->{details}}) {
+                       my $file=$i->{file};
+                       if ($i->{sha1_to} eq $nullsha) {
+                               delete $changed{$file};
+                               $deleted{$file}=1;
+                       }
+                       else {
+                               delete $deleted{$file};
+                               $changed{$file}=1;
+                       }
+               }
+       }
+
+       return (\%changed, \%deleted, $newrev);
+}
+
+sub git_sha1_file ($) {
+       my $file=shift;
+       git_sha1("--", $file);
+}
+
+sub git_sha1 (@) {
        # Ignore error since a non-existing file might be given.
        my ($sha1) = run_or_non('git', 'rev-list', '--max-count=1', 'HEAD',
-               '--', $file);
+               '--', @_);
        if (defined $sha1) {
                ($sha1) = $sha1 =~ m/($sha1_pattern)/; # sha1 is untainted now
        }
        return defined $sha1 ? $sha1 : '';
 }
 
+sub rcs_get_current_rev () {
+       git_sha1();
+}
+
 sub rcs_update () {
        # Update working directory.
 
@@ -488,7 +527,7 @@ sub rcs_prepedit ($) {
        # This will be later used in rcs_commit if a merge is required.
        my ($file) = @_;
 
-       return git_sha1($file);
+       return git_sha1_file($file);
 }
 
 sub rcs_commit (@) {
@@ -499,7 +538,7 @@ sub rcs_commit (@) {
 
        # Check to see if the page has been changed by someone else since
        # rcs_prepedit was called.
-       my $cur    = git_sha1($params{file});
+       my $cur    = git_sha1_file($params{file});
        my ($prev) = $params{token} =~ /^($sha1_pattern)$/; # untaint
 
        if (defined $cur && defined $prev && $cur ne $prev) {
index 455ac3ad55f4d468c80e5234816ba599f3527a33..0380bec3d6cd9948ec92229117ea3655212af59a 100644 (file)
@@ -186,6 +186,13 @@ sub preprocess_inline (@) {
        if (! exists $params{feedshow} && exists $params{show}) {
                $params{feedshow}=$params{show};
        }
+       my $title;
+       if (exists $params{title}) {
+               $title = $params{title};
+       }
+       else {
+               $title = $params{page} ne "index" ? pagetitle($params{page}) : $config{wikiname};
+       }
        my $desc;
        if (exists $params{description}) {
                $desc = $params{description} 
@@ -465,7 +472,7 @@ sub preprocess_inline (@) {
                        if (! $params{preview}) {
                                writefile($rssp, $config{destdir},
                                        genfeed("rss",
-                                               $config{url}."/".$rssp, $desc, $params{guid}, $params{page}, @feedlist));
+                                               $config{url}."/".$rssp, $title, $desc, $params{guid}, $params{page}, @feedlist));
                                $toping{$params{destpage}}=1 unless $config{rebuild};
                                $feedlinks{$params{destpage}}.=qq{<link rel="alternate" type="application/rss+xml" title="$rssdesc" href="$rssurl" />};
                        }
@@ -475,7 +482,7 @@ sub preprocess_inline (@) {
                        will_render($params{destpage}, $atomp);
                        if (! $params{preview}) {
                                writefile($atomp, $config{destdir},
-                                       genfeed("atom", $config{url}."/".$atomp, $desc, $params{guid}, $params{page}, @feedlist));
+                                       genfeed("atom", $config{url}."/".$atomp, $title, $desc, $params{guid}, $params{page}, @feedlist));
                                $toping{$params{destpage}}=1 unless $config{rebuild};
                                $feedlinks{$params{destpage}}.=qq{<link rel="alternate" type="application/atom+xml" title="$atomdesc" href="$atomurl" />};
                        }
@@ -634,6 +641,7 @@ sub genenclosure {
 sub genfeed ($$$$$@) {
        my $feedtype=shift;
        my $feedurl=shift;
+        my $feedtitle=shift;
        my $feeddesc=shift;
        my $guid=shift;
        my $page=shift;
@@ -699,7 +707,7 @@ sub genfeed ($$$$$@) {
 
        my $template=template_depends($feedtype."page.tmpl", $page, blind_cache => 1);
        $template->param(
-               title => $page ne "index" ? pagetitle($page) : $config{wikiname},
+               title => $feedtitle,
                wikiname => $config{wikiname},
                pageurl => $url,
                content => $content,
index d369e30c995277f8a5e7f5bccdd5cd17dbcea0aa..3b96e4b8e411c5f29afc25b58e15cdfd9f70121d 100644 (file)
@@ -238,7 +238,7 @@ sub getobj ($$) {
        my $ua;
        eval q{use LWPx::ParanoidAgent};
        if (! $@) {
-               $ua=LWPx::ParanoidAgent->new;
+               $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
        }
        else {
                $ua=useragent();
index c9650d014aa1348f9c83efb77e87c76f20620452..472e26945a75575215218294c2a01cc68748bbf3 100644 (file)
@@ -507,7 +507,7 @@ sub include_javascript ($) {
                }
        }
        if ($loader) {
-               return embed_map_code($page) . "<script type=\"text/javascript\" charset=\"utf-8\">$loader</script>";
+               return embed_map_code($page) . "<script type=\"text/javascript\">$loader</script>";
        }
        else {
                return '';
@@ -534,7 +534,7 @@ sub cgi($) {
        print "<html><body>";
        print "<div id=\"mapdiv-$map\"></div>";
        print embed_map_code();
-       print "<script type=\"text/javascript\" charset=\"utf-8\">";
+       print "<script type=\"text/javascript\">";
        print map_setup_code($map, $map,
                lat => "urlParams['lat']",
                lon => "urlParams['lon']",
@@ -589,6 +589,7 @@ sub map_setup_code($;@) {
        }
         $options{'layers'} = $config{osm_layers};
 
+       $name=~s/'//g; # $name comes from user input
        return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
 }
 
index fb0f3ba0aa9cf9676f95eaded1f4569504015c99..b2d54af8ac269cd63e95913073919cfd2b496052 100644 (file)
@@ -72,7 +72,7 @@ sub ping {
                my $ua;
                eval q{use LWPx::ParanoidAgent};
                if (!$@) {
-                       $ua=LWPx::ParanoidAgent->new;
+                       $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
                }
                else {
                        eval q{use LWP};
index 32756a5712301cb6977f498dd61d99ebea054d71..3bd4af2060111ed4dbe12e3262c0f1e200ca6ba7 100644 (file)
@@ -30,7 +30,7 @@ sub preprocess (@) {
        my $showtotal=IkiWiki::yesno($params{total});
        my $showpercent=IkiWiki::yesno($params{percent});
        my $expandable=IkiWiki::yesno($params{expandable});
-       $pagenum{$params{page}}++;
+       my $num=++$pagenum{$params{page}}{$params{destpage}};
 
        my %choices;
        my @choices;
@@ -66,7 +66,7 @@ sub preprocess (@) {
                }
                if ($open && exists $config{cgiurl}) {
                        $ret.="<input type=\"hidden\" name=\"do\" value=\"poll\" />\n";
-                       $ret.="<input type=\"hidden\" name=\"num\" value=\"$pagenum{$params{page}}\" />\n";
+                       $ret.="<input type=\"hidden\" name=\"num\" value=\"$num\" />\n";
                        $ret.="<input type=\"hidden\" name=\"page\" value=\"$params{page}\" />\n";
                        $ret.="<input type=\"hidden\" name=\"choice\" value=\"$choice\" />\n";
                        $ret.="<input type=\"submit\" value=\"".gettext("vote")."\" />\n";
@@ -81,7 +81,7 @@ sub preprocess (@) {
                $ret.="<p>\n";
                $ret.="<form method=\"POST\" action=\"".IkiWiki::cgiurl()."\">\n";
                $ret.="<input type=\"hidden\" name=\"do\" value=\"poll\" />\n";
-               $ret.="<input type=\"hidden\" name=\"num\" value=\"$pagenum{$params{page}}\" />\n";
+               $ret.="<input type=\"hidden\" name=\"num\" value=\"$num\" />\n";
                $ret.="<input type=\"hidden\" name=\"page\" value=\"$params{page}\" />\n";
                $ret.=gettext("Write in").": <input name=\"choice\" size=50 />\n";
                $ret.="<input type=\"submit\" value=\"".gettext("vote")."\" />\n";
index 42d2e0d3009d9e190fa78790f581c536355a8d70..24b16fe2a78c4607f89788cd78ea1d7e5a1ac137 100644 (file)
@@ -33,6 +33,13 @@ sub getsetup () {
                        safe => 0, # external program
                        rebuild => 0,
                },
+               google_search => {
+                       type => "booblean",
+                       example => 1,
+                       description => "use google site search rather than internal xapian index?",
+                       safe => 1,
+                       rebuild => 0,
+               },
 }
 
 sub checkconfig () {
@@ -75,6 +82,8 @@ my $stemmer;
 sub indexhtml (@) {
        my %params=@_;
 
+       return if $config{google_search};
+
        setupfiles();
 
        # A unique pageterm is used to identify the document for a page.
@@ -165,6 +174,8 @@ sub indexhtml (@) {
 }
 
 sub delete (@) {
+       return if $config{google_search};
+
        my $db=xapiandb();
        foreach my $page (@_) {
                my $pageterm=pageterm(pagename($page));
@@ -176,14 +187,20 @@ sub cgi ($) {
        my $cgi=shift;
 
        if (defined $cgi->param('P')) {
-               # only works for GET requests
-               chdir("$config{wikistatedir}/xapian") || error("chdir: $!");
-               $ENV{OMEGA_CONFIG_FILE}="./omega.conf";
-               $ENV{CGIURL}=IkiWiki::cgiurl();
-               IkiWiki::loadindex();
-               $ENV{HELPLINK}=htmllink("", "", "ikiwiki/searching",
-                       noimageinline => 1, linktext => "Help");
-               exec($config{omega_cgi}) || error("$config{omega_cgi} failed: $!");
+               if ($config{google_search}) {
+                       print $cgi->redirect("https://www.google.com/search?sitesearch=$config{url}&q=".$cgi->param('P'));
+                       exit 0;
+               }
+               else {
+                       # only works for GET requests
+                       chdir("$config{wikistatedir}/xapian") || error("chdir: $!");
+                       $ENV{OMEGA_CONFIG_FILE}="./omega.conf";
+                       $ENV{CGIURL}=IkiWiki::cgiurl();
+                       IkiWiki::loadindex();
+                       $ENV{HELPLINK}=htmllink("", "", "ikiwiki/searching",
+                               noimageinline => 1, linktext => "Help");
+                       exec($config{omega_cgi}) || error("$config{omega_cgi} failed: $!");
+               }
        }
 }
 
index 58b374ad75c10896f06bb2105475c86b6747b40d..fa2940b01ce23e5f988f9c9176c4a775c2171e53 100644 (file)
@@ -287,9 +287,22 @@ sub srcdir_check () {
        
 }
 
-sub find_src_files () {
+# Finds all files in the srcdir, and the underlaydirs.
+# Returns the files, and their corresponding pages.
+#
+# When run in only_underlay mode, adds only the underlay files to
+# the files and pages passed in.
+sub find_src_files (;$$$) {
+       my $only_underlay=shift;
        my @files;
+       if (defined $_[0]) {
+               @files=@{shift()};
+       }
        my %pages;
+       if (defined $_[0]) {
+               %pages=%{shift()};
+       }
+
        eval q{use File::Find};
        error($@) if $@;
 
@@ -297,6 +310,8 @@ sub find_src_files () {
        die $@ if $@;
        my $origdir=getcwd();
        my $abssrcdir=Cwd::abs_path($config{srcdir});
+       
+       @IkiWiki::underlayfiles=();
 
        my ($page, $underlay);
        my $helper=sub {
@@ -323,6 +338,7 @@ sub find_src_files () {
                        if (! -l "$abssrcdir/$f" && ! -e _) {
                                if (! $pages{$page}) {
                                        push @files, $f;
+                                       push @IkiWiki::underlayfiles, $f;
                                        $pages{$page}=1;
                                }
                        }
@@ -336,12 +352,14 @@ sub find_src_files () {
                }
        };
 
-       chdir($config{srcdir}) || die "chdir $config{srcdir}: $!";
-       find({
-               no_chdir => 1,
-               wanted => $helper,
-       }, '.');
-       chdir($origdir) || die "chdir $origdir: $!";
+       unless ($only_underlay) {
+               chdir($config{srcdir}) || die "chdir $config{srcdir}: $!";
+               find({
+                       no_chdir => 1,
+                       wanted => $helper,
+               }, '.');
+               chdir($origdir) || die "chdir $origdir: $!";
+       }
 
        $underlay=1;
        foreach (@{$config{underlaydirs}}, $config{underlaydir}) {
@@ -357,6 +375,50 @@ sub find_src_files () {
        return \@files, \%pages;
 }
 
+# Given a hash of files that have changed, and a hash of files that were
+# deleted, should return the same results as find_src_files, with the same
+# sanity checks. But a lot faster!
+sub process_changed_files ($$) {
+       my $changed_raw=shift;
+       my $deleted_raw=shift;
+
+       my @files;
+       my %pages;
+
+       foreach my $file (keys %$changed_raw) {
+               my $page = pagename($file);
+               next if ! exists $pagesources{$page} && file_pruned($file);
+               my ($f) = $file =~ /$config{wiki_file_regexp}/; # untaint
+               if (! defined $f) {
+                       warn(sprintf(gettext("skipping bad filename %s"), $file)."\n");
+                       next;
+               }
+               push @files, $f;
+               if ($pages{$page}) {
+                       debug(sprintf(gettext("%s has multiple possible source pages"), $page));
+               }
+               $pages{$page}=1;
+       }
+
+       # So far, we only have the changed files. Now add in all the old
+       # files that were not changed or deleted, excluding ones that came
+       # from the underlay.
+       my %old_underlay;
+       foreach my $f (@IkiWiki::underlayfiles) {
+               $old_underlay{$f}=1;
+       }
+       foreach my $page (keys %pagesources) {
+               my $f=$pagesources{$page};
+               unless ($old_underlay{$f} || exists $pages{$page} || exists $deleted_raw->{$f}) {
+                       $pages{$page}=1;
+                       push @files, $f;
+               }
+       }
+
+       # add in the underlay
+       find_src_files(1, \@files, \%pages);
+}
+
 sub find_new_files ($) {
        my $files=shift;
        my @new;
@@ -762,14 +824,29 @@ sub gen_autofile ($$$) {
        return 1;
 }
 
-
 sub refresh () {
        srcdir_check();
        run_hooks(refresh => sub { shift->() });
-       my ($files, $pages)=find_src_files();
-       my ($new, $internal_new)=find_new_files($files);
-       my ($del, $internal_del)=find_del_files($pages);
-       my ($changed, $internal_changed)=find_changed($files);
+       my ($files, $pages, $new, $internal_new, $del, $internal_del, $changed, $internal_changed);
+       my $want_find_changes=$config{only_committed_changes} &&
+               exists $IkiWiki::hooks{rcs}{rcs_find_changes} &&
+               exists $IkiWiki::hooks{rcs}{rcs_get_current_rev};
+       if (! $config{rebuild} && $want_find_changes && defined $IkiWiki::lastrev && length $IkiWiki::lastrev) {
+               my ($changed_raw, $del_raw);
+               ($changed_raw, $del_raw, $IkiWiki::lastrev) = $IkiWiki::hooks{rcs}{rcs_find_changes}{call}->($IkiWiki::lastrev);
+               ($files, $pages)=process_changed_files($changed_raw, $del_raw);
+       }
+       else {
+               ($files, $pages)=find_src_files();
+       }
+       if ($want_find_changes) {
+               if (! defined($IkiWiki::lastrev) || ! length $IkiWiki::lastrev) {
+                       $IkiWiki::lastrev=$IkiWiki::hooks{rcs}{rcs_get_current_rev}{call}->();
+               }
+       }
+       ($new, $internal_new)=find_new_files($files);
+       ($del, $internal_del)=find_del_files($pages);
+       ($changed, $internal_changed)=find_changed($files);
        my %existingfiles;
        run_hooks(needsbuild => sub {
                my $ret=shift->($changed, [@$del, @$internal_del]);
index 84b4b5a2f298f23bac5d5e223fb4144a7ebd72f1..b46bc6aa9794abdca46f68c8dc753e88daf7019b 100644 (file)
@@ -182,7 +182,7 @@ void addenv(char *var, char *val) {
        newenviron[i++]=s;
 }
 
-set_cgilock_fd (int lockfd) {
+void set_cgilock_fd (int lockfd) {
        char *fd_s=malloc(8);
        sprintf(fd_s, "%i", lockfd);
        setenv("IKIWIKI_CGILOCK_FD", fd_s, 1);
index f1df8bcd3f2dbfa463e3e182c4a295f5b547ff7d..c03142aaea4cd672d935391e5ecce63ba9975bb3 100755 (executable)
@@ -187,5 +187,6 @@ WriteMakefile(
                'HTML::Parser'          => "0",
                'URI'                   => "0",
                'Data::Dumper'          => "2.11",
+               'YAML::XS'              => "0",
        },
 );
index cfcf8a3d9f30e0a80ce2441976dd8cf39182c350..208da2a0f4e1da6d4e2990f11cdd7c50a009320c 100644 (file)
@@ -1,3 +1,45 @@
+ikiwiki (3.20140126) UNRELEASED; urgency=medium
+
+  * Added useragent config setting. Closes: #737121
+    Thanks, Tuomas Jormola
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 01 Feb 2014 16:53:35 -0400
+
+ikiwiki (3.20140125) unstable; urgency=medium
+
+  * inline: Allow overriding the title of the feed. Closes: #735123
+    Thanks, Christophe Rhodes
+  * osm: Escape name parameter. Closes: #731797
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 25 Jan 2014 16:40:32 -0400
+
+ikiwiki (3.20140102) unstable; urgency=low
+
+  * aggregate: Improve display of post author.
+  * poll: Fix behavior of poll buttons when inlined.
+  * Fixed unncessary tight loop hash copy in saveindex where a pointer
+    can be used instead. Can speed up refreshes by nearly 50% in some
+    circumstances.
+  * Optimized loadindex by caching the page name in the index.
+  * Added only_committed_changes config setting, which speeds up wiki
+    refresh by querying git to find the files that were changed, rather
+    than looking at the work tree. Not enabled by default as it can
+    break some setups where not all files get committed to git.
+  * comments: Write pending moderation comments to the transient underlay
+    to avoid conflict with only_committed_changes.
+  * search: Added google_search option, which makes it search google
+    rather than using the internal xapain database.
+    (googlesearch plugin is too hard to turn on when xapain databases
+    corrupt themselves, which happens all too frequently).
+  * osm: Remove invalid use of charset on embedded javascript tags.
+    Closes: #731197
+  * style.css: Add compatibility definitions for more block-level
+    html5 elements. Closes: #731199
+  * aggregrate: Fix several bugs in handling of empty and colliding
+    titles when generating filenames.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 02 Jan 2014 12:22:22 -0400
+
 ikiwiki (3.20130904.1) unstable; urgency=low
 
   * Fix cookiejar default setting.
index dbc7b4ac765c0e730e69c48cbe0c7743a911e3f5..c06e8fbac96b8d1244e635906deb19749da2b4f8 100644 (file)
@@ -10,7 +10,7 @@ Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl,
   libfile-chdir-perl, libyaml-libyaml-perl, python-support
 Maintainer: Joey Hess <joeyh@debian.org>
 Uploaders: Josh Triplett <josh@freedesktop.org>
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
 Homepage: http://ikiwiki.info/
 Vcs-Git: git://git.ikiwiki.info/
 
diff --git a/doc/bugs/Webedits_without_comment_don__39__t_make_it_through_git.mdwn b/doc/bugs/Webedits_without_comment_don__39__t_make_it_through_git.mdwn
new file mode 100644 (file)
index 0000000..f0fc047
--- /dev/null
@@ -0,0 +1,53 @@
+If you edit via web, and don't enter a comment, the commit message for the ensuing Git commit is empty.  Git by default will not commit with a blank commit message, so the edited file is still there in the working files for Ikiwiki but not committed into Git.
+
+A subsequent commit (including another web page edit with comments) will pull this change in with any new editing.  We found this by having spam edits suddenly appear on various pages with no corresponding commits to match.
+
+IkiWiki/plugin/git.pm checks for a version of git greater than 1.5.4, and if greater, commits with a blank message and '--cleanup=verbatim'.  The cleanup option doesn't let the message get committed.  Relatively new versions of git support '--allow-empty-message' but I haven't been able to identify when that feature was added.  Instead I opted for a default message.
+
+    544,545d543
+    <  # git will not commit with a blank comment, though this 
+    <  # can be overridden in later versions.  
+    547c545,553
+    <          $params{message}.="No commit message specified.";
+    ---
+    >          # Force git to allow empty commit messages.
+    >          # (If this version of git supports it.)
+    >          my ($version)=`git --version` =~ /git version (.*)/;
+    >          if ($version ge "1.5.4") {
+    >                  push @opts, '--cleanup=verbatim';
+    >          }
+    >          else {
+    >                  $params{message}.=".";
+    >          }
+
+The other option would be to change only line 549:
+
+    push @opts, '--cleanup=verbatim';
+
+to
+
+    push @opts, '--allow-empty-message';
+
+[[!tag  bugs patch]]
+
+> This is already [[fixed|done]] since 3.20130711. git versions since 1.7.2
+> are affected. Here's the commit if you want to backport it:
+> [[b162563|http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=b162563dc1c6126953e66cdcc508f389b9d39d8e]].
+>
+> As a general comment on synthesizing commit messages, I personally don't
+> think ikiwiki should invent an untranslated English commit message
+> if the user didn't provide one - using an obviously trivial commit message,
+> ".", seems more honest. OTOH, the `bzr` and `mercurial` plugins both use
+> an untranslated "no message given", and `darcs` uses "empty message".
+> It should either consistently use ".", or consistently use gettext(x)
+> for some standardized value of x, perhaps "no message given". Joey,
+> any preference?
+>
+> The other RCS plugins (`cvs`, `svn`, `tla`) never need to deal with an
+> empty commit message because they prepend something like "web commit
+> from smcv", so the message can never be empty.
+>
+> (Patches are usually easier to read/apply if you use "unified diff"
+> (`diff -u` or `git diff`), by the way.)
+>
+> --[[smcv]]
index 865637ea4428c7204965b51c0c71699ef50e571e..0bfbad5ceb71a88e053df7d0b6307f1f0f8ee681 100644 (file)
@@ -13,3 +13,5 @@ appropriately, so that ikiwiki reflects the actual time of the post via the
 >> I'll have to debug this, it's not working here... and this is an ikiwiki aggregator scraping another ikiwiki site.
 
 >>> Any news about this? --[[Joey]]
+
+>>>> That would be useful to avoid "flooding" with old content when something new is added with aggregate and then listed with the inline directive. -- [hugo](https://hroy.eu/hugo)
diff --git a/doc/bugs/assumes___34__git_push_origin__34___is_sufficient.mdwn b/doc/bugs/assumes___34__git_push_origin__34___is_sufficient.mdwn
new file mode 100644 (file)
index 0000000..20d1dd4
--- /dev/null
@@ -0,0 +1,16 @@
+[[!template id=gitbranch branch=smcv/ready/git-push-origin-master
+  browse="http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/git-push-origin-master"
+  author="[[smcv]]"]]
+[[!tag patch]]
+
+git's behaviour when doing "git push origin" is configurable, and the
+default is going to change in 2.0. In particular, if you've set
+push.default to "nothing" (the "explicit is better than implicit" option),
+the regression test will warn:
+
+    fatal: You didn't specify any refspecs to push, and push.default
+    is "nothing".
+    'git push origin' failed:  at .../lib/IkiWiki/Plugin/git.pm line 220.
+
+The solution is to do "git push origin master" instead (but with the
+configured remote and branch names). --[[smcv]]
diff --git a/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn b/doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn
new file mode 100644 (file)
index 0000000..b556052
--- /dev/null
@@ -0,0 +1,74 @@
+When uploading a PNG file on the wiki, through the webinterface or anonymous git, i get:
+
+    icon.png           prohibited by allowed_attachments (file MIME type is application/octet-stream, not application/vnd.oasis.opendocument.*)
+
+`attachment_allowed_attachments` is set to:
+
+    virusfree() and (mimetype(image/*) or mimetype(text/*) or mimetype(application/x-gzip) or mimetype(application/vnd.oasis.opendocument.*)) and maxsize(2048kb)
+
+Maybe a bug in the [[plugins/filecheck]] plugin?
+
+This is ikiwiki 3.20130904.1~bpo70+1 on Debian wheezy, with some patches applied, namely:
+
+ * [[todo/option_to_send_only_the_diff_in_notifyemail]]
+ * [[bugs/syslog_fails_with_non-ASCII_wikinames]]
+ * [[bugs/notifyemail_fails_with_some_openid_providers]]
+ * [[bugs/crashes_in_the_python_proxy_even_if_disabled]]
+
+Weird... --[[anarcat]]
+
+> Well, the pagespec seems to be matching correctly, given that it thinks the mime type is application/octet-stream.
+> If File::MimeInfo::Magic is installed, ikiwiki uses it. If not, or if it fails to find any mime type, it falls back to using `file -bi`,
+> and if that fails, it falls back to a default of application/octet-stream. --[[Joey]]
+
+> > File::MimeInfo::Magic is installed:
+> > 
+> >     ii  libfile-mimeinfo-perl    0.16-1                 all           Perl module to determine file types
+> > 
+> > it turns out there's (still) a problem with the way we use the module. This test code:
+> > 
+> >     #!/usr/bin/perl -w
+> >     my $file='icon.png';
+> >     use File::MimeInfo::Magic;
+> >     print "mime::magic: " . File::MimeInfo::Magic::magic($file) . "\n";
+> >     print "mime::default: " . File::MimeInfo::Magic::default($file) . "\n";
+> > 
+> > ...returns:
+> > 
+> >     mime::magic: image/png
+> >     mime::default: application/octet-stream
+> > 
+> > `file -ib` returns the right thing (`image/png; charset=binary`).
+> > 
+> > So it *should* work: it seems that the `::default` code kicks in even if the `::magic` one actually works.
+> > 
+> > I have traced down the problem to this block of code:
+> > 
+> >         if (! defined $mimetype || $mimetype !~s /;.*//) {
+> >                 # Fall back to default value.
+> >                 $mimetype=File::MimeInfo::Magic::default($file)
+> > 
+> > If you take a look deeply, this will fire up the default if there's no semicolon in the mimetype, which is expected for `file` calls, but not for `::magic()` calls. So `::magic()` works, but then the `::default` kicks in anyways.
+> >
+> > [[!template  id=gitbranch branch=anarcat/dev/magic-fails author="[[anarcat]]"]]
+> > 
+> > I have a stupid [[patch]] in my git repo which just appends a semicolon to the `::magic()` output, but maybe this should be done in another way...
+> > 
+> > --[[anarcat]]
+
+> > > If the regex match isn't necessary and it's just about deleting the
+> > > parameters, I think I'd prefer something like
+> > >
+> > >     if (! defined $mimetype) {
+> > >         ...
+> > >     }
+> > >     $mimetype =~ s/;.*//;
+> > >
+> > > but I'd be hesitant to do that without knowing why Joey implemented it
+> > > the way it is. If it's about catching a result from file(1) that
+> > > is not, in fact, a MIME type at all (empty string or error message
+> > > or something), maybe something more like this?
+> > >
+> > >     if (! defined $mimetype || $mimetype !~ s{[-\w]+/[-\w]+(?:;.*)?}{})
+> > >
+> > > (or whatever the allowed characters in MIME types are). --[[smcv]]
diff --git a/doc/bugs/cannot_decode_wide_characters_error_with_utf-8_encoding.mdwn b/doc/bugs/cannot_decode_wide_characters_error_with_utf-8_encoding.mdwn
new file mode 100644 (file)
index 0000000..2b02f3b
--- /dev/null
@@ -0,0 +1,7 @@
+During creation the new page with utf-8 codepage and non-Latin characters, 
+Pressing on either `Save Page` or `Preview` button results in  
+> `Error: cannot decode with wide characters at /usr/lib/perl5/vendor_perl/5.16.1/i686-linux/Encode.pm line 215`  
+
+Editing the wiki page with non-Latin characters using webinterface also fails with the same error.  
+Additionally, embedding graphviz graphs non-Latin, leads to he same error.
+Observed in ikiwiki versions 3.20130904 and version 3.20140102
diff --git a/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn b/doc/bugs/changes_from_the_web_interface_fail_to_get_committed.mdwn
new file mode 100644 (file)
index 0000000..67a48a2
--- /dev/null
@@ -0,0 +1,71 @@
+For some reason, on a wiki hosted locally using [ikiwiki-hosting](http://ikiwiki-hosting.branchable.com), web edits do not get committed and pushed to the central repository anymore.
+
+For example, I just did an edit on the web interface, which went on without error, but then the modified files are not committed:
+
+[[!format txt """
+o-cats@marcos:~/source$ git status
+# On branch master
+# Changes not staged for commit:
+#   (use "git add <file>..." to update what will be committed)
+#   (use "git checkout -- <file>..." to discard changes in working directory)
+#
+#       modified:   2014/summer.mdwn
+#
+no changes added to commit (use "git add" and/or "git commit -a")
+"""]]
+
+The files and the .cgi are owned by the right user:
+
+[[!format txt """
+o-cats@marcos:~/source$ ls -al 2014/summer.mdwn
+-rw-r--r-- 1 o-cats o-cats 2812 Nov 28 23:35 2014/summer.mdwn
+o-cats@marcos:~/source$ ls -al  /var/www/o-cats/ikiwiki.cgi
+-rwxr-xr-x 1 o-cats o-cats 15596 Oct  4 12:16 /var/www/o-cats/ikiwiki.cgi
+"""]]
+
+The virtual host is configured to run as the right user:
+
+[[!format txt """
+<VirtualHost *:80>
+        ServerAdmin root@localhost
+        ServerName foo.example.com
+
+        SuexecUserGroup o-cats o-cats
+
+        UserDir disabled
+
+        DocumentRoot /home/o-cats/public_html
+        <Directory />
+                DirectoryIndex index.html index
+                AllowOverride None
+        </Directory>
+        <Directory /home/o-cats/public_html>
+                Options Indexes MultiViews
+                AllowOverride None
+                Order allow,deny
+                allow from all
+        </Directory>
+        <Directory /var/www>
+                Options ExecCGI
+                AllowOverride None
+                Order allow,deny
+                allow from all
+        </Directory>
+        ScriptAlias /ikiwiki.cgi /var/www/o-cats/ikiwiki.cgi
+
+        ErrorLog /var/log/ikiwiki-hosting/o-cats/error.log
+        LogLevel warn
+        CustomLog /var/log/ikiwiki-hosting/o-cats/access.log combined
+
+
+        ErrorDocument 404 "/ikiwiki.cgi"
+</VirtualHost>
+"""]]
+
+What's going on all of a sudden? This is Debian wheezy. --[[anarcat]]
+
+> Oh... it seems like this is related yet again to the disruptive git upgrade:
+> 
+>     [Thu Nov 28 23:35:01 2013] [error] [client 2001:1928:1:9::1] Aborting commit due to empty commit message., referer: http://foo.example.com
+>
+> So this is [[fixed|done]] as of 3.20130711. Shouldn't we backport to wheezy now? :) --[[anarcat]]
diff --git a/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn b/doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn
new file mode 100644 (file)
index 0000000..4af8c9f
--- /dev/null
@@ -0,0 +1,70 @@
+[[!template  id=gitbranch branch=anarcat/dev/proxy-utf8-fail author="[[anarcat]]"]]
+
+ikiwiki 3.20130904.1~bpo70+1
+
+rebuilding the whole wiki:
+
+[[!format txt """
+anarcat@marcos:ikiwiki*$ sudo ikisite changesetup wiki.anarc.at --rebuild
+Subroutine import redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 19.
+Subroutine getsetup redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 29.
+Subroutine pagetemplate redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 38.
+Subroutine otherlanguagesloop redefined at /usr/share/perl5/IkiWiki/Plugin/translinks.pm line 51.
+Use of uninitialized value $body in split at /usr/share/perl5/Text/MultiMarkdown.pm line 1131.
+uncaught exception: 'ascii' codec can't encode character u'\xe9' in position 289: ordinal not in range(128)
+Traceback (most recent call last):
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 309, in run
+    self._in_fd, self._out_fd)
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 192, in handle_rpc
+    ret = self._dispatcher.dispatch(method, params)
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 84, in dispatch
+    return self._dispatch(method, params)
+  File "/usr/lib/python2.7/SimpleXMLRPCServer.py", line 420, in _dispatch
+    return func(*params)
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 253, in hook_proxy
+    "{0} hook `{1}' returned: [{2}]".format(type, name, ret))
+UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 289: ordinal not in range(128)
+
+Traceback (most recent call last):
+  File "/usr/lib/ikiwiki/plugins/rst", line 86, in <module>
+    proxy.run()
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 317, in run
+    self.error('uncaught exception: {0}\n{1}'.format(e, tb))
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 298, in error
+    self.rpc('error', msg)
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 233, in rpc
+    *args, **kwargs)
+  File "/usr/lib/ikiwiki/plugins/proxy.py", line 173, in send_rpc
+    raise GoingDown()
+proxy.py.GoingDown
+error: ikiwiki failed
+"""]]
+
+\xe9 is "é" in latin1, it may be the last letter of my name. no clue how it got there. suspecting this is related to the fix in [[bugs/proxy.py_utf8_troubles]], since this was not happening before the upgrade from squeeze. --[[anarcat]]
+
+> Ooops... turns out the plugin *was* enabled, through the `rst` plugin. After disabling it, the crash is gone, but one page isn't rendered anymore:
+> 
+>     removing art/histoireinternet/index.html, no longer built by art/histoireinternet.rst
+> 
+> Here is that source file: http://anarc.at/art/histoireinternet.rst - and it seems encoded properly:
+>
+>     $ curl -s http://anarc.at/art/histoireinternet.rst | iconv -f utf8 -t latin1 | iconv -f latin1 -t utf8 > /dev/null
+>     $
+> 
+> So I am not sure what is going on here... --[[anarcat]]
+
+>> Python is decoding what it receives from IkiWiki using the default `ascii`
+>> codec. To match IkiWiki's "all source text is UTF-8" assumption, the
+>> Python proxy should explicitly decode incoming text from bytes
+>> (`str`) to `unicode` using the `utf8` codec instead.
+>>
+>> Python's conservative default is "`ascii`, regardless of locale" -
+>> this minimizes the chance of silently incorrect decoding, but
+>> unfortunately also maximizes the chance of crashing. --[[smcv]]
+
+> > > Right, I know that. The trick is to find the rabbit hole. :P
+> > > 
+> > > And I found it. With my dev/proxy-utf8-fail, this doesn't fail anymore. Yay, a [[patch]] ready for commit! --[[anarcat]]
+
+> > > > I don't see that branch in your git repo, could you repost it please?
+> > > > (I'm trying to review some of the pending patches.) --[[smcv]]
index 7c7c016cba075dc692aebe6a7c4b9cd169946636..6fc1bf585d099836f1ebd92ff06ab8b2a8943f9d 100644 (file)
@@ -30,3 +30,41 @@ A simple fix would be to ship those icons with ikiwiki and serve them locally, b
 > legal stuff involved. (from a practical point of view, things are not that
 > strict, as `apt-file find facebook.png` and `apt-file find flickr.png`
 > reveal.) --[[chrysn]]
+
+>> The fundamental problem here is that we want to balance these
+>> somewhat incompatible goals:
+>>
+>> * show users a provider icon that they'll recognise at a glance
+>> * don't infringe copyright
+>> * don't distribute non-DFSG-licensed things in the source package
+>> * don't let miscellaneous OpenID providers track our users
+>>
+>> A "quick hack" version of removing these would be to have an option to
+>> disable the friendly JavaScript OpenID selector and go back to a simple
+>> input box. I might implement that option anyway - on websites mainly used
+>> by technologists, the OpenID selector is a bit of a waste of time.
+>>
+>>> Not done yet. -s
+>>
+>> One way to have recognisable icons would be to ship DFSG imitations of
+>> the "real" logos in the underlay. Between gnome-online-accounts and
+>> Empathy, we can probably find most of them (mostly or perhaps all done by
+>> Jakub Steiner).
+>>
+>>> [[!template id=gitbranch branch=smcv/ready/openid author="[[smcv]]"]]
+>>> [[!tag patch]]
+>>> Here's a git branch. I deleted the shut-down ClaimID and MyOpenID providers,
+>>> used icons from GNOME Online Accounts and Wordpress where available, and
+>>> drew my own for the rest.
+>>> [See it in use here](http://blueview.hosted.pseudorandom.co.uk/ikiwiki.cgi?do=prefs)
+>>> -s
+>>
+>> If people want the "real" logos, we could have some code to make IkiWiki
+>> download the favicons into transient underlay (which I think is
+>> higher-priority?), or into a higher-priority underlay if necessary,
+>> during the wiki build, so they'll be served from the wiki's own server.
+>>
+>>> Not done yet. I'm not sure whether I'm going to bother, but I'd review
+>>> someone else's implementation. -s
+>>
+>> --[[smcv]]
diff --git a/doc/bugs/editing_gitbranch_template_is_really_slow.mdwn b/doc/bugs/editing_gitbranch_template_is_really_slow.mdwn
new file mode 100644 (file)
index 0000000..028a5b2
--- /dev/null
@@ -0,0 +1,17 @@
+On this wiki, editing `templates/gitbranch.mdwn` causes a really slow
+refresh, orders of magnitude slower than a full rebuild: a large number of
+pages depend on that template, or link to a page that embeds that template,
+and so on.
+
+I suspect that, as with my optimization pass for `album`'s benefit, the
+costly thing is evaluating lots of pagespecs. I'm profiling it to see
+whether the problem is there are any low-hanging fruit.
+
+Easy to reproduce offline:
+
+* comment out the `exclude` option in `docwiki.setup`
+* `/usr/bin/perl -Iblib/lib ikiwiki.in -setup docwiki.setup -rebuild`
+* `touch templates/gitbranch.mdwn`
+* `/usr/bin/perl -Iblib/lib ikiwiki.in -setup docwiki.setup -refresh`
+
+--[[smcv]]
diff --git a/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn b/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn
new file mode 100644 (file)
index 0000000..00656c1
--- /dev/null
@@ -0,0 +1,27 @@
+[[!template id=gitbranch branch=smcv/ready/careful-eval author="[[smcv]]"
+  browse="http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/careful-eval"]]
+[[!tag patch]]
+
+As noted in the [[!cpan Try::Tiny]] man page, eval/$@ can be quite
+awkward in corner cases, because $@ has the same properties and problems
+as C's errno. While writing a regression test for definetemplate
+in which it couldn't find an appropriate template, I received
+    
+    <span class="error">Error: failed to process template
+    <span class="createlink">deftmpl</span> </span>
+    
+instead of the intended
+    
+    <span class="error">Error: failed to process template
+    <span class="createlink">deftmpl</span> template deftmpl not
+    found</span>
+    
+which turned out to be because the "catch"-analogous block called
+gettext before it used $@, and gettext can call define_gettext,
+which uses eval.
+
+Fixed in my branch smcv/ready/careful-eval. Another possibility
+for fixing this would be to depend on something like Try::Tiny,
+which is already indirectly recommended by ikiwiki, because
+[[!cpan RPC::XML]], [[!cpan XML::Feed]], etc., depend on it.
+--[[smcv]]
index 26945ee07c5c07815721d5a84a0fcb5fbccfcfe9..b462948ebc3d0f65ad2ccd21be08f7e03e8cb622 100644 (file)
@@ -32,3 +32,65 @@ The [[ikiwiki/directive/listdirectives]]` directive doesn't register a link betw
 > as well.
 >
 > --[[smcv]]
+
+> No follow-up or objection for a while, so considering this to
+> be working as designed. --[[smcv]]
+
+> > Seems I'm a bit late to butt in, but would it be possible to have two
+> > further phases after the scan phase, the first running map and inline 
+> > and the second orphan? Then map and inline could log or register their 
+> > links (obviously somewhere were it won't change the result of the link function)
+> > and orphan could take them into account. This logging could be
+> > turned on by parameter to not waste time for users not needing this and 
+> > make it tunable (i.e. so that the user can decide which map directives count and which don't)
+> > 
+> > For someone using map and especially autoindex the output of the orphans directive
+> > is simply wrong/useless (at least it is for me). And there is no easy workaround like for listdirectives
+> > -- [[holger]]
+
+>>> Hmm. I think this can be done without introducing any "phases",
+>>> even, but it would require each plugin that generates links according
+>>> to a pagespec to have either a conditional call into the orphans plugin,
+>>> or a call to a new core function in ikiwiki that exists solely to
+>>> support the orphans plugin. Something like this, maybe:
+>>>
+>>>     # in map.pm, inline.pm, pagestats.pm etc., at scan time
+>>>     if (IkiWiki::Plugin::orphans->can("add_reachable")) {
+>>>         IkiWiki::Plugin::orphans::add_reachable($page, $pagespec);
+>>>     }
+>>>
+>>>     # in orphans.pm (pseudocode; note that this does not *evaluate*
+>>>     # $pagespec, only stores it, so it's OK to do this at scan time)
+>>>     sub needsbuild ($pages)
+>>>         for each page in $pages
+>>>             clear $pagestate{location}{orphans}{reachable}
+>>>     sub reachable ($location, $pagespec)
+>>>         add $pagespec to @{$pagestate{location}{orphans}{reachable}}
+>>>
+>>>     # in preprocess function in orphans.pm (pseudocode)
+>>>     # executed at build time, not at scan time, so pagespecs work
+>>>
+>>>     for each maybe_orphan with no links to it
+>>>         for each location with a list of reachable pagespecs
+>>>             make the page with the orphans directive depend on \
+>>>                 the page that is the location
+>>>             for each of those pagespecs
+>>>                 if pagespec matches orphan
+>>>                     take orphan off the list
+>>>                     go to next orphan
+>>>     output list of orphans
+>>>
+>>> (Maybe parentlinks should also annotate the parent/ancestors of
+>>> each page as reachable from that page.)
+>>>
+>>> Do other people (mainly Joey) think that'd be acceptable, or
+>>> too intrusive?
+>>>
+>>> Taking this off the list of resolved bugs again while we think about it.
+>>>
+>>> I suspect that in the presence of autoindex, what you really want might
+>>> be less "there's a link to it" and more "there's a path to it from
+>>> the root of the wiki", which is why I called the proposed function
+>>> "add_reachable". On the other hand, maybe that's too computationally
+>>> intensive to actually do; I haven't tried it.
+>>> --[[smcv]]
index ca3599660db296a84a01ded974c2ddced8aa530d..90e2c790065ff11ccb5f54ccb37f8639998daa64 100644 (file)
@@ -1,3 +1,5 @@
+[[!template  id=gitbranch branch=anarcat/dev/openid_email author="[[anarcat]]"]]
+
 This bug affects [[plugins/notifyemail]] but is probably caused more by [[plugins/openid]]. When using OpenID to login to a site, no email notification is sent to the user (pagespec set to `*`) when a modification is done on the wiki. I believe this is because the OpenID plugin assumes the email comes from the OpenID provider - which is not necessarily going to succeed if, for privacy reason, the OpenID provider refuses to transmit the email to ikiwiki.
 
 In the OpenID plugin, the email is actually fetched when authenticating and is stored in the session, like so:
@@ -56,9 +58,7 @@ sub formbuilder_setup (@) {
 
 I believe this could be worked around simply by re-enabling that field and allowing the user to specify an email there by hand, making a note that the OpenID provider's email is used by default.
 
-[[!template  id=gitbranch branch=anarcat/openid_email author="[[anarcat]]"]]
-
-The dumbest [[!taglink patch]] that actually fixes the problem for me is in the branch mentionned here.
+The dumbest [[!taglink patch]] that actually fixes the problem for me is in the branch mentionned above.
 
 It would probably be better to add a comment on the field as indicated above, but it's a good proof of concept.
 
index f7e115d48feb5d7cecc5204e2dbd1a744b9a8f7e..c031543c111d5ee0ec9c662379d50eef9eb57164 100644 (file)
@@ -14,3 +14,6 @@ Maybe just encode all &lt; and &gt; when compling pages within the templates fol
 
 > I never noticed this bug, since it only happens if the htmlscrubber is
 > disabled. --[[Joey]]
+
+>> My `templatebody` branch on [[template creation error]] fixes this.
+>> --[[smcv]]
index eba59a682e9c988dd37df7d231ca9acd05f6c96c..d672d1c046a835f8597053d00c453afa86223c5b 100644 (file)
@@ -20,3 +20,5 @@ enabled: inserting a html tag without closing it is enough.
 > will be releasing that soon. I will cherry-pick the fix into at least
 > my debian-stable branch too. I don't know if this is worth doing a whole
 > security advisory for. --[[Joey]]
+
+[[done]]
diff --git a/doc/bugs/poll_in_inline.mdwn b/doc/bugs/poll_in_inline.mdwn
new file mode 100644 (file)
index 0000000..61c1449
--- /dev/null
@@ -0,0 +1,6 @@
+When the poll directive appears in an inline, clicking on the button is
+supposed to vote and go to the page for that poll. Instead, I see it always
+apparantly skip counting my vote, and redirect to the page for that poll.
+--[[Joey]]
+
+> [[fixed|done]] --[[Joey]]
index f1a9bc9a7c7eaf9eae3ac94003b38f546598e1da..ba8534bd8623b853e122fd78beef11a916eec9b7 100644 (file)
@@ -17,3 +17,5 @@ index 75c9579..ad0f8b0 100644
 </pre></code>
 
 [[!tag patch]]
+
+> [[Seems reasonable|users/smcv/yesplease]] --smcv
diff --git a/doc/bugs/structured_config_data_is_mangled.mdwn b/doc/bugs/structured_config_data_is_mangled.mdwn
new file mode 100644 (file)
index 0000000..869d48e
--- /dev/null
@@ -0,0 +1,61 @@
+Put something like this in the setup file:
+
+~~~
+conversion:
+  - from: odt
+    to: pdf
+    command: [unoconv, -f, pdf, -o, $OUTPUTDIR, $INPUTFILE]
+  - from: ditaa
+    to: png
+    command: [ditaa, $INPUTFILE, $OUTPUTFILE, -s, 0.7]
+~~~
+
+However `Dumper($config{conversion})` shows:
+
+~~~
+$VAR1 = [
+          'HASH(0x164e1a0)',
+          'HASH(0x164e3c8)'
+        ];
+~~~
+
+I think it is getting mangled in `sub merge` in `IkiWiki/Setup.pm` and its calls to `possibly_foolish_untaint`
+
+Workaround: force the array values to be strings, and then re-parse them using YAML::XS::Load:
+
+~~~
+conversion:
+  - |
+    from: [odt, odp]
+    to: pdf
+    command: [unoconv, -f, pdf, -o, $OUTPUTDIR, $INPUTFILE]
+  - |
+    from: ditaa
+    to: png
+    command: [ditaa, $INPUTFILE, $OUTPUTFILE, -s, 0.7]
+
+...
+
+sub checkconfig {
+    if (!defined $config{conversion} || ref $config{conversion} ne "ARRAY") {
+        error(sprintf(gettext("Must specify '%s' and it must be a list"), "conversion"));
+    }
+    for (my $i=0; $i < @{$config{conversion}}; $i++) {
+      $config{conversion}->[$i] = YAML::XS::Load($config{conversion}->[$i]) if
+          ref $config{conversion}->[$i] ne 'HASH';
+    }
+}
+~~~
+
+> `getsetup` defines config options to be one of: boolean, string, integer,
+> pagespec, "internal" (non-user-visible string), ref to an array of one of
+> those scalar types, or ref to a hash { string => one of those scalar types }.
+> IkiWiki::Setup also appears to support regexps (qr//), although that's
+> not documented (presumably they're treated the same as strings).
+> 
+> Supporting arbitrary arrays/hashes as values would require some way to
+> untaint the values recursively.
+>
+> Complex config data also can't be used with the [[plugins/websetup]]
+> plugin, which currently supports everything that IkiWiki::Setup does,
+> except for hashes. --[[smcv]]
index 151c023be78fece24787b65db1b6bb84276eefa0..8ee7db06eda8c4832d790653ce9fbe843d45d908 100644 (file)
@@ -1,4 +1,4 @@
-[[!template  id=gitbranch branch=anarcat/syslog_utf8 author="[[anarcat]]"]]
+[[!template  id=gitbranch branch=anarcat/dev/syslog_utf8 author="[[anarcat]]"]]
 
 [[this feature|todo/syslog_should_show_wiki_name]] made it so syslog doesn't work anymore if the site being logged has non-ASCII characters it in.
 
@@ -21,3 +21,5 @@ Yet I am not sure how to fix that kind of problem in Perl... --[[anarcat]]
 > I have improved a little the error handling in log_message() so that we see *something* when syslog fails, see the branch documented above. I can also confirm that  reverting [[todo/syslog_should_show_wiki_name]] fixes the bug. Finally, I have a unit test that reproduces the problem in git, and a working [[!taglink patch]] for the bug, again in git.
 > 
 > > One last note: I noticed that this problem also happens elsewhere in ikiwiki. For example, the [[plugins/notifyemail]] plugin will silently fail to send notifications if the pages contain unicode. The [[plugins/notifychanges]] plugin I am working on (in [[todo/option to send only the diff in notifyemail]]) seems to be working around the issue so far, but there's no telling which similar problem are out there.
+
+>> [[I'd merge it|/users/smcv/yesplease]]. --[[smcv]]
diff --git a/doc/bugs/template__95__syntax_test_is_incomplete.mdwn b/doc/bugs/template__95__syntax_test_is_incomplete.mdwn
new file mode 100644 (file)
index 0000000..f9e3bf3
--- /dev/null
@@ -0,0 +1,8 @@
+[[!template id=gitbranch branch=smcv/ready/template-syntax-test
+  browse="http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/template-syntax-test"
+  author="[[smcv]]"]]
+[[!tag patch]]
+
+`t/template_syntax.t` looks as though it's meant to check the syntax of
+`doc/templates/*.mdwn` as well as `templates/*.tmpl`, but it doesn't.
+Patch in my git repository. --[[smcv]]
index 5d27c347232b69bf65758f31b9a49df27575e225..2468e3c4f26c480c607e035182b12d4b3f2c1eaa 100644 (file)
@@ -110,8 +110,6 @@ Please, let me know what to do to avoid this kind of error.
 >
 > --[[smcv]]
 
->> [[!template id=gitbranch author="[[smcv]]" branch=smcv/definetemplate]]
->> [[!tag patch]]
 >> OK, here is a branch implementing what I said. It adds the `definetemplate`
 >> directive to [[plugins/goodstuff]] as its last commit.
 >>
@@ -195,3 +193,14 @@ Please, let me know what to do to avoid this kind of error.
 >>>>> the right thing to do in this situation.
 >>>>>
 >>>>> --[[chrysn]]
+
+>>>>>> [[!template id=gitbranch author="[[smcv]]" branch=smcv/ready/templatebody
+         browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/templatebody]]
+>>>>>> [[!tag patch]]
+>>>>>> Branch and directive renamed to `ready/templatebody` as chrysn suggested.
+>>>>>> It's on-by-default now (or will be if that branch is merged).
+>>>>>> Joey, any chance you could review this?
+>>>>>>
+>>>>>> There is one known buglet: `template_syntax.t` asserts that the entire
+>>>>>> file is a valid HTML::Template, whereas it would ideally be doing the
+>>>>>> same logic as IkiWiki itself. I don't think that's serious. --[[smcv]]
diff --git a/doc/bugs/utf8_warnings_are_meaningless.mdwn b/doc/bugs/utf8_warnings_are_meaningless.mdwn
new file mode 100644 (file)
index 0000000..7c1efa0
--- /dev/null
@@ -0,0 +1,9 @@
+Hunting down what was generating
+
+    utf8 "\xEB" does not map to Unicode at /usr/share/perl5/IkiWiki.pm line 873, <$in> chunk 1.
+
+lead me to a call to `utf8::valid`, which lead to http://perldoc.perl.org/utf8.html which says this is an "INTERNAL" function:
+
+> Main reason for this routine is to allow Perl's testsuite to check that operations have left strings in a consistent state. You most probably want to use `utf8::is_utf8()` instead.
+
+Apparently the main point of the function is to emit the warning in unit tests - problem is, in the ikiwiki context, the only useful thing to warn about would be the name of the file you're trying to parse, not the name of the source code.  Alternatively, since the code does continue on with the data, *not* whining about it might be an option :-) but an actionable message would be better.
index f136d8b12f5e261bf08ad704392735fdf20a2ca0..3ae156db64bfef30cf7cf0d39de3dd8663e7a99c 100644 (file)
@@ -11,3 +11,6 @@ error: Bad exit status from /var/tmp/rpm-tmp.Sgq2QK (%build)
 when trying to build
 
 > Ok, added. [[done]] --[[Joey]] 
+>> Appears to be missing in 'Makefile.PL' also.  -- [[ttw]]
+
+>>> Added --[[Joey]]
diff --git a/doc/examples/blog/posts/Test.html b/doc/examples/blog/posts/Test.html
deleted file mode 100644 (file)
index cd24af4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-test
-
-og hva nu?
index 05490a7990d02945798774cdb02ef29bbce534c0..07e53453add8bd3e425aa4f0d0475fa374170662 100644 (file)
@@ -26,3 +26,7 @@ Ian.
 The user is logging as ian, the same user as the laptop. I can push and pull git repos on the same server owned by the same user via ssh with no problem. I have deleted and re-started from scratch several times. However, for my use case I think it's simpler to keep the repo on my local computer and just rsync the web pages to the server.
 
 Ian.
+
+Ian, you've copied over the repo created by ikiwiki --setup, which contains hook/post-update - just remove that file which is not required anymore on the git server side.
+
+Serge
diff --git a/doc/forum/Dot_CGI_pointing_to_localhost._What_happened__63__.mdwn b/doc/forum/Dot_CGI_pointing_to_localhost._What_happened__63__.mdwn
new file mode 100644 (file)
index 0000000..930b9b9
--- /dev/null
@@ -0,0 +1,13 @@
+# Dot CGI pointing to localhost. What happened?
+
+My ikiwiki broke. For some reason ikiwiki.cgi started pointing to
+https://localhost:80/ instead of the real URL. Can somebody help me find out
+why this has happened and perhaps fix it? Now login and recentchanges do not
+work because of it.
+
+I believe the change happened after my hosting provider upgraded their server
+OS from Debian oldstable to stable. Rebuilding the .cgi or the wiki hasn't
+helped nor has helpdesk been helpful. Any hints as to debug this are
+appreciated.
+
+Thanks!
diff --git a/doc/forum/Dot_CGI_pointing_to_localhost._What_happened__63__/comment_1_cbab9b95923124b39cfccf5d2e88070c._comment b/doc/forum/Dot_CGI_pointing_to_localhost._What_happened__63__/comment_1_cbab9b95923124b39cfccf5d2e88070c._comment
new file mode 100644 (file)
index 0000000..eb1007b
--- /dev/null
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="http://smcv.pseudorandom.co.uk/"
+ nickname="smcv"
+ subject="comment 1"
+ date="2013-11-22T09:03:38Z"
+ content="""
+The CGI automatically builds self-referential URLs based on how you
+accessed it, so if your web host puts it behind a
+[reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy) or
+something, that might make it try to redirect to localhost?
+
+If that's it, then `$q->url` with `$params{cgiurl}` in
+`IkiWiki/CGI.pm` and `IkiWiki/Plugin/openid.pm` would work around it.
+"""]]
diff --git a/doc/forum/Force_rebuild_of_page_using_some_plugin.mdwn b/doc/forum/Force_rebuild_of_page_using_some_plugin.mdwn
new file mode 100644 (file)
index 0000000..3880a89
--- /dev/null
@@ -0,0 +1,5 @@
+I'm writing a plugin and I'd like to force all the pages that include a directive which my plugin defines to be rebuilt when the wiki is refreshed (whether or not those pages have changed).
+
+I've found the "needsbuild" hook which I could use to get pages to be rebuilt. But how can I work out which pages include my directive? And will needsbuild get called for every occurrence of my directive? I only need to rebuild those pages once (obviously). When the needsbuild hook gets called, is it because the directive match its 'id' hook() parameter has been encountered? And does needsbuild know what page is being processed?
+
+Or is there some other way of doing this?
diff --git a/doc/forum/How_can_I_invert_the_banned__95__user_check__63__.mdwn b/doc/forum/How_can_I_invert_the_banned__95__user_check__63__.mdwn
new file mode 100644 (file)
index 0000000..2436b2e
--- /dev/null
@@ -0,0 +1,33 @@
+Trying to lockdown a wiki so that it can only be edited by certain users and figured I'd just set
+
+     banned_users:
+     - !user(myadmin)
+
+in my config but it doesn't work.  I'm sure I must be doing something daft?
+
+PS: the user is authenticated via 'httpauth', would that make a difference?
+
+> That's not how `banned_users` works. Make yourself an admin:
+>
+>     adminuser:
+>     - myadmin
+>
+> and disallow editing by non-admins:
+>
+>     locked_pages: '*'
+>
+> You can enable the `opendiscussion` and/or `anonok` plugins if you want
+> unprivileged users, perhaps logging in with an OpenID, to be able to
+> edit discussion pages (if enabled via `discussion`) or post comments.
+>
+> You can also relax the `locked_pages` setting if you want unprivileged
+> users to be able to edit certain areas of the site.
+>
+> --[[smcv]]
+
+>> That was my initial setup but it wasn't working and I got caught-up on the `banned_user` idea.  It would seem I was getting tricked by some credential-caching-weirdness.  Fired up another browser and `locked_pages` works perfectly.  Thanks.  -- fergus
+
+>>> Browsers generally remember HTTP auth credentials until they're closed
+>>> or get a 401 error, and don't generally have a way to "log out".
+>>> As far as I'm aware, there's nothing that [[plugins/httpauth]] can
+>>> do about that. --[[smcv]]
diff --git a/doc/forum/How_to_suppress_sidebar_for_a_particular_page__63__.mdwn b/doc/forum/How_to_suppress_sidebar_for_a_particular_page__63__.mdwn
new file mode 100644 (file)
index 0000000..e34a925
--- /dev/null
@@ -0,0 +1,7 @@
+I normally want to use the sidebar, but for one particular page, if I want to suppress it, how do I do it?
+
+Putting
+
+    \[[!sidebar  content=""""""]]
+
+into the page source produces a collapsed table which is not ideal.
diff --git a/doc/forum/Remove_tags_and_backlinks_on_particular_pages__63__.mdwn b/doc/forum/Remove_tags_and_backlinks_on_particular_pages__63__.mdwn
new file mode 100644 (file)
index 0000000..ca99b24
--- /dev/null
@@ -0,0 +1,3 @@
+Hello,
+
+I would like to use !taglink to create a series of links, which are also tags, in the main part of my wikipages.  But since these will already be on the page, there's no need to have them at the bottom of the page.  Is there any way to turn off the display of tags (and also of backlinks) at the bottom of the page?  I understand I could just delete the sections from page.tmpl but wondered if there was a more elegant way to do it.  Thanks.
diff --git a/doc/forum/Template_variables/comment_2_9b366736171e45d5afd8247ff38501d1._comment b/doc/forum/Template_variables/comment_2_9b366736171e45d5afd8247ff38501d1._comment
new file mode 100644 (file)
index 0000000..30b4a7e
--- /dev/null
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawlcaGfdn9Kye1Gc8aGb67PDVQW4mKbQD7E"
+ nickname="Amitai"
+ subject="comment 2"
+ date="2013-11-05T19:18:10Z"
+ content="""
+What version of ikiwiki are you running? [[news/Version 3.20130904]] introduced some changes to the RSS and Atom templates that may help you.
+"""]]
diff --git a/doc/forum/Template_variables/comment_3_727f8a407dc57e4abf48cdcec4ead666._comment b/doc/forum/Template_variables/comment_3_727f8a407dc57e4abf48cdcec4ead666._comment
new file mode 100644 (file)
index 0000000..d26bc2f
--- /dev/null
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://tincho.startssl.com/"
+ nickname="tincho"
+ subject="comment 3"
+ date="2013-11-05T19:35:45Z"
+ content="""
+I am using the same version as you say. And the entry template has a place for author that does not get populated. The page template does not, on the other hand.
+"""]]
diff --git a/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https.mdwn b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https.mdwn
new file mode 100644 (file)
index 0000000..0e606dd
--- /dev/null
@@ -0,0 +1,55 @@
+Hello.
+
+My setup is as follows: I am running Debian on a VPS. I am using the reverse proxy pound, among other things, to provide SSL support for the webserver thttpd, which is serving the ikiwiki pages and running the ikiwiki CGI. The wiki is only accessible through https.
+
+I recently upgraded from squeeze to wheezy. This broke page editing. It seems that the edit pages now include a base url that points to an http address, instead of the https address specified in the config. I guess this is a result of the changes discussed here:
+
+[[http://ikiwiki.info/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both/]]
+
+Because of the reverse proxy, I suppose that, as far as the webserver is concerned, it is receiving an http (rather than https) request. I don't think it's at all SSL-aware. So I don't think there's any way the webserver could tell the CGI that it's actually being accessed via https. (Feel free to correct me on this point if you are more knowledgeable about reverse proxies, HTTP and SSL. I see that, according to the Wikipedia page for thttpd, it doesn't pass on the X-Forwarded-For HTTP header to CGI scripts, but I don't see how that would be useful in detecting this anyhow.)
+
+If ikiwiki's new behaviour is intentional, rather than a bug in ikiwiki or an error in my configuration, is there some option I can set or plugin I can enable to make it honour the URLs explicitly stated in my configuration? My current solution is to revert to the old version of ikiwiki from Debian Squeeze.
+
+I see that a number of people have had vaguely similar problems from other bugs/forum posts. This person seems to be someone having the reverse problem, of the base URL being https instead of http:
+
+[[http://ikiwiki.info/forum/CGI_script_and_HTTPS/]]
+
+This person is also using a reverse proxy, and has problems with setting the base, but I think this is a feature request rather than a regression:
+
+[[http://ikiwiki.info/bugs/trouble_with_base_in_search/]]
+
+This one sounds most like my situation:
+
+[[http://ikiwiki.info/forum/Dot_CGI_pointing_to_localhost._What_happened__63__/]]
+
+There is a comment here that hints at a workaround. Am I right in reading this as a suggestion to patch the source? Is that the official recommended solution?
+
+-- Martin.
+
+---
+
+From my .setup (domains changed):
+
+        srcdir => '/home/myusername/wiki',
+        # where to build the wiki
+        destdir => '/var/www/secure.example.com/wiki',
+        # base url to the wiki
+        url => 'https://secure.example.com/wiki',
+        # url to the ikiwiki.cgi
+        cgiurl => 'https://secure.example.com/cgi-bin/wiki/ikiwiki.cgi',
+        # filename of cgi wrapper to generate
+        cgi_wrapper => '/var/www/secure.example.com/cgi-bin/wiki/ikiwiki.cgi',
+        # mode for cgi_wrapper (can safely be made suid)
+        cgi_wrappermode => '06755',
+
+Old base in an edit page:
+
+    <base href="https://secure.example.com/wiki/" />
+
+New base in an edit page, after upgrading ikiwiki package, but before regenerating wrapper:
+
+    <base href="http://localhost/wiki/" />
+
+New base in an edit page, after regenerating wrapper:
+
+    <base href="http://secure.example.com/wiki/" />
diff --git a/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_1_ef4be9e70bd6d8c970fd8982f525d2d0._comment b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_1_ef4be9e70bd6d8c970fd8982f525d2d0._comment
new file mode 100644 (file)
index 0000000..acbcea5
--- /dev/null
@@ -0,0 +1,21 @@
+[[!comment format=mdwn
+ username="http://smcv.pseudorandom.co.uk/"
+ nickname="smcv"
+ subject="comment 1"
+ date="2013-12-20T09:54:51Z"
+ content="""
+One way to solve this would be a new `$config{hard_code_urls}`
+option whose semantics are \"you're behind a reverse proxy, hard-code
+`$config{cgiurl}` and `${url}` in output rather than using the
+address from the HTTP request\" (in other words, selectively undo some
+of the automatic self-referential URL detection).
+
+Another possibility would be to avoid using `<base>`, and when producing
+CGI pages, make all links look like `/sandbox/` or
+`/cgi-bin/ikiwiki.cgi?...`; but that can only work if your content and
+CGI are on the same domain, and is likely to be more complex.
+
+The `<base href>` is required to be an absolute URI (including the
+protocol and domain name) so the CGI output can't avoid doing a certain
+amount of hard-coding, unfortunately.
+"""]]
diff --git a/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_2_00fee67cc30b7c337710b37c27216a68._comment b/doc/forum/Using_reverse_proxy__59___base_URL_is_http_instead_of_https/comment_2_00fee67cc30b7c337710b37c27216a68._comment
new file mode 100644 (file)
index 0000000..26674f9
--- /dev/null
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawn1IY7Q6CUIdfPRp2foUdFSIKgaPpMI934"
+ nickname="Martin"
+ subject="comment 2"
+ date="2013-12-23T20:52:17Z"
+ content="""
+I think the option to treat the URLs in the config as hard-coded (effectively ignoring the address from the HTTP request) would be most useful.
+"""]]
diff --git a/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron.mdwn b/doc/forum/__34__Error:_cannot_decode_string_with_wide_characters__34___on_Mageia_Linux_x86-64_Cauldron.mdwn
new file mode 100644 (file)
index 0000000..8f92259
--- /dev/null
@@ -0,0 +1,20 @@
+When running ikiwiki-3.20140102-1.mga4 on Mageia Linux x86-64 4/Cauldron with perl-5.18.1-3.mga4 , I am getting this error after I try to preview a page that contains unicode, at least in firefox-24.2.0-2.mga4 (note that I added "use Carp::Always;" to Ikiwiki.pm to get the stack trace):
+
+<pre>
+Error: Cannot decode string with wide characters at /usr/lib/perl5/vendor_perl/5.18.1/x86_64-linux-thread-multi/Encode.pm line 215. 
+Encode::decode_utf8('# Freenode programming channel FAQ\x{d}\x{a}\x{d}\x{a}This page is intended t...') called at /usr/lib/perl5/vendor_perl/5.18.1/IkiWiki/CGI.pm line 117 
+IkiWiki::decode_form_utf8('CGI::FormBuilder=HASH(0x2f7b880)') called at /usr/lib/perl5/vendor_perl/5.18.1/IkiWiki/Plugin/editpage.pm line 90 
+IkiWiki::cgi_editpage('CGI=HASH(0x21ad628)', 'CGI::Session=HASH(0x280fb88)') called at /usr/lib/perl5/vendor_perl/5.18.1/IkiWiki/CGI.pm line 442
+IkiWiki::__ANON__('CODE(0x23ec970)') called at /usr/lib/perl5/vendor_perl/5.18.1/IkiWiki.pm line 2085
+IkiWiki::run_hooks('sessioncgi', 'CODE(0x2a5be20)') called at /usr/lib/perl5/vendor_perl/5.18.1/IkiWiki/CGI.pm line 442
+IkiWiki::cgi() called at /usr/bin/ikiwiki line 191 eval {...} called at /usr/bin/ikiwiki line 191
+IkiWiki::main() called at /usr/bin/ikiwiki line 228
+</pre>
+
+I have upgraded the ikiwiki instance using "ikiwiki -setup" and am running ikiwiki.cgi on a local Apache server.
+
+Can anyone shed any light on this problem and guide me what I need to do to fix it?
+
+Regards,
+
+-- [Shlomi Fish](http://www.shlomifish.org/)
diff --git a/doc/forum/converting_binary_files.mdwn b/doc/forum/converting_binary_files.mdwn
new file mode 100644 (file)
index 0000000..6b3187f
--- /dev/null
@@ -0,0 +1,29 @@
+I would like to use ikiwiki to build a static site which needs some transformations to be made on binary assets. A simple example is to translate a .odp presentation to .pdf using (e.g.) unoconv. If I add a new .odp attachment, or push one into the repo, I want the corresponding .pdf to appear in the generated site. What's the right place to hook in to do this?
+
+I've made an experimental prototype which hooks into needsbuild, builds the pages then and there, and at the same time removes them from the list of pages to be built.
+
+~~~
+sub needsbuild {
+    my $files=shift;
+    my $nfiles=[];
+    foreach my $f (@$files) {
+        if ($f =~ /\.odp$/) {
+            my $g = $f;
+            $g =~ s/\.odp$/\.pdf/;
+            debug("building $f to $g");
+            will_render($f, $g);
+            if (system("unoconv","-f","pdf","-o",IkiWiki::dirname("$config{destdir}/$g"),srcfile($f)) != 0) {
+                error("unoconv: failed to translate $f to $g");
+            }
+        }
+        else {
+            push @$nfiles, $f;
+        }
+    };
+    return $nfiles;
+}
+~~~
+
+It appears to work, but is this the right way to do it, bearing in mind ikiwiki's dependency tracking and the like? And is the usage of will_render() correct?
+
+[[BrianCandler]]
diff --git a/doc/forum/download_links_for_attachments/comment_1_19fe525281e38d3bbe45b31248ca7880._comment b/doc/forum/download_links_for_attachments/comment_1_19fe525281e38d3bbe45b31248ca7880._comment
new file mode 100644 (file)
index 0000000..5e16410
--- /dev/null
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnWrt_1YwzE4yP3dF061Wy7uNjPDefJm_I"
+ nickname="Marius"
+ subject="Did anybody see this?"
+ date="2013-10-14T10:59:47Z"
+ content="""
+Did I post it at the right place?
+
+thanks
+"""]]
diff --git a/doc/forum/download_links_for_attachments/comment_2_06231e4ddc271260e51bc371637540de._comment b/doc/forum/download_links_for_attachments/comment_2_06231e4ddc271260e51bc371637540de._comment
new file mode 100644 (file)
index 0000000..aadc366
--- /dev/null
@@ -0,0 +1,14 @@
+[[!comment format=mdwn
+ username="http://smcv.pseudorandom.co.uk/"
+ nickname="smcv"
+ subject="comment 2"
+ date="2013-10-15T19:48:15Z"
+ content="""
+It should be as simple as putting the attachment's name in double square
+brackets, like `\[[stuff.zip]]`? There isn't really any difference
+between a download link and any other link.
+
+(Or if it's attached to a different page, follow the same
+[[ikiwiki/subpage/linkingrules]] as for pages, e.g. you might
+write `\[[sandbox/stuff.zip]]` for a file attached to the [[sandbox]].)
+"""]]
diff --git a/doc/forum/download_links_for_attachments/comment_3_64d12928bc24c48d6f0b5fbb2dfd8f6d._comment b/doc/forum/download_links_for_attachments/comment_3_64d12928bc24c48d6f0b5fbb2dfd8f6d._comment
new file mode 100644 (file)
index 0000000..7e84786
--- /dev/null
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnWrt_1YwzE4yP3dF061Wy7uNjPDefJm_I"
+ nickname="Marius"
+ subject="that works sort of, depending on the extention"
+ date="2013-10-18T12:03:26Z"
+ content="""
+[[setup.txt]] - opens the plain text in the same browser window
+[[settings.xml]] - opens the formatted xml as html i.e. I can't right click and save as, I have to copy the text, create an empty file and paste it in
+[[.gitignore]] - it does not recognise this file, I have to rename it to gitignore.txt and explain to the user to rename it.
+
+What I would like is a way to consistently get a dialog that asks the user where to save the file with the correct default file name..
+I've recently figured out how to do this with javascript - it's a bit messy but it works:
+http://stackoverflow.com/a/11486284/381083
+
+thanks
+"""]]
diff --git a/doc/forum/download_links_for_attachments/comment_4_7612923064284646c2ed59e2cd52845d._comment b/doc/forum/download_links_for_attachments/comment_4_7612923064284646c2ed59e2cd52845d._comment
new file mode 100644 (file)
index 0000000..eb65938
--- /dev/null
@@ -0,0 +1,34 @@
+[[!comment format=mdwn
+ username="http://smcv.pseudorandom.co.uk/"
+ nickname="smcv"
+ subject="comment 4"
+ date="2013-10-18T16:56:09Z"
+ content="""
+> \[[setup.txt]] - opens the plain text in the same browser window
+
+That's the browser's choice: the web server says \"this is text/plain\"
+and the browser decides to display it in the window. IkiWiki doesn't
+actually serve the file, just provides a link to it; to force it
+to be downloaded rather than opened, you'd have to configure
+your web server to offer it as \"Content-Disposition: attachment\"
+(e.g. <http://www.jtricks.com/bits/content_disposition.html>).
+
+The only way IkiWiki could get involved in this would be to
+have the file download go via the CGI script, which could
+add that header. That isn't currently a feature it has;
+you could maybe add a plugin if you need this?
+
+> \[[settings.xml]] - opens the formatted xml as html
+
+Again, this is between the web server and the browser.
+
+> \[[.gitignore]] - it does not recognise this file
+
+IkiWiki excludes files related to the source code control systems
+it uses, in order to avoid accidentally publishing a `.gitignore`
+that's intended to control ignored files for the git repo
+containing the pages' source. This is controlled by the
+`wiki_file_prune_regexps`, `exclude` and `include` config options.
+You can put `.gitignore` in `include` if you need to publish
+files with that name.
+"""]]
index 2b56bd70b27de13e12432636a18c38e15698ab2e..e01eccb92c4f6c98cb5b4687f3978a2cf4760ee1 100644 (file)
@@ -1,4 +1,4 @@
-as in title, how to align text to the right?
+As in title, how to align text to the right?
 
 > Add to your local.css a class that aligns text to the right:
 
@@ -13,3 +13,40 @@ as in title, how to align text to the right?
 > [[templates/note]] template does something similar. --[[Joey]]
 
 >> Thanks!
+
+-----
+<div class="notebox">
+[[!format mdwn """
+This is my text with [a markdown link](#).
+
+Here's a *second* paragraph.
+"""]]
+</div>
+
+> There is more than one way to do it. If [[plugins/format]] is enabled, then this:
+>
+>     <div class="notebox">
+>     \[[!format mdwn """
+>     This is my text with [a markdown link](#).
+>
+>     Here's a *second* paragraph.
+>     """]]
+>     </div>
+>
+> is rendered like the box in this page.
+>
+> (I'm using the `notebox` class used by the `note` template here, but you could
+> use any class.) --[[smcv]]
+
+-----
+> Doing this myself and noted that [[ikiwiki/markdown]] down does not allow the enclosure of block level elements directly; and thus we cannot switch the `span` suggested above for `div` in changing block level elements (not if you wish to include markdown, anyway).  For example, I want to create a paragraph (with markdown text) which is right aligned, and so add the following
+
+>>     <span class="right_align">
+>>     This is my text with [a markdown link](/)
+>>     </span>
+
+> The *correct* thing to do here is create a template (as indicated above) **but** a workaround I found useful was to over-ride the `inline` nature of the `span` element, as follows
+
+>>     .align_right { display: block ; text-align: right ; }
+
+> you may also like to remove the padding and margins since they will be provided by the enclosing block. -- fergus
diff --git a/doc/forum/ikiwiki.info_blogspam_problem.mdwn b/doc/forum/ikiwiki.info_blogspam_problem.mdwn
new file mode 100644 (file)
index 0000000..4702099
--- /dev/null
@@ -0,0 +1,11 @@
+I am attempting to edit tips/dot_cgi/ [[tips/dot_cgi/discussion]], but I get this error:
+
+    Error: Sorry, but that looks like spam to blogspam: Single-word too long: '\[[http://maketech...]]'
+
+Note: that link appeared in a /previous/ version of the discussion page, not my own edit.
+
+Hope this helps, cheers!
+
+p.s. I got the same error when trying to post here, so I edited the string to be shorter.
+
+p.p.s. I got the same error again for the link to tips/dot_cgi/discussion, so I changed that link in a silly way...
diff --git a/doc/forum/ikiwiki.info_blogspam_problem/comment_1_893a2f561ead36b531e2d6c887e6aaba._comment b/doc/forum/ikiwiki.info_blogspam_problem/comment_1_893a2f561ead36b531e2d6c887e6aaba._comment
new file mode 100644 (file)
index 0000000..9af6866
--- /dev/null
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawkwqKsWfFCk-NK99S77R2v1JorVCnpzXUA"
+ nickname="Dave"
+ subject="site participation"
+ date="2013-11-18T21:50:59Z"
+ content="""
+joeyh, do you have charts and graphs of number of contributions per day to this site?  Do you know (or can you find out) what day you enabled blogspam?
+
+Hope this helps,
+--Dave
+"""]]
diff --git a/doc/forum/ikiwiki_+_mathjax/comment_4_873adec726e9b70394643ff28094ad39._comment b/doc/forum/ikiwiki_+_mathjax/comment_4_873adec726e9b70394643ff28094ad39._comment
new file mode 100644 (file)
index 0000000..d66d10b
--- /dev/null
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawlsNmR53i7XzaEwtTVLCAgDPXZ7JvPHQr0"
+ nickname="GI"
+ subject="Tutorial + options"
+ date="2013-10-15T19:47:29Z"
+ content="""
+I've been using MathJAX + ikiwiki for a while, and finally got around to posting my setup. You can find a tutorial [[here|http://wiki.math.cmu.edu/iki/wiki/tips/20130930-ikiwiki/010-setup.html]].
+
+"""]]
diff --git a/doc/forum/ikiwiki_+_mathjax/comment_5_f601e3f1c78345e4d80ec3ce62784e6f._comment b/doc/forum/ikiwiki_+_mathjax/comment_5_f601e3f1c78345e4d80ec3ce62784e6f._comment
new file mode 100644 (file)
index 0000000..acb081e
--- /dev/null
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawlUQVv1tLm_aWTKoX36OqxUUkyowomdt4E"
+ nickname="Meng"
+ subject="recipe"
+ date="2013-11-06T07:50:24Z"
+ content="""
+SO has a thread on this: http://stackoverflow.com/questions/6889564/add-mathjax-support-to-a-local-ikiwiki .   
+"""]]
diff --git a/doc/forum/ikiwiki_+_mathjax/comment_6_305fddcd1e264b92d7ed7153ba27ce07._comment b/doc/forum/ikiwiki_+_mathjax/comment_6_305fddcd1e264b92d7ed7153ba27ce07._comment
new file mode 100644 (file)
index 0000000..222bc03
--- /dev/null
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawlsNmR53i7XzaEwtTVLCAgDPXZ7JvPHQr0"
+ nickname="GI"
+ subject="comment 6"
+ date="2014-01-10T15:57:37Z"
+ content="""
+Unfortunately the StackOverflow method suggests using pandoc. This has many bad side effects...
+
+"""]]
diff --git a/doc/forum/ikiwiki_and_big_files/comment_5_3532b14ee10775dac634792c75a30e89._comment b/doc/forum/ikiwiki_and_big_files/comment_5_3532b14ee10775dac634792c75a30e89._comment
new file mode 100644 (file)
index 0000000..ead9b46
--- /dev/null
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://mcfrisk.myopenid.com/"
+ nickname="mikko.rapeli"
+ subject="comment 5"
+ date="2014-01-23T09:23:53Z"
+ content="""
+Still struggling with this. Noticed that ikiwiki uses hardlinks to files but copies directory structures if my huge (now 8 gig) media library is added as underlay, but hidden files are ignored, like .htaccess which I use to browse the media files while writing blog posts for example. And symlinks are not supported. At the moment easiest for me would be to use some 'post update' scripts to add a media directory symlink to ikiwiki output directory.
+"""]]
diff --git a/doc/forum/ikiwiki_not_usable_when_installed_with_toast___40__because_of_symlinks__41__.mdwn b/doc/forum/ikiwiki_not_usable_when_installed_with_toast___40__because_of_symlinks__41__.mdwn
new file mode 100644 (file)
index 0000000..48e0079
--- /dev/null
@@ -0,0 +1,12 @@
+(NOTE: There are artificial whitespaces in the path to shortcuts.mdwn below, because on my first attempt to save this entry I got a message that Blogspam would not allow it because of the length of this string. Also, I had to reformat some of the links, which where to long for BlogSpam as well.)
+
+Ikiwiki is not usable when installed to a user’s $HOME with toast ([[http://www.toastball.net/toast/]]), as toast installs everything as symlinks, which Ikiwiki does not take well:
+
+    $  ikiwiki --rebuild --setup Testwiki.setup 
+    cannot read a symlink (/home/franek/.toast/armed/usr/ local/share/ikiwiki/ basewiki/shortcuts.mdwn)
+
+I am aware that Ikiwiki does not allow symlinks in srcdir for security reasons http://ikiwiki.info/ [no space here, see above note] security/#index18h2. I do not see, however, why this restriction should apply to basewiki or other not user-created files, which are not modifiable by committers anyway.
+
+If this is correct, can that be fixed (easily)?
+
+Edit: Maybe I should have filed this as a bug right away. If this post does not lead to anything, I may still do that in a few days.
diff --git a/doc/forum/inject__95__preprocess__95__tag.mdwn b/doc/forum/inject__95__preprocess__95__tag.mdwn
new file mode 100644 (file)
index 0000000..2b41b5b
--- /dev/null
@@ -0,0 +1,75 @@
+[[!meta title="Cannot manage to inject preprocess_tag"]]
+
+Hello,    
+I am trying to write a plugin that changes the way the
+[[ikiwiki/directive/tag]] [[ikiwiki/directive]] works, and I am trying to do so
+by using the [[inject|plugins/write/#index81h3]] function. The piece of code
+that should (if I understood well the `inject` function) do the trick is :
+
+      sub import {
+        inject(
+          name => 'IkiWiki::Plugin::tag::preprocess_tag',
+          call => \&my_preprocess_tag
+        );
+      }
+
+Howere, this does not change anything about the effect of the `tag` directive.
+
+I have tried some variants, like calling `inject` outside the `import`
+function, or calling `IkiWiki::loadplugin("tag");` to ensure that the
+[[plugins/tag]] is loaded, but none of these things work. Any idea?
+
+*Disclaimer:* although proficient in several languages, I am a beginner in Perl.
+
+Here is the full code of (a very early version of) my plugin.
+
+    #! /usr/bin/perl
+    require 5.002;
+    package IkiWiki::Plugin::parenttag;
+
+    use warnings;
+    use strict;
+    use IkiWiki 3.00;
+
+    my $orig_preprocess_tag=\&preprocess_tag;
+
+    sub import {
+      inject(
+        name => 'IkiWiki::Plugin::tag::preprocess_tag',
+        call => \&my_preprocess_tag
+      );
+    }
+
+    sub my_preprocess_tag(@) {
+      print "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nWorking!\n";
+      return "TODO";
+    }
+
+    1
+
+-- [[Louis|spalax]]
+
+> Hello,    
+> I managed to replace the tag original `preprocess_tag` function, using a different approach than using `inject`:
+> 
+>     my $orig_preprocess_tag;
+> 
+>     sub import {
+>       IkiWiki::loadplugin("tag");
+>       $orig_preprocess_tag = \&{$IkiWiki::hooks{preprocess}{tag}{call}};
+>       hook(type => "preprocess", id => "tag", call => \&my_preprocess_tag);
+>     }
+> 
+> And later on, I can call the original `preprocess_tag` function using:
+> 
+>     $orig_preprocess_tag->(...)
+> 
+> The problem is that I am digging into `IkiWiki.pm` package to extract data from `IkiWiki::hooks`, which is not guaranteed to work in the future, contrary to `inject`.
+> 
+> Two questions:
+> 
+> - how ugly is my solution?
+> - is it possible to use `inject` to replace the `IkiWiki::Plugin::tag::preprocess_tag` function?
+> 
+> -- [[Louis|spalax]]
+
index 569c2818f01835fcbacb24e5d873059c990a8ed4..a6f301dd3c5906548fcdfd3853dd33937abe96d7 100644 (file)
@@ -2,7 +2,7 @@ The `edittemplate` directive is supplied by the [[!iki plugins/edittemplate desc
 
 This directive allows registering template pages, that provide default
 content for new pages created using the web frontend. To register a
-template, insert a [[ikiwiki/directive/template]] directive on some other
+template, insert an [[ikiwiki/directive/edittemplate]] directive on some other
 page.
 
        \[[!edittemplate template="bugtemplate" match="bugs/*"]]
diff --git a/doc/ikiwiki/directive/edittemplate/discussion.mdwn b/doc/ikiwiki/directive/edittemplate/discussion.mdwn
new file mode 100644 (file)
index 0000000..81db204
--- /dev/null
@@ -0,0 +1,2 @@
+For some years now I do feel quite comfortable when using all things *template. But one thing I stumble across when setting up another ikiwiki driven site is a sort of misleading resp. missing description with the [[edittemplate]] directive, where it says "(Don't put the directive on the template page itself)". While this is right there should also be mentioned that "the page holding the edittemplage directive must not be named the same as the template page it refers to". At least with my usual setup the edittemplate directive will not work whenever I attempt to simplify things by giving it the same name as the template page.   
+Boris
index d2f6d1d74f9102eee84162104db11726ae9eca5a..a4632a5b4c4111151b7249ffd2a7dfa8bbb181eb 100644 (file)
@@ -51,6 +51,8 @@ directive. These are the commonly used ones:
   Set to 0 to show all matching pages.
 * `archive` - If set to "yes", only list page titles and some metadata, not
   full contents.
+* `title` - Sets the title of the rss feed if one is generated.
+  Defaults to the name of the page.
 * `description` - Sets the description of the rss feed if one is generated.
   Defaults to the name of the wiki.
 * `skip` - Specify a number of pages to skip displaying. Can be useful
diff --git a/doc/ikiwiki/directive/toggle/discussion.mdwn b/doc/ikiwiki/directive/toggle/discussion.mdwn
new file mode 100644 (file)
index 0000000..e6507ae
--- /dev/null
@@ -0,0 +1,15 @@
+IMHO, i would be very useful to be able to customise the toggle indicator a little bit more. Something like the img directive parameters would be appreciated:
+
+> You can also pass alt, title, class, align, id, hspace, and vspace parameters. These are passed through unchanged to the html img tag. If you include a caption parameter, the caption will be displayed centered beneath the image.
+
+So that for instance:
+
+     \[[!toggle id="toggleable-id" text="Toggle" class="collapser"]]
+
+could produce:
+
+     <a class="toggle collapser" href="#posts.toggleable-id">Toggle</a>
+
+This could be extra-useful when using icons like [Font Awesome](http://fortawesome.github.io/Font-Awesome/icons/) so that the toggle link could be a nice icon instead of text.
+
+-- Hugo
index eda6e3ab05a3c34e9bfb0dc128232f40e43014c2..ea0e98d438cdc27dcde73a15c3d21a7b667f89a9 100644 (file)
@@ -32,7 +32,7 @@ Projects & Organizations
 * The [maildirman wiki](http://svcs.cs.pdx.edu/maildirman)
 * The [Relativistic Programming research wiki](http://wiki.cs.pdx.edu/rp).
 * [Debian-IN](http://debian-in.alioth.debian.org/)
-* [Braawi Ltd](http://braawi.com/) and the community site [Braawi.org](http://braawi.org/)
+* [Braawi Ltd](http://braawi.com/)
 * [Webconverger](http://webconverger.org/) (a Web only linux distribution) with a [blog](http://webconverger.org/blog/)
 * [DebTorrent](http://debtorrent.alioth.debian.org)
 * The [Debian Packaging Handbook project](http://packaging-handbook.alioth.debian.org/wiki/)
@@ -41,20 +41,16 @@ Projects & Organizations
 * [The TOVA Company](http://www.tovatest.com) public site.  We also use it for internal documentation and issue tracking, all with a [[rcs/Git]] backend.
 * Reusable technical support websites, developed for [Redpill](http://redpill.dk/) realms:
   * [master demo site](http://support.redpill.dk/) ([source](http://source.redpill.dk/))
-  * [Homebase](http://support.homebase.dk/) ([source](http://source.homebase.dk/))
+  * [Homebase](http://support.homebase.dk/)
   * [Bitbase](http://support.bitbase.dk/) ([source](http://source.bitbase.dk/))
   * [Børneuniversitetet](http://support.borneuni.dk/) ([source](http://source.borneuni.dk/))
 * [CampusGrün Hamburg](http://www.campusgruen.org/)
 * The [awesome window manager homepage](http://awesome.naquadah.org/)
-* [vcs-pkg](http://vcs-pkg.org)
 * [vcs-home](http://vcs-home.madduck.net)
 * [Public Domain collection of Debian related tips & tricks](http://dabase.com/tips/) - please add any tips too
 * [Finnish Debian community](http://debian.fi)
-* [INCL intranuclear cascade and ABLA evaporation/fission](http://www.cs.helsinki.fi/u/kaitanie/incl/)
 * [dist-bugs](http://dist-bugs.kitenet.net/)
-* [Chaos Computer Club Düsseldorf](https://www.chaosdorf.de)
 * [monkeysphere](http://web.monkeysphere.info/)
-* [St Hugh of Lincoln Catholic Primary School in Surrey](http://www.sthugh-of-lincoln.surrey.sch.uk/)
 * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository.
 * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch)
 * [MIT Student Information Processing Board](http://sipb.mit.edu/)
@@ -67,18 +63,13 @@ Projects & Organizations
 * [Debian Costa Rica](http://cr.debian.net/)
 * [Fvwm Wiki](http://fvwmwiki.xteddy.org)
 * [Serialist](http://serialist.net/)'s static pages (documentation, blog).  We actually have ikiwiki generate its static content as HTML fragments using a modified page.tmpl template, and then the FastCGI powering our site grabs those fragments and embeds them in the standard dynamic site template.
-* [Apua IT](http://apua.se/)
-* [PDFpirate Community](http://community.pdfpirate.org/)
 * [Software in the Public Interest](http://spi-inc.org/)
 * [NXT Improved Firmware](http://nxt-firmware.ni.fr.eu.org/)
 * [The FreedomBox Foundation](http://www.freedomboxfoundation.org/)
-* [TenderWarehouse Community](http://community.tenderwarehouse.org/)
 * [AntPortal](http://antportal.com/wiki/) - also see our templates and themes on [github](https://github.com/AntPortal/ikiwiked)
 * [The Amnesic Incognito Live System](https://tails.boum.org/index.en.html)
 * [The Progress Linux OS wiki](http://wiki.progress-linux.org/)
 * [Oxford Computer Society](http://www.ox.compsoc.net/)
-* [Russian OpenBSD Community wiki](http://wiki.openbsd.ru/)
-* [Arcada Project](http://arcadaproject.org/)
 * [*BSD UNIX user group in Denmark](http://www.bsd-dk.dk/)
 * [Telecomix Broadcast System](http://broadcast.telecomix.org/)
 * [WikiMIX.cc](http://WikiMIX.cc/)
@@ -91,22 +82,27 @@ Projects & Organizations
 * [Börn og tónlist](http://bornogtonlist.net/) - an Icelandic open-content site, primarily for kindergarten teachers, about music and music-related activites with children. Migrated from MediaWiki to IkiWiki in June 2013. Heavily changed appearance with only minimal changes to page.tmpl. Also its sister site [Leikur að bókum](http://leikuradbokum.net), about children's books in a kindergarten/pre-school context.
 * [Réseaulibre.ca](http://wiki.reseaulibre.ca) - a mesh project in Montréal, most data is stored in the wiki, including IP address allocation and geographic data. Features map ([[plugins/osm]]) integration.
 * [Foufem](http://foufem.orangeseeds.org/) - Foufem, a feminist hackerspace
+* [[Grésille|http://www.gresille.org]] - A French hactivist group.
+* [[Grenode|http://www.grenode.net]] - A French non-profit Internet access provider.
+* [[Rézine|http://www.rezine.org]] - A French non-proft Internet service provider.
+* [[Nos oignons|http://nos-oignons.net]] - Tor exit nodes funded by the community.
+* [[CAS Libres|http://cas-libres.poivron.org]] - A French feminist radio program.
+* [[Les Barricades|http://barricades.int.eu.org]] - A French socialist choir (CSS has been adapted from the one of [[Grésille|http://www.gresille.org]]).
+* [DKØTU Amateur Radio Station](http://www.dk0tu.de), TU Berlin
 
 Personal sites and blogs
 ========================
 
 * [[Joey]]'s [homepage](http://kitenet.net/~joey/), including his weblog
 * [Kyle's MacLea Genealogy wiki](http://kitenet.net/~kyle/family/wiki) and [Livingstone and MacLea Emigration Registry](http://kitenet.net/~kyle/family/registry)
-* [Ulrik's personal web page](http://kaizer.se/wiki/)
 * [kite](http://kitenet.net)
-* [Paul Collins's as-yet purposeless wiki](http://wiki.ondioline.org/)
-* [Alessandro Dotti Contra's personal website](http://www.dotticontra.org/) and [weblog](http://www.dotticontra.org/blog)
+* [Alessandro Dotti Contra's personal website](http://www.dotticontra.org/)
 * [Kelly Clowers' personal website](http://www.clowersnet.net/)
 * [Anna's nature features](http://kitenet.net/~anna/nature-feature/)
 * [Roland Mas's blog](http://roland.entierement.nu/categories/geek-en.html)
-* [Sergio Talens-Oliag's personal wiki](http://mixinet.net/~sto/) and [blog](http://mixinet.net/~sto/blog.html)
+* [Sergio Talens-Oliag's personal wiki](http://mixinet.net/~sto/) and [blog](http://mixinet.net/~sto/blog)
 * [Christian Aichinger's homepage](http://greek0.net/)
-* Ben A'Lee's [homepage](http://subvert.org.uk/~bma/) and [wiki](http://wiki.subvert.org.uk/).
+* Ben A'Lee's [homepage](http://benjaminalee.co.uk/).
 * [Adam  Shand's homepage](http://adam.shand.net/iki/)
 * [Hess family wiki](http://kitenet.net/~family/)
 * [Zack](http://upsilon.cc/~zack)'s homepage, including [his weblog](http://upsilon.cc/~zack/blog/)
@@ -114,7 +110,6 @@ Personal sites and blogs
 * [Keith Packard's homepage and blog](http://keithp.com/).
 * [Christian Mock's homepage](http://www.tahina.priv.at/).
 * [Choffee](http://choffee.co.uk/).
-* [Tales from the Gryphon](http://www.golden-gryphon.com/blog/manoj/), Manoj Srivastava's free software blog.
 * [Proper Treatment 正當作法](http://conway.rutgers.edu/~ccshan/wiki/)
 * [lost scraps](http://web.mornfall.net), pages/blog of Petr Ročkai aka mornfall
 * [Schabis blaue Seite](http://schabi.de) - I abuse ikiwiki as blog/cms combo, and will migrate all existing content into ikiwiki eventually.
@@ -144,7 +139,7 @@ Personal sites and blogs
 * [Per Bothner's blog](http://per.bothner.com/blog/)
 * [Bernd Zeimetz (bzed)](http://bzed.de/)
 * [Gaudenz Steinlin](http://gaudenz.durcheinandertal.ch)
-* [NeoCarz Wiki](http://www.neocarz.com/wiki/) Yes - its actually Ikiwiki behind that! I'm using Nginx and XSL to transform the ikiwiki renderings thanks to the valid XHTML output of ikiwiki. Great work Joey!!
+* [NeoCarz Wiki](http://www.neocarz.com/) Yes - its actually Ikiwiki behind that! I'm using Nginx and XSL to transform the ikiwiki renderings thanks to the valid XHTML output of ikiwiki. Great work Joey!!
 * [Natalian - Kai Hendry's personal blog](http://natalian.org/)
 * [Mick Pollard aka \_lunix_ - Personal sysadmin blog and wiki](http://www.lunix.com.au)
 * [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage
@@ -164,7 +159,6 @@ Personal sites and blogs
 * [Mukund](https://mukund.org/)
 * [Nicolas Schodet](http://ni.fr.eu.org/)
 * [weakish](http://weakish.github.com)
-* [Thomas Kane](http://planetkane.org/)
 * [Marco Silva](http://marcot.eti.br/) a weblog + wiki using the [darcs](http://darcs.net) backend
 * [NeX-6](http://nex-6.taht.net/) ikiwiki blog and wiki running over ipv6
 * [Jason Riedy](http://lovesgoodfood.com/jason/), which may occasionally look funny if I'm playing with my branch...
@@ -182,9 +176,7 @@ Personal sites and blogs
 * [Richardson Family Wiki](http://the4richardsons.com) A wiki, blog or some such nonsense for the family home page or something or other... I will eventually move the rest of my sites to ikiwiki. The source of the site is in git.
 * [The personal website of Andrew Back](http://carrierdetect.com)
 * [Paul Elms](http://paul.elms.pro) Personal site and blog in russian.
-* [James' Tech Notes](http://jamestechnotes.com) My technical notes, blog, wiki, personal site.
 * [Salient Dream](http://www.salientdream.com/) - All Things Strange. 
-* [Kafe-in.net](https://www.kafe-in.net/) Ugly personnal blog.
 * [Anton Berezin's blog](http://blog.tobez.org/)
 * [Waldgarten]( http://waldgarten.greenonion.org/ ) News and documentation of a permaculture inspired neighbourhood-garden located in Hamburg, Germany.
 * [[OscarMorante]]'s [personal site](http://oscar.morante.eu).
diff --git a/doc/news/version_3.20130518.mdwn b/doc/news/version_3.20130518.mdwn
deleted file mode 100644 (file)
index 635b869..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-ikiwiki 3.20130518 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * Fix test suite to not fail when XML::Twig is not installed.
-     Closes: #[707436](http://bugs.debian.org/707436)
-   * theme: Now &lt;TMPL\_IF THEME\_$NAME&gt; can be used in all templates when
-     a theme is enabled.
-   * notifyemail: Fix bug that caused duplicate emails to be sent when
-     site was rebuilt.
-   * bzr: bzr rm no longer has a --force option, remove"""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20130710.mdwn b/doc/news/version_3.20130710.mdwn
deleted file mode 100644 (file)
index f1b30a7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-ikiwiki 3.20130710 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * blogspam: Fix encoding issue in RPC::XML call.
-     Thanks, Changaco
-   * comments: The formats allowed to be used in comments can be configured
-     using comments\_allowformats.
-     Thanks, Michal Sojka
-   * calendar: When there are multiple pages for a given day, they're
-     displayed in a popup on mouseover.
-     Thanks, Louis
-   * osm: Remove trailing slash from KML maps icon.
-   * page.tmpl: omit searchform, trails, sidebar and most metadata in CGI
-     (smcv)
-   * openid: Automatically upgrade openid\_realm to https when
-     accessed via https.
-   * The ip() pagespec can now contain glob characters to match eg, a subnet
-     full of spammers.
-   * Fix crash that could occur when a needsbuild hook returned a file
-     that does not exist.
-   * Fix python proxy to not crash when fed unicode data in getstate
-     and setstate.
-     Thanks, chrysn
-   * Fix committing attachments when using svn."""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20140102.mdwn b/doc/news/version_3.20140102.mdwn
new file mode 100644 (file)
index 0000000..e101646
--- /dev/null
@@ -0,0 +1,24 @@
+ikiwiki 3.20140102 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * aggregate: Improve display of post author.
+   * poll: Fix behavior of poll buttons when inlined.
+   * Fixed unncessary tight loop hash copy in saveindex where a pointer
+     can be used instead. Can speed up refreshes by nearly 50% in some
+     circumstances.
+   * Optimized loadindex by caching the page name in the index.
+   * Added only\_committed\_changes config setting, which speeds up wiki
+     refresh by querying git to find the files that were changed, rather
+     than looking at the work tree. Not enabled by default as it can
+     break some setups where not all files get committed to git.
+   * comments: Write pending moderation comments to the transient underlay
+     to avoid conflict with only\_committed\_changes.
+   * search: Added google\_search option, which makes it search google
+     rather than using the internal xapain database.
+     (googlesearch plugin is too hard to turn on when xapain databases
+     corrupt themselves, which happens all too frequently).
+   * osm: Remove invalid use of charset on embedded javascript tags.
+     Closes: #[731197](http://bugs.debian.org/731197)
+   * style.css: Add compatibility definitions for more block-level
+     html5 elements. Closes: #[731199](http://bugs.debian.org/731199)
+   * aggregrate: Fix several bugs in handling of empty and colliding
+     titles when generating filenames."""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20140125.mdwn b/doc/news/version_3.20140125.mdwn
new file mode 100644 (file)
index 0000000..3ef6ab3
--- /dev/null
@@ -0,0 +1,5 @@
+ikiwiki 3.20140125 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * inline: Allow overriding the title of the feed. Closes: #[735123](http://bugs.debian.org/735123)
+     Thanks, Christophe Rhodes
+   * osm: Escape name parameter. Closes: #[731797](http://bugs.debian.org/731797)"""]]
\ No newline at end of file
index 5c3b4a8d06b5224aebf6bea2b499069310f60f5f..0c7adc0af1d7154d24a49361e1a90fbb441ec0e4 100644 (file)
@@ -1,8 +1,8 @@
 ikiwiki supports adding "History" links to the top of pages to browse the
 revision history of a page. This is enabled by the `historyurl` setting,
 which is used to specify the URL to a web interface such as [[ViewVC]]
-(for Subversion) or [[Gitweb]]. In that url, "\[[file]]" is replaced with
+(for Subversion) or [[Gitweb]]. In that URL, "\[[file]]" is replaced with
 the name of the file to view.
 
 The [[plugins/repolist]] plugin can supplement this information with
-urls to the underlying repository of the wiki.
+URLs to the underlying repository of the wiki.
diff --git a/doc/plugins/contrib/addtag.mdwn b/doc/plugins/contrib/addtag.mdwn
new file mode 100644 (file)
index 0000000..ed57202
--- /dev/null
@@ -0,0 +1,72 @@
+[[!template id=plugin name=addtag author="[[Louis|spalax]]"]]
+[[!tag type/widget]]
+
+# Addtag
+
+This plugin adds links in the edit page to tag pages by clicking on tag links (instead of manually typing the tag directive).
+
+## Template
+
+The editpage template has to be modified to enable this: the following code has
+to be inserted where you want this feature to appear (right after the
+attachment link seems a good place).
+
+[[!toggle id=template text="Template"]]
+[[!toggleable id=template text="""
+    <TMPL_IF NAME="ADDTAG">
+    <a class="toggle" href="#addtag">Tags</a>
+    <TMPL_VAR ADDTAG>
+    <span class="addtag">
+    <div class="toggleable" id="addtag">
+    <em>
+    Enable Javascript to add tags by simply clicking on them.
+    </em>
+    </div>
+    </span>
+    </TMPL_IF>
+"""]]
+
+## CSS
+
+I think that in this case, the tag list looks nicer as columns. To do so, add
+the following code to your CSS.
+
+[[!toggle id=css text="CSS"]]
+[[!toggleable id=css text="""
+    .addtag:after {
+      clear: both;
+      content:".";
+      display:block;
+      height:0;
+      visibility:hidden;
+    }
+    
+    .addtag ul{
+      margin: auto;
+      padding: 0;
+    }
+    
+    .addtag ul li {
+      list-style: none;
+      float: left;
+      margin-left: 1.5em;
+    }
+    
+    .addtag ul ul{
+      margin: 0;
+      padding: 0;
+    }
+    
+    .addtag ul ul li {
+      clear: left;
+      list-style-type: disc;
+    }
+    
+    .addtag ul ul ul li {
+      list-style-type: circle;
+    }
+"""]]
+
+## Code
+
+Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Addtag]].
index dad781808d32c462c50078cc16790162888201f7..074e2ece09f19d609a911e4c3edd1ec46cd1ba48 100644 (file)
@@ -476,3 +476,50 @@ My wishlist for the plugin would include:
 
 ----
 
+I've tracked down the "always showing the 96x96 thumbnails" bug!
+
+The problem is in the pagetemplate function, which calls "thumbnail" to determine the name of the thumbnail image to use. As you know, the "img" method of generating thumbnails includes the size of the thumbnail as part of its name (to ensure that resizing thumbnails will create a new file of the correct size). The problem is... that in the pagetemplate function, the thumbnailsize is NOT passed in to the call to "thumbnail", so it always returns the default size, 96x96. Hence nothing that anyone can do will change the thumbnails to anything else. Oh, the different-sized thumbnail images ARE created, but they're never linked to.
+
+Here's a context-diff of my fix:
+
+<pre>
+*** /home/kat/files/repos/ikiwiki_smcv/IkiWiki/Plugin/album.pm 2013-12-18 14:50:06.861623226 +1100
+--- album.pm   2013-12-18 15:51:09.393582879 +1100
+***************
+*** 484,489 ****
+--- 484,490 ----
+               my $viewer = $params{page};
+               my $album = $pagestate{$viewer}{album}{album};
+               my $image = $pagestate{$viewer}{album}{image};
++                 my $thumbnailsize = $pagestate{$album}{album}{thumbnailsize};
+  
+               return unless defined $album;
+               return unless defined $image;
+***************
+*** 495,501 ****
+  
+               if ($template->query(name => 'thumbnail')) {
+                       $template->param(thumbnail =>
+!                              thumbnail($viewer, $params{destpage}));
+               }
+               if (IkiWiki::isinlinableimage($image)
+                       && ($template->query(name => 'imagewidth') ||
+--- 496,502 ----
+  
+               if ($template->query(name => 'thumbnail')) {
+                       $template->param(thumbnail =>
+!                              thumbnail($viewer, $params{destpage}, $thumbnailsize));
+               }
+               if (IkiWiki::isinlinableimage($image)
+                       && ($template->query(name => 'imagewidth') ||
+</pre>
+
+-- [[KathrynAndersen]]
+
+----
+
+I've found another bug. The album plugin doesn't allow one to have more than 10 items in an album section. This is because it uses "inline" to display album sections, and the default for inline is to show only 10 items. So it only shows 10 items.
+
+What would be good is if the album directive could have a "show" parameter which is passed on to preprocess_inline, so that users could decide how many items to show (including ALL of them, if they give show=0).
+
+-- [[KathrynAndersen]]
diff --git a/doc/plugins/contrib/cowsay.mdwn b/doc/plugins/contrib/cowsay.mdwn
new file mode 100644 (file)
index 0000000..4d0824a
--- /dev/null
@@ -0,0 +1,33 @@
+[[!template id=plugin name=cowsay author="[[BrianCandler]]"]]
+[[!tag type/fun]]
+
+This plugin provides the cowsay [[ikiwiki/directive]].
+This directive allows creation of ASCII-art cows.
+
+For example,
+
+~~~
+\[[!cowsay state="stoned" text="""
+moo tube!
+"""]]
+~~~
+
+renders as
+
+~~~
+ ___________
+< moo tube! >
+ -----------
+        \   ^__^
+         \  (**)\_______
+            (__)\       )\/\
+             U  ||----w |
+                ||     ||
+~~~
+
+You must have the [cowsay](https://en.wikipedia.org/wiki/Cowsay) package
+installed.
+
+# Download
+
+You can get the source code from [github](https://github.com/candlerb/ikiwiki-cowsay)
index 5768057aa06836caee6f29ffb44395e525b37172..ce920d9137cfa329fe9defc9bf90fc3cc4683e6d 100644 (file)
@@ -1,3 +1,5 @@
+[[!template id=plugin name=created_in_future author="[[Louis|spalax]]"]]
+
 # Created_in_future
 
 This plugin provides a `created_in_future()` [[PageSpec|ikiwiki/pagespec/]]
diff --git a/doc/plugins/contrib/created_in_future/discussion.mdwn b/doc/plugins/contrib/created_in_future/discussion.mdwn
new file mode 100644 (file)
index 0000000..34844de
--- /dev/null
@@ -0,0 +1 @@
+Thanks, good stuff. I wrote something similar to facilitate delaying the publication of pages until after a certain date, but mine is quite rough and ready. — [[Jon]]
diff --git a/doc/plugins/contrib/irclog.mdwn b/doc/plugins/contrib/irclog.mdwn
new file mode 100644 (file)
index 0000000..634f010
--- /dev/null
@@ -0,0 +1,21 @@
+The [irclog](https://github.com/ironchicken/ikiwiki-irclog) plugin allows including a formatted IRC log in your wiki.
+
+### Usage
+
+The `[[!irclog]]` directive takes the following arguments:
+
+`location` (required)
+
+The URI of your IRC log file. Currently the URI schemes `file:`, `http:`, and `ssh:` have been implemented. Only `ssh:` has been tested: `ssh://host/path/to/#channel`.
+
+`earliest` (optional)
+
+A date/time in the format `%F %T` (i.e. `YYYY-MM-DD HH:MM:SS`). Events before this time will not be included. String comparison is used, so you can omit portions of the date/time if you like, e.g. `YYYY-MM`.
+
+`latest` (optional)
+
+A date/time. Events after this time will not be included.
+
+`keywords` (optional)
+
+A mapping of keywords to translations, formatted like a Perl hash, e.g.: "richard=>\[[richard]\]". In this case occurrences of "richard" will be replaced with "\[[richard]\]" (which will later be processed as a WikiLink).
index a320a054216a0e8d2aed81dbf7d3c37b428cea2f..794e4bd9c5a6a7ad0e923710777d5f6629705282 100644 (file)
@@ -1,4 +1,4 @@
-[[!meta title="Javascript equivalent of plugin 'calendar'"]]
+[[!template id=plugin name=jscalendar author="[[Louis|spalax]]"]]
 
 # Jscalendar
 
index d48e4d6b717225652e0f5be94d65f96c01201ec3..c8d889e35f4f2be08ce02f5d60d2ac4b7f067f38 100644 (file)
@@ -1,3 +1,5 @@
+[[!template id=plugin name=monthcalendar author="[[Louis|spalax]]"]]
+
 # Monthcalendar
 
 This plugin displays a calendar, containing in each of its day the list of links of pages published on this day. It can be used, for example, to display archives of blog posts, or to announce events.
diff --git a/doc/plugins/contrib/nimble.mdwn b/doc/plugins/contrib/nimble.mdwn
new file mode 100644 (file)
index 0000000..29e2686
--- /dev/null
@@ -0,0 +1,6 @@
+[[!template id=plugin name=nimble author="[[schmonz]]"]]
+[[!template id=gitbranch branch=schmonz/nimble author="[[schmonz]]"]]
+[[!tag type/format]]
+
+This plugin lets ikiwiki convert [Nimble](http://was.tl/projects/nimble/)
+to HTML.
diff --git a/doc/plugins/contrib/parenttag.mdwn b/doc/plugins/contrib/parenttag.mdwn
new file mode 100644 (file)
index 0000000..d3bede7
--- /dev/null
@@ -0,0 +1,13 @@
+[[!template id=plugin name=parenttag author="[[Louis|spalax]]"]]
+[[!tag type/tags]]
+
+This plugin deals with subtags (e.g. `mathematics/calculus`). Whenever a page is tagged, it is automatically tagged with its subtags as well: the following directives are equivalent:
+
+    \[[!tag mathematics/calculus]]
+    \[[!tag mathematics mathematics/calculus]]
+
+The `taglink` directive is changed as well: instead of displaying the leaf of the tag, the full path (up to `tagbase` configuration option) is displayed, each bit linking to its corresponding page. For instance, directive `\[[!taglink mathematics/calculus]]` creates a link similar to `\[[TAGBASE/mathematics]]/\[[TAGBASE/mathematics/calculus]]`.
+
+## Code
+
+Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Parenttag]].
diff --git a/doc/plugins/contrib/sidebar2.mdwn b/doc/plugins/contrib/sidebar2.mdwn
new file mode 100644 (file)
index 0000000..574bdea
--- /dev/null
@@ -0,0 +1,95 @@
+[[!template id=plugin name=sidebar2 author="[[Louis|spalax]]"]]
+[[!tag type/chrome]]
+
+*Claim:* The [[sidebar|plugins/sidebar]] plugin has nothing
+to do with sidebars. This plugin renders some page (which happens to be named
+`sidebar`) and put the result in template variable `SIDEBAR`, in template
+`page.tmpl`. But the fact that it is a sidebar, i.e. a bar appearing on the
+side on the screen, is done by CSS.
+
+What if I want a sidebar, and a [[navigation bar|plugins/contrib/navbar]], and
+a footer a bit more elaborated than the one in the template, etc.? This plugin
+allows this.
+
+# Configuration
+
+If no option is given, or if option `global_sidebars` is a boolean, this plugin
+is identical to the [[sidebar plugin|plugins/sidebar/]] (if not, please [report
+a bug](https://atelier.gresille.org/projects/gresille-ikiwiki/issues)).
+Otherwise, `global_sidebars` is a list of sidebars to include. The list is as
+follow:
+
+    global_sidebars => [
+      "var1", "page1", "pagespec1",
+      "var2", "page2", "pagespec2",
+      ]
+
+The meaning is: if available, render `page1` in pages matching `pagespec1`, and
+put it in variable `var1` of the page template, and so on for `var2`, `page2`,
+etc.
+
+The default, which gives the behaviour of the sidebar plugin, is
+`global_sidebars => ["sidebar", "sidebar", "*"]`.
+
+*Remark: It would be more sensible to have a list of lists, as the following example, but I did not manage to do so because of [[this bug|bugs/structured_config_data_is_mangled]].*
+
+    global_sidebars => [
+      ["var1", "page1", "pagespec1"],
+      ["var2", "page2", "pagespec2"],
+      ]
+
+# Improvements over sidebar plugin
+
+* You can add several "sidebars" to your wiki. For example, to have a sidebar, a submeno that appear only in pages documentations, and a footer, your `global_sidebars` would be:
+
+      global_sidebars => [
+        "sidebar", "sidebar", "*",
+        "menu", "/doc/menu", "doc/*",
+        "footer", "/footer", "*"
+        ]
+
+* You can enable sidebars only in certain pages matching the pagespec. If, for
+  the same template variable, several pagespec match the current page, the
+  first page in the list is taken into account.
+
+  For example, the following configuration says: render `menu` as the sidebar
+  for every page, excepted subpages of `doc`, for which the `doc_menu` page
+  should be rendered.
+
+      global_sidebars => [
+        "sidebar", "doc_menu", "doc/*",
+        "sidebar", "menu", "*",
+        ]
+
+# Directive
+
+The behaviour of the `sidebar` directive is similar to the directive of the
+original [[sidebar|plugins/sidebar]], excepted that a new `var` argument is
+available.
+
+If this `var` argument is set, instead of applying to the default `sidebar`
+template variable, the directive applies to the value given in the argument.
+
+For example, the following command forces the `footer` sidebar to appear on the
+current page.
+
+    \[[!sidebar var=footer]]
+
+The following command forces the `footer` sidebar to appaer, containing the
+content given in argument.
+
+    \[[!sidebar var=footer content="TEST"]]
+
+# Which pages to render?
+
+Here is the decision process to decide what is rendered in a template variable
+handled by this plugin.
+
+1. If the page contains the [[sidebar|ikiwiki/directive/sidebar]] directive, with a `content` argument, this content is rendered.
+2. If the page contains the [[sidebar|ikiwiki/directive/sidebar]] directive with no `content` argument, the first rule for the considered template variable is applied, disregarding the pagespec.
+3. If none of the above, the first rule having its pagespec patching the current page is applied.
+4. If none of the above, the variable is left empty.
+
+# Download and install
+
+Code and documentation: [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Sidebar2]].
diff --git a/doc/plugins/contrib/taskreport.mdwn b/doc/plugins/contrib/taskreport.mdwn
new file mode 100644 (file)
index 0000000..08f7ee7
--- /dev/null
@@ -0,0 +1,62 @@
+[[!template id=plugin name=taskreport author="[[Louis|spalax]]"]]
+
+# Taskreport
+
+The taskreport plugin provides the `task` directive (see below), displaying
+[taskwarrior](http://taskwarrior.org) data as a table.
+
+## Plugin options
+
+* `task_bin`: path to the task binary. Default is "task".
+* `task_common`: arguments to all task calls. Can be used, for example, to set
+  a non-default taskrc location.
+* `task_dir`: directory where to find task data files, if non-default. This
+  directory must be handled by IkiWiki. Otherwise, use the `task_common`
+  argument. This argument must be relative to the root of the wiki sources.
+* `task_tmpdir`: directory where to copy task data files before calling task.
+  It can be used to circumvent [[lack of `--read-only`
+  option|http://taskwarrior.org/issues/424]]. Otherwise, those data files may
+  be modified by the task call. Setting this directory ensure that they are
+  not. This argument should be absolute (I do not know what would happen
+  otherwise).
+* `task_columns`: List of default columns to display with the
+  task directive. Default is all available columns.
+
+
+## Directive
+
+### Directive options
+
+Options are:
+
+* `arg`: arguments to add to the task call. For example, to display a list of
+  pending tasks tagged `ikiwiki`, set it to `"status:pending +ikiwiki"`.
+* `show`: number of tasks to show. Default is 0, and means: print all tasks.
+* `sort`: tasks are sorted according to this column. Default is `urgency`.
+* `reverse`: set yes to reverse order.
+* `annotations`: set to yes to display annotations. Default is "yes".
+
+### Task system call
+
+When using this directive, the result of the following system call is printed:
+
+    TASK_BIN export rc.verbose=nothing TASK_COMMON [rc.data.location=DIR] ARG
+
+* `TASK_BIN` and `TASK_COMMON` are the `task_bin` and `task_common` options set in ikiwiki setup.
+* If `task_dir` and `task_tmpdir` are set in ikiwiki setup, `DIR` is `task_tmpdir` ; if only `task_dir` is set, `DIR` is `task_dir` ; otherwise, this part is not used.
+* `ARG` is the `arg` option of the directive.
+
+### CSS
+
+To allow CSS customization, the following classes are used.
+
+* `task` is the class of the table.
+* `urgency`, `project`, etc. are the class of the `th` and `td` elements for the corresponding task attributes.
+* `annotation` is the class of the `tr` element of the table containing an annotation.
+
+
+## Download and install
+
+Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Taskreport]]
+
+-- [[Louis|spalax]]
diff --git a/doc/plugins/recentchangesdiff/discussion.mdwn b/doc/plugins/recentchangesdiff/discussion.mdwn
new file mode 100644 (file)
index 0000000..0ec6d7b
--- /dev/null
@@ -0,0 +1,28 @@
+# Syntax highlighting of recent changes
+
+Hello,
+is there a simple way to highlight the diff printed in the [[/recentchanges]]
+page? I imagined several solutions, but I am still wondering about the best one.
+
+* One might activate the [[plugins/highlight]] and [[plugins/format]] plugins,
+  and change the [[change.tmpl|/templates]] template, to use this plugin. But as
+  the diff is formatted not to mess up html (e.g. `\[[link]]` becomes
+  `&#91;&#91;link&#93;&#93;`), the output would be unreadable.
+* One might improve [[plugins/recentchangesdiff]] plugin by adding an option
+  `diff_escape_html=>yes/no` to it. Setting this to `no` would leave html
+  unescaped, so that it would be correctly rendered by plugin
+  [[plugins/format]].
+* One might change the [[plugins/recentchangesdiff]] plugin, to add syntax
+  highlighting to diffs, but this would duplicate plugin [[plugins/highlight]].
+
+In my opinion, the second solution is the best one. However, to be neat the
+`change.tmpl` template might detect that both plugin [[plugins/format]] and
+`diff_escape_html` option are enabled, and, depending on it, output the diff
+in `<pre>DIFF</pre>` tags or in the `\[[!format diff """DIFF"""]]` directive.
+
+Letting user edit `change.tmpl` template to enable this feature is also
+possible, but this would prevent him from benefiting of the later improvement
+of this template. In my opinion, an ideal solution would require the user
+nothing more than enabling some plugins or options.
+
+-- Louis
index f116649c1006ee1ed68d16de8e16d1de049bd458..4d517a2664af800ee1d9c88e530dc11f472bc35c 100644 (file)
@@ -5,7 +5,7 @@ This plugin adds full text search to ikiwiki, using the
 [xapian](http://xapian.org/) engine, its
 [omega](http://xapian.org/docs/omega/overview.html) frontend, and the
 [[!cpan Search::Xapian]], [[!cpan Digest::SHA]], and [[!cpan HTML::Scrubber]]
-perl modules (on debian, check that you have packages `libsearch-xapian-perl`, `libdigest-sha-perl` and `libhtml-scrubber-perl` installed).
+perl modules (on debian, check that you have packages `xapian-omega`, `libsearch-xapian-perl`, `libdigest-sha-perl` and `libhtml-scrubber-perl` installed).
 
 The [[ikiwiki/searching]] page describes how to write search queries.
 
index b7dd11906afc0eb28384e5c3d4d2ef8427b77fce..8649262c6c577102ac32d65bbe1918f1cc74446e 100644 (file)
@@ -16,8 +16,7 @@ This plugin is mostly useful as something that other plugins can depend on:
 * [[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
-    puts them in the transient underlay
+* [[plugins/comments]] writes comments pending moderation to the transient underlay
 * [[plugins/recentchanges]] writes new changes into the transient underlay
 * [[plugins/tag]] can be configured to auto-create missing
     tag pages but not commit them, in which case they go in the transient
index b57ef40571253a1e4af997bdbfd64eb5fd861a3e..191004dc3cfd80a888b3db772ff1d4d131bd481f 100644 (file)
@@ -3,62 +3,11 @@ I've tried to retrieve the wmd-editor source tarball lately, but the site seems
 From what I've read on the Internet, wmd-editor is not (yet?) free software by itself, and its author has gone MIA.
 But it looks like somebody recently took the step to rewrite a wmd-clone under a saner license, see [[pagedown|http://code.google.com/p/pagedown/source/browse/]].
 
-Given all the above, what about upgrading this plugin to use pagedown instead of wmd? It seem a clear win to me...
+Given all the above, what about upgrading this plugin to use pagedown instead of wmd? It seem a clear win to me... --(unsigned)
 
-> AFAICS, pagedown is a modified version of WMD. Let's 
-> look at its license file: --[[Joey]] 
+> I have moved that conversation to the pagedown plugin todo [[todo/pagedown_plugin/discussion]] page, which now actually has an implementation now, and is free! --[[anarcat]]
 
-<pre>
-A javascript port of Markdown, as used on Stack Overflow
-and the rest of Stack Exchange network.
-
-Largely based on showdown.js by John Fraser (Attacklab).
-
-Original Markdown Copyright (c) 2004-2005 John Gruber
-  <http://daringfireball.net/projects/markdown/>
-
-
-Original Showdown code copyright (c) 2007 John Fraser
-
-Modifications and bugfixes (c) 2009 Dana Robinson
-Modifications and bugfixes (c) 2009-2011 Stack Exchange Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy [...]
-</pre>
-
-> Ok, so it says it's based on showdown. John Fraser wrote showdown and also 
-> WMD, which IIRC was built on top of showdown. (Showdown converts the
-> markdown to html, and WMD adds the editor UI.)
-> 
-> I can nowhere find a actual statement of the copyright of showdown or
-> WMD. <http://code.google.com/p/wmd/> has a "MIT License" notice on it,
-> but this is clearly just the license chosen when signing up at google
-> code for the repo that would be used for a rewrite of the code, and the only thing 
-> said about the previous 1.0 release of WMD is "use it freely", which is not
-> specific enough to be a grant of license, and is moreover not a free
-> software license, as it does not cover distribution or modification.
-> 
-> Which was all covered in the thread here, 
-> when StackOverflow decided to start working on pagedown.
-> <http://blog.stackoverflow.com/2008/12/reverse-engineering-the-wmd-editor/>
-> This thread does not give any indication that they ever managed to get
-> a license grant for WMD/showdown. It frankly, does not inspire confidence
-> that the people working on this care about the license.
-> 
-> It would probably be pretty easy to adapt the ikiwiki wmd plugin 
-> to use pagedown. But without a clear and credible license, why?
-> 
-> (Note that I have a wmd-new branch in my ikiwiki git repo that
-> uses <https://github.com/derobins/wmd>, which was an earlier
-> version of pagedown (probably, not entirely clear).)
-> 
-> An alternate alternative is markitup: <http://markitup.jaysalvat.com/>
-> It has a clear history and a credible license (MIT or GPL dual license).
-> It's also easily extensible to other formats so could handle rst etc.
-> It does not, however, have a markdown to html converter -- for 
-> previewing it has to talk to the server with AJAX.
-> --[[Joey]] 
+Other conversations:
 
 >> I've got pagedown working on my personal site (simon.kisikew.org) but I'm not sure how
 >> I can inject the relevant &lt;div&gt;'s in the right place. They need to go **above**
index d6e6d8d1e61aec99163b5afdcdef6bcee56e811e..d2d1a6329c4c9c0cf0429d14f35b820ce5329e06 100644 (file)
@@ -1259,6 +1259,20 @@ and an error message on failure.
 This hook and `rcs_preprevert` are optional, if not implemented, no revert
 web interface will be available.
 
+### `rcs_find_changes($)`
+
+Finds changes committed since the passed RCS-specific rev. Returns
+a hash of the files changed, a hash of the files deleted, and the
+current rev.
+
+This hook is optional.
+
+### `rcs_get_current_rev()`
+
+Gets a RCS-specific rev, which can later be passed to `rcs_find_changes`.
+
+This hook is optional.
+
 ### PageSpec plugins
 
 It's also possible to write plugins that add new functions to
index f2ff5802ec30747584ba9510fcad679e4213e3af..bc8f4d82416aa3afef54a7b3d09662d2833dad17 100644 (file)
@@ -80,7 +80,10 @@ Probably incomplete list:
 * Enable tagbase by default (so that tag autocreation will work by default).
   Note that this is already done for wikis created by `auto-blog.setup`.
 * [[tips/html5]] on by default (some day..)
-* Remove support for old `.ikiwiki/comments_pending` from comment plugin.
+* Remove support for old `.ikiwiki/comments_pending` and for
+  pending comments located in the srcdir, rather than transient underlay,
+  from comment plugin. That support makes comment moderation slow as
+  it has to check all the old locations.
 
 In general, we try to use [[ikiwiki-transition]] or forced rebuilds on
 upgrade to deal with changes that break compatability. Some things that
index b9b3122e21aea43060df01fc284bd2fa2be4a437..06c2d7ca72e01c8f48e81e29a29a02aaff597c78 100644 (file)
@@ -2,6 +2,10 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki
 (version [[!version  ]]).
 
 hello world (right back at ya)
+asfddsaf sadfkjal;skdfj saldkfjasdf  
+sdafljas;dlfk safdiuhsdf
+
+
 
 > This is a blockquote.
 >
@@ -84,3 +88,31 @@ This **SandBox** is also a [[blog]]!
 [[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]]
 
 Testy test!
+
+
+<p>
+This is an email link:
+<a href="mailto:erik.josefsson@europarl.europa.eu?Subject=Hello%20again" target="_top">
+Send Mail</a>
+</p>
+
+This is some preformatted text.  Each line is proceeded by four spaces.
+
+    Test
+
+    <Test>
+
+    <test>
+    <test>
+
+    <test>
+      <child />
+    </test>
+
+...Now why doesn't it work like that on my copy of ikiwiki? :(
+
+Räksmörgås.
+
+`pre?`
+
+
diff --git a/doc/sandbox/New_blog_entry.mdwn b/doc/sandbox/New_blog_entry.mdwn
new file mode 100644 (file)
index 0000000..9327285
--- /dev/null
@@ -0,0 +1,3 @@
+Räksmörgåstest.
+
+ハッカー
diff --git a/doc/sandbox/Test.py b/doc/sandbox/Test.py
new file mode 100644 (file)
index 0000000..7be9128
--- /dev/null
@@ -0,0 +1,2 @@
+for i in range(10):
+  print i
index e5aa9f63e1b3f84442ad3007f22c0501792dac22..6e04dcf8f40ee4a060cefbce7ab7ce4f591ae580 100644 (file)
@@ -10,8 +10,9 @@ to the setup branch in git to be able to update the ban list, get in touch
 with joey with a ssh public key. Once your key is added, you will be able
 to edit the ikiwiki.setup file on the setup branch, and push changes.
 You will also be able to access the recent web server logs to find IP
-addresses from recent web edits, by running: `ssh b-ikiwiki@ikiwiki.info
-logdump | grep 'GET .*\?updated HTTP\/' > access.log`.
+addresses from recent web edits, by running:
+
+    ssh b-ikiwiki@ikiwiki.info logdump | grep 'GET .*\?updated HTTP\/' > access.log
 
 ## Spam commits
 
@@ -26,4 +27,7 @@ d93a948 | 2013/09/05 | soman81   | 31.17.11.19
 d759052 | 2013/09/08 | spain1001 | 80.187.106.2
 24a1c62 | 2013/09/15 | spain1001 | 80.187.106.136
 cba01c2 | 2013/09/15 | spain1001 | 80.187.106.136
+702a3e5 | 2014/01/02 | Toni      | 124.105.173.121
+c2924ce | 2014/01/02 | domtheo9110 | 182.253.51.174
+cd81b9f | 2014/01/03 | domtheo9110 | ?
 """]]
index 067a3bf7a65f4449bcd2452407c137dc5c27dc2b..4c48e5c7b9ebbcb2b9b1d6a9f49915c727f2b55c 100644 (file)
@@ -5,10 +5,8 @@
  */
 
 /* html5 compat */
-article,
-header,
-footer,
-nav {
+article,aside,details,figcaption,figure,
+footer,header,hgroup,menu,nav,section {
        display: block;
 }
 
index 4fdf937ff2da6be6b794cb44dce850f08700b548..853da92801ffc8c039c29f9133238cd4342aa4d6 100644 (file)
@@ -1,8 +1,8 @@
-<span class="infobox">
+<div class="infobox">
 Available in a [[!taglink /git]] repository [[!taglink branch|/branches]].<br />
-Branch: <TMPL_VAR branch><br />
-Author: <TMPL_VAR author><br />
-</span>
+Branch: <TMPL_IF browse><a href="<TMPL_VAR browse>"></TMPL_IF><TMPL_VAR branch><TMPL_IF browse></a></TMPL_IF><br />
+<TMPL_IF author>Author: <TMPL_VAR author><br /></TMPL_IF>
+</div>
 <TMPL_UNLESS branch>
 This template is used to create an infobox for a git branch. It uses
 these parameters:
index e971a83396ec044fa4ae25575e53e94785bd4201..35feacb714f6d7d3355bb06eb3c2c519b653ec99 100644 (file)
@@ -119,14 +119,26 @@ repository.
 
 ## Configure the git repository (on the git machine) to update the wiki after a push
 
-Add in the `post-receive` hook (file `SITE.git/hooks/post-receive`):
+Add in the `post-receive` hook (file `SITE.git/hooks/post-receive`):
 
-        wget "http://WIKI-URL/ikiwiki.cgi?do=ping" -O /dev/stdout
+      git log -1 --format=format:%ae HEAD | grep -e '@web$' -e 'USER@HOST' ||  wget "http://WIKI-URL/ikiwiki.cgi?do=ping" -O /dev/stdout
 
-  If your wiki is password protected, use:
+If your wiki is password protected, use:
 
-        wget "http://LOGIN:PASSWORD@WIKI-URL/ikiwiki.cgi?do=ping" -O /dev/stdout
+      git log -1 --format=format:%ae HEAD | grep -e '@web$' -e 'USER@HOST' ||  wget "http://LOGIN:PASSWORD@WIKI-URL/ikiwiki.cgi?do=ping" -O /dev/stdout
 
+The bit before `wget` is here to prevent updating the wiki while it is
+updating, which can lead to a deadlock. Indeed, when the wiki is edited via
+web, or a tag page is automatically added, IkiWiki pushes the changes to the
+Git machine. Then, the hook on this latter machine tries to pull changes from
+the IkiWiki machine, and here is the deadlock. Explanations of the command:
+
+* `git log -1 --format=format:%ae HEAD`: Looks for the user name of the
+  latest commit.
+* `grep -e '@web$' -e 'USER@HOST': Check whether this last commit was pushed
+  from the IkiWiki machine (change `USER@HOST` to the appropriate string).
+* `wget ...`: If the last commit does not come from the IkiWiki machine
+  (which means it comes from another machine), update the wiki.
 
 ## Going further
 
@@ -137,3 +149,8 @@ repository.
 - *Using [[gitolite|https://github.com/sitaramc/gitolite]] to manage
   repositories on the git machine* Simply replace the manipulations of git on
   the git machine by the corresponding manipulations using gitolite.
+    * With gitolite, you can use this line in a `post-update` hook:
+
+        `[ x"$GL_USER" = x"`*`gitolite-user`*`" ] || wget ...`
+
+        thus, you filter out precisely the events that originate from the server-to-be-pinged, no matter what the commit id says. (For example, if you push commits you created on a local CGI ikiwiki, they'd be called '@web' as well).
index e60b413ddc39ba3e3d6073bb722de6d631633511..e8f6a26a1e8f6d27289e56835e2d6a97478cd5ad 100644 (file)
@@ -182,12 +182,25 @@ There is a Python script for converting from the Mediawiki format to Markdown in
 
 ## Scripts
 
+### media2iki
+
 There is a repository of tools for converting MediaWiki to Git based Markdown wiki formats (such as ikiwiki and github wikis) at <http://github.com/mithro/media2iki>. It also includes a standalone tool for converting from the Mediawiki format to Markdown. [[mithro]] doesn't frequent this page, so please report issues on the [github issue tracker](https://github.com/mithro/media2iki/issues).
 
+### mediawiki2gitikiwiki (ruby)
+
 [[Albert]] wrote a ruby script to convert from mediawiki's database to ikiwiki at <https://github.com/docunext/mediawiki2gitikiwiki>
 
+### levitation (xml to git)
+
 [[scy]] wrote a python script to convert from mediawiki XML dumps to git repositories at <https://github.com/scy/levitation>.
 
+### git-mediawiki
+
+There's now support for mediawiki as a git remote:
+
+<https://github.com/moy/Git-Mediawiki/wiki>
+
+### mediawikigitdump
 [[Anarcat]] wrote a python script to convert from a mediawiki website to ikiwiki at git://src.anarcat.ath.cx/mediawikigitdump.git/. The script doesn't need any special access or privileges and communicates with the documented API (so it's a bit slower, but allows you to mirror sites you are not managing, like parts of Wikipedia). The script can also incrementally import new changes from a running site, through RecentChanges inspection. It also supports mithro's new Mediawiki2markdown converter (which I have a copy here: git://src.anarcat.ath.cx/media2iki.git/).
 
 > Some assembly is required to get Mediawiki2markdown and its mwlib
index 9067fbea57c6f3e77cdb2b72d00403a12d096f2c..8865508d33909a2016bb8eb249fbaf69718f6ec0 100644 (file)
@@ -15,7 +15,8 @@ configuration changes should work anywhere.
 
 ## apache 2
 
-* Make sure the cgi module is loaded. (Ie, `a2enmod cgi`)
+* Make sure the cgi module is loaded. (Ie, `a2enmod cgi`).
+  Note that the cgid module will not work.
 
 * Edit /etc/apache2/apache2.conf (or /etc/apache2/mods-available/mime.conf)
   and add a line like this:
index cfa565d1a4b317bd7666b4ab3c701339ea167d37..4011763fc2468ea5b32c957cc5f0a5a1053d4153 100644 (file)
@@ -19,15 +19,14 @@ for setting up ikiwiki with git.
 Next, `git clone` the source (`$REPOSITORY`, not `$SRCDIR`)
 from the server to the laptop.
 
-Now, set up a [[web_server|dot_cgi]] on your laptop, if it doesn't
-already have one.
-
 Now you need to write a setup file for ikiwiki on the laptop. Mostly this
 is standard, but a few special settings are needed:
 
 * Configure a cgi wrapper as usual, but configure the git wrapper to
   be written to the `post-commit` hook of the git clone, rather than the
   usual `post-update` hook.
+  
+    git_wrapper: /home/user/foo-wiki/.git/hooks/post-commit
 
 * By default, ikiwiki pulls and pushes from `origin`. This shouldn't be 
   done on the laptop, because the origin may not be accessible (when the
@@ -36,7 +35,7 @@ is standard, but a few special settings are needed:
 
   Make sure you have ikiwiki 2.11 or better installed, and set:
   
-       gitorigin_branch => "",
+       gitorigin_branch
 
 * You can optionally enable to the [[plugins/mirrorlist]] plugin,
   and configure it so that each page links to the corresponding page on the
@@ -44,7 +43,30 @@ is standard, but a few special settings are needed:
 
 Now just run `ikiwiki -setup wiki.setup -getctime` and you should be
 good to go. (You only need the slow `-getctime` option the first time you
-run setup.)
+run setup.) If you have taken your `wiki.setup` file from an existing
+wiki, you may need to change certain parameters to adapt to the paths
+on your laptop, a few examples:
+
+    srcdir: /home/user/foo-wiki
+    destdir: /home/user/public_html
+    # optional
+    url: http://foo-wiki.localhost
+    libdir: /home/user/foo-wiki/.ikiwiki
+    ENV:
+        TMPDIR: /home/user/tmp
+    cookiejar:
+        file:
+
+Now, set up a [[web_server|dot_cgi]] on your laptop, if it doesn't
+already have one. You can also skip that step if you want only to
+render the wiki and not allow edition, in which case you'll want the
+following:
+
+    # disable CGI, unless you want to get really funky
+    cgiurl: 
+    cgi_wrapper: 
+
+You can also direct people to the main server for web edition there.
 
 Use standard git commands to handle pulling from and pushing to the server.
 
index d66ee9343296e61bbfff62a7128c76e95b8754a7..cf412d266f17b307ecd0b3732af3fd426a30ff62 100644 (file)
@@ -148,20 +148,22 @@ That is accomplished as follows:
 Be aware that the [[plugins/search]] plugin has to update the search index
 whenever any page is changed. This can slow things down somewhat.
 
-## profiling
+## cgi overload workaround
 
-If you have a repeatable change that ikiwiki takes a long time to build,
-and none of the above help, the next thing to consider is profiling
-ikiwiki. 
+If the ikiwiki.cgi takes a long time to run, it's possible
+that under load, your site will end up with many
+of them running, all waiting on some long-running thing,
+like a site rebuild. This can prevent the web server from doing anything
+else.
 
-The best way to do it is:
+A workaround for this problem is to set `cgi_overload_delay` to 
+a number of seconds. Now if ikiwiki.cgi would block waiting
+for something, it will instead display a Please wait message (configurable
+via `cgi_overload_message`, which can contain arbitrary html),
+and set the page to reload it after the configured number of seconds.
 
-* Install [[!cpan Devel::NYTProf]]
-* `PERL5OPT=-d:NYTProf`
-* `export PER5OPT`
-* Now run ikiwiki as usual, and it will generate a `nytprof.out` file.
-* Run `nytprofhtml` to generate html files.
-* Those can be examined to see what parts of ikiwiki are being slow.
+This takes very little load, as it all happens within compiled C code.
+Note that it is currently limited to GET requests, not POST requests.
 
 ## scaling to large numbers of pages
 
@@ -171,6 +173,12 @@ Finally, let's think about how huge number of pages can affect ikiwiki.
   new and changed pages. This is similar in speed to running the `find`
   command. Obviously, more files will make it take longer.
 
+  You can avoid this scanning overhead, if you're using git, by setting
+  `only_committed_changes`. This makes ikiwiki -refresh query git for
+  changed files since the last time, which tends to be a lot faster.
+  However, it only works if all files in your wiki are committed to git
+  (or stored in the [[/plugins/transient]] underlay).
+
 * Also, to see what pages match a [[ikiwiki/PageSpec]] like "blog/*", it has
   to check if every page in the wiki matches. These checks are done quite
   quickly, but still, lots more pages will make PageSpecs more expensive.
@@ -186,3 +194,18 @@ Finally, let's think about how huge number of pages can affect ikiwiki.
 
 If your wiki will have 100 thousand files in it, you might start seeing
 the above contribute to ikiwiki running slowly.
+
+## profiling
+
+If you have a repeatable change that ikiwiki takes a long time to build,
+and none of the above help, the next thing to consider is profiling
+ikiwiki. 
+
+The best way to do it is:
+
+* Install [[!cpan Devel::NYTProf]]
+* `PERL5OPT=-d:NYTProf`
+* `export PER5OPT`
+* Now run ikiwiki as usual, and it will generate a `nytprof.out` file.
+* Run `nytprofhtml` to generate html files.
+* Those can be examined to see what parts of ikiwiki are being slow.
diff --git a/doc/todo/Option_linktext_for_pagestats_directive.mdwn b/doc/todo/Option_linktext_for_pagestats_directive.mdwn
new file mode 100644 (file)
index 0000000..8bbb7c2
--- /dev/null
@@ -0,0 +1,196 @@
+[[!meta title="Option disp for pagestats directive"]]
+
+[[!toggle id=old text="Old, outdated, monologue"]]
+
+[[!toggleable id=old text="""
+Hello,    
+here is a proposal to add a new option to [[ikiwiki/directive]]
+[[ikiwiki/directive/pagestats]] (from plugin [[plugins/pagestats]]).
+
+This adds global option `pagestats_linktext` (and directive option `linktext`) to specify whether directive `pagestats` should use the page name or the [[title|ikiwiki/directive/meta]] of tags.
+
+Here is a [[patch]], for both code and documentation.
+
+    diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm
+    index 17b26f7..a65fd7a 100644
+    --- a/IkiWiki/Plugin/pagestats.pm
+    +++ b/IkiWiki/Plugin/pagestats.pm
+    @@ -29,11 +29,31 @@ sub getsetup () {
+                       rebuild => undef,
+                       section => "widget",
+               },
+    +          pagestats_linktext => {
+    +                  type => "string",
+    +                  example => "title",
+    +                  description => "Set link text to be whether page title (page) or meta title (title).",
+    +                  safe => 1,
+    +                  rebuild => 1,
+    +          },
+    +}
+    +
+    +sub linktext ($$) {
+    +  # Return the text of the link to a tag, depending on option linktext.
+    +  use Data::Dumper;
+    +  my $page = $_[0];
+    +  my $linktype = $_[1];
+    +  if (($linktype eq "title") and (exists $pagestate{$page}{meta}{title})) {
+    +          return $pagestate{$page}{meta}{title};
+    +  } else {
+    +          return undef;
+    +  }
+     }
+     
+     sub preprocess (@) {
+       my %params=@_;
+       $params{pages}="*" unless defined $params{pages};
+    +  $params{linktext} = $config{pagestats_linktext} unless defined $params{linktext};
+       my $style = ($params{style} or 'cloud');
+       
+       my %counts;
+    @@ -78,7 +98,7 @@ sub preprocess (@) {
+               return "<table class='".(exists $params{class} ? $params{class} : "pageStats")."'>\n".
+                       join("\n", map {
+                               "<tr><td>".
+    -                          htmllink($params{page}, $params{destpage}, $_, noimageinline => 1).
+    +                          htmllink($params{page}, $params{destpage}, $_, noimageinline => 1, linktext => linktext($_, $params{linktext})).
+                               "</td><td>".$counts{$_}."</td></tr>"
+                       }
+                       sort { $counts{$b} <=> $counts{$a} } keys %counts).
+    @@ -101,8 +121,8 @@ sub preprocess (@) {
+                       
+                       $res.="<li>" if $style eq 'list';
+                       $res .= "<span class=\"$class\">".
+    -                          htmllink($params{page}, $params{destpage}, $page).
+    -                          "</span>\n";
+    +                                                  htmllink($params{page}, $params{destpage}, $page, linktext => linktext($page, $params{linktext})).
+    +                                                  "</span>\n";
+                       $res.="</li>" if $style eq 'list';
+     
+               }
+    diff --git a/doc/ikiwiki/directive/pagestats.mdwn b/doc/ikiwiki/directive/pagestats.mdwn
+    index 8d904f5..56970e6 100644
+    --- a/doc/ikiwiki/directive/pagestats.mdwn
+    +++ b/doc/ikiwiki/directive/pagestats.mdwn
+    @@ -37,4 +37,6 @@ links:
+     The optional `class` parameter can be used to control the class
+     of the generated tag cloud `div` or page stats `table`.
+     
+    +The optional `linktext` parameter can be used to control the text that is displayed for each tag. It can be `page` (the name of the page is used) or `title` (the title, according to the [[ikiwiki/directive/meta]] [[ikiwiki/directive]], is used). This option can be set globally in the setup using option `pagestats_linktext`; default is `page`.
+    +
+     [[!meta robots="noindex, follow"]]
+    diff --git a/doc/plugins/pagestats.mdwn b/doc/plugins/pagestats.mdwn
+    index 347e39a..6a72a9a 100644
+    --- a/doc/plugins/pagestats.mdwn
+    +++ b/doc/plugins/pagestats.mdwn
+    @@ -4,3 +4,7 @@
+     This plugin provides the [[ikiwiki/directive/pagestats]]
+     [[ikiwiki/directive]], which can generate stats about how pages link to
+     each other, or display a tag cloud.
+    +
+    +Their is one global option for the setup file:
+    +
+    +* `pagestats_linktext` controls the text that is displayed for each tag. If `page` (the default), the name of the page is used; if `title`, its title (according to the [[ikiwiki/directive/meta]] [[ikiwiki/directive]]) is used.
+
+-- [[Louis|spalax]]
+
+> Hello,    
+> do not accept my patch: it is an ugly hack that works for me, but its too narrow to be merged in IkiWiki:
+> 
+>   - it assumes the [[ikiwiki/directive/pagestats]] directive only deals with tags, which is wrong;
+>   - such a feature (allowing displaying tags using their title), if enabled, should be enabled for the [[plugins/tag]] plugin (and maybe other plugins [[I have in mind|users/spalax]]) as well.
+> 
+> I cannot manage to find a solution to my problem that suits me.
+> 
+> # My problem
+> 
+> On two sites I maintain using IkiWiki, I have tags that:
+> 
+> - have special characters in it (like [[·|http://en.wikipedia.org/wiki/Interpunct]]) that generate ugly URLs;
+> - have subtags (e.g. `math/calculus`, `math/algebra`, `physics/mechanic` etc.).
+> 
+> That is, having [[ikiwiki/directive/taglink]] or [[ikiwiki/directive/pagestats]] displaying tags using the pagename (that is something derived from the basename of the URL) is not sufficient for me. I would like to be able to display them using their title, their full name (from the `tagbase` parameter), or both.
+> 
+> # Solution?
+> 
+> A solution would be to provide a `tagtext` config option, set to one of `page` (use pagename), `title` (use [[ikiwiki/directive/meta]] title), `path` (use path, since the tagbase), `pathtitle` (use path, and use title for each of the subtags); or a boolean `display_tagtitle` and `display_tagpath`, which would handle the way tags are displayed.
+> 
+> I see at least two drawbacks to this solution:
+> 
+> - I do not know what would be the default of these options, not to break backward compatibility: [[ikiwiki/directive/taglink]] would suggest `page`, whereas the footer would suggest `path`.
+> - The [[ikiwiki/directive/pagestats]] directive would need an optional boolean parameter `tag`, to specify whether to use these options or not.
+> 
+> # *My* problem ?
+> 
+> I actually wonder if someone else also have this problem: as far as I can see on other sites using IkiWiki and tags, I would not be surprised if others are satisfyed with the current way tags are displayed: I do not remember having seen subtags, or tags in non-English language with weird characters in them.
+> 
+> So, I wonder whether this discussion would benefit IkiWiki, or if I should just go on with my hack (or maybe a plugin, but I think it would be quite difficult to do, given that the very same function is used to display tags and to uniquely identify them).
+> 
+> -- [[Louis|spalax]]
+"""]]
+
+I eventually managed to get something that suits me, for the problem described above (I want [[ikiwiki/directive/pagestats]] directive to display [[title|ikiwiki/directive/meta]] rather than page name).
+
+Here is a [[patch]] that adds an option `disp` for the [[ikiwiki/directive/pagestats]], acting exactly the same as option `show` for the [[ikiwiki/directive/map]] directive (but parameter `show` was already used for something else). That is, if one wants its tags displayed using their [[title|ikiwiki/directive/meta]] rather than their page name, she can use param `disp`, is in:
+
+    \[[!pagestats  pages="tags/*" disp=title]]
+
+[[!toggle id=patch text="Patch"]]
+[[!toggleable id=patch text="""
+    diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm
+    index 17b26f7..8a5e100 100644
+    --- a/IkiWiki/Plugin/pagestats.pm
+    +++ b/IkiWiki/Plugin/pagestats.pm
+    @@ -31,6 +31,19 @@ sub getsetup () {
+               },
+     }
+     
+    +sub linktext ($%) {
+    +  # Return the text of the link to a tag, depending on option linktext.
+    +  my ($page, %params) = @_;
+    +  if (exists $params{disp} && 
+    +      exists $pagestate{$page} &&
+    +      exists $pagestate{$page}{meta}{$params{disp}}) {
+    +    return $pagestate{$page}{meta}{$params{disp}};
+    +  }
+    +  else {
+    +    return undef;
+    +  }
+    +}
+    +
+     sub preprocess (@) {
+       my %params=@_;
+       $params{pages}="*" unless defined $params{pages};
+    @@ -78,7 +91,7 @@ sub preprocess (@) {
+               return "<table class='".(exists $params{class} ? $params{class} : "pageStats")."'>\n".
+                       join("\n", map {
+                               "<tr><td>".
+    -                          htmllink($params{page}, $params{destpage}, $_, noimageinline => 1).
+    +                          htmllink($params{page}, $params{destpage}, $_, noimageinline => 1, linktext => linktext($_, %params)).
+                               "</td><td>".$counts{$_}."</td></tr>"
+                       }
+                       sort { $counts{$b} <=> $counts{$a} } keys %counts).
+    @@ -101,7 +114,7 @@ sub preprocess (@) {
+                       
+                       $res.="<li>" if $style eq 'list';
+                       $res .= "<span class=\"$class\">".
+    -                          htmllink($params{page}, $params{destpage}, $page).
+    +                                                  htmllink($params{page}, $params{destpage}, $page, linktext => linktext($page, %params)).
+                               "</span>\n";
+                       $res.="</li>" if $style eq 'list';
+"""]]
+
+Regards,  
+-- [[Louis|spalax]]
+
+> Saved to my git repository as `contrib/spalax/pagestats-disp`.
+> I'd rather find a better name than `disp` for the parameter.
+> I think `display` would be an improvement, but that doesn't solve the
+> problem of "it's a synonym for show, and non-obvious which is which".
+> Maybe `linktext`?
+> 
+> It's unfortunate that `map` and `pagestats` have different meanings for
+> the `show` parameter. I'm tempted to propose a patch that adds something
+> like `limit` (by analogy with SQL) or `max` as the canonical name for the
+> "number of things to match" parameter, at which point a non-numeric
+> `show` could mean this thing. --[[smcv]]
diff --git a/doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn b/doc/todo/Support_clipboard_copy__47__paste_of_images.mdwn
new file mode 100644 (file)
index 0000000..ff2eeb8
--- /dev/null
@@ -0,0 +1,3 @@
+Using one of the strategies described here: http://stackoverflow.com/questions/6333814/ ... we could support copying/pasting images from the clipboard (in supported browsers).
+
+[[!tag wishlist]]
diff --git a/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn b/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn
new file mode 100644 (file)
index 0000000..4fe591a
--- /dev/null
@@ -0,0 +1 @@
+allow option for requiring description when editing page. This is so if a commit to an rcs is used, the commit message will not be blank.
index 600c6cf7be58c043361d2d62c22222b9b07986e2..bb0221d72a4542745fb91748d44d908d8c6847d9 100644 (file)
@@ -7,6 +7,7 @@ nice to add:
   position in the page edit form, without actually reposting the form.
   (Falling back to the current reposting of the form if javascript is not
   available of course.)
+* Allow files to be attached from the add comments form, as well as the edit page.
 * An option to not `rcs_add` new attachments, but just write them to the
   srcdir. This would allow the admin to review them, and manually
   add/delete them before they bloat history.
index 7a5a17517cb49282a4ba5a9a5d27ec5b67c987a4..09e8b087357c658b1d8c723f34163da073836caa 100644 (file)
@@ -29,5 +29,13 @@ The date for publishing and expiring could be set be using some new directives;
 > I do think the general problem with that approach is that you have to be
 > careful to prevent the unpublished pages from leaking out in any
 > inlines, maps, etc. --[[Joey]] 
+>
+
+> Some times ago, I wrote a Pagespec function that matches pages that have
+> creation date in the future: [[plugins/contrib/created_in_future/]]. It can
+> be used to solve part of the original problem: publication on some date. For
+> unpublication, I think that my plugin is not sufficient.
+> 
+> -- [[Louis|spalax]]
 
 [[!tag wishlist]]
diff --git a/doc/todo/bitcoin_URI_scheme.mdwn b/doc/todo/bitcoin_URI_scheme.mdwn
new file mode 100644 (file)
index 0000000..a0f3e11
--- /dev/null
@@ -0,0 +1,16 @@
+This is a tiny feature request:
+
+add the bitcoin URI scheme [1] to ikiwiki.
+
+This can be done by adding '"bitcoin",' to Ikiwiki/Plugin/htmlscrubber.pm
+
+-              "aim", "callto", "cvs", "ed2k", "feed", "fish", "gg",
+to
++              "aim", "bitcoin", "callto", "cvs", "ed2k", "feed", "fish", "gg",
+
+thanks
+
+flowolf
+[1]: http://en.wikipedia.org/wiki/URI_scheme
+
+> I agree and this was important enough to fire up the ol' wayback machine, set the dial to one year ago today, and fix it then, in version 3.20130212. [[done]]. As a bonus, in this new hardforked casuality chain, someone sent me half a bitcoin using this feature. --[[Joey]]
diff --git a/doc/todo/bugs-everywhere_integration.mdwn b/doc/todo/bugs-everywhere_integration.mdwn
new file mode 100644 (file)
index 0000000..705922c
--- /dev/null
@@ -0,0 +1,7 @@
+So this is a little nutty [[wishlist]].
+
+There's this cool software called [Bugs Everywhere](http://bugseverywhere.org/) (be) which allows you to track your bug reports as plain text files in git.
+
+There's also an "html" command for be that allows you to produce an HTML rendering of the repository.
+
+ikiwiki could detect and use that instead of the (fairly limited) [[tips/integrated_issue_tracking_with_ikiwiki]].. --[[anarcat]]
index 6bab6ef271a0f148140ecf2fb32fc8da5fe55f05..95b25bf36cb4721531b7a5fa7253557cb0f4e53b 100644 (file)
@@ -31,3 +31,5 @@ can be empty everyday and filled all day long. It does not make sense to me to
 delete these pages :). --[[xma]]
 
 I was not aware of [[plugins/remove]]. I don't think another method is necessary -- [[users/Jon]]
+
+> Consensus seems to be [[won't fix|done]] as far as I can see. --[[smcv]]
index 7ec95b536d45ea659b21aaa29332a918033fa11e..4f83c8bf555139f7f9d6c27f32e70ba93b401e18 100644 (file)
@@ -1,3 +1,4 @@
+[[!template id=gitbranch branch=anderbubble/edittemplate author="Jonathon Anderson"]]
 [[!tag wishlist patch]]
 
 I use a default template for all new pages:
@@ -17,3 +18,31 @@ I've already made these changes in my installation, and have made my patches ava
 Changes to the structure of `$pagestate{$registering_page}{edittemplate}{$pagespec}` mean that a `cgi` rebuild is necessary (for reasons I don't entirely understand); but I think that's preferable to creating an entirely separate `$pagestate` namespace for storing parameters.  That said, I'm not really a perl programmer, so corrections are welcome.
 
 > I like this patch. I hate seeing things I've already read get marked as unread in my rss feed. -- [[JoshBBall]]
+
+>> (I don't have commit access so take this with a pinch of salt -
+>> I'm just trying to help deal with the code-review backlog.)
+>>
+>> I mostly like the first and third patches in the branch (adding v4
+>> (random) UUIDs, and adding the timestamps). I'd be tempted to rename
+>> `time` and `formatted_time` to `iso_time` and `time`, but that's
+>> a matter of taste, and perhaps people with commit access have
+>> stronger opinions one way or another. I haven't researched
+>> whether there's precendent for any particular naming style
+>> elsewhere in ikiwiki.
+>>
+>> The UUID bit would require adding some reference to libuuid-tiny-perl
+>> to the Debian packaging - I think a `Recommends` is too strong
+>> but a `Suggests` seems OK.
+>>
+>> I don't like the second patch (adding URL-namespaced UUID support).
+>> I'm having a hard time thinking of any situation in which a v4 UUID
+>> would be unsuitable, which means it's unnecessary complexity.
+>> FYI, the reason that it makes a rebuild is necessary is that
+>> you've restructured `$pagestate`, which is carried over from one
+>> refresh to the next (that's its purpose), and you haven't
+>> built in any migration or backwards-compatibility code that will
+>> cope with it being in the old format. My inclination would be to
+>> drop that patch. If there's a really good reason to prefer
+>> v3/v5 UUIDs, please describe it and I'll try to suggest some
+>> better way based on that, maybe global configuration in `$config`.
+>> --[[smcv]]
diff --git a/doc/todo/expose_html_language_and_direction.mdwn b/doc/todo/expose_html_language_and_direction.mdwn
new file mode 100644 (file)
index 0000000..6eed967
--- /dev/null
@@ -0,0 +1,13 @@
+[[!template  id=gitbranch branch=mhameed/html_lang_and_dir author="[[mhameed]]"]]
+[[!tag wishlist]]
+
+When a wiki is translatable, it would be nice to have the language code and the direction of the text exposed as template variables.
+This means:
+
+1. Better rendering for rtl languages.
+2. Content can correctly be tagged with the language code, to enable screenreaders and other accessibility providers to render/speak the text in the correct language.
+
+The [[patch]] is currently being used on http://addons.nvda-project.org and seems to work well. --[[mhameed]]
+
+> I don't have commit access, but it [[seems reasonable|/users/smcv/yesplease]].
+> --[[smcv]]
index ad791095638a2b74ae7331112d7420cd551faab3..8850d87f1dace36e8b0e57699f8354040e3c8e53 100644 (file)
@@ -14,5 +14,7 @@ There has got to be a way to run the CGI wrapper under fastcgi or modperl (apach
 > > Otherwise the general idea would be to launch a daemon per site that would have a pool of fastcgi processes to answer requests. The common setup pattern here is that users have a fixed quota of processes running as their user, listening either on the network (hackish: a port need to be allocated for each user) or on a socket (documented above, but then the webserver needs write access).
 > >
 > > Perl has had extensive support for FastCGI for quite a while. It seems to me a simple daemon could be written to wrap around the `.cgi`, it's a common way things are deployed. [RT](http://rt.bestpractical.com/) for example can run as a regular CGI, under `mod_perl` or `FastCGI` indiscrimenatly, the latter being more reliable and faster. They use [Plack](http://search.cpan.org/dist/Plack/) to setup that server (see the [startup script](https://github.com/bestpractical/rt/blob/stable/sbin/rt-server.in) for an example). But of course, [TIMTOWTDI](http://search.cpan.org/search?query=fastcgi&mode=all). --[[anarcat]]
+> > 
+> > Also related: [[todo/multi-thread_ikiwiki]], [[todo/rewrite_ikiwiki_in_haskell]]. :) --[[anarcat]]
 
 [[!tag wishlist]]
index 9ebd11e06ab17968bdf0d6152ed35c8acfcdb482..2f636630ca71209d2e4620bb99605a220ff07e0a 100644 (file)
@@ -9,3 +9,91 @@ Another solution would be to make ikiwiki a remote itself and allow users to pus
 > direct mode, but I'm not sure that's really desirable here).
 > I'd like to make symlinks possible without compromising security,
 > but it'll be necessary to be quite careful. --[[smcv]]
+
+First implementation
+====================
+
+So as the [[discussion]] shows, it seems it's perfectly possible to actually do this! There's this [gallery site](http://stockholm.kalleswork.net) which uses the [[plugins/contrib/album]] plugin and git-annex to manage its files.
+
+The crucial steps are:
+
+ 1. setup a git annex remote in `$srcdir`
+
+ 2. configure direct mode because ikiwiki ignores symlinks for [[security]] reasons:
+
+        cd $srcdir
+        git annex init
+        git annex direct
+
+ 3. configure files to be considered by git-annex (those will be not committed into git directly):
+
+        git config annex.largefiles 'largerthan=100kb and not (include=*.mdwn or include=*.txt)'
+
+ 4. make the bare repository (the remote of `$srcdir`) ignored by git-annex:
+
+        cd $srcdir
+        git config remote.origin.annex-ignore true
+        git config remote.origin.annex-sync false
+
+    (!) This needs to be done on *ANY* clone of the repository, which is annoying, but it's important because we don't want to see git-annex stuff in the bare repo. (why?)
+
+ 5. deploy the following crappy plugin to make commits work again and make sure the right files are added in git-annex:
+
+[[!format perl """
+#!/usr/bin/perl
+package IkiWiki::Plugin::gitannex;
+
+use warnings;
+use strict;
+use IkiWiki 3.00;
+
+sub import {
+        hook(type => "getsetup", id => "gitannex", call => \&getsetup);
+       hook(type => "savestate", id => "gitannex", call => \&rcs_commit);
+        # we need to handle all rcs commands maybe?
+}
+
+sub getsetup () {
+        return
+                plugin => {
+                        safe => 1, # rcs plugin
+                        rebuild => undef,
+                        section => "misc",
+                },
+}
+
+# XXX: we want to copy or reuse safe_git
+
+sub rcs_commit (@) {
+    chdir $config{srcdir};
+    `git annex add --auto`;
+    `git annex sync`;
+}
+
+sub rcs_commit_staged (@) {
+    rcs_commit($@);
+}
+
+1
+"""]]
+This assumes you know what `srcdir`, `repository` and so on mean, if you forgot (like me), see this reference: [[rcs/git/]].
+
+
+What doesn't work
+-----------------
+
+ * the above plugin is kind of flaky and ugly.
+ * it's not an RCS plugin, but probably should be, replacing the git plugin, because really: git doesn't work at all anymore at this point
+
+What remains to be clarified
+----------------------------
+
+ * how do files get pushed to the `$srcdir`? Only through the web interface?
+ * why do we ignore the bare repository?
+
+See the [[discussion]] for a followup on that. --[[anarcat]]
+
+Alternative implementation
+==========================
+
+An alternative implementation, which remains to be detailed but is mentionned in [[forum/ikiwiki_and_big_files]], is to use the [[underlay]] feature combined with the `hardlink` option to deploy the git-annex'd files. Then git-annex is separate from the base ikiwiki git repo. --[[anarcat]]
index 5d1320af3eca1359b43481e87edd0700de9b7e82..f1015b5dad75b7376da4c182d6e8588b0233f588 100644 (file)
@@ -1,9 +1,15 @@
 Hi,
 
+> Hi! :) First, many thanks for this enlightening information! You are leading the way in a glorious trail of flames! ;) -a
+
 I'm currently using git-annex with ikiwiki for a website of mine. [stockholm.kalleswork.net](http://stockholm.kalleswork.net). The site relies heavily on the osm and album plugins. The site just went online and is a bit of an experiment, things seem a bit fragile but works for now. (ikiwiki 3.20130904.1)(git-annex 4.20130904.1)
 
 The trick I had to do to get git-annex, ikiwiki and the album plugin to work was to initialize an annex remote in the `$srcdir`. Then block the bare origin (ie wiki.git folder) with `annex-sync = false` and `annex-ignore = true` on **both** the server and the working laptop. This is to avoid polluting the wiki.git bare repo with annex stuff.
 
+> Why are you ignoring the bare remote actually? It seems it would be the proper way to batch-upload files into the server... -a
+
 Another critical thing for this to work was to set the `$srcdir` on the server to direct mode `git-annex direct` before adding any content anywhere. On the laptop I can use indirect mode without problems.
 
 For now syncing annex, pushing updates to mdwns etc all seem to work and the album plugin picks up images etc. I'm sure there are problems ahead with this setup but it does seem to work. I barely know how to use git, git-annex and ikiwiki and much less understand how it works behind the scenes. So do let me know if there are fatal flaws in my setup ;) -- Kalle
+
+> I am not sure how git-annex'd files are pushed to the `$srcdir`. Usually, you clone from the bare repo, so any git annex command will work on that repository, yet you explicitely ignore it. How *do* you push files into the `$srcdir`? Only on the web interface? Thanks again! --[[anarcat]]
index cecac7a94010dec37e9caf6b4eec4c414c426d4a..b257760cef4b6f8b1bdf307fe05553efe8d2310a 100644 (file)
@@ -30,6 +30,12 @@ This patch, or one like it, would enable better blogging support, by adding
 the ability to hierarchically organize blog posts and automatically generate
 structural pages for year, month, or day. Please apply. --Ethan
 
+> This looks a lot like [[plugins/autoindex]], except limited to a subset
+> of pages, and with different templates according to the page it's used
+> on. Perhaps it could become several enhancements for autoindex? --[[smcv]]
+
+----
+
 <pre>
 Index: IkiWiki/Render.pm
 ===================================================================
diff --git a/doc/todo/optimisation_via_git_log.mdwn b/doc/todo/optimisation_via_git_log.mdwn
new file mode 100644 (file)
index 0000000..469681a
--- /dev/null
@@ -0,0 +1,27 @@
+Currently each time ikiwiki runs a refresh, it has to traverse the entire
+directory tree, looking at each file, to determine what has changed.
+
+Profiling shows this can take many seconds on large sites, and tends to be
+where around half the time is spent (other half being loadindex/saveindex).
+
+This could be sped up by remembering the HEAD ref that was rendered last,
+and using git log to get a list of files changed since then. Only render
+those files.
+
+Looking at the current implementation, the list of all files in the tree is
+also used when eg, iterating to find pages that need to be changed because
+one of their dependencies has changed. That would need to be modified,
+probably to use info from loadindex instead (ie, values %pagesources), with
+added/removed files added/removed from it.
+
+The actual git log parsing would be easy to add; there is already code to
+parse git-log in raw form.
+
+The main complication would probably be files in the tree that are not
+checked into git would not be rendered. The underlay dirs would still need
+to be scanned as now, as would the transient directory. Since some sites
+may depend on files being put into the tree and not committed, this
+optimisation would probably need to be something that can be optionally
+enabled.
+
+> [[done]] --[[Joey]]
index fa74d31264165135b3bcd81ac22bfb99aea54ce4..3496cff68d936f619490fe2838ad685bba9b0223 100644 (file)
@@ -1,5 +1,5 @@
 [[!template  id=gitbranch branch=anarcat/osm_kml_formatting author="[[anarcat]]"]]
-[[!template  id=gitbranch branch=anarcat/osm_openlayers_misc author="[[anarcat]]"]]
+[[!template  id=gitbranch branch=anarcat/attic/osm_emacs_indent author="[[anarcat]]"]]
 
 I have accumulated a small series of patches to the OSM plugin along with the [[other|todo/osm_arbitrary_layers]] [[fixes|bugs/osm_KML_maps_do_not_display_properly_on_google_maps]] I have submitted here. They have lived in a tangled mess on my master branch so far, but not anymore!
 
@@ -20,7 +20,7 @@ I have two main branches that need merging (on top of [[todo/osm_arbitrary_layer
 > doubly for files served over the network. Cherry-picked the layer sorting
 > change. --[[Joey]]
 
-> > Alright, I am fine with that, thanks. -- [[anarcat]]
+> > Alright, I am fine with that, thanks. I moved my branch to the attic. -- [[anarcat]]
 
 Those two branches are also merged directly on my master branch... along with [[todo/osm_arbitrary_layers]].
 
diff --git a/doc/todo/pagedown_plugin/discussion.mdwn b/doc/todo/pagedown_plugin/discussion.mdwn
new file mode 100644 (file)
index 0000000..42015c4
--- /dev/null
@@ -0,0 +1,146 @@
+(This conversation was moved from [[plugins/wmd/discussion]]. --[[anarcat]])
+
+I've tried to retrieve the wmd-editor source tarball lately, but the site seems offline.
+
+From what I've read on the Internet, wmd-editor is not (yet?) free software by itself, and its author has gone MIA.
+But it looks like somebody recently took the step to rewrite a wmd-clone under a saner license, see [[pagedown|http://code.google.com/p/pagedown/source/browse/]].
+
+Given all the above, what about upgrading this plugin to use pagedown instead of wmd? It seem a clear win to me...
+
+> AFAICS, pagedown is a modified version of WMD. Let's 
+> look at its license file: --[[Joey]] 
+> 
+>     A javascript port of Markdown, as used on Stack Overflow
+>     and the rest of Stack Exchange network.
+>     
+>     Largely based on showdown.js by John Fraser (Attacklab).
+>     
+>     Original Markdown Copyright (c) 2004-2005 John Gruber
+>       <http://daringfireball.net/projects/markdown/>
+>     
+>     
+>     Original Showdown code copyright (c) 2007 John Fraser
+>     
+>     Modifications and bugfixes (c) 2009 Dana Robinson
+>     Modifications and bugfixes (c) 2009-2011 Stack Exchange Inc.
+>     
+>     Permission is hereby granted, free of charge, to any person obtaining a
+>     copy [...]
+>     
+> Ok, so it says it's based on showdown. John Fraser wrote showdown and also 
+> WMD, which IIRC was built on top of showdown. (Showdown converts the
+> markdown to html, and WMD adds the editor UI.)
+> 
+> I can nowhere find a actual statement of the copyright of showdown or
+> WMD. <http://code.google.com/p/wmd/> has a "MIT License" notice on it,
+> but this is clearly just the license chosen when signing up at google
+> code for the repo that would be used for a rewrite of the code, and the only thing 
+> said about the previous 1.0 release of WMD is "use it freely", which is not
+> specific enough to be a grant of license, and is moreover not a free
+> software license, as it does not cover distribution or modification.
+> 
+> Which was all covered in the thread here, 
+> when StackOverflow decided to start working on pagedown.
+> <http://blog.stackoverflow.com/2008/12/reverse-engineering-the-wmd-editor/>
+> This thread does not give any indication that they ever managed to get
+> a license grant for WMD/showdown. It frankly, does not inspire confidence
+> that the people working on this care about the license.
+> 
+> It would probably be pretty easy to adapt the ikiwiki wmd plugin 
+> to use pagedown. But without a clear and credible license, why?
+> 
+> (Note that I have a wmd-new branch in my ikiwiki git repo that
+> uses <https://github.com/derobins/wmd>, which was an earlier
+> version of pagedown (probably, not entirely clear).)
+> 
+> An alternate alternative is markitup: <http://markitup.jaysalvat.com/>
+> It has a clear history and a credible license (MIT or GPL dual license).
+> It's also easily extensible to other formats so could handle rst etc.
+> It does not, however, have a markdown to html converter -- for 
+> previewing it has to talk to the server with AJAX.
+> --[[Joey]]
+
+
+>> Showdown has a pretty explicit [license.txt file](https://github.com/coreyti/showdown/blob/master/license.txt)
+>> and it basically looks like a BSD license. That license.txt file was imported into 
+>> github directly from the upstream showdown source, so it seems credible. That zip file
+>> is still available [on archive.org](http://wayback.archive.org/web/20100612163302/http://attacklab.net/showdown/showdown-v0.9.zip),
+>> and does mention a BSD copyright.
+>>
+>> So Showdown itself is clean: it's free. Nowhere does it say it derives from WMD, or
+>> if it does, it doesn't matter *because* it was made by the same author **and then** 
+>> released under that free license. But even then, it does *not* mention being a
+>> derivative of WMD.
+>> 
+>> I agree the license behind WMD is murky. One the one hand, the [google code page](https://code.google.com/p/wmd/)
+>> mentions the code will be relicensed under MIT but "for now" we can "use it freely":
+>> 
+>> > *I'm refactoring the code, and will be releasing WMD under the MIT license soon. For
+>> now you can download the most recent release (wmd-1.0.1.zip) and use it freely.*
+>>
+>> That zip file is again offline, but it's also [on archive.org](http://web.archive.org/web/20101226145228/http://wmd-editor.com/downloads/wmd-1.0.1.zip).
+>> Things get a little more murky there: the file doesn't actually mention any copyright 
+>> statement, and the code is actually obfuscated, something that is mentionned on the aforementionned
+>> Stack Exchange thread. The [terms and conditions of WMD](http://web.archive.org/web/20100323043113/http://wmd-editor.com/terms)
+>> are pretty hostile however:
+>>
+>>> *All rights reserved. You may not duplicate, copy, or reuse any portion of the HTML/CSS, JavaScript, or visual design elements or concepts without express written permission from AttackLab.*
+>>
+>> But one could argue they apply only to WMD, and *not* showdown, which has been
+>> explicitely published under a different license. And maybe that was the whole 
+>> point here: the stack exchange people were trying to negociate having the 
+>> clear and free version of WMD for their own use, maybe showdown is actually
+>> what came out of this and what allows Stack exchange to do their thing...
+>> 
+>> And besides: the point here is that we *can't actually use WMD safely*, but
+>> we **can use pagedown safely!**.
+>> 
+>> I tried the plugin: it works, and it works well. It's also fairly trivial to
+>> install the upstream showdown library, which is not shipped with the plugin
+>> (which alleviates all possible copyright problems). You can take test the 
+>> plugin at <http://testwiki.anarc.at/>
+>> 
+>> There are only three issues I could find during testing:
+>> 
+>>  1. two previews are showed (the showdown one and the regular ikiwiki one),
+>>     which can be confusing, but is still necessary because the showdown one 
+>>     doesn't parse ikiwiki directives. 
+>>  2. the wiki needs to be rebuilt when the plugin is first activated for the
+>>     stylesheets to regenerate. new wikis are not affected, and this can be
+>>     deployed massively on farms without user intervention.
+>>  3. on large pages, the edit screen isn't in the first screen, so it's not 
+>>     obvious we're editing the page, which is also a little confusing - we 
+>>     would need an anchor in there... Update: a simple patch fixes that... 
+>>     but in a rather crude way:
+>>
+>>  [[!format diff """
+--- a/IkiWiki/Render.pm
++++ b/IkiWiki/Render.pm
+@@ -87,7 +87,7 @@ sub genpage ($$) {
+        my $actions=0;
+        if (length $config{cgiurl}) {
+                if (IkiWiki->can("cgi_editpage")) {
+-                       $template->param(editurl => cgiurl(do => "edit", page => $page));
++                       $template->param(editurl => cgiurl(do => "edit", page => $page) . '#editcontent');
+                        $actions++;
+                }
+        }
+"""]]
+>>      ideally, we would show the edit box next to the page preview... And there's a way to do that too! But it requires some more CSS hackery, like [this](http://css-tricks.com/scrollfollow-sidebar/), for example:
+>>
+>>     #wmd-preview {
+>>       position: relative;
+>>       margin: 15px auto;
+>>       float: left;
+>>       width: 50%;
+>>     }
+>>     form {
+>>       position: fixed;
+>>       margin-left: 50%;
+>>     }
+>>
+>> But this is getting a little crazy and I need to sleep now.
+>>
+>> [[!template id=gitbranch branch=anarcat/pagedown author="[[anarcat]]"]]
+>>
+>> Anyways, let's work on merging that pretty branch already shall we? :) --[[anarcat]]
index d2ae2ed5cffba62d387a7bf5edbdd5af0a6e3c43..68da99f6f9e5556230d1d528ab22a227008f5501 100644 (file)
@@ -3,3 +3,5 @@ with automatic escaping of special chars.
 
 [[Integrating with transifex|todo/po: transifex integration]] or with
 Pootle would be another way to go.
+
+[[wishlist]]
index 5d0318ae10f66363642ac49539d3f2c7dbd9a6e4..6c11fa17baafc5db4ebab4b916f4151096b8bbdc 100644 (file)
@@ -11,3 +11,9 @@ files from the source repository when it has been disabled?
 >> `rcs_remove` rather than a good old `unlink`. --[[intrigeri]]
 
 >>> I guess you could call `rcs_remove` followed by `unlink`. --[[Joey]] 
+
+>>>> Implemented in my `po-disable` branch, added a basic test case
+>>>> that passes, not tested in a real ikiwiki with a VCS yet.
+>>>> Not sure I'll have time to do better any time soon, but for
+>>>> anyone interested to lead this to completion, it should be a good
+>>>> starting point. --[[intrigeri]]
diff --git a/doc/todo/polltrails.mdwn b/doc/todo/polltrails.mdwn
new file mode 100644 (file)
index 0000000..387ab3f
--- /dev/null
@@ -0,0 +1,3 @@
+When the poll directive is used on a page in a trail, voting on the poll
+should advance to the next page in the trail. This would allow multiple
+poll questionairres with a reasonable UI. --[[Joey]]
index 55fe3aa1fa4c9940c48fd91e4c98003577dcdadd..9b6f3f885ddfd0430614590b54a948e3e5936cf2 100644 (file)
@@ -125,3 +125,11 @@ Thoughts on the whole idea? — [[Jon]]
 >> implemented itself in terms of cron, or at, or both, or possibly
 >> other things depending on what people want to support). But that would
 >> be substantially more work, more than I can afford atm at least. — [[Jon]]
+
+> Some times ago, I wrote a Pagespec function that matches pages that have
+> creation date in the future: [[plugins/contrib/created_in_future/]]. It can
+> be enhanced to create the `current_date_before(<DATE>)` pagespec. The
+> interesting part of my plugin is that it makes IkiWiki rebuild pages on the
+> right date.
+>
+> -- [[Louis|spalax]]
index 8e7e6fe25ab71f566c230c17fc3b1e895775a367..ebdc72c53405501bc6945822ad46d0e82d51347a 100644 (file)
@@ -1 +1,3 @@
 It would be nice if ikiwiki's table plugin could create sortable tables like Mediawiki does.
+
+This is on my wishlist too.  I believe Mediawiki does this with the [DataTables](http://datatables.net/) JQuery Plugin.
index 92c7cb8a6594bd9c3bea294f7498716b00754ada..c48edbdae061add4ac58c75767fbb67514fc188a 100644 (file)
@@ -17,4 +17,27 @@ the substitution of `\[[file]]` in `diffurl` and `historyurl`?
 > In `91b477c` I made a similar change to how the cvs backend encodes
 > `diffurl`. Perhaps it applies to all VCS backends? --[[schmonz]]
 
+>> Thanks a lot! I've not looked at it yet, but will try to do so
+>> soonish, as this bug is a real problem for Tails when welcoming potential
+>> new contributors. --[[intrigeri]]
+
+>>> My `fix_diffurl_vs._cgit` branch now implements schmonz' change
+>>> for the Git plugin. Please review and merge if you like
+>>> it. --[[intrigeri]]
+
+>>>> Ping? --[[intrigeri]]
+
+>>>> Normally, my tendency towards pedantic preservation of existing APIs
+>>>> would make me implement a new token \[[file_less_escaped]] or
+>>>> something, analogous to `%s` vs. `%S` in [[shortcuts]]; but
+>>>> gitweb and cgit are both OK with `/` not being escaped, whereas
+>>>> only gitweb allows it to be escaped as `%2F`, so I think your
+>>>> solution is fine. Also, it would need a much better name than
+>>>> \[[file_less_escaped]], and I can't think of one.
+>>>>
+>>>> I don't have commit access to ikiwiki.info, but if I did,
+>>>> [[I'd merge this|/users/smcv/yesplease]]. --[[smcv]]
+
 [[wishlist]]
+
+[[!tag patch]]
index 39fc4e22088869b0bff96936f4ebe0259106b8fc..b4d3ca007a23c484a1c67e9c9d22cca7a7961323 100644 (file)
@@ -69,3 +69,9 @@ on vacation".
 >>> 
 >>> You'd still need a cron job to run ikiwiki -refresh every hour, or
 >>> whatever, so it can update. --[[Joey]] 
+
+---
+
+Some times ago, I wrote a Pagespec function that matches pages that have creation date in the future: [[plugins/contrib/created_in_future/]]. It can be used to solve the original problem.
+
+-- [[Louis|spalax]]
diff --git a/doc/users/holger.mdwn b/doc/users/holger.mdwn
new file mode 100644 (file)
index 0000000..9f0e3c0
--- /dev/null
@@ -0,0 +1,3 @@
+I'm sysadmin at a german university. 
+
+I'm using ikiwiki as personal wiki at work and at home.
index 59d1affba20f97c4e8e7f7db94588cb9a5533076..a4eb564cefd9108174b258b7db31a05e3997ba28 100644 (file)
@@ -7,4 +7,4 @@ My repository containing ikiwiki branches:
 * gitweb: http://git.pseudorandom.co.uk/smcv/ikiwiki.git
 * anongit: git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git
 
-Currently thinking about a [[users/smcv/gallery]] plugin.
+Recently tried to [[help with the review backlog|yesplease]].
diff --git a/doc/users/smcv/yesplease.mdwn b/doc/users/smcv/yesplease.mdwn
new file mode 100644 (file)
index 0000000..b100b37
--- /dev/null
@@ -0,0 +1,7 @@
+A tag for patches that I would merge if I had commit access to ikiwiki,
+in the hope that it's a useful shortlist for committers to look at.
+They're mirrored in my git repository under the `ready/*` namespace.
+
+[[!inline pages="(todo/* or bugs/*) and link(patch) and !link(bugs/done) and
+   !link(todo/done) and link(users/smcv/yesplease) and !*/Discussion"
+   archive="yes"]]
diff --git a/doc/users/spalax.mdwn b/doc/users/spalax.mdwn
new file mode 100644 (file)
index 0000000..0727276
--- /dev/null
@@ -0,0 +1,22 @@
+[[!meta title="Louis Paternault"]]
+
+User of IkiWiki.
+
+# Plugins
+
+I wrote and maintain a few plugins, which are available here: [[https://atelier.gresille.org/projects/gresille-ikiwiki]].
+
+[[!map pages="plugins/contrib/* and ! plugins/contrib/*/* and link(.)"]]
+
+# Wishlist
+
+I have a few things in mind. Their status is something between *I will implement it someday* to *maybe someone could need this* or *I will need it if I implement this killer website I have in mind*.
+
+* [[plugins/contrib/jssearchtag]]: Create a page where user can tick or untick any combination of tag (s)he want, and dynamically sees an inline of the matching pages. I have to see to what extent the [[plugins/contrib/jssearchfield|jssearchfield]] plugin already does the same thing (not tested yet).
+* [[plugins/contrib/htaccessmanager]]: Create a cgi page to manage a htaccess file.
+* Automatically add calendar pages (see the [[ikiwiki-calendar discussion|ikiwiki-calendar/discussion]]).
+
+
+# Contact
+
+Contact: `spalax at gresille dot org`.
index 1a54cc2311abf61b0adccb2a4eaee1c39ecd89ff..08b411051f1bd5b1d3e3d9c77f598d910ed36781 100644 (file)
@@ -1,5 +1,5 @@
 Name:           ikiwiki
-Version: 3.20130904.1
+Version: 3.20140125
 Release:        1%{?dist}
 Summary:        A wiki compiler
 
index 73f7c16ac8e30680053de4fc0f2d91c222d50eb1..fb0d1bde5c6df985f60b168dc1b01965f1bcb096 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-09-04 10:16-0400\n"
+"POT-Creation-Date: 2014-01-25 16:44-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"
@@ -52,7 +52,7 @@ msgstr ""
 msgid "You are banned."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:464 ../IkiWiki/CGI.pm:465 ../IkiWiki.pm:1508
+#: ../IkiWiki/CGI.pm:464 ../IkiWiki/CGI.pm:465 ../IkiWiki.pm:1515
 msgid "Error"
 msgstr ""
 
@@ -124,12 +124,12 @@ msgstr ""
 msgid "feed crashed XML::Feed!"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:649
+#: ../IkiWiki/Plugin/aggregate.pm:650
 #, perl-format
 msgid "creating new page %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:677 ../IkiWiki/Plugin/edittemplate.pm:135
+#: ../IkiWiki/Plugin/aggregate.pm:678 ../IkiWiki/Plugin/edittemplate.pm:135
 msgid "failed to process template:"
 msgstr ""
 
@@ -203,87 +203,87 @@ msgstr ""
 msgid "There are no broken links!"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:124
+#: ../IkiWiki/Plugin/comments.pm:128
 #, perl-format
 msgid "this comment needs %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:127
+#: ../IkiWiki/Plugin/comments.pm:131
 msgid "moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:154 ../IkiWiki/Plugin/format.pm:50
+#: ../IkiWiki/Plugin/comments.pm:158 ../IkiWiki/Plugin/format.pm:50
 #, perl-format
 msgid "unsupported page format %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:159
+#: ../IkiWiki/Plugin/comments.pm:163
 msgid "comment must have content"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:217
+#: ../IkiWiki/Plugin/comments.pm:221
 msgid "Anonymous"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:279
+#: ../IkiWiki/Plugin/comments.pm:283
 msgid "Comment Moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:375 ../IkiWiki/Plugin/comments.pm:379
+#: ../IkiWiki/Plugin/comments.pm:379 ../IkiWiki/Plugin/comments.pm:383
 msgid "email replies to me"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:413 ../IkiWiki/Plugin/editpage.pm:96
+#: ../IkiWiki/Plugin/comments.pm:417 ../IkiWiki/Plugin/editpage.pm:96
 #: ../IkiWiki/Plugin/editpage.pm:102
 msgid "bad page name"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:416
+#: ../IkiWiki/Plugin/comments.pm:420
 #, perl-format
 msgid "commenting on %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:433
+#: ../IkiWiki/Plugin/comments.pm:437
 #, perl-format
 msgid "page '%s' doesn't exist, so you can't comment"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:440
+#: ../IkiWiki/Plugin/comments.pm:444
 #, perl-format
 msgid "comments on page '%s' are closed"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:565
+#: ../IkiWiki/Plugin/comments.pm:569
 msgid "comment stored for moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:567
+#: ../IkiWiki/Plugin/comments.pm:571
 msgid "Your comment will be posted after moderator review"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:580
+#: ../IkiWiki/Plugin/comments.pm:584
 msgid "Added a comment"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:584
+#: ../IkiWiki/Plugin/comments.pm:588
 #, perl-format
 msgid "Added a comment: %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:654 ../IkiWiki/Plugin/userlist.pm:55
+#: ../IkiWiki/Plugin/comments.pm:658 ../IkiWiki/Plugin/userlist.pm:55
 #: ../IkiWiki/Plugin/websetup.pm:272
 msgid "you are not logged in as an admin"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:708
+#: ../IkiWiki/Plugin/comments.pm:717
 msgid "Comment moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:749
+#: ../IkiWiki/Plugin/comments.pm:758
 msgid "comment moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:910
+#: ../IkiWiki/Plugin/comments.pm:921
 #, perl-format
 msgid "%i comment"
 msgid_plural "%i comments"
@@ -293,7 +293,7 @@ msgstr[1] ""
 #. translators: Here "Comment" is a verb;
 #. translators: the user clicks on it to
 #. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:920
+#: ../IkiWiki/Plugin/comments.pm:931
 msgid "Comment"
 msgstr ""
 
@@ -378,31 +378,31 @@ msgstr ""
 msgid "%s is an attachment, not a page."
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:789 ../IkiWiki/Plugin/git.pm:852
-#: ../IkiWiki.pm:1728
+#: ../IkiWiki/Plugin/git.pm:828 ../IkiWiki/Plugin/git.pm:891
+#: ../IkiWiki.pm:1735
 #, perl-format
 msgid "you are not allowed to change %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:811
+#: ../IkiWiki/Plugin/git.pm:850
 #, perl-format
 msgid "you cannot act on a file with mode %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:815
+#: ../IkiWiki/Plugin/git.pm:854
 msgid "you are not allowed to change file modes"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:885
+#: ../IkiWiki/Plugin/git.pm:924
 msgid "you are not allowed to revert a merge"
 msgstr ""
 
-#: ../IkiWiki/Plugin/git.pm:902
+#: ../IkiWiki/Plugin/git.pm:941
 #, perl-format
 msgid "Failed to revert commit %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/google.pm:26 ../IkiWiki/Plugin/search.pm:41
+#: ../IkiWiki/Plugin/google.pm:26 ../IkiWiki/Plugin/search.pm:48
 #, perl-format
 msgid "Must specify %s when using the %s plugin"
 msgstr ""
@@ -470,31 +470,31 @@ msgstr ""
 msgid "missing pages parameter"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:209
+#: ../IkiWiki/Plugin/inline.pm:216
 #, perl-format
 msgid "the %s and %s parameters cannot be used together"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:315
+#: ../IkiWiki/Plugin/inline.pm:322
 #, perl-format
 msgid "%s (RSS feed)"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:319
+#: ../IkiWiki/Plugin/inline.pm:326
 #, perl-format
 msgid "%s (Atom feed)"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:348
+#: ../IkiWiki/Plugin/inline.pm:355
 msgid "Add a new post titled:"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:387 ../IkiWiki/Plugin/template.pm:44
+#: ../IkiWiki/Plugin/inline.pm:394 ../IkiWiki/Plugin/template.pm:44
 #, perl-format
 msgid "failed to process template %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:725
+#: ../IkiWiki/Plugin/inline.pm:733
 msgid "RPC::XML::Client not found, not pinging"
 msgstr ""
 
@@ -945,12 +945,12 @@ msgstr ""
 msgid "rsync_command exited %d"
 msgstr ""
 
-#: ../IkiWiki/Plugin/search.pm:199
+#: ../IkiWiki/Plugin/search.pm:216
 #, perl-format
 msgid "need Digest::SHA to index %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/search.pm:253
+#: ../IkiWiki/Plugin/search.pm:270
 msgid "search"
 msgstr ""
 
@@ -1128,52 +1128,52 @@ msgid ""
 "allow this"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:317
+#: ../IkiWiki/Render.pm:332 ../IkiWiki/Render.pm:393
 #, perl-format
 msgid "skipping bad filename %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:333
+#: ../IkiWiki/Render.pm:349 ../IkiWiki/Render.pm:398
 #, perl-format
 msgid "%s has multiple possible source pages"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:373
+#: ../IkiWiki/Render.pm:435
 #, perl-format
 msgid "querying %s for file creation and modification times.."
 msgstr ""
 
-#: ../IkiWiki/Render.pm:447
+#: ../IkiWiki/Render.pm:509
 #, perl-format
 msgid "removing obsolete %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:531
+#: ../IkiWiki/Render.pm:593
 #, perl-format
 msgid "building %s, which links to %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:540
+#: ../IkiWiki/Render.pm:602
 #, perl-format
 msgid "removing %s, no longer built by %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:623 ../IkiWiki/Render.pm:705
+#: ../IkiWiki/Render.pm:685 ../IkiWiki/Render.pm:767
 #, perl-format
 msgid "building %s, which depends on %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:718
+#: ../IkiWiki/Render.pm:780
 #, perl-format
 msgid "building %s, to update its backlinks"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:806
+#: ../IkiWiki/Render.pm:883
 #, perl-format
 msgid "building %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:871
+#: ../IkiWiki/Render.pm:948
 #, perl-format
 msgid "ikiwiki: cannot build %s"
 msgstr ""
@@ -1270,58 +1270,58 @@ msgstr ""
 msgid "refreshing wiki.."
 msgstr ""
 
-#: ../IkiWiki.pm:248
+#: ../IkiWiki.pm:255
 msgid "Discussion"
 msgstr ""
 
-#: ../IkiWiki.pm:580
+#: ../IkiWiki.pm:587
 msgid "Must specify url to wiki with --url when using --cgi"
 msgstr ""
 
-#: ../IkiWiki.pm:628
+#: ../IkiWiki.pm:635
 #, perl-format
 msgid "unsupported umask setting %s"
 msgstr ""
 
-#: ../IkiWiki.pm:668
+#: ../IkiWiki.pm:675
 msgid "cannot use multiple rcs plugins"
 msgstr ""
 
-#: ../IkiWiki.pm:698
+#: ../IkiWiki.pm:705
 #, perl-format
 msgid "failed to load external plugin needed for %s plugin: %s"
 msgstr ""
 
-#: ../IkiWiki.pm:1490
+#: ../IkiWiki.pm:1497
 #, perl-format
 msgid "preprocessing loop detected on %s at depth %i"
 msgstr ""
 
-#: ../IkiWiki.pm:1684
+#: ../IkiWiki.pm:1691
 #, perl-format
 msgid "bad file name %s"
 msgstr ""
 
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:2000
 #, perl-format
 msgid "template %s not found"
 msgstr ""
 
-#: ../IkiWiki.pm:2234
+#: ../IkiWiki.pm:2250
 msgid "yes"
 msgstr ""
 
-#: ../IkiWiki.pm:2318
+#: ../IkiWiki.pm:2334
 #, perl-format
 msgid "invalid sort type %s"
 msgstr ""
 
-#: ../IkiWiki.pm:2339
+#: ../IkiWiki.pm:2355
 #, perl-format
 msgid "unknown sort type %s"
 msgstr ""
 
-#: ../IkiWiki.pm:2475
+#: ../IkiWiki.pm:2491
 #, perl-format
 msgid "cannot match pages: %s"
 msgstr ""
index 392a167e9747131dbcd065b022a725ebf35f16d2..3f4b7d9b19a39286ddac71d8024efed8248b9037 100755 (executable)
--- a/t/index.t
+++ b/t/index.t
@@ -38,8 +38,6 @@ $depends{"bar"}={"foo*" => 1};
 $depends{"bar.png"}={};
 $pagestate{"bar"}{meta}{title}="a page about bar";
 $pagestate{"bar"}{meta}{moo}="mooooo";
-# only loaded plugins save state, so this should not be saved out
-$pagestate{"bar"}{nosuchplugin}{moo}="mooooo";
 
 ok(saveindex(), "save index");
 ok(-s "$config{wikistatedir}/indexdb", "index file created");
index 1052aea70f005ef13383dab4050b73fc46ba991d..f036c3113e4a1620b00dd50541be4a0a8956c18e 100755 (executable)
@@ -3,10 +3,10 @@ use warnings;
 use strict;
 
 BEGIN {
-       eval q{use XML::Feed; use HTML::Parser; use HTML::LinkExtor};
+       eval q{use XML::Feed; use HTML::Parser; use HTML::LinkExtor; use File::MimeInfo};
        if ($@) {
                eval q{use Test::More skip_all =>
-                       "XML::Feed and/or HTML::Parser not available"};
+                       "XML::Feed and/or HTML::Parser or File::MimeInfo not available"};
        }
        else {
                eval q{use Test::More tests => 136};
index a89ccfcdfdccfcbe5449eb59f518f145acc1c57e..5a0f6e7805b299feee7b4077a58cad0af557e02b 100644 (file)
@@ -12,7 +12,7 @@
 [[!meta copyright="<TMPL_VAR COPYRIGHT ESCAPE=HTML>"]]
 </TMPL_IF>
 <TMPL_IF AUTHOR>
-[[!meta author="<TMPL_VAR NAME ESCAPE=HTML>: <TMPL_VAR AUTHOR ESCAPE=HTML>"]]
+[[!meta author="<TMPL_VAR AUTHOR ESCAPE=HTML> (<TMPL_VAR NAME ESCAPE=HTML>)"]]
 <TMPL_ELSE>
 [[!meta author="<TMPL_VAR NAME ESCAPE=HTML>"]]
 </TMPL_IF>