aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bundle/IkiWiki/Extras.pm1
-rw-r--r--IkiWiki/Plugin/bzr.pm5
-rw-r--r--IkiWiki/Plugin/calendar.pm2
-rw-r--r--IkiWiki/Plugin/cvs.pm4
-rw-r--r--IkiWiki/Plugin/darcs.pm4
-rw-r--r--IkiWiki/Plugin/git.pm53
-rw-r--r--IkiWiki/Plugin/inline.pm1
-rw-r--r--IkiWiki/Plugin/mercurial.pm4
-rw-r--r--IkiWiki/Plugin/monotone.pm4
-rw-r--r--IkiWiki/Plugin/osm.pm550
-rw-r--r--IkiWiki/Plugin/shortcut.pm18
-rw-r--r--IkiWiki/Plugin/svn.pm4
-rw-r--r--IkiWiki/Plugin/tla.pm4
-rwxr-xr-xMakefile.PL2
-rw-r--r--debian/changelog22
-rw-r--r--debian/control2
-rw-r--r--debian/copyright6
-rw-r--r--doc/basewiki/sandbox.mdwn2
-rw-r--r--doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn11
-rw-r--r--doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn23
-rw-r--r--doc/bugs/find_gnuism.mdwn7
-rw-r--r--doc/bugs/jquery-ui.min.css_missing_some_image_files.mdwn14
-rw-r--r--doc/bugs/linkmap_displays_underscore_escapes.mdwn89
-rw-r--r--doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn2
-rw-r--r--doc/forum/Calendar:_listing_multiple_entries_per_day/comment_4_4be39c2043821848d4b25d0bf946a718._comment15
-rw-r--r--doc/forum/Commiting_all_moderated_comments_into_special_branch__63__.mdwn8
-rw-r--r--doc/forum/How_to_add_a_mouse-over_pop-up_label_for_a_text__63__.mdwn8
-rw-r--r--doc/forum/How_to_change_registration_page/comment_2_8176ef231cf901802fc60b6d414018e6._comment8
-rw-r--r--doc/forum/How_to_format___91____91__foobar__93____93___in_code_blocks__63__/comment_1_ad000d39fd1dc05aa8ef6eb19d8d999b._comment8
-rw-r--r--doc/forum/How_to_show_recent_changes_for_individual_pages__63__.mdwn1
-rw-r--r--doc/forum/How_to_show_recent_changes_for_individual_pages__63__/comment_1_cd34affc6883f4e4bc5e7e7b711cc8ba._comment10
-rw-r--r--doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_3_f581afcdb4481ea5d65bcc33bdbab99a._comment25
-rw-r--r--doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_4_b0d39d30852bca1525ab9612a7532670._comment8
-rw-r--r--doc/forum/Problem_with_gitweb.mdwn3
-rw-r--r--doc/forum/Problem_with_gitweb/comment_1_c505be6a13651c397fb803dd4117acce._comment8
-rw-r--r--doc/forum/Problem_with_gitweb/comment_2_23cc0d87448d3cbdac20a005e9191589._comment10
-rw-r--r--doc/forum/Problem_with_gitweb/comment_3_697c6038009249e6a49d9e458a5ba271._comment47
-rw-r--r--doc/forum/attachments_fail_to_upload.mdwn8
-rw-r--r--doc/forum/attachments_fail_to_upload/comment_1_577adde1dfa49463dfa8e169c462fc42._comment10
-rw-r--r--doc/forum/attachments_fail_to_upload/comment_2_473f38c6d523496fac8dad13ac6d20c3._comment12
-rw-r--r--doc/forum/attachments_fail_to_upload/comment_3_799a2f1b7b259157e97fd31ec76fb845._comment10
-rw-r--r--doc/forum/attachments_fail_to_upload/comment_4_e37d1497acafd3fda547462f000636e3._comment8
-rw-r--r--doc/forum/attachments_fail_to_upload/comment_5_da03f9c4917cb1ef52de984b8ba86b68._comment11
-rw-r--r--doc/forum/attachments_fail_to_upload/comment_6_04498946a300ddb652dec73c2950f48f._comment19
-rw-r--r--doc/forum/build_error:_Cannot_decode_string_with_wide_characters.mdwn12
-rw-r--r--doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_1_83fbb415dd3ae6a19ed5ea5f82065c28._comment8
-rw-r--r--doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_2_d258536c98538d4744f66eb3132439a9._comment20
-rw-r--r--doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_3_d62173d0ae220ab7b063631952856587._comment10
-rw-r--r--doc/forum/links_to_diff_on_recentchanges__63__.mdwn1
-rw-r--r--doc/forum/links_to_diff_on_recentchanges__63__/comment_1_1dbc723cc2794f6d45de9cbd2fc2e0fd._comment8
-rw-r--r--doc/forum/links_to_diff_on_recentchanges__63__/comment_2_4349c85d92cf9c1acf2e7678371ab12a._comment10
-rw-r--r--doc/git.mdwn4
-rw-r--r--doc/ikiwiki-calendar.mdwn2
-rw-r--r--doc/ikiwiki-calendar/discussion.mdwn36
-rw-r--r--doc/ikiwiki-makerepo.mdwn27
-rw-r--r--doc/ikiwiki/directive/map/discussion.mdwn2
-rw-r--r--doc/ikiwiki/directive/meta.mdwn4
-rw-r--r--doc/ikiwiki/directive/osm.mdwn71
-rw-r--r--doc/ikiwiki/directive/waypoint.mdwn6
-rw-r--r--doc/ikiwikiusers.mdwn5
-rw-r--r--doc/news/version_3.20111106.mdwn12
-rw-r--r--doc/news/version_3.20120202.mdwn11
-rw-r--r--doc/plugins/comments/discussion.mdwn13
-rw-r--r--doc/plugins/contrib/googlemaps.mdwn2
-rw-r--r--doc/plugins/osm.mdwn31
-rw-r--r--doc/plugins/po.mdwn10
-rw-r--r--doc/plugins/recentchangesdiff/Discussion.mdwn20
-rw-r--r--doc/plugins/sidebar/discussion.mdwn5
-rw-r--r--doc/plugins/theme.mdwn2
-rw-r--r--doc/rcs/cvs/discussion.mdwn6
-rw-r--r--doc/sandbox.mdwn20
-rw-r--r--doc/sandbox/Nyus_of_se_däi.mdwn1
-rw-r--r--doc/shortcuts.mdwn8
-rw-r--r--doc/theme_market.mdwn11
-rw-r--r--doc/themes/discussion.mdwn2
-rw-r--r--doc/tips/html5.mdwn2
-rw-r--r--doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn3
-rw-r--r--doc/todo/BrowserID.mdwn25
-rw-r--r--doc/todo/Javascript_calendar.mdwn28
-rw-r--r--doc/todo/allow_TMPL__95__LOOP_in_template_directives.mdwn260
-rw-r--r--doc/todo/be_more_selective_about_running_hooks.mdwn68
-rw-r--r--doc/todo/do_not_make_links_backwards.mdwn88
-rw-r--r--doc/todo/internal_definition_list_support.mdwn40
-rw-r--r--doc/todo/org_mode.mdwn5
-rw-r--r--doc/todo/pdf_output.mdwn2
-rw-r--r--doc/todo/provide_inline_diffs_in_recentchanges.mdwn19
-rw-r--r--doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn25
-rw-r--r--doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn4
-rw-r--r--doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn46
-rw-r--r--doc/todo/sort_parameter_for_map_plugin_and_directive/incomplete_patch.pl.pl77
-rw-r--r--doc/todo/sort_parameter_for_map_plugin_and_directive/python_algorithms.py81
-rw-r--r--doc/usage.mdwn6
-rw-r--r--doc/users/acathur.mdwn3
-rw-r--r--doc/users/ajt.mdwn2
-rw-r--r--doc/users/chrismgray.mdwn4
-rw-r--r--doc/users/iustin.mdwn1
-rw-r--r--doc/users/schmonz-web-ikiwiki.mdwn1
-rw-r--r--doc/users/ttw.mdwn1
-rw-r--r--templates/atompage.tmpl2
-rw-r--r--underlays/attachment/ikiwiki/images/ui-bg_flat_0_aaaaaa_40x100.pngbin0 -> 180 bytes
-rw-r--r--underlays/attachment/ikiwiki/images/ui-bg_glass_55_fbf9ee_1x400.pngbin0 -> 120 bytes
-rw-r--r--underlays/attachment/ikiwiki/images/ui-bg_glass_65_ffffff_1x400.pngbin0 -> 105 bytes
-rw-r--r--underlays/attachment/ikiwiki/images/ui-bg_glass_75_dadada_1x400.pngbin0 -> 111 bytes
-rw-r--r--underlays/attachment/ikiwiki/images/ui-bg_glass_95_fef1ec_1x400.pngbin0 -> 119 bytes
-rw-r--r--underlays/attachment/ikiwiki/images/ui-icons_2e83ff_256x240.pngbin0 -> 4369 bytes
-rw-r--r--underlays/attachment/ikiwiki/images/ui-icons_454545_256x240.pngbin0 -> 4369 bytes
-rw-r--r--underlays/attachment/ikiwiki/images/ui-icons_cd0a0a_256x240.pngbin0 -> 4369 bytes
-rw-r--r--underlays/openid-selector/ikiwiki/openid/openid-jquery.js2
-rw-r--r--underlays/osm/ikiwiki/images/osm.pngbin0 -> 2982 bytes
-rw-r--r--underlays/osm/ikiwiki/osm.js128
110 files changed, 2267 insertions, 107 deletions
diff --git a/Bundle/IkiWiki/Extras.pm b/Bundle/IkiWiki/Extras.pm
index d01d52e5b..0a7cd3ae3 100644
--- a/Bundle/IkiWiki/Extras.pm
+++ b/Bundle/IkiWiki/Extras.pm
@@ -35,6 +35,7 @@ HTML::Tree
Sort::Naturally
Gravatar::URL
Net::INET6Glue
+XML::Writer
=head1 AUTHOR
diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm
index 3bc4ea8dd..72552abcc 100644
--- a/IkiWiki/Plugin/bzr.pm
+++ b/IkiWiki/Plugin/bzr.pm
@@ -5,6 +5,7 @@ use warnings;
use strict;
use IkiWiki;
use Encode;
+use URI::Escape q{uri_escape_utf8};
use open qw{:utf8 :std};
sub import {
@@ -242,8 +243,10 @@ sub rcs_recentchanges ($) {
# Skip source name in renames
$filename =~ s/^.* => //;
+ my $efilename = uri_escape_utf8($filename);
+
my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
- $diffurl =~ s/\[\[file\]\]/$filename/go;
+ $diffurl =~ s/\[\[file\]\]/$efilename/go;
$diffurl =~ s/\[\[file-id\]\]/$fileid/go;
$diffurl =~ s/\[\[r2\]\]/$info->{revno}/go;
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
index fc497b3c7..d443198f6 100644
--- a/IkiWiki/Plugin/calendar.pm
+++ b/IkiWiki/Plugin/calendar.pm
@@ -13,7 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
require 5.002;
package IkiWiki::Plugin::calendar;
diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm
index 0a6cbfaf6..788f51167 100644
--- a/IkiWiki/Plugin/cvs.pm
+++ b/IkiWiki/Plugin/cvs.pm
@@ -33,6 +33,7 @@ use warnings;
use strict;
use IkiWiki;
+use URI::Escape q{uri_escape_utf8};
use File::chdir;
@@ -315,7 +316,8 @@ sub rcs_recentchanges ($) {
$oldrev =~ s/INITIAL/0/;
$newrev =~ s/\(DEAD\)//;
my $diffurl = defined $config{diffurl} ? $config{diffurl} : "";
- $diffurl=~s/\[\[file\]\]/$page/g;
+ my $epage = uri_escape_utf8($page);
+ $diffurl=~s/\[\[file\]\]/$epage/g;
$diffurl=~s/\[\[r1\]\]/$oldrev/g;
$diffurl=~s/\[\[r2\]\]/$newrev/g;
unshift @pages, {
diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm
index 1313041e7..646f65df1 100644
--- a/IkiWiki/Plugin/darcs.pm
+++ b/IkiWiki/Plugin/darcs.pm
@@ -3,6 +3,7 @@ package IkiWiki::Plugin::darcs;
use warnings;
use strict;
+use URI::Escape q{uri_escape_utf8};
use IkiWiki;
sub import {
@@ -336,7 +337,8 @@ sub rcs_recentchanges ($) {
foreach my $f (@files) {
my $d = defined $config{'diffurl'} ? $config{'diffurl'} : "";
- $d =~ s/\[\[file\]\]/$f/go;
+ my $ef = uri_escape_utf8($f);
+ $d =~ s/\[\[file\]\]/$ef/go;
$d =~ s/\[\[hash\]\]/$hash/go;
push @pg, {
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index 3117e4291..535cd5fe0 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -5,11 +5,11 @@ use warnings;
use strict;
use IkiWiki;
use Encode;
+use URI::Escape q{uri_escape_utf8};
use open qw{:utf8 :std};
my $sha1_pattern = qr/[0-9a-fA-F]{40}/; # pattern to validate Git sha1sums
my $dummy_commit_msg = 'dummy commit'; # message to skip in recent changes
-my $git_dir=undef;
sub import {
hook(type => "checkconfig", id => "git", call => \&checkconfig);
@@ -151,6 +151,17 @@ sub genwrapper {
}
}
+my $git_dir=undef;
+my $prefix=undef;
+
+sub in_git_dir ($$) {
+ $git_dir=shift;
+ my @ret=shift->();
+ $git_dir=undef;
+ $prefix=undef;
+ return @ret;
+}
+
sub safe_git (&@) {
# Start a child process safely without resorting to /bin/sh.
# Returns command output (in list content) or success state
@@ -302,8 +313,6 @@ sub merge_past ($$$) {
return $conflict;
}
-{
-my $prefix;
sub decode_git_file ($) {
my $file=shift;
@@ -325,7 +334,6 @@ sub decode_git_file ($) {
return decode("utf8", $file);
}
-}
sub parse_diff_tree ($) {
# Parse the raw diff tree chunk and return the info hash.
@@ -610,9 +618,10 @@ sub rcs_recentchanges ($) {
my @pages;
foreach my $detail (@{ $ci->{'details'} }) {
my $file = $detail->{'file'};
+ my $efile = uri_escape_utf8($file);
my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : "";
- $diffurl =~ s/\[\[file\]\]/$file/go;
+ $diffurl =~ s/\[\[file\]\]/$efile/go;
$diffurl =~ s/\[\[sha1_parent\]\]/$ci->{'parent'}/go;
$diffurl =~ s/\[\[sha1_from\]\]/$detail->{'sha1_from'}/go;
$diffurl =~ s/\[\[sha1_to\]\]/$detail->{'sha1_to'}/go;
@@ -845,9 +854,9 @@ sub rcs_receive () {
# (Also, if a subdir is involved, we don't want to chdir to
# it and only see changes in it.)
# The pre-receive hook already puts us in the right place.
- $git_dir=".";
- push @rets, git_parse_changes(0, git_commit_info($oldrev."..".$newrev));
- $git_dir=undef;
+ in_git_dir(".", sub {
+ push @rets, git_parse_changes(0, git_commit_info($oldrev."..".$newrev));
+ });
}
return reverse @rets;
@@ -860,23 +869,21 @@ sub rcs_preprevert ($) {
# Examine changes from root of git repo, not from any subdir,
# in order to see all changes.
my ($subdir, $rootdir) = git_find_root();
- $git_dir=$rootdir;
-
- my @commits=git_commit_info($sha1, 1);
- if (! @commits) {
- error "unknown commit"; # just in case
- }
-
- # git revert will fail on merge commits. Add a nice message.
- if (exists $commits[0]->{parents} &&
- @{$commits[0]->{parents}} > 1) {
- error gettext("you are not allowed to revert a merge");
- }
+ in_git_dir($rootdir, sub {
+ my @commits=git_commit_info($sha1, 1);
+
+ if (! @commits) {
+ error "unknown commit"; # just in case
+ }
- my @ret=git_parse_changes(1, @commits);
+ # git revert will fail on merge commits. Add a nice message.
+ if (exists $commits[0]->{parents} &&
+ @{$commits[0]->{parents}} > 1) {
+ error gettext("you are not allowed to revert a merge");
+ }
- $git_dir=undef;
- return @ret;
+ git_parse_changes(1, @commits);
+ });
}
sub rcs_revert ($) {
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 3dc410c27..687c8a48f 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -694,7 +694,6 @@ sub genfeed ($$$$$@) {
guid => $guid,
feeddate => date_3339($lasttime),
feedurl => $feedurl,
- version => $IkiWiki::version,
);
run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm
index b7fe01485..8da4ceb07 100644
--- a/IkiWiki/Plugin/mercurial.pm
+++ b/IkiWiki/Plugin/mercurial.pm
@@ -5,6 +5,7 @@ use warnings;
use strict;
use IkiWiki;
use Encode;
+use URI::Escape q{uri_escape_utf8};
use open qw{:utf8 :std};
sub import {
@@ -265,7 +266,8 @@ sub rcs_recentchanges ($) {
foreach my $file (split / /,$info->{files}) {
my $diffurl = defined $config{diffurl} ? $config{'diffurl'} : "";
- $diffurl =~ s/\[\[file\]\]/$file/go;
+ my $efile = uri_escape_utf8($file);
+ $diffurl =~ s/\[\[file\]\]/$efile/go;
$diffurl =~ s/\[\[r2\]\]/$info->{changeset}/go;
push @pages, {
diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm
index 1d89e3f6b..105627814 100644
--- a/IkiWiki/Plugin/monotone.pm
+++ b/IkiWiki/Plugin/monotone.pm
@@ -7,6 +7,7 @@ use IkiWiki;
use Monotone;
use Date::Parse qw(str2time);
use Date::Format qw(time2str);
+use URI::Escape q{uri_escape_utf8};
my $sha1_pattern = qr/[0-9a-fA-F]{40}/; # pattern to validate sha1sums
my $mtn_version = undef;
@@ -593,7 +594,8 @@ sub rcs_recentchanges ($) {
my $diffurl=$config{diffurl};
$diffurl=~s/\[\[r1\]\]/$parent/g;
$diffurl=~s/\[\[r2\]\]/$rev/g;
- $diffurl=~s/\[\[file\]\]/$file/g;
+ my $efile = uri_escape_utf8($file);
+ $diffurl=~s/\[\[file\]\]/$efile/g;
push @pages, {
page => pagename($file),
diffurl => $diffurl,
diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm
new file mode 100644
index 000000000..be499495c
--- /dev/null
+++ b/IkiWiki/Plugin/osm.pm
@@ -0,0 +1,550 @@
+#!/usr/bin/perl
+# Copyright 2011 Blars Blarson
+# Released under GPL version 2
+
+package IkiWiki::Plugin::osm;
+use utf8;
+use strict;
+use warnings;
+use IkiWiki 3.0;
+
+sub import {
+ add_underlay("osm");
+ hook(type => "getsetup", id => "osm", call => \&getsetup);
+ hook(type => "format", id => "osm", call => \&format);
+ hook(type => "preprocess", id => "osm", call => \&preprocess);
+ hook(type => "preprocess", id => "waypoint", call => \&process_waypoint);
+ hook(type => "savestate", id => "waypoint", call => \&savestate);
+ hook(type => "cgi", id => "osm", call => \&cgi);
+}
+
+sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 1,
+ section => "special-purpose",
+ },
+ osm_default_zoom => {
+ type => "integer",
+ example => "15",
+ description => "the default zoom when you click on the map link",
+ safe => 1,
+ rebuild => 1,
+ },
+ osm_default_icon => {
+ type => "string",
+ example => "ikiwiki/images/osm.png",
+ description => "the icon shown on links and on the main map",
+ safe => 0,
+ rebuild => 1,
+ },
+ osm_alt => {
+ type => "string",
+ example => "",
+ description => "the alt tag of links, defaults to empty",
+ safe => 0,
+ rebuild => 1,
+ },
+ osm_format => {
+ type => "string",
+ example => "KML",
+ description => "the output format for waypoints, can be KML, GeoJSON or CSV (one or many, comma-separated)",
+ safe => 1,
+ rebuild => 1,
+ },
+ osm_tag_default_icon => {
+ type => "string",
+ example => "icon.png",
+ description => "the icon attached to a tag, displayed on the map for tagged pages",
+ safe => 0,
+ rebuild => 1,
+ },
+}
+
+sub preprocess {
+ my %params=@_;
+ my $page = $params{'page'};
+ my $dest = $params{'destpage'};
+ my $loc = $params{'loc'}; # sanitized below
+ my $lat = $params{'lat'}; # sanitized below
+ my $lon = $params{'lon'}; # sanitized below
+ my $href = $params{'href'};
+
+ my $fullscreen = defined($params{'fullscreen'}); # sanitized here
+ my ($width, $height, $float);
+ if ($fullscreen) {
+ $height = '100%';
+ $width = '100%';
+ $float = 0;
+ }
+ else {
+ $height = scrub($params{'height'} || "300px", $page, $dest); # sanitized here
+ $width = scrub($params{'width'} || "500px", $page, $dest); # sanitized here
+ $float = (defined($params{'right'}) && 'right') || (defined($params{'left'}) && 'left'); # sanitized here
+ }
+ my $zoom = scrub($params{'zoom'} // $config{'osm_default_zoom'} // 15, $page, $dest); # sanitized below
+ my $map;
+ if ($fullscreen) {
+ $map = $params{'map'} || $page;
+ }
+ else {
+ $map = $params{'map'} || 'map';
+ }
+ $map = scrub($map, $page, $dest); # sanitized here
+ my $name = scrub($params{'name'} || $map, $page, $dest);
+
+ if (defined($lon) || defined($lat) || defined($loc)) {
+ ($lon, $lat) = scrub_lonlat($loc, $lon, $lat);
+ }
+
+ if ($zoom !~ /^\d\d?$/ || $zoom < 2 || $zoom > 18) {
+ error("Bad zoom");
+ }
+ $pagestate{$page}{'osm'}{$map}{'displays'}{$name} = {
+ height => $height,
+ width => $width,
+ float => $float,
+ zoom => $zoom,
+ fullscreen => $fullscreen,
+ editable => defined($params{'editable'}),
+ lat => $lat,
+ lon => $lon,
+ href => $href,
+ };
+ return "<div id=\"mapdiv-$name\"></div>";
+}
+
+sub process_waypoint {
+ my %params=@_;
+ my $loc = $params{'loc'}; # sanitized below
+ my $lat = $params{'lat'}; # sanitized below
+ my $lon = $params{'lon'}; # sanitized below
+ my $page = $params{'page'}; # not sanitized?
+ my $dest = $params{'destpage'}; # not sanitized?
+ my $hidden = defined($params{'hidden'}); # sanitized here
+ my ($p) = $page =~ /(?:^|\/)([^\/]+)\/?$/; # shorter page name
+ my $name = scrub($params{'name'} || $p, $page, $dest); # sanitized here
+ my $desc = scrub($params{'desc'} || '', $page, $dest); # sanitized here
+ my $zoom = scrub($params{'zoom'} // $config{'osm_default_zoom'} // 15, $page, $dest); # sanitized below
+ my $icon = $config{'osm_default_icon'} || "ikiwiki/images/osm.png"; # sanitized: we trust $config
+ my $map = scrub($params{'map'} || 'map', $page, $dest); # sanitized here
+ my $alt = $config{'osm_alt'} ? "alt=\"$config{'osm_alt'}\"" : ''; # sanitized: we trust $config
+ if ($zoom !~ /^\d\d?$/ || $zoom < 2 || $zoom > 18) {
+ error("Bad zoom");
+ }
+
+ ($lon, $lat) = scrub_lonlat($loc, $lon, $lat);
+ if (!defined($lat) || !defined($lon)) {
+ error("Must specify lat and lon");
+ }
+
+ my $tag = $params{'tag'};
+ foreach my $t (keys %{$typedlinks{$page}{'tag'}}) {
+ if ($icon = get_tag_icon($t)) {
+ $tag = $t;
+ last;
+ }
+ $t =~ s!/$config{'tagbase'}/!!;
+ if ($icon = get_tag_icon($t)) {
+ $tag = $t;
+ last;
+ }
+ }
+ $icon = urlto($icon, $dest, 1);
+ $tag = '' unless $tag;
+ if ($page eq $dest) {
+ if (!defined($config{'osm_format'}) || !$config{'osm_format'}) {
+ $config{'osm_format'} = 'KML';
+ }
+ my %formats = map { $_ => 1 } split(/, */, $config{'osm_format'});
+ if ($formats{'GeoJSON'}) {
+ will_render($page,$config{destdir} . "/$map/pois.json");
+ }
+ if ($formats{'CSV'}) {
+ will_render($page,$config{destdir} . "/$map/pois.txt");
+ }
+ if ($formats{'KML'}) {
+ will_render($page,$config{destdir} . "/$map/pois.kml");
+ }
+ }
+ my $href = IkiWiki::cgiurl(
+ do => "osm",
+ map => $map,
+ lat => $lat,
+ lon => $lon,
+ zoom => $zoom,
+ );
+ if (defined($destsources{htmlpage($map)})) {
+ $href = urlto($map,$page) . "?lat=$lat&amp;lon=$lon&amp;zoom=$zoom";
+ $href =~ s!&!&amp;!g;
+ }
+ $pagestate{$page}{'osm'}{$map}{'waypoints'}{$name} = {
+ page => $page,
+ desc => $desc,
+ icon => $icon,
+ tag => $tag,
+ lat => $lat,
+ lon => $lon,
+ # how to link back to the page from the map, not to be
+ # confused with the URL of the map itself sent to the
+ # embeded map below
+ href => urlto($page,$map),
+ };
+ my $output = '';
+ if (defined($params{'embed'})) {
+ $params{'href'} = $href; # propagate down to embeded
+ $output .= preprocess(%params);
+ }
+ if (!$hidden) {
+ $output .= "<a href=\"$href\"><img class=\"img\" src=\"$icon\" $alt /></a>";
+ }
+ return $output;
+}
+
+# get the icon from the given tag
+sub get_tag_icon($) {
+ my $tag = shift;
+ # look for an icon attached to the tag
+ my $attached = $tag . '/' . $config{'osm_tag_default_icon'};
+ if (srcfile($attached)) {
+ return $attached;
+ }
+ else {
+ return undef;
+ }
+}
+
+sub scrub_lonlat($$$) {
+ my ($loc, $lon, $lat) = @_;
+ if ($loc) {
+ if ($loc =~ /^\s*(\-?\d+(?:\.\d*°?|(?:°?|\s)\s*\d+(?:\.\d*\'?|(?:\'|\s)\s*\d+(?:\.\d*)?\"?|\'?)°?)[NS]?)\s*\,?\;?\s*(\-?\d+(?:\.\d*°?|(?:°?|\s)\s*\d+(?:\.\d*\'?|(?:\'|\s)\s*\d+(?:\.\d*)?\"?|\'?)°?)[EW]?)\s*$/) {
+ $lat = $1;
+ $lon = $2;
+ }
+ else {
+ error("Bad loc");
+ }
+ }
+ if (defined($lat)) {
+ if ($lat =~ /^(\-?)(\d+)(?:(\.\d*)°?|(?:°|\s)\s*(\d+)(?:(\.\d*)\'?|(?:\'|\s)\s*(\d+(?:\.\d*)?\"?)|\'?)|°?)\s*([NS])?\s*$/) {
+ $lat = $2 + ($3//0) + ((($4//0) + (($5//0) + (($6//0)/60.)))/60.);
+ if (($1 eq '-') || (($7//'') eq 'S')) {
+ $lat = - $lat;
+ }
+ }
+ else {
+ error("Bad lat");
+ }
+ }
+ if (defined($lon)) {
+ if ($lon =~ /^(\-?)(\d+)(?:(\.\d*)°?|(?:°|\s)\s*(\d+)(?:(\.\d*)\'?|(?:\'|\s)\s*(\d+(?:\.\d*)?\"?)|\'?)|°?)\s*([EW])?$/) {
+ $lon = $2 + ($3//0) + ((($4//0) + (($5//0) + (($6//0)/60.)))/60.);
+ if (($1 eq '-') || (($7//'') eq 'W')) {
+ $lon = - $lon;
+ }
+ }
+ else {
+ error("Bad lon");
+ }
+ }
+ if ($lat < -90 || $lat > 90 || $lon < -180 || $lon > 180) {
+ error("Location out of range");
+ }
+ return ($lon, $lat);
+}
+
+sub savestate {
+ my %waypoints = ();
+ my %linestrings = ();
+
+ foreach my $page (keys %pagestate) {
+ if (exists $pagestate{$page}{'osm'}) {
+ foreach my $map (keys %{$pagestate{$page}{'osm'}}) {
+ foreach my $name (keys %{$pagestate{$page}{'osm'}{$map}{'waypoints'}}) {
+ debug("found waypoint $name");
+ $waypoints{$map}{$name} = $pagestate{$page}{'osm'}{$map}{'waypoints'}{$name};
+ }
+ }
+ }
+ }
+
+ foreach my $page (keys %pagestate) {
+ if (exists $pagestate{$page}{'osm'}) {
+ foreach my $map (keys %{$pagestate{$page}{'osm'}}) {
+ # examine the links on this page
+ foreach my $name (keys %{$pagestate{$page}{'osm'}{$map}{'waypoints'}}) {
+ if (exists $links{$page}) {
+ foreach my $otherpage (@{$links{$page}}) {
+ if (exists $waypoints{$map}{$otherpage}) {
+ push(@{$linestrings{$map}}, [
+ [ $waypoints{$map}{$name}{'lon'}, $waypoints{$map}{$name}{'lat'} ],
+ [ $waypoints{$map}{$otherpage}{'lon'}, $waypoints{$map}{$otherpage}{'lat'} ]
+ ]);
+ }
+ }
+ }
+ }
+ }
+ # clear the state, it will be regenerated on the next parse
+ # the idea here is to clear up removed waypoints...
+ $pagestate{$page}{'osm'} = ();
+ }
+ }
+
+ if (!defined($config{'osm_format'}) || !$config{'osm_format'}) {
+ $config{'osm_format'} = 'KML';
+ }
+ my %formats = map { $_ => 1 } split(/, */, $config{'osm_format'});
+ if ($formats{'GeoJSON'}) {
+ writejson(\%waypoints, \%linestrings);
+ }
+ if ($formats{'CSV'}) {
+ writecsvs(\%waypoints, \%linestrings);
+ }
+ if ($formats{'KML'}) {
+ writekml(\%waypoints, \%linestrings);
+ }
+}
+
+sub writejson($;$) {
+ my %waypoints = %{$_[0]};
+ my %linestrings = %{$_[1]};
+ eval q{use JSON};
+ error $@ if $@;
+ foreach my $map (keys %waypoints) {
+ my %geojson = ( "type" => "FeatureCollection", "features" => []);
+ foreach my $name (keys %{$waypoints{$map}}) {
+ my %marker = ( "type" => "Feature",
+ "geometry" => { "type" => "Point", "coordinates" => [ $waypoints{$map}{$name}{'lon'}, $waypoints{$map}{$name}{'lat'} ] },
+ "properties" => $waypoints{$map}{$name} );
+ push @{$geojson{'features'}}, \%marker;
+ }
+ foreach my $linestring (@{$linestrings{$map}}) {
+ my %json = ( "type" => "Feature",
+ "geometry" => { "type" => "LineString", "coordinates" => $linestring });
+ push @{$geojson{'features'}}, \%json;
+ }
+ writefile("pois.json", $config{destdir} . "/$map", to_json(\%geojson));
+ }
+}
+
+sub writekml($;$) {
+ my %waypoints = %{$_[0]};
+ my %linestrings = %{$_[1]};
+ eval q{use XML::Writer};
+ error $@ if $@;
+ foreach my $map (keys %waypoints) {
+
+=pod
+Sample placemark:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<kml xmlns="http://www.opengis.net/kml/2.2">
+ <Placemark>
+ <name>Simple placemark</name>
+ <description>Attached to the ground. Intelligently places itself
+ at the height of the underlying terrain.</description>
+ <Point>
+ <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
+ </Point>
+ </Placemark>
+</kml>
+
+Sample style:
+
+
+ <Style id="sh_sunny_copy69">
+ <IconStyle>
+ <scale>1.4</scale>
+ <Icon>
+ <href>http://waypoints.google.com/mapfiles/kml/shapes/sunny.png</href>
+ </Icon>
+ <hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction"/>
+ </IconStyle>
+ <LabelStyle>
+ <color>ff00aaff</color>
+ </LabelStyle>
+ </Style>
+
+
+=cut
+
+ my $output;
+ my $writer = XML::Writer->new( OUTPUT => \$output,
+ DATA_MODE => 1, ENCODING => 'UTF-8');
+ $writer->xmlDecl();
+ $writer->startTag("kml", "xmlns" => "http://www.opengis.net/kml/2.2");
+
+ # first pass: get the icons
+ foreach my $name (keys %{$waypoints{$map}}) {
+ my %options = %{$waypoints{$map}{$name}};
+ $writer->startTag("Style", id => $options{tag});
+ $writer->startTag("IconStyle");
+ $writer->startTag("Icon");
+ $writer->startTag("href");
+ $writer->characters($options{icon});
+ $writer->endTag();
+ $writer->endTag();
+ $writer->endTag();
+ $writer->endTag();
+ }
+
+ foreach my $name (keys %{$waypoints{$map}}) {
+ my %options = %{$waypoints{$map}{$name}};
+ $writer->startTag("Placemark");
+ $writer->startTag("name");
+ $writer->characters($name);
+ $writer->endTag();
+ $writer->startTag("styleUrl");
+ $writer->characters('#' . $options{tag});
+ $writer->endTag();
+ #$writer->emptyTag('atom:link', href => $options{href});
+ # to make it easier for us as the atom:link parameter is
+ # hard to access from javascript
+ $writer->startTag('href');
+ $writer->characters($options{href});
+ $writer->endTag();
+ $writer->startTag("description");
+ $writer->characters($options{desc});
+ $writer->endTag();
+ $writer->startTag("Point");
+ $writer->startTag("coordinates");
+ $writer->characters($options{lon} . "," . $options{lat});
+ $writer->endTag();
+ $writer->endTag();
+ $writer->endTag();
+ }
+
+ my $i = 0;
+ foreach my $linestring (@{$linestrings{$map}}) {
+ $writer->startTag("Placemark");
+ $writer->startTag("name");
+ $writer->characters("linestring " . $i++);
+ $writer->endTag();
+ $writer->startTag("LineString");
+ $writer->startTag("coordinates");
+ my $str = '';
+ foreach my $coord (@{$linestring}) {
+ $str .= join(',', @{$coord}) . " \n";
+ }
+ $writer->characters($str);
+ $writer->endTag();
+ $writer->endTag();
+ $writer->endTag();
+ }
+ $writer->endTag();
+ $writer->end();
+
+ writefile("pois.kmp", $config{destdir} . "/$map", $output);
+ }
+}
+
+sub writecsvs($;$) {
+ my %waypoints = %{$_[0]};
+ foreach my $map (keys %waypoints) {
+ my $poisf = "lat\tlon\ttitle\tdescription\ticon\ticonSize\ticonOffset\n";
+ foreach my $name (keys %{$waypoints{$map}}) {
+ my %options = %{$waypoints{$map}{$name}};
+ my $line =
+ $options{'lat'} . "\t" .
+ $options{'lon'} . "\t" .
+ $name . "\t" .
+ $options{'desc'} . '<br /><a href="' . $options{'page'} . '">' . $name . "</a>\t" .
+ $options{'icon'} . "\n";
+ $poisf .= $line;
+ }
+ writefile("pois.txt", $config{destdir} . "/$map", $poisf);
+ }
+}
+
+# pipe some data through the HTML scrubber
+#
+# code taken from the meta.pm plugin
+sub scrub($$$) {
+ if (IkiWiki::Plugin::htmlscrubber->can("sanitize")) {
+ return IkiWiki::Plugin::htmlscrubber::sanitize(
+ content => shift, page => shift, destpage => shift);
+ }
+ else {
+ return shift;
+ }
+}
+
+# taken from toggle.pm
+sub format (@) {
+ my %params=@_;
+
+ if ($params{content}=~m!<div[^>]*id="mapdiv-[^"]*"[^>]*>!g) {
+ if (! ($params{content}=~s!</body>!include_javascript($params{page})."</body>"!em)) {
+ # no <body> tag, probably in preview mode
+ $params{content}=$params{content} . include_javascript($params{page});
+ }
+ }
+ return $params{content};
+}
+
+sub prefered_format() {
+ if (!defined($config{'osm_format'}) || !$config{'osm_format'}) {
+ $config{'osm_format'} = 'KML';
+ }
+ my @spl = split(/, */, $config{'osm_format'});
+ return shift @spl;
+}
+
+sub include_javascript ($) {
+ my $page=shift;
+ my $loader;
+
+ eval q{use JSON};
+ error $@ if $@;
+ if (exists $pagestate{$page}{'osm'}) {
+ foreach my $map (keys %{$pagestate{$page}{'osm'}}) {
+ foreach my $name (keys %{$pagestate{$page}{'osm'}{$map}{'displays'}}) {
+ my %options = %{$pagestate{$page}{'osm'}{$map}{'displays'}{$name}};
+ $options{'map'} = $map;
+ $options{'format'} = prefered_format();
+ $loader .= "mapsetup(\"mapdiv-$name\", " . to_json(\%options) . ");\n";
+ }
+ }
+ }
+ if ($loader) {
+ return embed_map_code($page) . "<script type=\"text/javascript\" charset=\"utf-8\">$loader</script>";
+ }
+ else {
+ return '';
+ }
+}
+
+sub cgi($) {
+ my $cgi=shift;
+
+ return unless defined $cgi->param('do') &&
+ $cgi->param("do") eq "osm";
+
+ IkiWiki::decode_cgi_utf8($cgi);
+
+ my $map = $cgi->param('map');
+ if (!defined $map || $map !~ /^[a-z]*$/) {
+ error("invalid map parameter");
+ }
+
+ print "Content-Type: text/html\r\n";
+ print ("\r\n");
+ print "<html><body>";
+ print "<div id=\"mapdiv-$map\"></div>";
+ print embed_map_code();
+ print "<script type=\"text/javascript\" charset=\"utf-8\">mapsetup( 'mapdiv-$map', { 'map': '$map', 'lat': urlParams['lat'], 'lon': urlParams['lon'], 'zoom': urlParams['zoom'], 'fullscreen': 1, 'editable': 1, 'format': '" . prefered_format() . "'});</script>";
+ print "</body></html>";
+
+ exit 0;
+}
+
+sub embed_map_code(;$) {
+ my $page=shift;
+ return '<script src="http://www.openlayers.org/api/OpenLayers.js" type="text/javascript" charset="utf-8"></script>'.
+ '<script src="'.urlto("ikiwiki/osm.js", $page).
+ '" type="text/javascript" charset="utf-8"></script>'."\n";
+}
+
+1;
diff --git a/IkiWiki/Plugin/shortcut.pm b/IkiWiki/Plugin/shortcut.pm
index 0cedbe447..98df143ab 100644
--- a/IkiWiki/Plugin/shortcut.pm
+++ b/IkiWiki/Plugin/shortcut.pm
@@ -73,11 +73,21 @@ sub shortcut_expand ($$@) {
add_depends($params{destpage}, "shortcuts");
my $text=join(" ", @params);
- my $encoded_text=$text;
- $encoded_text=~s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
- $url=~s{\%([sS])}{
- $1 eq 's' ? $encoded_text : $text
+ $url=~s{\%([sSW])}{
+ if ($1 eq 's') {
+ my $t=$text;
+ $t=~s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ $t;
+ }
+ elsif ($1 eq 'S') {
+ $text;
+ }
+ elsif ($1 eq 'W') {
+ my $t=Encode::encode_utf8($text);
+ $t=~s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
+ $t;
+ }
}eg;
$text=~s/_/ /g;
diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm
index 8824a6ce0..fd11f2c63 100644
--- a/IkiWiki/Plugin/svn.pm
+++ b/IkiWiki/Plugin/svn.pm
@@ -5,6 +5,7 @@ use warnings;
use strict;
use IkiWiki;
use POSIX qw(setlocale LC_CTYPE);
+use URI::Escape q{uri_escape_utf8};
sub import {
hook(type => "checkconfig", id => "svn", call => \&checkconfig);
@@ -292,7 +293,8 @@ sub rcs_recentchanges ($) {
}
my $diffurl=defined $config{diffurl} ? $config{diffurl} : "";
- $diffurl=~s/\[\[file\]\]/$file/g;
+ my $efile = uri_escape_utf8($file);
+ $diffurl=~s/\[\[file\]\]/$efile/g;
$diffurl=~s/\[\[r1\]\]/$rev - 1/eg;
$diffurl=~s/\[\[r2\]\]/$rev/g;
diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm
index da4385446..11be248e8 100644
--- a/IkiWiki/Plugin/tla.pm
+++ b/IkiWiki/Plugin/tla.pm
@@ -4,6 +4,7 @@ package IkiWiki::Plugin::tla;
use warnings;
use strict;
use IkiWiki;
+use URI::Escape q{uri_escape_utf8};
sub import {
hook(type => "checkconfig", id => "tla", call => \&checkconfig);
@@ -224,7 +225,8 @@ sub rcs_recentchanges ($) {
foreach my $file (@paths) {
my $diffurl=defined $config{diffurl} ? $config{diffurl} : "";
- $diffurl=~s/\[\[file\]\]/$file/g;
+ my $efile = uri_escape_utf8($file);
+ $diffurl=~s/\[\[file\]\]/$efile/g;
$diffurl=~s/\[\[rev\]\]/$change/g;
push @pages, {
page => pagename($file),
diff --git a/Makefile.PL b/Makefile.PL
index 69ba5e5ef..ef29a950c 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -75,7 +75,7 @@ underlay_install:
install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
for dir in `cd underlays && $(FIND) . -follow -type d`; do \
install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
- for file in `$(FIND) underlays/$$dir -follow -maxdepth 1 -type f -not -name \\*.full.js -not -name \\*.full.css`; do \
+ for file in `$(FIND) underlays/$$dir -follow -maxdepth 1 -type f ! -name \\*.full.js ! -name \\*.full.css`; do \
cp -pRL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir 2>/dev/null || \
install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
done; \
diff --git a/debian/changelog b/debian/changelog
index c8db76966..3bc2a7e29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,25 @@
+ikiwiki (3.20120203) UNRELEASED; urgency=low
+
+ * Fix a snail mail address. Closes: #659158
+ * openid-jquery.js: Update URL of Wordpress favicon. Closes: #660549
+ * Drop the version attribute on the generator tag in Atom feeds
+ to make builds more reproducible. Closes: #661569 (Paul Wise)
+ * shortcut: Support Wikipedia's form of url-encoding for unicode
+ characters, which involves mojibake. Closes: #661198
+ * osm: New plugin to embed an OpenStreetMap into a wiki page.
+ Supports waypoints, tags, and can even draw paths matching
+ wikilinks between pages containing waypoints.
+ Thanks to Blars Blarson and Antoine Beaupré, as well as the worldwide
+ OpenStreetMap community for this utter awesomeness.
+ * Add a few missing jquery UI icons to attachment upload widget underlay.
+ * URI escape filename when generating the diffurl.
+ * trail: New plugin to add navigation trails through pages via Next and
+ Previous links. Trails can easily be added to existing inlines by setting
+ trail=yes in the inline.
+ Thanks to Simon McVittie for his persistance developing this feature.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 08 Feb 2012 16:07:00 -0400
+
ikiwiki (3.20120202) unstable; urgency=low
* mdwn: Added nodiscount setting, which can be used to avoid using the
diff --git a/debian/control b/debian/control
index 9403dfb44..54cbd0f7b 100644
--- a/debian/control
+++ b/debian/control
@@ -38,7 +38,7 @@ Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl,
libsparkline-php, texlive, dvipng, libtext-wikicreole-perl,
libsort-naturally-perl, libtext-textile-perl, libhighlight-perl,
po4a (>= 0.35-1), gettext, libnet-inet6glue-perl,
- libtext-multimarkdown-perl
+ libtext-multimarkdown-perl, libxml-writer-perl
Conflicts: ikiwiki-plugin-table
Replaces: ikiwiki-plugin-table
Provides: ikiwiki-plugin-table
diff --git a/debian/copyright b/debian/copyright
index 74418281d..8fddb682b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format: http://dep.debian.net/deps/dep5/
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: native package
Files: *
@@ -153,6 +153,10 @@ Files: IkiWiki/Plugin/rsync.pm
Copyright: © 2009 Amitai Schlair
License: BSD-2-clause
+Files: IkiWiki/Plugin/osm.pm
+Copyright: © 2011 Blars Blarson, Antoine Beaupré
+License: GPL-2
+
Files: doc/logo/*
Copyright: © 2006 Recai Oktaş <roktas@debian.org>
License: GPL-2+
diff --git a/doc/basewiki/sandbox.mdwn b/doc/basewiki/sandbox.mdwn
index c66534fc2..e76bdb8d1 100644
--- a/doc/basewiki/sandbox.mdwn
+++ b/doc/basewiki/sandbox.mdwn
@@ -30,3 +30,5 @@ Bulleted list
* item
[[ikiwiki/WikiLink]]
+
+[[!calendar type="month" pages="blog/*"]]
diff --git a/doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn b/doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn
new file mode 100644
index 000000000..7282a71b8
--- /dev/null
+++ b/doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8.mdwn
@@ -0,0 +1,11 @@
+import os
+os.environment['LANG'] = 'it_IT.utf-8'
+
+Suona plausibile?
+
+[GitHub pykipandoc](https://github.com/temmen/pykipandoc) -- Temmen
+
+> The place to put contrib plugins is in [[plugins/contrib]].
+>
+> Closing this bug report as whatever it is that was fixed is apparently not an ikiwiki
+> bug.. I guess. [[done]] --[[Joey]]
diff --git a/doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn b/doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn
new file mode 100644
index 000000000..9cdc9e746
--- /dev/null
+++ b/doc/bugs/__91__SOLVED__93___Pandoc_plugin_and_UTF-8:_IkiWiki_and_UTF-8/discussion.mdwn
@@ -0,0 +1,23 @@
+ # plugins to add to the default configuration
+ add_plugins => [qw{
+ brokenlinks
+ map
+ orphans
+ pagecount
+ pagestats
+ tag
+ template
+ openid
+ attachment
+ edittemplate
+ remove
+ listdirectives
+ shortcut
+ pykipandoc}],
+ # plugins to disable
+ disable_plugins => [qw{passwordauth mdwn}],
+
+and
+
+ # UTF-8 locale to use
+ locale => 'it_IT.UTF-8',
diff --git a/doc/bugs/find_gnuism.mdwn b/doc/bugs/find_gnuism.mdwn
new file mode 100644
index 000000000..65ee10657
--- /dev/null
+++ b/doc/bugs/find_gnuism.mdwn
@@ -0,0 +1,7 @@
+[[!template id=gitbranch branch=schmonz/portability author="[[schmonz]]"]]
+
+Whoops, somehow missed a spot on the last incarnation of this branch.
+`find -not` doesn't work on NetBSD and `find !` runs equivalently
+for me. Fixed in 9659272e25fac37f896991dab01a05b4f4c85ccb.
+
+> [[done]] --[[Joey]]
diff --git a/doc/bugs/jquery-ui.min.css_missing_some_image_files.mdwn b/doc/bugs/jquery-ui.min.css_missing_some_image_files.mdwn
new file mode 100644
index 000000000..dd026f4ec
--- /dev/null
+++ b/doc/bugs/jquery-ui.min.css_missing_some_image_files.mdwn
@@ -0,0 +1,14 @@
+This is very minor. Noticed in nginx's logs that jquery-ui.min.css (the attachment plugin uses this) keeps referencing some png files that are not available in public_html/mywiki/ikiwiki/images/ These should be included in underlays/attachment/ikiwiki/images/ in the source repo and seem to be copied from /usr/local/share/ikiwiki/attachment/ikiwiki/images/ when I compile a new wiki. The complete list of images jquery-ui.min.css is looking for can be found here. https://github.com/jquery/jquery-ui/tree/1.8.14/themes/base/images
+
+> Do you have a list of files that are *actually* used when ikiwiki is
+> running? I don't want to include a lot of files that jquery only
+> uses in other situations. The currently included files are exactly those
+> that I see it try to use. --[[Joey]]
+
+Fair enough. These 3 files are the only ones that appear consistently in nginx error logs.
+ui-bg_glass_75_dadada_1x400.png
+ui-icons_454545_256x240.png
+ui-bg_glass_95_fef1ec_1x400.png
+
+> Hmm, that's most of the missing ones. I just added them all. [[done]]
+> --[[Joey]]
diff --git a/doc/bugs/linkmap_displays_underscore_escapes.mdwn b/doc/bugs/linkmap_displays_underscore_escapes.mdwn
new file mode 100644
index 000000000..1539f16fe
--- /dev/null
+++ b/doc/bugs/linkmap_displays_underscore_escapes.mdwn
@@ -0,0 +1,89 @@
+[[ikiwiki/directive/linkmap]]s display the file name instead of the pagetitle, showing unsightly underscore escapes and underscores instead of blanks to users.
+
+the attached [[!taglink patch]] fixes this; from its commit message:
+
+ display the pagetitle() in linkmaps
+
+ without this patch, linkmaps display underscores and underscore escape
+ sequences in the rendered output.
+
+ this introduces a pageescape function, which invoces pagetitle() to get
+ rid of underscore escapes and wraps the resulting utf8 string
+ appropriately for inclusion in a dot file (using dot's html encoding
+ because it can represent the '\"' dyad properly, and because it doesn't
+ need special-casing of newlines).
+
+the output will look much better (at least in my wikis) with the "[[bugs/pagetitle function does not respect meta titles]]" issue fixed.
+
+everything below that line is the patch as produced by git-format-patch. (btw, what's the preferred way to send patches, apart from creating a git branch somewhere?)
+
+--------- snap ------------<pre>
+
+From efbb1121ffdc146f5c9a481a51f23ad151b9f240 Mon Sep 17 00:00:00 2001
+From: chrysn <chrysn@fsfe.org>
+Date: Thu, 15 Mar 2012 14:38:42 +0100
+Subject: [PATCH] display the pagetitle() in linkmaps
+
+without this patch, linkmaps display underscores and underscore escape
+sequences in the rendered output.
+
+this introduces a pageescape function, which invoces pagetitle() to get
+rid of underscore escapes and wraps the resulting utf8 string
+appropriately for inclusion in a dot file (using dot's html encoding
+because it can represent the '\"' dyad properly, and because it doesn't
+need special-casing of newlines).
+---
+ IkiWiki/Plugin/linkmap.pm | 17 +++++++++++++++--
+ 1 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm
+index ac26e07..b5ef1a1 100644
+--- a/IkiWiki/Plugin/linkmap.pm
++++ b/IkiWiki/Plugin/linkmap.pm
+@@ -5,6 +5,7 @@ use warnings;
+ use strict;
+ use IkiWiki 3.00;
+ use IPC::Open2;
++use HTML::Entities;
+
+ sub import {
+ hook(type => "getsetup", id => "linkmap", call => \&getsetup);
+@@ -22,6 +23,18 @@ sub getsetup () {
+
+ my $mapnum=0;
+
++sub pageescape {
++ my $item = shift;
++ # encoding explicitly in case ikiwiki is configured to accept <> or &
++ # in file names
++ my $title = pagetitle($item, 1);
++ # it would not be necessary to encode *all* the html entities (<> would
++ # be sufficient, &" probably a good idea), as dot accepts utf8, but it
++ # isn't bad either
++ $title = encode_entities($title);
++ return("<$title>");
++}
++
+ sub preprocess (@) {
+ my %params=@_;
+
+@@ -63,7 +76,7 @@ sub preprocess (@) {
+ my $show=sub {
+ my $item=shift;
+ if (! $shown{$item}) {
+- print OUT "\"$item\" [shape=box,href=\"$mapitems{$item}\"];\n";
++ print OUT pageescape($item)." [shape=box,href=\"$mapitems{$item}\"];\n";
+ $shown{$item}=1;
+ }
+ };
+@@ -74,7 +87,7 @@ sub preprocess (@) {
+ foreach my $endpoint ($item, $link) {
+ $show->($endpoint);
+ }
+- print OUT "\"$item\" -> \"$link\";\n";
++ print OUT pageescape($item)." -> ".pageescape($link).";\n";
+ }
+ }
+ print OUT "}\n";
+--
+1.7.9.1
diff --git a/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn b/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn
index 51c320067..ebea43697 100644
--- a/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn
+++ b/doc/forum/Calendar:_listing_multiple_entries_per_day.mdwn
@@ -4,7 +4,7 @@ I'd very much like to be able to list my blog posts on a daily basis (used for l
There was some effort to do this as detailed here.
-[[http://ikiwiki.info/todo/Set_arbitrary_date_to_be_used_by_calendar_plugin/]]
+[[todo/Set_arbitrary_date_to_be_used_by_calendar_plugin]]
I had a quick go at doing something similar on Debian Stable (Ikiwiki 3.0) but alas my Ikiwiki fu is not strong enough.
diff --git a/doc/forum/Calendar:_listing_multiple_entries_per_day/comment_4_4be39c2043821848d4b25d0bf946a718._comment b/doc/forum/Calendar:_listing_multiple_entries_per_day/comment_4_4be39c2043821848d4b25d0bf946a718._comment
new file mode 100644
index 000000000..a71276d6b
--- /dev/null
+++ b/doc/forum/Calendar:_listing_multiple_entries_per_day/comment_4_4be39c2043821848d4b25d0bf946a718._comment
@@ -0,0 +1,15 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 4"
+ date="2012-02-21T17:23:00Z"
+ content="""
+To be clear, this patch creates a `yyyy/mm/dd` file for each day, listing the posts for that day, so the calendar can link to it rather than a random single post.
+
+While a valid solution certainly, that's a lot of added pages! Especially a high overhead for such a minor UI point as this.
+
+Surely something interesting could be done with javascript or some other form of UI to make clicking on a day in a calendar that has multiple posts present a list of them? That would have essentially no overhead, since the calendar plugin already has a list of the posts made on a given day.
+
+Ikiwiki already does something similar to deal with the case where a page has a great many backlinks.. It makes a UI element that, if hovered over, pops up a display of all the rest. This is done quite simply in the `page.tmpl`
+using the popup and balloon CSS classes. Calendar could also use this.
+"""]]
diff --git a/doc/forum/Commiting_all_moderated_comments_into_special_branch__63__.mdwn b/doc/forum/Commiting_all_moderated_comments_into_special_branch__63__.mdwn
new file mode 100644
index 000000000..e45069c63
--- /dev/null
+++ b/doc/forum/Commiting_all_moderated_comments_into_special_branch__63__.mdwn
@@ -0,0 +1,8 @@
+I only interact with ikiwiki via cli & git; thus I would love to be able to moderate comments via git from all remote checkouts without being forced to ssh to my server and do that locally.
+
+Is anyone aware of a way to check all comments into a special branch, possibly called "moderation", and with a normal suffix, not "_comment_pending"? That would allow me to cherry-pick from that branch without having to remember to rename and simply delete all spam etc from the branch.
+
+Every now and then, I could delete the whole branch, thus cleaning out crud. As the approved comments live in master, that would not be a problem.
+
+
+RichiH
diff --git a/doc/forum/How_to_add_a_mouse-over_pop-up_label_for_a_text__63__.mdwn b/doc/forum/How_to_add_a_mouse-over_pop-up_label_for_a_text__63__.mdwn
new file mode 100644
index 000000000..cf9245404
--- /dev/null
+++ b/doc/forum/How_to_add_a_mouse-over_pop-up_label_for_a_text__63__.mdwn
@@ -0,0 +1,8 @@
+How to add a mouse-over pop-up label for a text?
+
+I'd like to have the following effect:
+
+when a user move the mouse arrow on top of the text, a small window will show up at the upper right of the text and the window contains some additional information about the text.
+
+Any idea how to achieve this?
+
diff --git a/doc/forum/How_to_change_registration_page/comment_2_8176ef231cf901802fc60b6d414018e6._comment b/doc/forum/How_to_change_registration_page/comment_2_8176ef231cf901802fc60b6d414018e6._comment
new file mode 100644
index 000000000..8e67162e1
--- /dev/null
+++ b/doc/forum/How_to_change_registration_page/comment_2_8176ef231cf901802fc60b6d414018e6._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawndsaC4GaIBw49WNdbk2Faqfm_mrtQgul8"
+ nickname="Christian"
+ subject="comment 2"
+ date="2012-02-29T06:58:26Z"
+ content="""
+thanks!
+"""]]
diff --git a/doc/forum/How_to_format___91____91__foobar__93____93___in_code_blocks__63__/comment_1_ad000d39fd1dc05aa8ef6eb19d8d999b._comment b/doc/forum/How_to_format___91____91__foobar__93____93___in_code_blocks__63__/comment_1_ad000d39fd1dc05aa8ef6eb19d8d999b._comment
new file mode 100644
index 000000000..aa26b086b
--- /dev/null
+++ b/doc/forum/How_to_format___91____91__foobar__93____93___in_code_blocks__63__/comment_1_ad000d39fd1dc05aa8ef6eb19d8d999b._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://acathur.myopenid.com/"
+ ip="31.56.6.65"
+ subject="comment 1"
+ date="2012-02-26T08:08:15Z"
+ content="""
+doing `\\[[foobar]]` works for me
+"""]]
diff --git a/doc/forum/How_to_show_recent_changes_for_individual_pages__63__.mdwn b/doc/forum/How_to_show_recent_changes_for_individual_pages__63__.mdwn
new file mode 100644
index 000000000..890f24a33
--- /dev/null
+++ b/doc/forum/How_to_show_recent_changes_for_individual_pages__63__.mdwn
@@ -0,0 +1 @@
+The "RecentChanges" shown under page titles on a individual is linked to the revision history page for the whole site where change to every file in the wiki is listed. Is there a way to get that for individual pages?
diff --git a/doc/forum/How_to_show_recent_changes_for_individual_pages__63__/comment_1_cd34affc6883f4e4bc5e7e7b711cc8ba._comment b/doc/forum/How_to_show_recent_changes_for_individual_pages__63__/comment_1_cd34affc6883f4e4bc5e7e7b711cc8ba._comment
new file mode 100644
index 000000000..8ed341c09
--- /dev/null
+++ b/doc/forum/How_to_show_recent_changes_for_individual_pages__63__/comment_1_cd34affc6883f4e4bc5e7e7b711cc8ba._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 1"
+ date="2012-03-03T15:01:34Z"
+ content="""
+The RecentChanges page is a wiki page like any other, containing a special inline directive. You can copy that, and modify the inline's [[ikiwiki/PageSpec]] to match pages changed by a specific author, or with a specific title.
+
+If you want separate change logs for *every* page, install gitweb and configure historyurl. There will then be a \"History\" link going to the gitweb for each page.
+"""]]
diff --git a/doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_3_f581afcdb4481ea5d65bcc33bdbab99a._comment b/doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_3_f581afcdb4481ea5d65bcc33bdbab99a._comment
new file mode 100644
index 000000000..1ac15d74c
--- /dev/null
+++ b/doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_3_f581afcdb4481ea5d65bcc33bdbab99a._comment
@@ -0,0 +1,25 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawnp4lzWSX1pvSpwAoboehP3SSbmbQESe80"
+ nickname="Felipe Augusto"
+ subject="I'm trying to use OpenID without success"
+ date="2012-02-08T04:54:22Z"
+ content="""
+I'm using ikiwiki package from Debian squeeze and I can't seem
+to be able to make OpenID work. It's a blog and when I try to
+add a comment and click on SignIn, I'm redirected to
+
+>http://my.site/ikiwiki.cgi?do=commentsignin
+
+
+Once I click on Google logo/icon, it takes a while before showing
+
+>no_identity_server: The provided URL doesn't declare its OpenID identity server.
+
+
+It's not clear for me what's wrong or if I should add meta openid in some page.
+This is the version of libnet-openid-consumer-perl: 1.03-1. It also fails for
+Yahoo! and other providers, we never get redirected to Google/Yahoo! or other
+verification page.
+
+Thank you in advance!
+"""]]
diff --git a/doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_4_b0d39d30852bca1525ab9612a7532670._comment b/doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_4_b0d39d30852bca1525ab9612a7532670._comment
new file mode 100644
index 000000000..ce3cf2156
--- /dev/null
+++ b/doc/forum/OpenID_not_working___47___where_to_define_wiki__39__s_ID__63__/comment_4_b0d39d30852bca1525ab9612a7532670._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawndsaC4GaIBw49WNdbk2Faqfm_mrtQgul8"
+ nickname="Christian"
+ subject="comment 4"
+ date="2012-02-29T06:59:21Z"
+ content="""
+I had the error with squeeze, too. Have now moved to passwordauth, at least for now...
+"""]]
diff --git a/doc/forum/Problem_with_gitweb.mdwn b/doc/forum/Problem_with_gitweb.mdwn
new file mode 100644
index 000000000..98a7f39a3
--- /dev/null
+++ b/doc/forum/Problem_with_gitweb.mdwn
@@ -0,0 +1,3 @@
+I use gitweb to display the pagehistories of my local ikiwiki. However since a few weeks it doesn't work anymore and displays just: 404 - No such project. I don't remember that I changed something with my wiki. Any ideas how to fix this? I guess that it could be a permission problem, however I don't really know which permissions are important in this case.
+
+
diff --git a/doc/forum/Problem_with_gitweb/comment_1_c505be6a13651c397fb803dd4117acce._comment b/doc/forum/Problem_with_gitweb/comment_1_c505be6a13651c397fb803dd4117acce._comment
new file mode 100644
index 000000000..0a492fa49
--- /dev/null
+++ b/doc/forum/Problem_with_gitweb/comment_1_c505be6a13651c397fb803dd4117acce._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawk_MMtLPS7osC5MjX00q2ATjvvXPWqm0ik"
+ nickname="micheal"
+ subject="comment 1"
+ date="2012-03-05T18:44:36Z"
+ content="""
+Any Ideas what I could do?
+"""]]
diff --git a/doc/forum/Problem_with_gitweb/comment_2_23cc0d87448d3cbdac20a005e9191589._comment b/doc/forum/Problem_with_gitweb/comment_2_23cc0d87448d3cbdac20a005e9191589._comment
new file mode 100644
index 000000000..f80bd38d8
--- /dev/null
+++ b/doc/forum/Problem_with_gitweb/comment_2_23cc0d87448d3cbdac20a005e9191589._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 2"
+ date="2012-03-05T21:08:45Z"
+ content="""
+This seems entirely a gitweb configuration problem, so look at `/etc/gitweb.conf`
+
+Or, if you are able to navigate to a gitweb url that does show your wiki's source, fix up ikiwiki's `historyurl` to use the url that works.
+"""]]
diff --git a/doc/forum/Problem_with_gitweb/comment_3_697c6038009249e6a49d9e458a5ba271._comment b/doc/forum/Problem_with_gitweb/comment_3_697c6038009249e6a49d9e458a5ba271._comment
new file mode 100644
index 000000000..72eeda124
--- /dev/null
+++ b/doc/forum/Problem_with_gitweb/comment_3_697c6038009249e6a49d9e458a5ba271._comment
@@ -0,0 +1,47 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawk_MMtLPS7osC5MjX00q2ATjvvXPWqm0ik"
+ nickname="micheal"
+ subject="comment 3"
+ date="2012-03-06T09:50:53Z"
+ content="""
+I don't know how to navigate to a gitweb url that does show my wiki's source.
+
+My gitweb.conf looks like this:
+
+ cat /etc/gitweb.conf
+ # path to git projects (<project>.git)
+ #$projectroot = \"/var/cache/git\";
+ $projectroot = \"/home/myuser/myiki\";
+
+ # directory to use for temp files
+ $git_temp = \"/tmp\";
+
+ # Change This
+ $site_name = \"myiki\";
+
+ # target of the home link on top of all pages
+ #$home_link = $my_uri || \"/\";
+
+ # html text to include at home page
+ #$home_text = \"indextext.html\";
+
+ # file with project list; by default, simply scan the projectroot dir.
+ #$projects_list = $projectroot;
+
+ # stylesheet to use
+ #@stylesheets = (\"static/gitweb.css\");
+
+ # javascript code for gitweb
+ #$javascript = \"static/gitweb.js\";
+
+ # logo to use
+ #$logo = \"static/git-logo.png\";
+
+ # the 'favicon'
+ #$favicon = \"static/git-favicon.png\";
+
+ # git-diff-tree(1) options to use for generated patches
+ #@diff_opts = (\"-M\");
+ @diff_opts = ();
+
+"""]]
diff --git a/doc/forum/attachments_fail_to_upload.mdwn b/doc/forum/attachments_fail_to_upload.mdwn
new file mode 100644
index 000000000..62e363a16
--- /dev/null
+++ b/doc/forum/attachments_fail_to_upload.mdwn
@@ -0,0 +1,8 @@
+I am having a problem with ikiwiki on an armel processor based machine running 32 bit debian squeeze.
+I first installed the ikiwiki deb from the repos and realized there was a problem uploading images.
+I downloaded the latest version of ikiwiki from the git repo and made sure I had all of the necessary dependencies and libraries.
+Make doesn't seem to complain about anything being missing and make test passes fine. I can create a new wiki and edit pages but anytime I try to upload an image it fails.
+I have the attachment plugin activated.And I added mimetype(image/*) and maxsize(5000kb) to the PageSpec field but that made no difference.
+I am able to successully add images to the appropriate folders manually via the command line and the commit them to git but I'd liekt o make it work through the web interface. Is there anything that I may have missed?
+
+Edit: I just noticed that if I save the page anyway after the the javascript ui reports that the upload has failed, the file has in fact uploaded.
diff --git a/doc/forum/attachments_fail_to_upload/comment_1_577adde1dfa49463dfa8e169c462fc42._comment b/doc/forum/attachments_fail_to_upload/comment_1_577adde1dfa49463dfa8e169c462fc42._comment
new file mode 100644
index 000000000..7d2d66c14
--- /dev/null
+++ b/doc/forum/attachments_fail_to_upload/comment_1_577adde1dfa49463dfa8e169c462fc42._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 1"
+ date="2012-03-01T16:11:09Z"
+ content="""
+Saying \"it fails\" is not going to get the best help. If you can look in your web server's error.log file, or get a error message from somewhere else, you might get somewhere.
+
+You might also check if the machine is running out of memory. It's quite likely that a POSTed attachment is all buffered in the web server's memory before ikiwiki gets ahold of it.
+"""]]
diff --git a/doc/forum/attachments_fail_to_upload/comment_2_473f38c6d523496fac8dad13ac6d20c3._comment b/doc/forum/attachments_fail_to_upload/comment_2_473f38c6d523496fac8dad13ac6d20c3._comment
new file mode 100644
index 000000000..f491a9b71
--- /dev/null
+++ b/doc/forum/attachments_fail_to_upload/comment_2_473f38c6d523496fac8dad13ac6d20c3._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="jaime"
+ ip="201.141.41.68"
+ subject="comment 2"
+ date="2012-03-01T20:08:47Z"
+ content="""
+Sorry, \"failed\" is just the message ikwiki's web interface returns. Nginx's error logs don't seem to register anything when the \"failure\" occurs. I am not sure how to properly monitor what is happening with the web server's memory at the time of uploading but just watching htop I can see that the ikiwiki begins to use 100% if the cpu until the process stops but there doesn't seem to be much impact on the overall memory usage, seems to remain about half of available memory.
+I'm sorry if that is not helpful. If you can give me some pointers on where to look for more detailed information I can follow instructions.
+
+
+
+"""]]
diff --git a/doc/forum/attachments_fail_to_upload/comment_3_799a2f1b7b259157e97fd31ec76fb845._comment b/doc/forum/attachments_fail_to_upload/comment_3_799a2f1b7b259157e97fd31ec76fb845._comment
new file mode 100644
index 000000000..ebf2756a4
--- /dev/null
+++ b/doc/forum/attachments_fail_to_upload/comment_3_799a2f1b7b259157e97fd31ec76fb845._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 3"
+ date="2012-03-03T14:54:10Z"
+ content="""
+What version are you running on squeeze? The version shipped with Debian stable does not have the javascript uploader.
+
+There was a recent problem involving filenames with unicode characters that broke the javascript uploader as you describe, which was fixed in a recent release.
+"""]]
diff --git a/doc/forum/attachments_fail_to_upload/comment_4_e37d1497acafd3fda547462f000636e3._comment b/doc/forum/attachments_fail_to_upload/comment_4_e37d1497acafd3fda547462f000636e3._comment
new file mode 100644
index 000000000..148c7b799
--- /dev/null
+++ b/doc/forum/attachments_fail_to_upload/comment_4_e37d1497acafd3fda547462f000636e3._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="jaime"
+ ip="201.141.91.196"
+ subject="ikiwiki version 3.20120203"
+ date="2012-03-05T19:52:02Z"
+ content="""
+I installed ikiwiki version 3.20120203 from source. Should I pull more recent changes from the repo?
+"""]]
diff --git a/doc/forum/attachments_fail_to_upload/comment_5_da03f9c4917cb1ef52de984b8ba86b68._comment b/doc/forum/attachments_fail_to_upload/comment_5_da03f9c4917cb1ef52de984b8ba86b68._comment
new file mode 100644
index 000000000..dbe0d6574
--- /dev/null
+++ b/doc/forum/attachments_fail_to_upload/comment_5_da03f9c4917cb1ef52de984b8ba86b68._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 5"
+ date="2012-03-05T20:48:50Z"
+ content="""
+Your version already contains the unicode fix, which was commit 1572c3c376df36ea09e27a1ea437e3a75cdf0f84.
+
+I think it's possible that the javascript file upload widget is timing out waiting for a response from ikiwiki when uploading the file. Since this is a slow CPU, it might exceed some limit in that code. At this point all I know is that the javascript file upload widget is setting an error flag, which is displayed as \"failed!\" in red. The next step is probably to get a http protocol analizer like firebug and see what if anything is being returned by the ikiwiki.cgi when the attachment is uploaded to it -- it should return some JSON with a `stored_msg` field.
+
+"""]]
diff --git a/doc/forum/attachments_fail_to_upload/comment_6_04498946a300ddb652dec73c2950f48f._comment b/doc/forum/attachments_fail_to_upload/comment_6_04498946a300ddb652dec73c2950f48f._comment
new file mode 100644
index 000000000..877050eb5
--- /dev/null
+++ b/doc/forum/attachments_fail_to_upload/comment_6_04498946a300ddb652dec73c2950f48f._comment
@@ -0,0 +1,19 @@
+[[!comment format=mdwn
+ username="jaime"
+ ip="201.141.54.196"
+ subject="comment 6"
+ date="2012-03-08T01:34:57Z"
+ content="""
+Ok... figured out how to use firebug, started the profile, and tried uploading an image. POST http://myserver/ikiwiki.cgi immediately turns red with a little X as I get the javascript \"failed\" message in the ui. In the post tab of firebug, halfway through the binary content of the png I can see the message \"... Firebug request size limit has been reached by Firebug. ... \"
+
+So next I try uploading a tiny 3k image. This time the post completes and I can see \"Error: Can't locate JSON.pm in @INC\" in the output. A bit of googling tells me I need to install the libjson-perl package. Done.
+
+I try and upload the tiny 3k image again. This time it works. :)
+I try and upload a 9k image and the POST just dies just like before with the \"... Firebug request size limit has been reached by Firebug. ... \" in the post tab.
+
+So I tried changing the extensions.firebug.netDisplayedPostBodyLimit variable in firefox to see if that would me to get more info. Now the I don't get the request size limit message but the post still doesn't get anything back.
+
+I decided to try some other http protocal analyzers. Firefox 10 internal webdeveloper tools don't give me any more info.
+Next I tried HttpFox and the only thing I get back is this...
+Error loading content (NS_ERROR_DOCUMENT_NOT_CACHED)
+"""]]
diff --git a/doc/forum/build_error:_Cannot_decode_string_with_wide_characters.mdwn b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters.mdwn
new file mode 100644
index 000000000..2e5ac7e6e
--- /dev/null
+++ b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters.mdwn
@@ -0,0 +1,12 @@
+ $ ikiwiki -setup mywiki.setup
+ generating wrappers..
+ rebuilding wiki..
+ Cannot decode string with wide characters at /opt/local/lib/perl5/5.12.3/darwin-multi-2level/Encode.pm line 175.
+
+I am running Mac OS X 10.6.8
+
+ $ ikiwiki --version
+ ikiwiki version 3.20110608
+ $ perl --version
+
+ This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-multi-2level
diff --git a/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_1_83fbb415dd3ae6a19ed5ea5f82065c28._comment b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_1_83fbb415dd3ae6a19ed5ea5f82065c28._comment
new file mode 100644
index 000000000..d1b555b2a
--- /dev/null
+++ b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_1_83fbb415dd3ae6a19ed5ea5f82065c28._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 1"
+ date="2012-03-13T03:57:42Z"
+ content="""
+The problem could be your system's locale setting. Perhaps LANG is not set to a utf-8 capable locale.
+"""]]
diff --git a/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_2_d258536c98538d4744f66eb3132439a9._comment b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_2_d258536c98538d4744f66eb3132439a9._comment
new file mode 100644
index 000000000..28222618d
--- /dev/null
+++ b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_2_d258536c98538d4744f66eb3132439a9._comment
@@ -0,0 +1,20 @@
+[[!comment format=mdwn
+ username="https://www.google.com/accounts/o8/id?id=AItOawmKyeW2G4jjSdnL1m6kPPtAiGFUBsnYCfY"
+ nickname="FName"
+ subject="comment 2"
+ date="2012-03-13T04:43:25Z"
+ content="""
+ $ locale
+ LANG=\"en_US.UTF-8\"
+ LC_COLLATE=\"en_US.UTF-8\"
+ LC_CTYPE=\"en_US.UTF-8\"
+ LC_MESSAGES=\"en_US.UTF-8\"
+ LC_MONETARY=\"en_US.UTF-8\"
+ LC_NUMERIC=\"en_US.UTF-8\"
+ LC_TIME=\"en_US.UTF-8\"
+ LC_ALL=
+ $ uname -a
+ Darwin x4430 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
+
+Does it look OK?
+"""]]
diff --git a/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_3_d62173d0ae220ab7b063631952856587._comment b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_3_d62173d0ae220ab7b063631952856587._comment
new file mode 100644
index 000000000..8dc2f9851
--- /dev/null
+++ b/doc/forum/build_error:_Cannot_decode_string_with_wide_characters/comment_3_d62173d0ae220ab7b063631952856587._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 3"
+ date="2012-03-16T20:33:20Z"
+ content="""
+The locale settings look ok.
+
+I'd try upgrading your perl. 5.12.3 is rather old, and the code that is failing is part of perl.
+"""]]
diff --git a/doc/forum/links_to_diff_on_recentchanges__63__.mdwn b/doc/forum/links_to_diff_on_recentchanges__63__.mdwn
new file mode 100644
index 000000000..9a8db62b9
--- /dev/null
+++ b/doc/forum/links_to_diff_on_recentchanges__63__.mdwn
@@ -0,0 +1 @@
+How can I get the little glasses-icon with a link to the diff on Recentchanges, please? I have git integration working nicely, and recentchangesdiff is producing diffs in the RSS feed, but I'd really like a link on the RecentChanges like you have here.
diff --git a/doc/forum/links_to_diff_on_recentchanges__63__/comment_1_1dbc723cc2794f6d45de9cbd2fc2e0fd._comment b/doc/forum/links_to_diff_on_recentchanges__63__/comment_1_1dbc723cc2794f6d45de9cbd2fc2e0fd._comment
new file mode 100644
index 000000000..a09b410b3
--- /dev/null
+++ b/doc/forum/links_to_diff_on_recentchanges__63__/comment_1_1dbc723cc2794f6d45de9cbd2fc2e0fd._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ nickname="joey"
+ subject="comment 1"
+ date="2012-02-23T20:20:17Z"
+ content="""
+Set up gitweb and configure the `diffurl` in ikiwiki and the glasses will appear.
+"""]]
diff --git a/doc/forum/links_to_diff_on_recentchanges__63__/comment_2_4349c85d92cf9c1acf2e7678371ab12a._comment b/doc/forum/links_to_diff_on_recentchanges__63__/comment_2_4349c85d92cf9c1acf2e7678371ab12a._comment
new file mode 100644
index 000000000..b98172bfd
--- /dev/null
+++ b/doc/forum/links_to_diff_on_recentchanges__63__/comment_2_4349c85d92cf9c1acf2e7678371ab12a._comment
@@ -0,0 +1,10 @@
+[[!comment format=mdwn
+ username="bob"
+ ip="137.205.152.60"
+ subject="comment 2"
+ date="2012-02-24T09:30:50Z"
+ content="""
+Thanks, that was just the ticket :). My ikiwiki.setup file didn't even have a commented out diffurl in it - is there a handy list of configuration-variables somewhere? I thought the theory was that ikiwiki.setup was generated with (commented out) nearly all the config variables already mentioned?
+
+[FWIW, I'm using the version in Debian stable]
+"""]]
diff --git a/doc/git.mdwn b/doc/git.mdwn
index 2e58c6992..1da9fbfbd 100644
--- a/doc/git.mdwn
+++ b/doc/git.mdwn
@@ -74,8 +74,10 @@ think about merging them. This is recommended. :-)
* nezmer `git://gitorious.org/ikiwiki-nezmer/ikiwiki-nezmer.git`
* [[yds]] `git://github.com/yds/ikiwiki.git`
* [[pelle]] `git://github.com/hemmop/ikiwiki.git`
+* [[chrismgray]] `git://github.com/chrismgray/ikiwiki.git`
+* [[ttw]] `git://github.com/ttw/ikiwiki.git`
+* [[anarcat]] `git://src.anarcat.ath.cx/ikiwiki`
## branches
Current branches of ikiwiki are listed on [[branches]].
-
diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn
index 03cbdd86c..d311a1859 100644
--- a/doc/ikiwiki-calendar.mdwn
+++ b/doc/ikiwiki-calendar.mdwn
@@ -39,7 +39,7 @@ the calendars to highlight the current day.
An example crontab:
- 0 0 * * * ikiwiki-calendar ~/ikiwiki.setup "posts/* and !*/Discussion"
+ 0 0 * * * ikiwiki-calendar ~/ikiwiki.setup 'posts/* and !*/Discussion'
# TEMPLATES
diff --git a/doc/ikiwiki-calendar/discussion.mdwn b/doc/ikiwiki-calendar/discussion.mdwn
new file mode 100644
index 000000000..b64321008
--- /dev/null
+++ b/doc/ikiwiki-calendar/discussion.mdwn
@@ -0,0 +1,36 @@
+Suggestion to change
+
+ 0 0 * * * ikiwiki-calendar ~/ikiwiki.setup "posts/* and !*/Discussion"
+
+to
+
+ 0 0 * * * ikiwiki-calendar ~/ikiwiki.setup 'posts/* and !*/Discussion'
+
+I ran into (for me) unexpected behaviour with double quotes, since when I tried it in the interactive shell, the "!" made it fail ([history expansion](http://mywiki.wooledge.org/BashPitfalls#echo_.22Hello_World.21.22)). I thought "aha, it should be escaped!", did so, and did not get any error messages, but it no longer functioned as intended (as per the earlier linked page).
+
+The latter line will work everywhere, not just in environments without history expansion. I think trying a command manually before putting it into crontab is common, and this would avoid the possible user issue I ran into.
+
+----
+
+I wonder what this program (ikiwiki-calendar) is useful for. Would not it be simpler to have the [[calendar|ikiwiki/directive/calendar]] directive generate the `archive_base/year/month.mdwn` files on the fly, as are the tag pages generated by the [[tag|plugins/tag]] plugin? This solution would have the advantage of automatically generating the right calendar pages, instead of having to tell ikiwiki-calendar which years to take into account.
+
+Using this solution would mean to have the pagespec stored somewhere in the configuration. But this is already the case, as the pagespec used by [[ikiwiki-calendar]] is either set in the configuration file of the wiki, or in the crontab or whatever script used to call ikiwiki-calendar.
+
+Having done this, the only purpose of ikiwiki-calendar would be to re-generate the wiki on a daily (or whatever frequency) basis, which can be done using ikiwiki instead of ikiwiki-calendar.
+
+Did I miss something? If I am right, I offer to write the necessary patch, copied and adapted from the tag plugin, to generate the pages `archive_base/year/month.mdwn` on the fly.
+
+-- Spalax
+
+> Good spotting, `ikiwiki-calendar` predates the `add_autofile` API used to
+> autocreate tag pages and was bolted in as an easy way to create calendar
+> pages.
+>
+> It would be possible to do that inside the caneldar plugin now. Although
+> some command would still need to be run on a daily (or weekly, or
+> monthly, or yearly..) basis to have it wake up and make the new calendar
+> pages and update the displayed current day from calendar directives.
+>
+> That last is, arguably, the real point of running ikiwiki-calendar in
+> a cron job. Of course all it really does is run `ikiwiki -setup foo
+> -refresh`. --[[Joey]]
diff --git a/doc/ikiwiki-makerepo.mdwn b/doc/ikiwiki-makerepo.mdwn
index acb1211de..928440f99 100644
--- a/doc/ikiwiki-makerepo.mdwn
+++ b/doc/ikiwiki-makerepo.mdwn
@@ -4,19 +4,24 @@ ikiwiki-makerepo - check an ikiwiki srcdir into revision control
# SYNOPSIS
-ikiwiki-makerepo git|svn|monotone|darcs|cvs srcdir repository
+ikiwiki-makerepo git|svn|monotone|darcs|cvs srcdir repo
ikiwiki-makerepo bzr|mercurial srcdir
# DESCRIPTION
-`ikiwiki-makerepo` injects a `srcdir` directory, containing an ikiwiki wiki,
-into a `repository` that it creates. The repository can be created using
-any of a variety of revision control systems.
+`ikiwiki-makerepo` injects an existing `srcdir` directory, containing
+sources for an ikiwiki wiki, into revision control. It is rarely
+run directly; consider using `ikiwiki --setup /etc/ikiwiki/wiki.setup` instead
+to set up a wiki.
-Note that for mercurial and bzr, the srcdir is converted into a
-repository. There is no need to have a separate repository with mercurial
-or bzr.
+For git, the `repo` is created as a bare git repository, and the srcdir is
+made into a clone of it. (monotone and darcs are similar.)
+
+For svn and cvs, the `repo` is the centralized repository, and the `srcdir`
+is a checkout of it.
+
+For mercurial and bzr, the srcdir is the only repository set up.
For darcs, the master repo's apply hook will be preconfigured to call a
ikiwiki wrapper.
@@ -24,13 +29,13 @@ ikiwiki wrapper.
Note that for monotone, you are assumed to already have run "mtn genkey"
to generate a key.
-
# EXAMPLE
-`ikiwiki-makerepo git /var/www/wiki /home/user/wiki/`
+`ikiwiki-makerepo git /srv/web/wiki /srv/git/wiki.git/`
-The above command creates a new git repo in /home/user/wiki as well as a new git repo in the /var/www/wiki directory.
-It then initializes the /home/user/wiki git repo and makes the /var/www/wiki a clone.
+This creates a bare repository `/srv/git/wiki.git/`,
+and sets up `/srv/web/wiki` to be a clone of it, committing
+any files that already exist in that directory.
# AUTHOR
diff --git a/doc/ikiwiki/directive/map/discussion.mdwn b/doc/ikiwiki/directive/map/discussion.mdwn
index b7ac17b1a..6c2e6f1c2 100644
--- a/doc/ikiwiki/directive/map/discussion.mdwn
+++ b/doc/ikiwiki/directive/map/discussion.mdwn
@@ -23,6 +23,8 @@ Is that possible?
--Peter
+> the map directive could be made to use templates as the [[inline directive|ikiwiki/directive/inline]] does. (for the ambitious, the map functionality might even be special-cased into the inline plugin, i think) --[[chrysn]]
+
----
The site I'm trying to set up right now (not really a wiki - no public editing) is divided into topics. Topics are pages that have `\[[!meta link="/topic"]]`. Topic pages contain an index of their subpages (done with `\[[!inline]]`); the subpages are the real content. I want a map in the sidebar that lists:
diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn
index 72cfc6f56..f8494dbff 100644
--- a/doc/ikiwiki/directive/meta.mdwn
+++ b/doc/ikiwiki/directive/meta.mdwn
@@ -133,8 +133,8 @@ Supported fields:
\[[!meta redir=otherpage]]
- Optionally, a delay (in seconds) can be specified. The default is to
- redirect without delay.
+ The default is to redirect without delay.
+ Optionally, a delay (in seconds) can be specified: "delay=10"
It can also be used to redirect to an external url. For example:
diff --git a/doc/ikiwiki/directive/osm.mdwn b/doc/ikiwiki/directive/osm.mdwn
new file mode 100644
index 000000000..a2cdd667f
--- /dev/null
+++ b/doc/ikiwiki/directive/osm.mdwn
@@ -0,0 +1,71 @@
+The `osm` directive is supplied by the [[!iki plugins/osm desc=osm]] plugin.
+
+This directive inserts an OpenStreetMap map onto a page.
+It is typically combined with the [[waypoint]] directive
+to add points to the map.
+
+## examples
+
+ \[[!osm]]
+ \[[!waypoint lat="45°30N" lon="73°40W" name="My city" tag="city"]]
+
+The osm directive will display the actual map, while the waypoint
+directive adds waypoints to the map.
+
+The above can also be shortened as:
+
+ \[[!waypoint lat="45°30N" lon="73°40W" name="My city" tag="city" embed]]
+
+The tag is also taken from the tags elsewhere in the page, so the
+above is equivalent to:
+
+ \[[!waypoint lat="45°30N" lon="73°40W" name="My city" embed]]
+ \[[!tag city]]
+
+The icon is also taken from the tag if attached to the tag page as
+icon.png (default, modifiable)..
+
+## map display
+
+ * `map` - map to display, defaults to the current page
+ name in fullscreen mode, "map" otherwise
+ * `zoom` - the level to zoom to on the OSM map
+ * `loc` - lattitude and longitude of the map center
+ * `lat` - lattitude
+ * `lon` - longitude
+ * `fullscreen` - make the map take the whole screen through CSS
+ * `editable` - add edit controls in a separate layer
+ * `right` - float the map right, ignored for fullscreen
+ * `left` - float the map left (default unless fullscreen)
+ * `width` - width of the map, ignored for fullscreen
+ * `height` - height of the map, ignored for fullscreen
+
+## waypoints
+
+Waypoints can be added to any page. By default the waypoint takes the
+name of the page, which allows you to easily tag pages and make them
+appear on the central map.
+
+Waypoints, by default, show up as a image (the `icon` parameter) link
+to the main map (or the `map` parameter provided). That markup can be
+hidden with the `hidden` parameter.
+
+ * `name` - the name of this point, defaults to the page name (!) must
+ be unique, otherwise later incantation will overwrite previous
+ ones.
+ * `map` - the map to add the point to (defaults to "map")
+ * `desc` - description to embed in the map
+ * `loc` - lattitude and longitude
+ * `lat` - lattitude
+ * `lon` - longitude
+ * `tag` - the type of points, maps to an icon in the osm_types array
+ * `hidden` - do not display the link to the map (will not affect `embed`)
+ * `icon` - URL to the icon to show in the link to the map and within
+ the map
+ * `embed` - embed the map display alongside the point, in which case
+ the regular arguments to the map display can be used
+
+## Links
+
+If two pages with waypoints have a link between them, that link will
+magically show up on the map. Now how awesome is that?
diff --git a/doc/ikiwiki/directive/waypoint.mdwn b/doc/ikiwiki/directive/waypoint.mdwn
new file mode 100644
index 000000000..e301f8573
--- /dev/null
+++ b/doc/ikiwiki/directive/waypoint.mdwn
@@ -0,0 +1,6 @@
+The `waypoint` directive is supplied by the [[!iki plugins/osm desc=osm]] plugin.
+
+This directive adds a waypoint ot an OpenStreetMap map displayed
+by the [[osm]] directive. See the [[osm]] directive for examples
+and options.
+
diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn
index 96b94a163..7ede47e99 100644
--- a/doc/ikiwikiusers.mdwn
+++ b/doc/ikiwikiusers.mdwn
@@ -79,6 +79,7 @@ Projects & Organizations
* [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/)
Personal sites and blogs
========================
@@ -172,3 +173,7 @@ Personal sites and blogs
* [SolderPad Documentation](http://docs.solderpad.com)
* various sub-domains at kisikew.org ([example](https://portal.kisikew.org/))
* [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/)
diff --git a/doc/news/version_3.20111106.mdwn b/doc/news/version_3.20111106.mdwn
deleted file mode 100644
index b4ed1d101..000000000
--- a/doc/news/version_3.20111106.mdwn
+++ /dev/null
@@ -1,12 +0,0 @@
-ikiwiki 3.20111106 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * searchquery.tmpl: Track escaping change in upstream template.
- Thanks Olly Betts for review.
- * svn: Support subversion 1.7, which does not have .svn in each
- subdirectory.
- * rst: import docutils lazily, to avoid errors during ikiwiki --setup.
- Closes: #[637604](http://bugs.debian.org/637604) (Thanks, smcv)
- * Make the setup automator create YAML formatted files.
- * Fix handling of discussion page creation links to make discussion pages
- in the right place and with the right case. Broken by page case
- preservation feature added in 3.20110707."""]] \ No newline at end of file
diff --git a/doc/news/version_3.20120202.mdwn b/doc/news/version_3.20120202.mdwn
new file mode 100644
index 000000000..3a9ebeb2a
--- /dev/null
+++ b/doc/news/version_3.20120202.mdwn
@@ -0,0 +1,11 @@
+ikiwiki 3.20120202 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * mdwn: Added nodiscount setting, which can be used to avoid using the
+ markdown discount engine, when maximum compatability is needed.
+ * Switch to YAML::XS to work around insanity in YAML::Mo. Closes: #[657533](http://bugs.debian.org/657533)
+ * cvs: Ensure text files are added in non-binary mode. (Amitai Schlair)
+ * cvs: Various cleanups and testing. (Amitai Schlair)
+ * calendar: Fix strftime encoding bug.
+ * shortcuts: Fixed a broken shortcut to wikipedia (accidentially
+ made into a shortcut to wikiMedia).
+ * Various portability improvements. (Amitai Schlair)"""]] \ No newline at end of file
diff --git a/doc/plugins/comments/discussion.mdwn b/doc/plugins/comments/discussion.mdwn
index 3043b0106..227890bdd 100644
--- a/doc/plugins/comments/discussion.mdwn
+++ b/doc/plugins/comments/discussion.mdwn
@@ -203,3 +203,16 @@ wake of this:
correction follow-ups are common.
-- [[Jon]]
+
+
+---
+
+## Comment threads
+
+Any thoughts about implementing some simple threading in the comments?
+
+Or at least a reply functionality that quotes the subject/contents?
+
+-- [[iustin]]
+
+---
diff --git a/doc/plugins/contrib/googlemaps.mdwn b/doc/plugins/contrib/googlemaps.mdwn
index 953f296ab..9d21a6b7a 100644
--- a/doc/plugins/contrib/googlemaps.mdwn
+++ b/doc/plugins/contrib/googlemaps.mdwn
@@ -17,3 +17,5 @@ can be calculated automatically.
It can be [found here][3].
[3]: http://www.tahina.priv.at/hacks/googlemaps.html
+
+See also [[plugins/contrib/osm]].
diff --git a/doc/plugins/osm.mdwn b/doc/plugins/osm.mdwn
new file mode 100644
index 000000000..040d175ca
--- /dev/null
+++ b/doc/plugins/osm.mdwn
@@ -0,0 +1,31 @@
+[[!template id=plugin name=osm author="Blars Blarson, Antoine Beaupré"]]
+[[!tag type/special-purpose todo/geotagging]]
+
+## Openstreetmap/Openlayers support for ikiwiki
+
+This plugin provides simple Openstreetmap/Openlayers support for ikiwiki.
+It can embed Openstreetmap viewports within a page or link to a bigger map
+that will have multiple markers, generated with a KML (or CSV, or GeoJSON)
+datafile of markers based on the different calling pages. Multiple distinct
+maps on a single wiki are supported.
+
+You will need the [[!cpan XML::Writer]] perl module to write KML files,
+which is the default mode of operation. GeoJSON files can also be generated
+if the [[!cpan JSON]] perl module is installed.
+
+This provides the [[ikiwiki/directive/waypoint]] and [[ikiwiki/directive/osm]] directives.
+
+---
+
+The plugin was originally written by
+[[the techno-viking|http://techno-viking.com/posts/ikiwiki-maps/]] and fixed up
+by [[anarcat]].
+
+See [[the Mtl-mesh
+wiki|http://mesh.openisp.ca/nodes/anarcat]] for a sample of what this
+plugin can do
+
+See also [[plugins/contrib/googlemaps]].
+
+This plugin would be greatly improved by
+[[todo/internal_definition_list_support]].
diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn
index b701d3662..703244947 100644
--- a/doc/plugins/po.mdwn
+++ b/doc/plugins/po.mdwn
@@ -49,15 +49,15 @@ Supported languages
`po_master_language` is used to set the "master" language in
`ikiwiki.setup`, such as:
- po_master_language => 'en|English'
+ po_master_language: en|English
`po_slave_languages` is used to set the list of supported "slave"
languages, such as:
- po_slave_languages => [ 'fr|Français',
- 'es|Español',
- 'de|Deutsch',
- ]
+ po_slave_languages:
+ - fr|Français
+ - es|Español
+ - de|Deutsch
Decide which pages are translatable
-----------------------------------
diff --git a/doc/plugins/recentchangesdiff/Discussion.mdwn b/doc/plugins/recentchangesdiff/Discussion.mdwn
deleted file mode 100644
index 55bb542f7..000000000
--- a/doc/plugins/recentchangesdiff/Discussion.mdwn
+++ /dev/null
@@ -1,20 +0,0 @@
-couldn't the diff be displayed as a popup? right now it's too bad because the diff is actually in the page, generated and downloaded, but the user can't see it. I have tried to address the issue by adding stuff to the change.tmpl template, but I may be missing something - and it doesn't quite look right:
-
- --- /usr/share/ikiwiki/templates/change.tmpl 2011-09-05 15:14:19.000000000 -0400
- +++ templates/change.tmpl 2011-10-11 13:04:37.704346964 -0400
- @@ -39,6 +39,7 @@
- </TMPL_LOOP>
- </div>
- <TMPL_IF DIFF>
- +<a href="#" onClick="document.getElementByClass('diff').style = 'block'">[[show diff|wikiicons/diff.png]]</a>
- <div class="diff">
- <pre>
- <TMPL_VAR DIFF>
-
-There are a few things wrong with this:
-
- 1. I don't like the hardcoded javascript in there, we should use [[plugins/toggle]] or something, but i am not sure how to make the this plugin depend on toggle, or if it is desirable.
- 2. it doesn't work at all: first it doesn't actually "toggle" and second the javascript somehow gets filtered out of the resulting HTML so we don't even see it
- 3. if the diffurl parameter is set in the template, we'd actually see two sets of glasses, which is silly. i tried moving the diff button upwards into the PAGES loop, but there the diffurls are file-specific, which also seem quite silly
-
-I am looking for guidance on how to improve and fix this now. --[[anarcat]] 2011-10-11
diff --git a/doc/plugins/sidebar/discussion.mdwn b/doc/plugins/sidebar/discussion.mdwn
index eb441529c..42bc6a3e1 100644
--- a/doc/plugins/sidebar/discussion.mdwn
+++ b/doc/plugins/sidebar/discussion.mdwn
@@ -3,3 +3,8 @@
I tried exactly that, namely having an inline in my sidebar to include an rss feed from some other side. I think the complete wiki rebuild should be doable every few days when a new article appears in that feed. But contrary to that warning there is no complete wiki rebuild, only the sidebar page is rebuilt by the "ikiwiki --aggregate" from cron. Is that a bug or a feature?
> It's a bug, discussed in [[bugs/transitive_dependencies]]. --[[Joey]]
+
+I needed to include inline directives into sidebars at different site sections to generate a dynamically updated navigation - very nice when combined with toggles - and I ran into the very same problem. I tried the map directive instead, but found I wouldn't like to re-style everything and also was missing the ability to make use of the show=title variable giving me meta titles where needed without taking the cost of rebuild with every page edit.
+
+Then I came across the tip to include the quick=yes variable with the inline directive, where it is described as not showing page titles included with the meta-directive, and I thought, well if it lets me have it only this way, maybe I can restrain from using meta titles.
+But to my surprise, even with the quick=yes variable included into the inline directive in the sidebars meta titles still are shown, no more forced rebuild when editing via cgi, which is amazing, but maybe it should be noted somewhere. One more time ikiwiki showed its bright face, thank you. --Boris
diff --git a/doc/plugins/theme.mdwn b/doc/plugins/theme.mdwn
index d2c62062b..d74784ac2 100644
--- a/doc/plugins/theme.mdwn
+++ b/doc/plugins/theme.mdwn
@@ -5,7 +5,7 @@ The theme plugin allows easily applying a theme to your wiki, by
configuring the `theme` setting in the setup file with the name of a theme
to use. The themes you can choose from are all subdirectories, typically
inside `/usr/share/ikiwiki/themes/`. See [[themes]] for an overview
-of the themes included in ikiwiki.
+of the themes included in ikiwiki and the [[theme market]] for third party themes.
You can set the theme via the **theme** option in your config file (after
enabling the plugin). Refresh the wiki after changing it to see the changes.
diff --git a/doc/rcs/cvs/discussion.mdwn b/doc/rcs/cvs/discussion.mdwn
index e10892e7d..fdd2fbfd4 100644
--- a/doc/rcs/cvs/discussion.mdwn
+++ b/doc/rcs/cvs/discussion.mdwn
@@ -170,3 +170,9 @@ Bugs found and fixed so far:
(ac8eab29e8394aca4c0b23a6687ec947ea1ac869)
> Merged to current head. --[[Joey]]
+
+* Return bounded output from `rcs_diff()` when asked, as the API states.
+ (6753235d98a3903364af26c0614106c47d93ae35)
+* When adding a text file under a name formerly tracked as binary,
+ fix CVS keyword substitution behavior by explicitly setting `-kkv`.
+ (e45175d5454cc72b261507260accb309f13b5e8b)
diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index 2f173677b..502bc4fec 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -1,15 +1,20 @@
# Sandbox
[[!pagestats pages="/tags/*"]]
-
+<<<<<<< HEAD
+ttt
[[!sidebar content="dfdsfsf""
This is my custom sidebar for this page.
\[[!calendar pages="posts/*"]]
"""]]
+
+asdfasdf asdfasldkfj asdf
+
[[!sidebar ]]
+
## number 2
### number 3
@@ -18,6 +23,8 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki
[[!toc levels=1 startlevel=2 ]]
+See, online editing :-p
+
Let's try this~!
w00t, how does this look on the **git** end? Well, as a commit of course.
@@ -116,6 +123,13 @@ Now we try to write a "code" block starting with a hash sign
$ another test
+Oh, let's try to do the same thing using sane syntax instead:
+
+~~~
+# test 1,2,3
+$ another test
+~~~
+
Now let's write the same block, with a bullest list preceding it.
@@ -171,3 +185,7 @@ endmodule
#<asd>
This is simple enough for now [[sandbocen]] no?
+
+ Do code tags work?
+
+test by max
diff --git a/doc/sandbox/Nyus_of_se_däi.mdwn b/doc/sandbox/Nyus_of_se_däi.mdwn
new file mode 100644
index 000000000..6205f18bd
--- /dev/null
+++ b/doc/sandbox/Nyus_of_se_däi.mdwn
@@ -0,0 +1 @@
+Sies ahr se nyus of se däi...... säi ahr väri interesting, for schur.
diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn
index 07210f9bf..722c6b141 100644
--- a/doc/shortcuts.mdwn
+++ b/doc/shortcuts.mdwn
@@ -15,7 +15,7 @@ This page controls what shortcut links the wiki supports.
* [[!shortcut name=archive url="http://web.archive.org/*/%S"]]
* [[!shortcut name=gmap url="https://maps.google.com/maps?q=%s"]]
* [[!shortcut name=gmsg url="https://groups.google.com/groups?selm=%s"]]
-* [[!shortcut name=wikipedia url="https://en.wikipedia.org/wiki/%s"]]
+* [[!shortcut name=wikipedia url="https://en.wikipedia.org/wiki/%W"]]
* [[!shortcut name=wikitravel url="https://wikitravel.org/en/%s"]]
* [[!shortcut name=wiktionary url="https://en.wiktionary.org/wiki/%s"]]
* [[!shortcut name=debbug url="http://bugs.debian.org/%S" desc="Debian bug #%s"]]
@@ -69,8 +69,10 @@ This page controls what shortcut links the wiki supports.
To add a new shortcut, use the `shortcut`
[[ikiwiki/directive]]. In the url, "%s" is replaced with the
text passed to the named shortcut, after [[!wikipedia url_encoding]]
-it, and '%S' is replaced with the raw, non-encoded text. The optional
-`desc` parameter controls the description of the link.
+it, and '%S' is replaced with the raw, non-encoded text.
+Additionally, `%W` is replaced with the text encoded just right for
+Wikipedia. The optional `desc` parameter controls the description of
+the link.
Remember that the `name` you give the shortcut will become a new
[[ikiwiki/directive]]. Avoid using a `name` that conflicts
diff --git a/doc/theme_market.mdwn b/doc/theme_market.mdwn
new file mode 100644
index 000000000..06526df1a
--- /dev/null
+++ b/doc/theme_market.mdwn
@@ -0,0 +1,11 @@
+[[!meta title="Theme Market" description="user-contributed themes for ikiwiki"]]
+
+This is a directory of user-contributed ikiwiki themes. For more information about themes, see the [[plugins/theme]] page.
+
+It is usually preferable (and more maintainable) to create a [[css]] file instead of a full theme, but sometimes the HTML produced by ikiwiki just isn't compatible with your template, so you need to modify the templates provided. This is when you need to make your own theme.
+
+Feel free to add your own [[theme|themes]] here, but first consider writing a simpler [[css]] file and adding it to the [[css market]] instead, or look at the [[themes]] shipped with ikiwiki.
+
+ * **[[AntPortal theme|https://github.com/AntPortal/ikiwiked]]**, contributed by Danny, see an example [[on the Antportal wiki|https://antportal.com/wiki/]]
+
+ * **[[Night city theme|http://anarcat.ath.cx/night_city/README/]]**, contributed by [[anarcat]], see an example [[on his homepage|http://anarcat.ath.cx/]]
diff --git a/doc/themes/discussion.mdwn b/doc/themes/discussion.mdwn
index f2fc8cadf..ce79d0f70 100644
--- a/doc/themes/discussion.mdwn
+++ b/doc/themes/discussion.mdwn
@@ -5,3 +5,5 @@ I would like to contribute a theme I created and posted on github:
For an example of the theme in action, see: [[https://antportal.com/wiki/]]
> Shouldn't we just make people post their themes in the [[themes]] page? Or maybe we should make a [[theme market]]? --[[anarcat]]
+
+> I did just that. -- [[anarcat]]
diff --git a/doc/tips/html5.mdwn b/doc/tips/html5.mdwn
index cb71c0887..b47c3fe39 100644
--- a/doc/tips/html5.mdwn
+++ b/doc/tips/html5.mdwn
@@ -14,7 +14,7 @@ The html5 support is still experimental, and may break in some browsers.
No care is taken to add backwards compatibility hacks for browsers that
are not html5 aware (like MSIE). If you want to include the javascript with
those hacks, you can edit `page.tmpl` to do so.
-[Dive Into HTML5](http://diveintohtml5.org/) is a good reference for
+[Dive Into HTML5](http://diveintohtml5.info/) is a good reference for
current compatability issues and workarounds with html5. And a remotely-loadable
JS shiv for enabling HTML5 elements in IE is available through [html5shiv at Google Code](http://code.google.com/p/html5shiv/).
diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn
index 94f0f8b4b..26eae28a5 100644
--- a/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn
+++ b/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn
@@ -16,3 +16,6 @@ This could be as simple as adding a link, fo e.g. :
+ \[[attributes/non-functional]]
You just have to create pages for each attribute you want and then pagespec could be used to filter requirements by attributes. I think something similar is used to trac bug with ikiwiki (linking to a \[[done]] page, etc.).
+
+---
+Generally speaking, I think it's always a good idea to get back to the "basics" for something, that huge and expensive tools were made for. But I'm doubtful if such a text oriented tool would really fit all needs of a requirements engineering tool... so what is your real world experience with your requirements engineering tool as described?
diff --git a/doc/todo/BrowserID.mdwn b/doc/todo/BrowserID.mdwn
new file mode 100644
index 000000000..04a9166a8
--- /dev/null
+++ b/doc/todo/BrowserID.mdwn
@@ -0,0 +1,25 @@
+Please consider providing a plugin for [BrowserID](https://browserid.org/) authentication, preferably enabled by default.
+
+Some additional information on BrowserID:
+
+- <https://github.com/mozilla/browserid/wiki/How-to-Use-BrowserID-on-Your-Site>
+- <http://identity.mozilla.com/post/7616727542/introducing-browserid-a-better-way-to-sign-in>
+- <http://identity.mozilla.com/post/7669886219/how-browserid-differs-from-openid>
+- <http://identity.mozilla.com/post/7899984443/privacy-and-browserid>
+
+> I would like to see BrowserID offered as a signin option in ikiwiki
+> right next to the buttons for common openid providers.
+>
+> As far as implementing it goes, I don't want to rely on browserid.org.
+> This means that include.js needs to be shipped with ikiwiki (or in a
+> dependency in a sane world).
+>
+> And it means that relying on a https
+> connection to browserid.org to verify the user's identity assertion
+> token is out. (Well, it's probably out anyway, since it relies on https
+> CA security as the only security in that part of the protocol.)
+>
+> This seems to need an implementation, in perl or an externally callable
+> program (haskell would be fine ;),
+> of <https://wiki.mozilla.org/Identity/BrowserID#Assertion_Verification>.
+> --[[Joey]]
diff --git a/doc/todo/Javascript_calendar.mdwn b/doc/todo/Javascript_calendar.mdwn
new file mode 100644
index 000000000..1b6eee4cf
--- /dev/null
+++ b/doc/todo/Javascript_calendar.mdwn
@@ -0,0 +1,28 @@
+[[!meta title="Javascript equivalent of plugin 'calendar'"]]
+[[!tag patch]]
+
+Hello,
+we ([[Grésille|http://www.gresille.org]]) have a calendar (built using the [[calendar|plugins/calendar]] plugin) in the sidebar of our website. This caused the whole website to be rebuilded each night, and we did not like it. So I wrote a javascript equivalent of the calendar plugin.
+
+Here are the differences compared to the [[calendar|plugins/calendar]] plugin.
+
+* Pros
+ * No need to rebuild the page containing the calendar each time day changes, or
+ a page (indexed by the calendar) is added, changed or deleted. This is
+ particularly useful if you want to have this calendar in the sidebar.
+ * Handles the case where several pages appear the same day: a popup appear to let user choose the day he wants.
+ * Smooth navigation among months.
+* Neutral
+ * Most of options are defined in Ikiwiki's setup files instead of the options
+ of the directive.
+* Cons
+ * As a consequence, every calendar of the wiki must index the same set of pages.
+ * Javascript :( .
+
+You can see this plugin in action on [[our website|http://www.gresille.org]]. To see what happens when several pages happens on the same day, check the 15th of March 2012.
+
+I do not know how contributions are processed, but if you want to include this plugin in Ikiwiki, I made a copy of Ikiwiki repository, with this new plugin (as well as the documentation for the plugin and the directive).
+
+ git clone http://spalax.homedns.org/git/ikiwiki
+
+-- Spalax
diff --git a/doc/todo/allow_TMPL__95__LOOP_in_template_directives.mdwn b/doc/todo/allow_TMPL__95__LOOP_in_template_directives.mdwn
new file mode 100644
index 000000000..1aafb173b
--- /dev/null
+++ b/doc/todo/allow_TMPL__95__LOOP_in_template_directives.mdwn
@@ -0,0 +1,260 @@
+[[!tag patch todo]]
+
+[[!template id="note" text="""
+Simply copied this from my website
+[[http://www.camco.ie/code/ikiwiki,3.20120202,20120313a/]]
+feel free to reformat / delete"""]]
+
+The following re-write allows for multiple definitions of the
+same tag value in a template definition. This, in turn, allows
+us to use TMPL_LOOPS in our template directives; all-be-it in a
+rather limited way.
+
+I would, personally, only use this feature for very basic loops
+and, although nested loops *might* be possible (with a little
+more tinkering) it think any attempt would be better served by
+[[Kathyrn Anderson's|http://www.katspace.org/]] [[field et
+al.|http://ikiwiki.info/plugins/contrib/field/]] plugin.
+
+It *is* (primarily) intended to allow insertion of organised CSS
+blocks (i.e. `<div>`) through template directives (since i can't
+seem to get HTML and Markup to mix the way I want).
+
+[[!template id="note" text="""
+Apologies for the re-write. I struggle reading perl code that
+I didn't write and (probably too often) re-format to reduce my
+head-aches. Anyway it didn't make sense to post the patch since
+everything's changed now.
+"""]]
+
+NB: this *should* be 100% backwards compatible.
+
+# `lib/perl5/IkiWiki/Plugin/template.pm`
+
+[[!format perl """
+
+ #!/usr/bin/perl
+ # Structured template plugin.
+ package IkiWiki::Plugin::template ;
+
+ use warnings ;
+ use strict ;
+ use IkiWiki 3.00 ;
+ use Encode ;
+
+ sub mktmpl_hash( $ ; $ ; @ ) ;
+ # declare to supress warning in recursive call
+ sub mktmpl_hash( $ ; $ ; @ )
+ # make hash for the template, filling
+ # values from the supplied params
+ {
+ my $template = shift( @_ )
+ || error( "mktmpl_hash: no template provided" ) ;
+ my $param_src = shift( @_ )
+ || error( "mktmpl_hash: no parameters" ) ;
+
+ my $path ;
+ if( $#_ > 0 )
+ {
+ $path = [ @_ ] ;
+ } else {
+ $path = shift(@_) || [] ;
+ } ;
+
+ my %params ;
+
+ my @path_vars ;
+ if( $#{$path} < 0 )
+ {
+ @path_vars = $template->query() ;
+ } else {
+ @path_vars = $template->query( loop => $path ) ;
+ } ;
+
+ foreach my $var ( @path_vars )
+ {
+ push( @{$path}, $var ) ;
+ my $param_type = $template->query( name => $path ) ;
+ if( $param_type eq 'VAR' )
+ {
+ my @var_path = split( /_/, $var ) ;
+ if( $var_path[0] ne '' )
+ {
+ $path->[-1] = join( '_', @var_path[1..$#var_path] )
+ if( $var_path[0] eq 'raw' ) ;
+ $params{$var} = shift( @{$param_src->{$path->[-1]}} )
+ || return(undef) ;
+ } ;
+ } elsif( $param_type eq 'LOOP' )
+ {
+ $params{$var} = [] ;
+ push( @{$params{$var}}, $_ )
+ while( $_ = mktmpl_hash($template,$param_src,$path) ) ;
+ } ;
+ pop( @{$path} ) ;
+ } ;
+ return( \%params ) ;
+ } ;
+
+ sub proc_tmpl_hash( $ ; $ ; $ ; $ ) ;
+ # declare to supress warning in recursive call
+ sub proc_tmpl_hash( $ ; $ ; $ ; $ )
+ # walk the hash, preprocess and
+ # convert to html
+ {
+ my $tmpl_hash = shift( @_ ) ;
+ my $page = shift( @_ ) ;
+ my $destpage = shift( @_ ) ;
+ my $scan = shift( @_ ) ;
+ foreach my $key ( keys(%{$tmpl_hash}) )
+ {
+ unless( ref($tmpl_hash->{$key}) )
+ # here we assume that
+ # any reference is an
+ # array and allow it to
+ # fail if that's false
+ {
+ $tmpl_hash->{$key} =
+ IkiWiki::preprocess(
+ $page,
+ $destpage,
+ $tmpl_hash->{$key},
+ $scan ) ;
+ my @key_path = split( /_/, $key ) ;
+ $tmpl_hash->{$key} =
+ IkiWiki::htmlize(
+ $page,
+ $destpage,
+ pagetype($pagesources{$page}),
+ $tmpl_hash->{$key}, )
+ unless( $key_path[0] eq 'raw' ) ;
+ } else {
+ proc_tmpl_hash( $_, $page, $destpage, $scan )
+ foreach( @{$tmpl_hash->{$key}} ) ;
+ } ;
+ } ;
+ } ;
+
+ # "standard" ikiwiki definitions / hooks
+
+ sub import
+ {
+ hook( type => "getsetup",
+ id => "template",
+ call => \&getsetup ) ;
+ hook( type => "preprocess",
+ id => "template",
+ call => \&preprocess,
+ scan => 1 ) ;
+ } ;
+
+ sub getsetup()
+ {
+ return(
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ section => "widget",
+ }, ) ;
+ } ;
+
+ sub preprocess( @ )
+ {
+ # first process arguments into arrays of values
+ my %params ;
+
+ my( $key, $value ) ;
+ while( ($key,$value)=splice(@_,0,2) )
+ {
+ if( exists($params{$key}) )
+ {
+ push( @{$params{$key}}, $value ) ;
+ } else {
+ $params{$key} = [ $value ] ;
+ } ;
+ } ;
+
+ # set context
+ my $scan = ! defined( wantarray() ) ;
+ # This needs to run even in scan
+ # mode, in order to process links
+ # and other metadata included via
+ # the template.
+
+ # check for critical values
+ if( ! exists($params{id}) )
+ {
+ error( gettext("missing id parameter") ) ;
+ } ;
+
+ # set some convenience variables
+ my $id = $params{id}->[$#{$params{id}}] ;
+ my $page = $params{page}->[$#{$params{page}}] ;
+ my $destpage = $params{destpage}->[$#{$params{destpage}}] ;
+ # ... and an essential one for the production pass
+ $params{basename} = [ IkiWiki::basename($page) ] ;
+
+ # load the template
+ my $template ;
+ eval {
+ $template =
+ template_depends( $id, $page,
+ blind_cache=>1 ) ;
+ # The bare id is used, so
+ # a page templates/$id can
+ # be used as the template.
+ } ;
+ if( $@ )
+ {
+ error(
+ sprintf(
+ gettext("failed to process template %s"),
+ htmllink(
+ $page,
+ $destpage,
+ "/templates/$id")
+ )." $@"
+ ) ;
+ } ;
+
+ # create and process the parameters
+ my $tmpl_hash = mktmpl_hash( $template, \%params ) ;
+ proc_tmpl_hash( $tmpl_hash, $page, $destpage, $scan ) ;
+ # ... and load the template with the values
+ $template->param( $tmpl_hash ) ;
+
+ # return the processed page chunk
+ return( IkiWiki::preprocess($page,
+ $destpage,
+ $template->output(),$scan)
+ ) ;
+ } ;
+
+ 1 ;
+
+"""]]
+
+## sample template
+
+ # <TMPL_VAR HEADER0>
+
+ <table>
+ <TMPL_LOOP TEST0>
+ <tr>
+ <td><TMPL_VAR DATA0></td>
+ <td><TMPL_VAR DATA1></td>
+ </tr>
+ </TMPL_LOOP>
+ </table>
+
+## sample iki page
+
+ \[[!meta title="this is my loops page"]]
+
+ \[[!template id="loops"
+ header0="this is a table"
+ data0="cell0:0"
+ data1="cell0:1"
+ data0="cell1:0"
+ data1="cell1:1"
+ ]]
diff --git a/doc/todo/be_more_selective_about_running_hooks.mdwn b/doc/todo/be_more_selective_about_running_hooks.mdwn
new file mode 100644
index 000000000..70a1cb7a2
--- /dev/null
+++ b/doc/todo/be_more_selective_about_running_hooks.mdwn
@@ -0,0 +1,68 @@
+[[!template id=gitbranch branch=chrismgray/exclusive-hooks author="[[chrismgray]]"]]
+
+Sometimes plugins register a function with `hook`, but they only want
+the function called with the content that they know how to deal with.
+Normally, this means that they call `pagetype` first thing in the
+function, determine if they know how to deal with the content, and
+only do anything if they do.
+
+> So, I can't find any plugins shipped with ikiwiki that actually do that.
+> Scan hooks are only ever passed the content of actual wiki pages, and
+> so unless a scan hook cares whether a page is written in markdown or
+> something else, it has no reason to care what the pagetype is. (Same for
+> linkify.) --[[Joey]]
+
+>> My [[org-mode|todo/org_mode]] external plugin (which will never
+>> really make sense to include with ikiwiki I think) does this. I
+>> think that most plugins defining alternate wiki syntaxes would as
+>> well. --[[chrismgray]]
+
+This is a bit wasteful in itself, but for external plugins, it's
+really bad. For functions like `scan` and `linkify`, where the entire
+page is sent back and forth over `stdout` and `stdin`, it really slows
+things down.
+
+Thus, I propose that there be a new optional parameter to `hook` that
+tells it that the function should only be called for files whose type
+is the same as the id of the plugin calling `hook`. I have called
+this parameter `exclusive` in my branch, but this might not be the
+best name.
+
+[[!tag patch]]
+
+> It's an interesting idea, but it might be more useful if it was more
+> generalized, say, by making it a filter, where the parameter is a regexp.
+>
+> --[[KathrynAndersen]]
+
+>> Would it make more sense as a pagespec? That might be a bit more hard
+>> to implement, but would certainly fix the naming issue.
+>>
+>> --[[chrismgray]]
+
+>>> Considering where it would be called, a pagespec might be overkill. --[[KathrynAndersen]]
+
+>>>> Pagespecs have some overhead themselves. Probably less than shipping
+>>>> the page content over stdio.
+>>>>
+>>>> Rather than putting filtering in the core of ikiwiki, I can think
+>>>> of two options. One is to make the main plugin a perl plugin, and
+>>>> have it call functions that are provided by another, external plugin.
+>>>> This is assuming you're using the other language because something
+>>>> is easy to do in it, not to avoid writing perl.
+>>>>
+>>>> Or, the external plugin interface could provide a version of `hook()`
+>>>> that does not pass the content parameter, but saves a copy that
+>>>> the plugin could request with a later rpc call. Assuming that
+>>>> it's really the overhead of serializing the page content, that's
+>>>> the problem, and not just the general overhead of making rpc calls
+>>>> for every page.. --[[Joey]]
+
+>>>>> Since the argument to `hook` is optional, the pagespec is only
+>>>>> interpreted if it is given. So there is no extra overhead
+>>>>> (beyond an unused `if` branch) in 99% of the cases.
+>>>>>
+>>>>> Rewriting the external plugin's shim using Perl is a good idea,
+>>>>> and one that I wish I had thought of earlier. On the other
+>>>>> hand, it doesn't set a great precedent about the usability of
+>>>>> external plugins. --[[chrismgray]]
diff --git a/doc/todo/do_not_make_links_backwards.mdwn b/doc/todo/do_not_make_links_backwards.mdwn
new file mode 100644
index 000000000..55db32b4f
--- /dev/null
+++ b/doc/todo/do_not_make_links_backwards.mdwn
@@ -0,0 +1,88 @@
+[[!template id=gitbranch branch=anarcat/backwards_links author="[[anarcat]]"]]
+
+I understand this may be a bit provocative, but I strongly feel that ikiwiki linking rules are backwards. I come from the world of wikis like MoinMoin and [[plugins/contrib/mediawiki]], where you use `\[[link|description]]`. The defacto wiki markup "[[plugins/creole]]" also uses that convention, as does raw HTML (href comes first!). Ikiwiki doesn't: here we need to use `\[[description|link]]`.
+
+Everytime i come back to ikiwiki, i need to bend my mind backwards to create *proper* links. I understand that `\[[description|link]]` is more inline with Markdown's `[description](link)` approach, but in my mind it is too much of a problem for third part plugins to be a proper justification. For example, the [[plugins/creole]] plugin works pretty much as expected *expect* for links, because it can't override ikiwiki's internal link parser. For me that's a huge inconsistency that should be fixed.
+
+If there is an agreement within the community that we can change that, I am ready to work on a migration script or even a configuration variable... -- [[anarcat]]
+
+Dev notes
+---------
+
+I started looking into this, after encouraging words from Joey ("very long term roadmap", AKA "if someone does it"). It turns out it is less deeply rooted than i thought in the core of ikiwiki; everything being a plugin and all, this is also a plugin ([[plugins/link]]).
+
+The following needs to be done:
+
+ 1. the `link_regexp` variable needs to be turned backwards (or frontwards, if you like :P) (./) added an option for this, working!
+ 2. a config setting need to be added to the `link` plugin so that we can choose if we want backwards links or not (./) `links_direction`, how does that sound? I have changed that from `backwards_links` to be more neutral. 'rtl' means `\[[link|text]]` and 'ltr' means `\[[text|link]]`
+ 3. a (solid!) parser needs to be written for [[ikiwiki-transition]] to change the actual links (if necessary) (./) done!
+ 4. rewrite tests to take into account the two syntaxes (!) would be done when we migrate to the syntax
+ 5. deal with underlays (./) i wrote a script to convert it to markdown
+
+Discussion
+----------
+
+> It's not at all obvious to me that `rtl` should mean "link before description"
+> and not the other way round. Perhaps `wikilink_text_first` => `1` for the historical
+> IkiWiki syntax or `0` for the Creole/Mediawiki syntax? --[[smcv]]
+>
+> > A friend made the argument that it is more natural for a human to read the `text` then `link`, as the link is less important. Since we (occidental languages) read left to right, I felt this was appropriate. I also blindly assumed that it would "feel" also appropriate for right to left languages (arabic, hebrew, etc) to have those links backwards, and those languages are generally named "right to left".
+> >
+> > Originally, I named that parameter `backwards_links`, but then it wouldn't make sense in the long term, and isn't exactly neutral: it assume the current way is backwards! Your suggestion is interesting however, but I don't think the rtl/ltr nomenclature is problematic, with proper documentation of course... --[[anarcat]]
+
+There's a caveat: we can't have a per-wiki backwards_links option, because of the underlay, common to all wikis, which needs to be converted. So the option doesn't make much sense. Not sure how to deal with this... Maybe this needs to be at the package level? --[[anarcat]]
+
+> I've thought about adding a direction-neutral `\[[!link]]` directive -
+> see [[link plugin perhaps too general?]] for details. The basewiki
+> could use `\[[!link to=b desc=a]]` whenever it needs `\[[a|b]]`-style
+> links, maybe? --[[smcv]]
+
+>> It could, but it would be a pain to remember to do that.
+>>
+>> I feel that this should probably be a flag day transition because
+>> otherwise there will be a lot of variation between how different
+>> ikiwikis handle links, which is even worse than the current variation
+>> between ikiwiki and other wikis!
+>>
+>> There are quite likely ikiwiki page generators that build wikilinks
+>> too. One that's part of ikiwiki itself is `change.tmpl`. There may be
+>> others... --[[Joey]]
+
+>>> Agreed that it would be cleaner to just change everything, even though the transition might be painful.
+
+>>> Another interim option might be to change the basewiki links to be just \[[link to whatever]] without having a description.
+>>> That style of link would work whether the link style was "backwards" or "forwards". Unfortunately it could make some links less readable; after all, there is a reason why one wants to be able to change the link text! But I don't know what proportion of the links are like that. It's a thought, anyway.
+>>> --[[KathrynAndersen]]
+
+>>> Another option for internal links is to just use the regular markdown links instead of `\[[text|link]]` markup, that way it works regardless. Then the documentation for the link plugin just has to state both syntaxes in a safe manner.
+>>> I also agree that we should just switch in one shot, although I am worried this means this could be postponed indefinitely.--[[anarcat]]
+
+>>>> I have done just that in my branch: now the underlay only uses wikilinks in the wikilink page, elsewhere regular markdown links are used. I haven't converted the whole of the doc/ directory however, that would be left to the migration. I have written a ikiwik-transition tool to migrate from wikilink to markdown while i was there. --[[anarcat]]
+
+----
+
+FWIW, I think this change may well be painful, but is a good idea. I can never remember which way around it should be.
+Rather like USB plugs, I invariably have to try both ways. — [[Jon]]
+
+The bikeshed color should be ...
+--------------------------------
+
+...[blue](http://blue.bikeshed.org/) of course. :) Just to make things clear here, the "bikeshedding" potential is absolutely huge here. right to left? left to right? who's right? how could we even decide this?
+
+I think we can approach this rationnally:
+
+ 1. left to right (text then link) can be considered more natural, and should therefore be supported
+ 2. it is supported in markdown using regular markdown links. in the proposed branch, the underlay wikilinks are converted to use regular markdown links
+ 3. ikiwiki links break other markup plugins, like mediawiki and creole, as those work right to left.
+ 4. those are recognized "standards" used by other popular sites, like Wikipedia, or any wiki supporting the Creole markup, which is [most wikis](http://www.wikicreole.org/wiki/Engines)
+
+Therefore, to respect interoperability and [POLA](https://en.wikipedia.org/wiki/Principle_of_least_astonishment), ikiwiki should respect that convention and reverse the way links are parsed by the link plugin, or move that functionality into creole/mediawiki modules, and out of the main core, which I do not think can be an option.
+
+So here's a roadmap to deploy this change:
+
+ 1. the code in the backwards_links branch i am working on is tested and proven, then merged in
+ 2. a release of the 3.x branch is published with the possibility for wikis to convert to the new markup, with the notion that the older markup is deprecated
+ 3. this wiki is converted to the new markup
+ 4. 4.0 is released with the new markup enabled by default and runs ikiwiki-transition on your wiki on upgrade
+
+Note that ikiwiki-transition can be ran multiple and will convert your markup to and from rtl/ltr, without issues, so this is pretty sturdy. I think the configuration variable can be kept throughout 4.x, with the notion that it will be completely removed eventually. --[[anarcat]]
diff --git a/doc/todo/internal_definition_list_support.mdwn b/doc/todo/internal_definition_list_support.mdwn
new file mode 100644
index 000000000..4550e4e32
--- /dev/null
+++ b/doc/todo/internal_definition_list_support.mdwn
@@ -0,0 +1,40 @@
+While ikiwiki can support definition lists (`dl/dt/dd`) through [[multimarkdown|mdwn]], it doesn't actually /do/ anything with those valuable definitions. It would be interesting for third party plugins to have access to this stuff as a proper data structure. This is what allows MoinMoin to have plugins that collect that data across multiple pages and tabulate it, for example.
+
+What I am proposing here is that the [[variables exported to plugins|plugins/write/#index6h2]] be extended to include a `%dictionnaries` hash. For a markup like this:
+
+[[!format txt """
+Apple
+: Apple is a fruit
+: It's also a computer company
+Orange
+: Orange is a fruit
+"""]]
+
+would result in a data structure like this:
+
+[[!format txt """
+%dicts = {
+ 'Apple' => [ "Apple is a fruit", "It's also a computer company" ],
+ 'Orange' => [ "Orange is a fruit" ],
+}
+"""]]
+
+Now, I know I can write myself a `format()` parser that would do this on all pages in my own plugin, but then it would need to be adapted to all markups, while markup formatters should be the ones implementing this directly, if possible.
+
+My first use case for this would be to extend the [[plugins/contrib/osm]] plugin to tap into those lists, so that I could have this data in the page, visible to the user:
+
+[[!format txt """
+Longitude
+: -45.30
+Latitude
+: 73.67
+"""]]
+
+and then reuse that data in the plugin.
+
+Then for us running the humongous [[koumbit wiki|https://wiki.koumbit.net/]], it is a necessary step to be able to migrate away from MoinMoin to Ikiwiki as we have a lot of pages that tabulate information like this. For example, see our [[ServerList|https://wiki.koumbit.net/ServerList]] ([[source|https://wiki.koumbit.net/ServerList?action=raw]]), being generated from pages like [[this one|https://wiki.koumbit.net/metis.koumbit.net]].
+
+If there are no objections to that concept, I may try to start coding patches. Otherwise this is really just a [[wishlist]].
+
+> Have you looked at the [[plugins/contrib/field]] plugin? This gives you the infrastructure, and all you need is to write a plugin that parses the definition list format. Then you could use [[plugins/contrib/getfield]], [[plugins/contrib/ftemplate]] and/or [[plugins/contrib/report]] to do what you like with the data.
+> --[[KathrynAndersen]]
diff --git a/doc/todo/org_mode.mdwn b/doc/todo/org_mode.mdwn
index ef7f4dbaf..bb3b7dec0 100644
--- a/doc/todo/org_mode.mdwn
+++ b/doc/todo/org_mode.mdwn
@@ -22,14 +22,15 @@ new plugin
==========
A complete rewrite of the plugin can be found
-[here][chrismgray-rewrite]. It is an [[external|plugins/write/external]] plugin using a
+[here][chrismgray-rewrite]. It uses a
dedicated emacs instance to parse the org-mode files. Thus, it should
be a bit faster than the older plugin, as well as properly handling
[[wikilinks|ikiwiki/wikilink]] and images, two features not present in the older
-plugin.
+plugin. An example of its use can be found at my [blog][chrismgray-blog].
[org-mode]: http://orgmode.org/
[MS]: http://www.golden-gryphon.com/blog/manoj/blog/2008/06/08/Using_org-mode_with_Ikiwiki/
[example]: http://blog.tremily.us/posts/Git/notes/
[raw]: http://orgmode.org/manual/Quoting-HTML-tags.html
[chrismgray-rewrite]: https://github.com/chrismgray/ikiwiki-org-plugin
+[chrismgray-blog]: http://chrismgray.github.com
diff --git a/doc/todo/pdf_output.mdwn b/doc/todo/pdf_output.mdwn
index 29c89e4eb..a0f324054 100644
--- a/doc/todo/pdf_output.mdwn
+++ b/doc/todo/pdf_output.mdwn
@@ -18,3 +18,5 @@ Note that for example dokuwiki has a [[nice plugin|http://danjer.doudouke.org/te
>>>>> Have you tried running it with "verbose" turned on, and noting the output? That could give some clues.
>>>>> And no, the PDFs are not placed in the source dir, only in the destination dir.
>>>>> -- [[KathrynAndersen]]
+
+**Edit (17.02.2012)**: I have put an extended version of the question on webmasters.stackexchange: [[http://webmasters.stackexchange.com/questions/24905/run-external-application-on-markdown-source-in-ikiwiki]] , perhaps someone of the ikiwiki programmers is intersted in having this feature too...
diff --git a/doc/todo/provide_inline_diffs_in_recentchanges.mdwn b/doc/todo/provide_inline_diffs_in_recentchanges.mdwn
index 39a35d0c6..7e95791c6 100644
--- a/doc/todo/provide_inline_diffs_in_recentchanges.mdwn
+++ b/doc/todo/provide_inline_diffs_in_recentchanges.mdwn
@@ -1,8 +1,23 @@
+[[!template id=gitbranch branch=anarcat/inline_diffs author="[[anarcat]]"]]
+
It would rock if I could view diffs from the web without going via feeds. I envision toggle-style buttons on the recentchanges page, or just links to the CGI, which then displays the diff... --[[madduck]]
-> The diffs are actually there, enabled by the `recentchangesdiff`
+> The diffs are actually there, enabled by the [[plugins/recentchangesdiff]]
> plugin, but they are hidden in the XHTML version by the stylesheet.
> You might try a user stylesheet with `div.diff { display: block }`.
> --[[JasonBlevins]]
-[[!tag wishlist]]
+> > I have implemented this in a branch in my repository (see the side box).
+> >
+> > Unfortunately it has some issues:
+> >
+> > 1. it assumes the toggle.js code is loaded somehow
+> > 2. if the toggle code isn't loaded the diffs are displayed (which is arguably better than showing nothing since we ship the diff to the UA anyways...)
+> > 3. <del>it will show only if there's a revert URL, which is backwards, but otherwise the display is weird, with each button on its own line</del> fixed!
+> > 4. if the diffurl parameter is set in the template, we'd actually see two sets of glasses, which is silly.
+> >
+> > I feel this should nevertheless be implemented because if we're going to compile all this crap in the page anyways and send it to the client, why not allow the user to show it? I also feel that showing it by default is a lesser evil for non-javascript users.
+> >
+> > -- [[anarcat]] 2012-03-03
+
+[[!tag wishlist patch]]
diff --git a/doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn b/doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn
new file mode 100644
index 000000000..bb953ef8d
--- /dev/null
+++ b/doc/todo/recommend_libtext-markdown-discount_instead_of_depending.mdwn
@@ -0,0 +1,25 @@
+Would you consider Recommending `libtext-markdown-discount` instead of
+depending on it? It isn't available in wheezy, and the sid version is the
+wrong side of a perl transition, unfortunately. This is the only
+dependency preventing the stock sid version of ikiwiki from being
+installable on a wheezy host. -- [[Jon]]
+
+> That's a temporary problem. Actually, I just checked and it's already
+> resolved; discount is in testing now, as is the latest ikiwiki.
+>
+> Ikiwiki depends on enough perl modules
+> to make sure it will work, and since it uses discount by default,
+> it needs to depend on it. If I make the dependency on
+> `libtext-markdown-discount-perl | libtext-markdown-perl',
+> then users will not automatically transition to using discount, which
+> I want them to do. [[done]] --[[Joey]]
+
+>> Sorry, I made a mistake in the phrasing of my original request. It's
+>> not installable on *squeeze*, which is what I care about, rather than
+>> *wheezy*. Someone needs to backport `libtext-markdown-discount` I
+>> guess. — [[Jon]]
+
+>>> For squeeze, it will be appropriate for an ikiwiki backport to
+>>> still depend on the old markdown. Although a discount backport would be
+>>> nice! I don't want the current ikiwiki to be held back by requirement
+>>> that it be installable as-is on squeeze. --[[Joey]]
diff --git a/doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn b/doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn
index b6495194a..e19ceaa8f 100644
--- a/doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn
+++ b/doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn
@@ -55,3 +55,7 @@ href="http://jaspervdj.be/hakyll">Hakyll</a>?
>> dependency stuff. -- [[tychoish]]
>>> (nods) Which is why I suggested it. I'm not sure whether it would be easier to "bolt on" those things than static compilation, but it could be worth looking at, at least. -- [[KathrynAndersen]]
+
+-----
+
+Rather than coding plugins for the Perl ikiwiki in Haskell, I wonder how easily a Haskell ikiwiki could still support plugins written in Perl? The (old and apparently stale) [HsPerl5](http://hackage.haskell.org/package/HsPerl5) package might provide a helpful starting point there. -- [[JoshTriplett]]
diff --git a/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn b/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn
index f6ccaf538..b07ea33f1 100644
--- a/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn
+++ b/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn
@@ -4,4 +4,50 @@ Having a `sort=` parameter for the map plugin/directive would be real nice; like
I may hack one in from `inline` if it seem within my skill level.
+> this could leverage the [[sorting mechanism|ikiwiki/pagespec/sorting]] already in place. as it's not sorting a flat list, there's a number of different ways to sort, which should be configurable imo.
+>
+> as an example, i'll consider pages created in the sequence c/1, a, b, c, a/1, c/2.
+>
+> sorting could:
+>
+> * sort within each level:
+>
+> sorting order of child nodes would only matter internally in the groups
+>
+> that would create a (a/1) b c (c/1 c/2) sequence in our example.
+>
+> * sort by maximum
+>
+> the highest ranking page in a group would pull the parent to its own position
+>
+> that would create b a (a/1) c (c/1 c/2).
+>
+> * sort by minimum
+>
+> the lowest ranking page in a group would pull the parent to its own position
+>
+> here, that would give c (c/1 c/2) a (a/1) b
+>
+> * forced sequence
+>
+> all deepest-level items are forced to their positions, even if that means their parents are repeated at positions where they wouldn't occur naturally. parent nodes that don't have child nodes that occur directly before or after them are shown without the child nodes.
+>
+> that'd be c (c/1) a b c a (a/1) c (c/2) in our example.
+>
+> admittedly, the use cases for that are not too obvious, but think of a travel diary, for example, where you'd have the entries chronologically but grouped by the country you've visited. when you visit the same country twice, it should show up twice too.
+>
+> --[[chrysn]]
+
+------
+
+> i now do have two thirds of the solution:
+>
+> * i've patched the map plugin to accept a sort parameter (as usual in pagespec directives) and a strategy parameter, which is used to choose how the tree should be sorted. it turned out that the changes required were minimal; even precautions for having to display a node's parents although they are not supposed to be shown by themselves are present (they're decorated with the mapparent css class).
+> * i've implemented algorithms for the described strategies, but in python -- i tried in perl, but i'm not versed well enough in perl for such things. the "force" strategy works in perl but i'm afraid it depends on more than the perl sort algorithm to be just stable.
+> * if someone could port the three strategies implemented in python to perl, we'd have a complete patch for this.
+>
+> when comparing the implementation to my notes above, you'll see that there is a minor difference in the "force" algorithm -- my code doesn't generate the "parent" entries (**c** (c/1) a b c **a** (a/1) **c** (c/2) in the example), but they're generated by the already existing output code.
+>
+> the code can be found at [[incomplete_patch.pl.pl]] and [[python_algorithms.py]]. --[[chrysn]]
+
[[!tag wishlist]]
diff --git a/doc/todo/sort_parameter_for_map_plugin_and_directive/incomplete_patch.pl.pl b/doc/todo/sort_parameter_for_map_plugin_and_directive/incomplete_patch.pl.pl
new file mode 100644
index 000000000..1297be663
--- /dev/null
+++ b/doc/todo/sort_parameter_for_map_plugin_and_directive/incomplete_patch.pl.pl
@@ -0,0 +1,77 @@
+diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm
+index 38f090f..6b884cd 100644
+--- a/IkiWiki/Plugin/map.pm
++++ b/IkiWiki/Plugin/map.pm
+@@ -25,6 +25,42 @@ sub getsetup () {
+ },
+ }
+
++sub strategy_byparents (@) {
++ # Sort by parents only
++ #
++ # With this strategy, children are sorted *under* their parents
++ # regardless of their own position, and the parents' positions are
++ # determined only by comparing the parents themselves.
++
++ # FIXME this is *not* what's described above, but the old behavior (for
++ # testing/comparison)
++ use sort 'stable';
++ my (@sequence,) = @_;
++ @sequence = sort @sequence;
++ return @sequence;
++}
++
++sub strategy_forcedsequence (@) {
++ # Forced Sequence Mode
++ #
++ # Using this strategy, all entries will be shown in the sequence; this
++ # can cause parents to show up multiple times.
++ #
++ # The only reason why this is not the identical function is that
++ # parents that are sorted between their children are bubbled up to the
++ # top of their contiguous children to avoid being repeated in the
++ # output.
++
++ use sort 'stable';
++
++ my (@sequence,) = @_;
++ # FIXME: i'm surprised that this actually works. i'd expect this to
++ # work with bubblesort, but i'm afraid that this may just not yield the
++ # correct results with mergesort.
++ @sequence = sort {($b eq substr($a, 0, length($b))) - ($a eq substr($b, 0, length($a)))} @sequence;
++ return @sequence;
++}
++
+ sub preprocess (@) {
+ my %params=@_;
+ $params{pages}="*" unless defined $params{pages};
+@@ -37,8 +73,11 @@ sub preprocess (@) {
+
+ # Get all the items to map.
+ my %mapitems;
++ my @mapsequence;
+ foreach my $page (pagespec_match_list($params{page}, $params{pages},
+- deptype => $deptype)) {
++ deptype => $deptype,
++ sort => exists $params{sort} ? $params{sort} : "title")) {
++ push(@mapsequence, $page);
+ if (exists $params{show} &&
+ exists $pagestate{$page} &&
+ exists $pagestate{$page}{meta}{$params{show}}) {
+@@ -88,7 +127,15 @@ sub preprocess (@) {
+ $map .= "<ul>\n";
+ }
+
+- foreach my $item (sort keys %mapitems) {
++ if (!exists $params{strategy} || $params{strategy} eq "parent") {
++ @mapsequence = strategy_byparents(@mapsequence);
++ } elsif ($params{strategy} eq "forced") {
++ @mapsequence = strategy_forcedsequence(@mapsequence);
++ } else {
++ error("Unknown strategy.");
++ }
++
++ foreach my $item (@mapsequence) {
+ my @linktext = (length $mapitems{$item} ? (linktext => $mapitems{$item}) : ());
+ $item=~s/^\Q$common_prefix\E\///
+ if defined $common_prefix && length $common_prefix;
diff --git a/doc/todo/sort_parameter_for_map_plugin_and_directive/python_algorithms.py b/doc/todo/sort_parameter_for_map_plugin_and_directive/python_algorithms.py
new file mode 100644
index 000000000..ccee8185d
--- /dev/null
+++ b/doc/todo/sort_parameter_for_map_plugin_and_directive/python_algorithms.py
@@ -0,0 +1,81 @@
+testdata = "c/3 a b d b/1 c/1 c/2/x c/2 c".split(" ")
+
+def strategy_byearlychild(sequence):
+ """Sort by earliest child
+
+ When this strategy is used, a parent is displayed with all its children as
+ soon as the first child is supposed to be shown.
+
+ >>> strategy_byearlychild(testdata)
+ ['c', 'c/3', 'c/1', 'c/2', 'c/2/x', 'a', 'b', 'b/1', 'd']
+ """
+
+ # first step: pull parents to top
+ def firstchildindex(item):
+ childindices = [i for (i,text) in enumerate(sequence) if text.startswith(item + "/")]
+ # distinction required as min(foo, *[]) tries to iterate over foo
+ if childindices:
+ return min(sequence.index(item), *childindices)
+ else:
+ return sequence.index(item)
+ sequence = sorted(sequence, key=firstchildindex)
+
+ # second step: pull other children to the start too
+ return strategy_byparents(sequence)
+
+def strategy_byparents(sequence):
+ """Sort by parents only
+
+ With this strategy, children are sorted *under* their parents regardless of
+ their own position, and the parents' positions are determined only by
+ comparing the parents themselves.
+
+ >>> strategy_byparents(testdata)
+ ['a', 'b', 'b/1', 'd', 'c', 'c/3', 'c/1', 'c/2', 'c/2/x']
+ """
+
+ def partindices(item):
+ return tuple(sequence.index(item.rsplit('/', i)[0]) for i in range(item.count('/'), -1, -1))
+
+ return sorted(sequence, key=partindices)
+
+def strategy_forcedsequence(sequence):
+ """Forced Sequence Mode
+
+ Using this strategy, all entries will be shown in the sequence; this can
+ cause parents to show up multiple times.
+
+ The only reason why this is not the identical function is that parents that
+ are sorted between their children are bubbled up to the top of their
+ contiguous children to avoid being repeated in the output.
+
+ >>> strategy_forcedsequence(testdata)
+ ['c/3', 'a', 'b', 'd', 'b/1', 'c', 'c/1', 'c/2', 'c/2/x']
+ """
+
+ # this is a classical bubblesort. other algorithms wouldn't work because
+ # they'd compare non-adjacent entries and move the parents before remote
+ # children. python's timsort seems to work too...
+
+ for i in range(len(sequence), 1, -1):
+ for j in range(1, i):
+ if sequence[j-1].startswith(sequence[j] + '/'):
+ sequence[j-1:j+1] = [sequence[j], sequence[j-1]]
+
+ return sequence
+
+def strategy_forcedsequence_timsort(sequence):
+ sequence.sort(lambda x,y: -1 if y.startswith(x) else 1)
+ return sequence
+
+if __name__ == "__main__":
+ import doctest
+ doctest.testmod()
+
+ import itertools
+
+ for perm in itertools.permutations(testdata):
+ if strategy_forcedsequence(testdata[:]) != strategy_forcedsequence_timsort(testdata[:]):
+ print "difference for testdata", testdata
+ print "normal", strategy_forcedsequence(testdata[:])
+ print "timsort", strategy_forcedsequence_timsort(testdata[:])
diff --git a/doc/usage.mdwn b/doc/usage.mdwn
index 44d32a01d..427a51f3b 100644
--- a/doc/usage.mdwn
+++ b/doc/usage.mdwn
@@ -253,8 +253,10 @@ also be configured using a setup file.
Specifies a username of a user (or, if openid is enabled, an openid)
who has the powers of a wiki admin. Currently allows locking of any page,
- and [[banning|banned_users]] users; other powers may be added later.
- May be specified multiple times for multiple admins.
+ and [[banning|banned_users]] users, as well as powers granted by
+ enabled plugins (such as [[moderating comments|plugins/moderatedcomments]]
+ and [[plugins/websetup]]. May be specified multiple times for multiple
+ admins.
For an openid user specify the full URL of the login, including "http://".
diff --git a/doc/users/acathur.mdwn b/doc/users/acathur.mdwn
new file mode 100644
index 000000000..fc3768ee1
--- /dev/null
+++ b/doc/users/acathur.mdwn
@@ -0,0 +1,3 @@
+Today I finally managed to setup and use ikiwiki, the way I intended to, after thinking about it for 3 years or more!
+This's to celebrate that, and to hopefuly contributing to ikiwiki in any possible way.
+
diff --git a/doc/users/ajt.mdwn b/doc/users/ajt.mdwn
index bc47040b6..61efbf8b6 100644
--- a/doc/users/ajt.mdwn
+++ b/doc/users/ajt.mdwn
@@ -12,9 +12,9 @@ I like wikis and I'm currently in love with ikiwiki, having moved my home intran
* [iredale dot net](http://www.iredale.net/) my web server and main blog
* [ajt](http://www.perlmonks.org/index.pl?node_id=113686) my Perkmonks home node
-* [ajt](http://use.perl.org/~ajt) my use Perl home
* [ATRICKETT](http://search.cpan.org/~atrickett/) my CPAN folder
* [ajt](http://www.debian-administration.org/users/ajt) my Debian-Administration home (good site btw)
+* [ajt](http://www.blipfoto.com/ajt) by blipfoto photo blog
* [drajt](http://www.linkedin.com/in/drajt) my LinkedIn profile
* [drajt](http://www.slideshare.net/drajt) my "Slidespace" on SlideShare
* [AdamTrickett](http://www.hants.lug.org.uk/cgi-bin/wiki.pl?AdamTrickett) my wiki page on my LUG's site
diff --git a/doc/users/chrismgray.mdwn b/doc/users/chrismgray.mdwn
new file mode 100644
index 000000000..b0084830d
--- /dev/null
+++ b/doc/users/chrismgray.mdwn
@@ -0,0 +1,4 @@
+I'm Chris Gray. I have an ikiwiki-based blog at
+[[http://chrismgray.github.com]]. I wrote a plugin for
+[[org-mode|todo/org_mode]] files that is probably the first ikiwiki
+plugin written mostly in emacs lisp.
diff --git a/doc/users/iustin.mdwn b/doc/users/iustin.mdwn
new file mode 100644
index 000000000..db8cae218
--- /dev/null
+++ b/doc/users/iustin.mdwn
@@ -0,0 +1 @@
+I use ikiwiki to maintain my [personal blog](http://k1024.org/) and also for some private wikis.
diff --git a/doc/users/schmonz-web-ikiwiki.mdwn b/doc/users/schmonz-web-ikiwiki.mdwn
new file mode 100644
index 000000000..6b0dbed88
--- /dev/null
+++ b/doc/users/schmonz-web-ikiwiki.mdwn
@@ -0,0 +1 @@
+[[!meta redir=users/schmonz]]
diff --git a/doc/users/ttw.mdwn b/doc/users/ttw.mdwn
new file mode 100644
index 000000000..03caad6c6
--- /dev/null
+++ b/doc/users/ttw.mdwn
@@ -0,0 +1 @@
+n0gOoi3
diff --git a/templates/atompage.tmpl b/templates/atompage.tmpl
index e82b59827..3cdd71d1a 100644
--- a/templates/atompage.tmpl
+++ b/templates/atompage.tmpl
@@ -33,7 +33,7 @@
<id><TMPL_VAR PAGEURL></id>
</TMPL_IF>
<subtitle type="html"><TMPL_VAR FEEDDESC ESCAPE=HTML></subtitle>
-<generator uri="http://ikiwiki.info/" version="<TMPL_VAR VERSION>">ikiwiki</generator>
+<generator uri="http://ikiwiki.info/">ikiwiki</generator>
<updated><TMPL_VAR FEEDDATE></updated>
<TMPL_VAR CONTENT>
</feed>
diff --git a/underlays/attachment/ikiwiki/images/ui-bg_flat_0_aaaaaa_40x100.png b/underlays/attachment/ikiwiki/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 000000000..5b5dab2ab
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/underlays/attachment/ikiwiki/images/ui-bg_glass_55_fbf9ee_1x400.png b/underlays/attachment/ikiwiki/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 000000000..ad3d6346e
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-bg_glass_55_fbf9ee_1x400.png
Binary files differ
diff --git a/underlays/attachment/ikiwiki/images/ui-bg_glass_65_ffffff_1x400.png b/underlays/attachment/ikiwiki/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 000000000..42ccba269
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-bg_glass_65_ffffff_1x400.png
Binary files differ
diff --git a/underlays/attachment/ikiwiki/images/ui-bg_glass_75_dadada_1x400.png b/underlays/attachment/ikiwiki/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 000000000..5a46b47cb
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-bg_glass_75_dadada_1x400.png
Binary files differ
diff --git a/underlays/attachment/ikiwiki/images/ui-bg_glass_95_fef1ec_1x400.png b/underlays/attachment/ikiwiki/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 000000000..4443fdc1a
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/underlays/attachment/ikiwiki/images/ui-icons_2e83ff_256x240.png b/underlays/attachment/ikiwiki/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 000000000..45e8928e5
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/underlays/attachment/ikiwiki/images/ui-icons_454545_256x240.png b/underlays/attachment/ikiwiki/images/ui-icons_454545_256x240.png
new file mode 100644
index 000000000..7ec70d11b
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-icons_454545_256x240.png
Binary files differ
diff --git a/underlays/attachment/ikiwiki/images/ui-icons_cd0a0a_256x240.png b/underlays/attachment/ikiwiki/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 000000000..7930a5580
--- /dev/null
+++ b/underlays/attachment/ikiwiki/images/ui-icons_cd0a0a_256x240.png
Binary files differ
diff --git a/underlays/openid-selector/ikiwiki/openid/openid-jquery.js b/underlays/openid-selector/ikiwiki/openid/openid-jquery.js
index c59be1edc..056110384 100644
--- a/underlays/openid-selector/ikiwiki/openid/openid-jquery.js
+++ b/underlays/openid-selector/ikiwiki/openid/openid-jquery.js
@@ -38,7 +38,7 @@ var providers_small = {
},
wordpress: {
name: 'Wordpress',
- icon: 'https://ddgw.s3.amazonaws.com/wordpress.org.ico',
+ icon: 'https://s2.wp.com/i/favicon.ico',
label: 'Enter your Wordpress.com username:',
url: 'http://{username}.wordpress.com/'
},
diff --git a/underlays/osm/ikiwiki/images/osm.png b/underlays/osm/ikiwiki/images/osm.png
new file mode 100644
index 000000000..487bf003c
--- /dev/null
+++ b/underlays/osm/ikiwiki/images/osm.png
Binary files differ
diff --git a/underlays/osm/ikiwiki/osm.js b/underlays/osm/ikiwiki/osm.js
new file mode 100644
index 000000000..7994c62fc
--- /dev/null
+++ b/underlays/osm/ikiwiki/osm.js
@@ -0,0 +1,128 @@
+// taken from http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript
+var urlParams = {};
+(function () {
+ var e,
+ a = /\\+/g, // Regex for replacing addition symbol with a space
+ r = /([^&=]+)=?([^&]*)/g,
+ d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
+ q = window.location.search.substring(1);
+
+ while (e = r.exec(q))
+ urlParams[d(e[1])] = d(e[2]);
+})();
+
+function mapsetup(divname, options) {
+ div = document.getElementById(divname);
+ if (options.fullscreen) {
+ permalink = 'permalink';
+ div.style.top = 0;
+ div.style.left = 0;
+ div.style.position = 'absolute';
+ div.style.width = '100%';
+ div.style.height = '100%';
+ }
+ else {
+ div.style.height = options.height;
+ div.style.width = options.width;
+ div.style.float = options.float;
+ permalink = {base: options.href, title: "View larger map"};
+ }
+ map = new OpenLayers.Map(divname, {
+ controls: [
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.ScaleLine(),
+ new OpenLayers.Control.Permalink(permalink)
+ ],
+ displayProjection: new OpenLayers.Projection("EPSG:4326"),
+ numZoomLevels: 18
+ });
+
+
+ map.addLayer(new OpenLayers.Layer.OSM());
+ if (options.format == 'CSV') {
+ pois = new OpenLayers.Layer.Text( "CSV",
+ { location:"/" + options.map + "/pois.txt",
+ projection: map.displayProjection
+ });
+ } else if (options.format == 'GeoJSON') {
+ pois = new OpenLayers.Layer.Vector("GeoJSON", {
+ protocol: new OpenLayers.Protocol.HTTP({
+ url: "/" + options.map + "/pois.json",
+ format: new OpenLayers.Format.GeoJSON()
+ }),
+ strategies: [new OpenLayers.Strategy.Fixed()]
+ });
+ } else {
+ pois = new OpenLayers.Layer.Vector("KML", {
+ protocol: new OpenLayers.Protocol.HTTP({
+ url: "/" + options.map + "/pois.kml",
+ format: new OpenLayers.Format.KML({
+ extractStyles: true,
+ extractAttributes: true
+ })
+ }),
+ strategies: [new OpenLayers.Strategy.Fixed()]});
+ }
+ map.addLayer(pois);
+ select = new OpenLayers.Control.SelectFeature(pois);
+ map.addControl(select);
+ select.activate();
+
+ pois.events.on({
+ "featureselected": function (event) {
+ var feature = event.feature;
+ var content = '<h2><a href="' + feature.attributes.href + '">' +feature.attributes.name + "</a></h2>" + feature.attributes.description;
+ popup = new OpenLayers.Popup.FramedCloud("chicken",
+ feature.geometry.getBounds().getCenterLonLat(),
+ new OpenLayers.Size(100,100),
+ content,
+ null, true, function () {select.unselectAll()});
+ feature.popup = popup;
+ map.addPopup(popup);
+ },
+ "featureunselected": function (event) {
+ var feature = event.feature;
+ if (feature.popup) {
+ map.removePopup(feature.popup);
+ feature.popup.destroy();
+ delete feature.popup;
+ }
+ }
+ });
+
+ if (options.editable) {
+ vlayer = new OpenLayers.Layer.Vector( "Editable" );
+ map.addControl(new OpenLayers.Control.EditingToolbar(vlayer));
+ map.addLayer(vlayer);
+ }
+
+ if (options.fullscreen) {
+ map.addControl(new OpenLayers.Control.PanZoomBar());
+ map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
+ map.addControl(new OpenLayers.Control.MousePosition());
+ map.addControl(new OpenLayers.Control.KeyboardDefaults());
+ } else {
+ map.addControl(new OpenLayers.Control.ZoomPanel());
+ }
+
+ //Set start centrepoint and zoom
+ if (!options.lat || !options.lon) {
+ options.lat = urlParams['lat'];
+ options.lon = urlParams['lon'];
+ }
+ if (!options.zoom) {
+ options.zoom = urlParams['zoom'];
+ }
+ if (options.lat && options.lon) {
+ var lat = options.lat;
+ var lon = options.lon;
+ var zoom= options.zoom || 10;
+ center = new OpenLayers.LonLat( lon, lat ).transform(
+ new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
+ map.getProjectionObject() // to Spherical Mercator Projection
+ );
+ map.setCenter (center, zoom);
+ } else {
+ pois.events.register("loadend", this, function () { map.zoomToExtent(pois.getDataExtent()); });
+ }
+}