ikiwiki/ RecentChanges

Recent changes to this wiki:

diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index b82799a..bab6feb 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -14,6 +14,9 @@ There are Polish diacritical characters: ą, ć, ę, ł, ń, ó, ś, ż, ź.
 
 Korean characters test : 한글테스트입니다.
 
+測試 
+
+
 some hindī? हिन्दी
 
 # Header

response
diff --git a/doc/plugins/amazon_s3/discussion.mdwn b/doc/plugins/amazon_s3/discussion.mdwn
index 3f8f00f..e5dcf06 100644
--- a/doc/plugins/amazon_s3/discussion.mdwn
+++ b/doc/plugins/amazon_s3/discussion.mdwn
@@ -7,3 +7,12 @@ I'm stressed to figure out any dynamic hosting I would even use that I'd care wa
 
 Any thoughts/ideas on this?  Any example ikiwiki up on Amazon?
 -- [[harningt]]
+
+> Well, I haven't needed to use S3, so I deleted my test wikis to save
+> money (pennies..).
+> 
+> The main problem is that S3 can't serve http://hostname/. You have to use
+> http://hostname/<wiki>/. This would be a problem in many situations.
+> 
+> Once google has a link to it though, it should be able to index it fine,
+> just like any other web site. --\[[Joey]

diff --git a/doc/plugins/amazon_s3/discussion.mdwn b/doc/plugins/amazon_s3/discussion.mdwn
new file mode 100644
index 0000000..3f8f00f
--- /dev/null
+++ b/doc/plugins/amazon_s3/discussion.mdwn
@@ -0,0 +1,9 @@
+Awesome idea!  With this + NearlyFreeSpeech.NET you can have a highly discounted Wiki hosted...
+
+Now... just wondering... how could this be done while keeping things such as Google pagerank/searches and such 'sane'...
+
+One 'could' host S3 under the 'www' domain and you'd be all set... but then you would probably have some ugly problems to work around if you wanted to put some other dynamic content... especially if 
+I'm stressed to figure out any dynamic hosting I would even use that I'd care was indexed...  (perhaps using JS in an ikiwiki page for some dynamic update)
+
+Any thoughts/ideas on this?  Any example ikiwiki up on Amazon?
+-- [[harningt]]

ENV can be used in the setup file to override environment variable setting, such as TZ or PATH.
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 8840758..7e64518 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -103,6 +103,12 @@ sub checkconfig () { #{{{
 		}
 	}
 
+	if (ref $config{ENV} eq 'HASH') {
+		foreach my $val (keys %{$config{ENV}}) {
+			$ENV{$val}=$config{ENV}{$val};
+		}
+	}
+
 	if ($config{w3mmode}) {
 		eval q{use Cwd q{abs_path}};
 		error($@) if $@;
diff --git a/debian/changelog b/debian/changelog
index df09e91..6e8e550 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ ikiwiki (2.47) UNRELEASED; urgency=low
     it just expanded to nothing.
   * git: Skip over signed-off-by and similar lines in commit messages
     when generating recentchanges.
+  * ENV can be used in the setup file to override environment variable
+    setting, such as TZ or PATH.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 13 May 2008 12:30:18 -0400
 
diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup
index 7813eb8..3d3c2a7 100644
--- a/doc/ikiwiki.setup
+++ b/doc/ikiwiki.setup
@@ -143,6 +143,12 @@ use IkiWiki::Setup::Standard {
 	#disable_plugins => [qw{inline htmlscrubber passwordauth openid}],
 	# To add a directory to the perl search path, use this.
 	#libdir => "/home/me/.ikiwiki/",
+	
+	# To override environment variable settings, you can list values here.
+	#ENV => {
+	#	TZ => "America/New_York",
+	#	PATH => "/home/me/bin:/usr/local/bin:/usr/bin:/bin",
+	#},
 
 	# For use with the tag plugin, make all tags be located under a
 	# base page.
diff --git a/doc/todo/configurable_timezones.mdwn b/doc/todo/configurable_timezones.mdwn
index 594cc0f..3ed5050 100644
--- a/doc/todo/configurable_timezones.mdwn
+++ b/doc/todo/configurable_timezones.mdwn
@@ -1,3 +1,5 @@
 It would be nice if the sure could set the timezone of the wiki, and have ikiwiki render the pages with that timezone.
 
 This is nice for shared hosting, and other situation where the user doesn't have control over the server timezone.
+
+> [[done]] via the ENV setting in the setup file. --[[Joey]]

diff --git a/doc/todo/configurable_timezones.mdwn b/doc/todo/configurable_timezones.mdwn
new file mode 100644
index 0000000..594cc0f
--- /dev/null
+++ b/doc/todo/configurable_timezones.mdwn
@@ -0,0 +1,3 @@
+It would be nice if the sure could set the timezone of the wiki, and have ikiwiki render the pages with that timezone.
+
+This is nice for shared hosting, and other situation where the user doesn't have control over the server timezone.

add a link to the forum
diff --git a/doc/contact.mdwn b/doc/contact.mdwn
index 1a8a0bb..37fb590 100644
--- a/doc/contact.mdwn
+++ b/doc/contact.mdwn
@@ -1,8 +1,9 @@
 The ikiwiki project strongly encourages collaboration through ikiwiki itself,
 and thus does not have a mailing list.  Anyone can create an account on
 ikiwiki's own wiki. ikiwiki provides a [[bug_tracker|bugs]], a
-[[TODO_list|TODO]], and "discussion" sub-pages for every page. ikiwiki
-developers monitor RecentChanges closely, via the webpage, email,
+[[TODO_list|TODO]], and "discussion" sub-pages for every page, as well as a
+[[forum]] for general questions and discussion. ikiwiki
+developers monitor [[RecentChanges]] closely, via the webpage, email,
 [CIA](http://cia.navi.cx), and IRC, and respond in a timely fashion.
 
 You could also drop by the IRC channel `#ikiwiki` on

exclude templates/*, which are listed in templates
diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn
index 74f4bae..f7a856e 100644
--- a/doc/plugins/orphans.mdwn
+++ b/doc/plugins/orphans.mdwn
@@ -15,6 +15,6 @@ orphans.
 Here's a list of orphaned pages on this wiki:
 
 [[orphans pages="* and !news/* and !todo/* and !bugs/* and !users/* and
-!recentchanges and !examples/* and !tips/* and !sandbox/* and
+!recentchanges and !examples/* and !tips/* and !sandbox/* and !templates/* and
 !wikiicons/* and !plugins/*"]]
 """]]

reorder
diff --git a/doc/templates/links.mdwn b/doc/templates/links.mdwn
index e7b107a..2b18bce 100644
--- a/doc/templates/links.mdwn
+++ b/doc/templates/links.mdwn
@@ -6,7 +6,7 @@
 <li>[[Setup]]</li>
 <li>[[Security]]</li>
 <li>[[Users|IkiWikiUsers]]</li>
-<li>[[Contact]]</li>
 <li>[[SiteMap]]</li>
+<li>[[Contact]]</li>
 </ul>
 </div>

add a link to the orphaned sitemap page
diff --git a/doc/templates/links.mdwn b/doc/templates/links.mdwn
index dc9d6e7..e7b107a 100644
--- a/doc/templates/links.mdwn
+++ b/doc/templates/links.mdwn
@@ -7,5 +7,6 @@
 <li>[[Security]]</li>
 <li>[[Users|IkiWikiUsers]]</li>
 <li>[[Contact]]</li>
+<li>[[SiteMap]]</li>
 </ul>
 </div>

add a link to ikiwiki-transition
diff --git a/doc/usage.mdwn b/doc/usage.mdwn
index 2df28e1..2b104bc 100644
--- a/doc/usage.mdwn
+++ b/doc/usage.mdwn
@@ -327,6 +327,7 @@ configuration options of their own.
 
 * [[ikiwiki-mass-rebuild]](8)
 * [[ikiwiki-update-wikilist]](1)
+* [[ikiwiki-transition]](1)
 
 # AUTHOR
 

add a link to the orphaned banned_ussrs page
diff --git a/doc/usage.mdwn b/doc/usage.mdwn
index 745f97c..2df28e1 100644
--- a/doc/usage.mdwn
+++ b/doc/usage.mdwn
@@ -226,8 +226,8 @@ configuration options of their own.
 
   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 of users; other powers may be added later. May be specified
-  multiple times for multiple admins.
+  and [[banning|banned_users]] users; other powers may be added later.
+  May be specified multiple times for multiple admins.
 
   For an openid user specify the full URL of the login, including "http://".
 

remove utf-8 rant; my problem was fixed in 2.46.
diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn
index c201f6e..329673e 100644
--- a/doc/index/discussion.mdwn
+++ b/doc/index/discussion.mdwn
@@ -60,34 +60,6 @@ I'm kind of at a loss how to track this down or work around it.  Any suggestions
 
 ----
 
-I had been using ikiwiki for a while without any problems. Recently, however, I'm having a problem with the web editor: accented characters are "mangled" by the wiki. For instance, if I type the character "á", it is rendered as "á". If I look (with `less`) at the html file generated by ikiwiki, I see: `<p>�<83>¡</p>` (the ? sign looks like a square in xterm). More details:
-
-* My machine's locale is en_US.utf8
-* In my ikiwiki setup file I have `locale => 'en_US.utf-8'`
-* If I edit a file in vim, add accented characters, and render the wiki from the command line, the page displays correctly. The problem only appears when using the web editor.
-* I am using perl 5.10.0.
-* The problem appears even when previewing the page; I don't have to save it. I believe this rules out any RCS misconfiguration.
-* If I edit a page with accented characters in the web editor, and then preview it without making any changes, all accented characters are mangled.
-* I updated the system's packages before the problem appeared. I didn't have time to work on my wiki for a few weeks, so I can't point out which update could be guilty.
-* I am running ikiwiki 2.44.
-
-I have googled all over the place and I can't find any mention of a similar problem, which makes me think this is a configuration problem on my end and not a bug. It likely has to do with UTF8; I am at a loss about how to fix (or even diagnose) this, though, and I'd appreciate any pointers.
-
-> More information:
-
-* I downgraded to ikiwiki 2.41 and firefox 2.0.11; the problem still appears. I know
-for sure that ikiwiki 2.41 used to work here.
-* I have upgraded to ikiwiki 2.45
-* On a page where characters are mangled, firefox reports that the charset is utf-8.
-
-> I think this leaves the upgrade to perl 5.10 as the last suspect. Unfortunately, I can't
-> easily go back to 5.8. I will probably install my distro again in another partition, but
-> that will take some time.
-> I've been unable to use my wiki for more than a week now, I'd really appreciate it if
-> someone has pointers or suggestions. Should I move this to a bug?
-
-----
-
 # Installation of selected docs (html)
 
 The latest release has around 560 files (over 2MB) in html.

More info
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index 85e6fde..f95ef2d 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -65,4 +65,37 @@ in the case where `make` fails.
 
 > I need to see it in the case where it's failing. --[[Joey]]
 
+I finally had some time to look into this again.
+
+I wiped ikiwiki off my system, and then installed version 2.41. I tried installing
+2.46 and get the same error as above, so I'll be using 2.46 below. (BTW, the debian
+page still lists 2.45 as current; I had to fiddle with the download link to get 2.46).
+
+After running `./Makefile.PL` I get:
+
+    $ perl -Iblib/lib -V
+    [bunch of lines snipped]
+      @INC:
+    blib/lib
+    [bunch of paths snipped]
+
+Running the strace:
+
+    $ strace perl -Iblib/lib -e 'use IkiWiki' 2>&1 |grep IkiWiki.pm
+
+I get a bunch of ENOENTs and then at the end:
+
+    stat64("./IkiWiki.pmc", 0xbfa2fe5c)     = -1 ENOENT (No such file or directory)
+    stat64("./IkiWiki.pm", {st_mode=S_IFREG|0644, st_size=31987, ...}) = 0
+    open("./IkiWiki.pm", O_RDONLY|O_LARGEFILE) = 3
+
+After running `make` (and having it fail as described above):
+
+    $ strace perl -Iblib/lib -e 'use IkiWiki' 2>&1 |grep IkiWiki.pm
+    stat64("blib/lib/IkiWiki.pmc", 0xbfd7999c) = -1 ENOENT (No such file or directory)
+    stat64("blib/lib/IkiWiki.pm", {st_mode=S_IFREG|0444, st_size=31901, ...}) = 0
+    open("blib/lib/IkiWiki.pm", O_RDONLY|O_LARGEFILE) = 3
+
+I don't know what is going on, but I'll run any more tests you need me to.
+
 [[done]]

Typo
diff --git a/doc/plugins/mdwn.mdwn b/doc/plugins/mdwn.mdwn
index 07b59c3..b5ce9c7 100644
--- a/doc/plugins/mdwn.mdwn
+++ b/doc/plugins/mdwn.mdwn
@@ -12,7 +12,7 @@ this plugin. The [original version of
 markdown](http://daringfireball.net/projects/markdown/) can be used, or the
 [[cpan Text::Markdown]] perl module.
 
-[[cpan Text::Markdown]] also includes a markdown varient called
+[[cpan Text::Markdown]] also includes a markdown variant called
 [multimarkdown](http://fletcherpenney.net/MultiMarkdown/), which supports
 tables, footnotes, and other new features. Multimarkdown is not enabled by
 default, but can be turned on via the `multimarkdown` option in the setup

a test
diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index cc0894f..b82799a 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -55,6 +55,10 @@ Bulleted list
        * four
         * five
 
+* a new list
+ * with sub heads
+ * like this
+
 ----
 
 [[template id=note text="this is generated by the [[plugins/haiku]] plugin"]]

mdwn: Add a multimarkdown setup file option.
diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm
index 2ffe7bc..11f3f01 100644
--- a/IkiWiki/Plugin/mdwn.pm
+++ b/IkiWiki/Plugin/mdwn.pm
@@ -17,15 +17,19 @@ sub htmlize (@) { #{{{
 
 	if (! defined $markdown_sub) {
 		# Markdown is forked and splintered upstream and can be
-		# available in a variety of incompatible forms. Support
-		# them all.
+		# available in a variety of forms. Support them all.
 		no warnings 'once';
 		$blosxom::version="is a proper perl module too much to ask?";
 		use warnings 'all';
 
-		eval q{use Markdown};
-		if (! $@) {
-			$markdown_sub=\&Markdown::Markdown;
+		if (exists $config{multimarkdown} && $config{multimarkdown}) {
+			eval q{use Text::MultiMarkdown};
+			if ($@) {
+				error(gettext("multimarkdown is enabled, but Text::MultiMarkdown is not installed"));
+			}
+			$markdown_sub=sub {
+				Text::MultiMarkdown::markdown(shift, {use_metadata => 0});
+			}
 		}
 		else {
 			eval q{use Text::Markdown};
@@ -38,11 +42,18 @@ sub htmlize (@) { #{{{
 				}
 			}
 			else {
-				do "/usr/bin/markdown" ||
-					error(sprintf(gettext("failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"), $@, $!));
-				$markdown_sub=\&Markdown::Markdown;
+				eval q{use Markdown};
+				if (! $@) {
+					$markdown_sub=\&Markdown::Markdown;
+				}
+				else {
+					do "/usr/bin/markdown" ||
+						error(sprintf(gettext("failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)"), $@, $!));
+					$markdown_sub=\&Markdown::Markdown;
+				}
 			}
 		}
+		
 		require Encode;
 	}
 	
diff --git a/debian/changelog b/debian/changelog
index e1f9fbe..ceb113a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ikiwiki (2.47) UNRELEASED; urgency=low
+
+  * mdwn: Add a multimarkdown setup file option.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 13 May 2008 12:30:18 -0400
+
 ikiwiki (2.46) unstable; urgency=low
 
   * amazon_s3: New plugin, which injects wiki pages into Amazon S3, allowing
diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup
index e855188..7813eb8 100644
--- a/doc/ikiwiki.setup
+++ b/doc/ikiwiki.setup
@@ -133,6 +133,8 @@ use IkiWiki::Setup::Standard {
 	# Attempt to make hardlinks to source files instead of copying them.
 	# Useful if the wiki contains large media files.
 	#hardlink => 1,
+	# Enable use of multimarkdown features in .mdwn files.
+	#multimarkdown => 1,
 
 	# To add plugins, list them here.
 	#add_plugins => [qw{goodstuff search wikitext camelcase
diff --git a/doc/plugins/mdwn.mdwn b/doc/plugins/mdwn.mdwn
index c7c0ac7..07b59c3 100644
--- a/doc/plugins/mdwn.mdwn
+++ b/doc/plugins/mdwn.mdwn
@@ -6,3 +6,15 @@ It uses the [[ikiwiki/markdown]] minimal markup language.
 
 This is the standard markup language used by ikiwiki, although some others
 are also available in other plugins.
+
+There are several implementations of markdown support that can be used by
+this plugin. The [original version of
+markdown](http://daringfireball.net/projects/markdown/) can be used, or the
+[[cpan Text::Markdown]] perl module.
+
+[[cpan Text::Markdown]] also includes a markdown varient called
+[multimarkdown](http://fletcherpenney.net/MultiMarkdown/), which supports
+tables, footnotes, and other new features. Multimarkdown is not enabled by
+default, but can be turned on via the `multimarkdown` option in the setup
+file. Note that multimarkdown's metadata and wikilinks features are
+disabled when it's used with ikiwiki.
diff --git a/doc/todo/Support__47__Switch_to_MultiMarkdown.mdwn b/doc/todo/Support__47__Switch_to_MultiMarkdown.mdwn
index 732de0b..2d22de2 100644
--- a/doc/todo/Support__47__Switch_to_MultiMarkdown.mdwn
+++ b/doc/todo/Support__47__Switch_to_MultiMarkdown.mdwn
@@ -30,3 +30,6 @@ MultiMarkdown would solve the BibTex request and the multiple output formats wou
 > Unless there's a way to disable a zillion of the features, please **no**. Do _not_ switch to it. One thing that I like about markdown as opposed to most other ASCII markup languages, is that it has at least a bit of moderation on the syntax (although it could be even simpler). There's not a yet another reserved character lurking behind every corner. Not so in multimarkdown anymore. Footnotes, bibliography and internal references I could use, and they do not add any complex syntax: it's all inside the already reserved sequences of bracketed stuff. (If you can even say that ASCII markup languages have reserved sequences, as they randomly decide to interpret stuff, never actually failing on illegal input, like a proper language to write any serious documentation in, would do.) But tables, math, and so on, no thanks! Too much syntax! Syntax overload! Bzzzt! I don't want mischievous syntaxes lurking behind every corner, out to get me. --[[tuomov]]
 
 > ikiwiki already supports MultiMarkdown, since it has the same API as MarkDown. So if you install it as Markdown.pm (or as /usr/bin/markdown), it should Just Work. It would also be easy to support some other extension such as mmdwn to use multimarkdown installed as MuliMarkdown.pm, if someone wanted to do that for some reason -- just copy the mdwn plugin and lightly modify. --[[Joey]]
+
+> There's now a multimarkdown setup file option that uses
+> Text::MultiMarkdown for .mdwn files. [[done]] --[[Joey]]
diff --git a/docwiki.setup b/docwiki.setup
index 0a6a866..64e5e4a 100644
--- a/docwiki.setup
+++ b/docwiki.setup
@@ -15,5 +15,6 @@ use IkiWiki::Setup::Standard {
 	syslog => 0,
 	userdir => "users",
 	usedirs => 0,
+	multimarkdown => 1,
 	add_plugins => [qw{goodstuff version haiku polygen fortune}],
 }

Added note about license (GPL)
diff --git a/doc/plugins/contrib/hnb.mdwn b/doc/plugins/contrib/hnb.mdwn
index 8352e1a..aca5058 100644
--- a/doc/plugins/contrib/hnb.mdwn
+++ b/doc/plugins/contrib/hnb.mdwn
@@ -7,6 +7,6 @@ hnb installed, since it uses the commandline interface of `hnb` program.
 
 It is roughly based on the `otl` plugin but uses `mktemp` to create temporary files since `hnb` has no "quiet" switch and otherwise the hnb version number and other as well as the output file name always would be in the output itself.
 
-For now it's available for download at <http://noone.org/hnb/hnb.pm>
+For now it's available for download at <http://noone.org/hnb/hnb.pm>. It's available under the GPL
 
 TODO: Make a switch to allow both HTML export routines of hnb (`export_html` and `export_htmlcss`) to be used.

add news item for ikiwiki 2.46
diff --git a/doc/news/version_2.41.mdwn b/doc/news/version_2.41.mdwn
deleted file mode 100644
index 2813f20..0000000
--- a/doc/news/version_2.41.mdwn
+++ /dev/null
@@ -1,66 +0,0 @@
-ikiwiki 2.41 released with [[toggle text="these changes"]]
-\[[toggleable text="""
- * [ Adeodato Simó ]
-   * Preprocessor directives generated by the shortcut plugin accept a `desc`
-     parameter that overrides the anchor text provided at shortcut definition
-     time. (Closes: #[458126](http://bugs.debian.org/458126))
- * [ martin f. krafft ]
-   * The meta plugin now allows for the robots tag to be specified without the
-     risk of it being scrubbed.
-   * Let meta.openid set X-XRDS-Location header
-   * Make makerepo set the Git merge remote.
-     branch.master.remote previously used to default to origin, which has
-     recently been changed; it now needs to be set explicitly, which this
-     patch does. Closes: #[470517](http://bugs.debian.org/470517)
-   * meta: Also generate openid2 headers.
-   * Handle SimpleXMLRPCDispatcher arg count change in python 2.5
-   * Provide XML-RPC proxy abstraction for Python plugins.
- * [ Joey Hess ]
-   * Add recentchangesdiff plugin that adds diffs to the recentchanges feeds.
-   * rcs\_diff is a new function that rcs modules should implement.
-   * Implemented rcs\_diff for git, svn, and tla (tla version untested).
-     Mercurial and monotone still todo.
-   * Support Text::Markdown::markdown, which is the spelling used by
-     version 1.0.16 of Text::Markdown.
-   * Updated Spanish translation from Victor Moral.
-   * Fix example exclude regexp. Closes: #[469691](http://bugs.debian.org/469691)
-   * Remove locking code in git rcs\_commit. I'm not sure if this was ever
-     correct, and it's certianly not correct now, since the wiki is locked
-     before rcs\_commit is ever called, and should not be unlocked by
-     rcs\_commit either.
-   * monotone: Require version 0.38 or greater, and stop using the mtnmergerc
-     option. (Brian May)
-   * Use forcebaseurl to make page previews be displayed with the html base
-     set to the destination page. This avoids need for hacks to munge the urls
-     in preview mode, which fixes several bugs.
-   * Several destpage fixes in plugins.
-   * Use absolute url for feedurl when filling out the feed templates.
-     Closes: #[470530](http://bugs.debian.org/470530)
-   * Fix expiry of old recentchanges changeset pages.
-   * French translation update. Closes: #[471010](http://bugs.debian.org/471010)
-   * external: Fix support of XML::RPC::fault.
-   * htmltidy: Pass --markup yes, in case tidy's config file disabled it.
-   * external: Add getargv and setargv methods to allow access to ikiwiki's
-     @ARGV.
-   * Correct bug in encoding of %pagestate keys, fixes edittemplate.
-   * Detect invalid pagespecs and do not merge them in add\_depends,
-     as that can result in a broken merged pagespec that matches nothing.
-   * Record new pages in %pagesources temporarily when previewing so that
-     things that need to know the page source or type can query it from there.
-     Fixes previewing of tables when creating a new page.
-   * German translation update. Closes: #[471540](http://bugs.debian.org/471540)
-   * Time::Duration is no longer used, remove from docs and recommends.
-   * Store userinfo in network byte order for easy portability.
-     (Old files will be automatically converted.)
-   * Close meta tag for redir properly.
-   * smiley: Detect smileys inside pre and code tags, and do not expand.
-   * inline: Crazy optimisation to work around slow markdown.
-   * Precompile pagespecs, about 10% overall speedup.
-   * Changed to a binary index file, written using Storable, for speed.
-   * external: Work around XML RPC's lack of support for null by passing
-     a special sentinal value.
-   * inline: Allow the "feedshow" parameter to take values greater than the
-     value for "show".
-   * Added a hardlink option in the setup file, useful if the source and
-     dest are on the same filesystem and the wiki includes large media files,
-     which would normally be copied, wasting time and space."""]]
\ No newline at end of file
diff --git a/doc/news/version_2.46.mdwn b/doc/news/version_2.46.mdwn
new file mode 100644
index 0000000..338fd66
--- /dev/null
+++ b/doc/news/version_2.46.mdwn
@@ -0,0 +1,20 @@
+News for ikiwiki 2.46:
+
+   There were some significant template changes in ikiwiki 2.42 (and 1.33.5).
+   If you have locally modified versions of the templates, they need to be
+   updated. Most notably, the editpage.tmpl has a new FIELD-SID added to it,
+   without which web editing will fail.
+
+ikiwiki 2.46 released with [[toggle text="these changes"]]
+[[toggleable text="""
+   * amazon\_s3: New plugin, which injects wiki pages into Amazon S3, allowing
+     ikiwiki to be used without a dedicated web server.
+   * aggregate: Add support for web-based triggering of aggregation
+     for people stuck on shared hosting without cron. (Sheesh.) Enabled
+     via the `aggregate\_webtrigger` configuration optiom.
+   * Add pinger and pingee plugins, which allow setting up mirrors and branched
+     wikis that automatically ping one another to stay up to date.
+   * Optimised file statting code when scanning for modified pages;
+     cut the number of system calls in half. (Still room for improvement.)
+   * Fixes for behavior changes in perl 5.10's CGI that broke utf-8 support
+     in several interesting ways."""]]
\ No newline at end of file

Fixes for behavior changes in perl 5.10's CGI
Something has changed in CGI.pm in perl 5.10. It used to not care
if STDIN was opened using :utf8, but now it'll mis-encode utf-8 values
when used that way by ikiwiki. Now I have to binmode(STDIN) before
instantiating the CGI object.
In 57bba4dac132a06729eeec809f5e1a5adf829806, I changed from decoding
CGI::Formbuilder fields to utf-8, to decoding cgi parameters before setting
up the form object. As of perl 5.10, that approach no longer has any effect
(reason unknown). To get correctly encoded values in FormBuilder forms,
they must once again be decoded after the form is set up.
As noted in 57bba4da, this can cause one set of problems for
formbuilder_setup hooks if decode_form_utf8 is called before the hooks, and
a different set if it's called after. To avoid both sets of problems, call
it both before and after. (Only remaining problem is the sheer ugliness and
inefficiency of that..)
I think that these changes will also work with older perl versions, but I
haven't checked.
Also, in the case of the poll plugin, the cgi parameter needs to be
explcitly decoded before it is used to handle utf-8 values. (This may have
always been broken, not sure if it's related to perl 5.10 or not.)
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 781974c..5fccfb4 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -77,10 +77,13 @@ sub check_canedit ($$$;$) { #{{{
 	return $canedit;
 } #}}}
 
-sub decode_cgi_utf8 ($) { #{{{
-	my $cgi = shift;
-	foreach my $f ($cgi->param) {
-		$cgi->param($f, map { decode_utf8 $_ } $cgi->param($f));
+sub decode_form_utf8 ($) { #{{{
+	my $form = shift;
+	foreach my $f ($form->field) {
+		$form->field(name  => $f,
+		             value => decode_utf8($form->field($f)),
+	                     force => 1,
+		);
 	}
 } #}}}
 
@@ -103,7 +106,6 @@ sub cgi_signin ($$) { #{{{
 	my $q=shift;
 	my $session=shift;
 
-	decode_cgi_utf8($q);
 	eval q{use CGI::FormBuilder};
 	error($@) if $@;
 	my $form = CGI::FormBuilder->new(
@@ -127,10 +129,12 @@ sub cgi_signin ($$) { #{{{
 	$form->field(name => "do", type => "hidden", value => "signin",
 		force => 1);
 	
+	decode_form_utf8($form);
 	run_hooks(formbuilder_setup => sub {
 		shift->(form => $form, cgi => $q, session => $session,
 		        buttons => $buttons);
 	});
+	decode_form_utf8($form);
 
 	if ($form->submitted) {
 		$form->validate;
@@ -161,7 +165,6 @@ sub cgi_prefs ($$) { #{{{
 	my $session=shift;
 
 	needsignin($q, $session);
-	decode_cgi_utf8($q);
 	
 	# The session id is stored on the form and checked to
 	# guard against CSRF.
@@ -197,11 +200,13 @@ sub cgi_prefs ($$) { #{{{
 		],
 	);
 	my $buttons=["Save Preferences", "Logout", "Cancel"];
-
+	
+	decode_form_utf8($form);
 	run_hooks(formbuilder_setup => sub {
 		shift->(form => $form, cgi => $q, session => $session,
 		        buttons => $buttons);
 	});
+	decode_form_utf8($form);
 	
 	$form->field(name => "do", type => "hidden", value => "prefs",
 		force => 1);
@@ -255,8 +260,6 @@ sub cgi_editpage ($$) { #{{{
 	my $q=shift;
 	my $session=shift;
 	
-	decode_cgi_utf8($q);
-	
 	my @fields=qw(do rcsinfo subpage from page type editcontent comments);
 	my @buttons=("Save Page", "Preview", "Cancel");
 	eval q{use CGI::FormBuilder};
@@ -276,10 +279,12 @@ sub cgi_editpage ($$) { #{{{
 		wikiname => $config{wikiname},
 	);
 	
+	decode_form_utf8($form);
 	run_hooks(formbuilder_setup => sub {
 		shift->(form => $form, cgi => $q, session => $session,
 			buttons => \@buttons);
 	});
+	decode_form_utf8($form);
 	
 	# This untaint is safe because titlepage removes any problematic
 	# characters.
@@ -366,6 +371,7 @@ sub cgi_editpage ($$) { #{{{
 		}
 
 		my $content=$form->field('editcontent');
+
 		run_hooks(editcontent => sub {
 			$content=shift->(
 				content => $content,
@@ -379,7 +385,7 @@ sub cgi_editpage ($$) { #{{{
 			linkify($page, $page,
 			preprocess($page, $page,
 			filter($page, $page, $content), 0, 1))));
-		
+	
 		if ($new) {
 			delete $pagesources{$page};
 		}
@@ -642,7 +648,9 @@ sub cgi (;$$) { #{{{
 		eval q{use CGI};
 		error($@) if $@;
 	
+		binmode(STDIN);
 		$q=CGI->new;
+		binmode(STDIN, ":utf8");
 	
 		run_hooks(cgi => sub { shift->($q) });
 	}
diff --git a/IkiWiki/Plugin/poll.pm b/IkiWiki/Plugin/poll.pm
index 82e862c..6edf233 100644
--- a/IkiWiki/Plugin/poll.pm
+++ b/IkiWiki/Plugin/poll.pm
@@ -4,6 +4,7 @@ package IkiWiki::Plugin::poll;
 use warnings;
 use strict;
 use IkiWiki 2.00;
+use Encode;
 
 sub import { #{{{
 	hook(type => "preprocess", id => "poll", call => \&preprocess);
@@ -78,7 +79,7 @@ sub sessioncgi ($$) { #{{{
 	my $cgi=shift;
 	my $session=shift;
 	if (defined $cgi->param('do') && $cgi->param('do') eq "poll") {
-		my $choice=$cgi->param('choice');
+		my $choice=decode_utf8($cgi->param('choice'));
 		if (! defined $choice) {
 			error("no choice specified");
 		}
diff --git a/debian/changelog b/debian/changelog
index 118a034..080de75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ ikiwiki (2.46) UNRELEASED; urgency=low
     wikis that automatically ping one another to stay up to date.
   * Optimised file statting code when scanning for modified pages;
     cut the number of system calls in half. (Still room for improvement.)
+  * Fixes for behavior changes in perl 5.10's CGI that broke utf-8 support
+    in several interesting ways.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 05 May 2008 19:34:51 -0400
 
diff --git a/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
index e09e6c2..0f045c2 100644
--- a/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
+++ b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
@@ -3,7 +3,5 @@ I don't seem to be able to vote for options that have non-ascii names, using the
 As an example, see http://test.liw.fi/testpoll/index.html: the "red", "green", and "blue" options work fine, but the "ehkä" one does not.
 --[liw](http://liw.fi/)
 
-> It's not just the poll plugin, editing a page with utf-8 will corrupt it
-> now! I wonder if this is a perl 5.10 change; it was working just fine as
-> recently as May 8th; I upgraded perl on the 9th and it's broken for me
-> now. --[[Joey]]
+> Ok, 4.5 hours of beating my head against a brick wall, and I've fixed this.
+> [[done]] --[[Joey]]

update
diff --git a/doc/todo/different_search_engine.mdwn b/doc/todo/different_search_engine.mdwn
index a6364b4..81ca475 100644
--- a/doc/todo/different_search_engine.mdwn
+++ b/doc/todo/different_search_engine.mdwn
@@ -67,7 +67,8 @@ built, every inlined item will get each hook run. And so a naive hook would
 index each of those items, even though none of them have necessarily
 changed. Date stamps are one possibility. Another would be to avoid having
 the hook not do any indexing when `%preprocessing` is set (Ikiwiki.pm would
-need to expose that variable.)
+need to expose that variable.) Another approach would be to use a
+needsbuild hook and only index the pages that are being built.
 
 #### cgi
 

not just a poll plugin problem
diff --git a/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
index 66c52ee..e09e6c2 100644
--- a/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
+++ b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
@@ -2,3 +2,8 @@ I don't seem to be able to vote for options that have non-ascii names, using the
 
 As an example, see http://test.liw.fi/testpoll/index.html: the "red", "green", and "blue" options work fine, but the "ehkä" one does not.
 --[liw](http://liw.fi/)
+
+> It's not just the poll plugin, editing a page with utf-8 will corrupt it
+> now! I wonder if this is a perl 5.10 change; it was working just fine as
+> recently as May 8th; I upgraded perl on the 9th and it's broken for me
+> now. --[[Joey]]

Revert "web commit by http://joey.kitenet.net/: testing utf-8"
This reverts commit 908375a63e6aa083ca4b6348e7f22482ab208f12.
diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index b0bb592..cc0894f 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -1,20 +1,20 @@
 This is the SandBox, a page anyone can edit to try out ikiwiki.
 
-Testing right-to-left text: (שרה) should be spelled shin (ש) resh (ר) heh (ה) from right to left.
+Testing right-to-left text: (שרה) should be spelled shin (ש) resh (ר) heh (ה) from right to left.
 
 Here's a paragraph.
 
 Here's another one with *emphasised* text.
 
-do ë characters work? Sure.
+do ë characters work? Sure.
 
 Hupple hupple hupple hupple snork.
 
-There are Polish diacritical characters: ą, ć, ę, ł, ń, ó, ś, ż, ź.
+There are Polish diacritical characters: ą, ć, ę, ł, ń, ó, ś, ż, ź.
 
-Korean characters test : 한글테스트입니다.
+Korean characters test : 한글테스트입니다.
 
-some hindī? हिन्दी
+some hindī? हिन्दी
 
 # Header
 

testing utf-8
diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index cc0894f..b0bb592 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -1,20 +1,20 @@
 This is the SandBox, a page anyone can edit to try out ikiwiki.
 
-Testing right-to-left text: (שרה) should be spelled shin (ש) resh (ר) heh (ה) from right to left.
+Testing right-to-left text: (שרה) should be spelled shin (ש) resh (ר) heh (ה) from right to left.
 
 Here's a paragraph.
 
 Here's another one with *emphasised* text.
 
-do ë characters work? Sure.
+do ë characters work? Sure.
 
 Hupple hupple hupple hupple snork.
 
-There are Polish diacritical characters: ą, ć, ę, ł, ń, ó, ś, ż, ź.
+There are Polish diacritical characters: ą, ć, ę, ł, ń, ó, ś, ż, ź.
 
-Korean characters test : 한글테스트입니다.
+Korean characters test : 한글테스트입니다.
 
-some hindī? हिन्दी
+some hindī? हिन्दी
 
 # Header
 

diff --git a/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
new file mode 100644
index 0000000..66c52ee
--- /dev/null
+++ b/doc/bugs/poll_plugin:_can__39__t_vote_for_non-ascii_options.mdwn
@@ -0,0 +1,4 @@
+I don't seem to be able to vote for options that have non-ascii names, using the poll plugin.
+
+As an example, see http://test.liw.fi/testpoll/index.html: the "red", "green", and "blue" options work fine, but the "ehkä" one does not.
+--[liw](http://liw.fi/)

thoughts
diff --git a/doc/todo/more_customisable_titlepage_function.mdwn b/doc/todo/more_customisable_titlepage_function.mdwn
index eb1d624..51b5607 100644
--- a/doc/todo/more_customisable_titlepage_function.mdwn
+++ b/doc/todo/more_customisable_titlepage_function.mdwn
@@ -10,4 +10,22 @@ Another option would be a function I could define in the setup file, or an exter
 
 -- [[madduck]]
 
+I don't think that changing titlepage is a good idea, there are
+compatability problems.
+
+Instead, I think that in the specific case of the blogpost form, there
+should be an interface to allow plugins to do arbitrary transformatiosn of
+the page name.
+
+So, add a hidden field to blogpost.tmpl, something like blogpost=1. Then in
+`editpage`, if blogpost is set, call the blogpost hooks, which are passed
+a page name and return a transformed version.
+
+If the page name is changed by those, then the user's original title might
+need to be preserved via a meta title directive. This could just be
+inserted if any changes are made to the page name. Only problem with this
+is that having the directive appear in the edit box for a new page could
+confuse the user. The title could be passed on in a hidden field, and
+prepended to the page when it's saved..
+
 [[wishlist]]

response
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index 3802648..85e6fde 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -63,5 +63,6 @@ in the case where `make` fails.
     stat64("blib/lib/IkiWiki.pm", {st_mode=S_IFREG|0444, st_size=31901, ...}) = 0
     open("blib/lib/IkiWiki.pm", O_RDONLY|O_LARGEFILE) = 3
 
+> I need to see it in the case where it's failing. --[[Joey]]
 
 [[done]]

Updated URL for openiddirectory page. It had moved.
diff --git a/doc/ikiwiki/openid.mdwn b/doc/ikiwiki/openid.mdwn
index 8fd7086..dd851e5 100644
--- a/doc/ikiwiki/openid.mdwn
+++ b/doc/ikiwiki/openid.mdwn
@@ -16,7 +16,7 @@ To sign up for an OpenID, visit one of the following identity providers:
 * [Videntity](http://videntity.org/)
 * [LiveJournal](http://www.livejournal.com/openid/)
 * [TrustBearer](https://openid.trustbearer.com/)
-* or any of the [many others out there](http://openiddirectory.com/index.php?dir=1)..
+* or any of the [many others out there](http://openiddirectory.com/openid-providers-c-1.html).
 
 Your OpenID is the URL that you are given when you sign up.
 \[[!if test="enabled(openid)" then="""

Updated URL for emacs markdown mode. The page had moved to a new location.
diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn
index 7c3b71f..bbda9ad 100644
--- a/doc/ikiwiki/markdown.mdwn
+++ b/doc/ikiwiki/markdown.mdwn
@@ -5,7 +5,7 @@ email messages. It is the markup language used by this wiki by default.
 
 For documentation about the markdown syntax, see [[formatting]] and
 [Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A
-[markdown mode](http://jrblevin.freeshell.org/software/markdown-mode/) for 
+[markdown mode](http://jblevins.org/projects/markdown-mode/) for 
 emacs can help in editing.
 
 Note that [[WikiLink]]s and [[PreProcessorDirective]]s are not part of the

diff --git a/doc/todo/more_customisable_titlepage_function.mdwn b/doc/todo/more_customisable_titlepage_function.mdwn
index 46f7f6a..eb1d624 100644
--- a/doc/todo/more_customisable_titlepage_function.mdwn
+++ b/doc/todo/more_customisable_titlepage_function.mdwn
@@ -2,10 +2,12 @@ I understand the `IkiWiki::titlepage` function is used to generate filenames fro
 
 I imagine two things: a lookup hash and a template.
 
-Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'ä' become 'ae' instead of something illegible.
+Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'ä' become 'ae' instead of something illegible.
 
 Second, maybe a template could be honoured. The template could have a slot `%s` where the calculated title goes, and it could contain `strftime` symbols as well as variables, which get interpolated on use.
 
+Another option would be a function I could define in the setup file, or an external script, though that would be pretty expensive.
+
 -- [[madduck]]
 
 [[wishlist]]

diff --git a/doc/todo/more_customisable_titlepage_function.mdwn b/doc/todo/more_customisable_titlepage_function.mdwn
new file mode 100644
index 0000000..46f7f6a
--- /dev/null
+++ b/doc/todo/more_customisable_titlepage_function.mdwn
@@ -0,0 +1,11 @@
+I understand the `IkiWiki::titlepage` function is used to generate filenames from titles. It would be nice if there were an easier way to override what it does. I suppose I could write an *external* plugin and call `inject`, but maybe this could instead be done via the configuration file?
+
+I imagine two things: a lookup hash and a template.
+
+Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'ä' become 'ae' instead of something illegible.
+
+Second, maybe a template could be honoured. The template could have a slot `%s` where the calculated title goes, and it could contain `strftime` symbols as well as variables, which get interpolated on use.
+
+-- [[madduck]]
+
+[[wishlist]]

add shortcut for wiki.debian.org
diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn
index 401de1b..037c31e 100644
--- a/doc/shortcuts.mdwn
+++ b/doc/shortcuts.mdwn
@@ -27,6 +27,7 @@ This page controls what shortcut links the wiki supports.
 * [[!shortcut name=debrt url="https://rt.debian.org/Ticket/Display.html?id=%s"]]
 * [[!shortcut name=debss url="http://snapshot.debian.net/package/%s"]]
   * Usage: `[[!debss package]]`, `[[!debss package#version]]`, or `[[!debss package/version]]`.  See http://snapshot.debian.net for details.
+  [[!shortcut name=debwiki url="http://wiki.debian.org/%s"]]
 * [[!shortcut name=fdobug url="https://bugs.freedesktop.org/show_bug.cgi?id=%s" desc="freedesktop.org bug #%s"]]
 * [[!shortcut name=fdolist url="http://lists.freedesktop.org/mailman/listinfo/%s" desc="%s@lists.freedesktop.org"]]
 * [[!shortcut name=gnomebug url="http://bugzilla.gnome.org/show_bug.cgi?id=%s" desc="GNOME bug #%s"]]

Response
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index 82dbc3e..3802648 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -40,4 +40,28 @@ I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make
 
 >>>>> This is how perl finds IkiWiki.pm here. Note that I've run "make" first.
 
+OK, this is what I'm getting:
+
+    $ perl -Iblib/lib -V
+    @INC:
+    blib/lib
+    /usr/lib/perl5/site_perl/5.10.0
+    /usr/share/perl5/site_perl/5.10.0
+    /usr/lib/perl5/vendor_perl
+    /usr/share/perl5/vendor_perl
+    /usr/share/perl5/vendor_perl
+    /usr/lib/perl5/core_perl
+    /usr/share/perl5/core_perl
+    /usr/lib/perl5/current
+    /usr/lib/perl5/site_perl/current
+
+I ran the following in my current 2.45 source dir, where the `make` already succeded. If you need it, I can post the output
+in the case where `make` fails.
+
+    $ strace perl -Iblib/lib -e 'use IkiWiki' 2>&1 |grep IkiWiki.pm
+    stat64("blib/lib/IkiWiki.pmc", 0xbfa6167c) = -1 ENOENT (No such file or directory)
+    stat64("blib/lib/IkiWiki.pm", {st_mode=S_IFREG|0444, st_size=31901, ...}) = 0
+    open("blib/lib/IkiWiki.pm", O_RDONLY|O_LARGEFILE) = 3
+
+
 [[done]]

design for a xapian search plugin
diff --git a/doc/todo/different_search_engine.mdwn b/doc/todo/different_search_engine.mdwn
index 39f3e32..a6364b4 100644
--- a/doc/todo/different_search_engine.mdwn
+++ b/doc/todo/different_search_engine.mdwn
@@ -12,6 +12,75 @@ search so it understands what words are most important in a search. (So
 does Lucene..) Another nice thing is it supports "more documents like this
 one" kind of search. --[[Joey]]
 
+## xapian
+
+I've invesitgated xapian briefly. I think a custom xapian indexer and use
+of the omega for cgi searches could work well for ikiwiki. --[[Joey]]
+
+### indexer
+
+A custom indexer is needed because omindex isn't good enough for ikiwiki's
+needs for incremental rendering. (And because, since ikiwiki has page info
+in memory, it's silly to write it to disk and have omindex read it back.)
+
+The indexer would run as a ikiwiki hook. It needs to be passed the page
+name, and the content. Which hook to use is an open question.
+Possibilities:
+
+* `filter` - Since this runs before preprocess, only the actual text
+  written on the page would be indexed. Not text generated by directives,
+  pulled in by inlining, etc. There's something to be said for that. And
+  something to be said against it. It would also get markdown formatted
+  content, mostly, though it would still need to strip html.
+* `sanitize` - Would get the htmlized content, so would need to strip html.
+  Preprocessor directive output would be indexed.
+* `format` - Would get the entire html page, including the page template.
+  Probably not a good choice as indexing the same template for each page
+  is unnecessary.
+
+Currently, a filter hook seems the best option.
+
+The hook would remove any html from the content, and index it.
+It would need to add the same document data that omindex would, as well as
+adding the same special terms (see
+http://xapian.org/docs/omega/overview.html "Boolean terms").
+
+(Note that the U term is a bit tricky because I'll have to replicate
+ominxes's hash_string() to hash terms > 240 chars.)
+
+The indexer (and deleter) will need a way to figure out the ids in xapian
+of the documents to delete. One way is storing the id of each page in the
+ikiwiki index.
+
+The other way would be adding a special term to the xapian db that can be
+used with replace_document_by_term/delete_document_by_term. omindex uses
+U<url> as a term, and I guess I could just use that, and then map page
+names to urls when deleting a page  ... only real problem being the
+hashing; a collision would be bad.
+
+At the moment, storing xapian ids in the ikiwiki index file seems like the
+best approach.
+
+The hook should try to avoid re-indexing pages that have not changed since
+they were last indexed. One problem is that, if a page with an inline is
+built, every inlined item will get each hook run. And so a naive hook would
+index each of those items, even though none of them have necessarily
+changed. Date stamps are one possibility. Another would be to avoid having
+the hook not do any indexing when `%preprocessing` is set (Ikiwiki.pm would
+need to expose that variable.)
+
+#### cgi
+
+The cgi hook would exec omega to handle the searching, much as is done
+with estseek in the current search plugin.
+
+It would first set `OMEGA_CONFIG_FILE=.ikiwiki/omega.conf` ; that omega.conf
+would set `database_dir=.ikiwiki/xapian` and probably also set a custom
+`template_dir`, which would have modified templates branded for ikiwiki. So
+the actual xapian db would be in `.ikiwiki/xapian/default/`.
+
+## lucene
+
 >> I've done a bit of prototyping on this. The current hip search library is [Lucene](http://lucene.apache.org/java/docs/). There's a Perl port called [Plucene](http://search.cpan.org/~tmtm/Plucene-1.25/). Given that it's already packaged, as `libplucene-perl`, I assumed it would be a good starting point. I've written a **very rough** patch against `IkiWiki/Plugin/search.pm` to handle the indexing side (there's no facility to view the results yet, although I have a command-line interface working). That's below, and should apply to SVN trunk.
 
 >> Of course, there are problems. ;-)

add --delete-bucket option
diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm
index 6652b9f..e1ce4ae 100644
--- a/IkiWiki/Plugin/amazon_s3.pm
+++ b/IkiWiki/Plugin/amazon_s3.pm
@@ -17,9 +17,28 @@ BEGIN {
 };
 
 sub import { #{{{
+	hook(type => "getopt", id => "aggregate", call => \&getopt);
 	hook(type => "checkconfig", id => "amazon_s3", call => \&checkconfig);
 } # }}}
 
+sub getopt () { #{{{
+        eval q{use Getopt::Long};
+        error($@) if $@;
+        Getopt::Long::Configure('pass_through');
+        GetOptions("delete-bucket" => sub {
+		my $bucket=getbucket();
+		debug(gettext("deleting bucket.."));
+		my $resp = $bucket->list_all or die $bucket->err . ": " . $bucket->errstr;
+		foreach my $key (@{$resp->{keys}}) {
+			debug("\t".$key->{key});
+			$bucket->delete_key($key->{key}) or die $bucket->err . ": " . $bucket->errstr;
+		}
+		$bucket->delete_bucket or die $bucket->err . ": " . $bucket->errstr;
+		debug(gettext("done"));
+		exit(0);
+	});
+} #}}}
+
 sub checkconfig { #{{{
 	foreach my $field (qw{amazon_s3_key_id amazon_s3_key_file
 	                      amazon_s3_bucket}) {
@@ -131,7 +150,6 @@ sub writefile ($$$;$$) { #{{{
 		# TODO: investigate using the new copy operation.
 		#       (It may not be robust enough.)
 		foreach my $key (@keys) {
-			debug("storing $key");
 			my $res;
 			if (! $writer) {
 				$res=$bucket->add_key($key, $content, \%opts);
@@ -169,7 +187,6 @@ sub prune ($) { #{{{
 		my $bucket=IkiWiki::Plugin::amazon_s3::getbucket();
 
 		foreach my $key (@keys) {
-			debug("deleting $key");
 			my $res=$bucket->delete_key($key);
 			if (! $res) {
 				error(gettext("Failed to delete file from S3: ").
diff --git a/doc/plugins/amazon_s3.mdwn b/doc/plugins/amazon_s3.mdwn
index 66042bf..caa0c01 100644
--- a/doc/plugins/amazon_s3.mdwn
+++ b/doc/plugins/amazon_s3.mdwn
@@ -59,3 +59,8 @@ type uploads.
 
 Copy and rename detection is not done, so if you copy or rename a large file,
 it will be re-uploaded, rather than copied.
+
+## deleting a bucket
+
+You can use "ikiwiki -setup my.setup --delete-bucket" to delete anything
+that's in the configured bucket, and remove the bucket.

response
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index b885bcc..82dbc3e 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -27,4 +27,17 @@ I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make
 >>>> They were under /usr/local/{bin,lib,share}. I can try to provide more info,
 >>>> or try to reproduce it, if you need me to.
 
+>>>>> Well, here are some things to try.
+
+	perl -Iblib/lib -V
+
+>>>>> This should have blib/lib first in the listed @INC
+
+	joey@kodama:~/src/ikiwiki>strace perl -Iblib/lib -e 'use IkiWiki' 2>&1 |grep IkiWiki.pm
+	stat64("blib/lib/IkiWiki.pmc", 0xbfa1594c) = -1 ENOENT (No such file or directory)
+	stat64("blib/lib/IkiWiki.pm", {st_mode=S_IFREG|0444, st_size=31982, ...}) = 0
+	open("blib/lib/IkiWiki.pm", O_RDONLY|O_LARGEFILE) = 5
+
+>>>>> This is how perl finds IkiWiki.pm here. Note that I've run "make" first.
+
 [[done]]

amazon s3 index file improvements
Turns out duplicate index files do not need to be stored when usedirs is in
use, just when it's not. Ikiwiki is quite consistent about using page/ when
usedirs is in use. (The only exception is the search plugin, which needs
fixing.)
This also includes significant code cleanup, removal of a incorrect special
case for empty files, and addition of a workaround for a bug in the amazon
perl module.
diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm
index cc15fbd..6652b9f 100644
--- a/IkiWiki/Plugin/amazon_s3.pm
+++ b/IkiWiki/Plugin/amazon_s3.pm
@@ -71,6 +71,29 @@ sub getbucket { #{{{
 } #}}}
 }
 
+# Given a file, return any S3 keys associated with it.
+sub file2keys ($) { #{{{
+	my $file=shift;
+
+	my @keys;
+	if ($file =~ /^\Q$config{destdir}\/\E(.*)/) {
+		push @keys, $config{amazon_s3_prefix}.$1;
+
+		# Munge foo/index.html to foo/
+		if ($keys[0]=~/(^|.*\/)index.$config{htmlext}$/) {
+			# A duplicate might need to be stored under the
+			# unmunged name too.
+			if (!$config{usedirs} || $config{amazon_s3_dupindex}) {
+				push @keys, $1;
+			}
+			else {
+				@keys=($1);
+			}
+		}
+	}
+	return @keys;
+} #}}}
+
 package IkiWiki;
 use File::MimeInfo;
 use Encode;
@@ -85,21 +108,11 @@ sub writefile ($$$;$$) { #{{{
 
 	# First, write the file to disk.
 	my $ret=$IkiWiki::Plugin::amazon_s3::subs{'IkiWiki::writefile'}->($file, $destdir, $content, $binary, $writer);
-
-	# Now, determine if the file was written to the destdir.
-	# writefile might be used for writing files elsewhere.
-	# Also, $destdir might be set to a subdirectory of the destdir.
-	my $key;
-	if ($destdir eq $config{destdir}) {
-		$key=$file;
-	}
-	elsif ("$destdir/$file" =~ /^\Q$config{destdir}\/\E(.*)/) {
-		$key=$1;
-	}
+		
+	my @keys=IkiWiki::Plugin::amazon_s3::file2keys("$destdir/$file");
 
 	# Store the data in S3.
-	if (defined $key) {
-		$key=$config{amazon_s3_prefix}.$key;
+	if (@keys) {
 		my $bucket=IkiWiki::Plugin::amazon_s3::getbucket();
 
 		# The http layer tries to downgrade utf-8
@@ -108,42 +121,37 @@ sub writefile ($$$;$$) { #{{{
 		# so force convert it to bytes.
 		$content=encode_utf8($content) if defined $content;
 
-		if (defined $content && ! length $content) {
-			# S3 doesn't allow storing empty files!
-			$content=" ";
-		}
-		
 		my %opts=(
 			acl_short => 'public-read',
 			content_type => mimetype("$destdir/$file"),
 		);
-		my $res;
-		if (! $writer) {
-			$res=$bucket->add_key($key, $content, \%opts);
-		}
-		else {
-			# read back in the file that the writer emitted
-			$res=$bucket->add_key_filename($key, "$destdir/$file", \%opts);
-		}
-		if ($res && $key=~/(^|.*\/)index.$config{htmlext}$/) {
-			# index.html files are a special case. Since S3 is
-			# not a normal web server, it won't serve up
-			# foo/index.html when foo/ is requested. So the
-			# file has to be stored twice. (This is bad news
-			# when usedirs is enabled!)
-			# TODO: invesitgate using the new copy operation.
-			#       (It may not be robust enough.)
-			my $base=$1;
+
+		# If there are multiple keys to write, data is sent
+		# multiple times.
+		# TODO: investigate using the new copy operation.
+		#       (It may not be robust enough.)
+		foreach my $key (@keys) {
+			debug("storing $key");
+			my $res;
 			if (! $writer) {
-				$res=$bucket->add_key($base, $content, \%opts);
+				$res=$bucket->add_key($key, $content, \%opts);
 			}
 			else {
-				$res=$bucket->add_key_filename($base, "$destdir/$file", \%opts);
+				# This test for empty files is a workaround
+				# for this bug:
+				# http://rt.cpan.org//Ticket/Display.html?id=35731
+				if (-z "$destdir/$file") {
+					$res=$bucket->add_key($key, "", \%opts);
+				}
+				else {
+					# read back in the file that the writer emitted
+					$res=$bucket->add_key_filename($key, "$destdir/$file", \%opts);
+				}
+			}
+			if (! $res) {
+				error(gettext("Failed to save file to S3: ").
+					$bucket->err.": ".$bucket->errstr."\n");
 			}
-		}
-		if (! $res) {
-			error(gettext("Failed to save file to S3: ").
-				$bucket->err.": ".$bucket->errstr."\n");
 		}
 	}
 
@@ -154,19 +162,19 @@ sub writefile ($$$;$$) { #{{{
 sub prune ($) { #{{{
 	my $file=shift;
 
-	# If a file in the destdir is being pruned, need to delete it out
-	# of S3 as well.
-	if ($file =~ /^\Q$config{destdir}\/\E(.*)/) {
-		my $key=$config{amazon_s3_prefix}.$1;
+	my @keys=IkiWiki::Plugin::amazon_s3::file2keys($file);
+
+	# Prune files out of S3 too.
+	if (@keys) {
 		my $bucket=IkiWiki::Plugin::amazon_s3::getbucket();
-		my $res=$bucket->delete_key($key);
-		if ($res && $key=~/(^|.*\/)index.$config{htmlext}$/) {
-			# index.html special case: Delete other file too
-			$res=$bucket->delete_key($1);
-		}
-		if (! $res) {
-			error(gettext("Failed to delete file from S3: ").
-				$bucket->err.": ".$bucket->errstr."\n");
+
+		foreach my $key (@keys) {
+			debug("deleting $key");
+			my $res=$bucket->delete_key($key);
+			if (! $res) {
+				error(gettext("Failed to delete file from S3: ").
+					$bucket->err.": ".$bucket->errstr."\n");
+			}
 		}
 	}
 
diff --git a/doc/bugs/Search_results_should_point_to_dir__44___not_index.html__44___when_use__95__dirs_is_enabled.mdwn b/doc/bugs/Search_results_should_point_to_dir__44___not_index.html__44___when_use__95__dirs_is_enabled.mdwn
index 91dca95..45a8f0a 100644
--- a/doc/bugs/Search_results_should_point_to_dir__44___not_index.html__44___when_use__95__dirs_is_enabled.mdwn
+++ b/doc/bugs/Search_results_should_point_to_dir__44___not_index.html__44___when_use__95__dirs_is_enabled.mdwn
@@ -7,3 +7,7 @@ point to `foo/bar/` instead.
 > --[Jason Blevins](http://jblevins.org/)
 
 >> Even with `usedirs`, there is no reason why the `index.html` should be called directly, and it might break content negotiation. Please just direct to the directory. --[[madduck]]
+
+> This bug affects the [[plugins/amazon_s3]] plugin -- when using that
+> plugin plus the search plugin, you need to enable `amazon_s3_dupindex`.
+> So this definitly should be fixed. --[[Joey]]
diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup
index 997dcd1..e855188 100644
--- a/doc/ikiwiki.setup
+++ b/doc/ikiwiki.setup
@@ -183,4 +183,6 @@ use IkiWiki::Setup::Standard {
 	#amazon_s3_prefix => "wiki/",
 	# Uncomment to use the S3 European datacenter.
 	#amazon_s3_location => "EU",
+	# Uncomment if you need to store each index file twice.
+	#amazon_s3_dupindex => 1,
 }
diff --git a/doc/plugins/amazon_s3.mdwn b/doc/plugins/amazon_s3.mdwn
index f1887d9..66042bf 100644
--- a/doc/plugins/amazon_s3.mdwn
+++ b/doc/plugins/amazon_s3.mdwn
@@ -11,11 +11,6 @@ modules and an Amazon S3 account to use this plugin.
 
 ## configuration
 
-Important note: You should seriously consider turning off `usedirs` before
-enabling this plugin. If `usedirs` is enabled, every page has to be stored
-in S3 *twice*, as "page/index.html" and as "page/". That will cost you
-money and bandwidth.
-
 This plugin uses the following settings in the setup file:
 
 * `amazon_s3_key_id` - Set to your public access key id.
@@ -32,6 +27,13 @@ This plugin uses the following settings in the setup file:
   empty string.
 * `amazon_s3_location` - Optionally, this can be set to control which
   datacenter to use. For example, set it to "EU" to for Europe.

(Diff truncated)
re: question
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index b9e5ad3..b885bcc 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -24,4 +24,7 @@ I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make
 >>> understand why they would be seen, since -Iblib/lib is passed to perl.
 >>> --[[Joey]]
 
+>>>> They were under /usr/local/{bin,lib,share}. I can try to provide more info,
+>>>> or try to reproduce it, if you need me to.
+
 [[done]]

question
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index 453bab5..b9e5ad3 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -20,4 +20,8 @@ I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make
 >> I don't know why it was picking up the old version of Ikiwiki.pm, but now it
 >> works. Please close this bug, and thanks for the help.
 
+>>> Where were the files from the old installation? I still don't
+>>> understand why they would be seen, since -Iblib/lib is passed to perl.
+>>> --[[Joey]]
+
 [[done]]

More information on ikiwiki mangling accented characters
diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn
index 1ece57a..c201f6e 100644
--- a/doc/index/discussion.mdwn
+++ b/doc/index/discussion.mdwn
@@ -73,6 +73,19 @@ I had been using ikiwiki for a while without any problems. Recently, however, I'
 
 I have googled all over the place and I can't find any mention of a similar problem, which makes me think this is a configuration problem on my end and not a bug. It likely has to do with UTF8; I am at a loss about how to fix (or even diagnose) this, though, and I'd appreciate any pointers.
 
+> More information:
+
+* I downgraded to ikiwiki 2.41 and firefox 2.0.11; the problem still appears. I know
+for sure that ikiwiki 2.41 used to work here.
+* I have upgraded to ikiwiki 2.45
+* On a page where characters are mangled, firefox reports that the charset is utf-8.
+
+> I think this leaves the upgrade to perl 5.10 as the last suspect. Unfortunately, I can't
+> easily go back to 5.8. I will probably install my distro again in another partition, but
+> that will take some time.
+> I've been unable to use my wiki for more than a week now, I'd really appreciate it if
+> someone has pointers or suggestions. Should I move this to a bug?
+
 ----
 
 # Installation of selected docs (html)

closing
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index 99013ee..453bab5 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -19,3 +19,5 @@ I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make
 >> I removed all traces of the previous installation, and now 2.45 compiles.
 >> I don't know why it was picking up the old version of Ikiwiki.pm, but now it
 >> works. Please close this bug, and thanks for the help.
+
+[[done]]

Removing previous installation fixes compile failure.
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index fe8c14c..99013ee 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -15,3 +15,7 @@ I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make
 > perhaps using a previously installed version. But the -Iblib/lib
 > instructs perl to look in that directory first, and the Makefile
 > puts Ikiwiki.pm there. --[[Joey]]
+
+>> I removed all traces of the previous installation, and now 2.45 compiles.
+>> I don't know why it was picking up the old version of Ikiwiki.pm, but now it
+>> works. Please close this bug, and thanks for the help.

gratuitous change to test (remove "And")
diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index ad60841..cc0894f 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -26,7 +26,7 @@ some hindī? हिन्दी
 >
 > > This is nested blockquote.
 >
->> And without a space works too.
+>> Without a space works too.
 >>> to three levels
 >
 > Back to the first level.

most modules are pre-installed now
diff --git a/doc/tips/nearlyfreespeech.mdwn b/doc/tips/nearlyfreespeech.mdwn
index 3a389ca..435743b 100644
--- a/doc/tips/nearlyfreespeech.mdwn
+++ b/doc/tips/nearlyfreespeech.mdwn
@@ -42,7 +42,12 @@ Use `wget` to [[download]] the ikiwiki tarball. Then unpack it:
 
 ## Install perl modules
 
-Use CPAN to install the perl modules it uses into your home directory:
+As an optional step, you can use CPAN to install the perl modules ikiwiki
+uses into your home directory. This should not be necessary, mostly,
+because the system has most modules installed already.
+
+So, you might want to skip this step and come back to it later if ikiwiki
+doesn't work.
 
 	PERL5LIB=`pwd`/ikiwiki:`pwd`/ikiwiki/cpan:`pwd`/lib/perl5 PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'CPAN::Shell->install("Bundle::IkiWiki")'
 	
@@ -94,7 +99,7 @@ dollars.
 
 rm -rf ~/ikiwiki*.tar.gz ~/.cpan ~/ikiwiki ~/man ~/lib/perl5/5.8.8
 
-That should cut things down to less than 4 megabytes. If you want to save
+That should cut things down to less than 2 megabytes. If you want to save
 even more space, delete unused perl modules from ~/lib/perl5
 
 ## Enjoy!

update
diff --git a/doc/tips/nearlyfreespeech.mdwn b/doc/tips/nearlyfreespeech.mdwn
index 2d59aca..3a389ca 100644
--- a/doc/tips/nearlyfreespeech.mdwn
+++ b/doc/tips/nearlyfreespeech.mdwn
@@ -2,6 +2,12 @@
 provider with very cheap pay as you go pricing. Here's how to install ikiwiki
 there if you don't have a dedicated server.
 
+Note that you can also follow these instructions, get your wiki set up on
+NearlyFreeSpeech, and then use the [[plugins/Amazon_S3]] plugin to inject
+the static web pages into Amazon S3. Then NearlyFreeSpeech will handle the
+CGI, and S3 will handle the web serving. This might be a more cost effective,
+scalable, or robust solution than using NearlyFreeSpeech alone.
+
 ## Register for an account and set up a site
 
 After you [get an account](https://www.nearlyfreespeech.net/about/start.php),

amazon s3 support implemented and kinda working
pruning not yet implemented, however
diff --git a/Bundle/IkiWiki/Extras.pm b/Bundle/IkiWiki/Extras.pm
index a9f7372..2c259f2 100644
--- a/Bundle/IkiWiki/Extras.pm
+++ b/Bundle/IkiWiki/Extras.pm
@@ -27,6 +27,7 @@ Text::Typography
 Text::Textile
 Text::WikiFormat
 XML::Feed
+Net::Amazon::S3
 
 =head1 AUTHOR
 
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 959279f..8591731 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -214,7 +214,7 @@ sub render ($) { #{{{
 			if (link($srcfile, $config{destdir}."/".$file)) {
 				return;
 			}
-			# if hardlink fails, fall back top copying
+			# if hardlink fails, fall back to copying
 		}
 		
 		my $srcfd=readfile($srcfile, 1, 1);
diff --git a/doc/ikiwiki.setup b/doc/ikiwiki.setup
index a151050..997dcd1 100644
--- a/doc/ikiwiki.setup
+++ b/doc/ikiwiki.setup
@@ -171,4 +171,16 @@ use IkiWiki::Setup::Standard {
 	# For use with the pinger plugin, how many seconds to wait before
 	# timing out.
 	#pinger_timeout => 15.
+	
+	# For use with the amazon S3 plugin, your public access key id.
+	#amazon_s3_key_id => 'XXXXXXXXXXXXXXXXXXXX',
+	# And a file holding your secret key. This file *must* not be
+	# readable by others!
+	#amazon_s3_key_file => "/home/me/.hide/.s3_key
+	# The globally unique name of the bucket to use to store the wiki.
+	#amazon_s3_bucket => "mywiki",
+	# A prefix to prepend to each page name.
+	#amazon_s3_prefix => "wiki/",
+	# Uncomment to use the S3 European datacenter.
+	#amazon_s3_location => "EU",
 }
diff --git a/doc/plugins/amazon_s3.mdwn b/doc/plugins/amazon_s3.mdwn
index 855569b..f1887d9 100644
--- a/doc/plugins/amazon_s3.mdwn
+++ b/doc/plugins/amazon_s3.mdwn
@@ -11,6 +11,11 @@ modules and an Amazon S3 account to use this plugin.
 
 ## configuration
 
+Important note: You should seriously consider turning off `usedirs` before
+enabling this plugin. If `usedirs` is enabled, every page has to be stored
+in S3 *twice*, as "page/index.html" and as "page/". That will cost you
+money and bandwidth.
+
 This plugin uses the following settings in the setup file:
 
 * `amazon_s3_key_id` - Set to your public access key id.
@@ -35,6 +40,8 @@ Likewise, you will probably want to set the `url` in the setup file.
 The url can use the `foo.s3.amazonaws.com` domain name, or another domain
 name that is a CNAME for it.
 
+The `hardlink` config file setting is not compatible with this plugin.
+
 ## data transfer notes
 
 If you run 'ikiwiki -setup my.setup' to force a rebuild of your wiki, the
diff --git a/docwiki.setup b/docwiki.setup
index 0a6a866..bbe2d43 100644
--- a/docwiki.setup
+++ b/docwiki.setup
@@ -15,5 +15,8 @@ use IkiWiki::Setup::Standard {
 	syslog => 0,
 	userdir => "users",
 	usedirs => 0,
-	add_plugins => [qw{goodstuff version haiku polygen fortune}],
+	add_plugins => [qw{goodstuff version polygen fortune amazon_s3}],
+	amazon_s3_key_id => '08TJMT99S3510QHZEP82',
+	amazon_s3_bucket => 'ikiwiki-test',
+	amazon_s3_key_file => "/home/joey/.hide/aws_secret_access_key",
 }

whitespace
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 183675c..508dd83 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -92,8 +92,6 @@ function is passed no values.
 
 ### needsbuild
 
-
-
 	hook(type => "needsbuild", id => "foo", call => \&needsbuild);
 
 This allows a plugin to manipulate the list of files that need to be

documentation for amazon_s3 plugin
Now to write it. :-)
diff --git a/doc/plugins/amazon_s3.mdwn b/doc/plugins/amazon_s3.mdwn
new file mode 100644
index 0000000..855569b
--- /dev/null
+++ b/doc/plugins/amazon_s3.mdwn
@@ -0,0 +1,52 @@
+[[template id=plugin name=amazon_s3 author="[[Joey]]"]]
+[[tag type/special-purpose]]
+
+This plugin allows ikiwiki to publish a wiki in the [Amazon Simple Storage
+Service](http://aws.amazon.com/s3) (S3). As pages are rendered, ikiwiki
+will upload them to Amazon S3. The entire wiki contents, aside from the
+ikiwiki CGI, can then be served directly out of Amazon S3.
+
+You'll need the [[cpan Net::Amazon::S3]] and [[cpan File::MimeInfo]] perl
+modules and an Amazon S3 account to use this plugin.
+
+## configuration
+
+This plugin uses the following settings in the setup file:
+
+* `amazon_s3_key_id` - Set to your public access key id.
+* `amazon_s3_key_file` - Set to the name of a file where you have
+  stored your secret access key. The content of this file *must*
+  be kept secret.
+* `amazon_s3_bucket` - The globally unique name of the bucket to use to
+  store the wiki. This determines the URL to your wiki. For example, if you
+  set it to "foo", then the url will be
+  "http://foo.s3.amazonaws.com/wiki/".
+* `amazon_s3_prefix` - A prefix to prepend to each page name.
+  The default is "wiki/". Note that due to S3 limitations (lack of support
+  for uploading a root key), it is not possible to set the prefix to an
+  empty string.
+* `amazon_s3_location` - Optionally, this can be set to control which
+  datacenter to use. For example, set it to "EU" to for Europe.
+
+Note that you should still set `destdir` in the setup file. The files that
+are uploaded to Amazon S3 will still be written to the destdir, too.
+
+Likewise, you will probably want to set the `url` in the setup file.
+The url can use the `foo.s3.amazonaws.com` domain name, or another domain
+name that is a CNAME for it.
+
+## data transfer notes
+
+If you run 'ikiwiki -setup my.setup' to force a rebuild of your wiki, the
+entire thing will be re-uploaded to Amazon S3. This will take time, and
+cost you money, so it should be avoided as much as possible.
+
+If you run 'ikiwiki -setup my.setup -refresh', ikiwiki will only upload the
+modified pages that it refreshes. Faster and cheaper. Still, if you have
+very large pages (for example, a page that inlines hundreds of other pages
+.. or is just very large), the complete page contents will be re-uploaded
+each time it's changed. Amazon S3 does not currently support partial/rsync
+type uploads.
+
+Copy and rename detection is not done, so if you copy or rename a large file,
+it will be re-uploaded, rather than copied.

cannot reproduce
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
index e2c39eb..fe8c14c 100644
--- a/doc/bugs/2.45_Compilation_error.mdwn
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -8,3 +8,10 @@ I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make
     BEGIN failed--compilation aborted at (eval 23) line 2.
     BEGIN failed--compilation aborted at (eval 10) line 21.
     make: *** [extra_build] Error 255
+
+> I can't reproduce this. It looks like your IkiWiki.pm is out of sync with
+> your IkiWiki/Plugin/shortcut.pm. The ones distributed in 2.45 are in
+> sync. Or your perl is failing to use the right version of Ikiwiki.pm, 
+> perhaps using a previously installed version. But the -Iblib/lib
+> instructs perl to look in that directory first, and the Makefile
+> puts Ikiwiki.pm there. --[[Joey]]

clarification
diff --git a/doc/freesoftware.mdwn b/doc/freesoftware.mdwn
index 717ff6e..653c2fe 100644
--- a/doc/freesoftware.mdwn
+++ b/doc/freesoftware.mdwn
@@ -1,6 +1,7 @@
 [[meta title="Free Software"]]
 
-ikiwiki is licensed under the terms of the GNU [[GPL]], version 2 or later.
+ikiwiki, and this documentation wiki, are licensed under the terms of the
+GNU [[GPL]], version 2 or later.
 
 The parts of ikiwiki that become part of your own wiki (the [[basewiki]]
 pages (but not the smilies) and the [[templates|wikitemplates]]) are licensed

bug: 2.45 fails to compile
diff --git a/doc/bugs/2.45_Compilation_error.mdwn b/doc/bugs/2.45_Compilation_error.mdwn
new file mode 100644
index 0000000..e2c39eb
--- /dev/null
+++ b/doc/bugs/2.45_Compilation_error.mdwn
@@ -0,0 +1,10 @@
+I have perl 5.10.0. Ikiwiki 2.44 compiles fine. Compiling 2.45 fails after 'make':
+
+    perl -Iblib/lib   ikiwiki.out -libdir . -setup docwiki.setup -refresh
+    refreshing wiki..
+    docwiki.setup: Failed to load plugin IkiWiki::Plugin::goodstuff: Failed to load plugin IkiWiki::Plugin::shortcut: Too many arguments for IkiWiki::srcfile at IkiWiki/Plugin/shortcut.pm line 16, near "1)"
+    Compilation failed in require at (eval 31) line 2.
+    BEGIN failed--compilation aborted at (eval 31) line 2.
+    BEGIN failed--compilation aborted at (eval 23) line 2.
+    BEGIN failed--compilation aborted at (eval 10) line 21.
+    make: *** [extra_build] Error 255

poll vote (Accept both)
diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn
index 90aa5d9..d3f11d3 100644
--- a/doc/news/openid.mdwn
+++ b/doc/news/openid.mdwn
@@ -10,4 +10,4 @@ log back in, try out the OpenID signup process if you don't already have an
 OpenID, and see how OpenID works for you. And let me know your feelings about
 making such a switch. --[[Joey]]
 
-[[poll 56 "Accept only OpenID for logins" 18 "Accept only password logins" 34 "Accept both"]]
+[[poll 56 "Accept only OpenID for logins" 18 "Accept only password logins" 35 "Accept both"]]

fix links
diff --git a/doc/tips/distributed_wikis.mdwn b/doc/tips/distributed_wikis.mdwn
index ed933ae..3d9f319 100644
--- a/doc/tips/distributed_wikis.mdwn
+++ b/doc/tips/distributed_wikis.mdwn
@@ -6,10 +6,10 @@ git, let's explore some possibilities for distributed wikis.
 ## a wiki mirror
 
 The simplest possibility is setting up a mirror. If a wiki exposes its git
-repository and has the [[plugin/pinger]] plugin enabled, then anyone can
+repository and has the [[plugins/pinger]] plugin enabled, then anyone can
 set up a mirror that will automatically be kept up-to-date with the origin
 wiki. Just clone the git repo, configure ikiwiki to use it, enable the
-[[plugin/pingee]] plugin in your configuration, and edit the origin wiki,
+[[plugins/pingee]] plugin in your configuration, and edit the origin wiki,
 adding a ping directive for your mirror:
 
 	\[[!ping from="http://thewiki.com/"