diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-05-08 15:51:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-05-08 15:51:09 -0400 |
commit | b8d81b7b7f53b8fac5632747eae73c7158e32fde (patch) | |
tree | 658a9ede000e9015acd8f985bc9fc124c5ffaab8 /doc | |
parent | ca33ec2b9c07f5cf1f79c9042a76a3817fa8a6a6 (diff) | |
download | ikiwiki-b8d81b7b7f53b8fac5632747eae73c7158e32fde.tar ikiwiki-b8d81b7b7f53b8fac5632747eae73c7158e32fde.tar.gz |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/bugs/Search_results_should_point_to_dir__44___not_index.html__44___when_use__95__dirs_is_enabled.mdwn | 4 | ||||
-rw-r--r-- | doc/ikiwiki.setup | 2 | ||||
-rw-r--r-- | doc/plugins/amazon_s3.mdwn | 12 |
3 files changed, 13 insertions, 5 deletions
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 91dca9548..45a8f0abd 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 997dcd18e..e85518849 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 f1887d970..66042bfbe 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. +* `amazon_s3_dupindex` - Normally, when `usedirs` is enabled, + "foo/index.html" is stored in S3 as a key named "foo/", and all links + between pages use that name. If you also needs links that include + "index.html" in their names to work, you can enable this option. Then + each index.html file will be stored in S3 *twice*, under both names. This + will use more disk and bandwidth, and is not recommended unless you really + need it for some reason. 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. |