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 () {
}
my $log_open=0;
+my $log_failed=0;
sub log_message ($$) {
my $type=shift;
Sys::Syslog::openlog('ikiwiki', '', 'user');
$log_open=1;
}
- return eval {
- Sys::Syslog::syslog($type, "[$config{wikiname}] %s", join(" ", @_));
+ eval {
+ # keep a copy to avoid editing the original config repeatedly
+ my $wikiname = $config{wikiname};
+ utf8::encode($wikiname);
+ Sys::Syslog::syslog($type, "[$wikiname] %s", join(" ", @_));
};
+ if ($@) {
+ print STDERR "failed to syslog: $@" unless $log_failed;
+ $log_failed=1;
+ print STDERR "@_\n";
+ }
+ return $@;
}
elsif (! $config{cgi}) {
return print "@_\n";
push @params, $val, '';
}
}
- if ($preprocessing{$page}++ > 3) {
+ if ($preprocessing{$page}++ > 8) {
# Avoid loops of preprocessed pages preprocessing
# other pages that preprocess them, etc.
return "[[!$command <span class=\"error\">".
return LWP::UserAgent->new(
cookie_jar => $config{cookiejar},
env_proxy => 1, # respect proxy env vars
+ agent => $config{useragent},
);
}
-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} ||
-e "$config{srcdir}/".htmlfn($page.$c)) {
$c++
}
+ $page=$page.$c;
$guid->{page}=$page;
write_page($feed, $guid, $mtime, \%params);
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}
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" />};
}
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" />};
}
sub genfeed ($$$$$@) {
my $feedtype=shift;
my $feedurl=shift;
+ my $feedtitle=shift;
my $feeddesc=shift;
my $guid=shift;
my $page=shift;
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,
my $ua;
eval q{use LWPx::ParanoidAgent};
if (! $@) {
- $ua=LWPx::ParanoidAgent->new;
+ $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
}
else {
$ua=useragent();
}
$options{'layers'} = $config{osm_layers};
+ $name=~s/'//g; # $name comes from user input
return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
}
my $ua;
eval q{use LWPx::ParanoidAgent};
if (!$@) {
- $ua=LWPx::ParanoidAgent->new;
+ $ua=LWPx::ParanoidAgent->new(agent => $config{useragent});
}
else {
eval q{use LWP};
if ($template->query(name => "lang_code")) {
$template->param(lang_code => $lang_code);
}
+ if ($template->query(name => "html_lang_code")) {
+ $template->param(html_lang_code => htmllangcode($lang_code));
+ }
+ if ($template->query(name => "html_lang_dir")) {
+ $template->param(html_lang_dir => htmllangdir($lang_code));
+ }
if ($template->query(name => "lang_name")) {
$template->param(lang_name => languagename($lang_code));
}
return $master_language_code;
}
+sub htmllangcode ($) {
+ (my $lang = shift) =~ tr/_/-/;
+ return $lang;
+}
+
+sub htmllangdir ($) {
+ my $lang = shift;
+ if ($lang =~ /^(ar|fa|he)/) {
+ return 'rtl';
+ }
+ return 'ltr';
+}
+
sub islanguagecode ($) {
my $code=shift;
push @ret, {
url => urlto_with_orig_beautiful_urlpath(masterpage($page), $page),
code => $master_language_code,
+ html_code => htmllangcode($master_language_code),
+ html_dir => htmllangdir($master_language_code),
language => $master_language_name,
master => 1,
};
push @ret, {
url => urlto_with_orig_beautiful_urlpath($otherpage, $page),
code => $lang,
+ html_code => htmllangcode($lang),
+ html_dir => htmllangdir($lang),
language => languagename($lang),
percent => percenttranslated($otherpage),
}
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);
-ikiwiki (3.20130904.2) UNRELEASED; urgency=low
+ikiwiki (3.20140126) UNRELEASED; urgency=medium
+
+ * Added useragent config setting. Closes: #737121
+ Thanks, Tuomas Jormola
+ * po: Add html_lang_code and html_lang_dir template variables
+ for the language code and direction of text.
+ Thanks, Mesar Hameed
+ * Allow up to 8 levels of nested directives, rather than previous 3
+ in directive infinite loop guard.
+
+ -- 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.
corrupt themselves, which happens all too frequently).
* osm: Remove invalid use of charset on embedded javascript tags.
Closes: #731197
- * style.css: Add compatability definitions for more block-level
+ * 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, 05 Sep 2013 10:01:10 -0400
+ -- Joey Hess <joeyh@debian.org> Thu, 02 Jan 2014 12:22:22 -0400
ikiwiki (3.20130904.1) unstable; urgency=low
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/
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]]
--- /dev/null
+[[!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]]
> > 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]]
--- /dev/null
+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
> > > 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]]
> 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]]
--- /dev/null
+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]]
--- /dev/null
+[[!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]]
> 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]]
> 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]]
> 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]]
</pre></code>
[[!tag patch]]
+
+> [[Seems reasonable|users/smcv/yesplease]] --smcv
+
+>> [[done]] --[[Joey]]
> 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]]
+
+>>> I've merged it, but I don't feel it fixes this bug. --[[Joey]]
--- /dev/null
+[[!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]]
>
> --[[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.
>>
>>>>> 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]]
--- /dev/null
+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.
+++ /dev/null
-test
-
-og hva nu?
--- /dev/null
+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]]
--- /dev/null
+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/)
-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:
> [[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
--- /dev/null
+[[!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...
+
+"""]]
--- /dev/null
+[[!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.
+"""]]
--- /dev/null
+[[!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]]
+
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/*"]]
--- /dev/null
+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
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
* 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/)
* [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/)
* [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/)
* [[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/)
* [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.
* [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
* [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...
* [The personal website of Andrew Back](http://carrierdetect.com)
* [Paul Elms](http://paul.elms.pro) Personal site and blog in russian.
* [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).
+++ /dev/null
-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 <TMPL\_IF THEME\_$NAME> 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
+++ /dev/null
-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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+[[!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]].
--- /dev/null
+[[!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.
--- /dev/null
+[[!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]].
(version [[!version ]]).
hello world (right back at ya)
+asfddsaf sadfkjal;skdfj saldkfjasdf
+sdafljas;dlfk safdiuhsdf
+
+
> This is a blockquote.
>
<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?`
+
+
--- /dev/null
+Räksmörgåstest.
+
+ハッカー
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
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 | ?
"""]]
-<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:
- *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).
--- /dev/null
+[[!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]]
> 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]]
--- /dev/null
+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]]
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]]
+[[!template id=gitbranch branch=anderbubble/edittemplate author="Jonathon Anderson"]]
[[!tag wishlist patch]]
I use a default template for all new pages:
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]]
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]]
+
+>> [[done]]] --[[Joey]]
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
===================================================================
[[Integrating with transifex|todo/po: transifex integration]] or with
Pootle would be another way to go.
+
+[[wishlist]]
>> `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]]
>> 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]]
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.
>> 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]]
>>>
>>> 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]]
--- /dev/null
+I'm sysadmin at a german university.
+
+I'm using ikiwiki as personal wiki at work and at home.
* 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]].
--- /dev/null
+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"]]
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/addtag]]: Add the necessary javascript in the edit page to enable adding tags to the page by simply clicking one some link.
* [[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/parenttag]]: When a page is tagged `mathematics/algebra` (using `\[[!tag mathematics/algebra]]`), it is automatically tagged `mathematics` as well. Second step: looks inside page content for tags as user is typing, and allow user to remove them by clicking somewhere.
* [[plugins/contrib/htaccessmanager]]: Create a cgi page to manage a htaccess file.
* Automatically add calendar pages (see the [[ikiwiki-calendar discussion|ikiwiki-calendar/discussion]]).
Name: ikiwiki
-Version: 3.20130904.2
+Version: 3.20140125
Release: 1%{?dist}
Summary: A wiki compiler
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"
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 ""
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 ""
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"
#. 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 ""
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 ""
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 ""
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 ""
"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 ""
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 ""
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};
--- /dev/null
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Test::More tests => 5;
+use utf8;
+
+BEGIN { use_ok("IkiWiki"); }
+
+$IkiWiki::config{verbose} = 1;
+$IkiWiki::config{syslog} = 1;
+
+$IkiWiki::config{wikiname} = 'ASCII';
+is(debug('test'), '', 'plain ASCII syslog');
+$IkiWiki::config{wikiname} = 'not ⒶSCII';
+is(debug('test'), '', 'UTF8 syslog');
+my $orig = $IkiWiki::config{wikiname};
+is(debug('test'), '', 'check for idempotency');
+is($IkiWiki::config{wikiname}, $orig, 'unchanged config');