From 3f39e69b13851d3bed8e1cae0525d6ad8ac768cf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 1 Aug 2009 12:31:34 +0100 Subject: Document the getsource plugin --- doc/plugins/getsource.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/plugins/getsource.mdwn (limited to 'doc') diff --git a/doc/plugins/getsource.mdwn b/doc/plugins/getsource.mdwn new file mode 100644 index 000000000..4fbf4be98 --- /dev/null +++ b/doc/plugins/getsource.mdwn @@ -0,0 +1,13 @@ +[[!template id=plugin name=getsource author="[[Will_Uther|Will]]"]] + +This plugin adds a `getsource` action to the IkiWiki CGI, and a "Source" link +that uses it to display pages' source. + +Configuration for this plugin in the setup file: + +* `getsource_mimetype => "text/plain; charset=utf-8"` + + Sets the MIME type used when page source is requested. The default is + usually appropriate, but you could set this to `application/octet-stream` + to encourage browsers to download the source to a file rather than showing + it in the browser. -- cgit v1.2.3 From f5322fa912250cb2859bb63aeae419a405f74544 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 1 Aug 2009 12:31:53 +0100 Subject: Mark todo/source_link as done --- debian/changelog | 1 + doc/todo/source_link.mdwn | 2 ++ 2 files changed, 3 insertions(+) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 565f19c7c..90ec2ddac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ ikiwiki (3.15) UNRELEASED; urgency=low * Add further build machinery to generate translated underlays from the po file, for use by wikis whose primary language is not English. * Add Danish basewiki translation by Jonas Smedegaard. + * Add getsource plugin (Will, smcv) -- Joey Hess Tue, 02 Jun 2009 17:03:41 -0400 diff --git a/doc/todo/source_link.mdwn b/doc/todo/source_link.mdwn index 9d9ec9697..a7203d06c 100644 --- a/doc/todo/source_link.mdwn +++ b/doc/todo/source_link.mdwn @@ -107,3 +107,5 @@ I just implemented this. There is one [[patch]] to the default page template, a } 1 + +[[done]] --[[smcv]] -- cgit v1.2.3 From 81ad4377e90961a46d97248844f5fa7f26be3f24 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 2 Aug 2009 10:22:39 -0400 Subject: response --- doc/forum/ikiwiki_over_database__63__.wiki | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/forum/ikiwiki_over_database__63__.wiki b/doc/forum/ikiwiki_over_database__63__.wiki index ff123e98d..fb4d41763 100644 --- a/doc/forum/ikiwiki_over_database__63__.wiki +++ b/doc/forum/ikiwiki_over_database__63__.wiki @@ -1 +1,21 @@ Is there here any possibility to modifying ikiwiki (via plugin) for store pages in database. I'm thinking about storing pages in sqlite or mysql for serving it much faster. The idea is from sputnik.org [http://sputnik.freewisdom.org/] but with perl ;-). Could we integrate the sputnik code in ikiwiki as a solution? + +> ikiwiki generates static pages in a filesystem. It's responsible +> for editing and regenerating them, but they're served by any old +> web server. If you go to the trouble of stuffing the generated pages +> into a database, you'll need to go to further trouble to serve them +> back out somehow: write your own web server, perhaps, or a module +> for a particular web server. Either way you'll have sacrificed +> ikiwiki's interoperability, and it's not at all clear (since you're +> adding, in the best case, one layer of indirection reading the +> generated files) you'll have gained any improved page-serving +> performance. If it's source pages you want to store in a database, +> then you lose the ability to do random Unixy things to source pages, +> including managing them in a revision control system. +> +> Static HTML pages in a filesystem and the ability to do random +> Unixy things are two of the uniquely awesome features of ikiwiki. +> It's probably possible to do what you want, but it's unlikely that +> you really want it. I'd suggest you either get to know ikiwiki better, +> or choose one of the many wiki implementations that already works +> as you describe. --[[Schmonz]] -- cgit v1.2.3 From 4c21c5d1fa16972cf08583d96a05af87758e0936 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 2 Aug 2009 10:29:15 -0400 Subject: ugh, this is not a Markdown page --- doc/forum/ikiwiki_over_database__63__.wiki | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/forum/ikiwiki_over_database__63__.wiki b/doc/forum/ikiwiki_over_database__63__.wiki index fb4d41763..b6e7266e3 100644 --- a/doc/forum/ikiwiki_over_database__63__.wiki +++ b/doc/forum/ikiwiki_over_database__63__.wiki @@ -1,21 +1,7 @@ Is there here any possibility to modifying ikiwiki (via plugin) for store pages in database. I'm thinking about storing pages in sqlite or mysql for serving it much faster. The idea is from sputnik.org [http://sputnik.freewisdom.org/] but with perl ;-). Could we integrate the sputnik code in ikiwiki as a solution? -> ikiwiki generates static pages in a filesystem. It's responsible -> for editing and regenerating them, but they're served by any old -> web server. If you go to the trouble of stuffing the generated pages -> into a database, you'll need to go to further trouble to serve them -> back out somehow: write your own web server, perhaps, or a module -> for a particular web server. Either way you'll have sacrificed -> ikiwiki's interoperability, and it's not at all clear (since you're -> adding, in the best case, one layer of indirection reading the -> generated files) you'll have gained any improved page-serving -> performance. If it's source pages you want to store in a database, -> then you lose the ability to do random Unixy things to source pages, -> including managing them in a revision control system. -> -> Static HTML pages in a filesystem and the ability to do random -> Unixy things are two of the uniquely awesome features of ikiwiki. -> It's probably possible to do what you want, but it's unlikely that -> you really want it. I'd suggest you either get to know ikiwiki better, -> or choose one of the many wiki implementations that already works -> as you describe. --[[Schmonz]] +----- + +ikiwiki generates static pages in a filesystem. It's responsible for editing and regenerating them, but they're served by any old web server. If you go to the trouble of stuffing the generated pages into a database, you'll need to go to further trouble to serve them back out somehow: write your own web server, perhaps, or a module for a particular web server. Either way you'll have sacrificed ikiwiki's interoperability, and it's not at all clear (since you're adding, in the best case, one layer of indirection reading the generated files) you'll have gained any improved page-serving performance. If it's source pages you want to store in a database, then you lose the ability to do random Unixy things to source pages, including managing them in a revision control system. + +Static HTML pages in a filesystem and the ability to do random Unixy things are two of the uniquely awesome features of ikiwiki. It's probably possible to do what you want, but it's unlikely that you really want it. I'd suggest you either get to know ikiwiki better, or choose one of the many wiki implementations that already works as you describe. --[[Schmonz]] -- cgit v1.2.3 From acc3a2b53f346ea22ec4ba097bcf718f8df2460f Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 2 Aug 2009 10:44:17 -0400 Subject: sure maybe, but not with ikiwiki itself --- doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index e50eb4e1c..51b91d30d 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -3,3 +3,12 @@ Hi, Can you give me a hint for showing if one user is logged or not. If user is logged, then I want to display the user name, as wikipedia or dokuwiki for example. Regards, Xan. + +> ikiwiki doesn't serve pages, so this can't be done inside ikiwiki. +> For certain kinds of authentication it might be possible anyway. +> For instance, if you're using [[plugins/httpauth]] exclusively and +> your server has PHP, you could put ` ?>` in all the relevant ikiwiki [[templates]] and arrange for the +> generated HTML pages to get run through the PHP interpreter. The trick +> would work differently with other [[plugins/type/auth]] plugins, +> if at all. -- cgit v1.2.3 From e34f3dc8e61ef53adb83879608a3a552887666a3 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 2 Aug 2009 10:46:27 -0400 Subject: love, me --- doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index 51b91d30d..5ebde2cce 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -11,4 +11,4 @@ Xan. > ?>` in all the relevant ikiwiki [[templates]] and arrange for the > generated HTML pages to get run through the PHP interpreter. The trick > would work differently with other [[plugins/type/auth]] plugins, -> if at all. +> if at all. --[[Schmonz]] -- cgit v1.2.3 From efd0a66a70ca09241d11360855b0aab904bfb524 Mon Sep 17 00:00:00 2001 From: xan Date: Sun, 2 Aug 2009 10:50:16 -0400 Subject: --- doc/forum/ikiwiki_over_database__63__.wiki | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/ikiwiki_over_database__63__.wiki b/doc/forum/ikiwiki_over_database__63__.wiki index b6e7266e3..a70f9c989 100644 --- a/doc/forum/ikiwiki_over_database__63__.wiki +++ b/doc/forum/ikiwiki_over_database__63__.wiki @@ -5,3 +5,7 @@ Is there here any possibility to modifying ikiwiki (via plugin) for store pages ikiwiki generates static pages in a filesystem. It's responsible for editing and regenerating them, but they're served by any old web server. If you go to the trouble of stuffing the generated pages into a database, you'll need to go to further trouble to serve them back out somehow: write your own web server, perhaps, or a module for a particular web server. Either way you'll have sacrificed ikiwiki's interoperability, and it's not at all clear (since you're adding, in the best case, one layer of indirection reading the generated files) you'll have gained any improved page-serving performance. If it's source pages you want to store in a database, then you lose the ability to do random Unixy things to source pages, including managing them in a revision control system. Static HTML pages in a filesystem and the ability to do random Unixy things are two of the uniquely awesome features of ikiwiki. It's probably possible to do what you want, but it's unlikely that you really want it. I'd suggest you either get to know ikiwiki better, or choose one of the many wiki implementations that already works as you describe. --[[Schmonz]] + +--- + +Thanks, [[Schmonz]]. You clarify me much things,.... Xan. -- cgit v1.2.3 From d819fd6b04615adb1ccf40a5d49eb75178245c3a Mon Sep 17 00:00:00 2001 From: xan Date: Sun, 2 Aug 2009 10:51:31 -0400 Subject: --- doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index 5ebde2cce..04f6cc9b8 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -12,3 +12,5 @@ Xan. > generated HTML pages to get run through the PHP interpreter. The trick > would work differently with other [[plugins/type/auth]] plugins, > if at all. --[[Schmonz]] + +>> Thanks a lot, Xan. -- cgit v1.2.3 From baee2aa36b987ec6f75738570fa3f46030484f76 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 2 Aug 2009 13:35:04 -0400 Subject: --- doc/tips/mathopd.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/tips/mathopd.mdwn (limited to 'doc') diff --git a/doc/tips/mathopd.mdwn b/doc/tips/mathopd.mdwn new file mode 100644 index 000000000..ebcff995e --- /dev/null +++ b/doc/tips/mathopd.mdwn @@ -0,0 +1,10 @@ +When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. + +With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. + + append_indexes: cannot open .../[destdir]/[outputfile].html + open: Permission denied + +With `Umask 022` in mathopd.conf, editing pages works. + +Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) -- cgit v1.2.3 From 6810e5feaa072755bc2beebc80b923f2420004cf Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 2 Aug 2009 13:37:17 -0400 Subject: rename tips/mathopd.mdwn to tips/mathopd_permissions.mdwn --- doc/tips/mathopd.mdwn | 10 ---------- doc/tips/mathopd_permissions.mdwn | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 doc/tips/mathopd.mdwn create mode 100644 doc/tips/mathopd_permissions.mdwn (limited to 'doc') diff --git a/doc/tips/mathopd.mdwn b/doc/tips/mathopd.mdwn deleted file mode 100644 index ebcff995e..000000000 --- a/doc/tips/mathopd.mdwn +++ /dev/null @@ -1,10 +0,0 @@ -When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. - -With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. - - append_indexes: cannot open .../[destdir]/[outputfile].html - open: Permission denied - -With `Umask 022` in mathopd.conf, editing pages works. - -Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) diff --git a/doc/tips/mathopd_permissions.mdwn b/doc/tips/mathopd_permissions.mdwn new file mode 100644 index 000000000..ebcff995e --- /dev/null +++ b/doc/tips/mathopd_permissions.mdwn @@ -0,0 +1,10 @@ +When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. + +With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. + + append_indexes: cannot open .../[destdir]/[outputfile].html + open: Permission denied + +With `Umask 022` in mathopd.conf, editing pages works. + +Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) -- cgit v1.2.3 From 595c1d2a742a141db797a80b9643aa364e66ee8a Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 2 Aug 2009 13:40:06 -0400 Subject: --- doc/tips/mathopd_permissions.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/mathopd_permissions.mdwn b/doc/tips/mathopd_permissions.mdwn index ebcff995e..52a8767cc 100644 --- a/doc/tips/mathopd_permissions.mdwn +++ b/doc/tips/mathopd_permissions.mdwn @@ -1,6 +1,6 @@ When using [mathopd](http://www.mathopd.org) to serve ikiwiki, be careful of your Umask settings in the mathopd.conf. -With `Umask 026` in mathopd.conf, editing pages would result in the following errors and a 404 page when the wiki tried to take me to the updated page. +With `Umask 026` in mathopd.conf, editing pages resulted in the following errors and a 404 page when the wiki tried to take me to the updated page. append_indexes: cannot open .../[destdir]/[outputfile].html open: Permission denied -- cgit v1.2.3 From 91ec7b17208d7aa58408ad765231e2b62337f232 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 2 Aug 2009 14:36:56 -0400 Subject: new CVS locking weirdness and workaround --- doc/post-commit/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/post-commit/discussion.mdwn b/doc/post-commit/discussion.mdwn index 6ae0d9bcb..c78709e94 100644 --- a/doc/post-commit/discussion.mdwn +++ b/doc/post-commit/discussion.mdwn @@ -116,3 +116,8 @@ Can you offer an educated guess what's going wrong here? --[[Schmonz]] >> process, so you could just use a temporary list of things to add. >> --[[Joey]] +>>> Thanks for the comments. Attempting to set up a wiki on a different system with a different version of `cvs`, I've encountered a new locking problem within CVS: `cvs commit` takes a write lock, post-commit ikiwiki calls `rcs_update()`, `cvs update` wants a read lock and blocks. The easiest fix I can think of is to make `cvs commit` return and relinquish its lock -- so instead of my wrapper script `exec`ing ikiwiki's post-commit hook, I amp it off and exit 0. Seems to do the trick and, if I grok ikiwiki's behavior here, is not dangerous. (Beats me why my development `cvs` doesn't behave the same WRT locking.) + +>>> I was all set to take your third suggestion, but now that there's more than one CVS oddity fixed trivially in a wrapper script, I think I prefer doing it that way. + +>>> I'd be glad for the CVS plugin to be included in ikiwiki, if and when you deem it ready. Please let me know what needs to be done for that to happen. --[[Schmonz]] -- cgit v1.2.3 From cf3ab205e8104035bdea74d380bd6c5670fb0036 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 3 Aug 2009 02:56:42 -0400 Subject: note Perl module dependencies --- doc/plugins/contrib/cvs.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 1ff71d274..727c3524a 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -10,6 +10,7 @@ This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions Sy * creates a small post-commit wrapper to prevent `cvs add ` from being seen by ikiwiki's [[post-commit]] hook, * configures the wrapper itself as a post-commit hook in `CVSROOT/loginfo`. * [`cvsps`](http://www.cobite.com/cvsps/) is required (`rcs_recentchanges()` and `rcs_diff()` need it to work). +* [[!cpan IPC::Cmd]] and [[!cpan String::ShellQuote]] are required (to safely keep `cvs` quiet and to safely escape commit messages, respectively). * CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It might be possible to solve this problem with scripts like `commit_prep` and `log_accum` from CVS contrib. * Due to the name of CVS's metadata directories, it's impossible to create `.../CVS/foo.mdwn`. On case-insensitive filesystems it's also impossible to create `.../cvs/foo.mdwn`. * No testing or special-casing has been done with [[attachments|plugins/attachment]], but they'll probably need `cvs add -kb`. -- cgit v1.2.3 From 9468c553e1ee8d484e896bef4c5abbeda775cabf Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 3 Aug 2009 03:23:42 -0400 Subject: maybe prevent trying to create .../CVS/whatever.mdwn --- doc/plugins/contrib/cvs.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 727c3524a..fc5afebfd 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -12,7 +12,7 @@ This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions Sy * [`cvsps`](http://www.cobite.com/cvsps/) is required (`rcs_recentchanges()` and `rcs_diff()` need it to work). * [[!cpan IPC::Cmd]] and [[!cpan String::ShellQuote]] are required (to safely keep `cvs` quiet and to safely escape commit messages, respectively). * CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It might be possible to solve this problem with scripts like `commit_prep` and `log_accum` from CVS contrib. -* Due to the name of CVS's metadata directories, it's impossible to create `.../CVS/foo.mdwn`. On case-insensitive filesystems it's also impossible to create `.../cvs/foo.mdwn`. +* Due to the name of CVS's metadata directories, it's impossible to create `.../CVS/foo.mdwn`. On case-insensitive filesystems it's also impossible to create `.../cvs/foo.mdwn`. Since the failure can have confusing effects on one's CVS checkout, perhaps the web interface should prevent the attempt. * No testing or special-casing has been done with [[attachments|plugins/attachment]], but they'll probably need `cvs add -kb`. Having a `$HOME/.cvsrc` isn't necessary. Sure does make using CVS more livable, though. Here's a good general-purpose one: -- cgit v1.2.3 From b188a25e152dec8e0515b1f69bcafe67f540ca0a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Mon, 3 Aug 2009 06:01:50 -0400 Subject: can be done with Javascript? --- doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index 04f6cc9b8..ec3ca4138 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -14,3 +14,11 @@ Xan. > if at all. --[[Schmonz]] >> Thanks a lot, Xan. + +>>> Another possible trick would be to use some Javascript to make a +>>> "who am I?" AJAX request to the CGI (the CGI would receive the +>>> session cookie, if any, and be able to answer). Obviously, this +>>> wouldn't work for users who've disabled Javascript, but since it's +>>> non-essential, that's not so bad. You'd need to +>>> [[write_a_plugin|plugins/write]] to add a suitable CGI action, +>>> perhaps ?do=whoami, and insert the Javascript. --[[smcv]] -- cgit v1.2.3 From d55fbc812bbf4a167dcb92b10895fa38033af958 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 3 Aug 2009 12:54:13 -0400 Subject: response --- doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index ec3ca4138..239f78f5d 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -22,3 +22,8 @@ Xan. >>> non-essential, that's not so bad. You'd need to >>> [[write_a_plugin|plugins/write]] to add a suitable CGI action, >>> perhaps ?do=whoami, and insert the Javascript. --[[smcv]] + +>>>> Cool idea. A similar trick (I first saw it +>>>> [here](http://www.peej.co.uk/articles/http-auth-with-html-forms.html)) +>>>> could be used to provide a [[plugins/passwordauth]]-like login form +>>>> for [[plugins/httpauth]]. -- cgit v1.2.3 From 71f403a438b9b1e9e57bca55a02fe0fe5f4692e4 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 3 Aug 2009 13:27:11 -0400 Subject: whoops, resolve --- doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index 239f78f5d..83061cdab 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -26,4 +26,4 @@ Xan. >>>> Cool idea. A similar trick (I first saw it >>>> [here](http://www.peej.co.uk/articles/http-auth-with-html-forms.html)) >>>> could be used to provide a [[plugins/passwordauth]]-like login form ->>>> for [[plugins/httpauth]]. +>>>> for [[plugins/httpauth]]. --[[Schmonz]] -- cgit v1.2.3 From bc0eec4633828e69f0c03a5c3befbf34898deba3 Mon Sep 17 00:00:00 2001 From: j-ali Date: Tue, 4 Aug 2009 05:28:45 -0400 Subject: --- doc/bugs/post-commit_hangs.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/bugs/post-commit_hangs.mdwn (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn new file mode 100644 index 000000000..d6ea841ff --- /dev/null +++ b/doc/bugs/post-commit_hangs.mdwn @@ -0,0 +1 @@ +I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older version). Having done so, and used ikiwiki-transition to update setup file, the post commit hook is now blocking in flock (as seen by ps). I should also mention that I added the goodstuff, attachment and remove plugins (which was the purpose of upgrading to v3). Any clues as how to debug/fix gratefully received. The wiki is publically viewable at wiki.sgcm.org.uk if that helps. -- cgit v1.2.3 From c3a66316e0e44921439d98258f945a2fd2d679ca Mon Sep 17 00:00:00 2001 From: j-ali Date: Tue, 4 Aug 2009 05:41:07 -0400 Subject: --- doc/bugs/post-commit_hangs.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index d6ea841ff..b6245bcd8 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -1 +1,3 @@ +# post-commit hangs + I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older version). Having done so, and used ikiwiki-transition to update setup file, the post commit hook is now blocking in flock (as seen by ps). I should also mention that I added the goodstuff, attachment and remove plugins (which was the purpose of upgrading to v3). Any clues as how to debug/fix gratefully received. The wiki is publically viewable at wiki.sgcm.org.uk if that helps. -- cgit v1.2.3 From cae559f677c915519770e20888186cd6ad186931 Mon Sep 17 00:00:00 2001 From: "http://velmont.no/" Date: Tue, 4 Aug 2009 08:18:06 -0400 Subject: --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 93526c42c..d8d90e508 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1,4 +1,4 @@ -Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages +Ikiwiki is a **wiki compiler** written in Perl. It converts wiki pages into HTML pages suitable for publishing on a website. Ikiwiki stores pages and history in a [[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. There are many other [[features]], including support for -- cgit v1.2.3 From e3c944ae00f7250bdff9e8d2bf07a55b1d72a0e8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:33:27 -0400 Subject: Revert "written in perl" This reverts commit cae559f677c915519770e20888186cd6ad186931. Ikiwiki's implementation language is not so important as to appear in the first, key sentence of its website. The language is already documented elsewhere, as in the install page. --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index d8d90e508..93526c42c 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1,4 +1,4 @@ -Ikiwiki is a **wiki compiler** written in Perl. It converts wiki pages into HTML pages +Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages suitable for publishing on a website. Ikiwiki stores pages and history in a [[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. There are many other [[features]], including support for -- cgit v1.2.3 From a3959743b6b4e1b143d227aef8508f1606a59cff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:37:14 -0400 Subject: more info needed --- doc/bugs/post-commit_hangs.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index b6245bcd8..a091446de 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -1,3 +1,7 @@ # post-commit hangs I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older version). Having done so, and used ikiwiki-transition to update setup file, the post commit hook is now blocking in flock (as seen by ps). I should also mention that I added the goodstuff, attachment and remove plugins (which was the purpose of upgrading to v3). Any clues as how to debug/fix gratefully received. The wiki is publically viewable at wiki.sgcm.org.uk if that helps. + +> It's blocking when you do what? Save a page from the web? Make a commit +> to the underlaying VCS? Which VCS? These are all different code paths.. +> --[[Joey]] -- cgit v1.2.3 From 733d1773adfd5146cdf8ddf90338979a41665f24 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:40:22 -0400 Subject: responses --- doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn index 83061cdab..be9854a08 100644 --- a/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn +++ b/doc/forum/appear_if_you_are_login_or_not_in_a_page.mdwn @@ -23,7 +23,14 @@ Xan. >>> [[write_a_plugin|plugins/write]] to add a suitable CGI action, >>> perhaps ?do=whoami, and insert the Javascript. --[[smcv]] +>>>> It's an idea, but you're trading off a serious speed hit for a very +>>>> minor thing. --[[Joey]] + >>>> Cool idea. A similar trick (I first saw it >>>> [here](http://www.peej.co.uk/articles/http-auth-with-html-forms.html)) >>>> could be used to provide a [[plugins/passwordauth]]-like login form >>>> for [[plugins/httpauth]]. --[[Schmonz]] + +>>>>> I always assumed the entire reason someone might want to use the +>>>>> httpauth plugin is to avoid nasty site-specific login forms.. +>>>>> --[[Joey]] -- cgit v1.2.3 From e98e85ad751df94ff821c40f0dbd6d52e8fa64ae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:46:02 -0400 Subject: update with a few of out newer features --- doc/features.mdwn | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/features.mdwn b/doc/features.mdwn index ff341d2cc..3925d78ef 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -16,6 +16,10 @@ changes via [[Subversion|rcs/svn]], [[rcs/git]], or any of a number of other ikiwiki can be run from a [[post-commit]] hook to update your wiki immediately whenever you commit a change using the RCS. +It's even possible to securely let +[[anonymous_users_git_push_changes|tips/untrusted_git_push]] +to the wiki. + Note that ikiwiki does not require a RCS to function. If you want to run a simple wiki without page history, it can do that too. @@ -142,7 +146,8 @@ authentication, or other methods implemented via plugins. Thanks to subpages, every page can easily and automatically have a /Discussion subpage. By default, these links are included in the -[[templates]] for each page. +[[templates]] for each page. If you prefer blog-syle +[[plugins/comments]], that is available too. ### Edit controls @@ -161,6 +166,11 @@ Well, sorta. Rather than implementing YA history browser, it can link to ikiwiki can use the xapian search engine to add powerful full text [[plugins/search]] capabilities to your wiki. +### Translation via po files + +The [[plugins/po]] plugin allows translating individual wiki pages using +standard `po` files. + ### [[w3mmode]] Can be set up so that w3m can be used to browse a wiki and edit pages -- cgit v1.2.3 From a7dae30074f2918893e23af103658a8594621158 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:48:38 -0400 Subject: thought 2 --- doc/bugs/post-commit_hangs.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index a091446de..af40a3cee 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -5,3 +5,6 @@ I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older > It's blocking when you do what? Save a page from the web? Make a commit > to the underlaying VCS? Which VCS? These are all different code paths.. > --[[Joey]] + +> Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading +> modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] -- cgit v1.2.3 From ba64c720fe57b4c49e3a0757facd1ca2c85eb2e2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:50:52 -0400 Subject: mention ikiwiki's own umask setting --- doc/tips/mathopd_permissions.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/tips/mathopd_permissions.mdwn b/doc/tips/mathopd_permissions.mdwn index 52a8767cc..c0425b9ca 100644 --- a/doc/tips/mathopd_permissions.mdwn +++ b/doc/tips/mathopd_permissions.mdwn @@ -8,3 +8,8 @@ With `Umask 026` in mathopd.conf, editing pages resulted in the following errors With `Umask 022` in mathopd.conf, editing pages works. Hopefully this prevents someone else from spending ~2 hours figuring out why this wouldn't work. ;) + +> More generally, if your web server uses a nonstandard umask +> or you're getting permissions related problems in the cgi log +> when using ikiwiki, you can force ikiwiki to use a sane umask +> via the `umask` setting in ikiwiki's own setup file. --[[Joey]] -- cgit v1.2.3 From 264e82fc677a58a288fa9ab004bcdfe9e5bfc1d5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 13:53:50 -0400 Subject: ikiwiki is so sexy it doesn't have to say that it is --- doc/ikiwiki_is_so_sexy__33__.mdwn | 1 - 1 file changed, 1 deletion(-) delete mode 100644 doc/ikiwiki_is_so_sexy__33__.mdwn (limited to 'doc') diff --git a/doc/ikiwiki_is_so_sexy__33__.mdwn b/doc/ikiwiki_is_so_sexy__33__.mdwn deleted file mode 100644 index f59b664c2..000000000 --- a/doc/ikiwiki_is_so_sexy__33__.mdwn +++ /dev/null @@ -1 +0,0 @@ -Yes it is! -- cgit v1.2.3 From 3f33d3979c89610e1c8514c71c887acfa1c3ccac Mon Sep 17 00:00:00 2001 From: j-ali Date: Tue, 4 Aug 2009 16:18:49 -0400 Subject: --- doc/bugs/post-commit_hangs.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index af40a3cee..c28a34040 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -6,5 +6,11 @@ I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older > to the underlaying VCS? Which VCS? These are all different code paths.. > --[[Joey]] +>> It's blocking when I run "ikiwiki --setup ikiwiki.setup" (which calls hg update, which calls ikiwiki --post-commit). +>> Hmm, maybe it's the recursive call to ikiwiki which is the problem. +>> The underlying VCS is mercurial. --Ali + > Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading > modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] + +>> Good point. Not knowing perl, I just assumed /usr/local would take precedence. I've now used "dpkg -r ikiwiki" to remove the problem. --Ali -- cgit v1.2.3 From a41d8177d4769daf20ea88baddedcc3cbcd56c21 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 16:27:28 -0400 Subject: response --- doc/bugs/post-commit_hangs.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index c28a34040..a19441b92 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -10,6 +10,16 @@ I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older >> Hmm, maybe it's the recursive call to ikiwiki which is the problem. >> The underlying VCS is mercurial. --Ali +>>> You're not supposed to run ikiwiki -setup manually in your post commit hook. +>>> Doing so will certianly lead to a locking problem; it also forces ikiwiki to rebuild +>>> the entire wiki anytime a single page changes, which is very inefficient! +>>> +>>> Instead, you should use the `mercurial_wrapper` setting +>>> in the setup file, which will make ikiwiki generate a small +>>> executable expressly designed to be run at post commit time. +>>> Or, you can use the `--post-commit` option, as documented +>>> in [[rcs/mecurial]] --[[Joey]] + > Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading > modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] -- cgit v1.2.3 From 7096ffaa529a0c26490770c5a882b0f96af8ecd2 Mon Sep 17 00:00:00 2001 From: j-ali Date: Tue, 4 Aug 2009 16:34:52 -0400 Subject: --- doc/bugs/post-commit_hangs.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index a19441b92..1e16bc097 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -20,6 +20,10 @@ I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older >>> Or, you can use the `--post-commit` option, as documented >>> in [[rcs/mecurial]] --[[Joey]] +>>>> I don't run ikiwiki --setup in the commit hook; I run ikiwiki --post-commit (as mentioned above). +>>>> I'm trying to run ikiwiki --setup from the command line after modifying the setup file. +>>>> ikiwiki --setup is calling hg update, which is calling ikiwiki --post-commit. Am I not supposed to do that? --Ali + > Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading > modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] -- cgit v1.2.3 From e46ea2a687b97e96c54e21169f41f14f9b21728c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 16:38:22 -0400 Subject: response --- doc/bugs/post-commit_hangs.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index 1e16bc097..ee7f881d5 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -24,6 +24,9 @@ I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older >>>> I'm trying to run ikiwiki --setup from the command line after modifying the setup file. >>>> ikiwiki --setup is calling hg update, which is calling ikiwiki --post-commit. Am I not supposed to do that? --Ali +>>>>> No, I don't think that hg update should call ikiwiki anything. The +>>>>> [[hgrc_example|rcs/mercurial]] doesn't seem to configure it to do that? --[[Joey]] + > Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading > modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] -- cgit v1.2.3 From 2b98b1a0c1075a28ae43259b6591df25a4b2029c Mon Sep 17 00:00:00 2001 From: j-ali Date: Tue, 4 Aug 2009 16:45:30 -0400 Subject: --- doc/bugs/post-commit_hangs.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index ee7f881d5..a013f7919 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -27,6 +27,18 @@ I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older >>>>> No, I don't think that hg update should call ikiwiki anything. The >>>>> [[hgrc_example|rcs/mercurial]] doesn't seem to configure it to do that? --[[Joey]] +>>>>>> Ok, I'm not sure I understand what's going on, but my problem is solved. +>>>>>> +>>>>>> My hgrc used to say: +>>>>>> +>>>>>> [hooks] +>>>>>> +>>>>>> incoming.update = hg up +>>>>>> +>>>>>> update.ikiwiki = ikiwiki --setup /home/ikiwiki/ikiwiki.setup --post-commit +>>>>>> +>>>>>> I've now changed it to match the example page and it works. Thanks --Ali. + > Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading > modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] -- cgit v1.2.3 From 4a2a37e02e2a07de0d3c22265392776f4fdb7676 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 4 Aug 2009 16:52:12 -0400 Subject: close --- doc/bugs/post-commit_hangs.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/post-commit_hangs.mdwn b/doc/bugs/post-commit_hangs.mdwn index a013f7919..32820d886 100644 --- a/doc/bugs/post-commit_hangs.mdwn +++ b/doc/bugs/post-commit_hangs.mdwn @@ -39,6 +39,8 @@ I installed ikiwiki v3.14159 in /usr/local from tarball (/usr contains an older >>>>>> >>>>>> I've now changed it to match the example page and it works. Thanks --Ali. +>>>>>>> [[done]] + > Also, how have you arranged to keep it from seeing the installation in /usr? Perl could well be loading > modules from the old installation, and if it's one with a different locking strategy that would explain your problem. --[[Joey]] -- cgit v1.2.3 From 08d8c36a0bc6aa55df2df9341ddca42fc25f09a3 Mon Sep 17 00:00:00 2001 From: "http://adam.shand.net/" Date: Wed, 5 Aug 2009 06:02:00 -0400 Subject: --- .../HTML_for_parentlinks_makes_theming_hard.mdwn | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn (limited to 'doc') diff --git a/doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn b/doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn new file mode 100644 index 000000000..523042842 --- /dev/null +++ b/doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn @@ -0,0 +1,42 @@ +I'm trying to make a pretty theme for ikiwiki and I'm making progress (or at least I think I am :-). However I've noticed an issue when it comes to theming. On the front page the wiki name is put inside the "title" span and on all the other pages, it's put in the "parentlinks" span. See here: + +From [my dev home page](http://adam.shand.net/iki-dev/): + + +<div class="header"> +<span> +<span class="parentlinks"> + +</span> +<span class="title"> +adam.shand.net/iki-dev +</span> +</span><!--.header--> + +</div> + + +From a sub-page of [my dev home page](http://adam.shand.net/iki-dev/recipes/navajo_fry_bread/): + + +<div class="header"> +<span> +<span class="parentlinks"> + +<a href="../">adam.shand.net/iki-dev/ + +</span> +<span class="title"> +recipes +</span> +</span><!--.header--> + +</div> + + +I understand the logic behind doing this (on the front page it is the title as well as the name of the wiki) however if you want to do something different with the title of a page vs. the name of the wiki it makes things pretty tricky. + +I'll just modify the templates for my own site but I thought I'd report it as a bug in the hopes that it will be useful to others. + +Cheers, +Adam. -- cgit v1.2.3 From 389367854bce16f3f63d47262c594ed4d31373a3 Mon Sep 17 00:00:00 2001 From: "http://adam.shand.net/" Date: Wed, 5 Aug 2009 06:06:18 -0400 Subject: --- doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn b/doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn index 523042842..0cbef403d 100644 --- a/doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn +++ b/doc/bugs/HTML_for_parentlinks_makes_theming_hard.mdwn @@ -40,3 +40,6 @@ I'll just modify the templates for my own site but I thought I'd report it as a Cheers, Adam. + +---- +> I just noticed that it's also different on the comments, preferences and edit pages. I'll come up with a diff and see what you guys think. -- Adam. -- cgit v1.2.3 From 34e5f5eba3411855c9d3c733b6f11aa935f3d435 Mon Sep 17 00:00:00 2001 From: Jogo Date: Thu, 6 Aug 2009 08:43:45 -0400 Subject: --- doc/plugins/contrib/linguas.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/linguas.mdwn b/doc/plugins/contrib/linguas.mdwn index bf502606e..84ece042e 100644 --- a/doc/plugins/contrib/linguas.mdwn +++ b/doc/plugins/contrib/linguas.mdwn @@ -10,7 +10,7 @@ Download: [linguas.pm](http://ettin.org/pub/ikiwiki/linguas.pm) (2006-08-21). Note that even though it is still available for download, this plugin is no longer actively maintained. If you are interested in multilingual wiki pages, you -can also take a look at other approaches such as [[todo/l10n]], [[plugins/contrib/po]], +can also take a look at other approaches such as [[todo/l10n]], [[plugins/po]], or Lars Wirzenius's [Static website, with translations, using IkiWiki](http://liw.iki.fi/liw/log/2007-05.html#20070528b). -- cgit v1.2.3 From 0b2100727b3e9288ff9c6587924ff5390c61f19a Mon Sep 17 00:00:00 2001 From: Jogo Date: Thu, 6 Aug 2009 09:42:56 -0400 Subject: --- doc/plugins/contrib/navbar/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/plugins/contrib/navbar/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/navbar/discussion.mdwn b/doc/plugins/contrib/navbar/discussion.mdwn new file mode 100644 index 000000000..0bbec743c --- /dev/null +++ b/doc/plugins/contrib/navbar/discussion.mdwn @@ -0,0 +1,2 @@ +Where can I download this plugin ? +-- [[jogo]] -- cgit v1.2.3 From 4a331d8afc75f9c9fbfb1ef8d592fa1bfb4e2874 Mon Sep 17 00:00:00 2001 From: Jogo Date: Thu, 6 Aug 2009 13:07:22 -0400 Subject: --- doc/plugins/contrib/unixrelpagespec.mdwn | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/plugins/contrib/unixrelpagespec.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/unixrelpagespec.mdwn b/doc/plugins/contrib/unixrelpagespec.mdwn new file mode 100644 index 000000000..a35f76c30 --- /dev/null +++ b/doc/plugins/contrib/unixrelpagespec.mdwn @@ -0,0 +1,42 @@ +[[!template id=plugin name=unixrelpagespec core=0 author="[[Jogo]]"]] + +I don't understand why `./*` correspond to siblings and not subpages. +This is probably only meaningfull with [[plugins/autoindex]] turned on. + +Here is a small plugin wich follow usual Unix convention : + +- `./*` expand to subpages +- `../*` expand to siblings + +--- + #!/usr/bin/perl + # UnixRelPageSpec plugin. + # by Joseph Boudou + + package IkiWiki::Plugin::unixrelpagespec; + + use warnings; + use strict; + use IkiWiki 3.00; + + sub import { + inject( + name => 'IkiWiki::PageSpec::derel', + call => \&unix_derel + ); + } + + sub unix_derel ($$) { + my $path = shift; + my $from = shift; + + if ($path =~ m!^\.{1,2}/!) { + $from =~ s#/?[^/]+$## if (defined $from and $path =~ m/^\.{2}/); + $path =~ s#^\.{1,2}/##; + $path = "$from/$path" if length $from; + } + + return $path; + } + + 1; -- cgit v1.2.3 From bb4a121222436473f3136064ba89d31995e40691 Mon Sep 17 00:00:00 2001 From: buo Date: Thu, 6 Aug 2009 13:40:26 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/forum/Sidebar_with_links__63__.mdwn (limited to 'doc') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn new file mode 100644 index 000000000..c3252062a --- /dev/null +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -0,0 +1,41 @@ +I'm trying to create a template to use as a sidebar with links. The template will be static +(no variables are used). I first created a page with this directive: \[[!template id=sidebar]], +and then created the template with the web interface. + +This is the code I put in the template: + +
+
    +
  • \[[Existing internal link|exists]]
  • +
  • \[[Non-existing internal link|doesnotexist]]
  • +
  • [External link](http://google.com/)
  • +
+ +
+ +This is the relevant part of the resulting html file `template/sidebar.html`: + +
+ +
+ +Note that the `` link has disappeared, and that `[External link](http://google.com/)` +has been copied literally instead of being converted to a link, as I expected. + +Worse, this is the relevant part of the html file of the page that includes the template: + +
+
    +
  • Existing internal link
  • +
  • ?Non-existing internal link
  • +
  • [External link](http://google.com/)
  • +
+
+ +Note that the `Existing internal link` is no longer a link. It is only text. + +What am I doing wrong? Any help or pointers will be appreciated. --[[buo]] -- cgit v1.2.3 From fc60d256ddf6ee60f2d3f4965ba6e4cc365323b4 Mon Sep 17 00:00:00 2001 From: Jogo Date: Thu, 6 Aug 2009 15:51:24 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index c3252062a..7bc94242a 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -26,6 +26,8 @@ This is the relevant part of the resulting html file `template/sidebar.html`: Note that the `` link has disappeared, and that `[External link](http://google.com/)` has been copied literally instead of being converted to a link, as I expected. +> Templates aren't Markdown page. [[ikiwiki/WikiLink]] only are expanded. --[[Jogo]] + Worse, this is the relevant part of the html file of the page that includes the template:
-- cgit v1.2.3 From e6add3a196cbdb86e88a2f29b6a79ab7f250b8f6 Mon Sep 17 00:00:00 2001 From: Jogo Date: Thu, 6 Aug 2009 16:09:08 -0400 Subject: --- doc/users/jogo.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/users/jogo.mdwn (limited to 'doc') diff --git a/doc/users/jogo.mdwn b/doc/users/jogo.mdwn new file mode 100644 index 000000000..2a6577990 --- /dev/null +++ b/doc/users/jogo.mdwn @@ -0,0 +1,3 @@ +I'm looking at Ikiwiki, searching the best Wiki. The only other one I've found is [werc](http://werc.cat-v.org/). + +email: `jogo matabio net`. -- cgit v1.2.3 From 2162b6fd20ff1e4a06b734692719b2278b4ef5ad Mon Sep 17 00:00:00 2001 From: "http://tlavoie.pip.verisignlabs.com/" Date: Thu, 6 Aug 2009 17:36:37 -0400 Subject: --- doc/news/openid/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/news/openid/discussion.mdwn b/doc/news/openid/discussion.mdwn index aa9f3f0be..58bac1ae4 100644 --- a/doc/news/openid/discussion.mdwn +++ b/doc/news/openid/discussion.mdwn @@ -15,6 +15,8 @@ as well. Also have I just created an account on this wiki as well? > can configure it to eg, subscribe your email address to changes to pages. > --[[Joey]] +OK, my openid login works too. One question though, is there a setup parameter which controls whether new registrations are permitted at all? For instance, I'm thinking that I'd like to use the wiki format for content, but I don't want it editable by anyone who isn't already set up. Does this work? + ---- # How to ban an IP address? -- cgit v1.2.3 From c121f182dcfbb9b422cae020131a85dd02506db7 Mon Sep 17 00:00:00 2001 From: "http://tlavoie.pip.verisignlabs.com/" Date: Thu, 6 Aug 2009 17:45:34 -0400 Subject: --- doc/users/Tim_Lavoie.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/Tim_Lavoie.mdwn (limited to 'doc') diff --git a/doc/users/Tim_Lavoie.mdwn b/doc/users/Tim_Lavoie.mdwn new file mode 100644 index 000000000..90df011c6 --- /dev/null +++ b/doc/users/Tim_Lavoie.mdwn @@ -0,0 +1 @@ +Hey... I'm just starting to use ikiwiki, but am happy to find it repeatedly doing the sorts of things in a way which makes sense to me. (e.g. most pages are static, DVCS for file store etc.) -- cgit v1.2.3 From 52da709fd819d73b5e245a3154848969a9ef7c16 Mon Sep 17 00:00:00 2001 From: "http://tlavoie.pip.verisignlabs.com/" Date: Thu, 6 Aug 2009 17:47:43 -0400 Subject: --- doc/news/openid/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/news/openid/discussion.mdwn b/doc/news/openid/discussion.mdwn index 58bac1ae4..e611fa77b 100644 --- a/doc/news/openid/discussion.mdwn +++ b/doc/news/openid/discussion.mdwn @@ -15,7 +15,7 @@ as well. Also have I just created an account on this wiki as well? > can configure it to eg, subscribe your email address to changes to pages. > --[[Joey]] -OK, my openid login works too. One question though, is there a setup parameter which controls whether new registrations are permitted at all? For instance, I'm thinking that I'd like to use the wiki format for content, but I don't want it editable by anyone who isn't already set up. Does this work? +OK, my openid login works too. One question though, is there a setup parameter which controls whether new registrations are permitted at all? For instance, I'm thinking that I'd like to use the wiki format for content, but I don't want it editable by anyone who isn't already set up. Does this work? --[[Tim Lavoie]] ---- -- cgit v1.2.3 From c7ad7482f4357c43729214acc04901fa7fcf501e Mon Sep 17 00:00:00 2001 From: "http://bob-bernstein.myopenid.com/" Date: Thu, 6 Aug 2009 22:20:15 -0400 Subject: --- doc/plugins/htmlscrubber/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/plugins/htmlscrubber/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/htmlscrubber/discussion.mdwn b/doc/plugins/htmlscrubber/discussion.mdwn new file mode 100644 index 000000000..46697f6bd --- /dev/null +++ b/doc/plugins/htmlscrubber/discussion.mdwn @@ -0,0 +1,7 @@ +**Ok, I have yet to post a big dummy wiki-noobie question around here, so here goes:** + +Yes, I want to play around with *gulp* Google Ads on an ikiwiki blog, namely, in the *sidebar*. + +No, I do not want to turn htmlscrubber off, but apart from that I have not been able to allow <script> elements as required by Google. + +Thoughts? -- cgit v1.2.3 From 69d26eb5739fac2bac81554e3c31288011a57a48 Mon Sep 17 00:00:00 2001 From: "http://bob-bernstein.myopenid.com/" Date: Fri, 7 Aug 2009 01:09:03 -0400 Subject: --- doc/plugins/htmlscrubber/discussion.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/plugins/htmlscrubber/discussion.mdwn b/doc/plugins/htmlscrubber/discussion.mdwn index 46697f6bd..5e8b637b7 100644 --- a/doc/plugins/htmlscrubber/discussion.mdwn +++ b/doc/plugins/htmlscrubber/discussion.mdwn @@ -5,3 +5,14 @@ Yes, I want to play around with *gulp* Google Ads on an ikiwiki blog, namely, in No, I do not want to turn htmlscrubber off, but apart from that I have not been able to allow <script> elements as required by Google. Thoughts? + +--- + +***Fixed!*** + +Did some more reading, did some searching on the wiki, and found, under *embed*, these + + htmlscrubber_skip => '!*/Discussion', + locked_pages => '!*/Discussion', + +Thanks! -- cgit v1.2.3 From 9637e66932c72381adba4c56bb4d23d2539db717 Mon Sep 17 00:00:00 2001 From: buo Date: Fri, 7 Aug 2009 08:56:07 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index 7bc94242a..f3deb29c0 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -28,6 +28,10 @@ has been copied literally instead of being converted to a link, as I expected. > Templates aren't Markdown page. [[ikiwiki/WikiLink]] only are expanded. --[[Jogo]] +>> Thanks for the help Jogo. Looking at the [[templates]] page, it says that +"...you can include WikiLinks and all other forms of wiki markup in the template." I read this +to mean that a template may indeed include Markdown. Am I wrong in my interpratation? --[[buo]] + Worse, this is the relevant part of the html file of the page that includes the template:
-- cgit v1.2.3 From 03bfd6c317a035434ba4abd59704d22f7535b664 Mon Sep 17 00:00:00 2001 From: buo Date: Fri, 7 Aug 2009 14:52:30 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index f3deb29c0..79da03e5f 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -32,6 +32,10 @@ has been copied literally instead of being converted to a link, as I expected. "...you can include WikiLinks and all other forms of wiki markup in the template." I read this to mean that a template may indeed include Markdown. Am I wrong in my interpratation? --[[buo]] +>> I discovered that if I eliminate all html from my sidebar.mdwn template, the links are +rendered properly. It seems that the mix of Markdown and html is confusing some part of +Ikiwiki. --[[buo]] + Worse, this is the relevant part of the html file of the page that includes the template:
-- cgit v1.2.3 From 8fba0e710186071ca0a776140fe7b6acc8f07dad Mon Sep 17 00:00:00 2001 From: buo Date: Fri, 7 Aug 2009 15:26:07 -0400 Subject: Solved. --- doc/forum/Sidebar_with_links__63__.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index 79da03e5f..790ee85a2 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -49,3 +49,10 @@ Worse, this is the relevant part of the html file of the page that includes the Note that the `Existing internal link` is no longer a link. It is only text. What am I doing wrong? Any help or pointers will be appreciated. --[[buo]] + +----- + +I think I have figured this out. I thought the template was filled and then +processed to convert Markdown to html. Instead, the text in each variable is +processed and then the template is filled. I somehow misunderstood the +[[templates]] page. -- [[buo]] -- cgit v1.2.3 From 1632976f63787324b5466bea10a1e4e80d2d1989 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Aug 2009 12:10:57 -0400 Subject: Dragonfly BSD has been using ikiwiki for their website since last December --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 72bdbf3d8..2584de6ea 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -44,6 +44,7 @@ Projects & Organizations * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository. * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * The [GNU Hurd](http://www.gnu.org/software/hurd/)'s web pages +* [DragonFly BSD](http://www.dragonflybsd.org/) * The [Free Software Foundation](http://fsf.org) uses it for their internal wiki, with subversion. Personal sites and blogs -- cgit v1.2.3 From 92d0299ea02cba9221a7d9f67a504cadfdea5ea2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Aug 2009 12:15:44 -0400 Subject: move larger projects using ikiwiki to top of list --- doc/ikiwikiusers.mdwn | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 2584de6ea..db0d8cd9c 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -2,6 +2,12 @@ Projects & Organizations ======================== * [This wiki](http://ikiwiki.info) (of course!) +* The [GNU Hurd](http://www.gnu.org/software/hurd/) +* [DragonFly BSD](http://www.dragonflybsd.org/) +* [Monotone](http://monotone.ca/wiki/FrontPage/) +* The [Free Software Foundation](http://fsf.org) uses it for their internal wiki, with subversion. +* The [cairo graphics library](http://cairographics.org/) website. +* The [Portland State Aerospace Society](http://psas.pdx.edu) website. Converted from a combination of TWiki and MoinMoin to ikiwiki, including full history ([[rcs/Git]] backend). * [Planet Debian upstream](http://updo.debian.net/) * [Debian Mentors wiki](http://jameswestby.net/mentors/) * The [Sparse wiki](http://kernel.org/pub/linux/kernel/people/josh/sparse). @@ -13,8 +19,6 @@ Projects & Organizations * [Braawi Ltd](http://braawi.com/) and the community site [Braawi.org](http://braawi.org/) * [Webconverger](http://webconverger.org/) (a Web only linux distribution) with a [blog](http://webconverger.org/blog/) * [debian-community.org](http://debian-community.org/) -* The [cairo graphics library](http://cairographics.org/) website. -* The [Portland State Aerospace Society](http://psas.pdx.edu) website. Converted from a combination of TWiki and MoinMoin to ikiwiki, including full history ([[rcs/Git]] backend). * [DebTorrent](http://debtorrent.alioth.debian.org) * The [netconf project](http://netconf.alioth.debian.org) * The [Debian Packaging Handbook project](http://packaging-handbook.alioth.debian.org/wiki/) @@ -27,7 +31,6 @@ Projects & Organizations * [Enemies of Carlotta](http://www.e-o-c.org/) * [vcs-pkg](http://vcs-pkg.org) * [vcs-home](http://vcs-home.madduck.net) -* [GNU Hurd wiki](http://www.bddebian.com/~wiki/) * [Query Object Framework](http://qof.alioth.debian.org/) * [Estron - Object Relational Mapping interpreter](http://estron.alioth.debian.org/) * [Public Domain collection of Debian related tips & tricks](http://dabase.com/tips/) - please add any tips too @@ -37,20 +40,15 @@ Projects & Organizations * [Chaos Computer Club Düsseldorf](https://www.chaosdorf.de) * [monkeysphere](http://web.monkeysphere.info/) * [The Walden Effect](http://www.waldeneffect.org/) -* [Monotone](http://monotone.ca/wiki/FrontPage/) * The support pages for [Trinity Centre for High Performance Computing](http://www.tchpc.tcd.ie/support/) * [St Hugh of Lincoln Catholic Primary School in Surrey](http://www.sthugh-of-lincoln.surrey.sch.uk/) * [Pigro Network](http://www.pigro.net) is running a hg based ikiwiki. (And provides ikiwiki hosting for $10/m.) * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository. * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) -* The [GNU Hurd](http://www.gnu.org/software/hurd/)'s web pages -* [DragonFly BSD](http://www.dragonflybsd.org/) -* The [Free Software Foundation](http://fsf.org) uses it for their internal wiki, with subversion. Personal sites and blogs ======================== -* [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage * [[Joey]]'s [homepage](http://kitenet.net/~joey/), including his weblog * [Kyle's MacLea Genealogy wiki](http://kitenet.net/~kyle/family/wiki) and [Livingstone and MacLea Emigration Registry](http://kitenet.net/~kyle/family/registry) * [Ulrik's personal web page](http://kaizer.se/wiki/) @@ -124,10 +122,13 @@ Personal sites and blogs * [Natalian - Kai Hendry's personal blog](http://natalian.org/) * [Mick Pollard aka \_lunix_ - Personal sysadmin blog and wiki](http://www.lunix.com.au) * [tumashu's page](http://tumashu.github.com) This is my personal site in github created with ikiwiki and only a page,you can get the [source](http://github.com/tumashu/tumashu/tree/master) +* [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage Please feel free to add your own ikiwiki site! See also: [Debian ikiwiki popcon graph](http://qa.debian.org/popcon.php?package=ikiwiki) and [google search for ikiwiki powered sites](http://www.google.com/search?q=%22powered%20by%20ikiwiki%22). -While nothing makes me happier than knowing that ikiwiki has happy users, dropping some change in the [[TipJar]] is a nice way to show extra appreciation. +While nothing makes me happier than knowing that ikiwiki has happy users, +dropping some change in the [[TipJar]] is a nice way to show extra +appreciation. -- cgit v1.2.3 From c0c1e05daba09ce9c73c6c2f1ceca02b488613ba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Aug 2009 12:32:39 -0400 Subject: finish merging getsource --- debian/copyright | 2 +- doc/plugins/getsource.mdwn | 4 ++-- doc/todo/source_link.mdwn | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/debian/copyright b/debian/copyright index 762f9f445..b06d27f19 100644 --- a/debian/copyright +++ b/debian/copyright @@ -136,7 +136,7 @@ Files: 404.pm Copyright: © 2009 Simon McVittie License: GPL-2+ -Files: wmd.pm +Files: wmd.pm, getsource.pm Copyright: © 2009 William Uther License: GPL-2+ diff --git a/doc/plugins/getsource.mdwn b/doc/plugins/getsource.mdwn index 4fbf4be98..20040ccee 100644 --- a/doc/plugins/getsource.mdwn +++ b/doc/plugins/getsource.mdwn @@ -1,7 +1,7 @@ [[!template id=plugin name=getsource author="[[Will_Uther|Will]]"]] -This plugin adds a `getsource` action to the IkiWiki CGI, and a "Source" link -that uses it to display pages' source. +This plugin adds a "Source" link to the top of each page that uses +the CGI to display the page's source. Configuration for this plugin in the setup file: diff --git a/doc/todo/source_link.mdwn b/doc/todo/source_link.mdwn index 0c639a314..dfc2766cc 100644 --- a/doc/todo/source_link.mdwn +++ b/doc/todo/source_link.mdwn @@ -13,6 +13,7 @@ All of this code is licensed under the GPLv2+. -- [[Will]] [[!template id=gitbranch branch=smcv/ready/getsource author="[[Will]]/[[smcv]]"]] +[[done]] >> I've applied the patch below in a git branch, fixed my earlier criticism, >> and also fixed a couple of other issues I noticed: -- cgit v1.2.3 From 67bca4125d6fba24d69f53183949d89b632955dc Mon Sep 17 00:00:00 2001 From: "http://eric.shared.dre.am/" Date: Sat, 8 Aug 2009 14:39:11 -0400 Subject: --- doc/tips/dot_cgi.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/tips/dot_cgi.mdwn b/doc/tips/dot_cgi.mdwn index 4532c84cd..0379ece93 100644 --- a/doc/tips/dot_cgi.mdwn +++ b/doc/tips/dot_cgi.mdwn @@ -56,6 +56,10 @@ rule that allow `ikiwiki.cgi` to be executed. server (offline). I am not sure of how secure this approach is. If you have any thought about it, feel free to let me know. +## nginx + +* To run CGI under nginx, just us a FastCGI wrapper like [this one](http://technotes.1000lines.net/?p=23). The wrapper must be started somehow just like any other FastCGI program. I use launchd on OSX. + ## boa Edit /etc/boa/boa.conf and make sure the following line is not commented: -- cgit v1.2.3 From aa29cb5fc0126e90b4994d31e491179a1184e047 Mon Sep 17 00:00:00 2001 From: "http://joey.kitenet.net/" Date: Sat, 8 Aug 2009 15:39:37 -0400 Subject: typo --- doc/tips/dot_cgi.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/dot_cgi.mdwn b/doc/tips/dot_cgi.mdwn index 0379ece93..da55c1f1c 100644 --- a/doc/tips/dot_cgi.mdwn +++ b/doc/tips/dot_cgi.mdwn @@ -58,7 +58,7 @@ If you have any thought about it, feel free to let me know. ## nginx -* To run CGI under nginx, just us a FastCGI wrapper like [this one](http://technotes.1000lines.net/?p=23). The wrapper must be started somehow just like any other FastCGI program. I use launchd on OSX. +* To run CGI under nginx, just use a FastCGI wrapper like [this one](http://technotes.1000lines.net/?p=23). The wrapper must be started somehow just like any other FastCGI program. I use launchd on OSX. ## boa -- cgit v1.2.3 From 52ee05feb7f136d0211732f7a7f93960d3938555 Mon Sep 17 00:00:00 2001 From: "http://christine-spang.myopenid.com/" Date: Sat, 8 Aug 2009 16:04:58 -0400 Subject: --- doc/tips/importing_posts_from_typo.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/tips/importing_posts_from_typo.mdwn (limited to 'doc') diff --git a/doc/tips/importing_posts_from_typo.mdwn b/doc/tips/importing_posts_from_typo.mdwn new file mode 100644 index 000000000..1b87e7dae --- /dev/null +++ b/doc/tips/importing_posts_from_typo.mdwn @@ -0,0 +1 @@ +[Here](http://blog.spang.cc/posts/migrating_from_typo_to_ikiwiki/) is a blog post that gives instructions and a script for importing posts from [Typo](http://typosphere.org/), a Ruby-on-Rails based blogging engine. -- cgit v1.2.3 From 255835660b91e601b250bffe5a00751767b43f87 Mon Sep 17 00:00:00 2001 From: bremner Date: Sat, 8 Aug 2009 16:48:00 -0400 Subject: question (for joeyh?) about IkiWiki::refresh() --- doc/plugins/contrib/postal/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/plugins/contrib/postal/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/postal/discussion.mdwn b/doc/plugins/contrib/postal/discussion.mdwn new file mode 100644 index 000000000..90113eb41 --- /dev/null +++ b/doc/plugins/contrib/postal/discussion.mdwn @@ -0,0 +1,15 @@ +It seems like the filter 'postal-accept.pl' I wrote doesn't refresh thoroughly enough. When a comment is added it calls + + IkiWiki::add_depends($page,$comments_page); + +And then after adding the actual comment, it ends with + + IkiWiki::refresh(); + IkiWiki::saveindex(); + +Sure enough, the page being commented on is refreshed, but not any inline pages (e.g. tags pages, blog top level) that contain it. +Is there a way to recursively refresh? Or should it work that way by default. I guess it is some part of the api that I don't understand, +since I think not many people grub about in the internals of ikiwiki this way. +It would be nice to figure this out, doing a full rebuild every time I get a blog comment is not that fun. + +[[DavidBremner]] -- cgit v1.2.3 From eb5e6b2bb63a7e1096e6f16ecc9d5bf881b23983 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Aug 2009 17:01:10 -0400 Subject: response --- doc/plugins/contrib/postal/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/postal/discussion.mdwn b/doc/plugins/contrib/postal/discussion.mdwn index 90113eb41..3e6d056e2 100644 --- a/doc/plugins/contrib/postal/discussion.mdwn +++ b/doc/plugins/contrib/postal/discussion.mdwn @@ -13,3 +13,10 @@ since I think not many people grub about in the internals of ikiwiki this way. It would be nice to figure this out, doing a full rebuild every time I get a blog comment is not that fun. [[DavidBremner]] + +> Ikiwiki currently doesn't have support for transitive dependencies. +> This is discussed deep inside [[todo/tracking_bugs_with_dependencies]] +> and in [[todo/inlines_inheriting_links]]. +> +> FYI, the [[plugins/comments]] plugin avoids this problem by only showing the +> comments on the page, and not on pages that inline it. --[[Joey]] -- cgit v1.2.3 From 3c1ebd20f84f1ec654105340a1d7c28dd3748557 Mon Sep 17 00:00:00 2001 From: bremner Date: Sat, 8 Aug 2009 17:19:07 -0400 Subject: ok, thanks. I'll probably do the same. --- doc/plugins/contrib/postal/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/postal/discussion.mdwn b/doc/plugins/contrib/postal/discussion.mdwn index 3e6d056e2..4eaacc044 100644 --- a/doc/plugins/contrib/postal/discussion.mdwn +++ b/doc/plugins/contrib/postal/discussion.mdwn @@ -20,3 +20,5 @@ It would be nice to figure this out, doing a full rebuild every time I get a blo > > FYI, the [[plugins/comments]] plugin avoids this problem by only showing the > comments on the page, and not on pages that inline it. --[[Joey]] +>> Ok, thanks for the speedy response. I guess I should do the same thing. +>> [[DavidBremner]] -- cgit v1.2.3 From c86842711ffd76b1ce52ce9a5fc21bfae136aebb Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sat, 8 Aug 2009 19:19:32 -0400 Subject: centos question --- doc/plugins/highlight/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/highlight/discussion.mdwn b/doc/plugins/highlight/discussion.mdwn index 7d3cabea9..51d70bcf9 100644 --- a/doc/plugins/highlight/discussion.mdwn +++ b/doc/plugins/highlight/discussion.mdwn @@ -10,3 +10,7 @@ if you want to implement it I won't complain :-). [[DavidBremner]] > of, but if there are multiple options, giving each its own nane would > word better for websetup than would putting all the options in a > sub-hash. --[[Joey]] + + +Has anyone got this running with CentOS/RHEL ? +Having trouble working out where to get the perl bindings for highlight. --[Mick](http://www.lunix.com.au) -- cgit v1.2.3 From a0ace62664dd767a3894c1a708b8ed49e380c368 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 8 Aug 2009 20:27:50 -0400 Subject: point out where to get highlight perl bindings --- doc/plugins/highlight.mdwn | 6 ++++-- doc/plugins/highlight/discussion.mdwn | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/highlight.mdwn b/doc/plugins/highlight.mdwn index 44ced80f7..5f04fda52 100644 --- a/doc/plugins/highlight.mdwn +++ b/doc/plugins/highlight.mdwn @@ -8,8 +8,10 @@ languages and file formats. ## prerequisites You will need to install the perl bindings to the -[highlight library](http://www.andre-simon.de/), which in Debian -are in the [[!debpkg libhighlight-perl]] package. +[highlight library](http://www.andre-simon.de/). In Debian +they are in the [[!debpkg libhighlight-perl]] package. If +your distribution does not have them, look in `examples/swig` +in highlight's source. ## embedding highlighted code diff --git a/doc/plugins/highlight/discussion.mdwn b/doc/plugins/highlight/discussion.mdwn index 51d70bcf9..0c9e654c1 100644 --- a/doc/plugins/highlight/discussion.mdwn +++ b/doc/plugins/highlight/discussion.mdwn @@ -14,3 +14,6 @@ if you want to implement it I won't complain :-). [[DavidBremner]] Has anyone got this running with CentOS/RHEL ? Having trouble working out where to get the perl bindings for highlight. --[Mick](http://www.lunix.com.au) + +> The perl bindings are hidden in `examples/swig` in highlight's source. +> --[[Joey]] -- cgit v1.2.3 From 4e387bc6b65c4d56027ac93498e9782dbaba94d7 Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sat, 8 Aug 2009 21:11:03 -0400 Subject: reponse about highlight plugin --- doc/plugins/highlight/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/highlight/discussion.mdwn b/doc/plugins/highlight/discussion.mdwn index 0c9e654c1..3ae6149bf 100644 --- a/doc/plugins/highlight/discussion.mdwn +++ b/doc/plugins/highlight/discussion.mdwn @@ -17,3 +17,5 @@ Having trouble working out where to get the perl bindings for highlight. --[Mick > The perl bindings are hidden in `examples/swig` in highlight's source. > --[[Joey]] + +Thanks for prompt reply. Now just need to work out how to get it to work with inline code. I can not find the 'format' plugin to enable it. --[Mick](http://www.lunix.com.au) -- cgit v1.2.3 From c430c5ebd08e92f38975faa3ac99b0c68015099b Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sun, 9 Aug 2009 01:34:11 -0400 Subject: add my response --- doc/plugins/highlight/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/highlight/discussion.mdwn b/doc/plugins/highlight/discussion.mdwn index 3ae6149bf..556b04145 100644 --- a/doc/plugins/highlight/discussion.mdwn +++ b/doc/plugins/highlight/discussion.mdwn @@ -18,4 +18,4 @@ Having trouble working out where to get the perl bindings for highlight. --[Mick > The perl bindings are hidden in `examples/swig` in highlight's source. > --[[Joey]] -Thanks for prompt reply. Now just need to work out how to get it to work with inline code. I can not find the 'format' plugin to enable it. --[Mick](http://www.lunix.com.au) +Thanks for prompt reply.All working. I will post on my site tonight and link here what I did on CentOS to make this work. --[Mick](http://www.lunix.com.au) -- cgit v1.2.3 From d7773939ccc88452fea600a5fe72e5d14fb7a3f6 Mon Sep 17 00:00:00 2001 From: "http://christine-spang.myopenid.com/" Date: Sun, 9 Aug 2009 07:57:06 -0400 Subject: add user page for Christine Spang --- doc/users/Christine_Spang.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/Christine_Spang.mdwn (limited to 'doc') diff --git a/doc/users/Christine_Spang.mdwn b/doc/users/Christine_Spang.mdwn new file mode 100644 index 000000000..223e9739d --- /dev/null +++ b/doc/users/Christine_Spang.mdwn @@ -0,0 +1 @@ +Running ikiwiki on her [homepage](http://spang.cc/) and [blog](http://blog.spang.cc/). -- cgit v1.2.3 From 9d0f8c917ecb9b960845126446cebefab88f0380 Mon Sep 17 00:00:00 2001 From: "http://christine-spang.myopenid.com/" Date: Sun, 9 Aug 2009 08:01:12 -0400 Subject: add MIT SIPB to list of organisations using ikiwiki --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index db0d8cd9c..58dd51600 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -45,6 +45,7 @@ Projects & Organizations * [Pigro Network](http://www.pigro.net) is running a hg based ikiwiki. (And provides ikiwiki hosting for $10/m.) * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository. * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) +* [MIT Student Information Processing Board](http://sipb.mit.edu/) Personal sites and blogs ======================== -- cgit v1.2.3 From 792026fe97c47a3da4f941dc615ebf3bd428ad37 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 9 Aug 2009 22:06:02 -0400 Subject: add install and usage directions, to-do list --- doc/plugins/contrib/cvs.mdwn | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index fc5afebfd..db9cde98b 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -2,20 +2,16 @@ This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions System]] as an [[rcs]]. -* Diffs are against [[3.14159|news/version_3.14159]]. `cvs.pm` started life as a copy of `svn.pm`. -* `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. -* [[ikiwiki-makerepo]]: - * creates a repository, - * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), - * creates a small post-commit wrapper to prevent `cvs add ` from being seen by ikiwiki's [[post-commit]] hook, - * configures the wrapper itself as a post-commit hook in `CVSROOT/loginfo`. -* [`cvsps`](http://www.cobite.com/cvsps/) is required (`rcs_recentchanges()` and `rcs_diff()` need it to work). -* [[!cpan IPC::Cmd]] and [[!cpan String::ShellQuote]] are required (to safely keep `cvs` quiet and to safely escape commit messages, respectively). -* CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It might be possible to solve this problem with scripts like `commit_prep` and `log_accum` from CVS contrib. -* Due to the name of CVS's metadata directories, it's impossible to create `.../CVS/foo.mdwn`. On case-insensitive filesystems it's also impossible to create `.../cvs/foo.mdwn`. Since the failure can have confusing effects on one's CVS checkout, perhaps the web interface should prevent the attempt. -* No testing or special-casing has been done with [[attachments|plugins/attachment]], but they'll probably need `cvs add -kb`. +### Installation and usage +7. Apply patches to [`IkiWiki.pm`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-IkiWiki.pm.diff) +and [`ikiwiki-makerepo`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-ikiwiki-makerepo.diff). +7. Rebuild and install ikiwiki. +7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan IPC::Cmd]], [[!cpan String::ShellQuote]], and [cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. +7. Download [`cvs.pm`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs.pm) into a suitable `$libdir/IkiWiki/Plugin`. +7. While setting up a wiki [[by hand|setup/byhand]], also specify `--libdir` until you get to the point where you have a setup file. (This ensures the CVS plugin is found and its settings stanza included.) +7. Adjust CVS-related parameters in your setup file. -Having a `$HOME/.cvsrc` isn't necessary. Sure does make using CVS more livable, though. Here's a good general-purpose one: +Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn't need it, but you yourself might. Here's a good general-purpose one: cvs -q checkout -P @@ -23,10 +19,19 @@ Having a `$HOME/.cvsrc` isn't necessary. Sure does make using CVS more livable, diff -u rdiff -u -Not knowing how the tests get set up, I blindly attempted to add subversion-like tests to `t/file_pruned.t`. They fail. But the plugin definitely works. :-) +### Implementation details +* Diffs are against [[3.14159|news/version_3.14159]]. `cvs.pm` started life as a copy of `svn.pm`. +* `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. +* [[ikiwiki-makerepo]]: + * creates a repository, + * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), + * creates a small post-commit wrapper to prevent `cvs add ` from being seen by ikiwiki's [[post-commit]] hook, + * configures the wrapper itself as a post-commit hook in `CVSROOT/loginfo`. +* CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum`scripts (see below). -### Code -* [`cvs.pm`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs.pm) -* [`cvs-IkiWiki.pm.diff`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-IkiWiki.pm.diff) -* [`cvs-ikiwiki-makerepo.diff`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-ikiwiki-makerepo.diff) -* [`cvs-t-file_pruned.t.diff`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-t-file_pruned.t.diff) +### To do +* Add automated tests. ([Blindly adding svn-like tests to `t/file_pruned.t`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-t-file_pruned.t.diff) doesn't do the trick.) +* If the argument to `cvs add` smells like a binary file, `cvs add -kb` it (for [[plugins/attachment]] support). +* Don't slurp the entire `cvsps` output into memory (!). +* Instead of resource-intensively scraping changesets with `cvsps`, have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce and keep records of commits. `cvsps` can be used as a fallback for repositories without such records. +* Perhaps prevent web edits from attempting to create `.../CVS/foo.mdwn` (and `.../cvs/foo.mdwn` on case-insensitive filesystems); thanks to the CVS metadata directory, the attempt will fail anyway (and much more confusingly) if we don't. -- cgit v1.2.3 From af29201c3ce1099fbc3f8e6986d098fac6cef249 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 9 Aug 2009 22:09:42 -0400 Subject: the post-commit wrapper wrapper also avoids cvs deadlock --- doc/plugins/contrib/cvs.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index db9cde98b..f466b9399 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -25,9 +25,9 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * [[ikiwiki-makerepo]]: * creates a repository, * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), - * creates a small post-commit wrapper to prevent `cvs add ` from being seen by ikiwiki's [[post-commit]] hook, + * creates a small post-commit wrapper to prevent `cvs add ` from being seen by ikiwiki's [[post-commit]] hook (and avoid `cvs` locking against itself), * configures the wrapper itself as a post-commit hook in `CVSROOT/loginfo`. -* CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum`scripts (see below). +* CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). ### To do * Add automated tests. ([Blindly adding svn-like tests to `t/file_pruned.t`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-t-file_pruned.t.diff) doesn't do the trick.) -- cgit v1.2.3 From 8c4325d2ceb50533cea01128d119ff19fba2ea44 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Aug 2009 15:24:07 -0400 Subject: turn powered by ikiwiki link into link to the local documentation --- doc/basewiki/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/basewiki/index.mdwn b/doc/basewiki/index.mdwn index 05834e079..4187c1162 100644 --- a/doc/basewiki/index.mdwn +++ b/doc/basewiki/index.mdwn @@ -4,4 +4,4 @@ All wikis are supposed to have a [[SandBox]], so this one does too. ---- -This wiki is powered by [ikiwiki](http://ikiwiki.info/). +This wiki is powered by [[ikiwiki]]. -- cgit v1.2.3 From 83480665c256a344900fc817bcb4618f8db9aeee Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Aug 2009 15:59:32 -0400 Subject: po: Fix copy of po file from underlay when editing When first editing a page that was in the underlay, avoid losing the translation by copying the po file over from the underlay. --- IkiWiki/Plugin/po.pm | 15 +++++++++++++++ doc/plugins/po.mdwn | 11 ----------- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 0ae4adcfc..e9dc9dd8c 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -827,6 +827,21 @@ sub refreshpofiles ($@) { foreach my $pofile (@pofiles) { IkiWiki::prep_writefile(basename($pofile),dirname($pofile)); + + if (! -e $pofile) { + # If the po file exists in an underlay, copy it + # from there. + my ($pobase)=$pofile=~/^\Q$config{srcdir}\E\/?(.*)$/; + foreach my $dir (@{$config{underlaydirs}}) { + if (-e "$dir/$pobase") { + File::Copy::syscopy("$dir/$pobase",$pofile) + or error("po(refreshpofiles) ". + sprintf(gettext("failed to copy underlay PO file to %s"), + $pofile)); + } + } + } + if (-e $pofile) { system("msgmerge", "--previous", "-q", "-U", "--backup=none", $pofile, $potfile) == 0 or error("po(refreshpofiles) ". diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 0c8110563..2fbf67016 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -277,17 +277,6 @@ That used to be so, but the bug was fixed. Does this mean that po might be replacing the only link on a page, in error? --[[Joey]] -Bug when editing underlay file ------------------------------- - -While I've gotten translated underlays working, there is a bug -if the wiki is currently using a page from the underlay, and the master -language version is edited. This causes the edited page to be saved -to srcdir.. and all the translations get set to 0% and their -po files have the translated strings "emptied". What's really going on -is that these are entirely new po files not based on the old ones -in the basewiki, and thus lacking translations. --[[Joey]] - Documentation ------------- -- cgit v1.2.3 From fd80cec18d4ad6f2f1ecbe1feb37f065b6bb1f26 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Aug 2009 16:31:51 -0400 Subject: idea --- doc/todo/paste_plugin.mdwn | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 doc/todo/paste_plugin.mdwn (limited to 'doc') diff --git a/doc/todo/paste_plugin.mdwn b/doc/todo/paste_plugin.mdwn new file mode 100644 index 000000000..83384a8d7 --- /dev/null +++ b/doc/todo/paste_plugin.mdwn @@ -0,0 +1,36 @@ +It was suggested that using ikiwiki as an alternative to pastebin services +could be useful, especially if you want pastes to not expire and be +cloneable. + +All you really need is a special purpose ikiwiki instance that you commit +to by git. But a web interface for pasting could also be nice. + +There could be a directive that inserts a paste form onto a page. The form +would have a big textarea for pasting into, and might also have a file +upload button (for uploading instead of pasting). It could also copy the +page edit form's dropdown of markup types, which would be especially useful +if using the highlight plugin to support programming languages. The default +should probably be txt, not mdwn, if the txt plugin is enabled. + +(There's a lot of overlap between that and editpage of course .. similar +to the overlap between the comment form and editpage.) + +When posted, the form would just come up with a new, numeric subpage +of the page it appears on, and save the paste there. + +Another thing that might be useful is a "copy" (or "paste as new") action +on the action bar. This would take an existing paste and copy it into the +paste edit form, for editing and saving under a new id. + +--- + +A sample wiki configuration using this might be: + +* enable highlight and txt +* enable anonok so anyone can paste; lock anonymous users down to only + creating new pastes, not editing other pages +* disable modification of existing pastes (how? disabling editpage would + work, but that would disallow setting up anonymous git push) +* enable comments, so that each paste can be commented on +* enable getsource, so the source to a paste can easily be downloaded +* optionally, enable untrusted git push -- cgit v1.2.3 From 24d1cf19b8d711c445e1faf825889dd6cfd5bf4b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Aug 2009 16:34:14 -0400 Subject: typo --- doc/tips/untrusted_git_push.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/untrusted_git_push.mdwn b/doc/tips/untrusted_git_push.mdwn index aef67a3db..3573a0ddf 100644 --- a/doc/tips/untrusted_git_push.mdwn +++ b/doc/tips/untrusted_git_push.mdwn @@ -74,7 +74,7 @@ Once you're done modifying the setup file, don't forget to run You'll need to arrange the permissions on your bare git repository so that user anon can write to it. One way to do it is to create a group, and put -both anon and your regular user in that group. Then make make the bare git +both anon and your regular user in that group. Then make the bare git repository owned and writable by the group. See [[rcs/git]] for some more tips on setting up a git repository with multiple committers. -- cgit v1.2.3 From d165afb1f59f1f21a6968dc2be9fce4ab86d8c48 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Aug 2009 15:20:26 -0400 Subject: add news item for ikiwiki 3.15 --- doc/news/version_3.14.mdwn | 13 ------------- doc/news/version_3.15.mdwn | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 13 deletions(-) delete mode 100644 doc/news/version_3.14.mdwn create mode 100644 doc/news/version_3.15.mdwn (limited to 'doc') diff --git a/doc/news/version_3.14.mdwn b/doc/news/version_3.14.mdwn deleted file mode 100644 index 83c2b9188..000000000 --- a/doc/news/version_3.14.mdwn +++ /dev/null @@ -1,13 +0,0 @@ -ikiwiki 3.14 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * highlight: New plugin supporting syntax highlighting of pretty much - anything. - * debian/control: Add suggests for libhighlight-perl, although - that package is not yet created by Debian's highlight source package. - (See #529869) - * format: Provide a htmlizefallback hook that other plugins - can use to handle formats that are not suitable for general-purpose - htmlize hooks. Used by highlight. - * Fix test suite to not rely on an installed copy of ikiwiki after - underlaydir change. Closes: #[530502](http://bugs.debian.org/530502) - * Danish translation update. Closes: #[530877](http://bugs.debian.org/530877)"""]] \ No newline at end of file diff --git a/doc/news/version_3.15.mdwn b/doc/news/version_3.15.mdwn new file mode 100644 index 000000000..30a66ea23 --- /dev/null +++ b/doc/news/version_3.15.mdwn @@ -0,0 +1,19 @@ +ikiwiki 3.15 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Add new hooks: canremove, canrename, rename. (intrigeri) + * rename: Refactor subpage rename handling code into rename hook. (intrigeri) + * po: New plugin, suporting translation of wiki pages using po files. + (intrigeri) + * Add build machinery to build po files to translate the underlay wikis, + * Add further build machinery to generate translated underlays from + the po file, for use by wikis whose primary language is not English. + * Add Danish basewiki translation by Jonas Smedegaard. + * img: Fix adding of dependency from page to the image. + * pagestats: add `among` parameter, which only counts links from specified + pages (smcv) + * pagestats: when making a tag cloud, don't emit links where the tag is + unused (smcv) + * map: Avoid emitting an unclosed ul element if the map is empty. (harishcm) + * inline: Add pagenames parameter that can be used to list a set of + pages to inline, in a specific order, without using a PageSpec. (smcv) + * Add getsource plugin (Will, smcv)"""]] \ No newline at end of file -- cgit v1.2.3 From fc5c5df60ec6d30c1a284f4194f5ea8e2f5fa2c1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Aug 2009 16:24:28 -0400 Subject: releasing version 3.141592 --- debian/changelog | 2 +- doc/news/version_3.15.mdwn | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 doc/news/version_3.15.mdwn (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index d02ce888e..2cbf1403e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.15) unstable; urgency=low +ikiwiki (3.141592) unstable; urgency=low * Add new hooks: canremove, canrename, rename. (intrigeri) * rename: Refactor subpage rename handling code into rename hook. (intrigeri) diff --git a/doc/news/version_3.15.mdwn b/doc/news/version_3.15.mdwn deleted file mode 100644 index 30a66ea23..000000000 --- a/doc/news/version_3.15.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -ikiwiki 3.15 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Add new hooks: canremove, canrename, rename. (intrigeri) - * rename: Refactor subpage rename handling code into rename hook. (intrigeri) - * po: New plugin, suporting translation of wiki pages using po files. - (intrigeri) - * Add build machinery to build po files to translate the underlay wikis, - * Add further build machinery to generate translated underlays from - the po file, for use by wikis whose primary language is not English. - * Add Danish basewiki translation by Jonas Smedegaard. - * img: Fix adding of dependency from page to the image. - * pagestats: add `among` parameter, which only counts links from specified - pages (smcv) - * pagestats: when making a tag cloud, don't emit links where the tag is - unused (smcv) - * map: Avoid emitting an unclosed ul element if the map is empty. (harishcm) - * inline: Add pagenames parameter that can be used to list a set of - pages to inline, in a specific order, without using a PageSpec. (smcv) - * Add getsource plugin (Will, smcv)"""]] \ No newline at end of file -- cgit v1.2.3 From 55e062f2d1ba5505caf0eadd95240348ac05ec0e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Aug 2009 16:27:32 -0400 Subject: add news item for ikiwiki 3.141592 --- doc/news/version_3.141592.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/news/version_3.141592.mdwn (limited to 'doc') diff --git a/doc/news/version_3.141592.mdwn b/doc/news/version_3.141592.mdwn new file mode 100644 index 000000000..5911e07f9 --- /dev/null +++ b/doc/news/version_3.141592.mdwn @@ -0,0 +1,19 @@ +ikiwiki 3.141592 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Add new hooks: canremove, canrename, rename. (intrigeri) + * rename: Refactor subpage rename handling code into rename hook. (intrigeri) + * po: New plugin, suporting translation of wiki pages using po files. + (intrigeri) + * Add build machinery to build po files to translate the underlay wikis, + * Add further build machinery to generate translated underlays from + the po file, for use by wikis whose primary language is not English. + * Add Danish basewiki translation by Jonas Smedegaard. + * img: Fix adding of dependency from page to the image. + * pagestats: add `among` parameter, which only counts links from specified + pages (smcv) + * pagestats: when making a tag cloud, don't emit links where the tag is + unused (smcv) + * map: Avoid emitting an unclosed ul element if the map is empty. (harishcm) + * inline: Add pagenames parameter that can be used to list a set of + pages to inline, in a specific order, without using a PageSpec. (smcv) + * Add getsource plugin (Will, smcv)"""]] \ No newline at end of file -- cgit v1.2.3 From 92d185093c952c075d9b4040d8f3d1fa071449c9 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 12 Aug 2009 23:48:45 -0400 Subject: --- doc/ikiwiki/markdown/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/ikiwiki/markdown/discussion.mdwn (limited to 'doc') diff --git a/doc/ikiwiki/markdown/discussion.mdwn b/doc/ikiwiki/markdown/discussion.mdwn new file mode 100644 index 000000000..d3affec34 --- /dev/null +++ b/doc/ikiwiki/markdown/discussion.mdwn @@ -0,0 +1 @@ +Is anyone else having trouble using the definition list feature of multimarkdown? If not, then I could use some help figuring out why it's not working on my text site. Version is 3.141~bpo50+1 (debian backports), multimarkdown and mdwn support enabled in preferences. Any pointers to the obvious thing I'm missing would be appreciated. - dave -- cgit v1.2.3 From da1d046f61a51c9a2bb00f96d510f953fe73db9f Mon Sep 17 00:00:00 2001 From: lnussel Date: Thu, 13 Aug 2009 11:07:59 -0400 Subject: yes please --- doc/todo/Configurable_minimum_length_of_log_message_for_web_edits.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/Configurable_minimum_length_of_log_message_for_web_edits.mdwn b/doc/todo/Configurable_minimum_length_of_log_message_for_web_edits.mdwn index 7870281ae..74a4fb1b1 100644 --- a/doc/todo/Configurable_minimum_length_of_log_message_for_web_edits.mdwn +++ b/doc/todo/Configurable_minimum_length_of_log_message_for_web_edits.mdwn @@ -1,3 +1,5 @@ It would be nice to specify a minimum length for the change log for web edits, and if it's only required vs. non-required. I realise this is not going to solve the problem of crap log messages, but it helps guard against accidental submissions which one would have logged. Mediawiki/wikipedia has that option, and I find it a useful reminder. --[[madduck]] +> +1 --[[lnussel]] + [[!tag wishlist]] -- cgit v1.2.3 From 1c2bdf835217f7424383e881380ec51f2bff2dff Mon Sep 17 00:00:00 2001 From: lnussel Date: Thu, 13 Aug 2009 11:45:38 -0400 Subject: add comment about automenu plugin --- doc/todo/a_navbar_based_on_page_properties.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/todo/a_navbar_based_on_page_properties.mdwn b/doc/todo/a_navbar_based_on_page_properties.mdwn index 09be409ac..091e0a39b 100644 --- a/doc/todo/a_navbar_based_on_page_properties.mdwn +++ b/doc/todo/a_navbar_based_on_page_properties.mdwn @@ -38,4 +38,11 @@ well. There is a problem though if this navbar were included in a sidebar (the logical place): if a page is updated, the navbar needs to be rebuilt which causes the sidebar to be rebuilt, which causes the whole site to be rebuilt. Unless we can subscribe only to title changes, this will be pretty bad... --[[madduck]] + +> I've just written a plugin for a automatically created menu for use +> [here](http://www.ff-egersdorf-wachendorf.de/). The source is at +> [gitorious](http://gitorious.org/ikiwiki-plugins/automenu). The problem with +> rebuilding remains unsolved but doesn't matter that much for me as I always +> generate the web site myself, ie it's not really a wiki. --[[lnussel]] + [[!tag wishlist]] -- cgit v1.2.3 From 3c06e9497838bb4dd57dbf5b9c0c5f61a240b629 Mon Sep 17 00:00:00 2001 From: "91.105.86.99" <91.105.86.99@web> Date: Thu, 13 Aug 2009 14:05:59 -0400 Subject: poll vote (Accept only OpenID for logins) --- doc/news/openid.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index cc13a6548..7a6f84518 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 62 "Accept only OpenID for logins" 19 "Accept only password logins" 36 "Accept both"]] +[[!poll 63 "Accept only OpenID for logins" 19 "Accept only password logins" 36 "Accept both"]] -- cgit v1.2.3 From 7b3b0dabb309794bb1d7c9191b7236d2c87c389b Mon Sep 17 00:00:00 2001 From: lludwig Date: Thu, 13 Aug 2009 14:14:50 -0400 Subject: --- doc/forum/google_openid_broken__63__.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/forum/google_openid_broken__63__.mdwn (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn new file mode 100644 index 000000000..2ca339c3c --- /dev/null +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -0,0 +1,5 @@ +when I login via to this wiki (or ours) via Google's OpenID, I get this error: + +Error: OpenID failure: no_identity_server: The provided URL doesn't declare its OpenID identity server. + +Any idea how to fix this?? -- cgit v1.2.3 From 9e2c8a96cd3f54644f38d43d7beb347edda0684c Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Thu, 13 Aug 2009 17:14:32 -0400 Subject: add me new repo, yarrr --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 18fbd238b..1cd91e532 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -46,6 +46,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[arpitjain]] `git://github.com/arpitjain11/ikiwiki.git` * [[chrysn]] `git://github.com/github076986099/ikiwiki.git` * [[simonraven]] `git://github.com/kjikaqawej/ikiwiki-simon.git` +* [[schmonz]] `git://github.com/schmonz/ikiwiki.git` ## branches -- cgit v1.2.3 From d512d5802273faac184d133d64965336a68cd603 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 17:48:36 -0400 Subject: response --- doc/forum/google_openid_broken__63__.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 2ca339c3c..890bba4d9 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -3,3 +3,8 @@ when I login via to this wiki (or ours) via Google's OpenID, I get this error: Error: OpenID failure: no_identity_server: The provided URL doesn't declare its OpenID identity server. Any idea how to fix this?? + +> Google is [doing things with openid that are not in the spec](http://googledataapis.blogspot.com/2008/10/federated-login-for-google-account.html) +> and it's not clear to me that they intend regular openid to work at all. +> What is your google openid URL so I can take a look at the data they are +> providing? --[[Joey]] -- cgit v1.2.3 From 8ba32abaf27110d86a52720bcb738402bf90fadb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 17:55:01 -0400 Subject: review: question --- doc/plugins/contrib/cvs/discussion | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/plugins/contrib/cvs/discussion (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion b/doc/plugins/contrib/cvs/discussion new file mode 100644 index 000000000..e2411af63 --- /dev/null +++ b/doc/plugins/contrib/cvs/discussion @@ -0,0 +1,5 @@ +I've started reviewing this, and the main thing I don't like is the +post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. +That just seems unnecessarily complicated. Why can't ikiwiki itself detect +the "cvs add " call and avoid doing anything in that case? +--[[Joey]] -- cgit v1.2.3 From 3401dc6110ac785c1df3f447d2f1de017be92538 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 18:12:28 -0400 Subject: fix name --- doc/plugins/contrib/cvs/discussion | 5 ----- doc/plugins/contrib/cvs/discussion.mdwn | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 doc/plugins/contrib/cvs/discussion create mode 100644 doc/plugins/contrib/cvs/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion b/doc/plugins/contrib/cvs/discussion deleted file mode 100644 index e2411af63..000000000 --- a/doc/plugins/contrib/cvs/discussion +++ /dev/null @@ -1,5 +0,0 @@ -I've started reviewing this, and the main thing I don't like is the -post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. -That just seems unnecessarily complicated. Why can't ikiwiki itself detect -the "cvs add " call and avoid doing anything in that case? ---[[Joey]] diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn new file mode 100644 index 000000000..e2411af63 --- /dev/null +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -0,0 +1,5 @@ +I've started reviewing this, and the main thing I don't like is the +post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. +That just seems unnecessarily complicated. Why can't ikiwiki itself detect +the "cvs add " call and avoid doing anything in that case? +--[[Joey]] -- cgit v1.2.3 From 46c2d66fd37b12c2d02466118cb206000174f1b4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Aug 2009 19:05:27 -0400 Subject: disable pagecount here, sorta of excessive since the bug has been done --- doc/bugs/pagecount_is_broken.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/pagecount_is_broken.mdwn b/doc/bugs/pagecount_is_broken.mdwn index 101230d94..57df6b75d 100644 --- a/doc/bugs/pagecount_is_broken.mdwn +++ b/doc/bugs/pagecount_is_broken.mdwn @@ -1,3 +1,4 @@ -The [[plugins/pagecount]] plugin seems to be broken, as it claims there are [[!pagecount ]] pages in this wiki. (if it's not 0, the bug is fixed) +The [[plugins/pagecount]] plugin seems to be broken, as it claims there are +\[[!pagecount ]] pages in this wiki. (if it's not 0, the bug is fixed) [[fixed|done]] --[[Joey]] -- cgit v1.2.3 From 2007005cd2497ff10defa3e3e9cc91890df1c5d8 Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 13 Aug 2009 21:09:24 -0400 Subject: removed --- doc/ikiwiki/markdown/discussion.mdwn | 1 - 1 file changed, 1 deletion(-) delete mode 100644 doc/ikiwiki/markdown/discussion.mdwn (limited to 'doc') diff --git a/doc/ikiwiki/markdown/discussion.mdwn b/doc/ikiwiki/markdown/discussion.mdwn deleted file mode 100644 index d3affec34..000000000 --- a/doc/ikiwiki/markdown/discussion.mdwn +++ /dev/null @@ -1 +0,0 @@ -Is anyone else having trouble using the definition list feature of multimarkdown? If not, then I could use some help figuring out why it's not working on my text site. Version is 3.141~bpo50+1 (debian backports), multimarkdown and mdwn support enabled in preferences. Any pointers to the obvious thing I'm missing would be appreciated. - dave -- cgit v1.2.3 From 4bf7c24451f8a1c434851a98ca78a7d5dcba8461 Mon Sep 17 00:00:00 2001 From: "62.147.182.222" <62.147.182.222@web> Date: Fri, 14 Aug 2009 07:42:28 -0400 Subject: poll vote (Accept only password logins) --- doc/news/openid.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index 7a6f84518..79eeaec01 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 63 "Accept only OpenID for logins" 19 "Accept only password logins" 36 "Accept both"]] +[[!poll 63 "Accept only OpenID for logins" 20 "Accept only password logins" 36 "Accept both"]] -- cgit v1.2.3 From 110d6e18b438809b53f5a2a12d81659247079464 Mon Sep 17 00:00:00 2001 From: lludwig Date: Fri, 14 Aug 2009 09:49:49 -0400 Subject: --- doc/forum/google_openid_broken__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 890bba4d9..e0b24eab9 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -8,3 +8,7 @@ Any idea how to fix this?? > and it's not clear to me that they intend regular openid to work at all. > What is your google openid URL so I can take a look at the data they are > providing? --[[Joey]] + + +http://openid-provider.appspot.com/larrylud + -- cgit v1.2.3 From cfdabf348db8f8ba75aac39678b060b39824db08 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 14 Aug 2009 15:09:01 -0400 Subject: forwarded upstream with analysis --- doc/forum/google_openid_broken__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index e0b24eab9..0e0d8d118 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -12,3 +12,7 @@ Any idea how to fix this?? http://openid-provider.appspot.com/larrylud +> I've debugged this some and filed +> on the Openid perl +> module. It's a pretty easy fix, so I hope upstream will fix it quickly. +> --[[Joey]] -- cgit v1.2.3 From 3e086c84a2f826c77322a5dabdff1277eeb7152c Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Fri, 14 Aug 2009 19:10:57 -0400 Subject: Related comments on openid redirection. --- doc/forum/google_openid_broken__63__.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 0e0d8d118..1be9d0487 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -16,3 +16,15 @@ http://openid-provider.appspot.com/larrylud > on the Openid perl > module. It's a pretty easy fix, so I hope upstream will fix it quickly. > --[[Joey]] + +>> A little more information here: I'm using that same openid provider at the moment. Note that +>> that provider isn't google - it is someone using the google API to authenticate. I normally have it +>> set up as a redirect from my home page (which means I can change providers easily). + + + + +>> In that mode it works (I used it to log in to make this edit). However, when I try the openid +>> URL directly, it doesn't work. I think there is something weird with re-direction. I hope this +>> isn't a more general security hole. +>> -- [[Will]] -- cgit v1.2.3 From 1f64181f90a10b28fce3f2166b763a3333375ac9 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Fri, 14 Aug 2009 21:43:47 -0400 Subject: new dependency added --- doc/bugs/po_plugin_adds_new_dependency.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/bugs/po_plugin_adds_new_dependency.mdwn (limited to 'doc') diff --git a/doc/bugs/po_plugin_adds_new_dependency.mdwn b/doc/bugs/po_plugin_adds_new_dependency.mdwn new file mode 100644 index 000000000..880b491cf --- /dev/null +++ b/doc/bugs/po_plugin_adds_new_dependency.mdwn @@ -0,0 +1,10 @@ +Was it intended that the po plugin add a new dependency? + + PERL5LIB=.. ./po2wiki underlay.setup + Failed to load plugin IkiWiki::Plugin::po: Can't locate Locale/Po4a/Common.pm in @INC (@INC contains: .. /Library/Perl/Updates/5.8.8 /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 /sw/lib/perl5/5.8.8/darwin-thread-multi-2level /sw/lib/perl5/5.8.8 /sw/lib/perl5/darwin-thread-multi-2level /sw/lib/perl5 /sw/lib/perl5/darwin /usr/local/lib/perl5/site_perl/5.8.8/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at ../IkiWiki/Plugin/po.pm line 13. + BEGIN failed--compilation aborted at ../IkiWiki/Plugin/po.pm line 13. + Compilation failed in require at (eval 27) line 2. + BEGIN failed--compilation aborted at (eval 27) line 2. + + make[1]: *** [po2wiki_stamp] Error 2 + make: *** [extra_build] Error 2 -- cgit v1.2.3 From fdf30251334bfff4b03ed1bbdd85a8fd016e75a8 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Fri, 14 Aug 2009 22:21:04 -0400 Subject: --- doc/bugs/po_plugin_adds_new_dependency.mdwn | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'doc') diff --git a/doc/bugs/po_plugin_adds_new_dependency.mdwn b/doc/bugs/po_plugin_adds_new_dependency.mdwn index 880b491cf..3da326f48 100644 --- a/doc/bugs/po_plugin_adds_new_dependency.mdwn +++ b/doc/bugs/po_plugin_adds_new_dependency.mdwn @@ -8,3 +8,28 @@ Was it intended that the po plugin add a new dependency? make[1]: *** [po2wiki_stamp] Error 2 make: *** [extra_build] Error 2 + +And it looks like this dependency is not easy to work around. The issue is that the newly translated base wiki means that the po plugin is being used by the build system. It is no longer optional. I've turned it off in my workspace like this: (heavy handed, but it lets me keep going until a proper fix is available) + + diff --git a/Makefile.PL b/Makefile.PL + index 602d8fb..68728b7 100755 + --- a/Makefile.PL + +++ b/Makefile.PL + @@ -42,7 +42,7 @@ extra_build: ikiwiki.out ikiwiki.setup docwiki + ./mdwn2man ikiwiki-makerepo 1 doc/ikiwiki-makerepo.mdwn > ikiwiki-makerepo.man + ./mdwn2man ikiwiki-transition 1 doc/ikiwiki-transition.mdwn > ikiwiki-transition.man + ./mdwn2man ikiwiki-update-wikilist 1 doc/ikiwiki-update-wikilist.mdwn > ikiwiki-update-wikilist.man + - $(MAKE) -C po + + # $(MAKE) -C po + + docwiki: ikiwiki.out + $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup docwiki.setup -refresh + @@ -114,7 +114,7 @@ extra_install: underlay_install + install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki + install ikiwiki-makerepo ikiwiki-transition ikiwiki-update-wikilist $(DESTDIR)$(PREFIX)/bin/ + + - $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) + + # $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) + + # These might fail if a regular user is installing into a home + # directory. -- cgit v1.2.3 From c258160725a79953f28f799b31959b73e4beac77 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 13:59:04 -0400 Subject: review of ready branch --- debian/changelog | 1 + doc/todo/should_optimise_pagespecs.mdwn | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 147d279bb..5bef06aec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ ikiwiki (3.141593) UNRELEASED; urgency=low * Add discussionpage configuration setting. * Several optimisations, including speedups to orphans and brokenlinks calculation. + * meta, img: Fix bugs in dependency code. (smcv) -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 3ccef62fe..1919e3584 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -105,4 +105,33 @@ I can think about reducung the size of my wiki source and making it available on >>>>> ikiwiki-transition, but that copy doesn't have to be optimal or support >>>>> future features like [[tracking_bugs_with_dependencies]]). --[[smcv]] +--- + +Some questions on your optimize-depends branch. --[[Joey]] + +In saveindex it still or'd together the depends list, but the `{depends}` +field seems only useful for backwards compatability (ie, ikiwiki-transition +uses it still), and otherwise just bloats the index. + +Is an array the right data structure? `add_depends` has to loop through the +array to avoid dups, it would be better if a hash were used there. Since +inline (and other plugins) explicitly add all linked pages, each as a +separate item, the list can get rather long, and that single add_depends +loop has suddenly become O(N^2) to the number of pages, which is something +to avoid.. + +Also, since a lot of places are calling add_depends in a loop, it probably +makes sense to just make it accept a list of dependencies to add. It'll be +marginally faster, probably, and should allow for better optimisation +when adding a lot of depends at once. + +In Render.pm, we now have a triply nested loop, which is a bit +scary for efficiency. It seems there should be a way to +rework this code so it can use the optimised `pagespec_match_list`, +and/or hoist some of the inner loop calculations (like the `pagename`) +out. + +Very good catch on img/meta using the wrong dependency; verified in the wild! +(I've cherry-picked those bug fixes.) + [[!tag wishlist patch patch/core]] -- cgit v1.2.3 From 04760df3813a1b44043176e95bcd3eae6ba0507c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 14:10:39 -0400 Subject: Allow building ikiwiki on systems w/o po4a -- building of the translated underlays will be skipped in this case. --- debian/changelog | 2 + doc/bugs/po_plugin_adds_new_dependency.mdwn | 3 + po/Makefile | 7 +- po/bg.po | 129 ++++++++++++++------------- po/cs.po | 129 ++++++++++++++------------- po/da.po | 129 ++++++++++++++------------- po/de.po | 129 ++++++++++++++------------- po/es.po | 131 ++++++++++++++-------------- po/fr.po | 129 ++++++++++++++------------- po/gu.po | 129 ++++++++++++++------------- po/ikiwiki.pot | 126 +++++++++++++------------- po/pl.po | 129 ++++++++++++++------------- po/sv.po | 129 ++++++++++++++------------- po/vi.po | 129 ++++++++++++++------------- 14 files changed, 712 insertions(+), 718 deletions(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 5bef06aec..39ff60717 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ ikiwiki (3.141593) UNRELEASED; urgency=low * Several optimisations, including speedups to orphans and brokenlinks calculation. * meta, img: Fix bugs in dependency code. (smcv) + * Allow building ikiwiki on systems w/o po4a -- + building of the translated underlays will be skipped in this case. -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/bugs/po_plugin_adds_new_dependency.mdwn b/doc/bugs/po_plugin_adds_new_dependency.mdwn index 3da326f48..3ddcc30f2 100644 --- a/doc/bugs/po_plugin_adds_new_dependency.mdwn +++ b/doc/bugs/po_plugin_adds_new_dependency.mdwn @@ -1,5 +1,8 @@ Was it intended that the po plugin add a new dependency? +> Yes; see debian/control Build-Depends. However, I have made it disable +> building that is po4a is not available. [[done]] --[[Joey]] + PERL5LIB=.. ./po2wiki underlay.setup Failed to load plugin IkiWiki::Plugin::po: Can't locate Locale/Po4a/Common.pm in @INC (@INC contains: .. /Library/Perl/Updates/5.8.8 /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 /sw/lib/perl5/5.8.8/darwin-thread-multi-2level /sw/lib/perl5/5.8.8 /sw/lib/perl5/darwin-thread-multi-2level /sw/lib/perl5 /sw/lib/perl5/darwin /usr/local/lib/perl5/site_perl/5.8.8/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at ../IkiWiki/Plugin/po.pm line 13. BEGIN failed--compilation aborted at ../IkiWiki/Plugin/po.pm line 13. diff --git a/po/Makefile b/po/Makefile index d67c3a4ff..d094733b1 100644 --- a/po/Makefile +++ b/po/Makefile @@ -5,7 +5,10 @@ POTFILES=$(sort $(shell find ../IkiWiki -type f -name \*.pm)) \ POFILES=$(wildcard *.po) MOFILES=$(POFILES:.po=.mo) -all: ikiwiki.pot mo ../underlays/locale +# Translated underlays can only be generated if po4a is available. +TRANSLATED_UNDERLAYS=$(shell if perl -e 'use Locale::Po4a::Common' 2>/dev/null; then echo ../underlays/locale; fi) + +all: ikiwiki.pot mo $(TRANSLATED_UNDERLAYS) mo: $(MOFILES) @@ -83,7 +86,7 @@ underlays: ../ikiwiki.out underlays_copy_stamp ../Makefile: ../Makefile.PL cd .. && ./Makefile.PL -../underlays/locale: po2wiki_stamp +$(TRANSLATED_UNDERLAYS): po2wiki_stamp po2wiki_stamp: po2wiki underlays_copy_stamp PERL5LIB=.. ./po2wiki underlay.setup touch $@ diff --git a/po/bg.po b/po/bg.po index 8ffbf26a4..d29f81723 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-bg\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2007-01-12 01:19+0200\n" "Last-Translator: Damyan Ivanov \n" "Language-Team: Bulgarian \n" @@ -55,7 +55,7 @@ msgstr "Предпочитанията са запазени." msgid "You are banned." msgstr "Достъпът ви е забранен." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Грешка" @@ -188,20 +188,12 @@ msgid "" "\">blogspam: " msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Дискусия" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Няма „счупени” връзки!" @@ -296,14 +288,14 @@ msgstr "премахване на старата страница „%s”" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "създаване на %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "промяна на %s" @@ -371,7 +363,7 @@ msgstr "" msgid "you are not allowed to change file modes" msgstr "" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -447,30 +439,30 @@ msgstr "шаблонът „%s” не е намерен" msgid "missing pages parameter" msgstr "липсващ параметър „id” на шаблона" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "модулът „RPC::XML::Client” не е намерен; източникът не е проверен" @@ -501,7 +493,7 @@ msgstr "" msgid "stylesheet not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 #, fuzzy msgid "redir page not found" msgstr "шаблонът „%s” не е намерен" @@ -535,7 +527,7 @@ msgstr "" msgid "Get an OpenID" msgstr "Получаване на OpenID номер" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Всички страници имат връзки от други страници." @@ -595,103 +587,103 @@ msgstr "" msgid "LWP not found, not pinging" msgstr "модулът „RPC::XML::Client” не е намерен; източникът не е проверен" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "дискусия" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "промяна на %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "приставката „linkmap”: грешка при изпълнение на „dot”" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1043,54 +1035,54 @@ msgstr "" msgid "bad file name %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "премахване на старата страница „%s”" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "сканиране на „%s”" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "обновяване на страницата „%s”, съдържаща препратки към „%s”" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "обновяване на страницата „%s”, зависеща от „%s”" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "обновяване на „%s” и осъвременяване на обратните връзки" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "премахване на „%s” понеже не се генерира от „%s”" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: неуспех при обновяване на страницата „%s”" @@ -1169,31 +1161,35 @@ msgstr "обновяване на уики..." msgid "refreshing wiki.." msgstr "осъвременяване на уики..." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Дискусия" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "При използване на пареметъра „--cgi” е необходимо да се укаже и " "местоположението на уикито чрез параметъра „--url”" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "грешка при четене на „%s”: %s" @@ -1218,6 +1214,9 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#~ msgid "discussion" +#~ msgstr "дискусия" + #~ msgid "rendering %s" #~ msgstr "обновяване на страницата „%s”" diff --git a/po/cs.po b/po/cs.po index e377b0cf2..657d2852c 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2007-05-09 21:21+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" @@ -53,7 +53,7 @@ msgstr "Nastavení uloženo." msgid "You are banned." msgstr "Jste vyhoštěni." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Chyba" @@ -185,20 +185,12 @@ msgid "" "\">blogspam: " msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Diskuse" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Žádné porušené odkazy!" @@ -293,14 +285,14 @@ msgstr "odstraňuji starou stránku %s" msgid "%s is not an editable page" msgstr "%s není editovatelná stránka" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "vytvářím %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "upravuji %s" @@ -368,7 +360,7 @@ msgstr "" msgid "you are not allowed to change file modes" msgstr "" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -441,30 +433,30 @@ msgstr "zdroj nebyl nalezen" msgid "missing pages parameter" msgstr "chybí parametr %s" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "neznámý typ řazení %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "Přidat nový příspěvek nazvaný:" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "neexistující šablona %s" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nebyl nalezen, nepinkám" @@ -491,7 +483,7 @@ msgstr "" msgid "stylesheet not found" msgstr "styl nebyl nalezen" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 #, fuzzy msgid "redir page not found" msgstr "zdroj nebyl nalezen" @@ -525,7 +517,7 @@ msgstr "Přihlásit pomocí" msgid "Get an OpenID" msgstr "Získat OpenID" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Na každou stránku vede odkaz z jiné stránky." @@ -585,103 +577,103 @@ msgstr "" msgid "LWP not found, not pinging" msgstr "RPC::XML::Client nebyl nalezen, nepinkám" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s není editovatelná stránka" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "diskuse" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "upravuji %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "nelze zkompilovat %s" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "nelze zkompilovat %s" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "nelze zkompilovat %s" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "nelze změnit velikost: %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "nelze zapsat %s: %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "nepodařilo se spustit dot" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "nelze číst %s: %s" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1029,54 +1021,54 @@ msgstr "" msgid "bad file name %s" msgstr "přeskakuji chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "přeskakuji chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "odstraňuji starou stránku %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "prohledávám %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "zpracovávám %s, která odkazuje na %s" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "zpracovávám %s, která závisí na %s" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "zpracovávám %s, aby se aktualizovaly zpětné odkazy" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "odstraňuji %s, již není zpracovávána %s" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: nelze zpracovat %s" @@ -1155,29 +1147,33 @@ msgstr "znovu vytvářím wiki..." msgid "refreshing wiki.." msgstr "obnovuji wiki..." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Diskuse" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Při použití --cgi musíte pomocí --url zadat url k wiki" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Byla rozpoznána smyčka direktivy %s na %s v hloubce %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "nemohu číst %s: %s" @@ -1202,6 +1198,9 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#~ msgid "discussion" +#~ msgstr "diskuse" + #~ msgid "rendering %s" #~ msgstr "zpracovávám %s" diff --git a/po/da.po b/po/da.po index 9ced576d8..b4e06535b 100644 --- a/po/da.po +++ b/po/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2009-07-23 01:07+0200\n" "Last-Translator: Jonas Smedegaard \n" "Language-Team: None\n" @@ -59,7 +59,7 @@ msgstr "Indstillinger gemt" msgid "You are banned." msgstr "Du er banlyst." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Fejl" @@ -193,20 +193,12 @@ msgstr "" "Beklager, men det ligner spam til blogspam: " -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Diskussion" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "%s fra %s" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Ingen henvisninger der ikker fungerer!" @@ -301,14 +293,14 @@ msgstr "fjerner gammelt smugkig %s" msgid "%s is not an editable page" msgstr "%s er ikke en redigérbar side" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "opretter %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "redigerer %s" @@ -372,7 +364,7 @@ msgstr "du kan ikke påvirke en fil med modus %s" msgid "you are not allowed to change file modes" msgstr "du har ikke lov til at ændre modus for filer" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, perl-format msgid "Must specify %s when using the %s plugin" @@ -444,30 +436,30 @@ msgstr "sideredigering er ikke tilladt" msgid "missing pages parameter" msgstr "mangler pages-parametren" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "Sort::Naturally krævet for title_natural sortering" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "ukendt sorteringsform %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "Tilføj nyt indlæg med følgende titel:" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "ikke-eksisterende skabelon: %s" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client ikke fundet, pinger ikke" @@ -496,7 +488,7 @@ msgstr "" msgid "stylesheet not found" msgstr "stilsnit (stylesheet) ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 msgid "redir page not found" msgstr "henvisningsside ikke fundet" @@ -528,7 +520,7 @@ msgstr "Log på med" msgid "Get an OpenID" msgstr "Skaf en OpenID" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 msgid "All pages have other pages linking to them." msgstr "Alle sider har henvisninger fra andre sider." @@ -587,12 +579,16 @@ msgstr "ignorerer ping-direktiv for wiki %s (denne wiki er %s)" msgid "LWP not found, not pinging" msgstr "LWP ikke fundet, pinger ikke" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, perl-format msgid "%s is not a valid language code" msgstr "%s er ikke en gyldig sprogkode" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -600,7 +596,7 @@ msgstr "" "%s er ikke en gyldig værdi for po_link_to, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -608,25 +604,21 @@ msgstr "" "po_link_to=negotiated kræver at usedirs er aktiveret, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "diskussion" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "gendanner alle sider for at korrigere meta titler" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, perl-format msgid "building %s" msgstr "danner %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "opdaterer PO-filer" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -634,7 +626,7 @@ msgstr "" "Kan ikke fjerne en oversættelse. Fjern i stedet hovedsiden, så fjernes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -642,55 +634,55 @@ msgstr "" "Kan ikke omdøbe en oversættelse. Omdøb i stedet hovedsiden, så omdøbes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-filen %s eksisterer ikke" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, perl-format msgid "failed to update %s" msgstr "opdatering af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, perl-format msgid "failed to translate %s" msgstr "oversættelse af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "forældede PO filer fjernet" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, perl-format msgid "failed to write %s" msgstr "skrivning af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 msgid "failed to translate" msgstr "oversættelse mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, perl-format msgid "failed to read %s" msgstr "læsning af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "forkert gettext-data, gå tilbage til forrige side og fortsæt redigering" @@ -1034,7 +1026,7 @@ msgstr "kan ikke afgøre id for ikke-tillidsfulde skribent %s" msgid "bad file name %s" msgstr "dårligt filnavn %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1043,47 +1035,47 @@ msgstr "" "symbolsk lænke fundet i srcdir-sti (%s) -- sæt allow_symlinks_before_srcdir " "for at tillade dette" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "udelader forkert filnavn %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s har flere mulige kildesider" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "fjerner gammel side %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "gennemlæser %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, perl-format msgid "building %s, which links to %s" msgstr "danner %s, som henviser til %s" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, perl-format msgid "building %s, which depends on %s" msgstr "danner %s, som afhænger af %s" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, to update its backlinks" msgstr "danner %s, for at opdatere dens krydshenvisninger (backlinks)" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, perl-format msgid "removing %s, no longer built by %s" msgstr "fjerner %s, ikke længere dannet af %s" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan ikke danne %s" @@ -1162,30 +1154,34 @@ msgstr "genopbygger wiki..." msgid "refreshing wiki.." msgstr "genopfrisker wiki..." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Diskussion" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Skal angive url til wiki med --url når der bruges --cgi" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "kan ikke bruge flere samtidige RCS-udvidelser" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" "indlæsning af ekstern udvidelse krævet af udvidelsen %s mislykkedes: %s" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "forudberegningssløkke fundet på %s ved dybde %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, perl-format msgid "cannot match pages: %s" msgstr "kan ikke få sider til at passe sammen: %s" @@ -1209,3 +1205,6 @@ msgstr "Hvilken bruger (wiki konto eller openid) skal være administrator?" #: ../auto.setup:23 msgid "What is the domain name of the web server?" msgstr "Hvad er webserverens domænenavn?" + +#~ msgid "discussion" +#~ msgstr "diskussion" diff --git a/po/de.po b/po/de.po index 83a70bd9c..51c1b0fca 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2009-07-23 01:07+0100\n" "Last-Translator: Kurt Gramlich \n" "Language-Team: German \n" @@ -56,7 +56,7 @@ msgstr "Einstellungen gespeichert." msgid "You are banned." msgstr "Sie sind ausgeschlossen worden." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Fehler" @@ -190,20 +190,12 @@ msgstr "" "Entschuldigung, aber blogspam stuft das " "als Spam ein: " -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Diskussion" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "%s von %s" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Es gibt keine ungültigen Verweise!" @@ -299,14 +291,14 @@ msgstr "entferne alte Vorschau %s" msgid "%s is not an editable page" msgstr "Seite %s kann nicht bearbeitet werden" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "erstelle %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "bearbeite %s" @@ -370,7 +362,7 @@ msgstr "Sie können eine Datei mit den Zugriffsrechten %s nicht nutzen" msgid "you are not allowed to change file modes" msgstr "Sie dürfen die Zugriffsrechte der Datei nicht ändern" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, perl-format msgid "Must specify %s when using the %s plugin" @@ -444,30 +436,30 @@ msgstr "bearbeiten der Seiten nicht erlaubt" msgid "missing pages parameter" msgstr "fehlender Seitenparameter" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "Sort::Naturally wird benötigt für title_natural sort" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "Füge einen neuen Beitrag hinzu. Titel:" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "nicht-vorhandene Vorlage %s" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nicht gefunden, führe Ping nicht aus" @@ -497,7 +489,7 @@ msgstr "" msgid "stylesheet not found" msgstr "Stylesheet nicht gefunden" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 msgid "redir page not found" msgstr "Umleitungsseite nicht gefunden" @@ -529,7 +521,7 @@ msgstr "Anmelden mit" msgid "Get an OpenID" msgstr "Eine OpenID anfordern" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Alle Seiten haben mindenstens einen Verweis von einer anderen Seite." @@ -590,12 +582,16 @@ msgstr "Ignoriere die ping Anweisung für das Wiki %s (dieses Wiki ist %s)" msgid "LWP not found, not pinging" msgstr "LWP nicht gefunden, führe Ping nicht aus" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, perl-format msgid "%s is not a valid language code" msgstr "%s ist keine gültige Sprachkodierung" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -603,7 +599,7 @@ msgstr "" "%s ist kein gültiger Wert für po_link_to, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -611,25 +607,21 @@ msgstr "" "po_link_to=negotiated benötigt usedirs eingeschaltet, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "Diskussion" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "um die meta-titeln zu reparieren werden alle Seiten neu erstellt" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, perl-format msgid "building %s" msgstr "erzeuge %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "PO-Dateien aktualisiert" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -637,7 +629,7 @@ msgstr "" "Übersetzung kann nicht entfernt werden. Wenn die Master Seite entfernt wird, " "werden auch ihre Übersetzungen entfernt." -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -645,55 +637,55 @@ msgstr "" "Eine Übersetzung kann nicht umbenannt werden. Wenn die Master Seite " "unbenannt wird, werden auch ihre Übersetzungen unbenannt." -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-Datei (%s) existiert nicht" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "kopieren der POT-Datei nach %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, perl-format msgid "failed to update %s" msgstr "aktualisieren von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopieren der POT-Datei nach %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, perl-format msgid "failed to translate %s" msgstr "übersetzen von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "überflüssige PO-Dateien wurden entfernt" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, perl-format msgid "failed to write %s" msgstr "schreiben von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 msgid "failed to translate" msgstr "übersetzen fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, perl-format msgid "failed to read %s" msgstr "lesen von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "ungültige gettext Datei, gehe zurück zur vorherigen Seite um weiter zu " @@ -1043,7 +1035,7 @@ msgstr "" msgid "bad file name %s" msgstr "fehlerhafter Dateiname %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1052,47 +1044,47 @@ msgstr "" "symbolischer Verweis im srcdir Pfad (%s) gefunden -- setzen Sie " "allow_symlinks_before_srcdir, um dies zu erlauben" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "überspringe fehlerhaften Dateinamen %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s hat mehrere mögliche Quellseiten" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "entferne alte Seite %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "durchsuche %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, perl-format msgid "building %s, which links to %s" msgstr "erzeuge %s, die auf %s verweist" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, perl-format msgid "building %s, which depends on %s" msgstr "erzeuge %s, die von %s abhängt" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, to update its backlinks" msgstr "erzeuge %s, um dessen Rückverweise zu aktualisieren" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, perl-format msgid "removing %s, no longer built by %s" msgstr "entferne %s, wird nicht länger von %s erzeugt" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kann %s nicht erzeugen" @@ -1174,32 +1166,36 @@ msgstr "erzeuge Wiki neu.." msgid "refreshing wiki.." msgstr "aktualisiere Wiki.." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Diskussion" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es muss eine URL zum Wiki mit --url angegeben werden, wenn --cgi verwandt " "wird" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" "Es können nicht mehrere Versionskontrollsystem-Erweiterungen verwandt werden" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Laden der für %s benötigten externen Erweiterung fehlgeschlagen: %s" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Präprozessorschleife auf %s in Tiefe %i erkannt" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, perl-format msgid "cannot match pages: %s" msgstr "Kann die Seiten nicht zuordnen: %s" @@ -1223,3 +1219,6 @@ msgstr "Wer (Wiki-Konto oder OpenID) soll Administrator sein?" #: ../auto.setup:23 msgid "What is the domain name of the web server?" msgstr "Wie lautet der Domainname des Webservers?" + +#~ msgid "discussion" +#~ msgstr "Diskussion" diff --git a/po/es.po b/po/es.po index 65ad72140..77f1cea6e 100644 --- a/po/es.po +++ b/po/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2009-06-14 12:32+0200\n" "Last-Translator: Victor Moral \n" "Language-Team: \n" @@ -60,7 +60,7 @@ msgstr "Las preferencias se han guardado." msgid "You are banned." msgstr "Ha sido expulsado." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Error" @@ -195,20 +195,12 @@ msgstr "" "Lo siento, pero el analizador blogspam " "dice que el texto puede ser spam." -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Comentarios" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "%s desde la página %s" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "¡ No hay enlaces rotos !" @@ -303,14 +295,14 @@ msgstr "eliminando la antigua previsualización %s" msgid "%s is not an editable page" msgstr "la página %s no es modificable" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "creando página %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "modificando página %s" @@ -374,7 +366,7 @@ msgstr "no puede actuar sobre un archivo con permisos %s" msgid "you are not allowed to change file modes" msgstr "No puede cambiar los permisos de acceso de un archivo" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -449,32 +441,32 @@ msgstr "no está permitida la modificación de páginas" msgid "missing pages parameter" msgstr "falta el parámetro pages" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" "Se necesita el módulo Sort::Naturally para el tipo de ordenación " "title_natural" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "Añadir una entrada nueva titulada:" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "la plantilla %s no existe " -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "No he encontrado el componente RPC::XML::Client, no envío señal alguna" @@ -503,7 +495,7 @@ msgstr "" msgid "stylesheet not found" msgstr "hoja de estilo no encontrada " -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 msgid "redir page not found" msgstr "falta la página a donde redirigir" @@ -535,7 +527,7 @@ msgstr "Identificarse mediante " msgid "Get an OpenID" msgstr "Consiga un identificador OpenID" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Todas las páginas están referenciadas entre sí." @@ -598,104 +590,103 @@ msgstr "Ignorando directiva 'ping' para el wiki %s (este wiki es %s)" msgid "LWP not found, not pinging" msgstr "No he encontrado el componente LWP, no envío señal alguna" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s no es un archivo" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -#, fuzzy -msgid "discussion" -msgstr "Comentarios" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "Informaremos a %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, fuzzy, perl-format msgid "POT file (%s) does not exist" msgstr "No existe la página %s." -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "no he podido ejecutar el programa dot" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "no puedo leer de %s: %s " -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1044,7 +1035,7 @@ msgstr "no puedo determinar el identificador de un usuario no fiable como %s" msgid "bad file name %s" msgstr "el nombre de archivo %s es erróneo" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1053,49 +1044,49 @@ msgstr "" "encontrado un enlace simbólico en la ruta del directorio fuente (%s) -- use " "la directiva allow_symlinks_before_srcdir para permitir la acción" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "ignorando el archivo %s porque su nombre no es correcto" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s tiene mútiples páginas fuente posibles" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "eliminando la antigua página %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "explorando %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "convirtiendo la página %s, la cual referencia a %s" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "convirtiendo la página %s, la cual depende de %s" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "" "convirtiendo la página %s para actualizar la lista de páginas que hacen " "referencia a ella." -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "eliminando la página %s puesto que ya no se deriva de %s" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: no puedo convertir la página %s" @@ -1176,33 +1167,37 @@ msgstr "reconstruyendo el wiki.." msgid "refreshing wiki.." msgstr "actualizando el wiki.." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Comentarios" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es obligatorio especificar un url al wiki con el parámetro --url si se " "utiliza el parámetro --cgi" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "no puedo emplear varios complementos rcs" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "no he podido cargar el complemento externo %s necesario para %s" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" "se ha detectado en la página %s un bucle de preprocesado en la iteración " "número %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "si" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, perl-format msgid "cannot match pages: %s" msgstr "no encuentro páginas coincidentes: %s" @@ -1230,6 +1225,10 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "¿ Cuál es el dominio para el servidor web ?" +#, fuzzy +#~ msgid "discussion" +#~ msgstr "Comentarios" + #~ msgid "rendering %s" #~ msgstr "convirtiendo %s" diff --git a/po/fr.po b/po/fr.po index a27420254..c151bcf68 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.141\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2009-06-29 16:42+0200\n" "Last-Translator: Philippe Batailler \n" "Language-Team: French \n" @@ -57,7 +57,7 @@ msgstr "Les préférences ont été enregistrées." msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Erreur" @@ -191,20 +191,12 @@ msgstr "" "Désolé, mais ceci ressemble à un spam à destination de blogspam: " -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Discussion" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "%s sur %s" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Aucun lien cassé !" @@ -299,14 +291,14 @@ msgstr "Suppression de l'ancienne prévisualisation %s" msgid "%s is not an editable page" msgstr "%s n'est pas une page éditable" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "Création de %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "Édition de %s" @@ -370,7 +362,7 @@ msgstr "Vous ne pouvez modifier un fichier dont le mode est %s" msgid "you are not allowed to change file modes" msgstr "Vous n'êtes pas autorisé à modifier le mode des fichiers" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -444,30 +436,30 @@ msgstr "Modification de page interdite" msgid "missing pages parameter" msgstr "Paramètre « pages » manquant" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "Type de tri %s inconnu" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "Ajouter un nouvel article dont le titre est :" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "Le modèle de page %s n'existe pas" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client introuvable, pas de réponse au ping" @@ -495,7 +487,7 @@ msgstr "" msgid "stylesheet not found" msgstr "Feuille de style introuvable " -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 msgid "redir page not found" msgstr "Page de redirection introuvable" @@ -527,7 +519,7 @@ msgstr "S'identifier en tant que" msgid "Get an OpenID" msgstr "Obtenir un compte OpenID" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Toutes les pages sont liées à d'autres pages." @@ -590,103 +582,103 @@ msgstr "Les instructions du wiki %s sont ignorées (ce wiki est %s)" msgid "LWP not found, not pinging" msgstr "LWP est introuvable. Pas de réponse au ping" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s n'est pas un fichier" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "Discussion" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "va envoyer un ping à %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, fuzzy, perl-format msgid "POT file (%s) does not exist" msgstr "La page %s n'existe pas." -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "Échec de la compilation de %s" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "Échec de la compilation de %s" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "Échec de la compilation de %s" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "Échec du redimensionnement : %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "Échec du redimensionnement : %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "Échec du lancement de dot" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "Échec de la lecture de %s : %s" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1035,7 +1027,7 @@ msgstr "" msgid "bad file name %s" msgstr "Nom de fichier incorrect %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1044,47 +1036,47 @@ msgstr "" "Lien symbolique trouvé dans l'adresse de srcdir (%s) -- pour l'autoriser, " "activez le paramètre « allow_symlinks_before_srcdir »." -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "Omission du fichier au nom incorrect %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s peut être associé à plusieurs pages source." -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "Suppression de l'ancienne page %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "Examen de %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "Reconstruction de %s, qui est lié à %s" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "Reconstruction de %s, qui dépend de %s" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "Reconstruction de %s, afin de mettre à jour ses rétroliens" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "Suppression de %s, qui n'est plus rendu par %s" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki : impossible de reconstruire %s" @@ -1168,30 +1160,34 @@ msgstr "Reconstruction du wiki..." msgid "refreshing wiki.." msgstr "Rafraîchissement du wiki..." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Discussion" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Vous devez indiquer l'URL du wiki par --url lors de l'utilisation de --cgi" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "Impossible d'utiliser plusieurs systèmes de contrôle des versions" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de pré traitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "oui" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, perl-format msgid "cannot match pages: %s" msgstr "Impossible de trouver les pages %s" @@ -1217,6 +1213,9 @@ msgstr "Identifiant de l'administrateur (utilisateur du wiki ou openid) :" msgid "What is the domain name of the web server?" msgstr "Nom de domaine du serveur HTTP :" +#~ msgid "discussion" +#~ msgstr "Discussion" + #~ msgid "rendering %s" #~ msgstr "Reconstruction de %s" diff --git a/po/gu.po b/po/gu.po index ce76f8612..d7e6eaa6a 100644 --- a/po/gu.po +++ b/po/gu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-gu\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2007-01-11 16:05+0530\n" "Last-Translator: Kartik Mistry \n" "Language-Team: Gujarati \n" @@ -54,7 +54,7 @@ msgstr "પ્રાથમિકતાઓ સંગ્રહાઇ." msgid "You are banned." msgstr "તમારા પર પ્રતિબંધ છે." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "ક્ષતિ" @@ -186,20 +186,12 @@ msgid "" "\">blogspam: " msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "ચર્ચા" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "અહીં કોઇ તૂટેલ કડી નથી!" @@ -294,14 +286,14 @@ msgstr "જુનાં પાનાં દૂર કરે છે %s" msgid "%s is not an editable page" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "%s બનાવે છે" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "%s સુધારે છે" @@ -369,7 +361,7 @@ msgstr "" msgid "you are not allowed to change file modes" msgstr "" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -442,30 +434,30 @@ msgstr "ફીડ મળ્યું નહી" msgid "missing pages parameter" msgstr "ખોવાયેલ %s વિકલ્પ" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "આ શિર્ષકથી નવું પોસ્ટ ઉમેરો:" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "અસ્તિત્વમાં ન હોય તેવું ટેમ્પલેટ %s" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવામાં આવતું નથી" @@ -491,7 +483,7 @@ msgstr "Markdown.pm પર્લ મોડ્યુલ (%s) અથવા /usr/bi msgid "stylesheet not found" msgstr "સ્ટાઇલશીટ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 #, fuzzy msgid "redir page not found" msgstr "ફીડ મળ્યું નહી" @@ -525,7 +517,7 @@ msgstr "" msgid "Get an OpenID" msgstr "ઓપનઆઇડી મેળવો" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "બધા પાનાંઓ બીજા પાનાંઓ વડે જોડાયેલ છે." @@ -585,103 +577,103 @@ msgstr "" msgid "LWP not found, not pinging" msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવામાં આવતું નથી" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "ચર્ચા" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "%s સુધારે છે" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "માપ બદલવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "%s લખવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "ડોટ ચલાવવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "%s વાંચવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1029,54 +1021,54 @@ msgstr "" msgid "bad file name %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "જુનાં પાનાં દૂર કરે છે %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "%s શોધે છે" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "રેન્ડર કરે છે %s, જે %s સાથે જોડાણ ધરાવે છે" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "રેન્ડર કરે છે %s, જે %s પર આધારિત છે" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "રેન્ડર કરે છે %s, તેનાં પાછળનાં જોડાણો સુધારવા માટે" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "દૂર કરે છે %s, હવે %s વડે રેન્ડર કરાતું નથી" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: %s રેન્ડર કરી શકાતું નથી" @@ -1155,29 +1147,33 @@ msgstr "વીકી ફરીથી બનાવે છે.." msgid "refreshing wiki.." msgstr "વીકીને તાજી કરે છે.." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "ચર્ચા" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "જ્યારે --cgi ઉપયોગ કરતાં હોય ત્યારે વીકીનું યુઆરએલ સ્પષ્ટ કરવું જ પડશે" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "વાંચી શકાતી નથી %s: %s" @@ -1202,6 +1198,9 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#~ msgid "discussion" +#~ msgstr "ચર્ચા" + #~ msgid "rendering %s" #~ msgstr "રેન્ડર કરે છે %s" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 8ba10ecbb..a9c0fbb99 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -54,7 +54,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "" @@ -183,20 +183,12 @@ msgid "" "\">blogspam: " msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "" @@ -291,14 +283,14 @@ msgstr "" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "" @@ -361,7 +353,7 @@ msgstr "" msgid "you are not allowed to change file modes" msgstr "" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, perl-format msgid "Must specify %s when using the %s plugin" @@ -431,30 +423,30 @@ msgstr "" msgid "missing pages parameter" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "" @@ -480,7 +472,7 @@ msgstr "" msgid "stylesheet not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 msgid "redir page not found" msgstr "" @@ -512,7 +504,7 @@ msgstr "" msgid "Get an OpenID" msgstr "" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 msgid "All pages have other pages linking to them." msgstr "" @@ -570,102 +562,102 @@ msgstr "" msgid "LWP not found, not pinging" msgstr "" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, perl-format msgid "building %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, perl-format msgid "failed to update %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, perl-format msgid "failed to copy the POT file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, perl-format msgid "failed to translate %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, perl-format msgid "failed to write %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 msgid "failed to translate" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, perl-format msgid "failed to read %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1004,54 +996,54 @@ msgstr "" msgid "bad file name %s" msgstr "" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, perl-format msgid "building %s, which links to %s" msgstr "" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, perl-format msgid "building %s, which depends on %s" msgstr "" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, to update its backlinks" msgstr "" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, perl-format msgid "removing %s, no longer built by %s" msgstr "" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "" @@ -1130,29 +1122,33 @@ msgstr "" msgid "refreshing wiki.." msgstr "" -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, perl-format msgid "cannot match pages: %s" msgstr "" diff --git a/po/pl.po b/po/pl.po index 3e8d08523..6ecda8d88 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 1.51\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2007-04-27 22:05+0200\n" "Last-Translator: Pawel Tecza \n" "Language-Team: Debian L10n Polish \n" @@ -57,7 +57,7 @@ msgstr "Preferencje zapisane." msgid "You are banned." msgstr "Twój dostęp został zabroniony przez administratora." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Błąd" @@ -190,20 +190,12 @@ msgid "" "\">blogspam: " msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Dyskusja" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Wszystkie odnośniki są aktualne!" @@ -298,14 +290,14 @@ msgstr "usuwanie starej strony %s" msgid "%s is not an editable page" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "tworzenie %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "edycja %s" @@ -373,7 +365,7 @@ msgstr "" msgid "you are not allowed to change file modes" msgstr "" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -449,30 +441,30 @@ msgstr "nieznaleziony kanał RSS" msgid "missing pages parameter" msgstr "brakujący parametr %s" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "Tytuł nowego wpisu" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "brakujący szablon %s" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" @@ -504,7 +496,7 @@ msgstr "" msgid "stylesheet not found" msgstr "nieznaleziony szablon ze stylami CSS" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 #, fuzzy msgid "redir page not found" msgstr "nieznaleziony kanał RSS" @@ -538,7 +530,7 @@ msgstr "" msgid "Get an OpenID" msgstr "Pobierz OpenID" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Dla każdej strony istnieje odnośnik z innej strony" @@ -598,103 +590,103 @@ msgstr "" msgid "LWP not found, not pinging" msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "dyskusja" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "edycja %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "awaria w trakcie zmiany rozmiaru: %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "awaria w trakcie zapisu %s: %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "awaria w trakcie uruchamiania dot" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "awaria w trakcie odczytu %s: %s" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1051,54 +1043,54 @@ msgstr "" msgid "bad file name %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "usuwanie starej strony %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "skanowanie %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "renderowanie %s z odnośnikiem do %s" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "renderowanie %s zależącego od %s" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "renderowanie %s w celu aktualizacji powrotnych odnośników" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "usuwanie %s nie tworzonego już przez %s" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: awaria w trakcie tworzenia %s" @@ -1177,31 +1169,35 @@ msgstr "przebudowywanie wiki..." msgid "refreshing wiki.." msgstr "odświeżanie wiki..." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Dyskusja" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Użycie parametru --cgi wymaga podania adresu URL do wiki za pomocą parametru " "--url" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "awaria w trakcie odczytu %s: %s" @@ -1226,6 +1222,9 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#~ msgid "discussion" +#~ msgstr "dyskusja" + #~ msgid "rendering %s" #~ msgstr "renderowanie %s" diff --git a/po/sv.po b/po/sv.po index ff8d3aa0d..075de56d0 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2007-01-10 23:47+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -54,7 +54,7 @@ msgstr "Inställningar sparades." msgid "You are banned." msgstr "Du är bannlyst." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Fel" @@ -187,20 +187,12 @@ msgid "" "\">blogspam: " msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Diskussion" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Det finns inga trasiga länkar!" @@ -295,14 +287,14 @@ msgstr "tar bort gammal sida %s" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "skapar %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "redigerar %s" @@ -370,7 +362,7 @@ msgstr "" msgid "you are not allowed to change file modes" msgstr "" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -444,30 +436,30 @@ msgstr "mallen %s hittades inte" msgid "missing pages parameter" msgstr "mall saknar id-parameter" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "okänd sorteringstyp %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client hittades inte, pingar inte" @@ -497,7 +489,7 @@ msgstr "" msgid "stylesheet not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 #, fuzzy msgid "redir page not found" msgstr "mallen %s hittades inte" @@ -531,7 +523,7 @@ msgstr "" msgid "Get an OpenID" msgstr "Skaffa ett OpenID" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Alla sidor länkas till av andra sidor." @@ -591,103 +583,103 @@ msgstr "" msgid "LWP not found, not pinging" msgstr "RPC::XML::Client hittades inte, pingar inte" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "diskussion" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "redigerar %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "linkmap misslyckades att köra dot" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1038,54 +1030,54 @@ msgstr "" msgid "bad file name %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "tar bort gammal sida %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "söker av %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "ritar upp %s, vilken länkar till %s" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "ritar upp %s, vilken är beroende av %s" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "ritar upp %s, för att uppdatera dess bakåtlänkar" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "tar bort %s, som inte längre ritas upp av %s" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan inte rita upp %s" @@ -1164,29 +1156,33 @@ msgstr "bygger om wiki.." msgid "refreshing wiki.." msgstr "uppdaterar wiki.." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Diskussion" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Måste ange url till wiki med --url när --cgi används" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s förbehandlingsslinga detekterades på %s, djup %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "kan inte läsa %s: %s" @@ -1211,6 +1207,9 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#~ msgid "discussion" +#~ msgstr "diskussion" + #~ msgid "rendering %s" #~ msgstr "ritar upp %s" diff --git a/po/vi.po b/po/vi.po index 7cf911b16..b500ed581 100644 --- a/po/vi.po +++ b/po/vi.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-11 15:00-0400\n" +"POT-Creation-Date: 2009-08-15 14:07-0400\n" "PO-Revision-Date: 2007-01-13 15:31+1030\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" @@ -55,7 +55,7 @@ msgstr "Tùy thích đã được lưu." msgid "You are banned." msgstr "Bạn bị cấm ra." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1253 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 msgid "Error" msgstr "Lỗi" @@ -188,20 +188,12 @@ msgid "" "\">blogspam: " msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 -#: ../IkiWiki/Plugin/inline.pm:376 ../IkiWiki/Plugin/inline.pm:384 -#: ../IkiWiki/Plugin/opendiscussion.pm:26 ../IkiWiki/Plugin/orphans.pm:37 -#: ../IkiWiki/Plugin/po.pm:289 ../IkiWiki/Plugin/po.pm:292 -#: ../IkiWiki/Render.pm:86 ../IkiWiki/Render.pm:90 ../IkiWiki/Render.pm:156 -msgid "Discussion" -msgstr "Thảo luận" - -#: ../IkiWiki/Plugin/brokenlinks.pm:48 +#: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format msgid "%s from %s" msgstr "" -#: ../IkiWiki/Plugin/brokenlinks.pm:55 +#: ../IkiWiki/Plugin/brokenlinks.pm:50 msgid "There are no broken links!" msgstr "Không có liên kết bị ngắt nào." @@ -296,14 +288,14 @@ msgstr "đang gỡ bỏ trang cũ %s" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:291 +#: ../IkiWiki/Plugin/editpage.pm:292 #, perl-format msgid "creating %s" msgstr "đang tạo %s" -#: ../IkiWiki/Plugin/editpage.pm:309 ../IkiWiki/Plugin/editpage.pm:328 -#: ../IkiWiki/Plugin/editpage.pm:338 ../IkiWiki/Plugin/editpage.pm:382 -#: ../IkiWiki/Plugin/editpage.pm:421 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" msgstr "đang sửa %s" @@ -371,7 +363,7 @@ msgstr "" msgid "you are not allowed to change file modes" msgstr "" -#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:124 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, fuzzy, perl-format msgid "Must specify %s when using the %s plugin" @@ -447,30 +439,30 @@ msgstr "không tìm thấy mẫu %s" msgid "missing pages parameter" msgstr "mẫu thiếu tham số id" -#: ../IkiWiki/Plugin/inline.pm:192 +#: ../IkiWiki/Plugin/inline.pm:191 #, perl-format msgid "the %s and %s parameters cannot be used together" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:214 +#: ../IkiWiki/Plugin/inline.pm:212 msgid "Sort::Naturally needed for title_natural sort" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:225 +#: ../IkiWiki/Plugin/inline.pm:223 #, perl-format msgid "unknown sort type %s" msgstr "kiểu sắp xếp không rõ %s" -#: ../IkiWiki/Plugin/inline.pm:329 +#: ../IkiWiki/Plugin/inline.pm:327 msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:349 +#: ../IkiWiki/Plugin/inline.pm:347 #, perl-format msgid "nonexistant template %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:615 +#: ../IkiWiki/Plugin/inline.pm:612 msgid "RPC::XML::Client not found, not pinging" msgstr "Không tìm thấy RPC::XML::Client nên không gửi gói tin ping" @@ -498,7 +490,7 @@ msgstr "lỗi nạp mô-đun perl Markdown.pm (%s) hay « /usr/bin/markdown » ( msgid "stylesheet not found" msgstr "không tìm thấy mẫu %s" -#: ../IkiWiki/Plugin/meta.pm:197 +#: ../IkiWiki/Plugin/meta.pm:196 #, fuzzy msgid "redir page not found" msgstr "không tìm thấy mẫu %s" @@ -532,7 +524,7 @@ msgstr "" msgid "Get an OpenID" msgstr "Lấy OpenID" -#: ../IkiWiki/Plugin/orphans.pm:52 +#: ../IkiWiki/Plugin/orphans.pm:45 #, fuzzy msgid "All pages have other pages linking to them." msgstr "Mọi trang được liên kết với trang khác." @@ -592,103 +584,103 @@ msgstr "" msgid "LWP not found, not pinging" msgstr "Không tìm thấy RPC::XML::Client nên không gửi gói tin ping" -#: ../IkiWiki/Plugin/po.pm:131 +#: ../IkiWiki/Plugin/po.pm:15 +msgid "warning: Old po4a detected! Recommend upgrade to 0.35." +msgstr "" + +#: ../IkiWiki/Plugin/po.pm:136 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:143 +#: ../IkiWiki/Plugin/po.pm:148 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:148 +#: ../IkiWiki/Plugin/po.pm:153 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:282 -msgid "discussion" -msgstr "thảo luận" - -#: ../IkiWiki/Plugin/po.pm:379 +#: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:383 ../IkiWiki/Render.pm:421 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, fuzzy, perl-format msgid "building %s" msgstr "đang sửa %s" -#: ../IkiWiki/Plugin/po.pm:420 +#: ../IkiWiki/Plugin/po.pm:424 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:444 +#: ../IkiWiki/Plugin/po.pm:448 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:464 +#: ../IkiWiki/Plugin/po.pm:468 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:825 +#: ../IkiWiki/Plugin/po.pm:829 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:839 +#: ../IkiWiki/Plugin/po.pm:843 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "lỗi biên dịch %s" -#: ../IkiWiki/Plugin/po.pm:848 +#: ../IkiWiki/Plugin/po.pm:852 #, fuzzy, perl-format msgid "failed to update %s" msgstr "lỗi biên dịch %s" -#: ../IkiWiki/Plugin/po.pm:854 +#: ../IkiWiki/Plugin/po.pm:858 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "lỗi biên dịch %s" -#: ../IkiWiki/Plugin/po.pm:890 +#: ../IkiWiki/Plugin/po.pm:894 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:903 +#: ../IkiWiki/Plugin/po.pm:907 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "lỗi ghi %s: %s" -#: ../IkiWiki/Plugin/po.pm:979 +#: ../IkiWiki/Plugin/po.pm:983 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1042 ../IkiWiki/Plugin/po.pm:1056 -#: ../IkiWiki/Plugin/po.pm:1096 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1100 #, fuzzy, perl-format msgid "failed to write %s" msgstr "lỗi ghi %s: %s" -#: ../IkiWiki/Plugin/po.pm:1054 +#: ../IkiWiki/Plugin/po.pm:1058 #, fuzzy msgid "failed to translate" msgstr "linkmap không chạy dot được" -#: ../IkiWiki/Plugin/po.pm:1059 +#: ../IkiWiki/Plugin/po.pm:1063 #, fuzzy, perl-format msgid "failed to read %s" msgstr "lỗi ghi %s: %s" -#: ../IkiWiki/Plugin/po.pm:1108 +#: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -1039,54 +1031,54 @@ msgstr "" msgid "bad file name %s" msgstr "đang bỏ qua tên tập tin sai %s" -#: ../IkiWiki/Render.pm:260 +#: ../IkiWiki/Render.pm:264 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:283 ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "đang bỏ qua tên tập tin sai %s" -#: ../IkiWiki/Render.pm:290 +#: ../IkiWiki/Render.pm:294 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:376 +#: ../IkiWiki/Render.pm:380 #, perl-format msgid "removing old page %s" msgstr "đang gỡ bỏ trang cũ %s" -#: ../IkiWiki/Render.pm:416 +#: ../IkiWiki/Render.pm:421 #, perl-format msgid "scanning %s" msgstr "đang quét %s" -#: ../IkiWiki/Render.pm:442 +#: ../IkiWiki/Render.pm:447 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "đang vẽ %s mà liên kết tới %s" -#: ../IkiWiki/Render.pm:463 +#: ../IkiWiki/Render.pm:468 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "đang vẽ %s mà phụ thuộc vào %s" -#: ../IkiWiki/Render.pm:502 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "đang vẽ %s để cập nhật các liên kết ngược của nó" -#: ../IkiWiki/Render.pm:514 +#: ../IkiWiki/Render.pm:519 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "đang gỡ bỏ %s, không còn được vẽ lại bởi %s" -#: ../IkiWiki/Render.pm:538 +#: ../IkiWiki/Render.pm:543 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: không thể vẽ %s" @@ -1165,29 +1157,33 @@ msgstr "đang xây dựng lại wiki.." msgid "refreshing wiki.." msgstr "đang làm tươi wiki.." -#: ../IkiWiki.pm:487 +#: ../IkiWiki.pm:225 +msgid "Discussion" +msgstr "Thảo luận" + +#: ../IkiWiki.pm:494 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --cgi »" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:540 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:562 +#: ../IkiWiki.pm:569 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1236 +#: ../IkiWiki.pm:1243 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "vòng lặp tiền xử lý %s được phát hiện trên %s ở độ sâu %i" -#: ../IkiWiki.pm:1776 +#: ../IkiWiki.pm:1783 msgid "yes" msgstr "" -#: ../IkiWiki.pm:1908 +#: ../IkiWiki.pm:1915 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "không thể đọc %s: %s" @@ -1212,6 +1208,9 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#~ msgid "discussion" +#~ msgstr "thảo luận" + #~ msgid "rendering %s" #~ msgstr "đang vẽ %s" -- cgit v1.2.3 From bd34fcd87464708afc81dd3a4d3e07e3531e7f71 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 14:26:07 -0400 Subject: reorg and cleanup --- doc/todo/l10n.mdwn | 61 ++++++++++++++---------------------------------------- 1 file changed, 16 insertions(+), 45 deletions(-) (limited to 'doc') diff --git a/doc/todo/l10n.mdwn b/doc/todo/l10n.mdwn index bba103494..fed3f63b6 100644 --- a/doc/todo/l10n.mdwn +++ b/doc/todo/l10n.mdwn @@ -1,3 +1,19 @@ +ikiwiki should be fully internationalized. + +---- + +As to the hardcoded strings in ikiwiki, I've internationalized the program, +and there is a po/ikiwiki.pot in the source that can be translated. +--[[Joey]] + +---- + +> The now merged po plugin handles l10n of wiki pages. The only missing +> piece now is l10n of the templates. +> --[[Joey]] + +---- + From [[Recai]]: > Here is my initial work on ikiwiki l10n infrastructure (I'm sending it > before finalizing, there may be errors). @@ -54,48 +70,3 @@ kullanıcının ait IP adresi: [2] This could be easily worked around in tmpl_process3, but I wouldn't like to maintain a separate utility. ----- - -As to the hardcoded strings in ikiwiki, I've internationalized the program, -and there is a po/ikiwiki.pot in the source that can be translated. ---[[Joey]] - ----- - -Danish l10n of templates and basewiki is available with the following commands: - - git clone http://source.jones.dk/ikiwiki.git newsite - cd newsite - make - -Updates are retrieved with this single command: - - make - -l10n is maintained using po4a for basewiki, smiley and templates - please send me PO files if you -translate to other languagess than the few I know about myself: - -As upstream ikiwiki is now maintained in GIT too, keeping the master mirror in sync with upstream -could probably be automated even more - but an obstacle seems to be that content is not maintained -separately but as an integral part of upstream source (GIT seems to not support subscribing to -only parts of a repository). - -For example use, here's how to roll out a clone of the [Redpill support site](http://support.redpill.dk/): - - mkdir -p ~/public_cgi/support.redpill.dk - git clone git://source.jones.dk/bin - bin/localikiwikicreatesite -o git://source.redpill.dk/support rpdemo - -(Redpill support is inspired by but needs to be reusable for several similarly configured networks) - ---[[JonasSmedegaard]] - -> I don't understand at all why you're using git the way you are. -> -> I think that this needs to be reworked into a patch against the regular -> ikiwiki tree, that adds the po4a stuff needed to generate the pot files for the -> basewiki and template content, as well as the stuff that generates the -> translated versions of those from the po files. -> -> The now merged po plugin also handles some of this. -> --[[Joey]] -- cgit v1.2.3 From d13c07dec1a5516b7fa595004e16021f2a182bb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 15:20:46 -0400 Subject: noticed a problem --- doc/plugins/po.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 2fbf67016..4e1bf20bb 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -277,6 +277,15 @@ That used to be so, but the bug was fixed. Does this mean that po might be replacing the only link on a page, in error? --[[Joey]] +Name of toplevel index page +--------------------------- + +Normally at the top index page of a wiki, you see the wiki name at +the top. However, at the top *translated* index page, you see something +like "index.da". + + + Documentation ------------- -- cgit v1.2.3 From e9bc2e96acd5977a35f338ddd392733aaca761f7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 15:49:07 -0400 Subject: resolve conflict --- doc/sandbox.mdwn | 5 ----- 1 file changed, 5 deletions(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 9b0a53c68..c84d52ef2 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -4,15 +4,10 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!v 2009/7/13 Monday Blue...\\ While working on [[http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?p=27199|[97] Phpbb 與 Dokuwiki 之間的往來]] (External Link to //http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?p=27199// not working?), surf Internet for Wikis supporting //Creole V1.0//, found this site. -<<<<<<< HEAD:doc/sandbox.mdwn * I thought that creole markup is used by ikiwiki... * Thought about using //SVN/CVS// server, however with different idea * Kinda curious why **Tcl** does not show her face in this Wiki arena -======= -* Thought about using //SVN/CVS// server, however with different idea -* Kinda curious why **Tcl** does not show her face in this Wiki arena * It looks like that I was wrong, from Wikipedia Creole page it mention that ikiwiki is also adopting Creole markup. ->>>>>>> 55c1a37cce91d4fd01bf80fcaeeaf56535218a5c:doc/sandbox.mdwn --- -- cgit v1.2.3 From 1b63a0e4fae5396014ed222647ae9c3c88a35de5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 16:15:36 -0400 Subject: another problem --- doc/plugins/po.mdwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 4e1bf20bb..5016f1037 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -282,9 +282,17 @@ Name of toplevel index page Normally at the top index page of a wiki, you see the wiki name at the top. However, at the top *translated* index page, you see something -like "index.da". +like "index.da". --[[Joey]] +Pagespecs +--------- +I was suprised that, when using the map directive, a pagespec of "*" +listed all the translated pages as well as regular pages. That can +make a big difference to an existing wiki when po is turned on, +and seems generally not wanted. +(OTOH, you do want to match translated pages by +default when locking pages.) --[[Joey]] Documentation ------------- -- cgit v1.2.3 From 54c2e05ccf8fad1e77d4ee717c48f3622f60b4e4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 16:33:54 -0400 Subject: Add basic styling of po plugin's languages list. --- debian/changelog | 1 + doc/style.css | 9 +++++++++ 2 files changed, 10 insertions(+) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 39ff60717..88fac32ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ ikiwiki (3.141593) UNRELEASED; urgency=low * meta, img: Fix bugs in dependency code. (smcv) * Allow building ikiwiki on systems w/o po4a -- building of the translated underlays will be skipped in this case. + * Add basic styling of po plugin's languages list. -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/style.css b/doc/style.css index e6512aed8..4fa48b140 100644 --- a/doc/style.css +++ b/doc/style.css @@ -32,6 +32,15 @@ border-bottom: 0; } +#otherlanguages ul { + margin: 0; + padding: 6px; + list-style-type: none; +} +.pageheader #otherlanguages { + border-bottom: 1px solid #000; +} + div.inlinecontent { margin-top: .4em; } -- cgit v1.2.3 From e9d20231a0fa99fe614a43cf60c53af7a84fc795 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 17:00:16 -0400 Subject: further otherlanguages list styling --- doc/style.css | 13 ++++++++----- templates/page.tmpl | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/style.css b/doc/style.css index 4fa48b140..4770fc942 100644 --- a/doc/style.css +++ b/doc/style.css @@ -24,6 +24,10 @@ padding: 6px; list-style-type: none; } +.actions li { + display: inline; + padding: .2em .4em; +} .pageheader .actions ul { border-bottom: 1px solid #000; } @@ -37,6 +41,10 @@ padding: 6px; list-style-type: none; } +#otherlanguages li { + display: inline; + padding: .2em .4em; +} .pageheader #otherlanguages { border-bottom: 1px solid #000; } @@ -45,11 +53,6 @@ div.inlinecontent { margin-top: .4em; } -.actions li { - display: inline; - padding: .2em .4em; -} - .pagefooter { clear: both; } diff --git a/templates/page.tmpl b/templates/page.tmpl index 653179e5d..e71ba316d 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -29,7 +29,7 @@ -( %) + (%) @@ -76,7 +76,7 @@ (master) -( %) + (%) -- cgit v1.2.3 From 1e30be656f38b3a42a4ddd28a50d5721ad3849d5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 17:07:25 -0400 Subject: link to l10n.ikiwiki.info website --- doc/translation.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/translation.mdwn b/doc/translation.mdwn index 459f47eb5..d869a6821 100644 --- a/doc/translation.mdwn +++ b/doc/translation.mdwn @@ -26,6 +26,10 @@ essentially three pieces needed for a complete translation: [[plugins/contrib/po]] ikiwiki plugin will allow translating wikis using po files and can be used for this. + There is now a website, [l10n.ikiwiki.info](http://l10n.ikiwiki.info) + that both demos the translated basewiki, and allows easy translation of + it. + To generate the po and pot files for translating the basewiki, get ikiwiki's source, edit the `po/underlay.setup` file, adding your language. Then run 'make -C po underlays`. -- cgit v1.2.3 From 43e895ec78a00a53aca31a5b38c18e8ef4ab6842 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 17:29:05 -0400 Subject: another problem --- doc/plugins/po.mdwn | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 5016f1037..f738d61de 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -248,7 +248,7 @@ ea753782b222bf4ba2fb4683b6363afdd9055b64, which should be reverted once [[intrigeri]]'s `meta` branch is merged. An integration branch, called `meta-po`, merges [[intrigeri]]'s `po` -and `meta` branches, and thus has thise additional features. +and `meta` branches, and thus has this additional features. Self links ---------- @@ -294,6 +294,18 @@ and seems generally not wanted. (OTOH, you do want to match translated pages by default when locking pages.) --[[Joey]] +Edit links on untranslated pages +-------------------------------- + +If a page is not translated yet, the "translated" version of it +displays wikilinks to other, existing (but not yet translated?) +pages as edit links, as if those pages do not exist. + +That's really confusing, especially as clicking such a link +brings up an edit form to create a new, english page. + +This is with po_link_to=current. With default, it doesn't happen.. + Documentation ------------- -- cgit v1.2.3 From 7d901b9a5412e94ab127fcc447536e391eba0399 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 19:16:22 -0400 Subject: another problem.. --- doc/plugins/po.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f738d61de..f6409aae5 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -306,6 +306,20 @@ brings up an edit form to create a new, english page. This is with po_link_to=current. With default, it doesn't happen.. +Double commits of po files +-------------------------- + +When adding a new english page, the po files are created, committed, +and then committed again. The second commit makes this change: + + -"Content-Type: text/plain; charset=utf-8\n" + -"Content-Transfer-Encoding: ENCODING" + +"Content-Type: text/plain; charset=UTF-8\n" + +"Content-Transfer-Encoding: ENCODING\n" + +Same thing happens when a change to an existing page triggers a po file +update. + Documentation ------------- -- cgit v1.2.3 From 7ea1f9692687310fb434a7cc6e6f84b57b9f4ef8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 19:39:51 -0400 Subject: apache config details --- doc/plugins/po.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f6409aae5..30f2e158e 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -114,7 +114,8 @@ Apache Using Apache `mod_negotiation` makes it really easy to have Apache serve any page in the client's preferred language, if available. -This is the default Debian Apache configuration. + +Add 'Options MultiViews' to the wiki directory's configuration in Apache. When `usedirs` is enabled, one has to set `DirectoryIndex index` for the wiki context. @@ -123,6 +124,8 @@ Setting `DefaultLanguage LL` (replace `LL` with your default MIME language code) for the wiki context can help to ensure `bla/page/index.en.html` is served as `Content-Language: LL`. +For details, see [Apache's documentation](http://httpd.apache.org/docs/2.2/content-negotiation.html). + lighttpd -------- -- cgit v1.2.3 From 0e4f67842a449d4f25b79836078a352007ea27b9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 21:00:27 -0400 Subject: update --- doc/plugins/po.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 30f2e158e..684593bf3 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -307,7 +307,7 @@ pages as edit links, as if those pages do not exist. That's really confusing, especially as clicking such a link brings up an edit form to create a new, english page. -This is with po_link_to=current. With default, it doesn't happen.. +This is with po_link_to=current or negotiated. With default, it doesn't happen.. Double commits of po files -------------------------- -- cgit v1.2.3 From 4ff3e2a540d154d49dfc70fb89dcc8422f2047e3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Aug 2009 22:18:05 -0400 Subject: po: Better fix for missing underlay translation problem. If a page is taken from the underlay, and one of the specified languages does not have po files in the underlay, it would create a broken link to the translated version of the page for that language. With this change, there's no broken link. --- IkiWiki/Plugin/po.pm | 4 ++-- doc/plugins/po.mdwn | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index ce32aab05..aa3d72b90 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -891,7 +891,7 @@ sub percenttranslated ($) { my $page=shift; $page=~s/^\///; - return gettext("0") unless istranslation($page); + return gettext("N/A") unless istranslation($page); my $file=srcfile($pagesources{$page}); my $masterfile = srcfile($pagesources{masterpage($page)}); my %options = ( @@ -934,7 +934,7 @@ sub otherlanguagesloop ($) { master => 1, }; } - else { + elsif (istranslation($otherpage)) { push @ret, { url => urlto_with_orig_beautiful_urlpath($otherpage, $page), code => $lang, diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 684593bf3..3766ad295 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -307,7 +307,8 @@ pages as edit links, as if those pages do not exist. That's really confusing, especially as clicking such a link brings up an edit form to create a new, english page. -This is with po_link_to=current or negotiated. With default, it doesn't happen.. +This is with po_link_to=current or negotiated. With default, it doesn't +happen.. --[[Joey]] Double commits of po files -------------------------- @@ -321,7 +322,7 @@ and then committed again. The second commit makes this change: +"Content-Transfer-Encoding: ENCODING\n" Same thing happens when a change to an existing page triggers a po file -update. +update. --[[Joey]] Documentation ------------- -- cgit v1.2.3 From 294aa199694a602325751420650da2b533c80fbf Mon Sep 17 00:00:00 2001 From: PaulePanter Date: Sun, 16 Aug 2009 07:01:39 -0400 Subject: Fix (hopefully) grammar. --- doc/ikiwiki/directive/inline.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index 9c55e07c2..99f795972 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -56,7 +56,7 @@ directive. These are the commonly used ones: * `postform` - Set to "yes" to enable a form to post new pages to a blog. * `postformtext` - Set to specify text that is displayed in a postform. -* `rootpage` - Enable the postform, and allows controling where +* `rootpage` - Enables the postform, and allows controling where newly posted pages should go, by specifiying the page that they should be a [[SubPage]] of. -- cgit v1.2.3 From 216f5b5b203ca3ea9ddb3f6d8c2e03dae35aeb7e Mon Sep 17 00:00:00 2001 From: PaulePanter Date: Sun, 16 Aug 2009 08:34:57 -0400 Subject: Add sentence to clarify how to get feeds for the RecentChanges page. --- doc/plugins/recentchanges.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/recentchanges.mdwn b/doc/plugins/recentchanges.mdwn index 4ab2cd078..9375296a4 100644 --- a/doc/plugins/recentchanges.mdwn +++ b/doc/plugins/recentchanges.mdwn @@ -24,3 +24,6 @@ Here's an example of how to show only changes that Joey didn't make. \[[!inline pages="internal(recentchanges/change_*) and !author(joey) and !author(http://joey.kitenet.net*)" template=recentchanges show=0]] + +If you want to generate feeds for the RecentChanges page, you have to use +[[`rss`_or_`atom`_in_the_setup_file|/todo/minor adjustment to setup documentation for recentchanges feeds]]. -- cgit v1.2.3 From d3ec1a3af2f9a2265336ba376f3ee7b75bb6e534 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Sun, 16 Aug 2009 09:01:12 -0400 Subject: comment on part of Joey's comment --- doc/todo/should_optimise_pagespecs.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 1919e3584..9d2611249 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -120,6 +120,14 @@ separate item, the list can get rather long, and that single add_depends loop has suddenly become O(N^2) to the number of pages, which is something to avoid.. +> I was also thinking about this (I've been playing with some stuff based on the +> `remove-pagespec-merge` branch). A hash, by itself, is not optimal because +> the dependency list holds two things: page names and page specs. The hash would +> work well for the page names, but you'll still need to iterate through the page specs. +> I was thinking of keeping a list and a hash. You use the list for pagespecs +> and the hash for individual page names. To make this work you need to adjust the +> API so it knows which you're adding. -- [[Will]] + Also, since a lot of places are calling add_depends in a loop, it probably makes sense to just make it accept a list of dependencies to add. It'll be marginally faster, probably, and should allow for better optimisation -- cgit v1.2.3 From 56bd1735967daef3610357801232a41de7ee2cbb Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 16 Aug 2009 11:56:16 -0400 Subject: switched my DreamHost install to pkgsrc, happily --- doc/tips/DreamHost/discussion.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/tips/DreamHost/discussion.mdwn b/doc/tips/DreamHost/discussion.mdwn index 74f48938e..258d385ae 100644 --- a/doc/tips/DreamHost/discussion.mdwn +++ b/doc/tips/DreamHost/discussion.mdwn @@ -3,3 +3,16 @@ I managed to install ikiwiki on eggplant farms, with most basic features except I think ikiwiki is more suitable for VPS/dedicated server. Shared hosting doesn't fit. I just (2009/04/27) installed ikiwiki on DreamHost and the CPAN instructions here are unnecessarily complicated. I used "cpan" instead of "perl -MCPAN -e shell" and had no trouble with that portion of the install. --[[schmonz]] + +After tiring of managing things by hand, I've switched to using +pkgsrc as an unprivileged user. This uses a bit more disk for my +own copies of perl, python, etc., but in exchange I can `cd +.../pkgsrc/www/ikiwiki && make install` and everything just works. +Plus I get all the benefits of a package system, like easy uninstalling +and being notified of outdated or insecure software. + +The only catch: sometimes the package dependency tree gets too deep +for DreamHost's user process limit, resulting in build death. I +work around this by resuming the build partway down the tree, then +trying again from whatever I was actually trying to install. +--[[schmonz]] -- cgit v1.2.3 From b5576b556027e8f9b9ad52e02b383b8644adfb33 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 16 Aug 2009 11:58:28 -0400 Subject: Life is simpler on a git branch. --- doc/plugins/contrib/cvs.mdwn | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index f466b9399..23e00201f 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -1,14 +1,11 @@ [[!template id=plugin name=cvs core=0 author="[[schmonz]]"]] +[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] + This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions System]] as an [[rcs]]. -### Installation and usage -7. Apply patches to [`IkiWiki.pm`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-IkiWiki.pm.diff) -and [`ikiwiki-makerepo`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-ikiwiki-makerepo.diff). -7. Rebuild and install ikiwiki. +### Usage 7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan IPC::Cmd]], [[!cpan String::ShellQuote]], and [cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. -7. Download [`cvs.pm`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs.pm) into a suitable `$libdir/IkiWiki/Plugin`. -7. While setting up a wiki [[by hand|setup/byhand]], also specify `--libdir` until you get to the point where you have a setup file. (This ensures the CVS plugin is found and its settings stanza included.) 7. Adjust CVS-related parameters in your setup file. Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn't need it, but you yourself might. Here's a good general-purpose one: @@ -20,7 +17,7 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn rdiff -u ### Implementation details -* Diffs are against [[3.14159|news/version_3.14159]]. `cvs.pm` started life as a copy of `svn.pm`. +* `cvs.pm` started life as a copy of [[3.14159|news/version_3.14159]]'s `svn.pm`. * `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. * [[ikiwiki-makerepo]]: * creates a repository, @@ -30,7 +27,7 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). ### To do -* Add automated tests. ([Blindly adding svn-like tests to `t/file_pruned.t`](http://www.netbsd.org/~schmonz/ikiwiki-cvs/cvs-t-file_pruned.t.diff) doesn't do the trick.) +* Add automated tests. (Blindly adding svn-like tests to `t/file_pruned.t` doesn't do the trick.) * If the argument to `cvs add` smells like a binary file, `cvs add -kb` it (for [[plugins/attachment]] support). * Don't slurp the entire `cvsps` output into memory (!). * Instead of resource-intensively scraping changesets with `cvsps`, have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce and keep records of commits. `cvsps` can be used as a fallback for repositories without such records. -- cgit v1.2.3 From db041b8854d2d3f7137367e11e960ac4f6cdb6c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 16 Aug 2009 13:53:44 -0400 Subject: minor problem --- doc/plugins/po.mdwn | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 3766ad295..3f91775f1 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -308,7 +308,19 @@ That's really confusing, especially as clicking such a link brings up an edit form to create a new, english page. This is with po_link_to=current or negotiated. With default, it doesn't -happen.. --[[Joey]] +happen.. + +Also, this may only happen if the page being linked to is coming from an +underlay, and the underlays lack translation to a given language. +--[[Joey]] + +recentchanges links to po files +------------------------------- + +When a po file is changed, the recentchanges page shows a link such as +"sandbox.es". But, clicking on it goes to the English (or negotiated +language) version of the page. It would be better in this one case if +the link went direct to the translated version of the page. --[[Joey]] Double commits of po files -------------------------- -- cgit v1.2.3 From 9ca8de2e75bc9a11b1b8547b375a887a8b1ef60b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 16 Aug 2009 14:40:40 -0400 Subject: add l10n branch --- doc/git.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 1cd91e532..06bccc7a3 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -33,6 +33,8 @@ into [[Joey]]'s working tree. This is recommended. :-) * github `git://github.com/joeyh/ikiwiki.git` ([browse](http://github.com/joeyh/ikiwiki/tree/master)) A mirror of the main repo, automatically updated. +* l10n `git://l10n.ikiwiki.info/` + Open push localization branch used for * [[smcv]] `git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git` * [[intrigeri]] `git://gaffer.ptitcanardnoir.org/ikiwiki.git` * [[gmcmanus]] `git://github.com/gmcmanus/ikiwiki.git` -- cgit v1.2.3 From 611256ba1c6f9b5cfdaabed634a1be00eb32e7a7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 16 Aug 2009 16:32:35 -0400 Subject: clarification --- doc/todo/should_optimise_pagespecs.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 9d2611249..33bca677a 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -128,6 +128,9 @@ to avoid.. > and the hash for individual page names. To make this work you need to adjust the > API so it knows which you're adding. -- [[Will]] +> I wasn't thinking about a lookup hash, just a dedup hash, FWIW. +> --[[Joey]] + Also, since a lot of places are calling add_depends in a loop, it probably makes sense to just make it accept a list of dependencies to add. It'll be marginally faster, probably, and should allow for better optimisation -- cgit v1.2.3 From 89b5e2b8224a6e05e8f2a7d2d0affe7ae700fa97 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Mon, 17 Aug 2009 16:15:41 -0400 Subject: responses to code review (I'll try to get them implemented later this week) --- doc/todo/should_optimise_pagespecs.mdwn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 33bca677a..0a3720b3c 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -113,6 +113,13 @@ In saveindex it still or'd together the depends list, but the `{depends}` field seems only useful for backwards compatability (ie, ikiwiki-transition uses it still), and otherwise just bloats the index. +> If it's acceptable to declare that downgrading IkiWiki requires a complete +> rebuild, I'm happy with that. I'd prefer to keep the (simple form of the) +> transition done automatically during a load/save cycle, rather than +> requiring ikiwiki-transition to be run; we should probably say in NEWS +> that the performance increase won't fully apply until the next +> rebuild. --[[smcv]] + Is an array the right data structure? `add_depends` has to loop through the array to avoid dups, it would be better if a hash were used there. Since inline (and other plugins) explicitly add all linked pages, each as a @@ -131,17 +138,31 @@ to avoid.. > I wasn't thinking about a lookup hash, just a dedup hash, FWIW. > --[[Joey]] +>> I was under the impression from previous code review that you preferred +>> to represent unordered sets as lists, rather than hashes with dummy +>> values. If I was wrong, great, I'll fix that and it'll probably go +>> a bit faster. --[[smcv]] + Also, since a lot of places are calling add_depends in a loop, it probably makes sense to just make it accept a list of dependencies to add. It'll be marginally faster, probably, and should allow for better optimisation when adding a lot of depends at once. +> That'd be an API change; perhaps marginally faster, but I don't +> see how it would allow better optimisation if we're de-duplicating +> anyway? --[[smcv]] + In Render.pm, we now have a triply nested loop, which is a bit scary for efficiency. It seems there should be a way to rework this code so it can use the optimised `pagespec_match_list`, and/or hoist some of the inner loop calculations (like the `pagename`) out. +> I don't think the complexity is any greater than it was: I've just +> moved one level of "loop" out of the generated Perl, to be +> in visible code. I'll see whether some of it can be hoisted, though. +> --[[smcv]] + Very good catch on img/meta using the wrong dependency; verified in the wild! (I've cherry-picked those bug fixes.) -- cgit v1.2.3 From 46adbbd1c377b6c4a55c466e27de0bdce2fcb52c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 17 Aug 2009 16:30:21 -0400 Subject: respond --- doc/todo/should_optimise_pagespecs.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 0a3720b3c..1594dcee7 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -120,6 +120,11 @@ uses it still), and otherwise just bloats the index. > that the performance increase won't fully apply until the next > rebuild. --[[smcv]] +>> It is acceptable not to support downgrades. +>> I don't think we need a NEWS file update since any sort of refresh, +>> not just a full rebuild, will cause the indexdb to be loaded and saved, +>> enabling the optimisation. --[[Joey]] + Is an array the right data structure? `add_depends` has to loop through the array to avoid dups, it would be better if a hash were used there. Since inline (and other plugins) explicitly add all linked pages, each as a @@ -143,6 +148,9 @@ to avoid.. >> values. If I was wrong, great, I'll fix that and it'll probably go >> a bit faster. --[[smcv]] +>>> It depends, really. And it'd certianly make sense to benchmark such a +>>> change. --[[Joey]] + Also, since a lot of places are calling add_depends in a loop, it probably makes sense to just make it accept a list of dependencies to add. It'll be marginally faster, probably, and should allow for better optimisation @@ -152,6 +160,11 @@ when adding a lot of depends at once. > see how it would allow better optimisation if we're de-duplicating > anyway? --[[smcv]] +>> Well, I was thinking that it might be sufficient to build a `%seen` +>> hash of dependencies inside `add_depends`, if the places that call +>> it lots were changed to just call it once. Of course the only way to +>> tell is benchmarking. --[[Joey]] + In Render.pm, we now have a triply nested loop, which is a bit scary for efficiency. It seems there should be a way to rework this code so it can use the optimised `pagespec_match_list`, @@ -163,6 +176,10 @@ out. > in visible code. I'll see whether some of it can be hoisted, though. > --[[smcv]] +>> The call to `pagename` is the only part I can see that's clearly +>> run more often than before. That function is pretty inexpensive, but.. +>> --[[Joey]] + Very good catch on img/meta using the wrong dependency; verified in the wild! (I've cherry-picked those bug fixes.) -- cgit v1.2.3 From 9552f35b5153cf324141430e415c077d8387a810 Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Tue, 18 Aug 2009 15:17:58 +0100 Subject: added my homepage link --- doc/users/Jimmy_Tang.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/Jimmy_Tang.mdwn (limited to 'doc') diff --git a/doc/users/Jimmy_Tang.mdwn b/doc/users/Jimmy_Tang.mdwn new file mode 100644 index 000000000..a1402bcae --- /dev/null +++ b/doc/users/Jimmy_Tang.mdwn @@ -0,0 +1 @@ + -- cgit v1.2.3 From 8315913a252f9a036f139a1d9541ae1693ef33eb Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Tue, 18 Aug 2009 15:22:02 +0100 Subject: added myself as a user --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 58dd51600..e1e25a045 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -124,6 +124,7 @@ Personal sites and blogs * [Mick Pollard aka \_lunix_ - Personal sysadmin blog and wiki](http://www.lunix.com.au) * [tumashu's page](http://tumashu.github.com) This is my personal site in github created with ikiwiki and only a page,you can get the [source](http://github.com/tumashu/tumashu/tree/master) * [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage +* [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From eedd1687f821a649ff2d30da8beb67012cdab50d Mon Sep 17 00:00:00 2001 From: "http://emptty.myopenid.com/" Date: Wed, 19 Aug 2009 05:08:49 -0400 Subject: --- doc/ikiwiki/directive/brokenlinks/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/ikiwiki/directive/brokenlinks/discussion.mdwn (limited to 'doc') diff --git a/doc/ikiwiki/directive/brokenlinks/discussion.mdwn b/doc/ikiwiki/directive/brokenlinks/discussion.mdwn new file mode 100644 index 000000000..65e97cff6 --- /dev/null +++ b/doc/ikiwiki/directive/brokenlinks/discussion.mdwn @@ -0,0 +1 @@ +Would it be possible to have such a thing also checking for external links? -- [[user/emptty]] -- cgit v1.2.3 From 036f4f367d092b5017e1deb4cd95480ac1171da7 Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Wed, 19 Aug 2009 12:33:09 -0400 Subject: bugs with po and git plugins --- doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn (limited to 'doc') diff --git a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn new file mode 100644 index 000000000..f87457080 --- /dev/null +++ b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn @@ -0,0 +1,7 @@ +po files are not added to git (error: /path/to/po/file not in repository tree) in my setup. + +I have set absolute path for srcdir = '/path/to/repo/doc/'. The root of my git repository is '/path/to/repo/'. When I enable the po plugin, it creates all po files and produces an error when it try to add the file saying that the /path/to/repo/doc/index.fr.po is not in the repository tree. + +I have no problem when I use an relative path like srcdir = '.'. + +I have an other issue with the po plugin when I set the srcdir to './doc/' (provided that my config file is in /path/to/repo). In this case the po plugin try to add 'doc/doc/index.fr.po' which does not exists (seems like the srcdir path is prepended twice). -- cgit v1.2.3 From 9b799ccc851afc70b5b068e088f095e14005bda8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Aug 2009 14:05:59 -0400 Subject: po: Fixed to run rcs_add ralative to srcdir. --- IkiWiki/Plugin/po.pm | 2 +- debian/changelog | 1 + doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index aa3d72b90..414906999 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -414,7 +414,7 @@ sub change (@) { } if (@pofiles) { refreshpofiles($masterfile, @pofiles); - map { IkiWiki::rcs_add($_) } @pofiles if $config{rcs}; + map { s/^\Q$config{srcdir}\E\/*//; IkiWiki::rcs_add($_) } @pofiles if $config{rcs}; $updated_po_files=1; } } diff --git a/debian/changelog b/debian/changelog index ddf69f284..4bb450a55 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ ikiwiki (3.141593) UNRELEASED; urgency=low pages from the basewiki. * Updated French program translation from Philippe Batailler. Closes: #542036 + * po: Fixed to run rcs_add ralative to srcdir. -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn index f87457080..6fadff07e 100644 --- a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn +++ b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn @@ -5,3 +5,10 @@ I have set absolute path for srcdir = '/path/to/repo/doc/'. The root of my git r I have no problem when I use an relative path like srcdir = '.'. I have an other issue with the po plugin when I set the srcdir to './doc/' (provided that my config file is in /path/to/repo). In this case the po plugin try to add 'doc/doc/index.fr.po' which does not exists (seems like the srcdir path is prepended twice). + +> You should never use a relative srcdir path with ikiwiki. +> +> I wonder what version of git you have there, since it works ok with the +> version I have here. But, the po plugin is definitly doing the wrong +> thing; it's telling git to add the po file with the full scrdir path +> rather than relative to its root. Fixed that. [[done]] --[[Joey]] -- cgit v1.2.3 From f712ffa66df2edc119d34a09a76b0c4d82563543 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Aug 2009 14:12:37 -0400 Subject: another issue --- doc/plugins/po.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 3f91775f1..dca2f5d66 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -336,6 +336,11 @@ and then committed again. The second commit makes this change: Same thing happens when a change to an existing page triggers a po file update. --[[Joey]] +Ugly messages with empty files +------------------------------ + +If there are empty .mdwn files, the po plugin displays some ugly messages. + Documentation ------------- -- cgit v1.2.3 From e6ed1aabfd06884b655deaf5af0c25263aa5c1a0 Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Wed, 19 Aug 2009 14:42:35 -0400 Subject: Add some details --- doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn index 6fadff07e..c794f82d7 100644 --- a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn +++ b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn @@ -12,3 +12,23 @@ I have an other issue with the po plugin when I set the srcdir to './doc/' (prov > version I have here. But, the po plugin is definitly doing the wrong > thing; it's telling git to add the po file with the full scrdir path > rather than relative to its root. Fixed that. [[done]] --[[Joey]] + +>> Yeah, I figured for the relative path +>> Git version 1.6.3.3 (on both my dev and server machines) +>> +>> Here is an example of what I get when I update the po file on my laptop and I push to the master repository: +>> +>> From /srv/git/sb +>> 5eb4619..ecac4d7 master -> origin/master +>> scanning doc.fr.po +>> building doc.fr.po +>> building doc.mdwn, which depends on doc.fr +>> building recentchanges.mdwn, which depends on recentchanges/change_ecac4d7311b15a3a3ed03102b9250487315740bc +>> fatal: '/srv/www/sb.l.n/new/doc/doc.fr.po' is outside repository +>> 'git add /srv/www/sb.l.n/new/doc/doc.fr.po' failed: at /usr/share/perl5/IkiWiki/Plugin/git.pm line 161. +>> done +>> To ssh://git.lohrun.net/var/cache/git/songbook.git +>> 5eb4619..ecac4d7 master -> master +>> +>> The root repository used to run ikiwiki is `/srv/www/sb.l.n/new/` +>> -- [[AlexandreDupas]] -- cgit v1.2.3 From 69874215d4c8ca5fcf877f020352ec17f4a43c14 Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Wed, 19 Aug 2009 14:45:29 -0400 Subject: formatting --- .../po_plugin_cannot_add_po_files_into_git.mdwn | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn index c794f82d7..8e3399611 100644 --- a/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn +++ b/doc/bugs/po_plugin_cannot_add_po_files_into_git.mdwn @@ -17,18 +17,18 @@ I have an other issue with the po plugin when I set the srcdir to './doc/' (prov >> Git version 1.6.3.3 (on both my dev and server machines) >> >> Here is an example of what I get when I update the po file on my laptop and I push to the master repository: ->> ->> From /srv/git/sb ->> 5eb4619..ecac4d7 master -> origin/master ->> scanning doc.fr.po ->> building doc.fr.po ->> building doc.mdwn, which depends on doc.fr ->> building recentchanges.mdwn, which depends on recentchanges/change_ecac4d7311b15a3a3ed03102b9250487315740bc ->> fatal: '/srv/www/sb.l.n/new/doc/doc.fr.po' is outside repository ->> 'git add /srv/www/sb.l.n/new/doc/doc.fr.po' failed: at /usr/share/perl5/IkiWiki/Plugin/git.pm line 161. ->> done ->> To ssh://git.lohrun.net/var/cache/git/songbook.git ->> 5eb4619..ecac4d7 master -> master ->> + + From /srv/git/sb + 5eb4619..ecac4d7 master -> origin/master + scanning doc.fr.po + building doc.fr.po + building doc.mdwn, which depends on doc.fr + building recentchanges.mdwn, which depends on recentchanges/change_ecac4d7311b15a3a3ed03102b9250487315740bc + fatal: '/srv/www/sb.l.n/new/doc/doc.fr.po' is outside repository + 'git add /srv/www/sb.l.n/new/doc/doc.fr.po' failed: at /usr/share/perl5/IkiWiki/Plugin/git.pm line 161. + done + To ssh://git.lohrun.net/var/cache/git/songbook.git + 5eb4619..ecac4d7 master -> master + >> The root repository used to run ikiwiki is `/srv/www/sb.l.n/new/` >> -- [[AlexandreDupas]] -- cgit v1.2.3 From 24d43bea075354ecd8546131529a064140b9039c Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Thu, 20 Aug 2009 16:10:56 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index e2411af63..847d0f92a 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -3,3 +3,33 @@ post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. That just seems unnecessarily complicated. Why can't ikiwiki itself detect the "cvs add " call and avoid doing anything in that case? --[[Joey]] + +> The wrapper wrapper does three things: +> +> 7. It ignores `cvs add `, since this is a weird CVS +> behavior that ikiwiki gets confused by and doesn't need to act on. +> 7. It prevents `cvs` locking against itself: `cvs commit` takes a +> write lock and runs the post-commit hook, which runs `cvs update`, +> which wants a read lock and sleeps forever -- unless the post-commit +> hook runs in the background so the commit can "finish". +> 7. It fails silently if the ikiwiki post-commit hook is missing. +> CVS doesn't have any magic post-commit filenames, so hooks have to +> be configured explicitly. I don't think a commit will actually fail +> if a configured post-commit hook is missing (though I can't test +> this at the moment). +> +> Thing 1 can probably be handled within ikiwiki, if that seems less +> gross to you. +> +> Thing 2 I'm less sure of. (I'd like to see the web UI return +> immediately on save anyway, to a temporary "rebuilding, please wait +> if you feel like knowing when it's done" page, but this problem +> with CVS happens with any kind of commit, and could conceivably +> happen with some other VCS.) +> +> Thing 3 I think I did in order to squelch the error messages that +> were bollixing up the CGI. It was easy to do this in the wrapper +> wrapper, but if that's going away, it can be done just as easily +> with output redirection in `CVSROOT/loginfo`. +> +> --[[schmonz]] -- cgit v1.2.3 From 73e562edc865c6357cc1b4c8436e0a44957800e8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 21 Aug 2009 16:09:26 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 847d0f92a..ed6cf506e 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -20,16 +20,34 @@ the "cvs add " call and avoid doing anything in that case? > > Thing 1 can probably be handled within ikiwiki, if that seems less > gross to you. -> + +>> It seems like it might be. You can use a `getopt` hook to check +>> `@ARGV` to see how it was called. --[[Joey]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem > with CVS happens with any kind of commit, and could conceivably > happen with some other VCS.) -> + +>> None of the other VCSes let a write lock block a read lock, apparently. +>> +>> Anyway, re the backgrounding, when committing via the web, the +>> post-commit hook doesn't run anyway; the rendering is done via the +>> ikiwiki CGI. It would certianly be nice if it popped up a quick "working" +>> page and replaced it with the updated page when done, but that's +>> unrelated; the post-commit +>> hook only does rendering when committing using the VCS directly. The +>> backgrounding you do actually seems safe enough -- but tacking +>> on a " &" to the ikiwiki wrapper call doesn't need a wrapper script, +>> does it? --[[Joey]] + > Thing 3 I think I did in order to squelch the error messages that > were bollixing up the CGI. It was easy to do this in the wrapper > wrapper, but if that's going away, it can be done just as easily > with output redirection in `CVSROOT/loginfo`. > > --[[schmonz]] + +>> If the error messages screw up the CGI they must go to stdout. +>> I thought we had stderr even in the the CVS dark ages. ;-) --[[Joey]] -- cgit v1.2.3 From 7849d675a3cf3792a271a2fa9fc9172b394b3f25 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sat, 22 Aug 2009 02:02:34 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index ed6cf506e..65b6befd1 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -24,6 +24,13 @@ the "cvs add " call and avoid doing anything in that case? >> It seems like it might be. You can use a `getopt` hook to check >> `@ARGV` to see how it was called. --[[Joey]] +>>> This does the trick iff the post-commit wrapper passes its args +>>> along. Committed on my branch. This seems potentially dangerous, +>>> since the args passed to ikiwiki are influenced by web commits. +>>> I don't see an exploit, but for paranoia's sake, maybe the wrapper +>>> should only be built with execv() if the cvs plugin is loaded? +>>> --[[schmonz]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem @@ -42,6 +49,9 @@ the "cvs add " call and avoid doing anything in that case? >> on a " &" to the ikiwiki wrapper call doesn't need a wrapper script, >> does it? --[[Joey]] +>>> Nope, it works fine to append it to the `CVSROOT/loginfo` line. +>>> Fixed on my branch. --[[schmonz]] + > Thing 3 I think I did in order to squelch the error messages that > were bollixing up the CGI. It was easy to do this in the wrapper > wrapper, but if that's going away, it can be done just as easily @@ -51,3 +61,10 @@ the "cvs add " call and avoid doing anything in that case? >> If the error messages screw up the CGI they must go to stdout. >> I thought we had stderr even in the the CVS dark ages. ;-) --[[Joey]] + +>>> Some messages go to stderr, but definitely not all. That's why +>>> I wound up reaching for IPC::Cmd, to execute the command line +>>> safely while shutting CVS up. Anyway, I've tested what happens +>>> if a configured post-commit hook is missing, and it seems fine, +>>> probably also thanks to IPC::Cmd. +>>> --[[schmonz]] -- cgit v1.2.3 From 2acc71849d78d1dde7ac237e8ebc54d33548e9e7 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sat, 22 Aug 2009 03:52:45 -0400 Subject: no more wrapper wrapper --- doc/plugins/contrib/cvs.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 23e00201f..6b600eef7 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -22,8 +22,7 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * [[ikiwiki-makerepo]]: * creates a repository, * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), - * creates a small post-commit wrapper to prevent `cvs add ` from being seen by ikiwiki's [[post-commit]] hook (and avoid `cvs` locking against itself), - * configures the wrapper itself as a post-commit hook in `CVSROOT/loginfo`. + * configures the post-commit hook in `CVSROOT/loginfo`. * CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). ### To do -- cgit v1.2.3 From 78213cf83837132e4dd392a0c98d199a05103d2d Mon Sep 17 00:00:00 2001 From: "http://xn--andreaskrger-llb.myopenid.com/" Date: Sat, 22 Aug 2009 06:07:38 -0400 Subject: --- doc/sandbox.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index c84d52ef2..b8790d8ca 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -9,6 +9,15 @@ While working on [[http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?p=27199|[97] * Kinda curious why **Tcl** does not show her face in this Wiki arena * It looks like that I was wrong, from Wikipedia Creole page it mention that ikiwiki is also adopting Creole markup. +--- + +Guten Morgen aus Deutschland. Wir mögen Umläuter (ich weiß, der Plural ist falsch, aber dafür hat er einen). Die sind heutzutage kein Ärgernis mehr. + +&#x263a; becomes ☺ + + --- I try to have a discussion page !!! -- cgit v1.2.3 From e51f099ed1e73d9b84ad7e26758c1e60f42205b8 Mon Sep 17 00:00:00 2001 From: "http://xn--andreaskrger-llb.myopenid.com/" Date: Sat, 22 Aug 2009 06:25:12 -0400 Subject: --- doc/sandbox.mdwn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index b8790d8ca..6ea8cc607 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -15,9 +15,7 @@ Guten Morgen aus Deutschland. Wir mögen Umläuter (ich weiß, der Plural ist fa &#x263a; becomes ☺ - + --- I try to have a discussion page !!! -- cgit v1.2.3 From 59527de76708616bc8966d0ced3577573c3062b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 22 Aug 2009 14:29:18 -0400 Subject: uh oh --- doc/plugins/contrib/cvs/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 65b6befd1..b063a53c2 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -31,6 +31,11 @@ the "cvs add " call and avoid doing anything in that case? >>> should only be built with execv() if the cvs plugin is loaded? >>> --[[schmonz]] +>>>> Hadn't considered that. While in wrapper mode the normal getopt is not +>>>> done, plugin getopt still runs, and so any unsafe options that +>>>> other plugins support could be a problem if another user runs +>>>> the setuid wrapper and passes those options through. --[[Joey]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem -- cgit v1.2.3 From 16b0e475487911790fae1b78a89ce94477eb970a Mon Sep 17 00:00:00 2001 From: "http://rtfb.myopenid.com/" Date: Sun, 23 Aug 2009 11:40:44 -0400 Subject: Added closing parenthesis --- doc/setup/byhand.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/setup/byhand.mdwn b/doc/setup/byhand.mdwn index 0184d3d2a..53f8d18bb 100644 --- a/doc/setup/byhand.mdwn +++ b/doc/setup/byhand.mdwn @@ -83,7 +83,7 @@ the rest of the files. A good place to put it is in a ~/.ikiwiki/ subdirectory. Most of the options, like `wikiname` in the setup file are the same as -ikiwiki's command line options (documented in [[usage]]. `srcdir` and +ikiwiki's command line options (documented in [[usage]]). `srcdir` and `destdir` are the two directories you specify when running ikiwiki by hand. Make sure that these are pointing to the right directories, and read through and configure the rest of the file to your liking. -- cgit v1.2.3 From 0d5a8bc3f060a26069df4c20880888303ff41d55 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 23 Aug 2009 15:41:29 -0400 Subject: new rsync plugin --- doc/plugins/contrib/rsync.mdwn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/plugins/contrib/rsync.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/rsync.mdwn b/doc/plugins/contrib/rsync.mdwn new file mode 100644 index 000000000..71cd63947 --- /dev/null +++ b/doc/plugins/contrib/rsync.mdwn @@ -0,0 +1,21 @@ +[[!template id=plugin name=rsync core=0 author="[[schmonz]]"]] + +[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] + +This plugin allows ikiwiki to push generated pages to another host +by running a command such as `rsync`. + +### Usage +7. Enable automated SSH key exchange between ikiwiki and the remote + host. [keychain](http://www.gentoo.org/proj/en/keychain/) makes + it easy to use a passphrase-protected key for this purpose. It's + also a good idea to specify the exact command line to be permitted + in the remote host's `$HOME/.ssh/authorized_keys`. +7. Set `rsync_command` in your setup file. If you're using a + passphrase-protected key, then set `rsync_command` to a shell + script which reads `keychain`'s current state before calling + `rsync`. + +### Implementation details +* The plugin relies on a new "postrefresh" hook called at the very end of + `IkiWiki/Render.pm:refresh()`. -- cgit v1.2.3 From 156625ebac9fdd6d7193c5d997e6fd0141d4d84b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Aug 2009 16:27:18 -0400 Subject: update config file snippet to use current git_wrapper name --- doc/tips/laptop_wiki_with_git_extended.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/tips/laptop_wiki_with_git_extended.mdwn b/doc/tips/laptop_wiki_with_git_extended.mdwn index 620370218..0666da450 100644 --- a/doc/tips/laptop_wiki_with_git_extended.mdwn +++ b/doc/tips/laptop_wiki_with_git_extended.mdwn @@ -10,7 +10,7 @@ a bare repo on `gitserver`, and clone that to a workingdir on gitserver. Next create a setup file for the laptop with gitorigin_branch=> "", - wrapper => "/working/dir/.git/hooks/post-commit", + git_wrapper => "/working/dir/.git/hooks/post-commit", At this point, assuming you followed page above, and not my hasty summary, @@ -21,7 +21,7 @@ a bare repo on `gitserver`, and clone that to a workingdir on gitserver. 2. Now create a setup file for the server (I call it server.setup). gitorigin_branch=> "origin", - wrapper => "/repo/wiki.git/hooks/post-update.ikiwiki" + git_wrapper => "/repo/wiki.git/hooks/post-update.ikiwiki" Note the non-standard and bizzare name of the hook. -- cgit v1.2.3 From b43c25001453674feb1ca862325222da67bc758c Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sun, 23 Aug 2009 17:54:38 -0400 Subject: use a map instead --- doc/users/schmonz.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/users/schmonz.mdwn b/doc/users/schmonz.mdwn index 752880561..8273bdbb6 100644 --- a/doc/users/schmonz.mdwn +++ b/doc/users/schmonz.mdwn @@ -1,4 +1,3 @@ [Amitai Schlair](http://www.columbia.edu/~ays2105/) recently discovered ikiwiki and finds himself using it for all sorts of things. His attempts at contributing: -* [[plugins/contrib/unixauth]] -* [[plugins/contrib/cvs]] +[[!map pages="link(users/schmonz) and plugins/* and !*/Discussion"]] -- cgit v1.2.3 From 18a7b65094ca761fea0785a81f3c0923ea66b018 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 23 Aug 2009 18:15:56 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index b063a53c2..2de938fb7 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -36,6 +36,19 @@ the "cvs add " call and avoid doing anything in that case? >>>> other plugins support could be a problem if another user runs >>>> the setuid wrapper and passes those options through. --[[Joey]] +>>>>> I've tried compiling the argument check into the wrapper as +>>>>> the first thing main() does, and was surprised to find that +>>>>> this doesn't prevent the `cvs add ` deadlock in a web +>>>>> commit. I was convinced this'd be a reasonable solution, +>>>>> especially if conditionalized on the cvs plugin being loaded, +>>>>> but it doesn't work. And I stuck debug printfs at the beginning +>>>>> of all the rcs_foo() subs, and whatever `cvs add ` is +>>>>> doing to ikiwiki isn't visible to my plugin, because none of +>>>>> those subs are getting called. Nuts. Can you think of anything +>>>>> else that might solve the problem, or should I go back to +>>>>> generating a minimal wrapper wrapper that checks for just +>>>>> this one thing? --[[schmonz]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem -- cgit v1.2.3 From 80ca685385cd827f19718eaea5fb772782f68d3b Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 23 Aug 2009 23:27:53 -0400 Subject: why I needed this, in case it's useful to someone else --- doc/plugins/contrib/rsync/discussion.mdwn | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/plugins/contrib/rsync/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn new file mode 100644 index 000000000..a2c2eb725 --- /dev/null +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -0,0 +1,27 @@ +## A use case + +Why I needed this plugin: I have two web servers available to me +for a project. Neither does everything I need, but together they +do. (This is a bit like the [Amazon S3 +scenario](http://kitenet.net/~joey/blog/entry/running_a_wiki_on_Amazon_S3/).) + +Server (1) is a university web server. It provides plentiful space +and bandwidth, easy authentication for people editing the wiki, and +a well-known stable URL. The wiki really wants to live here and +very easily could except that the server doesn't allow arbitrary +CGIs. + +Server (2) is provided by a generous alumnus's paid [[tips/DreamHost]] +account. Disk and particularly network usage need to be minimized +because over some threshold it costs him. CGI, etc. are available. + +My plan was to host the wiki on server (1) by taking advantage of +server (2) to store the repository, source checkout, and generated +pages, to host the repository browser, and to handle ikiwiki's CGI +operations. In order for this to work, web edits on (2) would need +to automatically push any changed pages to (1). + +As a proof of concept, I added an rsync post-commit hook after +ikiwiki's usual. It worked, just not for web edits, which is how +the wiki will be used. So I wrote this plugin to finish the job. +The wiki now lives on (1), and clicking "edit" just works. -- cgit v1.2.3 From a27861c512bcf5808c59d9bc2b38c80b559d6d69 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Mon, 24 Aug 2009 03:13:25 -0400 Subject: Comment on another possible solution to the use case. --- doc/plugins/contrib/rsync/discussion.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index a2c2eb725..b2d21e6d5 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -25,3 +25,14 @@ As a proof of concept, I added an rsync post-commit hook after ikiwiki's usual. It worked, just not for web edits, which is how the wiki will be used. So I wrote this plugin to finish the job. The wiki now lives on (1), and clicking "edit" just works. + +> Just out of interest, why use `rsync` and not `git push`. i.e. a +> different setup to solve the same problem would be to run a +> normal ikiwiki setup on the universities server with its git +> repository available over ssh (same security setup your using +> for rsync should work for git over ssh). On the cgi-capable server, +> when it would rsync, make it git push. It would seem that git +> has enough information that it should be able to be more +> network efficient. It also means that corruption at one end +> wouldn't be propagated to the other end. -- [[Will]] + -- cgit v1.2.3 From 8d504e6b3dcacd333c0b07387e7acd3bf8a65d9c Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 24 Aug 2009 04:20:31 -0400 Subject: response --- doc/plugins/contrib/rsync/discussion.mdwn | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index b2d21e6d5..20c04af0f 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -24,7 +24,7 @@ to automatically push any changed pages to (1). As a proof of concept, I added an rsync post-commit hook after ikiwiki's usual. It worked, just not for web edits, which is how the wiki will be used. So I wrote this plugin to finish the job. -The wiki now lives on (1), and clicking "edit" just works. +The wiki now lives on (1), and clicking "edit" just works. --[[schmonz]] > Just out of interest, why use `rsync` and not `git push`. i.e. a > different setup to solve the same problem would be to run a @@ -36,3 +36,13 @@ The wiki now lives on (1), and clicking "edit" just works. > network efficient. It also means that corruption at one end > wouldn't be propagated to the other end. -- [[Will]] +>> Hey, that's a nice solution. (The site was in svn to begin with, +>> but it's in git now.) One advantage of my approach in this particular +>> case: server (1) doesn't have `git` installed, but does have `rsync`, +>> so (1)'s environment can remain completely untweaked other than the +>> SSH arrangement. I kind of like that all the sysadmin effort is +>> contained on one host. +>> +>> This plugin is definitely still useful for projects not able to use +>> a DVCS (of which I've got at least one other), and possibly for +>> other uses not yet imagined. ;-) --[[schmonz]] -- cgit v1.2.3 From f5187ed0b50d363ad16c6273b986f7e4fccc6c5d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 14:08:20 -0400 Subject: clarify and add link --- doc/shortcuts.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index 14cd5ff2b..d9c2e1937 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -62,9 +62,9 @@ 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 url-encoding it, and '%S' is -replaced with the raw, non-encoded text. The optional `desc` parameter -controls the description of the link. +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. Remember that the `name` you give the shortcut will become a new [[ikiwiki/directive]]. Avoid using a `name` that conflicts @@ -73,5 +73,5 @@ parameter that will override the one provided at definition time. If you come up with a shortcut that you think others might find useful, consider contributing it to the [shortcuts page on the ikiwiki -ikiwiki](http://ikiwiki.info/shortcuts/), so that future versions of +wiki](http://ikiwiki.info/shortcuts/), so that future versions of ikiwiki will include your shortcut in the standard underlay. -- cgit v1.2.3 From 004d460d9cc1fc6a691bc6eaa0d5cd2a9206c224 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 14:09:58 -0400 Subject: fix link --- doc/shortcuts.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index d9c2e1937..500146a31 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -62,7 +62,7 @@ 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]] +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. -- cgit v1.2.3 From 43db8269a002daf00ac6195d4bd70018b4b68b75 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 15:47:24 -0400 Subject: response --- doc/plugins/contrib/cvs/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 2de938fb7..e1fa6e428 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -49,6 +49,9 @@ the "cvs add " call and avoid doing anything in that case? >>>>> generating a minimal wrapper wrapper that checks for just >>>>> this one thing? --[[schmonz]] +>>>>>> I don't see how there could possibly be a difference between +>>>>>> ikiwiki's C wrapper and your shell wrapper wrapper here. --[[Joey]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem -- cgit v1.2.3 From 68b6926420172f69a05bccbdbe7776755cd92a27 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 15:51:05 -0400 Subject: fixed via getsource plugin --- doc/todo/Raw_view_link.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Raw_view_link.mdwn b/doc/todo/Raw_view_link.mdwn index fd64074c2..b62a9022b 100644 --- a/doc/todo/Raw_view_link.mdwn +++ b/doc/todo/Raw_view_link.mdwn @@ -4,7 +4,7 @@ The configuration setting for Mercurial could be something like this: rawurl => "http://localhost:8000//raw-file/tip/\[[file]]", -> What I want to do when I want to see if the raw source is either +> What I do when I want to see if the raw source is either > click on the edit link, or click on history and navigate to it in the > history browser (easier to do in viewvc than in gitweb, IIRC). > Not that I'm opposed to the idea of a plugin that adds a Raw link @@ -14,4 +14,6 @@ The configuration setting for Mercurial could be something like this: >> to gitweb/etc. I think Will's patch is a good approach, and have improved >> on it a bit in a git branch. +>>> Since that is merged in now, I'm marking this [[done]] --[[Joey]] + [[!tag wishlist]] -- cgit v1.2.3 From 6b97e8f0ee74bb2f3189f669deefe0a227b0fc6f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 15:52:56 -0400 Subject: close as wontfix --- doc/todo/Suggested_location_should_be_subpage_if_siblings_exist.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Suggested_location_should_be_subpage_if_siblings_exist.mdwn b/doc/todo/Suggested_location_should_be_subpage_if_siblings_exist.mdwn index 0fb14bafe..4489dd5d2 100644 --- a/doc/todo/Suggested_location_should_be_subpage_if_siblings_exist.mdwn +++ b/doc/todo/Suggested_location_should_be_subpage_if_siblings_exist.mdwn @@ -23,4 +23,4 @@ that we're at the root of a (sub-)hierarchy. >> This sounds like WONTFIX to me? --[[smcv]] -[[!tag wishlist]] +[[!tag wishlist done]] -- cgit v1.2.3 From cc665380e3c9998ef04f1e42320cecd152ffd23c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 15:57:10 -0400 Subject: move undownloadable item to discussion page --- doc/css_market.mdwn | 11 ----------- doc/css_market/discussion.mdwn | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index 61254c4b8..c0e349552 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -23,17 +23,6 @@ gnomes will convert them to css files..) Debian lighttpd index.html page. [[!meta stylesheet="embeddedmoose"]] -* **Refresh**, contributed by [[FredericLespez]]. Adapted from a free template - designed by [styleshout](http://www.styleshout.com). - You can see it [here](http://fred.ccheznous.org). You can download the local.css file and - the modified templates [here](http://fred.ccheznous.org/refresh_20060602.tgz). - - * This link (above) seems to deliver an empty tarball. - - * You'll find a updated version of these templates [here](http://www.der-winnie.de/~winnie/configs/ikiwiki-templates.tar.gz). - These templates are known to work with ikiwiki 2.31, and since I'll install always the newest one on my server I'll will update them on a regular basis. - * (This link appears to be broken?) - * **[[02_Template.css]]**, contributed and adapted by [maxx](http://martin.wuertele.net/), [original](http://www.openwebdesign.org/viewdesign.phtml?id=3057) designed by [jarico](http://www.openwebdesign.org/userinfo.phtml?user=jcarico) (License: public domain). You'll need a modified page.tmpl diff --git a/doc/css_market/discussion.mdwn b/doc/css_market/discussion.mdwn index 86d16de9a..3dc47b55a 100644 --- a/doc/css_market/discussion.mdwn +++ b/doc/css_market/discussion.mdwn @@ -18,3 +18,20 @@ The most recent version is always available at: . It removes annoying borders around the header and footer. -- [[TimBosse]] + +----- + +I removed this from the list since both places to download it are broken. +--[[Joey]] + +* **Refresh**, contributed by [[FredericLespez]]. Adapted from a free template + designed by [styleshout](http://www.styleshout.com). + You can see it [here](http://fred.ccheznous.org). You can download the local.css file and + the modified templates [here](http://fred.ccheznous.org/refresh_20060602.tgz). + + * This link (above) seems to deliver an empty tarball. + + * You'll find a updated version of these templates [here](http://www.der-winnie.de/~winnie/configs/ikiwiki-templates.tar.gz). + These templates are known to work with ikiwiki 2.31, and since I'll install always the newest one on my server I'll will update them on a regular basis. + * (This link appears to be broken?) + -- cgit v1.2.3 From bc6e50a075b164100d3144a13633647613a3dc8e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 1 Aug 2009 12:43:04 +0100 Subject: Mark "should optimise pagespecs" as done --- doc/todo/should_optimise_pagespecs.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 1594dcee7..5ed24d333 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -90,6 +90,8 @@ I can think about reducung the size of my wiki source and making it available on >> rather than a single pagespec. This does turn out to be faster, although >> not as much as I'd like. --[[smcv]] +>>> [[Merged|done]] --[[smcv]] + >>> I just wanted to note that there is a whole long discussion of dependencies and pagespecs on the [[todo/tracking_bugs_with_dependencies]] page. -- [[Will]] >>>> Yeah, I had a look at that (as the only other mention of `pagespec_merge`). -- cgit v1.2.3 From 848bb66c37b94b633a378e186e561aebb7bab43a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 1 Aug 2009 12:43:37 +0100 Subject: Indicate that pagespec_merge() is no longer needed (much rejoicing?) --- doc/todo/tracking_bugs_with_dependencies.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/tracking_bugs_with_dependencies.mdwn b/doc/todo/tracking_bugs_with_dependencies.mdwn index a198530fc..bfdbf0875 100644 --- a/doc/todo/tracking_bugs_with_dependencies.mdwn +++ b/doc/todo/tracking_bugs_with_dependencies.mdwn @@ -410,8 +410,8 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W >>>>> then the last definition (baz) takes precedence. >>>>> In the process of writing this I think I've come up with a way to change this back the way it was, still using closures. -- [[Will]] ->>> Alternatively, my [[remove-pagespec-merge|should_optimise_pagespecs]] ->>> branch solves this, in a Gordian knot sort of way :-) --[[smcv]] +>>> My [[remove-pagespec-merge|should_optimise_pagespecs]] branch has now +>>> solved all this by deleting the offending function :-) --[[smcv]] >> Secondly, it seems that there are two types of dependency, and ikiwiki >> currently only handles one of them. The first type is "Rebuild this -- cgit v1.2.3 From 68fd245addb9b96b473949349440b86796955cce Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 25 Aug 2009 00:45:28 +0100 Subject: Respond with benchmarks and an updated branch --- doc/todo/should_optimise_pagespecs.mdwn | 79 +++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 1594dcee7..3dfa8e1f2 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -123,7 +123,12 @@ uses it still), and otherwise just bloats the index. >> It is acceptable not to support downgrades. >> I don't think we need a NEWS file update since any sort of refresh, >> not just a full rebuild, will cause the indexdb to be loaded and saved, ->> enabling the optimisation. --[[Joey]] +>> enabling the optimisation. --[[Joey]] + +>>> A refresh will load the current dependencies from `{depends}` and save +>>> them as-is as a one-element `{dependslist}`; only a rebuild will replace +>>> the single complex pagespec with a long list of simpler pagespecs. +>>> --[[smcv]] Is an array the right data structure? `add_depends` has to loop through the array to avoid dups, it would be better if a hash were used there. Since @@ -149,7 +154,9 @@ to avoid.. >> a bit faster. --[[smcv]] >>> It depends, really. And it'd certianly make sense to benchmark such a ->>> change. --[[Joey]] +>>> change. --[[Joey]] + +>>>> Benchmarked, below. --[[smcv]] Also, since a lot of places are calling add_depends in a loop, it probably makes sense to just make it accept a list of dependencies to add. It'll be @@ -163,7 +170,10 @@ when adding a lot of depends at once. >> Well, I was thinking that it might be sufficient to build a `%seen` >> hash of dependencies inside `add_depends`, if the places that call >> it lots were changed to just call it once. Of course the only way to ->> tell is benchmarking. --[[Joey]] +>> tell is benchmarking. --[[Joey]] + +>>> It doesn't seem that it significantly affects performance either way. +>>> --[[smcv]] In Render.pm, we now have a triply nested loop, which is a bit scary for efficiency. It seems there should be a way to @@ -180,7 +190,70 @@ out. >> run more often than before. That function is pretty inexpensive, but.. >> --[[Joey]] +>>> I don't see anything that can be hoisted without significant refactoring, +>>> actually. Beware that there are two pagename calls in the loop: one for +>>> `$f` (which is the page we might want to rebuild), and one for `$file` +>>> (which is the changed page that it might depend on). Note that I didn't +>>> choose those names! +>>> +>>> The three loops are over source files, their lists of dependency pagespecs, +>>> and files that might have changed. I see the following things we might be +>>> doing redundantly: +>>> +>>> * If `$file` is considered as a potential dependency for more than +>>> one `$f`, we evaluate `pagename($file)` more than once. Potential fix: +>>> cache them (this turns out to save about half a second on the docwiki, +>>> see below). +>>> * If several pages depend on the same pagespec, we evaluate whether each +>>> changed page matches that pagespec more than once: however, we do so +>>> with a different location parameter every time, so repeated calls are, +>>> in the general case, the only correct thing to do. Potential fix: +>>> perhaps special-case "page x depends on page y and nothing else" +>>> (i.e. globs that have no wildcards) into a separate hash? I haven't +>>> done anything in this direction. +>>> * Any preparatory work done by pagespec_match (converting the pagespec +>>> into Perl, mostly?) is done in the inner loop; switching to +>>> pagespec_match_list (significant refactoring) saves more than half a +>>> second on the docwiki. +>>> +>>> --[[smcv]] + Very good catch on img/meta using the wrong dependency; verified in the wild! (I've cherry-picked those bug fixes.) +---- + +Benchmarking results: I benchmarked by altering docwiki.setup to switch off +verbose, running "make clean && ./Makefile.PL && make", and timing one rebuild +of the docwiki followed by three refreshes. Before each refresh I used +`touch plugins/*.mdwn` to have something significant to refresh. + +I'm assuming that "user" CPU time is the important thing here (system time was +relatively small in all cases, up to 0.35 seconds per run). + +master at the time of rebasing: 14.20s to rebuild, 10.04/12.07/14.01s to +refresh. I think you can see the bug clearly here - the pagespecs are getting +more complicated every time! + +After the initial optimization: 14.27s to rebuild, 8.26/8.33/8.26 to refresh. +Success! + +Not pre-joining dependencies actually took about ~0.2s more; I don't know why. +I'm worried that duplicates will just build up (again) in less simple cases, +though, so 0.2s is probably a small price to pay for that not happening (it +might well be experimental error, for that matter). + +Not saving {depends} to the index, using a hash instead of a list to +de-duplicate, and allowing add_depends to take an arrayref instead of a single +pagespec had no noticable positive or negative effect on this test. + +Memoizing the results of pagename brought the rebuild time down to 14.06s +and the refresh time down to 7.96/7.92/7.92, a significant win. + +Refactoring to use pagespec_match_list looks more risky from a code churn +point of view; rebuild now takes 14.35s, but refresh is only 7.30/7.29/7.28, +another significant win. + +--[[smcv]] + [[!tag wishlist patch patch/core]] -- cgit v1.2.3 From 96936899da3037fa28f8be73003a14aa829878ee Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 21:54:22 -0400 Subject: at this point I'm down to deciding which specific commits to merge and which were dead ends --- doc/todo/should_optimise_pagespecs.mdwn | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 3dfa8e1f2..f3048f328 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -235,6 +235,21 @@ master at the time of rebasing: 14.20s to rebuild, 10.04/12.07/14.01s to refresh. I think you can see the bug clearly here - the pagespecs are getting more complicated every time! +> I can totally see a bug here, and it's one I didn't think existed. Ie, +> I thought that after the first refresh, the pagespec should stabalize, +> and what it stabalized to was probably unnecessarily long, but not +> growing w/o bounds! +> +> a) Explains why ikiwiki.info has been so slow lately. Well that and some +> other things that overloaded the system. +> b) Suggests to me we will probably want to force a rebuild on upgrade +> when fixing this (via the mechanism in the postinst). +> +> BTW, the underlying bug here is really horribly simple: +> When refreshing, `loadindex` preserves the previous depends list, +> and `add_depends` adds stuff to it. So it doubles every time a page is +> re-rendered during refresh. --[[Joey]] + After the initial optimization: 14.27s to rebuild, 8.26/8.33/8.26 to refresh. Success! @@ -243,17 +258,44 @@ I'm worried that duplicates will just build up (again) in less simple cases, though, so 0.2s is probably a small price to pay for that not happening (it might well be experimental error, for that matter). +> It's weird that the suggested optimisations to +> `add_depends` had no effect. So, the commit message to +> b6fcb1cb0ef27e5a63184440675d465fad652acf is actually wrong.. ? --[[Joey]] + Not saving {depends} to the index, using a hash instead of a list to de-duplicate, and allowing add_depends to take an arrayref instead of a single pagespec had no noticable positive or negative effect on this test. +> I see e4cd168ebedd95585290c97ff42234344bfed46c is still in your branch +> though. I don't like using an arrayref, it could just take `($page, @depends)`. +> and I don't see the need to keep it if it doesn't currently help. +> +> Is there any reason to keep 7227c2debfeef94b35f7d81f42900aa01820caa3 +> if it doesn't improve speed? +> --[[Joey]] + Memoizing the results of pagename brought the rebuild time down to 14.06s and the refresh time down to 7.96/7.92/7.92, a significant win. +> Ok, that seems safe to memoize. (It's a real function and it isn't +> called with a great many inputs.) Why did you chose to memoize it +> explicitly rather than adding it to the memoize list at the top? + Refactoring to use pagespec_match_list looks more risky from a code churn point of view; rebuild now takes 14.35s, but refresh is only 7.30/7.29/7.28, another significant win. --[[smcv]] +> I had mostly convinced myself that +> `pagespec_match_list` would not lead to a speed gain here. My reasoning +> was that you want to stop after finding one match, while `pagespec_match_list` +> checks all pages for matches. So what we're seeing is that +> on a rebuild, `@changed` is all pages, and not short-circuiting leads +> to unnecessary work. OTOH, on refresh, `@changed` is small and I suppose +> `pagespec_match_list`'s other slight efficiencies win out somehow. +> +> Welcome to the "I made ikiwiki twice as fast +> and all I got was this lousy git sha1sum" club BTW :-) --[[Joey]] + [[!tag wishlist patch patch/core]] -- cgit v1.2.3 From 134a25d1633513afd9506318aeb4349381dc061e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Aug 2009 22:10:12 -0400 Subject: better analysis of why the depends keep growing --- doc/todo/should_optimise_pagespecs.mdwn | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index f3048f328..2dd1f7b9e 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -244,11 +244,13 @@ more complicated every time! > other things that overloaded the system. > b) Suggests to me we will probably want to force a rebuild on upgrade > when fixing this (via the mechanism in the postinst). -> -> BTW, the underlying bug here is really horribly simple: -> When refreshing, `loadindex` preserves the previous depends list, -> and `add_depends` adds stuff to it. So it doubles every time a page is -> re-rendered during refresh. --[[Joey]] +> +> I've investigated why the pagespecs keep growing: When page A changes, +> its old depends are cleared. Then +> page B that inlines A gets rebuilt, and its old depends are also cleared. +> But page B also inlines page C; which means C gets re-rendered. And this +> happens w/o its old depends being cleared, so C's depends are doubled. +> --[[Joey]] After the initial optimization: 14.27s to rebuild, 8.26/8.33/8.26 to refresh. Success! -- cgit v1.2.3 From 99626615ff41a257090414bf500a83674e8fdc27 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2009 13:39:33 -0400 Subject: Fix example blog's tags/life to not have a broken PageSpec. Closes: #543510 --- debian/changelog | 2 ++ doc/examples/blog/tags/life.mdwn | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 5b021ec24..cfe45c3b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ ikiwiki (3.141593) UNRELEASED; urgency=low Closes: #542036 * po: Fixed to run rcs_add ralative to srcdir. * Italian program translation from Luca Bruno. + * Fix example blog's tags/life to not have a broken PageSpec. + Closes: #543510 -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/examples/blog/tags/life.mdwn b/doc/examples/blog/tags/life.mdwn index ddc2e646c..719f2b192 100644 --- a/doc/examples/blog/tags/life.mdwn +++ b/doc/examples/blog/tags/life.mdwn @@ -1,4 +1,4 @@ This feed contains pages in the "life" category. -[[!inline pages="link(tags/life) and ./posts/* and !*/Discussion" +[[!inline pages="link(tags/life) and !*/Discussion" show="10" actions=yes]] -- cgit v1.2.3 From aeea77e5c434bf432ea574c62e685cf655af15bd Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 25 Aug 2009 22:18:52 +0100 Subject: reply --- doc/todo/should_optimise_pagespecs.mdwn | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 2dd1f7b9e..5dd3b1e34 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -264,6 +264,9 @@ might well be experimental error, for that matter). > `add_depends` had no effect. So, the commit message to > b6fcb1cb0ef27e5a63184440675d465fad652acf is actually wrong.. ? --[[Joey]] +>> I'll try benchmarking again on the non-public wiki where I had the 4% +>> speedup. The docwiki is so small that 4% is hard to measure... --[[smcv]] + Not saving {depends} to the index, using a hash instead of a list to de-duplicate, and allowing add_depends to take an arrayref instead of a single pagespec had no noticable positive or negative effect on this test. @@ -271,11 +274,17 @@ pagespec had no noticable positive or negative effect on this test. > I see e4cd168ebedd95585290c97ff42234344bfed46c is still in your branch > though. I don't like using an arrayref, it could just take `($page, @depends)`. > and I don't see the need to keep it if it doesn't currently help. -> + +>> I'll drop it. --[[smcv]] + > Is there any reason to keep 7227c2debfeef94b35f7d81f42900aa01820caa3 > if it doesn't improve speed? > --[[Joey]] +>> I'll try benchmarking on a more complex wiki and see whether it has a +>> positive or negative effect. It does avoid being O(n**2) in number of +>> dependencies. --[[smcv]] + Memoizing the results of pagename brought the rebuild time down to 14.06s and the refresh time down to 7.96/7.92/7.92, a significant win. @@ -283,6 +292,9 @@ and the refresh time down to 7.96/7.92/7.92, a significant win. > called with a great many inputs.) Why did you chose to memoize it > explicitly rather than adding it to the memoize list at the top? +>> It does depend on global variables, so using Memoize seemed like asking for +>> trouble. I suppose what I did is equivalent to Memoize though... --[[smcv]] + Refactoring to use pagespec_match_list looks more risky from a code churn point of view; rebuild now takes 14.35s, but refresh is only 7.30/7.29/7.28, another significant win. -- cgit v1.2.3 From 145d89a6fc03936cc36d70946a8471da9bfe468a Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 26 Aug 2009 01:05:07 -0400 Subject: po: maybe fixed self links --- doc/plugins/po.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index dca2f5d66..b4c8b135e 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -260,7 +260,9 @@ If a page contains a WikiLink to itself, ikiwiki does not normally turn that into a hyperlink. However, if a translated page contains a WikiLink to itself, a hyperlink is inserted, at least with the default `po_link_to` the link points to the English version of the page. Is there a -good reason for that to be done? --[[Joey]] +good reason for that to be done? --[[Joey]] + +> The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] Language display order ---------------------- -- cgit v1.2.3 From 7bd7e78e4a7d31c460909776057687e0e29dba12 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 26 Aug 2009 01:41:55 -0400 Subject: po: commenting some TODO items --- doc/plugins/po.mdwn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index b4c8b135e..45630d763 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -282,12 +282,23 @@ That used to be so, but the bug was fixed. Does this mean that po might be replacing the only link on a page, in error? --[[Joey]] +> It would replace it. The only problematic case is when another +> plugin has its own reasons, in its `scan` hook, to add a page +> that is already there to `$links{$page}`. This other plugin's +> effect might then be changed by po's `scan` hook... which could +> be either good (better overall l10n) or bad (break the other +> plugin's goal). --[[intrigeri]] + Name of toplevel index page --------------------------- Normally at the top index page of a wiki, you see the wiki name at the top. However, at the top *translated* index page, you see something -like "index.da". --[[Joey]] +like "index.da". --[[Joey]] + +> I suggest changing `Render.pm`, line 115, to replace the `$page eq 'index'` +> test with a predicate call such as isindexpage($page). Such a predicate +> function could then be overriden by the po plugin. --[[intrigeri]] Pagespecs --------- -- cgit v1.2.3 From d5a04b2de9ce027c0e4cd47c9342bcd3db7f9f27 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 26 Aug 2009 02:00:48 -0400 Subject: po: more TODO items comments and patches --- doc/plugins/po.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 45630d763..079a36633 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -335,6 +335,10 @@ When a po file is changed, the recentchanges page shows a link such as language) version of the page. It would be better in this one case if the link went direct to the translated version of the page. --[[Joey]] +> The (untested) commit 496e8523c670 in my po branch might fix this... +> or at least, I believe, put someone on the right track. +> --[[intrigeri]] + Double commits of po files -------------------------- -- cgit v1.2.3 From cc76cd64024ed09eff2a3e2da1282497e8c4e21b Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 26 Aug 2009 09:59:39 -0400 Subject: suggestion --- doc/todo/tmplvars_plugin/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/todo/tmplvars_plugin/discussion.mdwn (limited to 'doc') diff --git a/doc/todo/tmplvars_plugin/discussion.mdwn b/doc/todo/tmplvars_plugin/discussion.mdwn new file mode 100644 index 000000000..93cb9b414 --- /dev/null +++ b/doc/todo/tmplvars_plugin/discussion.mdwn @@ -0,0 +1 @@ +I find this plugin quite usefull. But one thing, I would like to be able to do is set a tmplvar e.g. in a sidebar so that it affects all Pages this sidebar is used in. --martin -- cgit v1.2.3 From 155347837a6757bd85f9b15778133622daa006c0 Mon Sep 17 00:00:00 2001 From: "https://infosoph.myopenid.com/" Date: Wed, 26 Aug 2009 10:25:48 -0400 Subject: initial report --- .../defintion_lists_appear_to_be_disabled.mdwn | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/bugs/defintion_lists_appear_to_be_disabled.mdwn (limited to 'doc') diff --git a/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn new file mode 100644 index 000000000..c9756617d --- /dev/null +++ b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn @@ -0,0 +1,38 @@ +Adding text of the format + + Apple + : Pomaceous fruit of plants of the genus Malus in + the family Rosaceae. + : An american computer company. + + Orange + : The fruit of an evergreen tree of the genus Citrus. + +Does not result in expected HTML as described in the [MultiMarkdown Syntax Guide](http://fletcherpenney.net/multimarkdown/users_guide/multimarkdown_syntax_guide/): + +Should be + +
+
Apple
+
+

Pomaceous fruit of plants of the genus Malus in + the family Rosaceae.

+
+
+

An american computer company.

+
+
Orange
+
+

The fruit of an evergreen tree of the genus Citrus.

+
+
+ +But instead it gives: + +

Apple + : Pomaceous fruit of plants of the genus Malus in + the family Rosaceae. + : An american computer company.

+ +

Orange + : The fruit of an evergreen tree of the genus Citrus.

-- cgit v1.2.3 From 2996f0b5ee0b3a06d6476eff57b40cb2d8fc587a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 26 Aug 2009 13:04:09 -0400 Subject: fix emphasis examples to actually work --- doc/ikiwiki/formatting.mdwn | 2 +- po/fr.po | 34 ++++---- po/ikiwiki.pot | 22 ++--- po/it.po | 195 +++++++++++++++++++++++++------------------- 4 files changed, 144 insertions(+), 109 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/formatting.mdwn b/doc/ikiwiki/formatting.mdwn index 2ed5cc26f..befbce9aa 100644 --- a/doc/ikiwiki/formatting.mdwn +++ b/doc/ikiwiki/formatting.mdwn @@ -7,7 +7,7 @@ called [[MarkDown]], and it works like this: Leave blank lines between paragraphs. -You can \**emphasise*\* or \*\***strongly emphasise**\*\* text by placing it +You can *\*emphasise\** or **\*\*strongly emphasise\*\*** text by placing it in single or double asterisks. To create a list, start each line with an asterisk: diff --git a/po/fr.po b/po/fr.po index 08ca06d0b..df3b23891 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.141\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-15 14:07-0400\n" +"POT-Creation-Date: 2009-08-25 18:43-0400\n" "PO-Revision-Date: 2009-08-17 10:06+0200\n" "Last-Translator: Philippe Batailler \n" "Language-Team: French \n" @@ -57,7 +57,7 @@ msgstr "Les préférences ont été enregistrées." msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1269 msgid "Error" msgstr "Erreur" @@ -184,7 +184,9 @@ msgstr "Génération de l'index automatique" msgid "" "Sorry, but that looks like spam to blogspam: " -msgstr "Désolé, mais cela ressemble à un « spam » selon les critères de blogspam : " +msgstr "" +"Désolé, mais cela ressemble à un « spam » selon les critères de blogspam : " #: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format @@ -444,16 +446,16 @@ msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" msgid "unknown sort type %s" msgstr "Type de tri %s inconnu" -#: ../IkiWiki/Plugin/inline.pm:327 +#: ../IkiWiki/Plugin/inline.pm:329 msgid "Add a new post titled:" msgstr "Ajouter un nouvel article dont le titre est :" -#: ../IkiWiki/Plugin/inline.pm:347 +#: ../IkiWiki/Plugin/inline.pm:349 #, perl-format msgid "nonexistant template %s" msgstr "Le modèle de page %s n'existe pas" -#: ../IkiWiki/Plugin/inline.pm:612 +#: ../IkiWiki/Plugin/inline.pm:614 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client introuvable, pas de réponse au ping" @@ -531,7 +533,9 @@ msgstr "Erreur lors de la création du compte." #: ../IkiWiki/Plugin/passwordauth.pm:258 msgid "No email address, so cannot email password reset instructions." -msgstr "Aucune adresse indiquée. Impossible d'envoyer les instructions pour réinitialiser le mot de passe." +msgstr "" +"Aucune adresse indiquée. Impossible d'envoyer les instructions pour " +"réinitialiser le mot de passe." #: ../IkiWiki/Plugin/passwordauth.pm:292 msgid "Failed to send mail" @@ -1061,22 +1065,22 @@ msgstr "Examen de %s" msgid "building %s, which links to %s" msgstr "Reconstruction de %s, qui est lié à %s" -#: ../IkiWiki/Render.pm:468 +#: ../IkiWiki/Render.pm:473 #, perl-format msgid "building %s, which depends on %s" msgstr "Reconstruction de %s, qui dépend de %s" -#: ../IkiWiki/Render.pm:507 +#: ../IkiWiki/Render.pm:513 #, perl-format msgid "building %s, to update its backlinks" msgstr "Reconstruction de %s, afin de mettre à jour ses rétroliens" -#: ../IkiWiki/Render.pm:519 +#: ../IkiWiki/Render.pm:525 #, perl-format msgid "removing %s, no longer built by %s" msgstr "Suppression de %s, qui n'est plus rendu par %s" -#: ../IkiWiki/Render.pm:543 +#: ../IkiWiki/Render.pm:549 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki : impossible de reconstruire %s" @@ -1106,7 +1110,9 @@ msgstr "Échec lors de la création du dépôt avec ikiwiki-makerepo" #: ../IkiWiki/Setup/Automator.pm:115 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" -msgstr "** Désactivation du greffon %s, l'installation a échoué avec le message suivant :" +msgstr "" +"** Désactivation du greffon %s, l'installation a échoué avec le message " +"suivant :" #: ../IkiWiki/Wrapper.pm:16 #, perl-format @@ -1176,12 +1182,12 @@ msgstr "Impossible d'utiliser plusieurs systèmes de contrôle des versions" msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s" -#: ../IkiWiki.pm:1243 +#: ../IkiWiki.pm:1251 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de prétraitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1783 +#: ../IkiWiki.pm:1791 msgid "yes" msgstr "oui" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index a9c0fbb99..29a2d508c 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-15 14:07-0400\n" +"POT-Creation-Date: 2009-08-25 18:43-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -54,7 +54,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1260 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1269 msgid "Error" msgstr "" @@ -437,16 +437,16 @@ msgstr "" msgid "unknown sort type %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:327 +#: ../IkiWiki/Plugin/inline.pm:329 msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:347 +#: ../IkiWiki/Plugin/inline.pm:349 #, perl-format msgid "nonexistant template %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:612 +#: ../IkiWiki/Plugin/inline.pm:614 msgid "RPC::XML::Client not found, not pinging" msgstr "" @@ -1028,22 +1028,22 @@ msgstr "" msgid "building %s, which links to %s" msgstr "" -#: ../IkiWiki/Render.pm:468 +#: ../IkiWiki/Render.pm:473 #, perl-format msgid "building %s, which depends on %s" msgstr "" -#: ../IkiWiki/Render.pm:507 +#: ../IkiWiki/Render.pm:513 #, perl-format msgid "building %s, to update its backlinks" msgstr "" -#: ../IkiWiki/Render.pm:519 +#: ../IkiWiki/Render.pm:525 #, perl-format msgid "removing %s, no longer built by %s" msgstr "" -#: ../IkiWiki/Render.pm:543 +#: ../IkiWiki/Render.pm:549 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "" @@ -1139,12 +1139,12 @@ msgstr "" msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1243 +#: ../IkiWiki.pm:1251 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1783 +#: ../IkiWiki.pm:1791 msgid "yes" msgstr "" diff --git a/po/it.po b/po/it.po index 53fb3e3f4..c740fb0cb 100644 --- a/po/it.po +++ b/po/it.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-15 14:07-0400\n" +"POT-Creation-Date: 2009-08-25 18:43-0400\n" "PO-Revision-Date: 2009-08-16 11:01+0100\n" "Last-Translator: Luca Bruno \n" "Language-Team: Italian TP \n" @@ -18,15 +18,18 @@ msgid "You need to log in first." msgstr "Occorre prima effettuare l'accesso." #: ../IkiWiki/CGI.pm:146 -msgid "probable misconfiguration: sslcookie is set, but you are attempting to login via http, not https" -msgstr "possibile errore di configurazione: sslcookie è impostato, ma si sta tentando un accesso via http, non https" +msgid "" +"probable misconfiguration: sslcookie is set, but you are attempting to login " +"via http, not https" +msgstr "" +"possibile errore di configurazione: sslcookie è impostato, ma si sta " +"tentando un accesso via http, non https" #: ../IkiWiki/CGI.pm:149 msgid "login failed, perhaps you need to turn on cookies?" msgstr "errore nell'accesso, probabilmente i cookie sono disabilitati?" -#: ../IkiWiki/CGI.pm:168 -#: ../IkiWiki/CGI.pm:299 +#: ../IkiWiki/CGI.pm:168 ../IkiWiki/CGI.pm:299 msgid "Your login session has expired." msgstr "La sessione è scaduta." @@ -50,9 +53,7 @@ msgstr "Preferenze salvate." msgid "You are banned." msgstr "Avete ricevuto un ban." -#: ../IkiWiki/CGI.pm:390 -#: ../IkiWiki/CGI.pm:391 -#: ../IkiWiki.pm:1260 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1269 msgid "Error" msgstr "Errore" @@ -62,7 +63,8 @@ msgstr "Aggregazione attivata dal web." #: ../IkiWiki/Plugin/aggregate.pm:93 msgid "Nothing to do right now, all feeds are up-to-date!" -msgstr "Nessuna azione da intraprendere, tutti i notiziari sono già aggiornati." +msgstr "" +"Nessuna azione da intraprendere, tutti i notiziari sono già aggiornati." #: ../IkiWiki/Plugin/aggregate.pm:220 #, perl-format @@ -133,8 +135,7 @@ msgstr "creazione nuova pagina %s" msgid "deleting bucket.." msgstr "eliminazione contenitore..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 -#: ../ikiwiki.in:210 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:210 msgid "done" msgstr "fatto" @@ -177,8 +178,12 @@ msgid "automatic index generation" msgstr "generazione automatica dell'indice" #: ../IkiWiki/Plugin/blogspam.pm:108 -msgid "Sorry, but that looks like spam to blogspam: " -msgstr "È stato riconosciuto come spam da blogspam: " +msgid "" +"Sorry, but that looks like spam to blogspam: " +msgstr "" +"È stato riconosciuto come spam da blogspam: " #: ../IkiWiki/Plugin/brokenlinks.pm:42 #, perl-format @@ -189,8 +194,7 @@ msgstr "%s da %s" msgid "There are no broken links!" msgstr "Non ci sono collegamenti rotti." -#: ../IkiWiki/Plugin/comments.pm:124 -#: ../IkiWiki/Plugin/format.pm:38 +#: ../IkiWiki/Plugin/comments.pm:124 ../IkiWiki/Plugin/format.pm:38 #, perl-format msgid "unsupported page format %s" msgstr "formato pagina %s non supportato" @@ -203,8 +207,7 @@ msgstr "i commenti devono avere un contenuto" msgid "Anonymous" msgstr "Anonimo" -#: ../IkiWiki/Plugin/comments.pm:340 -#: ../IkiWiki/Plugin/editpage.pm:97 +#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:97 msgid "bad page name" msgstr "nome pagina non valido" @@ -240,8 +243,7 @@ msgstr "Aggiunto commento" msgid "Added a comment: %s" msgstr "Aggiunto commento: %s" -#: ../IkiWiki/Plugin/comments.pm:525 -#: ../IkiWiki/Plugin/websetup.pm:236 +#: ../IkiWiki/Plugin/comments.pm:525 ../IkiWiki/Plugin/websetup.pm:236 msgid "you are not logged in as an admin" msgstr "non siete autenticati come amministratore" @@ -257,10 +259,8 @@ msgstr "moderazione commento" msgid "Comments" msgstr "Commenti" -#: ../IkiWiki/Plugin/conditional.pm:27 -#: ../IkiWiki/Plugin/cutpaste.pm:30 -#: ../IkiWiki/Plugin/cutpaste.pm:45 -#: ../IkiWiki/Plugin/cutpaste.pm:61 +#: ../IkiWiki/Plugin/conditional.pm:27 ../IkiWiki/Plugin/cutpaste.pm:30 +#: ../IkiWiki/Plugin/cutpaste.pm:45 ../IkiWiki/Plugin/cutpaste.pm:61 #: ../IkiWiki/Plugin/testpagespec.pm:26 #, perl-format msgid "%s parameter is required" @@ -290,10 +290,8 @@ msgstr "%s non è una pagina modificabile" msgid "creating %s" msgstr "creazione %s" -#: ../IkiWiki/Plugin/editpage.pm:310 -#: ../IkiWiki/Plugin/editpage.pm:329 -#: ../IkiWiki/Plugin/editpage.pm:339 -#: ../IkiWiki/Plugin/editpage.pm:383 +#: ../IkiWiki/Plugin/editpage.pm:310 ../IkiWiki/Plugin/editpage.pm:329 +#: ../IkiWiki/Plugin/editpage.pm:339 ../IkiWiki/Plugin/editpage.pm:383 #: ../IkiWiki/Plugin/editpage.pm:422 #, perl-format msgid "editing %s" @@ -324,13 +322,11 @@ msgstr "occorre specificare formato e testo" msgid "fortune failed" msgstr "errore nel fortune" -#: ../IkiWiki/Plugin/getsource.pm:62 -#: ../IkiWiki/Plugin/goto.pm:55 +#: ../IkiWiki/Plugin/getsource.pm:62 ../IkiWiki/Plugin/goto.pm:55 msgid "missing page" msgstr "pagina mancante" -#: ../IkiWiki/Plugin/getsource.pm:64 -#: ../IkiWiki/Plugin/goto.pm:57 +#: ../IkiWiki/Plugin/getsource.pm:64 ../IkiWiki/Plugin/goto.pm:57 #, perl-format msgid "The page %s does not exist." msgstr "La pagina %s non esiste." @@ -344,8 +340,7 @@ msgstr "non è una pagina" msgid "%s is an attachment, not a page." msgstr "%s è un allegato, non una pagina." -#: ../IkiWiki/Plugin/git.pm:626 -#: ../IkiWiki/Plugin/git.pm:644 +#: ../IkiWiki/Plugin/git.pm:626 ../IkiWiki/Plugin/git.pm:644 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" @@ -360,8 +355,7 @@ msgstr "non è permesso lavorare su un file in modalità %s" msgid "you are not allowed to change file modes" msgstr "non è permesso cambiare la modalità del file" -#: ../IkiWiki/Plugin/google.pm:27 -#: ../IkiWiki/Plugin/po.pm:129 +#: ../IkiWiki/Plugin/google.pm:27 ../IkiWiki/Plugin/po.pm:129 #: ../IkiWiki/Plugin/search.pm:36 #, perl-format msgid "Must specify %s when using the %s plugin" @@ -369,7 +363,9 @@ msgstr "Occorre specificare %s quando si usa il plugin %s" #: ../IkiWiki/Plugin/google.pm:31 msgid "Failed to parse url, cannot determine domain name" -msgstr "Errore nell'interpretazione dell'URL, impossibile determinare il nome del dominio" +msgstr "" +"Errore nell'interpretazione dell'URL, impossibile determinare il nome del " +"dominio" #: ../IkiWiki/Plugin/graphviz.pm:67 msgid "failed to run graphviz" @@ -390,8 +386,10 @@ msgid "Source code: %s" msgstr "Sorgente: %s" #: ../IkiWiki/Plugin/highlight.pm:123 -msgid "warning: highlight perl module not available; falling back to pass through" -msgstr "attenzione: modulo perl highlight non trovato, verrà passato inalterato" +msgid "" +"warning: highlight perl module not available; falling back to pass through" +msgstr "" +"attenzione: modulo perl highlight non trovato, verrà passato inalterato" #: ../IkiWiki/Plugin/img.pm:63 msgid "Image::Magick is not installed" @@ -402,8 +400,7 @@ msgstr "Image::Magick non è installato" msgid "wrong size format \"%s\" (should be WxH)" msgstr "Formato dimensione «%s» non valido (dovrebbe essere LxA)" -#: ../IkiWiki/Plugin/img.pm:83 -#: ../IkiWiki/Plugin/img.pm:87 +#: ../IkiWiki/Plugin/img.pm:83 ../IkiWiki/Plugin/img.pm:87 #: ../IkiWiki/Plugin/img.pm:104 #, perl-format msgid "failed to read %s: %s" @@ -421,7 +418,8 @@ msgstr "impossibile determinare la dimensione dell'immagine %s" #: ../IkiWiki/Plugin/inline.pm:92 msgid "Must specify url to wiki with --url when using --rss or --atom" -msgstr "Occorre specificare l'url del wiki tramite --url quando si usa --rss o --atom" +msgstr "" +"Occorre specificare l'url del wiki tramite --url quando si usa --rss o --atom" #: ../IkiWiki/Plugin/inline.pm:138 msgid "page editing not allowed" @@ -445,16 +443,16 @@ msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" msgid "unknown sort type %s" msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki/Plugin/inline.pm:327 +#: ../IkiWiki/Plugin/inline.pm:329 msgid "Add a new post titled:" msgstr "Aggiungere un nuovo articolo dal titolo:" -#: ../IkiWiki/Plugin/inline.pm:347 +#: ../IkiWiki/Plugin/inline.pm:349 #, perl-format msgid "nonexistant template %s" msgstr "modello %s non esistente" -#: ../IkiWiki/Plugin/inline.pm:612 +#: ../IkiWiki/Plugin/inline.pm:614 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client non trovato, impossibile inviare ping" @@ -469,12 +467,14 @@ msgstr "%s è bloccata e non può essere modificata" #: ../IkiWiki/Plugin/mdwn.pm:44 msgid "multimarkdown is enabled, but Text::MultiMarkdown is not installed" -msgstr "multimarkdown è stato abilitato, ma Text::MultiMarkdown non è aggiornato" +msgstr "" +"multimarkdown è stato abilitato, ma Text::MultiMarkdown non è aggiornato" #: ../IkiWiki/Plugin/mdwn.pm:67 #, perl-format msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" -msgstr "impossibile caricare il modulo perl Markdown.pm (%s) o /usr/bin/markdown (%s)" +msgstr "" +"impossibile caricare il modulo perl Markdown.pm (%s) o /usr/bin/markdown (%s)" #: ../IkiWiki/Plugin/meta.pm:158 msgid "stylesheet not found" @@ -530,7 +530,9 @@ msgstr "Errore nella creazione dell'account." #: ../IkiWiki/Plugin/passwordauth.pm:258 msgid "No email address, so cannot email password reset instructions." -msgstr "Nessun indirizzo email, impossibile inviare per email le istruzioni per reimpostare la password." +msgstr "" +"Nessun indirizzo email, impossibile inviare per email le istruzioni per " +"reimpostare la password." #: ../IkiWiki/Plugin/passwordauth.pm:292 msgid "Failed to send mail" @@ -538,7 +540,8 @@ msgstr "Impossibile spedire il messaggio" #: ../IkiWiki/Plugin/passwordauth.pm:294 msgid "You have been mailed password reset instructions." -msgstr "Il messaggio con le istruzioni per reimpostare la password è stato inviato." +msgstr "" +"Il messaggio con le istruzioni per reimpostare la password è stato inviato." #: ../IkiWiki/Plugin/passwordauth.pm:329 msgid "incorrect password reset url" @@ -572,7 +575,9 @@ msgstr "LWP non trovato, ping non inviato" #: ../IkiWiki/Plugin/po.pm:15 msgid "warning: Old po4a detected! Recommend upgrade to 0.35." -msgstr "attenzione: è presente un vecchio po4a. Si raccomanda di aggiornare almeno alla versione 0.35." +msgstr "" +"attenzione: è presente un vecchio po4a. Si raccomanda di aggiornare almeno " +"alla versione 0.35." #: ../IkiWiki/Plugin/po.pm:136 #, perl-format @@ -581,20 +586,25 @@ msgstr "%s non è una codifica di lingua valida" #: ../IkiWiki/Plugin/po.pm:148 #, perl-format -msgid "%s is not a valid value for po_link_to, falling back to po_link_to=default" -msgstr "%s non è un valore per po_link_to valido, verrà utilizzato po_link_to=default" +msgid "" +"%s is not a valid value for po_link_to, falling back to po_link_to=default" +msgstr "" +"%s non è un valore per po_link_to valido, verrà utilizzato po_link_to=default" #: ../IkiWiki/Plugin/po.pm:153 -msgid "po_link_to=negotiated requires usedirs to be enabled, falling back to po_link_to=default" -msgstr "po_link_to=negotiated richiede che venga abilitato usedirs, verrà utilizzato po_link_to=default" +msgid "" +"po_link_to=negotiated requires usedirs to be enabled, falling back to " +"po_link_to=default" +msgstr "" +"po_link_to=negotiated richiede che venga abilitato usedirs, verrà utilizzato " +"po_link_to=default" #: ../IkiWiki/Plugin/po.pm:383 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "rigenerazione di tutte le pagine per sistemare i meta-titoli" -#: ../IkiWiki/Plugin/po.pm:387 -#: ../IkiWiki/Render.pm:426 +#: ../IkiWiki/Plugin/po.pm:387 ../IkiWiki/Render.pm:426 #, perl-format msgid "building %s" msgstr "compilazione di %s" @@ -604,12 +614,20 @@ msgid "updated PO files" msgstr "file PO aggiornati" #: ../IkiWiki/Plugin/po.pm:448 -msgid "Can not remove a translation. If the master page is removed, however, its translations will be removed as well." -msgstr "Impossibile eliminare una traduzione. Tuttavia, se la pagina principale è stata eliminata anche le traduzioni lo saranno." +msgid "" +"Can not remove a translation. If the master page is removed, however, its " +"translations will be removed as well." +msgstr "" +"Impossibile eliminare una traduzione. Tuttavia, se la pagina principale è " +"stata eliminata anche le traduzioni lo saranno." #: ../IkiWiki/Plugin/po.pm:468 -msgid "Can not rename a translation. If the master page is renamed, however, its translations will be renamed as well." -msgstr "Impossibile rinominare una traduzione. Tuttavia, se la pagina principale è stata rinominata anche le traduzioni lo saranno." +msgid "" +"Can not rename a translation. If the master page is renamed, however, its " +"translations will be renamed as well." +msgstr "" +"Impossibile rinominare una traduzione. Tuttavia, se la pagina principale è " +"stata rinominata anche le traduzioni lo saranno." #: ../IkiWiki/Plugin/po.pm:829 #, perl-format @@ -644,8 +662,7 @@ msgstr "impossibile tradurre %s" msgid "removed obsolete PO files" msgstr "file PO obsoleti rimossi" -#: ../IkiWiki/Plugin/po.pm:1046 -#: ../IkiWiki/Plugin/po.pm:1060 +#: ../IkiWiki/Plugin/po.pm:1046 ../IkiWiki/Plugin/po.pm:1060 #: ../IkiWiki/Plugin/po.pm:1100 #, perl-format msgid "failed to write %s" @@ -662,7 +679,9 @@ msgstr "impossibile leggere %s" #: ../IkiWiki/Plugin/po.pm:1112 msgid "invalid gettext data, go back to previous page to continue edit" -msgstr "dati gettext non validi, tornare alle pagina precedente per continuare le modifiche" +msgstr "" +"dati gettext non validi, tornare alle pagina precedente per continuare le " +"modifiche" #: ../IkiWiki/Plugin/poll.pm:69 msgid "vote" @@ -759,14 +778,15 @@ msgstr "valore percentuale %s non ammesso" #: ../IkiWiki/Plugin/progress.pm:59 msgid "need either `percent` or `totalpages` and `donepages` parameters" -msgstr "occorrono alternativamente i parametri \"percent\" o \"totalpages\" e \"donepages\"" +msgstr "" +"occorrono alternativamente i parametri \"percent\" o \"totalpages\" e " +"\"donepages\"" #: ../IkiWiki/Plugin/recentchangesdiff.pm:37 msgid "(Diff truncated)" msgstr "(Diff troncato)" -#: ../IkiWiki/Plugin/remove.pm:31 -#: ../IkiWiki/Plugin/rename.pm:36 +#: ../IkiWiki/Plugin/remove.pm:31 ../IkiWiki/Plugin/rename.pm:36 #, perl-format msgid "%s does not exist" msgstr "%s non esiste" @@ -776,8 +796,7 @@ msgstr "%s non esiste" msgid "%s is not in the srcdir, so it cannot be deleted" msgstr "%s non è in src, quindi non può essere eliminato" -#: ../IkiWiki/Plugin/remove.pm:41 -#: ../IkiWiki/Plugin/rename.pm:45 +#: ../IkiWiki/Plugin/remove.pm:41 ../IkiWiki/Plugin/rename.pm:45 #, perl-format msgid "%s is not a file" msgstr "%s non è un file" @@ -976,12 +995,19 @@ msgid "plugins" msgstr "plugin" #: ../IkiWiki/Plugin/websetup.pm:395 -msgid "The configuration changes shown below require a wiki rebuild to take effect." -msgstr "Le sottostanti modifiche alla configurazione richiedono la ricompilazione del wiki." +msgid "" +"The configuration changes shown below require a wiki rebuild to take effect." +msgstr "" +"Le sottostanti modifiche alla configurazione richiedono la ricompilazione " +"del wiki." #: ../IkiWiki/Plugin/websetup.pm:399 -msgid "For the configuration changes shown below to fully take effect, you may need to rebuild the wiki." -msgstr "Affinché le sottostanti modifiche alla configurazione abbiano effetto, occorre ricostruire il wiki." +msgid "" +"For the configuration changes shown below to fully take effect, you may need " +"to rebuild the wiki." +msgstr "" +"Affinché le sottostanti modifiche alla configurazione abbiano effetto, " +"occorre ricostruire il wiki." #: ../IkiWiki/Plugin/websetup.pm:436 #, perl-format @@ -1000,11 +1026,14 @@ msgstr "nome file %s scorretto" #: ../IkiWiki/Render.pm:264 #, perl-format -msgid "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to allow this" -msgstr "collegamento simbolico trovato nel percorso srcdir (%s) -- impostare allow_symlinks_before_srcdir per abilitare questa configurazione" +msgid "" +"symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " +"allow this" +msgstr "" +"collegamento simbolico trovato nel percorso srcdir (%s) -- impostare " +"allow_symlinks_before_srcdir per abilitare questa configurazione" -#: ../IkiWiki/Render.pm:287 -#: ../IkiWiki/Render.pm:312 +#: ../IkiWiki/Render.pm:287 ../IkiWiki/Render.pm:312 #, perl-format msgid "skipping bad filename %s" msgstr "ignorato il file dal nome scorretto %s" @@ -1029,22 +1058,22 @@ msgstr "scansione %s" msgid "building %s, which links to %s" msgstr "compilazione di %s, che è collegato a %s" -#: ../IkiWiki/Render.pm:468 +#: ../IkiWiki/Render.pm:473 #, perl-format msgid "building %s, which depends on %s" msgstr "compilazione di %s, che dipende da %s" -#: ../IkiWiki/Render.pm:507 +#: ../IkiWiki/Render.pm:513 #, perl-format msgid "building %s, to update its backlinks" msgstr "compilazione di %s, per aggiornare i collegamenti ai precedenti" -#: ../IkiWiki/Render.pm:519 +#: ../IkiWiki/Render.pm:525 #, perl-format msgid "removing %s, no longer built by %s" msgstr "rimozione di %s, non più richiesto da %s" -#: ../IkiWiki/Render.pm:543 +#: ../IkiWiki/Render.pm:549 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: impossibile compilare %s" @@ -1072,7 +1101,8 @@ msgstr "impossibile creare un repository tramite ikiwiki-makerepo" #: ../IkiWiki/Setup/Automator.pm:115 #, perl-format msgid "** Disabling plugin %s, since it is failing with this message:" -msgstr "** Plugin %s disabilitato, a causa della seguente segnalazione di errore:" +msgstr "" +"** Plugin %s disabilitato, a causa della seguente segnalazione di errore:" #: ../IkiWiki/Wrapper.pm:16 #, perl-format @@ -1140,12 +1170,12 @@ msgstr "impossibile usare più plugin rcs" msgid "failed to load external plugin needed for %s plugin: %s" msgstr "impossibile caricare il plugin esterno per il plugin %s: %s" -#: ../IkiWiki.pm:1243 +#: ../IkiWiki.pm:1251 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "ciclo del preprocessore individuato su %s alla profondità %i" -#: ../IkiWiki.pm:1783 +#: ../IkiWiki.pm:1791 msgid "yes" msgstr "sì" @@ -1173,4 +1203,3 @@ msgstr "Quale utente (openid o del wiki) sarà l'amministratore?" #: ../auto.setup:23 msgid "What is the domain name of the web server?" msgstr "Qual è il nome del dominio del server web?" - -- cgit v1.2.3 From 27c6f56fcfac8a60b55751a7eda90bf78fab8c1f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 26 Aug 2009 13:05:46 -0400 Subject: typo --- doc/ikiwiki/searching.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/searching.mdwn b/doc/ikiwiki/searching.mdwn index 539e7193d..4c1287933 100644 --- a/doc/ikiwiki/searching.mdwn +++ b/doc/ikiwiki/searching.mdwn @@ -5,7 +5,7 @@ then="This wiki has searching **enabled**." else="This wiki has searching **disabled**."]] If searching is enabled, you can enter search terms in the search field, -as you'd expect. There are a few special things you can do to constuct +as you'd expect. There are a few special things you can do to construct more powerful searches. * To match a phrase, enclose it in double quotes. -- cgit v1.2.3 From 4ce93af516360a223016681961481f51a3ce81f7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 26 Aug 2009 13:09:43 -0400 Subject: translation of directives --- doc/plugins/po.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 079a36633..9273da399 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -358,6 +358,15 @@ Ugly messages with empty files If there are empty .mdwn files, the po plugin displays some ugly messages. +Translation of directives +------------------------- + +If a translated page contains a directive, it may expand to some english +text, or text in whatever single language ikiwiki is configured to "speak". + +Maybe there could be a way to switch ikiwiki to speaking another language +when building a non-english page? Then the directives would get translated. + Documentation ------------- -- cgit v1.2.3 From 2736fc5ba975a92311649b5951c677223732d531 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 26 Aug 2009 13:11:55 -0400 Subject: close; multimarkdown not enabled by default --- doc/bugs/defintion_lists_appear_to_be_disabled.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn index c9756617d..d6136ed4e 100644 --- a/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn +++ b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn @@ -36,3 +36,7 @@ But instead it gives:

Orange : The fruit of an evergreen tree of the genus Citrus.

+ +> ikiwiki's markdown support does not include support for multimarkdown by +> default. If you want to enable that, you can turn on the `multimarkdown` +> option in the setup file. --[[Joey]] [[done]] -- cgit v1.2.3 From 70c601990b345b03ddf2406c46017da232bef8b9 Mon Sep 17 00:00:00 2001 From: "https://infosoph.myopenid.com/" Date: Wed, 26 Aug 2009 14:39:25 -0400 Subject: Forgot to mention I have multimarkdown enabled --- doc/bugs/defintion_lists_appear_to_be_disabled.mdwn | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn index d6136ed4e..97538ed87 100644 --- a/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn +++ b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn @@ -39,4 +39,13 @@ But instead it gives: > ikiwiki's markdown support does not include support for multimarkdown by > default. If you want to enable that, you can turn on the `multimarkdown` -> option in the setup file. --[[Joey]] [[done]] +> option in the setup file. --[[Joey]] + +>> Sorry, I should have indicated, I have multimarkdown enabled: + + # mdwn plugin + # enable multimarkdown features? + multimarkdown => 1, + +>>Other features appear to be working, tables and footnotes for instance. See current install: + -- cgit v1.2.3 From dc1399fa809dc38e070a3c160b26926c27a04ddd Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 26 Aug 2009 21:19:55 -0400 Subject: initial patch proposal --- ...irrorlist_with_per-mirror_usedirs_settings.mdwn | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/todo/mirrorlist_with_per-mirror_usedirs_settings.mdwn (limited to 'doc') diff --git a/doc/todo/mirrorlist_with_per-mirror_usedirs_settings.mdwn b/doc/todo/mirrorlist_with_per-mirror_usedirs_settings.mdwn new file mode 100644 index 000000000..6ca9962ba --- /dev/null +++ b/doc/todo/mirrorlist_with_per-mirror_usedirs_settings.mdwn @@ -0,0 +1,24 @@ +I've got a wiki that is built at two places: + +* a static copy, aimed at being viewed without any web server, using + a web browser's `file:///` urls => usedirs is disabled to get nice + and working links +* an online copy, with usedirs enabled in order to benefit from the + language negotiation using the po plugin + +I need to use mirrorlist on the static copy, so that one can easily +reach the online, possibly updated, pages. But as documented, "pages are +assumed to exist in the same location under the specified url on each +mirror", so the generated urls are wrong. + +My `mirrorlist` branch contains a patch that allows one to configure usedirs +per-mirror. Note: the old configuration format is still supported, so this should +not break existing wikis. + +OT: as a bonus, this branch contains a patch to support {hashes,arrays} of +{hashes,arrays} in `$config`, which I missed a bit when writing the po plugin, +and decided this time it was really needed to implement this feature. + +--[[intrigeri]] + +[[!tag patch]] -- cgit v1.2.3 From 6ba35a7cb41f18e79a0257d40df0ec1d56035101 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 12:41:25 -0400 Subject: forwarded --- doc/bugs/defintion_lists_appear_to_be_disabled.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn index 97538ed87..6dac9c8b8 100644 --- a/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn +++ b/doc/bugs/defintion_lists_appear_to_be_disabled.mdwn @@ -49,3 +49,6 @@ But instead it gives: >>Other features appear to be working, tables and footnotes for instance. See current install: +>>> Ok, in that case it's a bug in the perl module. Forwarded to +>>> --[[Joey]] +>>> [[!tag done]] -- cgit v1.2.3 From 18fc71f033cf0ff9ccd6ef16212ce3b4e34ac725 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 12:56:24 -0400 Subject: unsure if this patch is enough --- doc/plugins/po.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 9273da399..b77c545d9 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -264,6 +264,11 @@ good reason for that to be done? --[[Joey]] > The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] +>> It may fix it in passing, but shouldn't it also be fixed for the other +>> `po_link_to` styles? (Also, if `mybestlink` is going to always +>> just return `bestlink` in this case, there seems no reason to inject +>> it.) --[[Joey]] + Language display order ---------------------- -- cgit v1.2.3 From e1acb707db3f204708f88648ed80762689a15425 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 12:57:04 -0400 Subject: cherry-picked fix for recentchanges links --- doc/plugins/po.mdwn | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index b77c545d9..2e32d78fd 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -332,18 +332,6 @@ Also, this may only happen if the page being linked to is coming from an underlay, and the underlays lack translation to a given language. --[[Joey]] -recentchanges links to po files -------------------------------- - -When a po file is changed, the recentchanges page shows a link such as -"sandbox.es". But, clicking on it goes to the English (or negotiated -language) version of the page. It would be better in this one case if -the link went direct to the translated version of the page. --[[Joey]] - -> The (untested) commit 496e8523c670 in my po branch might fix this... -> or at least, I believe, put someone on the right track. -> --[[intrigeri]] - Double commits of po files -------------------------- -- cgit v1.2.3 From 5e515b493c00c70095aeb8bad1e0b7757ed943db Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 13:10:31 -0400 Subject: followups --- doc/plugins/po.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 2e32d78fd..65573b877 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -294,6 +294,12 @@ that po might be replacing the only link on a page, in error? > be either good (better overall l10n) or bad (break the other > plugin's goal). --[[intrigeri]] +>> Right.. well, the cases where links are added is very small. +>> Grepping for `add_link`, it's just done by link, camelcase, meta, and +>> tag. All of these are supposed to work just link regular links +>> so I'd think that is ok. We could probably remove the currently scary +>> comment about only wanting to change the first link. --[[Joey]] + Name of toplevel index page --------------------------- @@ -305,6 +311,14 @@ like "index.da". --[[Joey]] > test with a predicate call such as isindexpage($page). Such a predicate > function could then be overriden by the po plugin. --[[intrigeri]] +>> Could do that, but if you have such a function it's natural to want to +>> use it elsewhere. Not clear to me it would make sense for po to override +>> such a function if it were used in some of the other places that compare +>> to index. +>> +>> The other option would be for po to override the template setting. +>> --[[Joey]] + Pagespecs --------- -- cgit v1.2.3 From 7d35d17f956740a310465d5162b9313e120694a3 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 27 Aug 2009 20:01:24 +0200 Subject: doc/po: follow-up Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 65573b877..2c230d409 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -300,6 +300,8 @@ that po might be replacing the only link on a page, in error? >> so I'd think that is ok. We could probably remove the currently scary >> comment about only wanting to change the first link. --[[Joey]] +>>> Commit 3c2bffe21b91684 in my po branch does this. --[[intrigeri]] + Name of toplevel index page --------------------------- -- cgit v1.2.3 From 6bc3206af16f4910e49478319a8e81d74c7de342 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 27 Aug 2009 20:21:16 +0200 Subject: doc/po: follow-up --- doc/plugins/po.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 2c230d409..1d343e0f8 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -321,6 +321,8 @@ like "index.da". --[[Joey]] >> The other option would be for po to override the template setting. >> --[[Joey]] +>>> Great idea. Commit 6c0f9c691c3df3a in my po branch does it. --[[intrigeri]] + Pagespecs --------- -- cgit v1.2.3 From eaa782a1856cff50df68f1135955d58dc97bb833 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 27 Aug 2009 20:38:36 +0200 Subject: doc/po(self-links): follow-ups Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 1d343e0f8..673bbf406 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -265,9 +265,20 @@ good reason for that to be done? --[[Joey]] > The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] >> It may fix it in passing, but shouldn't it also be fixed for the other ->> `po_link_to` styles? (Also, if `mybestlink` is going to always ->> just return `bestlink` in this case, there seems no reason to inject ->> it.) --[[Joey]] +>> `po_link_to` styles? + +>>> Other `po_link_to` styles already work ok: say there is +>>> a \[[dest]] link on a page called `dest`. When rendering +>>> `dest.LL`, `mybestlink` returns `dest.LL`, and `htmllink` is then +>>> able to detect, and manage correctly, that it is a self-link. +>>> --[[intrigeri]] + +>> (Also, if `mybestlink` is going to always just return `bestlink` in +>> this case, there seems no reason to inject it.) --[[Joey]] + +>>> Right. Commit cdc3576c8d1efb2 in my po branch prevents +>>> `mybestlink` to be injected when `po_link_to` is +>>> `default`. --[[intrigeri]] Language display order ---------------------- -- cgit v1.2.3 From ffcd97ce52edd73f092d15aae89bbacad99b38b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 15:49:12 -0400 Subject: change cherry-picked; move to discussion --- doc/plugins/po.mdwn | 24 ------------------------ doc/plugins/po/discussion.mdwn | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 24 deletions(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 673bbf406..9c4d8ffbd 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -289,30 +289,6 @@ order, as `po_slave_languages` is a hash. It would need to be converted to an array to support this. (If twere done, twere best done quickly.) --[[Joey]] -Duplicate %links ? ------------------- - -I notice code in the scan hook that seems to assume -that %links will accumulate duplicate links for a page. -That used to be so, but the bug was fixed. Does this mean -that po might be replacing the only link on a page, in error? ---[[Joey]] - -> It would replace it. The only problematic case is when another -> plugin has its own reasons, in its `scan` hook, to add a page -> that is already there to `$links{$page}`. This other plugin's -> effect might then be changed by po's `scan` hook... which could -> be either good (better overall l10n) or bad (break the other -> plugin's goal). --[[intrigeri]] - ->> Right.. well, the cases where links are added is very small. ->> Grepping for `add_link`, it's just done by link, camelcase, meta, and ->> tag. All of these are supposed to work just link regular links ->> so I'd think that is ok. We could probably remove the currently scary ->> comment about only wanting to change the first link. --[[Joey]] - ->>> Commit 3c2bffe21b91684 in my po branch does this. --[[intrigeri]] - Name of toplevel index page --------------------------- diff --git a/doc/plugins/po/discussion.mdwn b/doc/plugins/po/discussion.mdwn index 1c3f0e752..ab822e76c 100644 --- a/doc/plugins/po/discussion.mdwn +++ b/doc/plugins/po/discussion.mdwn @@ -699,3 +699,28 @@ and via CGI, have been tested. * general test with `indexpages` enabled: **not OK** * general test with `po_link_to=default` with `userdirs` enabled: **OK** * general test with `po_link_to=default` with `userdirs` disabled: **OK** + +Duplicate %links ? +------------------ + +I notice code in the scan hook that seems to assume +that %links will accumulate duplicate links for a page. +That used to be so, but the bug was fixed. Does this mean +that po might be replacing the only link on a page, in error? +--[[Joey]] + +> It would replace it. The only problematic case is when another +> plugin has its own reasons, in its `scan` hook, to add a page +> that is already there to `$links{$page}`. This other plugin's +> effect might then be changed by po's `scan` hook... which could +> be either good (better overall l10n) or bad (break the other +> plugin's goal). --[[intrigeri]] + +>> Right.. well, the cases where links are added is very small. +>> Grepping for `add_link`, it's just done by link, camelcase, meta, and +>> tag. All of these are supposed to work just link regular links +>> so I'd think that is ok. We could probably remove the currently scary +>> comment about only wanting to change the first link. --[[Joey]] + +>>> Commit 3c2bffe21b91684 in my po branch does this. --[[intrigeri]] +>>>> Cherry-picked --[[Joey]] -- cgit v1.2.3 From f8ad1bfec4e12944482d5f58a0961b0c476602c9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 15:50:43 -0400 Subject: fix cherry-picked --- debian/changelog | 1 + doc/plugins/po.mdwn | 21 --------------------- 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 69e197e37..9f10c2913 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,7 @@ ikiwiki (3.1415926) UNRELEASED; urgency=low * Rebuild wikis on upgrade to this version to fix bloat caused by the dependency bug. * htmltidy: Print a warning message if tidy fails. Closes: #543722 + * po: Fix name of translated toplevel index page. (intrigeri) -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 9c4d8ffbd..f020adac2 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -289,27 +289,6 @@ order, as `po_slave_languages` is a hash. It would need to be converted to an array to support this. (If twere done, twere best done quickly.) --[[Joey]] -Name of toplevel index page ---------------------------- - -Normally at the top index page of a wiki, you see the wiki name at -the top. However, at the top *translated* index page, you see something -like "index.da". --[[Joey]] - -> I suggest changing `Render.pm`, line 115, to replace the `$page eq 'index'` -> test with a predicate call such as isindexpage($page). Such a predicate -> function could then be overriden by the po plugin. --[[intrigeri]] - ->> Could do that, but if you have such a function it's natural to want to ->> use it elsewhere. Not clear to me it would make sense for po to override ->> such a function if it were used in some of the other places that compare ->> to index. ->> ->> The other option would be for po to override the template setting. ->> --[[Joey]] - ->>> Great idea. Commit 6c0f9c691c3df3a in my po branch does it. --[[intrigeri]] - Pagespecs --------- -- cgit v1.2.3 From 18e4fa65399f2a21bd943b0e62b81a100f941d44 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 15:54:44 -0400 Subject: fix merged --- debian/changelog | 1 + doc/plugins/po.mdwn | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 9f10c2913..b4169c576 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ ikiwiki (3.1415926) UNRELEASED; urgency=low by the dependency bug. * htmltidy: Print a warning message if tidy fails. Closes: #543722 * po: Fix name of translated toplevel index page. (intrigeri) + * po: Fix display of links from a translated page to itself (ntrigeri) -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f020adac2..57459c1ef 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -253,33 +253,6 @@ once [[intrigeri]]'s `meta` branch is merged. An integration branch, called `meta-po`, merges [[intrigeri]]'s `po` and `meta` branches, and thus has this additional features. -Self links ----------- - -If a page contains a WikiLink to itself, ikiwiki does not normally -turn that into a hyperlink. However, if a translated page contains a -WikiLink to itself, a hyperlink is inserted, at least with the default -`po_link_to` the link points to the English version of the page. Is there a -good reason for that to be done? --[[Joey]] - -> The commit 0113c69d4fb in my po branch might fix this. --[[intrigeri]] - ->> It may fix it in passing, but shouldn't it also be fixed for the other ->> `po_link_to` styles? - ->>> Other `po_link_to` styles already work ok: say there is ->>> a \[[dest]] link on a page called `dest`. When rendering ->>> `dest.LL`, `mybestlink` returns `dest.LL`, and `htmllink` is then ->>> able to detect, and manage correctly, that it is a self-link. ->>> --[[intrigeri]] - ->> (Also, if `mybestlink` is going to always just return `bestlink` in ->> this case, there seems no reason to inject it.) --[[Joey]] - ->>> Right. Commit cdc3576c8d1efb2 in my po branch prevents ->>> `mybestlink` to be injected when `po_link_to` is ->>> `default`. --[[intrigeri]] - Language display order ---------------------- -- cgit v1.2.3 From 545029fe4bc11e828da193745c7555c1e8322768 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 28 Aug 2009 01:13:43 +0100 Subject: Explain my depends-exact branch --- doc/todo/optimize_simple_dependencies.mdwn | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 doc/todo/optimize_simple_dependencies.mdwn (limited to 'doc') diff --git a/doc/todo/optimize_simple_dependencies.mdwn b/doc/todo/optimize_simple_dependencies.mdwn new file mode 100644 index 000000000..c3ccd5ad0 --- /dev/null +++ b/doc/todo/optimize_simple_dependencies.mdwn @@ -0,0 +1,48 @@ +[[!template id=gitbranch branch=smcv/ready/depends-exact author="[[smcv]]"]] + +I'm still trying to optimize ikiwiki for a site using +[[plugins/contrib/album]], and checking which pages depend on which pages +is still taking too long. Here's another go at fixing that, using [[Will]]'s +suggestion from [[todo/should_optimise_pagespecs]]: + +> A hash, by itself, is not optimal because +> the dependency list holds two things: page names and page specs. The hash would +> work well for the page names, but you'll still need to iterate through the page specs. +> I was thinking of keeping a list and a hash. You use the list for pagespecs +> and the hash for individual page names. To make this work you need to adjust the +> API so it knows which you're adding. -- [[Will]] + +If you have P pages and refresh after changing C of them, where an average +page has E dependencies on exact page names and D other dependencies, this +branch should drop the complexity of checking dependencies from +O(P * (D+E) * C) to O(C + P*E + P*D*C). Pages that use inline or map have +a large value for E (e.g. one per inlined page) and a small value for D (e.g. +one per inline). + +Benchmarking: + +Test 1: a wiki with about 3500 pages and 3500 photos, and a change that +touches about 350 pages and 350 photos + +Test 2: the docwiki (about 700 objects not excluded by docwiki.setup, mostly +pages), docwiki.setup modified to turn off verbose, and a change that touches +the 98 pages of plugins/*.mdwn + +In both tests I rebuilt the wiki with the target ikiwiki version, then touched +the appropriate pages and refreshed. + +Results of test 1: without this branch it took around 5:45 to rebuild and +around 5:45 again to refresh (so rebuilding 10% of the pages, then deciding +that most of the remaining 90% didn't need to change, took about as long as +rebuilding everything). With this branch it took 5:47 to rebuild and 1:16 +to refresh. + +Results of test 2: rebuilding took 14.11s without, 13.96s with; refreshing +three times took 7.29/7.40/7.37s without, 6.62/6.56/6.63s with. + +(This benchmarking was actually done with my [[plugins/contrib/album]] branch, +since that's what the huge wiki needs; that branch doesn't alter core code +beyond the ready/depends-exact branch point, so the results should be +equally valid.) + +--[[smcv]] -- cgit v1.2.3 From 04a8da4f0176d153fed7d9a1c483f19b70f32900 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 21:00:39 -0400 Subject: mention ignore branch --- doc/git.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 06bccc7a3..f6971e84b 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -64,6 +64,8 @@ Some of the branches included in the main repository include: * `debian-stable` is used for updates to the old version included in Debian's stable release, and `debian-testing` is used for updates to Debian's testing release. +* `ignore` gets various branches merged to it that Joey wishes to ignore + when looking at everyone's unmerged changes. * `pristine-tar` contains deltas that [pristine-tar](http://kitenet.net/~joey/code/pristine-tar) can use to recreate released tarballs of ikiwiki -- cgit v1.2.3 From b7a3fbec78a7584f24b8dcc38e5e9537ad95c7f5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Aug 2009 21:36:55 -0400 Subject: response --- doc/todo/optimize_simple_dependencies.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/todo/optimize_simple_dependencies.mdwn b/doc/todo/optimize_simple_dependencies.mdwn index c3ccd5ad0..44163311b 100644 --- a/doc/todo/optimize_simple_dependencies.mdwn +++ b/doc/todo/optimize_simple_dependencies.mdwn @@ -46,3 +46,23 @@ beyond the ready/depends-exact branch point, so the results should be equally valid.) --[[smcv]] + +> We discussed this on irc; I had some worries that things may have been +> switched to `add_depends_exact` that were not pure page names. My current +> feeling is it's all safe, but who knows. It's easy to miss something. +> Which makes me think this is not a good interface. +> +> Why not, instead, make `add_depends` smart. If it's passed something +> that is clearly a raw page name, it can add it to the exact depends hash. +> Else, add it to the pagespec hash. You can tell if it's a pure page name +> by matching on `$config{wiki_file_regexp}`. +> +> Also I think there may be little optimisation value left in +> 7227c2debfeef94b35f7d81f42900aa01820caa3, since the "regular" dependency +> lists will be much shorter. +> +> Sounds like inline pagenames has an already exstant bug WRT +> pages moving, which this should not make worse. Would be good to verify. +> +> Re coding, it would be nice if `refresh()` could avoid duplicating +> the debug message, etc in the two cases. --[[Joey]] -- cgit v1.2.3 From 8064acf87fb7e708a03e47dd82457dec237e886e Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 28 Aug 2009 13:19:48 +0200 Subject: doc/po: reported bug + patches wrt. created page type Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 57459c1ef..3b152586e 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -317,6 +317,19 @@ text, or text in whatever single language ikiwiki is configured to "speak". Maybe there could be a way to switch ikiwiki to speaking another language when building a non-english page? Then the directives would get translated. +Created page type +----------------- + +The interdiction to create pages of type po was broken by the new +`page_types` code. This is fixed in my po branch by +commit 1914ae2fd24e1e802. + +While I was there, I also added some code to set a new default value +to the type select field in case it was previously set to "po". +This code favors the type of the linking page's masterpage on page +creation (when `from=page.LL`). This is commit c9301d2c296f682. +--[[intrigeri]] + Documentation ------------- -- cgit v1.2.3 From cc6000f0b9b82b19ea4635edcace2f6ba164adf1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Aug 2009 07:34:09 -0400 Subject: both changes picked --- debian/changelog | 3 +++ doc/plugins/po.mdwn | 2 ++ 2 files changed, 5 insertions(+) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 045f27540..d10bc36cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,9 @@ ikiwiki (3.1415926) UNRELEASED; urgency=low * po: Fix name of translated toplevel index page. (intrigeri) * po: Fix display of links from a translated page to itself (ntrigeri) * Add Czech basewiki translation from Miroslav Kure. + * po: fix interdiction to create pages of type po (intrigeri) + * po: po: favor the type of linking page's masterpage on page creation + (intrigeri) -- Joey Hess Wed, 12 Aug 2009 12:25:30 -0400 diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 3b152586e..fdef41e45 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -330,6 +330,8 @@ This code favors the type of the linking page's masterpage on page creation (when `from=page.LL`). This is commit c9301d2c296f682. --[[intrigeri]] +> Both cherry picked. --[[Joey]] + Documentation ------------- -- cgit v1.2.3 From e3b5d7013717af732b36efd9e4abe1f14d0f3175 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 28 Aug 2009 14:41:32 +0200 Subject: doc/po: bug report + patch proposal wrt. inline's post form's rootpage Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index fdef41e45..39b237c73 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -332,6 +332,17 @@ creation (when `from=page.LL`). This is commit c9301d2c296f682. > Both cherry picked. --[[Joey]] +inline's post form's rootpage +----------------------------- + +When a translatable page (say it is called "bugs") contains an +[[inline directive|ikiwiki/directive/inline]] with `postform` enabled, +the rootpage is l10n'd on translations pages (e.g. "bugs.fr" gets +a `rootpage` value of `bugs.fr`). This is usually not what's expected, +as translation pages are not supposed to have subpages. My po branch +has code (e671e72053e81fa, which depends on 72ac9821e56637) that fixes +this. --[[intrigeri]] + Documentation ------------- -- cgit v1.2.3 From 3f303cc853426a1ddb8e36b8fb544a69bced3721 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 28 Aug 2009 15:25:05 +0200 Subject: follow-up Signed-off-by: intrigeri --- .../language_definition_for_the_meta_plugin.mdwn | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/language_definition_for_the_meta_plugin.mdwn b/doc/todo/language_definition_for_the_meta_plugin.mdwn index 90bfbef3b..44fcf32bb 100644 --- a/doc/todo/language_definition_for_the_meta_plugin.mdwn +++ b/doc/todo/language_definition_for_the_meta_plugin.mdwn @@ -95,7 +95,24 @@ This may be useful for sites with a few pages in different languages, but no ful >>> Now that po has been merged, this patch should probably also be adapted >>> so that the po plugin forces the meta::lang of every page to what po ->>> thinks it should be. Perhaps [[the_special_po_pagespecs|ikiwiki/pagespec/po]] ->>> should also work with meta-assigned languages? --[[smcv]] +>>> thinks it should be. --[[smcv]] + +>>>> Agreed, users of the po plugin would greatly benefit from it. +>>>> Seems doable. --[[intrigeri]] + +>>> Perhaps [[the_special_po_pagespecs|ikiwiki/pagespec/po]] should +>>> also work with meta-assigned languages? --[[smcv]] + +>>>> Yes. But then, these special pagespecs should be moved outside of +>>>> [[plugins/po]], as they could be useful to anyone using the +>>>> currently discussed patch even when not using the po plugin. +>>>> +>>>> We could add these pagespecs to the core and make them use +>>>> a simple language-guessing system based on a new hook. Any plugin +>>>> that implements such a hook could decide whether it should +>>>> overrides the language guessed by another one, and optionally use +>>>> the `first`/`last` options (e.g. the po plugin will want to be +>>>> authoritative on the pages of type po, and will then use +>>>> `last`). --[[intrigeri]] [[!tag wishlist patch plugins/meta translation]] -- cgit v1.2.3 From 6be874612539d3148d288fc6a4c47743a7c0c8fc Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 28 Aug 2009 16:38:13 +0200 Subject: doc/po: report problem with link() + propose patch Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 39b237c73..031188a67 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -343,6 +343,15 @@ as translation pages are not supposed to have subpages. My po branch has code (e671e72053e81fa, which depends on 72ac9821e56637) that fixes this. --[[intrigeri]] +link() pagespec on translation pages +------------------------------------ + +The `link()` pagespec, on translation pages, currently tests whether +a given page links to the *current translation page*, rather than +whether it links to its master page. I believe the later is generally +expected. Commit 646c9a4c95a480 in my po branch fixes this. +--[[intrigeri]] + Documentation ------------- -- cgit v1.2.3 From de4dc8befe7ede3cd34daf3f2bce5dd6305599f0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 28 Aug 2009 15:48:51 +0100 Subject: Updated branch, thanks for the feedback --- doc/todo/optimize_simple_dependencies.mdwn | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/optimize_simple_dependencies.mdwn b/doc/todo/optimize_simple_dependencies.mdwn index 44163311b..10c6c7272 100644 --- a/doc/todo/optimize_simple_dependencies.mdwn +++ b/doc/todo/optimize_simple_dependencies.mdwn @@ -56,13 +56,33 @@ equally valid.) > that is clearly a raw page name, it can add it to the exact depends hash. > Else, add it to the pagespec hash. You can tell if it's a pure page name > by matching on `$config{wiki_file_regexp}`. -> + +>> Good thinking. Done in commit 68ce514a 'Auto-detect "simple dependencies"', +>> with a related bugfix in e8b43825 "Force %depends_exact to lower case". +>> +>> Performance impact: Test 2 above takes 0.2s longer to rebuild (probably +>> from all the calls to lc, which are, however, necessary for correctness) +>> and has indistinguishable performance for a refresh. --[[smcv]] + > Also I think there may be little optimisation value left in > 7227c2debfeef94b35f7d81f42900aa01820caa3, since the "regular" dependency > lists will be much shorter. -> + +>> You're probably right, but IMO it's not worth reverting it - a set (hash with +>> dummy values) is still the right data structure. --[[smcv]] + > Sounds like inline pagenames has an already exstant bug WRT > pages moving, which this should not make worse. Would be good to verify. -> + +>> If you mean the standard "add a better match for a link-like construct" bug +>> that also affects sidebar, then yes, it does have the bug, but I'm pretty +>> sure this branch doesn't make it any worse. I could solve this at the cost +>> of making pagenames less useful for interactive use, by making it not +>> respect [[ikiwiki/subpage/LinkingRules]], but instead always interpret +>> its paths as relative to the top of the wiki - that's actually all that +>> [[plugins/contrib/album]] needs. --[[smcv]] + > Re coding, it would be nice if `refresh()` could avoid duplicating -> the debug message, etc in the two cases. --[[Joey]] +> the debug message, etc in the two cases. --[[Joey]] + +>> Fixed in commit f805d566 "Avoid duplicating debug message..." --[[smcv]] -- cgit v1.2.3 From 54b3d55aadf9c6ee2b4b3aa68b3a1794a9394fd4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 28 Aug 2009 15:50:02 +0100 Subject: Mark as done --- doc/todo/optimize_simple_dependencies.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/todo/optimize_simple_dependencies.mdwn b/doc/todo/optimize_simple_dependencies.mdwn index 44163311b..50ecafa05 100644 --- a/doc/todo/optimize_simple_dependencies.mdwn +++ b/doc/todo/optimize_simple_dependencies.mdwn @@ -47,6 +47,10 @@ equally valid.) --[[smcv]] +> Now [[merged|done]] --[[smcv]] + +---- + > We discussed this on irc; I had some worries that things may have been > switched to `add_depends_exact` that were not pure page names. My current > feeling is it's all safe, but who knows. It's easy to miss something. -- cgit v1.2.3 From 54f94e6bc88415990db5b5095b6a52890797f6f7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 28 Aug 2009 16:11:52 +0100 Subject: Some crude benchmarking on a larger wiki --- doc/todo/optimize_simple_dependencies.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/optimize_simple_dependencies.mdwn b/doc/todo/optimize_simple_dependencies.mdwn index 10c6c7272..da75ff177 100644 --- a/doc/todo/optimize_simple_dependencies.mdwn +++ b/doc/todo/optimize_simple_dependencies.mdwn @@ -62,7 +62,12 @@ equally valid.) >> >> Performance impact: Test 2 above takes 0.2s longer to rebuild (probably >> from all the calls to lc, which are, however, necessary for correctness) ->> and has indistinguishable performance for a refresh. --[[smcv]] +>> and has indistinguishable performance for a refresh. +>> +>> Test 1 took about 6 minutes to rebuild and 1:25 to refresh; those are +>> pessimistic figures, since I've added 90 more photos and 90 more pages +>> (both to the wiki as a whole, and the number touched before refreshing) +>> since testing the previous version of this branch. --[[smcv]] > Also I think there may be little optimisation value left in > 7227c2debfeef94b35f7d81f42900aa01820caa3, since the "regular" dependency -- cgit v1.2.3 From 79d3bb16ea54520cffbb4e120b1a87a3b2967cb4 Mon Sep 17 00:00:00 2001 From: "http://emptty.myopenid.com/" Date: Fri, 28 Aug 2009 12:18:30 -0400 Subject: my first edit to this site, please forgive mistakes --- doc/todo/Restrict_page_viewing.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/todo/Restrict_page_viewing.mdwn (limited to 'doc') diff --git a/doc/todo/Restrict_page_viewing.mdwn b/doc/todo/Restrict_page_viewing.mdwn new file mode 100644 index 000000000..b25b7de0a --- /dev/null +++ b/doc/todo/Restrict_page_viewing.mdwn @@ -0,0 +1,11 @@ +I'd like to have some pages of my wiki to be only viewable by some users. + +I could use htaccess for that, but it would force the users to have 2 authentication mecanisms, so I'd prefer to use openID for that too. + +* I'm thinking of adding a "show" parameter to the cgi script, thanks to a plugin similar to goto. +* When called, it would check the credential using the session stuff (that I don't understand yet). If not enough, it would serve a 403 error of course. +* If enough, it would read the file locally on the server side and return this as a content. + +Then, I'd have to generate the private page the regular way with ikiwiki, and prevent apache from serving them with an appropriate and much more maintainable htaccess file. + +-- [[users/emptty]] -- cgit v1.2.3 From b6e589c9a484a60b804b9208b41209ca05101682 Mon Sep 17 00:00:00 2001 From: "http://emptty.myopenid.com/" Date: Fri, 28 Aug 2009 12:22:38 -0400 Subject: Introduce myself --- doc/users/emptty.mdwn | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/users/emptty.mdwn (limited to 'doc') diff --git a/doc/users/emptty.mdwn b/doc/users/emptty.mdwn new file mode 100644 index 000000000..08ef7d0f3 --- /dev/null +++ b/doc/users/emptty.mdwn @@ -0,0 +1,2 @@ +My professional homepage is [here](http://www.loria.fr/~quinson/). I'm currently (09/09) trying to move it from WML to ikiwiki. +I'm sure I'll have a bunch of ideas, requests and maybe even patches in the process. -- cgit v1.2.3 From 4236eb5f688944d70c19427e1150285238ce61ce Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Aug 2009 15:00:58 -0400 Subject: response --- doc/todo/Restrict_page_viewing.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/todo/Restrict_page_viewing.mdwn b/doc/todo/Restrict_page_viewing.mdwn index b25b7de0a..ec7b05a51 100644 --- a/doc/todo/Restrict_page_viewing.mdwn +++ b/doc/todo/Restrict_page_viewing.mdwn @@ -9,3 +9,7 @@ I could use htaccess for that, but it would force the users to have 2 authentica Then, I'd have to generate the private page the regular way with ikiwiki, and prevent apache from serving them with an appropriate and much more maintainable htaccess file. -- [[users/emptty]] + +> While I'm sure a plugin could do this, it adds so much scalability cost +> and is so counter to ikiwiki's design.. Have you considered using the +> [[plugins/httpauth]] plugin to unify around htaccess auth? --[[Joey]] -- cgit v1.2.3 From 54a3928508d4421388e1b0876f963aa648da695c Mon Sep 17 00:00:00 2001 From: furby Date: Fri, 28 Aug 2009 18:03:28 -0400 Subject: --- doc/sandbox.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 6ea8cc607..b986176ae 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -171,3 +171,10 @@ testing [[!toc levels=2]] [[Mamma Mia]] +---- + +[[!format c """ +void main () { + printf("hello, world!"); +} +"""]] -- cgit v1.2.3 From 25bf32431fd59afcc808eb74d5cefc96efab1182 Mon Sep 17 00:00:00 2001 From: furby Date: Fri, 28 Aug 2009 18:08:16 -0400 Subject: --- doc/sandbox.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index b986176ae..96b880b34 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -171,6 +171,7 @@ testing [[!toc levels=2]] [[Mamma Mia]] + ---- [[!format c """ @@ -178,3 +179,5 @@ void main () { printf("hello, world!"); } """]] + + -- cgit v1.2.3 From 2ba54735ce78a80d9577bef068f674559dddf57b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Aug 2009 18:22:11 -0400 Subject: po test suite failure --- doc/plugins/po.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 031188a67..4fecaeb53 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -352,6 +352,12 @@ whether it links to its master page. I believe the later is generally expected. Commit 646c9a4c95a480 in my po branch fixes this. --[[intrigeri]] +2 test suite failures +-------------------- + +t/po is currently failing tests 57 and 59 (and I would like to release +soon..) --[[Joey]] + Documentation ------------- -- cgit v1.2.3 From 94727e7fcfff204030bec64509ecedacb0abd6dc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Aug 2009 19:49:22 -0400 Subject: merged --- doc/plugins/po.mdwn | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 4fecaeb53..04420c115 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -317,41 +317,6 @@ text, or text in whatever single language ikiwiki is configured to "speak". Maybe there could be a way to switch ikiwiki to speaking another language when building a non-english page? Then the directives would get translated. -Created page type ------------------ - -The interdiction to create pages of type po was broken by the new -`page_types` code. This is fixed in my po branch by -commit 1914ae2fd24e1e802. - -While I was there, I also added some code to set a new default value -to the type select field in case it was previously set to "po". -This code favors the type of the linking page's masterpage on page -creation (when `from=page.LL`). This is commit c9301d2c296f682. ---[[intrigeri]] - -> Both cherry picked. --[[Joey]] - -inline's post form's rootpage ------------------------------ - -When a translatable page (say it is called "bugs") contains an -[[inline directive|ikiwiki/directive/inline]] with `postform` enabled, -the rootpage is l10n'd on translations pages (e.g. "bugs.fr" gets -a `rootpage` value of `bugs.fr`). This is usually not what's expected, -as translation pages are not supposed to have subpages. My po branch -has code (e671e72053e81fa, which depends on 72ac9821e56637) that fixes -this. --[[intrigeri]] - -link() pagespec on translation pages ------------------------------------- - -The `link()` pagespec, on translation pages, currently tests whether -a given page links to the *current translation page*, rather than -whether it links to its master page. I believe the later is generally -expected. Commit 646c9a4c95a480 in my po branch fixes this. ---[[intrigeri]] - 2 test suite failures -------------------- -- cgit v1.2.3 From 44ce9563a328ecb3b5fa8fd97afa30c3033fca76 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 29 Aug 2009 01:13:24 -0400 Subject: note that debian-* branches are subject to being rebased --- doc/git.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index f6971e84b..008f109df 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -63,7 +63,7 @@ Some of the branches included in the main repository include: changes. * `debian-stable` is used for updates to the old version included in Debian's stable release, and `debian-testing` is used for updates to - Debian's testing release. + Debian's testing release. (These and similar branches will be rebased.) * `ignore` gets various branches merged to it that Joey wishes to ignore when looking at everyone's unmerged changes. * `pristine-tar` contains deltas that -- cgit v1.2.3 From a4c9a8461cc85377f8c88a62f2f980a0c7e2a042 Mon Sep 17 00:00:00 2001 From: "http://emptty.myopenid.com/" Date: Sat, 29 Aug 2009 04:28:01 -0400 Subject: Answer to Joey, and justify my text (in the source) --- doc/todo/Restrict_page_viewing.mdwn | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/todo/Restrict_page_viewing.mdwn b/doc/todo/Restrict_page_viewing.mdwn index ec7b05a51..0b2a65a66 100644 --- a/doc/todo/Restrict_page_viewing.mdwn +++ b/doc/todo/Restrict_page_viewing.mdwn @@ -1,15 +1,27 @@ I'd like to have some pages of my wiki to be only viewable by some users. -I could use htaccess for that, but it would force the users to have 2 authentication mecanisms, so I'd prefer to use openID for that too. +I could use htaccess for that, but it would force the users to have +2 authentication mecanisms, so I'd prefer to use openID for that too. -* I'm thinking of adding a "show" parameter to the cgi script, thanks to a plugin similar to goto. -* When called, it would check the credential using the session stuff (that I don't understand yet). If not enough, it would serve a 403 error of course. -* If enough, it would read the file locally on the server side and return this as a content. +* I'm thinking of adding a "show" parameter to the cgi script, thanks + to a plugin similar to goto. +* When called, it would check the credential using the session stuff + (that I don't understand yet). +* If not enough, it would serve a 403 error of course. +* If enough, it would read the file locally on the server side and + return this as a content. -Then, I'd have to generate the private page the regular way with ikiwiki, and prevent apache from serving them with an appropriate and much more maintainable htaccess file. +Then, I'd have to generate the private page the regular way with ikiwiki, +and prevent apache from serving them with an appropriate and +much more maintainable htaccess file. -- [[users/emptty]] > While I'm sure a plugin could do this, it adds so much scalability cost > and is so counter to ikiwiki's design.. Have you considered using the > [[plugins/httpauth]] plugin to unify around htaccess auth? --[[Joey]] + +>> I'm not speaking of rendering the pages on demand, but to serve them on demand. +>> They would still be compiled the regular way; +>> I'll have another look at [[plugins/httpauth]] but I really like the openID whole idea. +>> --[[emptty]] -- cgit v1.2.3 From a0de415ae0bdfef3aa12bc4201f72c6dedbe021d Mon Sep 17 00:00:00 2001 From: bremner Date: Sat, 29 Aug 2009 07:16:57 -0400 Subject: build failure on nearlyfreespeech.net --- doc/tips/nearlyfreespeech/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/tips/nearlyfreespeech/discussion.mdwn (limited to 'doc') diff --git a/doc/tips/nearlyfreespeech/discussion.mdwn b/doc/tips/nearlyfreespeech/discussion.mdwn new file mode 100644 index 000000000..3d4dc732d --- /dev/null +++ b/doc/tips/nearlyfreespeech/discussion.mdwn @@ -0,0 +1,9 @@ +with version 3.141592 I get +
+HOME=/home/me /usr/bin/perl -Iblib/lib   ikiwiki.out -libdir . -dumpsetup ikiwiki.setup
+Failed to load plugin IkiWiki::Plugin::inline: Can't use global $_ in "my" at IkiWiki/Plugin/inline.pm line 198, near "my $_"
+Compilation failed in require at (eval 19) line 2.
+BEGIN failed--compilation aborted at (eval 19) line 2.
+
+ +perl is 5.8.9 -- cgit v1.2.3 From 517432273b96fc9e6bad9b7667ef6d1b04c699ee Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Sat, 29 Aug 2009 10:47:45 -0400 Subject: mod_auth_openid --- doc/todo/Restrict_page_viewing.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/Restrict_page_viewing.mdwn b/doc/todo/Restrict_page_viewing.mdwn index 0b2a65a66..089d27fff 100644 --- a/doc/todo/Restrict_page_viewing.mdwn +++ b/doc/todo/Restrict_page_viewing.mdwn @@ -25,3 +25,12 @@ much more maintainable htaccess file. >> They would still be compiled the regular way; >> I'll have another look at [[plugins/httpauth]] but I really like the openID whole idea. >> --[[emptty]] + +>>> How about +>>> [mod_auth_openid](http://trac.butterfat.net/public/mod_auth_openid), then? +>>> A plugin for ikiwiki to serve its own pages is far afield from ikiwiki's roots, +>>> as Joey pointed out, but might be a neat option to have anyway -- for unifying +>>> authentication across views and edits, for systems not otherwise running +>>> web servers, for systems with web servers you don't have access to, and +>>> doubtless for other purposes. Such a plugin would add quite a bit of flexibility, +>>> and in that sense (IMO, of course) it'd be in the spirit of ikiwiki. --[[schmonz]] -- cgit v1.2.3 From ef69cb34c355e184b01999cf445793cebc16f0c4 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sat, 29 Aug 2009 16:32:48 +0200 Subject: doc/po(test suite failures): follow-up Signed-off-by: intrigeri --- doc/plugins/po.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 04420c115..9f4cf5564 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -323,6 +323,20 @@ when building a non-english page? Then the directives would get translated. t/po is currently failing tests 57 and 59 (and I would like to release soon..) --[[Joey]] +> They are failing because of commit cdc3576c8d1e (po: do not inject +> custom bestlink function when `po_link_to` eq `default`). The test +> suite changes `$config{po_link_to}`, but the `checkconfig` hook is +> not re-run. I could manually run it when needed in the test-suite, +> but this would lead to this function being injected several times, +> and then `$origsubs{'bestlink'}` to be sometimes set to a wrong +> value, which would break other parts of the test-suite. The best +> solution I can think of (apart of reverting this commit or disabling +> these two tests) is to split the test-suite into 3 parts, depending +> on the `$config{po_link_to}` setting, either in 3 different `.t` +> files, or inside the existing one and completely reset the IkiWiki +> environment at the start of these parts... which I did not manage to +> achieve in the last 2 hours :/ --[[intrigeri]] + Documentation ------------- -- cgit v1.2.3 From 6962b3459725a921714b4d777cab6288711f4990 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sat, 29 Aug 2009 22:17:40 -0400 Subject: This is in my git branch now, no need for a copy of the code here. --- doc/plugins/contrib/unixauth.mdwn | 204 +------------------------------------- 1 file changed, 2 insertions(+), 202 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/unixauth.mdwn b/doc/plugins/contrib/unixauth.mdwn index 6108ebfae..137195139 100644 --- a/doc/plugins/contrib/unixauth.mdwn +++ b/doc/plugins/contrib/unixauth.mdwn @@ -1,6 +1,8 @@ [[!template id=plugin name=unixauth core=0 author="[[schmonz]]"]] [[!tag type/auth]] +[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] + This plugin authenticates users against the Unix user database. It presents a similar UI to [[plugins/passwordauth]], but simpler, as there's no need to be able to register or change one's password. To authenticate, either [checkpassword](http://cr.yp.to/checkpwd.html) or [pwauth](http://www.unixpapa.com/pwauth/) must be installed and configured. `checkpassword` is strongly preferred. If your web server runs as an unprivileged user -- as it darn well should! -- then `checkpassword` needs to be setuid root. (Or your ikiwiki CGI wrapper, I guess, but don't do that.) Other checkpassword implementations are available, notably [checkpassword-pam](http://checkpasswd-pam.sourceforge.net/). @@ -17,205 +19,3 @@ __Security__: [As with passwordauth](/security/#index14h2), be wary of sending u `unixauth` needs the `HTTPS` environment variable, available in ikiwiki 2.67 or later (fixed in #[502047](http://bugs.debian.org/502047)), without which it fails closed. The plugin has not been tested with newer versions of ikiwiki. [[schmonz]] hopes to have time to polish this plugin soon. - -[[!toggle id="code" text="unixauth.pm"]] - -[[!toggleable id="code" text=""" - - #!/usr/bin/perl - # Ikiwiki unixauth authentication. - package IkiWiki::Plugin::unixauth; - - use warnings; - use strict; - use IkiWiki 2.00; - - sub import { - hook(type => "getsetup", id => "unixauth", call => \&getsetup); - hook(type => "formbuilder_setup", id => "unixauth", - call => \&formbuilder_setup); - hook(type => "formbuilder", id => "unixauth", - call => \&formbuilder); - hook(type => "sessioncgi", id => "unixauth", call => \&sessioncgi); - } - - sub getsetup () { - return - unixauth_type => { - type => "string", - example => "checkpassword", - description => "type of authenticator; can be 'checkpassword' or 'pwauth'", - safe => 0, - rebuild => 1, - }, - unixauth_command => { - type => "string", - example => "/path/to/checkpassword", - description => "full path and any arguments", - safe => 0, - rebuild => 1, - }, - unixauth_requiressl => { - type => "boolean", - example => "1", - description => "require SSL? strongly recommended", - safe => 0, - rebuild => 1, - }, - plugin => { - description => "Unix user authentication", - safe => 0, - rebuild => 1, - }, - } - - # Checks if a string matches a user's password, and returns true or false. - sub checkpassword ($$;$) { - my $user=shift; - my $password=shift; - my $field=shift || "password"; - - # It's very important that the user not be allowed to log in with - # an empty password! - if (! length $password) { - return 0; - } - - my $ret=0; - if (! exists $config{unixauth_type}) { - # admin needs to carefully think over his configuration - return 0; - } - elsif ($config{unixauth_type} eq "checkpassword") { - open UNIXAUTH, "|$config{unixauth_command} true 3<&0" or die("Could not run $config{unixauth_type}"); - print UNIXAUTH "$user\0$password\0Y123456\0"; - close UNIXAUTH; - $ret=!($?>>8); - } - elsif ($config{unixauth_type} eq "pwauth") { - open UNIXAUTH, "|$config{unixauth_command}" or die("Could not run $config{unixauth_type}"); - print UNIXAUTH "$user\n$password\n"; - close UNIXAUTH; - $ret=!($?>>8); - } - else { - # no such authentication type - return 0; - } - - if ($ret) { - my $userinfo=IkiWiki::userinfo_retrieve(); - if (! length $user || ! defined $userinfo || - ! exists $userinfo->{$user} || ! ref $userinfo->{$user}) { - IkiWiki::userinfo_setall($user, { - 'email' => '', - 'regdate' => time, - }); - } - } - - return $ret; - } - - sub formbuilder_setup (@) { - my %params=@_; - - my $form=$params{form}; - my $session=$params{session}; - my $cgi=$params{cgi}; - - # if not under SSL, die before even showing a login form, - # unless the admin explicitly says it's fine - if (! exists $config{unixauth_requiressl}) { - $config{unixauth_requiressl} = 1; - } - if ($config{unixauth_requiressl}) { - if ((! $config{sslcookie}) || (! exists $ENV{'HTTPS'})) { - die("SSL required to login. Contact your administrator.
"); - } - } - - if ($form->title eq "signin") { - $form->field(name => "name", required => 0); - $form->field(name => "password", type => "password", required => 0); - - if ($form->submitted) { - my $submittype=$form->submitted; - # Set required fields based on how form was submitted. - my %required=( - "Login" => [qw(name password)], - ); - foreach my $opt (@{$required{$submittype}}) { - $form->field(name => $opt, required => 1); - } - - # Validate password against name for Login. - if ($submittype eq "Login") { - $form->field( - name => "password", - validate => sub { - checkpassword($form->field("name"), shift); - }, - ); - } - - # XXX is this reachable? looks like no - elsif ($submittype eq "Login") { - $form->field( - name => "name", - validate => sub { - my $name=shift; - length $name && - IkiWiki::userinfo_get($name, "regdate"); - }, - ); - } - } - else { - # First time settings. - $form->field(name => "name"); - if ($session->param("name")) { - $form->field(name => "name", value => $session->param("name")); - } - } - } - elsif ($form->title eq "preferences") { - $form->field(name => "name", disabled => 1, - value => $session->param("name"), force => 1, - fieldset => "login"); - $form->field(name => "password", disabled => 1, type => "password", - fieldset => "login"), - } - } - - sub formbuilder (@) { - my %params=@_; - - my $form=$params{form}; - my $session=$params{session}; - my $cgi=$params{cgi}; - my $buttons=$params{buttons}; - - if ($form->title eq "signin") { - if ($form->submitted && $form->validate) { - if ($form->submitted eq 'Login') { - $session->param("name", $form->field("name")); - IkiWiki::cgi_postsignin($cgi, $session); - } - } - } - elsif ($form->title eq "preferences") { - if ($form->submitted eq "Save Preferences" && $form->validate) { - my $user_name=$form->field('name'); - } - } - } - - sub sessioncgi ($$) { - my $q=shift; - my $session=shift; - } - - 1 - -"""]] -- cgit v1.2.3 From 0721363a7adfc0f993a485a45222482a8a854a19 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 30 Aug 2009 01:26:57 -0400 Subject: bug fixed, to-dos done --- doc/plugins/contrib/cvs.mdwn | 2 -- doc/plugins/contrib/cvs/discussion.mdwn | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 6b600eef7..afef98c74 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -27,7 +27,5 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn ### To do * Add automated tests. (Blindly adding svn-like tests to `t/file_pruned.t` doesn't do the trick.) -* If the argument to `cvs add` smells like a binary file, `cvs add -kb` it (for [[plugins/attachment]] support). -* Don't slurp the entire `cvsps` output into memory (!). * Instead of resource-intensively scraping changesets with `cvsps`, have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce and keep records of commits. `cvsps` can be used as a fallback for repositories without such records. * Perhaps prevent web edits from attempting to create `.../CVS/foo.mdwn` (and `.../cvs/foo.mdwn` on case-insensitive filesystems); thanks to the CVS metadata directory, the attempt will fail anyway (and much more confusingly) if we don't. diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index e1fa6e428..e142452d0 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -52,6 +52,10 @@ the "cvs add " call and avoid doing anything in that case? >>>>>> I don't see how there could possibly be a difference between >>>>>> ikiwiki's C wrapper and your shell wrapper wrapper here. --[[Joey]] +>>>>>>> I was comparing strings overly precisely. Fixed on my branch. +>>>>>>> I've also knocked off the two most pressing to-do items. I +>>>>>>> think the plugin's ready for prime time. --[[schmonz]] + > Thing 2 I'm less sure of. (I'd like to see the web UI return > immediately on save anyway, to a temporary "rebuilding, please wait > if you feel like knowing when it's done" page, but this problem -- cgit v1.2.3 From 558873131f10c52ecbc0b97544db6556964f172a Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 30 Aug 2009 01:31:15 -0400 Subject: also need File::ReadBackwards now --- doc/plugins/contrib/cvs.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index afef98c74..4cd7dcc7d 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -5,7 +5,9 @@ This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions System]] as an [[rcs]]. ### Usage -7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan IPC::Cmd]], [[!cpan String::ShellQuote]], and [cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. +7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan IPC::Cmd]], +[[!cpan String::ShellQuote]], [[!cpan File::ReadBackwards]], and +[cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. 7. Adjust CVS-related parameters in your setup file. Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn't need it, but you yourself might. Here's a good general-purpose one: -- cgit v1.2.3 From 58cef9c3cf6da1b614c0a24ebef15a0d8ecea335 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sun, 30 Aug 2009 02:35:38 -0400 Subject: describe the wrapper change --- doc/plugins/contrib/cvs.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 4cd7dcc7d..1c43fb272 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -20,7 +20,11 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn ### Implementation details * `cvs.pm` started life as a copy of [[3.14159|news/version_3.14159]]'s `svn.pm`. -* `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. +* `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata +into `$DESTDIR`. +* `IkiWiki/Wrapper.pm` avoids calling ikiwiki from post-commit if it's a +directory being `cvs add`ed (this check is only compiled into the wrapper +iff the configured VCS is "cvs"). * [[ikiwiki-makerepo]]: * creates a repository, * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), -- cgit v1.2.3 From d678147410fd5b1a7c6ca595f651b4da154229a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 14:49:53 -0400 Subject: Revert "po: do not inject custom bestlink function when po_link_to eq default" This reverts commit cdc3576c8d1efb2593cac2d9da3f2393a2afe26e. Conflicts: IkiWiki/Plugin/po.pm This change broke the test suite and is not strictly necessary. --- IkiWiki/Plugin/po.pm | 12 +++++------- doc/plugins/po.mdwn | 2 ++ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 792d84261..5d0d9e79d 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -51,6 +51,8 @@ sub import { hook(type => "formbuilder_setup", id => "po", call => \&formbuilder_setup, last => 1); hook(type => "formbuilder", id => "po", call => \&formbuilder); + $origsubs{'bestlink'}=\&IkiWiki::bestlink; + inject(name => "IkiWiki::bestlink", call => \&mybestlink); $origsubs{'beautify_urlpath'}=\&IkiWiki::beautify_urlpath; inject(name => "IkiWiki::beautify_urlpath", call => \&mybeautify_urlpath); $origsubs{'targetpage'}=\&IkiWiki::targetpage; @@ -153,12 +155,6 @@ sub checkconfig () { warn(gettext('po_link_to=negotiated requires usedirs to be enabled, falling back to po_link_to=default')); $config{po_link_to}='default'; } - unless ($config{po_link_to} eq 'default') { - if (! exists $origsubs{'bestlink'}) { - $origsubs{'bestlink'}=\&IkiWiki::bestlink; - inject(name => "IkiWiki::bestlink", call => \&mybestlink); - } - } push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/; @@ -562,11 +558,13 @@ sub formbuilder (@) { # `---- # Implement po_link_to 'current' and 'negotiated' settings. -# Not injected otherwise. sub mybestlink ($$) { my $page=shift; my $link=shift; + return $origsubs{'bestlink'}->($page, $link) + if $config{po_link_to} eq "default"; + my $res=$origsubs{'bestlink'}->(masterpage($page), $link); my @caller = caller(1); if (length $res diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 9f4cf5564..38b6b12cd 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -337,6 +337,8 @@ soon..) --[[Joey]] > environment at the start of these parts... which I did not manage to > achieve in the last 2 hours :/ --[[intrigeri]] +>> I've reverted it. --[[Joey]] + Documentation ------------- -- cgit v1.2.3 From 2e357179bd9cc7b2b05ae7ecad52273d5be02ebd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 14:51:51 -0400 Subject: fixed --- doc/tips/nearlyfreespeech/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/tips/nearlyfreespeech/discussion.mdwn b/doc/tips/nearlyfreespeech/discussion.mdwn index 3d4dc732d..a003760b9 100644 --- a/doc/tips/nearlyfreespeech/discussion.mdwn +++ b/doc/tips/nearlyfreespeech/discussion.mdwn @@ -7,3 +7,5 @@ BEGIN failed--compilation aborted at (eval 19) line 2. perl is 5.8.9 + +> This is fixed in 3.1415926. --[[Joey]] -- cgit v1.2.3 From b83cb1d9f5ad1bc3eab332a75ecd958d63610ce9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 14:54:52 -0400 Subject: note --- doc/todo/Restrict_page_viewing.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/Restrict_page_viewing.mdwn b/doc/todo/Restrict_page_viewing.mdwn index 089d27fff..9c1889d63 100644 --- a/doc/todo/Restrict_page_viewing.mdwn +++ b/doc/todo/Restrict_page_viewing.mdwn @@ -34,3 +34,6 @@ much more maintainable htaccess file. >>> web servers, for systems with web servers you don't have access to, and >>> doubtless for other purposes. Such a plugin would add quite a bit of flexibility, >>> and in that sense (IMO, of course) it'd be in the spirit of ikiwiki. --[[schmonz]] + +>>>> Yes, I think this could probably be used in combination with ikiwiki's +>>>> httpauth and openid plugins. --[[Joey]] -- cgit v1.2.3 From 41122048b924ffa16ef8e1f77730f15b455733b0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 15:20:32 -0400 Subject: teximg security problem --- doc/security.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/security.mdwn b/doc/security.mdwn index 939d65d01..ba3eac187 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -417,3 +417,13 @@ attack. intrigeri discovered this problem on 12 Nov 2008 and a patch put in place later that day, in version 2.70. The fix was backported to testing as version 2.53.3, and to stable as version 1.33.7. + +## Insufficient blacklisting in teximg plugin + +Josh Tripplet discovered on 28 Aug 2009 that the teximg plugin's +blacklisting of insecure TeX commands was insufficient; it could be +bypassed and used to read arbitrary files. This was fixed by +enabling TeX configuration options that disallow unsafe TeX commands. +The fix was released on 30 Aug 2009 in version 3.1415926, and was +backported to stable in version 2.53.4. If you use the teximg plugin, +I recommend upgrading. -- cgit v1.2.3 From 5acec79c64de145feb364742dde7d9391992b0a8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 15:31:47 -0400 Subject: add news item for ikiwiki 3.1415926 --- doc/news/version_3.1415926.mdwn | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 doc/news/version_3.1415926.mdwn (limited to 'doc') diff --git a/doc/news/version_3.1415926.mdwn b/doc/news/version_3.1415926.mdwn new file mode 100644 index 000000000..c914c83cd --- /dev/null +++ b/doc/news/version_3.1415926.mdwn @@ -0,0 +1,53 @@ +News for ikiwiki 3.1415926: + + In order to fix a performance bug, all wikis need to be rebuilt on + upgrade to this version. If you listed your wiki in + /etc/ikiwiki/wikilist this will be done automatically when the + Debian package is upgraded. Or use ikiwiki-mass-rebuild to force + a rebuild. + +ikiwiki 3.1415926 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * [ Joey Hess ] + * po: Detect if nowrapi18n can't be passed to po4a, and warn about + the old version, but continue. Closes: #[541205](http://bugs.debian.org/541205) + * inline: Avoid use of my $\_ as it fails with older perls. + Closes: #[541215](http://bugs.debian.org/541215) + * Add discussionpage configuration setting. + * Several optimisations, including speedups to orphans and brokenlinks + calculation. + * meta, img: Fix bugs in dependency code. (smcv) + * Allow building ikiwiki on systems w/o po4a -- + building of the translated underlays will be skipped in this case. + * Add basic styling of po plugin's languages list. + * inline: Display an error if feedpages is specified and fails to match + due to a problem such as created\_before being told to check against + a page that does not exist. + * Remove deprecated ikiwiki/blog and ikiwiki/preprocessordirective + pages from the basewiki. + * Updated French program translation from Philippe Batailler. + Closes: #[542036](http://bugs.debian.org/542036) + * po: Fixed to run rcs\_add ralative to srcdir. + * Italian program translation from Luca Bruno. + * Fix example blog's tags/life to not have a broken PageSpec. + Closes: #[543510](http://bugs.debian.org/543510) + * Optimize the dependencies list. This also fixes a bug + that could cause repeated refreshes of the wiki to grow + increasingly larger dependency lists, and get increasingly + slower. (smcv) + * Rebuild wikis on upgrade to this version to fix bloat caused + by the dependency bug. + * Further optimisation of dependency handling by adding a special + case for simple page dependencies. (smcv) + * htmltidy: Return an error message if tidy fails. Closes: #[543722](http://bugs.debian.org/543722) + * po: Fix name of translated toplevel index page. (intrigeri) + * po: Fix display of links from a translated page to itself (ntrigeri) + * Add Czech basewiki translation from Miroslav Kure. + * po: fix interdiction to create pages of type po (intrigeri) + * po: po: favor the type of linking page's masterpage on page creation + (intrigeri) + * img: Don't generate new verison of image if it is scaled to be + larger in either dimension. + * [ Josh Triplett ] + * teximg: Replace the insufficient blacklist with the built-in security + mechanisms of TeX."""]] \ No newline at end of file -- cgit v1.2.3 From 7021fc36466d80ca0c4105b82239d3ba008ade80 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 15:32:42 -0400 Subject: still mispelling josh's name.. --- doc/security.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/security.mdwn b/doc/security.mdwn index ba3eac187..200ae29e2 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -420,7 +420,7 @@ later that day, in version 2.70. The fix was backported to testing as version ## Insufficient blacklisting in teximg plugin -Josh Tripplet discovered on 28 Aug 2009 that the teximg plugin's +Josh Triplett discovered on 28 Aug 2009 that the teximg plugin's blacklisting of insecure TeX commands was insufficient; it could be bypassed and used to read arbitrary files. This was fixed by enabling TeX configuration options that disallow unsafe TeX commands. -- cgit v1.2.3 From 8aeac3b6666eee4bcabf0e5c49bf1806d9410983 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 17:48:14 -0400 Subject: CVE --- debian/changelog | 2 +- doc/news/version_3.1415926.mdwn | 2 +- doc/security.mdwn | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index ee8e74027..4dd47d2dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,7 +43,7 @@ ikiwiki (3.1415926) unstable; urgency=high [ Josh Triplett ] * teximg: Replace the insufficient blacklist with the built-in security - mechanisms of TeX. + mechanisms of TeX. (CVE-2009-2944) -- Joey Hess Sun, 30 Aug 2009 15:20:46 -0400 diff --git a/doc/news/version_3.1415926.mdwn b/doc/news/version_3.1415926.mdwn index c914c83cd..d31812c8e 100644 --- a/doc/news/version_3.1415926.mdwn +++ b/doc/news/version_3.1415926.mdwn @@ -50,4 +50,4 @@ ikiwiki 3.1415926 released with [[!toggle text="these changes"]] larger in either dimension. * [ Josh Triplett ] * teximg: Replace the insufficient blacklist with the built-in security - mechanisms of TeX."""]] \ No newline at end of file + mechanisms of TeX. ([[!cve CVE-2009-2944]])"""]] diff --git a/doc/security.mdwn b/doc/security.mdwn index 200ae29e2..3924186c2 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -426,4 +426,4 @@ bypassed and used to read arbitrary files. This was fixed by enabling TeX configuration options that disallow unsafe TeX commands. The fix was released on 30 Aug 2009 in version 3.1415926, and was backported to stable in version 2.53.4. If you use the teximg plugin, -I recommend upgrading. +I recommend upgrading. ([[!cve CVE-2009-2944]]) -- cgit v1.2.3 From a86de9b1f6e6ae867a5a2f7ede5b52a04f306c58 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Aug 2009 19:17:45 -0400 Subject: update for Text::MultiMarkdown split --- doc/plugins/mdwn.mdwn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/plugins/mdwn.mdwn b/doc/plugins/mdwn.mdwn index 6ad1fb229..af0531059 100644 --- a/doc/plugins/mdwn.mdwn +++ b/doc/plugins/mdwn.mdwn @@ -12,9 +12,9 @@ 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 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 -file. Note that multimarkdown's metadata and wikilinks features are -disabled when it's used with ikiwiki. +[[!cpan Text::MultiMarkdown]] can be used in order to use tables, footnotes, +and other new features from the markdown variant called +multimarkdown](http://fletcherpenney.net/MultiMarkdown/). 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. -- cgit v1.2.3 From 9492bf315832df1e92277dcb75f95de50abe3e9c Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 31 Aug 2009 11:03:20 -0400 Subject: fixed link --- doc/plugins/mdwn.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/mdwn.mdwn b/doc/plugins/mdwn.mdwn index af0531059..756462aa1 100644 --- a/doc/plugins/mdwn.mdwn +++ b/doc/plugins/mdwn.mdwn @@ -14,7 +14,7 @@ markdown](http://daringfireball.net/projects/markdown/) can be used, or the [[!cpan Text::MultiMarkdown]] can be used in order to use tables, footnotes, and other new features from the markdown variant called -multimarkdown](http://fletcherpenney.net/MultiMarkdown/). Multimarkdown is +[multimarkdown](http://fletcherpenney.net/MultiMarkdown/). 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. -- cgit v1.2.3 From e5113aa766fa19a16b29d762f2bca2e9670c0677 Mon Sep 17 00:00:00 2001 From: mike castleman Date: Mon, 31 Aug 2009 13:50:59 -0400 Subject: new page: sandbox/test2 --- doc/sandbox/test2.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/sandbox/test2.mdwn (limited to 'doc') diff --git a/doc/sandbox/test2.mdwn b/doc/sandbox/test2.mdwn new file mode 100644 index 000000000..3e50e68f3 --- /dev/null +++ b/doc/sandbox/test2.mdwn @@ -0,0 +1 @@ +this is test two, being pushed by [[tips/untrusted_git_push]]. -- cgit v1.2.3 From 9e195018a2a7ba315ee947bd367fca33b704ef2c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 31 Aug 2009 19:30:31 -0400 Subject: remove ^P's --- doc/plugins/mdwn.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/mdwn.mdwn b/doc/plugins/mdwn.mdwn index 756462aa1..ce1b6097a 100644 --- a/doc/plugins/mdwn.mdwn +++ b/doc/plugins/mdwn.mdwn @@ -14,7 +14,7 @@ markdown](http://daringfireball.net/projects/markdown/) can be used, or the [[!cpan Text::MultiMarkdown]] can be used in order to use tables, footnotes, and other new features from the markdown variant called -[multimarkdown](http://fletcherpenney.net/MultiMarkdown/). Multimarkdown is +[multimarkdown](http://fletcherpenney.net/MultiMarkdown/). 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. -- cgit v1.2.3 From 904c16a68b07078750e5906ffb2c568d22d955e3 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 1 Sep 2009 14:17:51 +0100 Subject: Remove references to merged-and-deleted git branches --- doc/bugs/map_fails_to_close_ul_element_for_empty_list.mdwn | 2 -- doc/todo/backlinks_result_is_lossy.mdwn | 1 - doc/todo/generated_po_stuff_not_ignored_by_git.mdwn | 1 - doc/todo/inline_plugin:_specifying_ordered_page_names.mdwn | 2 -- doc/todo/optimize_simple_dependencies.mdwn | 2 -- doc/todo/pagestats_among_a_subset_of_pages.mdwn | 1 - doc/todo/should_optimise_pagespecs.mdwn | 4 ---- doc/todo/source_link.mdwn | 2 -- 8 files changed, 15 deletions(-) (limited to 'doc') diff --git a/doc/bugs/map_fails_to_close_ul_element_for_empty_list.mdwn b/doc/bugs/map_fails_to_close_ul_element_for_empty_list.mdwn index 5e842ca7f..ad0f506f2 100644 --- a/doc/bugs/map_fails_to_close_ul_element_for_empty_list.mdwn +++ b/doc/bugs/map_fails_to_close_ul_element_for_empty_list.mdwn @@ -66,8 +66,6 @@ Patch: >>>>>> The current arrangement looks fine to me. Thanks. --[[harishcm]] -[[!template id=gitbranch author="[[harishcm]]" branch=smcv/ready/harishcm-map-fix]] - > [[merged|done]] --[[Joey]] Patch: diff --git a/doc/todo/backlinks_result_is_lossy.mdwn b/doc/todo/backlinks_result_is_lossy.mdwn index 11b5fbcae..2a9fc4a0a 100644 --- a/doc/todo/backlinks_result_is_lossy.mdwn +++ b/doc/todo/backlinks_result_is_lossy.mdwn @@ -1,5 +1,4 @@ [[!tag patch patch/core]] -[[!template id=gitbranch branch=smcv/ready/among author="[[smcv]]"]] IkiWiki::backlinks returns a form of $backlinks{$page} that has undergone a lossy transformation (to get it in the form that page templates want), making diff --git a/doc/todo/generated_po_stuff_not_ignored_by_git.mdwn b/doc/todo/generated_po_stuff_not_ignored_by_git.mdwn index 1d24fd385..29c017c5d 100644 --- a/doc/todo/generated_po_stuff_not_ignored_by_git.mdwn +++ b/doc/todo/generated_po_stuff_not_ignored_by_git.mdwn @@ -1,4 +1,3 @@ -[[!template id=gitbranch branch=smcv/gitignore author="[[smcv]]"]] [[!tag patch]] The recent merge of the po branch didn't come with a .gitignore. diff --git a/doc/todo/inline_plugin:_specifying_ordered_page_names.mdwn b/doc/todo/inline_plugin:_specifying_ordered_page_names.mdwn index bbde04f83..85bb4ff5a 100644 --- a/doc/todo/inline_plugin:_specifying_ordered_page_names.mdwn +++ b/doc/todo/inline_plugin:_specifying_ordered_page_names.mdwn @@ -1,5 +1,3 @@ -[[!template id=gitbranch branch=smcv/ready/inline-pagenames author="[[smcv]]"]] - A [[!taglink patch]] in my git repository (the inline-pagenames branch) adds the following parameter to the [[ikiwiki/directive/inline]] directive: diff --git a/doc/todo/optimize_simple_dependencies.mdwn b/doc/todo/optimize_simple_dependencies.mdwn index 91e184c29..6f6284303 100644 --- a/doc/todo/optimize_simple_dependencies.mdwn +++ b/doc/todo/optimize_simple_dependencies.mdwn @@ -1,5 +1,3 @@ -[[!template id=gitbranch branch=smcv/ready/depends-exact author="[[smcv]]"]] - I'm still trying to optimize ikiwiki for a site using [[plugins/contrib/album]], and checking which pages depend on which pages is still taking too long. Here's another go at fixing that, using [[Will]]'s diff --git a/doc/todo/pagestats_among_a_subset_of_pages.mdwn b/doc/todo/pagestats_among_a_subset_of_pages.mdwn index fd15d6a42..33f9258fd 100644 --- a/doc/todo/pagestats_among_a_subset_of_pages.mdwn +++ b/doc/todo/pagestats_among_a_subset_of_pages.mdwn @@ -1,5 +1,4 @@ [[!tag patch plugins/pagestats]] -[[!template id=gitbranch branch=smcv/ready/among author="[[smcv]]"]] My `among` branch fixes [[todo/backlinks_result_is_lossy]], then uses that to provide pagestats for links from a subset of pages. From the docs included diff --git a/doc/todo/should_optimise_pagespecs.mdwn b/doc/todo/should_optimise_pagespecs.mdwn index 4b4e267f0..728ab8994 100644 --- a/doc/todo/should_optimise_pagespecs.mdwn +++ b/doc/todo/should_optimise_pagespecs.mdwn @@ -79,8 +79,6 @@ I can think about reducung the size of my wiki source and making it available on > > --[[Joey]] -[[!template id=gitbranch branch=smcv/ready/optimize-depends author="[[smcv]]"]] - >> I've been looking at optimizing ikiwiki for a site using >> [[plugins/contrib/album]] (which produces a lot of pages) and it seems >> that checking which pages depend on which pages does take a significant @@ -100,8 +98,6 @@ I can think about reducung the size of my wiki source and making it available on >>>> I haven't actually deleted it), because the "or" operation is now done in >>>> the Perl code, rather than by merging pagespecs and translating. --[[smcv]] -[[!template id=gitbranch branch=smcv/ready/remove-pagespec-merge author="[[smcv]]"]] - >>>>> I've now added a patch to the end of that branch that deletes >>>>> `pagespec_merge` almost entirely (we do need to keep a copy around, in >>>>> ikiwiki-transition, but that copy doesn't have to be optimal or support diff --git a/doc/todo/source_link.mdwn b/doc/todo/source_link.mdwn index dfc2766cc..cf3e69487 100644 --- a/doc/todo/source_link.mdwn +++ b/doc/todo/source_link.mdwn @@ -11,8 +11,6 @@ All of this code is licensed under the GPLv2+. -- [[Will]] > by loading the index with IkiWiki::loadindex, like [[plugins/goto]] does? > --[[smcv]] -[[!template id=gitbranch branch=smcv/ready/getsource - author="[[Will]]/[[smcv]]"]] [[done]] >> I've applied the patch below in a git branch, fixed my earlier criticism, -- cgit v1.2.3 From 86ddfb9b8f24bba9e2d98ccf4fbc9aad268eda03 Mon Sep 17 00:00:00 2001 From: blahgrad Date: Tue, 1 Sep 2009 10:17:26 -0400 Subject: test --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 96b880b34..9009df305 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -47,7 +47,7 @@ Here's another one with *emphasised* text. > > This is nested blockquote. > >> Without a space works too. ->>> to three levels +>>> to three levels of [term papers](http://www.superiorpapers.com/) > > Back to the first level. -- cgit v1.2.3 From ccb1239d88803e07c590d2a69a0a26977d9c1bc8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Sep 2009 12:32:39 -0400 Subject: typo --- doc/tips/upgrade_to_3.0.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/upgrade_to_3.0.mdwn b/doc/tips/upgrade_to_3.0.mdwn index d22813bf2..05b6d6fbd 100644 --- a/doc/tips/upgrade_to_3.0.mdwn +++ b/doc/tips/upgrade_to_3.0.mdwn @@ -45,7 +45,7 @@ contain the above, then run `ikiwiki-transition prefix_directives your.setup` ## GlobLists In 3.0, the old "GlobList" syntax for [[PageSpecs|ikiwiki/PageSpec]] is no -longer supported. A GlobList contains multiple term, but does not separate +longer supported. A GlobList contains multiple terms, but does not separate them with "and" or "or": sandbox !*/Discussion -- cgit v1.2.3 From 38b331b57e096426106667f96b09f322634ef584 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Sep 2009 13:05:32 -0400 Subject: Revert spam --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 9009df305..96b880b34 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -47,7 +47,7 @@ Here's another one with *emphasised* text. > > This is nested blockquote. > >> Without a space works too. ->>> to three levels of [term papers](http://www.superiorpapers.com/) +>>> to three levels > > Back to the first level. -- cgit v1.2.3 From bf81cf9ed203bda4c37338cc87250ca843dc4afe Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Wed, 2 Sep 2009 01:21:01 -0400 Subject: Add link to my git repository --- doc/users/Will.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/users/Will.mdwn b/doc/users/Will.mdwn index 9c46edc69..043203dc3 100644 --- a/doc/users/Will.mdwn +++ b/doc/users/Will.mdwn @@ -4,6 +4,8 @@ Lately I've been using Ikiwiki for other things and seem to be scratching a few I generally use my [[ikiwiki/openid]] login when editing here: +I have a git repository for some of my IkiWiki code: . + Generic License Grant ----------------- -- cgit v1.2.3 From 4026650c8751f29890692f10833dae2b200cfc78 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Sep 2009 15:10:13 -0400 Subject: add will's git repo --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 008f109df..16af30584 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -49,6 +49,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[chrysn]] `git://github.com/github076986099/ikiwiki.git` * [[simonraven]] `git://github.com/kjikaqawej/ikiwiki-simon.git` * [[schmonz]] `git://github.com/schmonz/ikiwiki.git` +* [[will]] `http://www.cse.unsw.edu.au/~willu/ikiwiki.git` ## branches -- cgit v1.2.3 From 6fe3c6bb5f34dca6fc23ba910a9d9a583da9f4c9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Sep 2009 16:10:57 -0400 Subject: ruther review --- doc/plugins/contrib/cvs/discussion.mdwn | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index e142452d0..b5f03ac6f 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -93,3 +93,32 @@ the "cvs add " call and avoid doing anything in that case? >>> if a configured post-commit hook is missing, and it seems fine, >>> probably also thanks to IPC::Cmd. >>> --[[schmonz]] + +---- + + +Further review.. --[[Joey]] + +I don't understand what `cvs_shquote_commit` is +trying to do with the test message, but it seems +highly likely to be insecure; I never trust anything +that relies on safely quoting user input passed to the shell. + +(As an aside, `shell_quote` can die on certian inputs.) + +Seems to me that, if `IPC::Cmd` exposes input to the shell +(which I have not verified but its docs don't specify; a bad sign) +you chose the wrong tool and ended up doing down the wrong +route, dragging in shell quoting problems and fixes. Since you +chose to use `IPC::Cmd` just because you wanted to shut +up CVS stderr, my suggestion would be to use plain `system` +to run the command, with stderr temporarily sent to /dev/null: + + open(my $savederr, ">&STDERR"); + open(STDERR, ">", "/dev/null"); + my $ret=system("cvs", "-Q", @_); + open(STDERR, ">$savederr"); + +`cvs_runcvs` should not take an array reference. It's +usual for this type of function to take a list of parameters +to pass to the command. -- cgit v1.2.3 From 4ded213254928f6190cfe43ce6bf4e1cb9093a8f Mon Sep 17 00:00:00 2001 From: "http://oscarjacho.myopenid.com/" Date: Wed, 2 Sep 2009 17:17:15 -0400 Subject: Added idea on wiki based requirements management tool --- .../ikiwiki_as_a_requirements_management_tool.mdwn | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn (limited to 'doc') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn new file mode 100644 index 000000000..083878aef --- /dev/null +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn @@ -0,0 +1,95 @@ +[[!template id=note text="**Table of contents** [[!toc ]]"]] + +Introduction +------------ +At work textual requirements and traceability are daily use terms, often used as contracts with clients or among stakeholders, but at the moment the only way we specify requirements is via a word processor, and traceability is managed manually (ouch!) unless we use a commercial UML (Unified Modeling Language) tool that handles office files, an also allows traceability from design, code and test artifacts. But functionality of that tool is less than basic for requirements. + +We are considering the use of a specific requirements management tool, but the problem and something that gets me really frustrated is the extremely expensive price of the licenses of the "de facto" commercial tools we should use. One floating license for both tools (requirements management and modeling) can go beyond $20,000. Of course we can purchase cheaper ones, but I'm tired of this licensing nightmare of worrying about how many licenses are being used, praying not to exceed the limit or restarting a dead license server. We pay companies to not trust us. Taking a look at the FLOSS world doesn't seem to add any reasonable alternative. + +These are the raw high level features of the tool I'd like to use: + + * Requirements edition + * Requirements attributes edition + * Traceability: edition, coverage analysis and navigation + * External traceability: from requirements in one document/module to requirements in other one (eg: software requirements tracing to system requirements). Note: a set of requirements will be called "module" hereafter in this page. + * Requirements identifiers management + * Requirements history and diff/blame + * Team work + * Easy integration with other software lifecycle tools: modeling (eg. BOUML), project management (eg. Trac) + * Support for other formats such as HTML, office... + * Filtering and searching + * Export facilities to create standards compliant documentation. + +Initial idea was to develop a simple web solution using XHTML files. These files would be created in a web broser with existing WYSIWIM editors and store all the stuff in Subversion. All requirements would be stored at the same level (no hierarchies among requirements of the same module) and atomically accessible via a simple web browser. No server side programming would be needed to read requirements. Also special XHTML files (let's call it "views") would be necessary to group requirements hierarchically in a requirements document fashion, using xinclude. + +When I first played with ikiwiki I was so happy that many of the ideas I worked on were already in use in this marvelous piece of software, specially the decision to use well-known RCS software to manage history instead of reinventing the wheel, opening also one interesting feature: off-line edition. Other similarity was the absence of special processing for read-only navigation. + +So, let's now take all the features above and describe how to make them real using ikiwiki and some simple conventions. Some features would need new functionality and improvement, I'd really appreciate additional ideas on how to better get to the point. + +Requirements edition +-------------------- +Suppose that all requirements would reside under a concrete folder. We will call it "reqs", and under "reqs" we add as folders as requirements modules we want to use for a system called "foo" (eg. "foo_sss" for system requirements, "foo_srs" for software requirements...). Index file for each document shall be a page summarizing the module: number of requirements, basic coverage information... Other similar pages under the "views" folder could be used in order to have different sets of requirements including additional stuff: introduction, document identification, etc... The rest of the files - actually requirements - shall be markdown files. So editing a requirement would be as simple as adding a page to the wiki. + +To create the summary and views, just [[ikiwiki/directive/inline]] and [[ikiwiki/directive/pagecount]] directives could provide nice pages. The uncomfortable part is having to use many [[pagespecs|ikiwiki/PageSpec]] to create the whole views, but it actually shoud work. One possible workaround would be an external tool to handle this and create directives automatically or graphically. + +Requirements attributes +----------------------- +There are lots of useful data to associate to a requirement. Eg: + + * If it is traceable or not + * Its criticality level + * Its priority + * If it is funtional or not + +How to implement this? Using [[ikiwiki/directive/meta]] could be a solution, not tried yet, I'd rather keep requirements content alone. Storing this information in SVN it is easy, although ikiwiki does not provide a way to do it it would imply really little effort. The requirement in itself is the content of the file; attributes are stored as key-value pairs in the file's properties. AFAIK this is a feature available only in SVN, although git has something similar (gitattributes) although path based, but anyway whichever RCS is used, a ".properties" file could be created always when a requirement file is created. + +Traceability: edition, coverage analysis and navigation +-------------------------------------------------------- +This is the most important feature of a requirements engineering tool. How to do this with ikiwiki? There are some ways, from extremely simple ones to more sophisticated: + + * One simple solution: Links. Just link from one requirement to another one to create a traceable directional connection + * One harder: file attributes (see section about requirements just above) + +For coverage analysis , using [/ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [/ikiwiki/directive/linkmap] directive can show traceability information graphically. + +Navigating among requirements needs... Nothing!!! Just follow the links of referring pages that ikiwiki adds by default. + +External traceability +--------------------- +Being just different folders under the wiki, external traceability is as easy as internal. + +Requirements identifiers management +----------------------------------- +Another useful convention: requirement identifier shall be the name of the requirements file. In ikiwiki page title is the same as requirement Id. No trouble, it works. I personally prefer to keep title as page title and create a short auto-increasing numeric codes with prefixes and/or suffixes as file name (eg. SRS_FOO_0001, SSS_FOO_002), hope to have somethig running soon. + +Requirements history and diff/blame +----------------------------------- +Out of the box! And really much more useful than average diffing components of requirement management tools. There are plenty online front ends to use and for offline work tools like meld are awesome. + +Team work +--------- +Also no need to do anything, RCS software does it all. Also for experienced users merging and conflict solving can provide much more practical solutions (most requirements management tools work blocking). + +Easy integration with other software lifecycle tools +---------------------------------------------------- +Modeling tools: as a general rule, store model elements in the most atomic parts: classes, enums, actors, use cases... and use again file attributes to store traceability information. Other way is transforming files representing these atomic model parts in independent mdwn files under, for example, a "mdl" folder + +Trac integration is so simple... As simple as any PM tool that acceses the same RCS as ikiwiki does. Diffing, blaming, even navigating directly to ikiwiki generated pages. Integration of a ticketing system will give awesome power to all the team. + +Support for other formats +------------------------- +Out of the box, at least for wiki and mathematical formats, and creating additional ones shouldn't be so difficult. + +Filtering and searching +----------------------- +Look that box in the top right corner? + +Export facilities +----------------- +Views with custom styles and html conversion tools would be enough for most purposes. + +That's all! + +One funny thing: our "de facto future" requirements management tool, after years of research included some years ago a really nice feature: a Discussion tag per each requirement... See this in ikiwiki? Again out of the box!!! + +Comments are really welcome!!! -- cgit v1.2.3 From 086b90c313820b91596f07ed2a05671e321c6f98 Mon Sep 17 00:00:00 2001 From: "http://oscarjacho.myopenid.com/" Date: Wed, 2 Sep 2009 17:23:02 -0400 Subject: Minor changes --- doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn index 083878aef..17be5b9b2 100644 --- a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn @@ -50,7 +50,7 @@ This is the most important feature of a requirements engineering tool. How to do * One simple solution: Links. Just link from one requirement to another one to create a traceable directional connection * One harder: file attributes (see section about requirements just above) -For coverage analysis , using [/ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [/ikiwiki/directive/linkmap] directive can show traceability information graphically. +For coverage analysis , using [ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [ikiwiki/directive/linkmap] directive can show traceability information graphically. Navigating among requirements needs... Nothing!!! Just follow the links of referring pages that ikiwiki adds by default. -- cgit v1.2.3 From dd96853fe36102e512dea69d06514786cd9a96df Mon Sep 17 00:00:00 2001 From: "http://oscarjacho.myopenid.com/" Date: Wed, 2 Sep 2009 17:24:47 -0400 Subject: Minor changes --- doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn index 17be5b9b2..6bef2619e 100644 --- a/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool.mdwn @@ -50,7 +50,7 @@ This is the most important feature of a requirements engineering tool. How to do * One simple solution: Links. Just link from one requirement to another one to create a traceable directional connection * One harder: file attributes (see section about requirements just above) -For coverage analysis , using [ikiwiki/directive/pagecount] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [ikiwiki/directive/linkmap] directive can show traceability information graphically. +For coverage analysis , using [[ikiwiki/directive/pagecount]] is the perfect solution to summarize and show covered and uncovered requirements. We could add several pages per module - probably using template pages- with ready made coverage analysis reports... Wow!!! [[ikiwiki/directive/linkmap]] directive can show traceability information graphically. Navigating among requirements needs... Nothing!!! Just follow the links of referring pages that ikiwiki adds by default. -- cgit v1.2.3 From 70c9d175b56c3d7a878b8bd47eeaef5cec876c8b Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Thu, 3 Sep 2009 04:56:35 -0400 Subject: Using tags or links to represent attributes --- .../discussion.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn (limited to 'doc') diff --git a/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn b/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn new file mode 100644 index 000000000..94f0f8b4b --- /dev/null +++ b/doc/tips/ikiwiki_as_a_requirements_management_tool/discussion.mdwn @@ -0,0 +1,18 @@ +How about using tags/links to associate attributes with requirements? +This could be as simple as adding a link, fo e.g. : + + * If it is traceable or not + + \[[attributes/traceable]] + + \[[attributes/untraceable]] + * Its criticality level + + \[[attributes/level/critical]] + + \[[attributes/level/important]] + + etc. + * Its priority + + \[[attributes/priority/low]] + + \[[attributes/priority/high]] + * If it is functional or not + + \[[attributes/functional]] + + \[[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.). -- cgit v1.2.3 From f582457ea04a6ce66a2c54ec0731e2569aa30d3f Mon Sep 17 00:00:00 2001 From: bremner Date: Thu, 3 Sep 2009 08:18:27 -0400 Subject: --- doc/plugins/contrib/mailbox/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/mailbox/discussion.mdwn b/doc/plugins/contrib/mailbox/discussion.mdwn index 00fb0c05f..9520fdd70 100644 --- a/doc/plugins/contrib/mailbox/discussion.mdwn +++ b/doc/plugins/contrib/mailbox/discussion.mdwn @@ -3,3 +3,6 @@ For some reason, `git fetch` from http://pivot.cs.unb.ca/git/ikimailbox.git/ didn't work very smoothly for me: it hung, and I had to restart it 3 times before the download was complete. I'm writing this just to let you know that there might be some problems with such connections to your http-server. --Ivan Z. +> I can't replicate this (two months later!) +> I can suggest trying the git:// url for download if you can. +> Also, if you really want to get my attention, send me email [[DavidBremner]] -- cgit v1.2.3 From 11ed30b5a8cf21131456697b001e089208bb19ca Mon Sep 17 00:00:00 2001 From: "http://www.tychoish.com/" Date: Thu, 3 Sep 2009 22:00:29 -0400 Subject: notes on using gitosis and ikiwiki --- ...ki__44___gitosis_and_apache2_in_Debian_Sid.mdwn | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn b/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn index fa8b5010e..b8e28e0a3 100644 --- a/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn +++ b/doc/forum/multi-user_setup_of_ikiwiki__44___gitosis_and_apache2_in_Debian_Sid.mdwn @@ -65,3 +65,32 @@ Could you please enlighten me. It should be possible seeing for example this sit Thanks in advance, --[[PaulePanter]] + +--- + +## Current Working Notes + +I've spent a little time getting this working and I wanted to share my notes on this, for those that come after me. + +### My Setup + +- Debian Lenny + +- Gitosis (hand compiled, for no good reason, but it's the same version as in the repository) + +- Ikiwiki 3.12 installed using packages from Sid + +### What Works + +- Everything needs to be chowned git:git (or gitosis:gitosis) by whatever gitosis runs with. This includes: + - the bare repository (as always) + - the srcdir + - the destdir + +- Ikiwiki needs to run in gitosis' group (eg. git in my case, but probably gitosis in yours) + +- ikiwiki.cgi needs be set with the wrapper mode 6755. + +-- [[tychoish]] + + -- cgit v1.2.3 From ffd2bd1eed1ab1ed88b898907b0dbbe8e4a70a67 Mon Sep 17 00:00:00 2001 From: "http://www.tychoish.com/" Date: Thu, 3 Sep 2009 22:46:06 -0400 Subject: about page update for tycho/sam --- doc/users/tychoish.mdwn | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/users/tychoish.mdwn b/doc/users/tychoish.mdwn index 3439afdb3..75b285e4a 100644 --- a/doc/users/tychoish.mdwn +++ b/doc/users/tychoish.mdwn @@ -1,5 +1,10 @@ -I'm [tycho](http://www.tychoish.com/). +I'm Sam Kleinman ([tychoish](http://www.tychoish.com/)), and I use ikiwiki. -I use ikiwiki *a lot* on my local machine to organize thoughts, stage writing projects, and collect information. It's a great thing for me. Someday I'll probably get around to using it to powersome sort of collaborative fiction project. Someday. +I used to use ikiwiki a bunch, in a purely local setup, for various projects and personal note taking of various kinds. I've since switched to using [orgmode](http://www.orgmode.org) and a number of just regular old git repositories with some textfiles in them, which seems to work just as well for my particular use case. -Talk to you soon. +Currently, I'm using ikiwiki on the [cyborg institute wiki](http://www.cyborginstitute.com/wiki/) and I'm working on helping someone develop a collaborative fiction project at the [critical futures wiki](http://www.criticalfutures.com/wiki/)... and I'm thinking about other projects, but nothing that exists enough to mention here. + +I hang out in #ikiwiki on oftc, and I'm working on getting some of my templates in order to share with you all. Soon. For sure. + +Cheers, +tychoish -- cgit v1.2.3 From d5965f65af28174bf0b5659efe44053cb34a1fbb Mon Sep 17 00:00:00 2001 From: "http://hostmaster.blogspot.com/" Date: Fri, 4 Sep 2009 07:58:39 -0400 Subject: --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 96b880b34..c6e851d39 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,5 +1,6 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). +Тыц тыц ---- 2009/7/13 Monday Blue...\\ While working on [[http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?p=27199|[97] Phpbb 與 Dokuwiki 之間的往來]] (External Link to //http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?p=27199// not working?), surf Internet for Wikis supporting //Creole V1.0//, found this site. -- cgit v1.2.3 From 4c4c53c2923be93381eca1c3436ca6933c54b149 Mon Sep 17 00:00:00 2001 From: "http://ki.lya.online.fr/" Date: Fri, 4 Sep 2009 12:06:26 -0400 Subject: --- doc/examples/blog/posts/first__95__post.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/examples/blog/posts/first__95__post.mdwn (limited to 'doc') diff --git a/doc/examples/blog/posts/first__95__post.mdwn b/doc/examples/blog/posts/first__95__post.mdwn new file mode 100644 index 000000000..b54cb8f92 --- /dev/null +++ b/doc/examples/blog/posts/first__95__post.mdwn @@ -0,0 +1 @@ +This is just a test -- cgit v1.2.3 From 93bd5932ebe3b64bfed75666ba1db59bc9ad494e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 4 Sep 2009 12:42:59 -0400 Subject: Remove dup first post This reverts commit 4c4c53c2923be93381eca1c3436ca6933c54b149. --- doc/examples/blog/posts/first__95__post.mdwn | 1 - 1 file changed, 1 deletion(-) delete mode 100644 doc/examples/blog/posts/first__95__post.mdwn (limited to 'doc') diff --git a/doc/examples/blog/posts/first__95__post.mdwn b/doc/examples/blog/posts/first__95__post.mdwn deleted file mode 100644 index b54cb8f92..000000000 --- a/doc/examples/blog/posts/first__95__post.mdwn +++ /dev/null @@ -1 +0,0 @@ -This is just a test -- cgit v1.2.3 From 21239db15685112254875f546e1a74e86051a933 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 4 Sep 2009 14:53:34 -0400 Subject: raking the sandbox cleaN --- doc/sandbox.mdwn | 127 --------------------- doc/sandbox/Blagging_is_cool.mdwn | 6 - doc/sandbox/Bleep.mdwn | 3 - ...I_hate_making_new_blog_entries_-_sometimes.wiki | 25 ---- ..._33____33____33__1__33__1__33____33__1five.html | 31 ----- doc/sandbox/Test:_with_a_colon_in_its_name.mdwn | 1 - doc/sandbox/Teximg.mdwn | 2 - doc/sandbox/Try_some_math_formulas.mdwn | 6 - doc/sandbox/bar.mdwn | 1 - doc/sandbox/blech.mdwn | 1 - doc/sandbox/castle/discussion/jon_tests_too.mdwn | 3 - doc/sandbox/castle/discussion/test_comment.mdwn | 1 - doc/sandbox/check_openID.mdwn | 1 - doc/sandbox/discussion.mdwn | 6 - doc/sandbox/foo.mdwn | 1 - doc/sandbox/foobak.mdwn | 1 - doc/sandbox/hello.mdwn | 1 - .../ikiwiki_flexibility_makes_me_dream.mdwn | 5 - .../discussion.mdwn | 1 - doc/sandbox/test.mdwn | 1 - doc/sandbox/test2.mdwn | 1 - doc/sandbox/test_nested_inlines.mdwn | 3 - doc/sandbox/test_pi.mdwn | 1 - doc/sandbox/test_post.mdwn | 1 - doc/sandbox/testpage.mdwn | 1 - doc/sandbox/testsubpage.mdwn | 3 - doc/sandbox/this_is_pretty_cool.mdwn | 1 - "doc/sandbox/\355\225\234\352\270\200.mdwn" | 1 - ...0\200\355\216\230\354\235\264\354\247\200.mdwn" | 2 - 29 files changed, 238 deletions(-) delete mode 100644 doc/sandbox/Blagging_is_cool.mdwn delete mode 100644 doc/sandbox/Bleep.mdwn delete mode 100644 doc/sandbox/I_hate_making_new_blog_entries_-_sometimes.wiki delete mode 100644 doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html delete mode 100644 doc/sandbox/Test:_with_a_colon_in_its_name.mdwn delete mode 100644 doc/sandbox/Teximg.mdwn delete mode 100644 doc/sandbox/Try_some_math_formulas.mdwn delete mode 100644 doc/sandbox/bar.mdwn delete mode 100644 doc/sandbox/blech.mdwn delete mode 100644 doc/sandbox/castle/discussion/jon_tests_too.mdwn delete mode 100644 doc/sandbox/castle/discussion/test_comment.mdwn delete mode 100644 doc/sandbox/check_openID.mdwn delete mode 100644 doc/sandbox/discussion.mdwn delete mode 100644 doc/sandbox/foo.mdwn delete mode 100644 doc/sandbox/foobak.mdwn delete mode 100644 doc/sandbox/hello.mdwn delete mode 100644 doc/sandbox/ikiwiki_flexibility_makes_me_dream.mdwn delete mode 100644 doc/sandbox/ikiwiki_flexibility_makes_me_dream/discussion.mdwn delete mode 100644 doc/sandbox/test.mdwn delete mode 100644 doc/sandbox/test2.mdwn delete mode 100644 doc/sandbox/test_nested_inlines.mdwn delete mode 100644 doc/sandbox/test_pi.mdwn delete mode 100644 doc/sandbox/test_post.mdwn delete mode 100644 doc/sandbox/testpage.mdwn delete mode 100644 doc/sandbox/testsubpage.mdwn delete mode 100644 doc/sandbox/this_is_pretty_cool.mdwn delete mode 100644 "doc/sandbox/\355\225\234\352\270\200.mdwn" delete mode 100644 "doc/sandbox/\355\225\234\352\270\200\355\216\230\354\235\264\354\247\200.mdwn" (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index c6e851d39..8b594043e 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,40 +1,7 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). -Тыц тыц ----- -2009/7/13 Monday Blue...\\ -While working on [[http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?p=27199|[97] Phpbb 與 Dokuwiki 之間的往來]] (External Link to //http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?p=27199// not working?), surf Internet for Wikis supporting //Creole V1.0//, found this site. - -* I thought that creole markup is used by ikiwiki... -* Thought about using //SVN/CVS// server, however with different idea -* Kinda curious why **Tcl** does not show her face in this Wiki arena -* It looks like that I was wrong, from Wikipedia Creole page it mention that ikiwiki is also adopting Creole markup. - ---- - -Guten Morgen aus Deutschland. Wir mögen Umläuter (ich weiß, der Plural ist falsch, aber dafür hat er einen). Die sind heutzutage kein Ärgernis mehr. - -&#x263a; becomes ☺ - - - ---- -I try to have a discussion page !!! ----- - -Testing OpenID some more.. - -test more test -[[中文显示]] - Here's a paragraph. -The following code block is pre-formatted: - - Testing what - pre-formatted code blocks - look like. - Here's another one with *emphasised* text. # Header @@ -60,10 +27,6 @@ Numbered list 1. And another.. 1. foo 2. bar - 3. baz - 4. qux - 5. quux - 6. wibble Bulleted list @@ -72,9 +35,6 @@ Bulleted list * item * one * two - * three - * four - * five ---- @@ -83,102 +43,15 @@ Bulleted list ---- -The haiku will change after every save, mind you. - ## Different sorts of links: * [[Features]] * [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] * * [GNU](http://www.gnu.org/) -* [Email](mailto:noone@invalid) -* [![ikiwiki logo](http://ikiwiki.info/logo/ikiwiki.png)](http://ikiwiki.info) -*
plain old html link -* [[foo]] ----- This SandBox is also a [[blog]]! [[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] - --------- - -This gives an example of inline code: `tar | netcat` is a nice way to transfer bulk files over the net - -But, of course, rsync is better. - ----- - -Let's see what happens... ~~ - -#中文标题一 -##中文标题二 -###中文标题三 -... -######中文标题六 - -###正文: - -君不见,黄河之水天上来,奔流到海不复回。 - -君不见,高堂明镜悲白发,朝如青丝暮成雪。 - -人生得意须尽欢,莫使金樽空对月。 - -天生我材必有用,千金散尽还复来。 - -###列表: - -* 天空 - - 1. 蓝色的 - 2. 好高啊 - -* 海洋 - - 1. 有鱼 - - * 鲸鱼 - * 鲨鱼 - - -* 大地 - -###链接: - -[谷歌](http://www.google.com) - -###引用: - -> 一级引用 -> -> 一级引用 -> -> > 二级引用 -> ->> 没有空格也可以 ->>> 三级引用 -> -> 回到一级引用 - - ----- - - -testing - --- -[[!toc levels=2]] - -[[Mamma Mia]] - ----- - -[[!format c """ -void main () { - printf("hello, world!"); -} -"""]] - - diff --git a/doc/sandbox/Blagging_is_cool.mdwn b/doc/sandbox/Blagging_is_cool.mdwn deleted file mode 100644 index 16aafa304..000000000 --- a/doc/sandbox/Blagging_is_cool.mdwn +++ /dev/null @@ -1,6 +0,0 @@ -This is a testing Blag-Entry. -/me loves blagging. - - * Entry one - * entry two - diff --git a/doc/sandbox/Bleep.mdwn b/doc/sandbox/Bleep.mdwn deleted file mode 100644 index 316f7291c..000000000 --- a/doc/sandbox/Bleep.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -Just a test page ... - -... to see what happens. diff --git a/doc/sandbox/I_hate_making_new_blog_entries_-_sometimes.wiki b/doc/sandbox/I_hate_making_new_blog_entries_-_sometimes.wiki deleted file mode 100644 index 54914bb0b..000000000 --- a/doc/sandbox/I_hate_making_new_blog_entries_-_sometimes.wiki +++ /dev/null @@ -1,25 +0,0 @@ -!!!Heading Three - -Itemized -* list -* of -* things - -or not -1. mom -1. hi -1. there - - - -!!!Heading Three - -Itemized -* list -* of -* things - -or not -1. mom -1. hi -1. there diff --git a/doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html b/doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html deleted file mode 100644 index fc1757d6e..000000000 --- a/doc/sandbox/Omgwtf_a_blof_post__33____33____33____33____33__1__33__1__33__11111__33____33____33__1__33__1__33____33__1five.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - a - + - - b - - - 2 - - - - - - - - x - + - y - - - - i - - - -
-test testT.

test

-øđ diff --git a/doc/sandbox/Test:_with_a_colon_in_its_name.mdwn b/doc/sandbox/Test:_with_a_colon_in_its_name.mdwn deleted file mode 100644 index b91d7cb03..000000000 --- a/doc/sandbox/Test:_with_a_colon_in_its_name.mdwn +++ /dev/null @@ -1 +0,0 @@ -what happens? diff --git a/doc/sandbox/Teximg.mdwn b/doc/sandbox/Teximg.mdwn deleted file mode 100644 index 8483c1489..000000000 --- a/doc/sandbox/Teximg.mdwn +++ /dev/null @@ -1,2 +0,0 @@ -[[!teximg code="E = - \frac{Z^2 \cdot \mu \cdot e^4}{32\pi^2 \epsilon_0^2 \hbar^2 n^2}" ]] - diff --git a/doc/sandbox/Try_some_math_formulas.mdwn b/doc/sandbox/Try_some_math_formulas.mdwn deleted file mode 100644 index 6c0fe6de5..000000000 --- a/doc/sandbox/Try_some_math_formulas.mdwn +++ /dev/null @@ -1,6 +0,0 @@ -# Title with $\TeX$ - -* How about some math? -* $\frac{1}{2} = \frac{3}{6}$ - -and teximg? [[!teximg code="\frac{1}{2}"]] diff --git a/doc/sandbox/bar.mdwn b/doc/sandbox/bar.mdwn deleted file mode 100644 index 3163ac12e..000000000 --- a/doc/sandbox/bar.mdwn +++ /dev/null @@ -1 +0,0 @@ -foo? diff --git a/doc/sandbox/blech.mdwn b/doc/sandbox/blech.mdwn deleted file mode 100644 index 1ec2727fd..000000000 --- a/doc/sandbox/blech.mdwn +++ /dev/null @@ -1 +0,0 @@ -This just a test, but I am impressed. diff --git a/doc/sandbox/castle/discussion/jon_tests_too.mdwn b/doc/sandbox/castle/discussion/jon_tests_too.mdwn deleted file mode 100644 index bc051b008..000000000 --- a/doc/sandbox/castle/discussion/jon_tests_too.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -I recall testing this too, but I'm not sure where the test went. Let's try again. -- [[users/Jon]] - -Context: [[todo/discussion_page_as_blog/discussion/castle]] diff --git a/doc/sandbox/castle/discussion/test_comment.mdwn b/doc/sandbox/castle/discussion/test_comment.mdwn deleted file mode 100644 index 4dd2cb0bf..000000000 --- a/doc/sandbox/castle/discussion/test_comment.mdwn +++ /dev/null @@ -1 +0,0 @@ -I like this idea of using the blog feature to handle comments. Let's see how it works. diff --git a/doc/sandbox/check_openID.mdwn b/doc/sandbox/check_openID.mdwn deleted file mode 100644 index 15363c985..000000000 --- a/doc/sandbox/check_openID.mdwn +++ /dev/null @@ -1 +0,0 @@ -wibble diff --git a/doc/sandbox/discussion.mdwn b/doc/sandbox/discussion.mdwn deleted file mode 100644 index d8c565617..000000000 --- a/doc/sandbox/discussion.mdwn +++ /dev/null @@ -1,6 +0,0 @@ -normally a sandbow doesn't have a discussion page -but it's a sandbox - -- -little light -ikiwiki looks great diff --git a/doc/sandbox/foo.mdwn b/doc/sandbox/foo.mdwn deleted file mode 100644 index e3ec71332..000000000 --- a/doc/sandbox/foo.mdwn +++ /dev/null @@ -1 +0,0 @@ -a test blog in the ikiwiki sandbox! diff --git a/doc/sandbox/foobak.mdwn b/doc/sandbox/foobak.mdwn deleted file mode 100644 index c0b526f73..000000000 --- a/doc/sandbox/foobak.mdwn +++ /dev/null @@ -1 +0,0 @@ -Foobaka bakfoo. diff --git a/doc/sandbox/hello.mdwn b/doc/sandbox/hello.mdwn deleted file mode 100644 index a0e2270db..000000000 --- a/doc/sandbox/hello.mdwn +++ /dev/null @@ -1 +0,0 @@ -hehe hohoho diff --git a/doc/sandbox/ikiwiki_flexibility_makes_me_dream.mdwn b/doc/sandbox/ikiwiki_flexibility_makes_me_dream.mdwn deleted file mode 100644 index 63642c71c..000000000 --- a/doc/sandbox/ikiwiki_flexibility_makes_me_dream.mdwn +++ /dev/null @@ -1,5 +0,0 @@ -##Why? -* Because I can do things like this -* Because I can use my favourite SCM, as the rest of my project elements (that's the only reason I complain about Trac...) -* Because the perfect tool does not exist, but custommizing very simple approaches like this I can build my own -* Because I'm just adding a new topic to see how diff works diff --git a/doc/sandbox/ikiwiki_flexibility_makes_me_dream/discussion.mdwn b/doc/sandbox/ikiwiki_flexibility_makes_me_dream/discussion.mdwn deleted file mode 100644 index 8b604cb9f..000000000 --- a/doc/sandbox/ikiwiki_flexibility_makes_me_dream/discussion.mdwn +++ /dev/null @@ -1 +0,0 @@ -Perhaps diff --git a/doc/sandbox/test.mdwn b/doc/sandbox/test.mdwn deleted file mode 100644 index db20a2fbc..000000000 --- a/doc/sandbox/test.mdwn +++ /dev/null @@ -1 +0,0 @@ -testing my openid provider @ www.steve.org.uk diff --git a/doc/sandbox/test2.mdwn b/doc/sandbox/test2.mdwn deleted file mode 100644 index 3e50e68f3..000000000 --- a/doc/sandbox/test2.mdwn +++ /dev/null @@ -1 +0,0 @@ -this is test two, being pushed by [[tips/untrusted_git_push]]. diff --git a/doc/sandbox/test_nested_inlines.mdwn b/doc/sandbox/test_nested_inlines.mdwn deleted file mode 100644 index 0e6074fbd..000000000 --- a/doc/sandbox/test_nested_inlines.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -Testing nested inlines: - -[[!inline pages="sandbox/test_nested_inlines/* and !sandbox/test_nested_inlines/*/*" feeds="no"]] diff --git a/doc/sandbox/test_pi.mdwn b/doc/sandbox/test_pi.mdwn deleted file mode 100644 index 32b0e7f4c..000000000 --- a/doc/sandbox/test_pi.mdwn +++ /dev/null @@ -1 +0,0 @@ -I tried to make a page called **testπ** and it didn't work. So this is a page called **test pi**. diff --git a/doc/sandbox/test_post.mdwn b/doc/sandbox/test_post.mdwn deleted file mode 100644 index b687aa253..000000000 --- a/doc/sandbox/test_post.mdwn +++ /dev/null @@ -1 +0,0 @@ -hi mom! \ No newline at end of file diff --git a/doc/sandbox/testpage.mdwn b/doc/sandbox/testpage.mdwn deleted file mode 100644 index b9439ad02..000000000 --- a/doc/sandbox/testpage.mdwn +++ /dev/null @@ -1 +0,0 @@ -Test page content. diff --git a/doc/sandbox/testsubpage.mdwn b/doc/sandbox/testsubpage.mdwn deleted file mode 100644 index 3db7aaaab..000000000 --- a/doc/sandbox/testsubpage.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -# Test subpage - -This is a test subpage. Isn't that special? diff --git a/doc/sandbox/this_is_pretty_cool.mdwn b/doc/sandbox/this_is_pretty_cool.mdwn deleted file mode 100644 index 32b01f70f..000000000 --- a/doc/sandbox/this_is_pretty_cool.mdwn +++ /dev/null @@ -1 +0,0 @@ -I am very impressed. \ No newline at end of file diff --git "a/doc/sandbox/\355\225\234\352\270\200.mdwn" "b/doc/sandbox/\355\225\234\352\270\200.mdwn" deleted file mode 100644 index e0ba32639..000000000 --- "a/doc/sandbox/\355\225\234\352\270\200.mdwn" +++ /dev/null @@ -1 +0,0 @@ -~를 어떻게 할까~ diff --git "a/doc/sandbox/\355\225\234\352\270\200\355\216\230\354\235\264\354\247\200.mdwn" "b/doc/sandbox/\355\225\234\352\270\200\355\216\230\354\235\264\354\247\200.mdwn" deleted file mode 100644 index 4fac7976c..000000000 --- "a/doc/sandbox/\355\225\234\352\270\200\355\216\230\354\235\264\354\247\200.mdwn" +++ /dev/null @@ -1,2 +0,0 @@ - -Wow test -- cgit v1.2.3 From 127ed4d6c7a7d2cc518102757b7b4be49d20fce8 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Fri, 4 Sep 2009 15:08:48 -0500 Subject: no more IPC::Cmd or String::ShellQuote, huzzah --- doc/plugins/contrib/cvs.mdwn | 4 ++-- doc/plugins/contrib/cvs/discussion.mdwn | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 1c43fb272..fcf5b936f 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -5,8 +5,8 @@ This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions System]] as an [[rcs]]. ### Usage -7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan IPC::Cmd]], -[[!cpan String::ShellQuote]], [[!cpan File::ReadBackwards]], and +7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan +File::ReadBackwards]], and [cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. 7. Adjust CVS-related parameters in your setup file. diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index b5f03ac6f..1f0ce0102 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -122,3 +122,6 @@ to run the command, with stderr temporarily sent to /dev/null: `cvs_runcvs` should not take an array reference. It's usual for this type of function to take a list of parameters to pass to the command. + +> Thanks for reading carefully. I've tested your suggestions and +> applied them on my branch. --[[schmonz]] -- cgit v1.2.3 From a149d54fbf110000b3980bba87cac0e86dd03e07 Mon Sep 17 00:00:00 2001 From: "http://eric.shared.dre.am/" Date: Fri, 4 Sep 2009 19:17:14 -0400 Subject: --- ...e_link_target_search_all_paths_as_fallback.mdwn | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/todo/make_link_target_search_all_paths_as_fallback.mdwn (limited to 'doc') diff --git a/doc/todo/make_link_target_search_all_paths_as_fallback.mdwn b/doc/todo/make_link_target_search_all_paths_as_fallback.mdwn new file mode 100644 index 000000000..f971fd8e0 --- /dev/null +++ b/doc/todo/make_link_target_search_all_paths_as_fallback.mdwn @@ -0,0 +1,27 @@ +[[!tag wishlist]] + +## Idea + +After searching from the most local to the root for a wikilinkable page, descend into the tree of pages looking for a matching page. + +For example, if I link to \[\[Pastrami\]\] from /users/eric, the current behavior is to look for + + * /users/eric/pastrami + * /users/pastrami + * /users/eric/pastrami + +I'd like it to find /sandwiches/pastrami. + +## Issues + +I know this is a tougher problem, especially to scale efficiently. There is also not a clear ordering unless it is the recursive dictionary ordering (ie the order of a breadth-first search with natural ordering). It would probably require some sort of static lookup table keyed by pagename and yielding a path. This could be generated initially by a breadth-first search and then updated incrementally when pages are added/removed/renamed. In some ways a global might not be ideal, since one might argue that the link above should match /users/eric/sandwiches/pastrami before /sandwiches/pastrami. I guess you could put all matching paths in the lookup table and then evaluate the ordering at parse-time. + +## Motivation + +Since I often access my documents using a text editor, I find it useful to keep them ordered in a heirarchy, about 3 levels deep with a branching factor of perhaps 10. When linking though, I'd like the wiki to find the document for me, since I am lazy. + +Also, many of my wiki pages comprise the canonical local representation of some unique entity, for example I might have /software/ikiwiki. The nesting, however, is only to aid navigation, and shouldn't be considered as part of resource's name. + +## Alternatives + +If an alias could be specified in the page body (for example, /ikiwiki for /software/ikiwiki) which would then stand in for a regular page when searching, then the navigational convenience of folders could be preserved while selectively flattening the search namespace. -- cgit v1.2.3 From 507d8ace625317072bfed7925b516fe3c573a568 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Sep 2009 13:26:42 -0400 Subject: thoughts on translating the templates files --- doc/todo/l10n.mdwn | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/l10n.mdwn b/doc/todo/l10n.mdwn index fed3f63b6..a539f0424 100644 --- a/doc/todo/l10n.mdwn +++ b/doc/todo/l10n.mdwn @@ -14,6 +14,8 @@ and there is a po/ikiwiki.pot in the source that can be translated. ---- +## template i18n + From [[Recai]]: > Here is my initial work on ikiwiki l10n infrastructure (I'm sending it > before finalizing, there may be errors). @@ -64,9 +66,19 @@ Birisi[1], ki muhtemelen bu sizsiniz, [2] üzerindeki bulundu. Parola: -- ikiwiki [1] Parolayı isteyen kullanıcının ait IP adresi: [2] -> Looks like, tmpl_process3 cannot preserve line breaks in template files. -> For example, it processed the following template: - This could be easily worked around in tmpl_process3, but I wouldn't like to maintain a separate utility. +---- + +Another way to approach this would be to write a small program that outputs +the current set of templates. Now i18n of that program is trivial, +and it can be run once per language to generate localized templates. + +Then it's just a matter of installing the templates somewhere, and having +them be used when a different language is enabled. + +It would make sense to make the existing `locale` setting control which +templates are used. But the [[plugins/po]] plugin would probably want to do +something more, and use the actual language the page is written in. +--[[Joey]] -- cgit v1.2.3 From 8691bc006e16f17450423ef793f1e1a2626e2fe8 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" Date: Mon, 7 Sep 2009 05:53:50 -0400 Subject: Can't markup [[!table Error: ]] --- doc/plugins/table.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/table.mdwn b/doc/plugins/table.mdwn index 7b080acda..eb19323e6 100644 --- a/doc/plugins/table.mdwn +++ b/doc/plugins/table.mdwn @@ -6,3 +6,5 @@ It can build HTML tables from data in CSV (comma-separated values) or DSV (delimiter-separated values) format. It needs the perl module [[!cpan Text::CSV]] for the CSV data. + +If you see `[[!table\ Error: ]]` you probably need to `sudo apt-get install libtext-csv-perl`. -- cgit v1.2.3 From e95386504500492b55b9e00937f896334b13e240 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 7 Sep 2009 12:51:56 -0400 Subject: revert previous; with pkgsrc you'd need textproc/p5-Text-CSV, but let's not proliferate that sort of thing here --- doc/plugins/table.mdwn | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/table.mdwn b/doc/plugins/table.mdwn index eb19323e6..7b080acda 100644 --- a/doc/plugins/table.mdwn +++ b/doc/plugins/table.mdwn @@ -6,5 +6,3 @@ It can build HTML tables from data in CSV (comma-separated values) or DSV (delimiter-separated values) format. It needs the perl module [[!cpan Text::CSV]] for the CSV data. - -If you see `[[!table\ Error: ]]` you probably need to `sudo apt-get install libtext-csv-perl`. -- cgit v1.2.3 From ca329047207dd17c984ee975d51bcec7d079ff26 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Mon, 7 Sep 2009 12:54:24 -0400 Subject: move apt-get comment here --- doc/plugins/table/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/table/discussion.mdwn b/doc/plugins/table/discussion.mdwn index 16e5a5a56..99c7e059b 100644 --- a/doc/plugins/table/discussion.mdwn +++ b/doc/plugins/table/discussion.mdwn @@ -64,3 +64,7 @@ Do you like it? Can you implement the same in Ikiwiki? :) --[[Paweł|ptecza]] >> was written rather for simple usage. However cell alignment is very >> helpful feature, so I think the plugin should be able to do it. >> --[[Paweł|ptecza]] + +----- + +If you see `[[!table\ Error: ]]` you probably need to `sudo apt-get install libtext-csv-perl`. -- cgit v1.2.3 From 3813632a8fe8940622f9cb40d94dbbab7e3f4194 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 7 Sep 2009 13:47:34 -0400 Subject: comment --- doc/plugins/table/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/table/discussion.mdwn b/doc/plugins/table/discussion.mdwn index 99c7e059b..86572c935 100644 --- a/doc/plugins/table/discussion.mdwn +++ b/doc/plugins/table/discussion.mdwn @@ -68,3 +68,6 @@ Do you like it? Can you implement the same in Ikiwiki? :) --[[Paweł|ptecza]] ----- If you see `[[!table\ Error: ]]` you probably need to `sudo apt-get install libtext-csv-perl`. + +> Perhaps more helpfully, ikiwiki 3.1415926 fixes display of such errors to +> actualy include the error message. --[[Joey]] -- cgit v1.2.3 From 43176472636b3bc4c01fe159befaa03ecf5d9c73 Mon Sep 17 00:00:00 2001 From: "alicia.warner" Date: Tue, 8 Sep 2009 14:12:35 -0400 Subject: --- doc/roadmap.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 2f79f7978..62d25675e 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -76,3 +76,5 @@ backwards compatability. and Jamey Sharp; support for other wikis should fit into the same framework.) * [[TODO]], [[bugs]], ... + +Visit the link to get some related research papers. -- cgit v1.2.3 From f2e438c095adb9a53a6126f405011a3f67517343 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 14:16:19 -0400 Subject: Revert spam This reverts commit 43176472636b3bc4c01fe159befaa03ecf5d9c73. --- doc/roadmap.mdwn | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 62d25675e..2f79f7978 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -76,5 +76,3 @@ backwards compatability. and Jamey Sharp; support for other wikis should fit into the same framework.) * [[TODO]], [[bugs]], ... - -Visit the link to get some related research papers. -- cgit v1.2.3 From c1c933ca658d3babc50da4ade20eb083f1a9c122 Mon Sep 17 00:00:00 2001 From: WikiJeanHawkins Date: Tue, 8 Sep 2009 14:21:49 -0400 Subject: --- doc/plugins/openid.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/openid.mdwn b/doc/plugins/openid.mdwn index 91fc7cddc..02b611eb0 100644 --- a/doc/plugins/openid.mdwn +++ b/doc/plugins/openid.mdwn @@ -25,3 +25,5 @@ url. This plugin is enabled by default, but can be turned off if you want to only use some other form of authentication, such as [[passwordauth]]. + +For plugin dissertation or any other related [dissertation](http://www.bestdissertation.com), you may visit this page. -- cgit v1.2.3 From 6d170066e987137e5f6ff49849c452822df86cf4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 14:27:51 -0400 Subject: Revert spam This reverts commit c1c933ca658d3babc50da4ade20eb083f1a9c122. --- doc/plugins/openid.mdwn | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/openid.mdwn b/doc/plugins/openid.mdwn index 02b611eb0..91fc7cddc 100644 --- a/doc/plugins/openid.mdwn +++ b/doc/plugins/openid.mdwn @@ -25,5 +25,3 @@ url. This plugin is enabled by default, but can be turned off if you want to only use some other form of authentication, such as [[passwordauth]]. - -For plugin dissertation or any other related [dissertation](http://www.bestdissertation.com), you may visit this page. -- cgit v1.2.3 From 1f828d280a5085f2d9b0c69cbc0d6b4b1a40a105 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 14:38:57 -0400 Subject: update --- doc/plugins/po.mdwn | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 38b6b12cd..f3b70b5f7 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -317,27 +317,8 @@ text, or text in whatever single language ikiwiki is configured to "speak". Maybe there could be a way to switch ikiwiki to speaking another language when building a non-english page? Then the directives would get translated. -2 test suite failures --------------------- - -t/po is currently failing tests 57 and 59 (and I would like to release -soon..) --[[Joey]] - -> They are failing because of commit cdc3576c8d1e (po: do not inject -> custom bestlink function when `po_link_to` eq `default`). The test -> suite changes `$config{po_link_to}`, but the `checkconfig` hook is -> not re-run. I could manually run it when needed in the test-suite, -> but this would lead to this function being injected several times, -> and then `$origsubs{'bestlink'}` to be sometimes set to a wrong -> value, which would break other parts of the test-suite. The best -> solution I can think of (apart of reverting this commit or disabling -> these two tests) is to split the test-suite into 3 parts, depending -> on the `$config{po_link_to}` setting, either in 3 different `.t` -> files, or inside the existing one and completely reset the IkiWiki -> environment at the start of these parts... which I did not manage to -> achieve in the last 2 hours :/ --[[intrigeri]] - ->> I've reverted it. --[[Joey]] +(We also will need this in order to use translated templates, when they are +available.) Documentation ------------- -- cgit v1.2.3 From 629ff41d919c1427f99fe95c5a02cbeea1243b26 Mon Sep 17 00:00:00 2001 From: "alicia.warner" Date: Tue, 8 Sep 2009 14:58:37 -0400 Subject: --- doc/roadmap.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 2f79f7978..f924a1bc9 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -76,3 +76,6 @@ backwards compatability. and Jamey Sharp; support for other wikis should fit into the same framework.) * [[TODO]], [[bugs]], ... + + +Click the link to get additional information for research paper writing. -- cgit v1.2.3 From 064b507c534e8ed29f3ac4201300f76e32163697 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 15:02:06 -0400 Subject: Revert spam This reverts commit 629ff41d919c1427f99fe95c5a02cbeea1243b26. --- doc/roadmap.mdwn | 3 --- 1 file changed, 3 deletions(-) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index f924a1bc9..2f79f7978 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -76,6 +76,3 @@ backwards compatability. and Jamey Sharp; support for other wikis should fit into the same framework.) * [[TODO]], [[bugs]], ... - - -Click the link to get additional information for research paper writing. -- cgit v1.2.3 From 9c144163ea7f9fca3497becfaf50e4a1f2a8e242 Mon Sep 17 00:00:00 2001 From: "nicole.adams" Date: Tue, 8 Sep 2009 15:10:06 -0400 Subject: --- doc/roadmap.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 2f79f7978..ab8a6a742 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -76,3 +76,4 @@ backwards compatability. and Jamey Sharp; support for other wikis should fit into the same framework.) * [[TODO]], [[bugs]], ... +* Writing research papers for documentation purposes. -- cgit v1.2.3 From 55474f44d93ffb35f650ab8ba8b32f4478eba1c3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 15:17:39 -0400 Subject: Expand banned_users; it can now include PageSpecs, which allows banning by IP address. --- IkiWiki/CGI.pm | 28 +++++++++++++++++++++------- debian/changelog | 2 ++ doc/banned_users.mdwn | 8 +++++++- doc/todo/blocking_ip_ranges.mdwn | 3 +++ 4 files changed, 33 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index af58d7cb5..52cafade0 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -252,16 +252,30 @@ sub check_banned ($$) { my $q=shift; my $session=shift; + my $banned=0; my $name=$session->param("name"); - if (defined $name) { - if (grep { $name eq $_ } @{$config{banned_users}}) { - $session->delete(); - cgi_savesession($session); - cgi_custom_failure( - $q->header(-status => "403 Forbidden"), - gettext("You are banned.")); + if (defined $name && + grep { $name eq $_ } @{$config{banned_users}}) { + $banned=1; + } + + foreach my $b (@{$config{banned_users}}) { + if (pagespec_match("", $b, + ip => $ENV{REMOTE_ADDR}, + name => defined $name ? $name : "", + )) { + $banned=1; + last; } } + + if ($banned) { + $session->delete(); + cgi_savesession($session); + cgi_custom_failure( + $q->header(-status => "403 Forbidden"), + gettext("You are banned.")); + } } sub cgi_getsession ($) { diff --git a/debian/changelog b/debian/changelog index 6109a7012..86e8513f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ ikiwiki (3.14159265) UNRELEASED; urgency=low * Add French basewiki translation from the Debian French l10n team, including Philippe Batailler, Alexandre Dupas, and Steve Petruzzello. + * Expand banned_users; it can now include PageSpecs, which + allows banning by IP address. -- Joey Hess Wed, 02 Sep 2009 15:01:27 -0400 diff --git a/doc/banned_users.mdwn b/doc/banned_users.mdwn index d2bec90f0..c44f8c587 100644 --- a/doc/banned_users.mdwn +++ b/doc/banned_users.mdwn @@ -1,4 +1,10 @@ -Banned users can be configured in the setup file. +Banned users can be configured in the setup file via the `banned_users` +setting. This is a list of user names, or [[PageSpecs|ikiwiki/PageSpec]] +to ban. Using a PageSpec is useful to block an IP address. + +For example: + + banned_users => ['evilspammer', 'ip(192.168.1.1)'], If a banned user attempts to use the ikiwiki CGI, they will receive a 403 Forbidden webpage indicating they are banned. diff --git a/doc/todo/blocking_ip_ranges.mdwn b/doc/todo/blocking_ip_ranges.mdwn index 95026eef1..ac2344ece 100644 --- a/doc/todo/blocking_ip_ranges.mdwn +++ b/doc/todo/blocking_ip_ranges.mdwn @@ -2,3 +2,6 @@ Admins need the ability to block IP ranges. They can already ban users. See [[fileupload]] for a propsal that grew to encompass the potential to do this. + +[[done]] (well, there is no pagespec for IP ranges yet, but we can block +individual IPs) -- cgit v1.2.3 From c2ae7966cac1bf691fcf76afafdee4a03239a231 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 15:19:16 -0400 Subject: Revert spam. This spammer's IP has now been blocked. This reverts commit 9c144163ea7f9fca3497becfaf50e4a1f2a8e242. --- doc/roadmap.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index ab8a6a742..2f79f7978 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -76,4 +76,3 @@ backwards compatability. and Jamey Sharp; support for other wikis should fit into the same framework.) * [[TODO]], [[bugs]], ... -* Writing research papers for documentation purposes. -- cgit v1.2.3 From 2a99ebf2766a08f8d68a82255d1518ecac73ec84 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Sep 2009 17:27:37 -0400 Subject: underlay: Also allow configuring additional directories to search for template files in. --- IkiWiki.pm | 10 +++++++++- IkiWiki/Plugin/underlay.pm | 11 +++++++++-- debian/changelog | 2 ++ doc/plugins/underlay.mdwn | 8 +++++++- 4 files changed, 27 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 01898936f..2f11069c6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -150,6 +150,13 @@ sub getsetup () { safe => 0, # path rebuild => 1, }, + templatedirs => { + type => "internal", + default => [], + description => "additional directories containing template files", + safe => 0, + rebuild => 0, + }, underlaydir => { type => "string", default => "$installdir/share/ikiwiki/basewiki", @@ -1610,7 +1617,8 @@ sub saveindex () { sub template_file ($) { my $template=shift; - foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { + foreach my $dir ($config{templatedir}, @{$config{templatedirs}}, + "$installdir/share/ikiwiki/templates") { return "$dir/$template" if -e "$dir/$template"; } return; diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 380d418fb..c59935672 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -27,14 +27,21 @@ sub getsetup () { safe => 0, rebuild => 1, }, + add_templates => { + type => "string", + default => [], + description => "extra template directories to add", + advanced => 1, + safe => 0, + rebuild => 1, + }, } sub checkconfig () { - return unless exists $config{add_underlays}; - foreach my $dir (@{$config{add_underlays}}) { add_underlay($dir); } + push @{$config{templatedirs}}, @{$config{add_templates}}; } 1; diff --git a/debian/changelog b/debian/changelog index 86e8513f7..de165e4ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ikiwiki (3.14159265) UNRELEASED; urgency=low including Philippe Batailler, Alexandre Dupas, and Steve Petruzzello. * Expand banned_users; it can now include PageSpecs, which allows banning by IP address. + * underlay: Also allow configuring additional directories to search + for template files in. -- Joey Hess Wed, 02 Sep 2009 15:01:27 -0400 diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn index 09d096a6e..f7eafee7c 100644 --- a/doc/plugins/underlay.mdwn +++ b/doc/plugins/underlay.mdwn @@ -1,7 +1,7 @@ [[!template id=plugin name=underlay author="[[Simon_McVittie|smcv]]"]] [[!tag type/useful]] -This plugin adds an `add_underlays` option to the `.setup` file. +This plugin adds an `add_underlays` option to the setup file. Its value is a list of underlay directories whose content is added to the wiki. Multiple underlays are normally set up automatically by other plugins (for @@ -12,3 +12,9 @@ like photos or software releases. Directories in `add_underlays` should usually be absolute. If relative, they're interpreted as relative to the parent directory of the basewiki underlay, which is probably not particularly useful in this context. + +-- + +This plugin also adds an `add_templates` option to the setup file. +Its value is a list of template directories to look for template files in, +if they are not present in the `templatedir`. -- cgit v1.2.3 From 1b4c3fb551754cc70abd7a18871a79d79ac3cb5b Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Wed, 9 Sep 2009 22:36:23 -0400 Subject: note refactored wrapper tweakulation --- doc/plugins/contrib/cvs/discussion.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 1f0ce0102..155a2289d 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -125,3 +125,19 @@ to pass to the command. > Thanks for reading carefully. I've tested your suggestions and > applied them on my branch. --[[schmonz]] + +---- + +I've abstracted out CVS's involvement in the wrapper, adding a new +"wrapperargcheck" hook to examine `argc/argv` and return success or +failure (failure causes the wrapper to terminate) and implementing +this hook in the plugin. In the non-CVS case, the check immediately +returns success, so the added overhead is just a function call. + +Given how rarely anything should need to reach in and modify the +wrapper -- I'd go so far as to say we shouldn't make it too easy +-- I don't think it's worth the effort to try and design a more +general-purpose way to do so. If and when some other problem thinks +it wants to be solved by a new wrapper hook, it's easy enough to add +one. Until then, I'd say it's more important to keep the wrapper as +short and clear as possible. --[[schmonz]] -- cgit v1.2.3 From b7415543c1ee1ee6ee0404cf781e89043de26fb7 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Wed, 9 Sep 2009 22:42:47 -0400 Subject: describe current state of wrapper modification --- doc/plugins/contrib/cvs.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index fcf5b936f..3d72255fe 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -22,9 +22,9 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * `cvs.pm` started life as a copy of [[3.14159|news/version_3.14159]]'s `svn.pm`. * `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. -* `IkiWiki/Wrapper.pm` avoids calling ikiwiki from post-commit if it's a -directory being `cvs add`ed (this check is only compiled into the wrapper -iff the configured VCS is "cvs"). +* `IkiWiki/Wrapper.pm` provides a new "wrapperargcheck" hook, which +the plugin implements to avoid calling ikiwiki from post-commit +(and locking against itself) if it's a directory being `cvs add`ed. * [[ikiwiki-makerepo]]: * creates a repository, * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), -- cgit v1.2.3 From 689106ad3a24850543c7855b8531a1bf8dcfdb63 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Wed, 9 Sep 2009 23:17:15 -0400 Subject: automated tests added (and they highlight that the plugin should probably restore the caller's working directory) --- doc/plugins/contrib/cvs.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 3d72255fe..947fa7268 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -32,6 +32,5 @@ the plugin implements to avoid calling ikiwiki from post-commit * CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). ### To do -* Add automated tests. (Blindly adding svn-like tests to `t/file_pruned.t` doesn't do the trick.) * Instead of resource-intensively scraping changesets with `cvsps`, have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce and keep records of commits. `cvsps` can be used as a fallback for repositories without such records. * Perhaps prevent web edits from attempting to create `.../CVS/foo.mdwn` (and `.../cvs/foo.mdwn` on case-insensitive filesystems); thanks to the CVS metadata directory, the attempt will fail anyway (and much more confusingly) if we don't. -- cgit v1.2.3 From d2b57ae20fa1800d142adad5b3e43dddb97e9466 Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Thu, 10 Sep 2009 00:59:05 -0400 Subject: File::chdir is needed now --- doc/plugins/contrib/cvs.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index 947fa7268..d45992300 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -5,8 +5,8 @@ This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions System]] as an [[rcs]]. ### Usage -7. Install [cvsps](http://www.cobite.com/cvsps/), [[!cpan -File::ReadBackwards]], and +7. Install [[!cpan File::chdir]], [[!cpan File::ReadBackwards]], +[cvsps](http://www.cobite.com/cvsps/), and [cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. 7. Adjust CVS-related parameters in your setup file. -- cgit v1.2.3 From b3cceb0f615089b3a144389f4593c9941a0ed777 Mon Sep 17 00:00:00 2001 From: suxx1k Date: Thu, 10 Sep 2009 09:50:34 -0400 Subject: --- doc/roadmap.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 2f79f7978..8688b856c 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -8,7 +8,7 @@ This is the roadmap for ikiwiki development. Released 29 April 2006. The 1.x series is no longer supported. - +d ---- # 2.0 -- cgit v1.2.3 From 22f02603246f67117471f020a882dfa822849d18 Mon Sep 17 00:00:00 2001 From: suxx1k Date: Thu, 10 Sep 2009 09:51:28 -0400 Subject: --- doc/roadmap.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 8688b856c..a701a2685 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -7,8 +7,8 @@ This is the roadmap for ikiwiki development. Released 29 April 2006. -The 1.x series is no longer supported. -d +The 1.X series is no longer supported. + ---- # 2.0 -- cgit v1.2.3 From 3ebd4e0b45a8a6bd4c12604a3bb683dcb3a60eb8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 14:04:46 -0400 Subject: Add genwrapper hook, that can be used to add code into the C wrapper. --- IkiWiki/Plugin/skeleton.pm.example | 5 +++++ IkiWiki/Wrapper.pm | 8 ++++---- debian/changelog | 1 + doc/plugins/write.mdwn | 7 +++++++ 4 files changed, 17 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/skeleton.pm.example b/IkiWiki/Plugin/skeleton.pm.example index 573510191..ddf2996d6 100644 --- a/IkiWiki/Plugin/skeleton.pm.example +++ b/IkiWiki/Plugin/skeleton.pm.example @@ -39,6 +39,7 @@ sub import { hook(type => "renamepage", id => "skeleton", call => \&renamepage); hook(type => "rename", id => "skeleton", call => \&rename); hook(type => "savestate", id => "skeleton", call => \&savestate); + hook(type => "genwrapper", id => "skeleton", call => \&genwrapper); } sub getopt () { @@ -239,4 +240,8 @@ sub savestate () { debug("skeleton plugin running in savestate"); } +sub genwrapper () { + debug("skeleton plugin running in genwrapper"); +} + 1 diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 6555fe625..cf85738d6 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -38,11 +38,12 @@ sub gen_wrapper () { EOF } - my $test_receive=""; if ($config{test_receive}) { require IkiWiki::Receive; - $test_receive=IkiWiki::Receive::gen_wrapper(); } + + my @wrapper_hooks; + run_hooks(genwrapper => sub { push @wrapper_hooks, shift->() }); my $check_commit_hook=""; my $pre_exec=""; @@ -120,7 +121,7 @@ int main (int argc, char **argv) { char *s; $check_commit_hook -$test_receive +@wrapper_hooks $envsave newenviron[i++]="HOME=$ENV{HOME}"; newenviron[i++]="WRAPPED_OPTIONS=$configstring"; @@ -144,7 +145,6 @@ $pre_exec exit(1); } EOF - close OUT; my $cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc'; if (system($cc, "$wrapper.c", "-o", "$wrapper.new") != 0) { diff --git a/debian/changelog b/debian/changelog index 2e1781713..488aef866 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ ikiwiki (3.14159265) UNRELEASED; urgency=low * underlay: Also allow configuring additional directories to search for template files in. * Fix parsing web commits from ipv6 addresses. + * Add genwrapper hook, that can be used to add code into the C wrapper. -- Joey Hess Wed, 02 Sep 2009 15:01:27 -0400 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 3976f9adf..668f8d8b6 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -496,6 +496,13 @@ describes the plugin as a whole. For example: and undef if a rebuild could be needed in some circumstances, but is not strictly required. +### genwrapper + + hook(type => "genwrapper", id => "foo", call => \&genwrapper); + +This hook is used to inject C code (which it returns) into the `main` +function of the ikiwiki wrapper when it is being generated. + ## Plugin interface To import the ikiwiki plugin interface: -- cgit v1.2.3 From 525d4cd037b1da19f4d54cf113212cbe452be417 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 14:06:30 -0400 Subject: new hook --- doc/plugins/contrib/cvs/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index 155a2289d..ace455d06 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -141,3 +141,7 @@ general-purpose way to do so. If and when some other problem thinks it wants to be solved by a new wrapper hook, it's easy enough to add one. Until then, I'd say it's more important to keep the wrapper as short and clear as possible. --[[schmonz]] + +> I've committed a slightly different hook, which should be general enough +> that `IkiWiki::Receive` can also use it, so please adapt your code to +> that. --[[Joey]] -- cgit v1.2.3 From 5ee980d77a614865747101615a6a795bec6f272f Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Thu, 10 Sep 2009 15:17:28 -0400 Subject: catch up to genwrapper --- doc/plugins/contrib/cvs.mdwn | 3 --- doc/plugins/contrib/cvs/discussion.mdwn | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn index d45992300..b75929139 100644 --- a/doc/plugins/contrib/cvs.mdwn +++ b/doc/plugins/contrib/cvs.mdwn @@ -22,9 +22,6 @@ Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn * `cvs.pm` started life as a copy of [[3.14159|news/version_3.14159]]'s `svn.pm`. * `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata into `$DESTDIR`. -* `IkiWiki/Wrapper.pm` provides a new "wrapperargcheck" hook, which -the plugin implements to avoid calling ikiwiki from post-commit -(and locking against itself) if it's a directory being `cvs add`ed. * [[ikiwiki-makerepo]]: * creates a repository, * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn index ace455d06..645b2388b 100644 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ b/doc/plugins/contrib/cvs/discussion.mdwn @@ -145,3 +145,5 @@ short and clear as possible. --[[schmonz]] > I've committed a slightly different hook, which should be general enough > that `IkiWiki::Receive` can also use it, so please adapt your code to > that. --[[Joey]] + +>> Done. --[[schmonz]]. -- cgit v1.2.3 From 078f76d7fd3f53389a3dba47338c2d32b4dbba4a Mon Sep 17 00:00:00 2001 From: "http://joey.kitenet.net/" Date: Thu, 10 Sep 2009 16:14:29 -0400 Subject: testing --- doc/sandbox.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 8b594043e..7b56c6803 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -4,6 +4,8 @@ Here's a paragraph. Here's another one with *emphasised* text. +test + # Header ## Subheader -- cgit v1.2.3 From fa2486c5648e751d561244faec38d261cbd01b36 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 16:16:56 -0400 Subject: test from anon git --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 7b56c6803..22a5642da 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -4,7 +4,7 @@ Here's a paragraph. Here's another one with *emphasised* text. -test +test 2 # Header -- cgit v1.2.3 From dd731d22c63a21ea7d8f5e32e72cb75f60e2d387 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 16:22:58 -0400 Subject: reorder vcs list --- doc/ikiwiki-makerepo.mdwn | 2 +- ikiwiki-makerepo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki-makerepo.mdwn b/doc/ikiwiki-makerepo.mdwn index 13f88dc27..9e742c211 100644 --- a/doc/ikiwiki-makerepo.mdwn +++ b/doc/ikiwiki-makerepo.mdwn @@ -4,7 +4,7 @@ ikiwiki-makerepo - check an ikiwiki srcdir into revision control # SYNOPSIS -ikiwiki-makerepo svn|git|monotone|darcs srcdir repository +ikiwiki-makerepo git|svn|monotone|darcs|cvs srcdir repository ikiwiki-makerepo bzr|mercurial srcdir diff --git a/ikiwiki-makerepo b/ikiwiki-makerepo index aca8da153..6951ca0de 100755 --- a/ikiwiki-makerepo +++ b/ikiwiki-makerepo @@ -6,7 +6,7 @@ srcdir="$2" repository="$3" usage () { - echo "usage: ikiwiki-makerepo cvs|svn|git|monotone|darcs srcdir repository" >&2 + echo "usage: ikiwiki-makerepo svn|git|svn|monotone|darcs|cvs srcdir repository" >&2 echo " ikiwiki-makerepo bzr|mercurial srcdir" >&2 exit 1 } -- cgit v1.2.3 From e5d9d3cc52598c68fc91903a5ca5fd43c7d1cf21 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 16:31:58 -0400 Subject: add rcs/cvs --- doc/plugins/contrib/cvs.mdwn | 33 ------- doc/plugins/contrib/cvs/discussion.mdwn | 149 -------------------------------- doc/rcs/cvs.mdwn | 27 ++++++ doc/rcs/cvs/discussion.mdwn | 149 ++++++++++++++++++++++++++++++++ doc/rcs/details.mdwn | 2 + 5 files changed, 178 insertions(+), 182 deletions(-) delete mode 100644 doc/plugins/contrib/cvs.mdwn delete mode 100644 doc/plugins/contrib/cvs/discussion.mdwn create mode 100644 doc/rcs/cvs.mdwn create mode 100644 doc/rcs/cvs/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/cvs.mdwn b/doc/plugins/contrib/cvs.mdwn deleted file mode 100644 index b75929139..000000000 --- a/doc/plugins/contrib/cvs.mdwn +++ /dev/null @@ -1,33 +0,0 @@ -[[!template id=plugin name=cvs core=0 author="[[schmonz]]"]] - -[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] - -This plugin allows ikiwiki to use [[!wikipedia desc="CVS" Concurrent Versions System]] as an [[rcs]]. - -### Usage -7. Install [[!cpan File::chdir]], [[!cpan File::ReadBackwards]], -[cvsps](http://www.cobite.com/cvsps/), and -[cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. -7. Adjust CVS-related parameters in your setup file. - -Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn't need it, but you yourself might. Here's a good general-purpose one: - - cvs -q - checkout -P - update -dP - diff -u - rdiff -u - -### Implementation details -* `cvs.pm` started life as a copy of [[3.14159|news/version_3.14159]]'s `svn.pm`. -* `IkiWiki.pm:wiki_file_prune_regexps` avoids copying CVS metadata -into `$DESTDIR`. -* [[ikiwiki-makerepo]]: - * creates a repository, - * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), - * configures the post-commit hook in `CVSROOT/loginfo`. -* CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). - -### To do -* Instead of resource-intensively scraping changesets with `cvsps`, have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce and keep records of commits. `cvsps` can be used as a fallback for repositories without such records. -* Perhaps prevent web edits from attempting to create `.../CVS/foo.mdwn` (and `.../cvs/foo.mdwn` on case-insensitive filesystems); thanks to the CVS metadata directory, the attempt will fail anyway (and much more confusingly) if we don't. diff --git a/doc/plugins/contrib/cvs/discussion.mdwn b/doc/plugins/contrib/cvs/discussion.mdwn deleted file mode 100644 index 645b2388b..000000000 --- a/doc/plugins/contrib/cvs/discussion.mdwn +++ /dev/null @@ -1,149 +0,0 @@ -I've started reviewing this, and the main thing I don't like is the -post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. -That just seems unnecessarily complicated. Why can't ikiwiki itself detect -the "cvs add " call and avoid doing anything in that case? ---[[Joey]] - -> The wrapper wrapper does three things: -> -> 7. It ignores `cvs add `, since this is a weird CVS -> behavior that ikiwiki gets confused by and doesn't need to act on. -> 7. It prevents `cvs` locking against itself: `cvs commit` takes a -> write lock and runs the post-commit hook, which runs `cvs update`, -> which wants a read lock and sleeps forever -- unless the post-commit -> hook runs in the background so the commit can "finish". -> 7. It fails silently if the ikiwiki post-commit hook is missing. -> CVS doesn't have any magic post-commit filenames, so hooks have to -> be configured explicitly. I don't think a commit will actually fail -> if a configured post-commit hook is missing (though I can't test -> this at the moment). -> -> Thing 1 can probably be handled within ikiwiki, if that seems less -> gross to you. - ->> It seems like it might be. You can use a `getopt` hook to check ->> `@ARGV` to see how it was called. --[[Joey]] - ->>> This does the trick iff the post-commit wrapper passes its args ->>> along. Committed on my branch. This seems potentially dangerous, ->>> since the args passed to ikiwiki are influenced by web commits. ->>> I don't see an exploit, but for paranoia's sake, maybe the wrapper ->>> should only be built with execv() if the cvs plugin is loaded? ->>> --[[schmonz]] - ->>>> Hadn't considered that. While in wrapper mode the normal getopt is not ->>>> done, plugin getopt still runs, and so any unsafe options that ->>>> other plugins support could be a problem if another user runs ->>>> the setuid wrapper and passes those options through. --[[Joey]] - ->>>>> I've tried compiling the argument check into the wrapper as ->>>>> the first thing main() does, and was surprised to find that ->>>>> this doesn't prevent the `cvs add ` deadlock in a web ->>>>> commit. I was convinced this'd be a reasonable solution, ->>>>> especially if conditionalized on the cvs plugin being loaded, ->>>>> but it doesn't work. And I stuck debug printfs at the beginning ->>>>> of all the rcs_foo() subs, and whatever `cvs add ` is ->>>>> doing to ikiwiki isn't visible to my plugin, because none of ->>>>> those subs are getting called. Nuts. Can you think of anything ->>>>> else that might solve the problem, or should I go back to ->>>>> generating a minimal wrapper wrapper that checks for just ->>>>> this one thing? --[[schmonz]] - ->>>>>> I don't see how there could possibly be a difference between ->>>>>> ikiwiki's C wrapper and your shell wrapper wrapper here. --[[Joey]] - ->>>>>>> I was comparing strings overly precisely. Fixed on my branch. ->>>>>>> I've also knocked off the two most pressing to-do items. I ->>>>>>> think the plugin's ready for prime time. --[[schmonz]] - -> Thing 2 I'm less sure of. (I'd like to see the web UI return -> immediately on save anyway, to a temporary "rebuilding, please wait -> if you feel like knowing when it's done" page, but this problem -> with CVS happens with any kind of commit, and could conceivably -> happen with some other VCS.) - ->> None of the other VCSes let a write lock block a read lock, apparently. ->> ->> Anyway, re the backgrounding, when committing via the web, the ->> post-commit hook doesn't run anyway; the rendering is done via the ->> ikiwiki CGI. It would certianly be nice if it popped up a quick "working" ->> page and replaced it with the updated page when done, but that's ->> unrelated; the post-commit ->> hook only does rendering when committing using the VCS directly. The ->> backgrounding you do actually seems safe enough -- but tacking ->> on a " &" to the ikiwiki wrapper call doesn't need a wrapper script, ->> does it? --[[Joey]] - ->>> Nope, it works fine to append it to the `CVSROOT/loginfo` line. ->>> Fixed on my branch. --[[schmonz]] - -> Thing 3 I think I did in order to squelch the error messages that -> were bollixing up the CGI. It was easy to do this in the wrapper -> wrapper, but if that's going away, it can be done just as easily -> with output redirection in `CVSROOT/loginfo`. -> -> --[[schmonz]] - ->> If the error messages screw up the CGI they must go to stdout. ->> I thought we had stderr even in the the CVS dark ages. ;-) --[[Joey]] - ->>> Some messages go to stderr, but definitely not all. That's why ->>> I wound up reaching for IPC::Cmd, to execute the command line ->>> safely while shutting CVS up. Anyway, I've tested what happens ->>> if a configured post-commit hook is missing, and it seems fine, ->>> probably also thanks to IPC::Cmd. ->>> --[[schmonz]] - ----- - - -Further review.. --[[Joey]] - -I don't understand what `cvs_shquote_commit` is -trying to do with the test message, but it seems -highly likely to be insecure; I never trust anything -that relies on safely quoting user input passed to the shell. - -(As an aside, `shell_quote` can die on certian inputs.) - -Seems to me that, if `IPC::Cmd` exposes input to the shell -(which I have not verified but its docs don't specify; a bad sign) -you chose the wrong tool and ended up doing down the wrong -route, dragging in shell quoting problems and fixes. Since you -chose to use `IPC::Cmd` just because you wanted to shut -up CVS stderr, my suggestion would be to use plain `system` -to run the command, with stderr temporarily sent to /dev/null: - - open(my $savederr, ">&STDERR"); - open(STDERR, ">", "/dev/null"); - my $ret=system("cvs", "-Q", @_); - open(STDERR, ">$savederr"); - -`cvs_runcvs` should not take an array reference. It's -usual for this type of function to take a list of parameters -to pass to the command. - -> Thanks for reading carefully. I've tested your suggestions and -> applied them on my branch. --[[schmonz]] - ----- - -I've abstracted out CVS's involvement in the wrapper, adding a new -"wrapperargcheck" hook to examine `argc/argv` and return success or -failure (failure causes the wrapper to terminate) and implementing -this hook in the plugin. In the non-CVS case, the check immediately -returns success, so the added overhead is just a function call. - -Given how rarely anything should need to reach in and modify the -wrapper -- I'd go so far as to say we shouldn't make it too easy --- I don't think it's worth the effort to try and design a more -general-purpose way to do so. If and when some other problem thinks -it wants to be solved by a new wrapper hook, it's easy enough to add -one. Until then, I'd say it's more important to keep the wrapper as -short and clear as possible. --[[schmonz]] - -> I've committed a slightly different hook, which should be general enough -> that `IkiWiki::Receive` can also use it, so please adapt your code to -> that. --[[Joey]] - ->> Done. --[[schmonz]]. diff --git a/doc/rcs/cvs.mdwn b/doc/rcs/cvs.mdwn new file mode 100644 index 000000000..f0bd0f6f0 --- /dev/null +++ b/doc/rcs/cvs.mdwn @@ -0,0 +1,27 @@ +If you really need to, you can use [[!wikipedia desc="CVS" Concurrent Versions System]] +with ikiwiki. + +### Usage +7. Install [[!cpan File::chdir]], [[!cpan File::ReadBackwards]], +[cvsps](http://www.cobite.com/cvsps/), and +[cvsweb](http://www.freebsd.org/projects/cvsweb.html) or the like. +7. Adjust CVS-related parameters in your setup file. + +Consider creating `$HOME/.cvsrc` if you don't have one already; the plugin doesn't need it, but you yourself might. Here's a good general-purpose one: + + cvs -q + checkout -P + update -dP + diff -u + rdiff -u + +### Implementation details +* [[ikiwiki-makerepo]]: + * creates a repository, + * imports `$SRCDIR` into top-level module `ikiwiki` (vendor tag IKIWIKI, release tag PRE_CVS), + * configures the post-commit hook in `CVSROOT/loginfo`. +* CVS multi-directory commits happen separately; the post-commit hook sees only the first directory's changes in time for [[recentchanges|plugins/recentchanges]]. The next run of `ikiwiki --setup` will correctly re-render such a recentchanges entry. It should be possible to solve this problem with NetBSD's `commit_prep` and `log_accum` scripts (see below). + +### To do +* Instead of resource-intensively scraping changesets with `cvsps`, have `ikiwiki-makerepo` set up NetBSD-like `log_accum` and `commit_prep` scripts that coalesce and keep records of commits. `cvsps` can be used as a fallback for repositories without such records. +* Perhaps prevent web edits from attempting to create `.../CVS/foo.mdwn` (and `.../cvs/foo.mdwn` on case-insensitive filesystems); thanks to the CVS metadata directory, the attempt will fail anyway (and much more confusingly) if we don't. diff --git a/doc/rcs/cvs/discussion.mdwn b/doc/rcs/cvs/discussion.mdwn new file mode 100644 index 000000000..645b2388b --- /dev/null +++ b/doc/rcs/cvs/discussion.mdwn @@ -0,0 +1,149 @@ +I've started reviewing this, and the main thing I don't like is the +post-commit wrapper wrapper that ikiwiki-makerepo is patched to set up. +That just seems unnecessarily complicated. Why can't ikiwiki itself detect +the "cvs add " call and avoid doing anything in that case? +--[[Joey]] + +> The wrapper wrapper does three things: +> +> 7. It ignores `cvs add `, since this is a weird CVS +> behavior that ikiwiki gets confused by and doesn't need to act on. +> 7. It prevents `cvs` locking against itself: `cvs commit` takes a +> write lock and runs the post-commit hook, which runs `cvs update`, +> which wants a read lock and sleeps forever -- unless the post-commit +> hook runs in the background so the commit can "finish". +> 7. It fails silently if the ikiwiki post-commit hook is missing. +> CVS doesn't have any magic post-commit filenames, so hooks have to +> be configured explicitly. I don't think a commit will actually fail +> if a configured post-commit hook is missing (though I can't test +> this at the moment). +> +> Thing 1 can probably be handled within ikiwiki, if that seems less +> gross to you. + +>> It seems like it might be. You can use a `getopt` hook to check +>> `@ARGV` to see how it was called. --[[Joey]] + +>>> This does the trick iff the post-commit wrapper passes its args +>>> along. Committed on my branch. This seems potentially dangerous, +>>> since the args passed to ikiwiki are influenced by web commits. +>>> I don't see an exploit, but for paranoia's sake, maybe the wrapper +>>> should only be built with execv() if the cvs plugin is loaded? +>>> --[[schmonz]] + +>>>> Hadn't considered that. While in wrapper mode the normal getopt is not +>>>> done, plugin getopt still runs, and so any unsafe options that +>>>> other plugins support could be a problem if another user runs +>>>> the setuid wrapper and passes those options through. --[[Joey]] + +>>>>> I've tried compiling the argument check into the wrapper as +>>>>> the first thing main() does, and was surprised to find that +>>>>> this doesn't prevent the `cvs add ` deadlock in a web +>>>>> commit. I was convinced this'd be a reasonable solution, +>>>>> especially if conditionalized on the cvs plugin being loaded, +>>>>> but it doesn't work. And I stuck debug printfs at the beginning +>>>>> of all the rcs_foo() subs, and whatever `cvs add ` is +>>>>> doing to ikiwiki isn't visible to my plugin, because none of +>>>>> those subs are getting called. Nuts. Can you think of anything +>>>>> else that might solve the problem, or should I go back to +>>>>> generating a minimal wrapper wrapper that checks for just +>>>>> this one thing? --[[schmonz]] + +>>>>>> I don't see how there could possibly be a difference between +>>>>>> ikiwiki's C wrapper and your shell wrapper wrapper here. --[[Joey]] + +>>>>>>> I was comparing strings overly precisely. Fixed on my branch. +>>>>>>> I've also knocked off the two most pressing to-do items. I +>>>>>>> think the plugin's ready for prime time. --[[schmonz]] + +> Thing 2 I'm less sure of. (I'd like to see the web UI return +> immediately on save anyway, to a temporary "rebuilding, please wait +> if you feel like knowing when it's done" page, but this problem +> with CVS happens with any kind of commit, and could conceivably +> happen with some other VCS.) + +>> None of the other VCSes let a write lock block a read lock, apparently. +>> +>> Anyway, re the backgrounding, when committing via the web, the +>> post-commit hook doesn't run anyway; the rendering is done via the +>> ikiwiki CGI. It would certianly be nice if it popped up a quick "working" +>> page and replaced it with the updated page when done, but that's +>> unrelated; the post-commit +>> hook only does rendering when committing using the VCS directly. The +>> backgrounding you do actually seems safe enough -- but tacking +>> on a " &" to the ikiwiki wrapper call doesn't need a wrapper script, +>> does it? --[[Joey]] + +>>> Nope, it works fine to append it to the `CVSROOT/loginfo` line. +>>> Fixed on my branch. --[[schmonz]] + +> Thing 3 I think I did in order to squelch the error messages that +> were bollixing up the CGI. It was easy to do this in the wrapper +> wrapper, but if that's going away, it can be done just as easily +> with output redirection in `CVSROOT/loginfo`. +> +> --[[schmonz]] + +>> If the error messages screw up the CGI they must go to stdout. +>> I thought we had stderr even in the the CVS dark ages. ;-) --[[Joey]] + +>>> Some messages go to stderr, but definitely not all. That's why +>>> I wound up reaching for IPC::Cmd, to execute the command line +>>> safely while shutting CVS up. Anyway, I've tested what happens +>>> if a configured post-commit hook is missing, and it seems fine, +>>> probably also thanks to IPC::Cmd. +>>> --[[schmonz]] + +---- + + +Further review.. --[[Joey]] + +I don't understand what `cvs_shquote_commit` is +trying to do with the test message, but it seems +highly likely to be insecure; I never trust anything +that relies on safely quoting user input passed to the shell. + +(As an aside, `shell_quote` can die on certian inputs.) + +Seems to me that, if `IPC::Cmd` exposes input to the shell +(which I have not verified but its docs don't specify; a bad sign) +you chose the wrong tool and ended up doing down the wrong +route, dragging in shell quoting problems and fixes. Since you +chose to use `IPC::Cmd` just because you wanted to shut +up CVS stderr, my suggestion would be to use plain `system` +to run the command, with stderr temporarily sent to /dev/null: + + open(my $savederr, ">&STDERR"); + open(STDERR, ">", "/dev/null"); + my $ret=system("cvs", "-Q", @_); + open(STDERR, ">$savederr"); + +`cvs_runcvs` should not take an array reference. It's +usual for this type of function to take a list of parameters +to pass to the command. + +> Thanks for reading carefully. I've tested your suggestions and +> applied them on my branch. --[[schmonz]] + +---- + +I've abstracted out CVS's involvement in the wrapper, adding a new +"wrapperargcheck" hook to examine `argc/argv` and return success or +failure (failure causes the wrapper to terminate) and implementing +this hook in the plugin. In the non-CVS case, the check immediately +returns success, so the added overhead is just a function call. + +Given how rarely anything should need to reach in and modify the +wrapper -- I'd go so far as to say we shouldn't make it too easy +-- I don't think it's worth the effort to try and design a more +general-purpose way to do so. If and when some other problem thinks +it wants to be solved by a new wrapper hook, it's easy enough to add +one. Until then, I'd say it's more important to keep the wrapper as +short and clear as possible. --[[schmonz]] + +> I've committed a slightly different hook, which should be general enough +> that `IkiWiki::Receive` can also use it, so please adapt your code to +> that. --[[Joey]] + +>> Done. --[[schmonz]]. diff --git a/doc/rcs/details.mdwn b/doc/rcs/details.mdwn index 6492cf38c..013ddb745 100644 --- a/doc/rcs/details.mdwn +++ b/doc/rcs/details.mdwn @@ -288,3 +288,5 @@ user for cleanup. This is less neat than it could be, in that a conflict marked revision gets committed to the repository. ## [[bzr]] + +## [[cvs]] -- cgit v1.2.3 From 290db7808f8dc9ee1bfd0caa33d5c3205c0651f8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Sep 2009 17:03:19 -0400 Subject: update a few cvs things --- doc/post-commit/discussion.mdwn | 2 +- doc/todo/CVS_backend.mdwn | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/post-commit/discussion.mdwn b/doc/post-commit/discussion.mdwn index c78709e94..fc0a27ee4 100644 --- a/doc/post-commit/discussion.mdwn +++ b/doc/post-commit/discussion.mdwn @@ -91,7 +91,7 @@ Can you offer an educated guess what's going wrong here? --[[Schmonz]] >>> Aaaaaand I was wrong about the second half of the conjecture being >>> wrong. The wrapper script wasn't correctly identifying directories; >>> with that fixed, everything works. I've created a ->>> [[plugins/contrib/cvs]] plugin page. Thanks for listening. :-) +>>> [[rcs/cvs]] page. Thanks for listening. :-) >>> --[[Schmonz]] >> Here is a comment I committed to my laptop from Madrid Airport before diff --git a/doc/todo/CVS_backend.mdwn b/doc/todo/CVS_backend.mdwn index 3c6527290..c450542e2 100644 --- a/doc/todo/CVS_backend.mdwn +++ b/doc/todo/CVS_backend.mdwn @@ -9,6 +9,8 @@ Original discussion: >> No, although the existing svn backend could fairly esily be modified into >> a CVS backend, by someone who doesn't mind working with CVS. --[[Joey]] >> ->>> Wouldn't say I don't mind, but I needed it. See [[plugins/contrib/cvs]]. --[[Schmonz]] +>>> Wouldn't say I don't mind, but I needed it. See [[rcs/cvs]]. --[[Schmonz]] + +[[done]] [[!tag wishlist]] -- cgit v1.2.3 From e8bdd1e22f8d322456ca6a6928fc7049e3fd0007 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Thu, 10 Sep 2009 17:41:52 -0400 Subject: PageSpec doesn't match cvs.pm after it moved, specify it explicitly in the map --- doc/users/schmonz.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/schmonz.mdwn b/doc/users/schmonz.mdwn index 8273bdbb6..7ebd8311c 100644 --- a/doc/users/schmonz.mdwn +++ b/doc/users/schmonz.mdwn @@ -1,3 +1,3 @@ [Amitai Schlair](http://www.columbia.edu/~ays2105/) recently discovered ikiwiki and finds himself using it for all sorts of things. His attempts at contributing: -[[!map pages="link(users/schmonz) and plugins/* and !*/Discussion"]] +[[!map pages="!*/Discussion and ((link(users/schmonz) and plugins/*) or rcs/cvs)"]] -- cgit v1.2.3 From 412a4dd62ade18f5e057ff3324321188245a542e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Sep 2009 14:44:32 -0400 Subject: review --- doc/plugins/contrib/rsync/discussion.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index 20c04af0f..9b4184e5f 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -46,3 +46,17 @@ The wiki now lives on (1), and clicking "edit" just works. --[[schmonz]] >> This plugin is definitely still useful for projects not able to use >> a DVCS (of which I've got at least one other), and possibly for >> other uses not yet imagined. ;-) --[[schmonz]] + +---- + +Revew: --[[Joey]] + +* I think it should not throw an error if no command is set. Just don't do anything. +* If the rsync fails, it currently errors out, which will probably also leave + the wiki in a broken state, since ikiwiki will not get a chance to save + its state. This seems fragile; what if the laptop is offline, or the + server is down, etc. Maybe it should just warn if the rsync fails? +* Is a new hook really needed? The savestate hook runs at a similar time; + only issue with it is that it is run even when ikiwiki has not + rendered any updated pages. Bah, I think you do need the new hook, how + annoying.. -- cgit v1.2.3 From 544cedaa1903c6314ed7ba98d96965a4017944ec Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Fri, 11 Sep 2009 17:34:47 -0400 Subject: response --- doc/plugins/contrib/rsync/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index 9b4184e5f..b162fbd6b 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -60,3 +60,9 @@ Revew: --[[Joey]] only issue with it is that it is run even when ikiwiki has not rendered any updated pages. Bah, I think you do need the new hook, how annoying.. + +> * Depends whether the plugin would be on by default. If yes, then yes. +> If the admin has to enable it, I'd think they'd want the error. +> * Changed the other errors to warnings. +> * The name might be wrong: there isn't anything rsync-specific about the +> plugin, that's just the command I personally need to run. --[[schmonz]] -- cgit v1.2.3 From a7d7acc0f761fff16637e427f30d365b54be1a33 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Sep 2009 17:47:31 -0400 Subject: resp --- doc/plugins/contrib/rsync/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index b162fbd6b..6bf7a3826 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -66,3 +66,12 @@ Revew: --[[Joey]] > * Changed the other errors to warnings. > * The name might be wrong: there isn't anything rsync-specific about the > plugin, that's just the command I personally need to run. --[[schmonz]] + +>> One problem with the error is that it prevents dumping a new setup file with +>> the plugin enabled, and then editing it to configure. ie: + + joey@gnu:~>ikiwiki -setup .ikiwiki/joeywiki.setup -plugin rsync -dumpsetup new.setup + Must specify rsync_command + +> rsync seems by far the most likely command, though someone might use something +> to push via ftp instead. I think calling it rsync is ok. --[[Joey]] -- cgit v1.2.3 From 5b818c9f2ac9c9a2d953f29194913036ab26c225 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Sep 2009 18:28:35 -0400 Subject: doc update, add --exclude ikiwiki.cgi to examples --- IkiWiki/Plugin/rsync.pm | 2 +- doc/plugins/contrib/rsync.mdwn | 21 --------- doc/plugins/contrib/rsync/discussion.mdwn | 77 ------------------------------- doc/plugins/rsync.mdwn | 17 +++++++ doc/plugins/rsync/discussion.mdwn | 77 +++++++++++++++++++++++++++++++ 5 files changed, 95 insertions(+), 99 deletions(-) delete mode 100644 doc/plugins/contrib/rsync.mdwn delete mode 100644 doc/plugins/contrib/rsync/discussion.mdwn create mode 100644 doc/plugins/rsync.mdwn create mode 100644 doc/plugins/rsync/discussion.mdwn (limited to 'doc') diff --git a/IkiWiki/Plugin/rsync.pm b/IkiWiki/Plugin/rsync.pm index a62347a44..f14989ff8 100644 --- a/IkiWiki/Plugin/rsync.pm +++ b/IkiWiki/Plugin/rsync.pm @@ -18,7 +18,7 @@ sub getsetup () { }, rsync_command => { type => "string", - example => "rsync -qa --delete . user\@host:/path/to/docroot/", + example => "rsync -qa --delete . user\@host:/path/to/docroot/ --exclude ikiwiki.cgi", description => "command to run to sync updated pages", safe => 0, rebuild => 0, diff --git a/doc/plugins/contrib/rsync.mdwn b/doc/plugins/contrib/rsync.mdwn deleted file mode 100644 index 71cd63947..000000000 --- a/doc/plugins/contrib/rsync.mdwn +++ /dev/null @@ -1,21 +0,0 @@ -[[!template id=plugin name=rsync core=0 author="[[schmonz]]"]] - -[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] - -This plugin allows ikiwiki to push generated pages to another host -by running a command such as `rsync`. - -### Usage -7. Enable automated SSH key exchange between ikiwiki and the remote - host. [keychain](http://www.gentoo.org/proj/en/keychain/) makes - it easy to use a passphrase-protected key for this purpose. It's - also a good idea to specify the exact command line to be permitted - in the remote host's `$HOME/.ssh/authorized_keys`. -7. Set `rsync_command` in your setup file. If you're using a - passphrase-protected key, then set `rsync_command` to a shell - script which reads `keychain`'s current state before calling - `rsync`. - -### Implementation details -* The plugin relies on a new "postrefresh" hook called at the very end of - `IkiWiki/Render.pm:refresh()`. diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn deleted file mode 100644 index 6bf7a3826..000000000 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ /dev/null @@ -1,77 +0,0 @@ -## A use case - -Why I needed this plugin: I have two web servers available to me -for a project. Neither does everything I need, but together they -do. (This is a bit like the [Amazon S3 -scenario](http://kitenet.net/~joey/blog/entry/running_a_wiki_on_Amazon_S3/).) - -Server (1) is a university web server. It provides plentiful space -and bandwidth, easy authentication for people editing the wiki, and -a well-known stable URL. The wiki really wants to live here and -very easily could except that the server doesn't allow arbitrary -CGIs. - -Server (2) is provided by a generous alumnus's paid [[tips/DreamHost]] -account. Disk and particularly network usage need to be minimized -because over some threshold it costs him. CGI, etc. are available. - -My plan was to host the wiki on server (1) by taking advantage of -server (2) to store the repository, source checkout, and generated -pages, to host the repository browser, and to handle ikiwiki's CGI -operations. In order for this to work, web edits on (2) would need -to automatically push any changed pages to (1). - -As a proof of concept, I added an rsync post-commit hook after -ikiwiki's usual. It worked, just not for web edits, which is how -the wiki will be used. So I wrote this plugin to finish the job. -The wiki now lives on (1), and clicking "edit" just works. --[[schmonz]] - -> Just out of interest, why use `rsync` and not `git push`. i.e. a -> different setup to solve the same problem would be to run a -> normal ikiwiki setup on the universities server with its git -> repository available over ssh (same security setup your using -> for rsync should work for git over ssh). On the cgi-capable server, -> when it would rsync, make it git push. It would seem that git -> has enough information that it should be able to be more -> network efficient. It also means that corruption at one end -> wouldn't be propagated to the other end. -- [[Will]] - ->> Hey, that's a nice solution. (The site was in svn to begin with, ->> but it's in git now.) One advantage of my approach in this particular ->> case: server (1) doesn't have `git` installed, but does have `rsync`, ->> so (1)'s environment can remain completely untweaked other than the ->> SSH arrangement. I kind of like that all the sysadmin effort is ->> contained on one host. ->> ->> This plugin is definitely still useful for projects not able to use ->> a DVCS (of which I've got at least one other), and possibly for ->> other uses not yet imagined. ;-) --[[schmonz]] - ----- - -Revew: --[[Joey]] - -* I think it should not throw an error if no command is set. Just don't do anything. -* If the rsync fails, it currently errors out, which will probably also leave - the wiki in a broken state, since ikiwiki will not get a chance to save - its state. This seems fragile; what if the laptop is offline, or the - server is down, etc. Maybe it should just warn if the rsync fails? -* Is a new hook really needed? The savestate hook runs at a similar time; - only issue with it is that it is run even when ikiwiki has not - rendered any updated pages. Bah, I think you do need the new hook, how - annoying.. - -> * Depends whether the plugin would be on by default. If yes, then yes. -> If the admin has to enable it, I'd think they'd want the error. -> * Changed the other errors to warnings. -> * The name might be wrong: there isn't anything rsync-specific about the -> plugin, that's just the command I personally need to run. --[[schmonz]] - ->> One problem with the error is that it prevents dumping a new setup file with ->> the plugin enabled, and then editing it to configure. ie: - - joey@gnu:~>ikiwiki -setup .ikiwiki/joeywiki.setup -plugin rsync -dumpsetup new.setup - Must specify rsync_command - -> rsync seems by far the most likely command, though someone might use something -> to push via ftp instead. I think calling it rsync is ok. --[[Joey]] diff --git a/doc/plugins/rsync.mdwn b/doc/plugins/rsync.mdwn new file mode 100644 index 000000000..0ab3872d9 --- /dev/null +++ b/doc/plugins/rsync.mdwn @@ -0,0 +1,17 @@ +[[!template id=plugin name=rsync author="[[schmonz]]"]] + +This plugin allows ikiwiki to push generated pages to another host +by running a command such as `rsync`. + +The command to run is specified by setting `rsync_command` in your setup +file. The command will be run in your destdir, so something like this +is a typical command: + + rsync -qa --delete . user\@host:/path/to/docroot/ --exclude ikiwiki.cgi + +If using rsync over ssh, you will need to enable noninteractive ssh login +to the remote host. It's also a good idea to specify the exact command line +to be permitted in the remote host's `$HOME/.ssh/authorized_keys`. + +Be sure to exclude the `ikiwiki.cgi` wrapper from being sent to the remote +host. diff --git a/doc/plugins/rsync/discussion.mdwn b/doc/plugins/rsync/discussion.mdwn new file mode 100644 index 000000000..6bf7a3826 --- /dev/null +++ b/doc/plugins/rsync/discussion.mdwn @@ -0,0 +1,77 @@ +## A use case + +Why I needed this plugin: I have two web servers available to me +for a project. Neither does everything I need, but together they +do. (This is a bit like the [Amazon S3 +scenario](http://kitenet.net/~joey/blog/entry/running_a_wiki_on_Amazon_S3/).) + +Server (1) is a university web server. It provides plentiful space +and bandwidth, easy authentication for people editing the wiki, and +a well-known stable URL. The wiki really wants to live here and +very easily could except that the server doesn't allow arbitrary +CGIs. + +Server (2) is provided by a generous alumnus's paid [[tips/DreamHost]] +account. Disk and particularly network usage need to be minimized +because over some threshold it costs him. CGI, etc. are available. + +My plan was to host the wiki on server (1) by taking advantage of +server (2) to store the repository, source checkout, and generated +pages, to host the repository browser, and to handle ikiwiki's CGI +operations. In order for this to work, web edits on (2) would need +to automatically push any changed pages to (1). + +As a proof of concept, I added an rsync post-commit hook after +ikiwiki's usual. It worked, just not for web edits, which is how +the wiki will be used. So I wrote this plugin to finish the job. +The wiki now lives on (1), and clicking "edit" just works. --[[schmonz]] + +> Just out of interest, why use `rsync` and not `git push`. i.e. a +> different setup to solve the same problem would be to run a +> normal ikiwiki setup on the universities server with its git +> repository available over ssh (same security setup your using +> for rsync should work for git over ssh). On the cgi-capable server, +> when it would rsync, make it git push. It would seem that git +> has enough information that it should be able to be more +> network efficient. It also means that corruption at one end +> wouldn't be propagated to the other end. -- [[Will]] + +>> Hey, that's a nice solution. (The site was in svn to begin with, +>> but it's in git now.) One advantage of my approach in this particular +>> case: server (1) doesn't have `git` installed, but does have `rsync`, +>> so (1)'s environment can remain completely untweaked other than the +>> SSH arrangement. I kind of like that all the sysadmin effort is +>> contained on one host. +>> +>> This plugin is definitely still useful for projects not able to use +>> a DVCS (of which I've got at least one other), and possibly for +>> other uses not yet imagined. ;-) --[[schmonz]] + +---- + +Revew: --[[Joey]] + +* I think it should not throw an error if no command is set. Just don't do anything. +* If the rsync fails, it currently errors out, which will probably also leave + the wiki in a broken state, since ikiwiki will not get a chance to save + its state. This seems fragile; what if the laptop is offline, or the + server is down, etc. Maybe it should just warn if the rsync fails? +* Is a new hook really needed? The savestate hook runs at a similar time; + only issue with it is that it is run even when ikiwiki has not + rendered any updated pages. Bah, I think you do need the new hook, how + annoying.. + +> * Depends whether the plugin would be on by default. If yes, then yes. +> If the admin has to enable it, I'd think they'd want the error. +> * Changed the other errors to warnings. +> * The name might be wrong: there isn't anything rsync-specific about the +> plugin, that's just the command I personally need to run. --[[schmonz]] + +>> One problem with the error is that it prevents dumping a new setup file with +>> the plugin enabled, and then editing it to configure. ie: + + joey@gnu:~>ikiwiki -setup .ikiwiki/joeywiki.setup -plugin rsync -dumpsetup new.setup + Must specify rsync_command + +> rsync seems by far the most likely command, though someone might use something +> to push via ftp instead. I think calling it rsync is ok. --[[Joey]] -- cgit v1.2.3 From 9042a86f367654c4f872a8dcf6f78f3f0df57421 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Sep 2009 18:37:42 -0400 Subject: update --- doc/plugins/rsync.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/rsync.mdwn b/doc/plugins/rsync.mdwn index 0ab3872d9..9bfe7303e 100644 --- a/doc/plugins/rsync.mdwn +++ b/doc/plugins/rsync.mdwn @@ -7,11 +7,11 @@ The command to run is specified by setting `rsync_command` in your setup file. The command will be run in your destdir, so something like this is a typical command: - rsync -qa --delete . user\@host:/path/to/docroot/ --exclude ikiwiki.cgi + rsync => 'rsync -qa --delete . user@host:/path/to/docroot/ --exclude ikiwiki.cgi', If using rsync over ssh, you will need to enable noninteractive ssh login to the remote host. It's also a good idea to specify the exact command line to be permitted in the remote host's `$HOME/.ssh/authorized_keys`. Be sure to exclude the `ikiwiki.cgi` wrapper from being sent to the remote -host. +host, as in the above example. -- cgit v1.2.3 From f1999df705f22638a6d9d44c728c4282e674b982 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 12 Sep 2009 00:24:57 -0400 Subject: remove cgi exclusion Note that a typical use of this plugin is for a static site, w/o cgi support enabled. --- IkiWiki/Plugin/rsync.pm | 2 +- doc/plugins/rsync.mdwn | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/rsync.pm b/IkiWiki/Plugin/rsync.pm index 45bff19bd..e38801e4a 100644 --- a/IkiWiki/Plugin/rsync.pm +++ b/IkiWiki/Plugin/rsync.pm @@ -19,7 +19,7 @@ sub getsetup () { }, rsync_command => { type => "string", - example => "rsync -qa --delete . user\@host:/path/to/docroot/ --exclude ikiwiki.cgi", + example => "rsync -qa --delete . user\@host:/path/to/docroot/", description => "command to run to sync updated pages", safe => 0, rebuild => 0, diff --git a/doc/plugins/rsync.mdwn b/doc/plugins/rsync.mdwn index 9bfe7303e..e0ab96d14 100644 --- a/doc/plugins/rsync.mdwn +++ b/doc/plugins/rsync.mdwn @@ -7,11 +7,12 @@ The command to run is specified by setting `rsync_command` in your setup file. The command will be run in your destdir, so something like this is a typical command: - rsync => 'rsync -qa --delete . user@host:/path/to/docroot/ --exclude ikiwiki.cgi', + rsync => 'rsync -qa --delete . user@host:/path/to/docroot/', If using rsync over ssh, you will need to enable noninteractive ssh login to the remote host. It's also a good idea to specify the exact command line to be permitted in the remote host's `$HOME/.ssh/authorized_keys`. -Be sure to exclude the `ikiwiki.cgi` wrapper from being sent to the remote -host, as in the above example. +A typival ikiwiki configuration when using this plugin is to disable cgi +support, so ikiwiki builds a completely static site that can be served from +the remote host. -- cgit v1.2.3 From dad25308d2832de28d3b8151aacc3b124575733c Mon Sep 17 00:00:00 2001 From: Amitai Schlair Date: Sat, 12 Sep 2009 01:32:29 -0400 Subject: typo --- doc/plugins/rsync.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/rsync.mdwn b/doc/plugins/rsync.mdwn index e0ab96d14..db7fcb4f7 100644 --- a/doc/plugins/rsync.mdwn +++ b/doc/plugins/rsync.mdwn @@ -13,6 +13,6 @@ If using rsync over ssh, you will need to enable noninteractive ssh login to the remote host. It's also a good idea to specify the exact command line to be permitted in the remote host's `$HOME/.ssh/authorized_keys`. -A typival ikiwiki configuration when using this plugin is to disable cgi +A typical ikiwiki configuration when using this plugin is to disable cgi support, so ikiwiki builds a completely static site that can be served from the remote host. -- cgit v1.2.3 From 6559e68a3dff2e934d8e586d5ab0a44bd083d278 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 12 Sep 2009 20:41:37 -0400 Subject: sort= param wishlist for map --- doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn (limited to 'doc') diff --git a/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn b/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn new file mode 100644 index 000000000..3ecc6a241 --- /dev/null +++ b/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn @@ -0,0 +1,5 @@ +## sort= parameter + +Having a `sort=` parameter for the map plugin/directive would be real nice; like `inline`'s parameter, with `age`, `title`, etc. + +I may hack one in from `inline` if it seem within my skill level. -- cgit v1.2.3 From 1c8dcc9bcd27e2bc882c84d45061fb09b5602c94 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 12 Sep 2009 20:43:07 -0400 Subject: --- doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') 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 3ecc6a241..f6ccaf538 100644 --- a/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn +++ b/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn @@ -3,3 +3,5 @@ Having a `sort=` parameter for the map plugin/directive would be real nice; like `inline`'s parameter, with `age`, `title`, etc. I may hack one in from `inline` if it seem within my skill level. + +[[!tag wishlist]] -- cgit v1.2.3 From 950ce19c03ed14c4ed14408384e37ee2769e8b11 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 12 Sep 2009 20:44:02 -0400 Subject: --- doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn index 8a4b852b7..fb942a495 100644 --- a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn +++ b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn @@ -10,4 +10,8 @@ those contents instead. --[[madduck]] + +> In mine I just copied sidebar out and made some extra "sidebars", but they go elsewhere. Ugly hack, but it works. --[[simonraven]] + + [[!tag wishlist]] -- cgit v1.2.3 From f146bd0cf8f8fb661fe8690cd3246aa6ba6225f4 Mon Sep 17 00:00:00 2001 From: test Date: Sat, 12 Sep 2009 22:55:13 -0400 Subject: test --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 22a5642da..1f842d499 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -44,7 +44,7 @@ Bulleted list [[!haiku hint="sandbox play"]] ---- - +blah ## Different sorts of links: * [[Features]] -- cgit v1.2.3 From 2b07f393511fd1bfb5fc3f1edbc2d87b061d617d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 13 Sep 2009 18:45:23 -0400 Subject: typo fixes noticed by french translators --- doc/ikiwiki/directive/postsparkline.mdwn | 8 ++++---- doc/ikiwiki/directive/sparkline.mdwn | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/postsparkline.mdwn b/doc/ikiwiki/directive/postsparkline.mdwn index c17d32952..318512eef 100644 --- a/doc/ikiwiki/directive/postsparkline.mdwn +++ b/doc/ikiwiki/directive/postsparkline.mdwn @@ -15,7 +15,7 @@ This directive uses the [[!iki plugins/sparkline desc=sparkline]] plugin to crea # usage -All options aside fron the `pages`, `max`, `formula`, `time`, and `color` +All options aside from the `pages`, `max`, `formula`, `time`, and `color` options are the same as in [[sparkline]] directive. You don't need to specify any data points (though you can if you want to). @@ -24,7 +24,7 @@ times of pages matched by the specified `pages` [[ikiwiki/PageSpec]]. A maximum of `max` data points will be generated. The `formula` parameter controls the formula used to generate data points. -Available forumlae: +Available formulae: * `interval` - The height of each point represents how long it has been since the previous post. @@ -32,10 +32,10 @@ Available forumlae: many posts were made that day. * `permonth` - Each point represents a month; the height represents how many posts were made that month. -* `peryear` - Each point represents a day; the height represents how +* `peryear` - Each point represents a year; the height represents how many posts were made that year. -The `time` parameter has a default value of "ctime", since forumae use +The `time` parameter has a default value of "ctime", since formulae use the creation times of pages by default. If you instead want them to use the modification times of pages, set it to "mtime". diff --git a/doc/ikiwiki/directive/sparkline.mdwn b/doc/ikiwiki/directive/sparkline.mdwn index 1f691e14f..e5a03f84e 100644 --- a/doc/ikiwiki/directive/sparkline.mdwn +++ b/doc/ikiwiki/directive/sparkline.mdwn @@ -2,7 +2,7 @@ The `sparkline` directive is supplied by the [[!iki plugins/sparkline desc=spark This directive allows for embedding sparklines into wiki pages. A sparkline is a small word-size graphic chart, that is designed to be -displayes alongside text. +displayed alongside text. # examples -- cgit v1.2.3 From 5f06f80de51f7ea986a8f630377e67e99ba6de35 Mon Sep 17 00:00:00 2001 From: gsliepen Date: Tue, 15 Sep 2009 07:26:47 -0400 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index e1e25a045..d38bc5015 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -46,6 +46,7 @@ Projects & Organizations * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository. * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) +* [Tinc VPN](http://tinc-vpn.org/) Personal sites and blogs ======================== -- cgit v1.2.3 From 36094d76742872e3a894a15775832e8ba8261bbf Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Wed, 16 Sep 2009 23:34:27 -0400 Subject: Resolving WikiLinks in rst -- WIP --- doc/plugins/rst/discussion.mdwn | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'doc') diff --git a/doc/plugins/rst/discussion.mdwn b/doc/plugins/rst/discussion.mdwn index 9909784d5..af96edc6a 100644 --- a/doc/plugins/rst/discussion.mdwn +++ b/doc/plugins/rst/discussion.mdwn @@ -41,3 +41,33 @@ such since they are inline elements in the text.. But images work fine in rst's syntax.. what about using rst syntax for wikilinks as well? Is it possible to inject something into the parser to turn unmached links ``WikiLink`_` into ikiwiki links? --ulrik + +------ + +Resolving WikiLinks in rst +========================== + +I wanted to look into if we can hook into rst and influence how links are resolved. +It turns out it is possible, and I have a working WIP for the rst plugin that does this. + +My work in progress for `/usr/lib/ikiwiki/plugins/rst` is here: http://kaizer.se/wiki/rst.py +*Warning, written in the middle of the night just to test if it works!* + +It basically matches normal rst links just like ikiwiki would match a wikilink +if it existed. +I can't read perl so I haven't found out so much. The plugin successfully registers backlinks using +`proxy.rpc('add_link', on_page, bestlink)` (since the destination page will be rebuilt to update), +but the backlinks don't show up. + +I converted one of my pages to rst: + +Before: http://kaizer.se/wiki/kupfer-mdwn +After: http://kaizer.se/wiki/kupfer-rst + +I need help on a couple of points + +* How to fix the backlinks with `add_link`? +* How to generate NonExistingLinks using the plugin API? +* Can we include this in ikiwiki's rst if it is not too hairy? + +--ulrik -- cgit v1.2.3 From 628f07f4c881031ab91fc436cf244b91541f0ea8 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Thu, 17 Sep 2009 11:18:19 -0400 Subject: add repo with one patch --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 16af30584..5b71f4065 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -50,6 +50,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[simonraven]] `git://github.com/kjikaqawej/ikiwiki-simon.git` * [[schmonz]] `git://github.com/schmonz/ikiwiki.git` * [[will]] `http://www.cse.unsw.edu.au/~willu/ikiwiki.git` +* [[kaizer.se]] `git://github.com/engla/ikiwiki.git` ## branches -- cgit v1.2.3 From b9d2ee880ccfe54035a7c5e2d14917d84ec8fd45 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Thu, 17 Sep 2009 11:29:23 -0400 Subject: Resolve native reStructuredText links to ikiwiki pages --- ...ve_reStructuredText_links_to_ikiwiki_pages.mdwn | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn new file mode 100644 index 000000000..c90261dc3 --- /dev/null +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -0,0 +1,124 @@ +I have a working minimal implementation letting the rst renderer resolve undefined native rST links to ikiwiki pages. I have posted it as one patch at: + +Preview commit: http://github.com/engla/ikiwiki/commit/486fd79e520da1d462f00f40e7a90ab07e9c6fdf +Repository: git://github.com/engla/ikiwiki.git + +Design issues of the patch: + +Right now it changes rendering so that undefined pages (previous errors) are resolved to either ikiwiki pages or link to "#". It could be changed (trivially) so that undefined pages give the same error as before. Since it only resolves links that would previously error out, impact on current installations should be minimal. + +I don't know why backlinks don't show up with the patch as it is; they are registered, but not rendered on the linked-to page. + +Desing issues in general: + +We resolve rST links without definition, we don't help resolving defined relative links, so we don't support specifying link name and target separately. + +Many other issues with rST are of course unresolved, but some might be solved by implementing custom rST directives (which is a supported extension mechanism). + +Patch follows: + +---- +
+	From 486fd79e520da1d462f00f40e7a90ab07e9c6fdf Mon Sep 17 00:00:00 2001
+	From: Ulrik Sverdrup 
+	Date: Thu, 17 Sep 2009 15:18:50 +0200
+	Subject: [PATCH] rst: Resolve native reStructuredText links to ikiwiki pages
+
+	Links in rST use syntax `Like This`_ or OneWordLink_, and are
+	generally used for relative or absolue links, with an auxiliary
+	definition:
+
+	.. _`Like This`: http://ikiwiki.info
+	.. _OneWordLink: relative
+
+	We can hook into docutils to resolve unresolved links so that rST
+	links without definition can be resolved to wiki pages. This enables
+	WikiLink_ to link to [[WikiLink]] (if no .. _WikiLink is specified).
+
+	Comparing to Ikiwiki's wikilinks
+
+	[[blogging|blog]] specifies a link to the page blog, with the name
+	blogging. In rST we should use blogging_
+
+	.. _blogging: blog
+
+	*However*, note that this patch does not hook into this. What we
+	resolve in this patch is finding the appropriate "_blogging" if it is
+	not found, not resolving the address 'blog'.
+	---
+	 plugins/rst |   46 +++++++++++++++++++++++++++++++++++++++++-----
+	 1 files changed, 41 insertions(+), 5 deletions(-)
+
+	diff --git a/plugins/rst b/plugins/rst
+	index a2d07eb..a74baa8 100755
+	--- a/plugins/rst
+	+++ b/plugins/rst
+	@@ -6,22 +6,58 @@
+	 # based a little bit on rst.pm by Sergio Talens-Oliag, but only a little bit. :)
+	 #
+	 # Copyright © martin f. krafft 
+	+# Copyright © Ulrik Sverdrup , 2009
+	+#
+	 # Released under the terms of the GNU GPL version 2
+	 #
+	+
+	 __name__ = 'rst'
+	 __description__ = 'xml-rpc-based ikiwiki plugin to process RST files'
+	-__version__ = '0.3'
+	+__version__ = '0.3+'
+	 __author__ = 'martin f. krafft '
+	 __copyright__ = 'Copyright © ' + __author__
+	 __licence__ = 'GPLv2'
+	 
+	 from docutils.core import publish_parts;
+	+from docutils.writers import html4css1
+	 from proxy import IkiWikiProcedureProxy
+	 
+	-def rst2html(proxy, *kwargs):
+	-    # FIXME arguments should be treated as a hash, the order could change
+	-    # at any time and break this.
+	-    parts = publish_parts(kwargs[3], writer_name='html',
+	+class IkiwikiWriter(html4css1.Writer):
+	+    def resolve_node(self, node):
+	+        refname = node.get('refname', None)
+	+        if not refname:
+	+            return False
+	+
+	+        bestlink = self.proxy.rpc('bestlink', self.page, refname)
+	+
+	+        node.resolved = 1
+	+        node['class'] = 'wiki'
+	+        del node['refname']
+	+
+	+        if not bestlink:
+	+            rel_url = "#"
+	+        else:
+	+            rel_url = self.proxy.rpc('urlto', bestlink, self.page)
+	+            self.proxy.rpc('add_link', self.page, bestlink)
+	+        node['refuri'] = rel_url
+	+        self.proxy.rpc('debug', "Emitting link %s => %s" % (refname, rel_url))
+	+        return True
+	+
+	+    resolve_node.priority = 1
+	+
+	+    def __init__(self, proxy, page):
+	+        html4css1.Writer.__init__(self)
+	+        self.proxy = proxy
+	+        self.page = page
+	+        self.unknown_reference_resolvers = (self.resolve_node, )
+	+
+	+def rst2html(proxy, *args):
+	+    # args is a list paired by key, value, so we turn it into a dict
+	+    kwargs = dict((k, v) for k, v in zip(*[iter(args)]*2))
+	+    page = kwargs['page']
+	+
+	+    parts = publish_parts(kwargs['content'],
+	+                          writer=IkiwikiWriter(proxy, page),
+	                           settings_overrides = { 'halt_level': 6
+	                                                , 'file_insertion_enabled': 0
+	                                                , 'raw_enabled': 1
+	-- 
+	1.6.4
+
+
+---- -- cgit v1.2.3 From 5946a54ec793fa89bdb9a116d74684a93a9696bd Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Thu, 17 Sep 2009 11:33:12 -0400 Subject: see Resolve native reStructuredText links to ikiwiki pages --- doc/plugins/rst/discussion.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/rst/discussion.mdwn b/doc/plugins/rst/discussion.mdwn index af96edc6a..38fbed6d6 100644 --- a/doc/plugins/rst/discussion.mdwn +++ b/doc/plugins/rst/discussion.mdwn @@ -50,8 +50,8 @@ Resolving WikiLinks in rst I wanted to look into if we can hook into rst and influence how links are resolved. It turns out it is possible, and I have a working WIP for the rst plugin that does this. -My work in progress for `/usr/lib/ikiwiki/plugins/rst` is here: http://kaizer.se/wiki/rst.py -*Warning, written in the middle of the night just to test if it works!* +My work in progress for `/usr/lib/ikiwiki/plugins/rst` is here: +[[todo/Resolve native reStructuredText links to ikiwiki pages]] It basically matches normal rst links just like ikiwiki would match a wikilink if it existed. -- cgit v1.2.3 From 470712618401fb3cd322c84d1c57e4b8835850d5 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Thu, 17 Sep 2009 12:07:23 -0400 Subject: The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to generate backlinks). Can the parse output be safely reused? --- doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index c90261dc3..7adcb5c09 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -7,7 +7,7 @@ Design issues of the patch: Right now it changes rendering so that undefined pages (previous errors) are resolved to either ikiwiki pages or link to "#". It could be changed (trivially) so that undefined pages give the same error as before. Since it only resolves links that would previously error out, impact on current installations should be minimal. -I don't know why backlinks don't show up with the patch as it is; they are registered, but not rendered on the linked-to page. +The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to generate backlinks). Can the parse output be safely reused? Desing issues in general: -- cgit v1.2.3 From 356188f7c65c0e9b78e8be1e477acb785d48d3c2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 17 Sep 2009 12:42:40 -0400 Subject: response --- doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 7adcb5c09..c98723f2d 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -9,6 +9,11 @@ Right now it changes rendering so that undefined pages (previous errors) are res The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to generate backlinks). Can the parse output be safely reused? +> The page content fed to htmlize may be different than that fed to scan, +> as directives can change the content. If you cached the input and output +> at scan time, you could reuse the cached data at htmlize time for inputs +> that are the same -- but that could be a very big cache! --[[Joey]] + Desing issues in general: We resolve rST links without definition, we don't help resolving defined relative links, so we don't support specifying link name and target separately. -- cgit v1.2.3 From 28f893d120633dbfd3e85f4063b90f255f058d9b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 17 Sep 2009 12:45:04 -0400 Subject: reduce name to \w+ so gitremotes will parse it --- doc/git.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 5b71f4065..a3b56c682 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -50,7 +50,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[simonraven]] `git://github.com/kjikaqawej/ikiwiki-simon.git` * [[schmonz]] `git://github.com/schmonz/ikiwiki.git` * [[will]] `http://www.cse.unsw.edu.au/~willu/ikiwiki.git` -* [[kaizer.se]] `git://github.com/engla/ikiwiki.git` +* [[kaizer]] `git://github.com/engla/ikiwiki.git` ## branches -- cgit v1.2.3 From fc1cc57cdca9a7bdab41f0d63e34a98a2d7c78e5 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Thu, 17 Sep 2009 15:38:40 -0400 Subject: about replacements in rst (renaming links) --- ...Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index c98723f2d..642382b47 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -18,6 +18,16 @@ Desing issues in general: We resolve rST links without definition, we don't help resolving defined relative links, so we don't support specifying link name and target separately. +> I found out this is possible by using rST subsitutions. So to do [[Version history...|releases]] +> you would use: +> +> `|releases|_` +> `.. |releases| replace:: Version history...` +> Which does not seem to have an inline replacement. Using non-resolved links there is the alternative: +> +> ``Version history `_`. --ulrik [kaizer.se] + + Many other issues with rST are of course unresolved, but some might be solved by implementing custom rST directives (which is a supported extension mechanism). Patch follows: -- cgit v1.2.3 From b7db2ca37f400e09a663b01800e3bc5477a304df Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Thu, 17 Sep 2009 15:42:34 -0400 Subject: word use, equivalent is better. --- doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 642382b47..aa96fc431 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -23,7 +23,7 @@ We resolve rST links without definition, we don't help resolving defined relativ > > `|releases|_` > `.. |releases| replace:: Version history...` -> Which does not seem to have an inline replacement. Using non-resolved links there is the alternative: +> Which does not seem to have an inline equivalent. Using non-resolved links there is the alternative: > > ``Version history `_`. --ulrik [kaizer.se] -- cgit v1.2.3 From 2fc62b2787d43b91e946862910497d823eb86418 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Thu, 17 Sep 2009 16:44:33 -0400 Subject: raw escape with roles --- doc/bugs/rst_tweak.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/bugs/rst_tweak.mdwn b/doc/bugs/rst_tweak.mdwn index 9d433e24e..8667a459b 100644 --- a/doc/bugs/rst_tweak.mdwn +++ b/doc/bugs/rst_tweak.mdwn @@ -41,3 +41,12 @@ what is supposed to happen? --Peter > That's why the [[plugin_page|plugins/rst]] has its note about > issues with wikilinks and directives. You'd have to put those inside > raw directives yourself to avoid rst escaping their result. --[[Joey]] + +You can also create a raw "role" which is at least easier than raw directives. + + .. role:: ikiwiki(raw) + :format: html + + :ikiwiki:`\[[WikiLink]]` + +A role assigns meaning to interpreted text (for example :acronym:`ABC`) or :PEP:`8`. --ulrik [kaizer.se] -- cgit v1.2.3 From e19d0c5bbdcd45d810688f990381b639485434bb Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 18 Sep 2009 16:08:16 +0200 Subject: on caching --- .../Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index aa96fc431..c8d7ba5ed 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -14,6 +14,12 @@ The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to genera > at scan time, you could reuse the cached data at htmlize time for inputs > that are the same -- but that could be a very big cache! --[[Joey]] +>> I would propose using a simple heuristic: If you see `[[` anywhere on the +>> page, don't cache it. It would be an effective cache for pure-rst wikis +>> (without any ikiwiki directives or wikilinks). +>> However, I think that if the cache does not work for a big load, it should +>> not work at all; small loads are small so they don't matter. --ulrik + Desing issues in general: We resolve rST links without definition, we don't help resolving defined relative links, so we don't support specifying link name and target separately. -- cgit v1.2.3 From 5cd338fe16ede5aa1dbbf80cdfe027f8bfa09cd3 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 18 Sep 2009 16:10:43 +0200 Subject: escape markup (oops) --- doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index c8d7ba5ed..682229469 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -14,7 +14,7 @@ The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to genera > at scan time, you could reuse the cached data at htmlize time for inputs > that are the same -- but that could be a very big cache! --[[Joey]] ->> I would propose using a simple heuristic: If you see `[[` anywhere on the +>> I would propose using a simple heuristic: If you see \[[ anywhere on the >> page, don't cache it. It would be an effective cache for pure-rst wikis >> (without any ikiwiki directives or wikilinks). >> However, I think that if the cache does not work for a big load, it should -- cgit v1.2.3 From 25eafa8522a9480ca2abb6df45a613ac3d0b9880 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 18 Sep 2009 16:46:41 +0200 Subject: Refactor, and Propose :wiki: syntax for rST wikilinks --- ...ve_reStructuredText_links_to_ikiwiki_pages.mdwn | 112 +++++++++++++++++---- 1 file changed, 94 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 682229469..49be3f30a 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -1,28 +1,84 @@ -I have a working minimal implementation letting the rst renderer resolve undefined native rST links to ikiwiki pages. I have posted it as one patch at: +_NB! this page has been refactored, hopefully it is clearer now_ +_I propose putting discussion posts somewhere in the vincity of +the secttion Individual reStructuredText Issues_ -Preview commit: http://github.com/engla/ikiwiki/commit/486fd79e520da1d462f00f40e7a90ab07e9c6fdf -Repository: git://github.com/engla/ikiwiki.git +**Goal** -Design issues of the patch: +To be able to use rst as a first-class markup language in ikiwiki. I think +most believe this is almost impossible (ikiwiki is built around markdown). -Right now it changes rendering so that undefined pages (previous errors) are resolved to either ikiwiki pages or link to "#". It could be changed (trivially) so that undefined pages give the same error as before. Since it only resolves links that would previously error out, impact on current installations should be minimal. +**Design** -The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to generate backlinks). Can the parse output be safely reused? +**WikiLinks**, first and foremost, are needed for a wiki. rST already allows +specifying absolue and relative URL links, and relative links can be used to +tie together wiki of rst documents. -> The page content fed to htmlize may be different than that fed to scan, -> as directives can change the content. If you cached the input and output -> at scan time, you could reuse the cached data at htmlize time for inputs -> that are the same -- but that could be a very big cache! --[[Joey]] +1. Below are links to a small, working implementation for resolving + undefined rST references using ikiwiki's mechanism. This is **Proposal 1** + for rst WikiLinks. ->> I would propose using a simple heuristic: If you see \[[ anywhere on the ->> page, don't cache it. It would be an effective cache for pure-rst wikis ->> (without any ikiwiki directives or wikilinks). ->> However, I think that if the cache does not work for a big load, it should ->> not work at all; small loads are small so they don't matter. --ulrik +2. Looking over at rST-using systems such as trac and MoinMoin; I think it + would be wiser to implement wikilinks by the `:role:` mechanism, together + with allowing a custom URL scheme to point to wiki links. This is + **Proposal 2**. + + This is a simple wiki page, with :wiki:`WikiLinks` and other_ links + + .. _other: wiki:wikilink + +Benefits of using a `:role:` and a `wiki: page/subpage` URL scheme are +following: + +1. rST documents taken out of the context (the wiki) will not fail as bad as + if they have lots of Proposal-1 links: They look just the same as valid + references, and you have to edit them all. + In contrast, should the `:wiki:` role disappear, one line is enough + to redefined it and silence all the warnings for the document: + + .. role:: wiki (title) + +*Implementation* there is no implementation of Proposal 2 but it should be +doable; adding a local role is trivial. Rewriting `wiki:` links could be +done in the format phase(?). + +Now **Directives**: As it is now, ikiwiki goes though (roughly): +filter, preprocess, htmlize, format as major stages of content +transformation. rST has major problems to work with any HTML that enters the +picture before it. + +1. Formatting rST in `htmlize` (as is done now): Raw html can be escaped by + raw blocks: + + .. raw:: html + + \[[!inline and do stuff]] + + (This can be simplified to alias the above as `.. ikiwiki::`) + This escape method works, if ikwiki can be persuaded to maintain the + indent when inserting html, so that it stays inside the raw block. + +2. Formatting rST in `filter` (idea) + 1. rST does not have to see any HTML (raw not needed) + 2. rST directives can alias ikiwiki syntax: + + ..ikiwiki:: inline pages= ... -Desing issues in general: + 3. Using rST directives as ikiwiki directives can be complicated; + but rST directives allow a direct line (after :: on first line), + an option list, and a content block. -We resolve rST links without definition, we don't help resolving defined relative links, so we don't support specifying link name and target separately. + +**Discussion** + +I guess you (or someone) has been through this before and knows why it +simply won't work. But I hoped there was something original in the above; +and I know there are wiki installations where rST works. --ulrik + +**Individual reStructuredText Issues** + +* We resolve rST links without definition, we don't help resolving defined + relative links, so we don't support specifying link name and target + separately. > I found out this is possible by using rST subsitutions. So to do [[Version history...|releases]] > you would use: @@ -33,8 +89,28 @@ We resolve rST links without definition, we don't help resolving defined relativ > > ``Version history `_`. --ulrik [kaizer.se] +**A first implementation: Resolving unmatched links** + +I have a working minimal implementation letting the rst renderer resolve +undefined native rST links to ikiwiki pages. I have posted it as one patch at: + +Preview commit: http://github.com/engla/ikiwiki/commit/486fd79e520da1d462f00f40e7a90ab07e9c6fdf +Repository: git://github.com/engla/ikiwiki.git + +Design issues of the patch: + +The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to generate backlinks). Can the parse output be safely reused? + +> The page content fed to htmlize may be different than that fed to scan, +> as directives can change the content. If you cached the input and output +> at scan time, you could reuse the cached data at htmlize time for inputs +> that are the same -- but that could be a very big cache! --[[Joey]] -Many other issues with rST are of course unresolved, but some might be solved by implementing custom rST directives (which is a supported extension mechanism). +>> I would propose using a simple heuristic: If you see \[[ anywhere on the +>> page, don't cache it. It would be an effective cache for pure-rst wikis +>> (without any ikiwiki directives or wikilinks). +>> However, I think that if the cache does not work for a big load, it should +>> not work at all; small loads are small so they don't matter. --ulrik Patch follows: -- cgit v1.2.3 From 18151b8152f01421bb42ab62d9fabd56038126e1 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 18 Sep 2009 20:07:18 +0200 Subject: about default-role --- .../Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 49be3f30a..ba9440b43 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -23,9 +23,16 @@ tie together wiki of rst documents. **Proposal 2**. This is a simple wiki page, with :wiki:`WikiLinks` and other_ links - + .. _other: wiki:wikilink + We can get rid of the role part as well for WikiLinks:: + + .. default-role:: wiki + + Enables `WikiLinks` but does not impact references such as ``other`` + This can be made the default for ikiwiki. + Benefits of using a `:role:` and a `wiki: page/subpage` URL scheme are following: -- cgit v1.2.3 From ada46376cc91c754710fea138f619de72d042ec2 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Fri, 18 Sep 2009 20:07:34 -0400 Subject: Toggle inserts javascript in wrong place --- doc/bugs/toggle_expects_body_element_without_attributes.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/bugs/toggle_expects_body_element_without_attributes.mdwn (limited to 'doc') diff --git a/doc/bugs/toggle_expects_body_element_without_attributes.mdwn b/doc/bugs/toggle_expects_body_element_without_attributes.mdwn new file mode 100644 index 000000000..6cb03e934 --- /dev/null +++ b/doc/bugs/toggle_expects_body_element_without_attributes.mdwn @@ -0,0 +1 @@ +The toggle plugins checks for a `` in the page; if not found, javascript tags are inserted at the top of the document. Since my page uses ``; a plain `` is not found and I get script links before the docstring declaration. Please see the source of the following toggle-using page: http://kaizer.se/wiki/kupfer/ -- ulrik [kaizer.se] -- cgit v1.2.3 From 6c4a2a88a871af5ac42cd80aa48684b114849e3d Mon Sep 17 00:00:00 2001 From: "http://davrieb.livejournal.com/" Date: Sat, 19 Sep 2009 01:45:55 -0400 Subject: --- doc/forum/How_does_ikiwiki_remember_times__63__.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc') diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index 5522cbf45..cb14df77f 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -87,3 +87,21 @@ Do I have it right? $EDITOR "$pagename" >>>>> -- [[Jon]] + +> A quick workaround for me to get modification times right is the following +> little zsh script, which unfortynately only works for git: + + #!/usr/bin/env zsh + + set +x + + for FILE in **/*(.); do + TIMES="`git log --follow --pretty=format:%ai $FILE`" + #CTIME="`echo $TIMES | tail -n1`" + MTIME="`echo $TIMES | head -n1`" + + echo touch -m -d "$MTIME" $FILE + touch -m -d "$MTIME" $FILE + + done + -- cgit v1.2.3 From f8bc52eea3b39a989a7dd8ab2b1746266d208d71 Mon Sep 17 00:00:00 2001 From: "http://davrieb.livejournal.com/" Date: Sat, 19 Sep 2009 01:49:16 -0400 Subject: fix a typo and remove commneted out ctime line --- doc/forum/How_does_ikiwiki_remember_times__63__.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index cb14df77f..9685a6859 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -89,7 +89,7 @@ Do I have it right? >>>>> -- [[Jon]] > A quick workaround for me to get modification times right is the following -> little zsh script, which unfortynately only works for git: +> little zsh script, which unfortunately only works for git: #!/usr/bin/env zsh @@ -97,7 +97,6 @@ Do I have it right? for FILE in **/*(.); do TIMES="`git log --follow --pretty=format:%ai $FILE`" - #CTIME="`echo $TIMES | tail -n1`" MTIME="`echo $TIMES | head -n1`" echo touch -m -d "$MTIME" $FILE -- cgit v1.2.3 From 3b33b3cc3f3dd76b501ac237fe18bd7e5f823234 Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sat, 19 Sep 2009 05:32:22 -0400 Subject: question about using 404 and search --- doc/forum/missing_pages_redirected_to_search.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/forum/missing_pages_redirected_to_search.mdwn (limited to 'doc') diff --git a/doc/forum/missing_pages_redirected_to_search.mdwn b/doc/forum/missing_pages_redirected_to_search.mdwn new file mode 100644 index 000000000..cd544ecaf --- /dev/null +++ b/doc/forum/missing_pages_redirected_to_search.mdwn @@ -0,0 +1,4 @@ +Is it possible to have any missing pages(404's) redirected to the search(omega) ? +So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au) + + -- cgit v1.2.3 From 8ae7356b09ffa78fb174dde7c5c31c08177eb6db Mon Sep 17 00:00:00 2001 From: "http://davrieb.livejournal.com/" Date: Sat, 19 Sep 2009 19:46:06 -0400 Subject: some script cleanup --- doc/forum/How_does_ikiwiki_remember_times__63__.mdwn | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index 9685a6859..df9636a1e 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -96,11 +96,13 @@ Do I have it right? set +x for FILE in **/*(.); do - TIMES="`git log --follow --pretty=format:%ai $FILE`" + TIMES="`git log --pretty=format:%ai $FILE`" MTIME="`echo $TIMES | head -n1`" - echo touch -m -d "$MTIME" $FILE - touch -m -d "$MTIME" $FILE + if [ ! -z $MTIME ]; then + echo touch -m -d "$MTIME" $FILE + touch -m -d "$MTIME" $FILE + fi done -- cgit v1.2.3 From 76871bb0526b3caabfdd8baec5faba4a732339ae Mon Sep 17 00:00:00 2001 From: "http://bob-bernstein.myopenid.com/" Date: Sat, 19 Sep 2009 20:37:27 -0400 Subject: --- doc/css/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/css/discussion.mdwn (limited to 'doc') diff --git a/doc/css/discussion.mdwn b/doc/css/discussion.mdwn new file mode 100644 index 000000000..c80aa86bc --- /dev/null +++ b/doc/css/discussion.mdwn @@ -0,0 +1,7 @@ +I must be doing something wrong. Running setup: + +$ ikiwiki --setup MyIkiwiki.setup + +overwrites my local.css with the default (empty) version. + +I am using ikiwiki_3.1415926.tar.gz installed into /usr/local. -- cgit v1.2.3 From d51ea7ae56907c8b0ede419546f13dd8ac1fb81d Mon Sep 17 00:00:00 2001 From: "http://bob-bernstein.myopenid.com/" Date: Sat, 19 Sep 2009 23:53:58 -0400 Subject: --- doc/css/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/css/discussion.mdwn b/doc/css/discussion.mdwn index c80aa86bc..c97682e71 100644 --- a/doc/css/discussion.mdwn +++ b/doc/css/discussion.mdwn @@ -5,3 +5,6 @@ $ ikiwiki --setup MyIkiwiki.setup overwrites my local.css with the default (empty) version. I am using ikiwiki_3.1415926.tar.gz installed into /usr/local. + +--- +Sorry. Never mind. RTFM. --refresh duh. -- cgit v1.2.3 From 254046edcb4c2ed66bf14dbe3526d39acac9cfe3 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Mon, 21 Sep 2009 23:50:42 +0200 Subject: Posting patch series for rst Wikilinks and Preproc indent --- ...ve_reStructuredText_links_to_ikiwiki_pages.mdwn | 163 ++++++--------------- 1 file changed, 42 insertions(+), 121 deletions(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index ba9440b43..54d9a6c4b 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -2,12 +2,14 @@ _NB! this page has been refactored, hopefully it is clearer now_ _I propose putting discussion posts somewhere in the vincity of the secttion Individual reStructuredText Issues_ +## Design ## + **Goal** To be able to use rst as a first-class markup language in ikiwiki. I think most believe this is almost impossible (ikiwiki is built around markdown). -**Design** +## Wikilinks ## **WikiLinks**, first and foremost, are needed for a wiki. rST already allows specifying absolue and relative URL links, and relative links can be used to @@ -44,9 +46,37 @@ following: .. role:: wiki (title) -*Implementation* there is no implementation of Proposal 2 but it should be -doable; adding a local role is trivial. Rewriting `wiki:` links could be -done in the format phase(?). +### Implementation ### + +Implementation of Proposal-2 wikilinks are in the branch +[rst-wikilinks][rst-wl] + + + This is a simple wiki page, with :wiki:`WikiLinks` and |named| links + + .. |named| wiki:: Some Page + + We can get rid of the role part as well for WikiLinks:: + + .. default-role:: wiki + + Enables `WikiLinks` but does not impact references such as ``named`` + This can be made the default for ikiwiki. + +[rst-wl]: http://github.com/engla/ikiwiki/commits/rst-wikilinks + +On top of **rst-wikilinks** is [rst-customize][rst-custom] which adds two +power user features: Global (python) file to read in custom directives +(unsafe), and a wikifile as "header" file for all parsed .rst files (safe, +but disruptive since all .rst depend on it). Well, the customizations have +to be picked and chosen from this, but at least the global python file can +be very convenient. + +Some rst-custom [examples are here](http://kaizer.se/wiki/rst_examples/) + +[rst-custom]: http://github.com/engla/ikiwiki/commits/rst-customize + +## Directives ## Now **Directives**: As it is now, ikiwiki goes though (roughly): filter, preprocess, htmlize, format as major stages of content @@ -74,8 +104,13 @@ picture before it. but rST directives allow a direct line (after :: on first line), an option list, and a content block. +### Implementation ### + +Preserving indents in the preprocessor are in branch [pproc-indent][ppi] -**Discussion** +[ppi]: http://github.com/engla/ikiwiki/commits/pproc-indent + +## Discussion ## I guess you (or someone) has been through this before and knows why it simply won't work. But I hoped there was something original in the above; @@ -86,15 +121,8 @@ and I know there are wiki installations where rST works. --ulrik * We resolve rST links without definition, we don't help resolving defined relative links, so we don't support specifying link name and target separately. - -> I found out this is possible by using rST subsitutions. So to do [[Version history...|releases]] -> you would use: -> -> `|releases|_` -> `.. |releases| replace:: Version history...` -> Which does not seem to have an inline equivalent. Using non-resolved links there is the alternative: -> -> ``Version history `_`. --ulrik [kaizer.se] + + * Resolved by |replacement| links with the wiki:: directive. **A first implementation: Resolving unmatched links** @@ -119,110 +147,3 @@ The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to genera >> However, I think that if the cache does not work for a big load, it should >> not work at all; small loads are small so they don't matter. --ulrik -Patch follows: - ----- -
-	From 486fd79e520da1d462f00f40e7a90ab07e9c6fdf Mon Sep 17 00:00:00 2001
-	From: Ulrik Sverdrup 
-	Date: Thu, 17 Sep 2009 15:18:50 +0200
-	Subject: [PATCH] rst: Resolve native reStructuredText links to ikiwiki pages
-
-	Links in rST use syntax `Like This`_ or OneWordLink_, and are
-	generally used for relative or absolue links, with an auxiliary
-	definition:
-
-	.. _`Like This`: http://ikiwiki.info
-	.. _OneWordLink: relative
-
-	We can hook into docutils to resolve unresolved links so that rST
-	links without definition can be resolved to wiki pages. This enables
-	WikiLink_ to link to [[WikiLink]] (if no .. _WikiLink is specified).
-
-	Comparing to Ikiwiki's wikilinks
-
-	[[blogging|blog]] specifies a link to the page blog, with the name
-	blogging. In rST we should use blogging_
-
-	.. _blogging: blog
-
-	*However*, note that this patch does not hook into this. What we
-	resolve in this patch is finding the appropriate "_blogging" if it is
-	not found, not resolving the address 'blog'.
-	---
-	 plugins/rst |   46 +++++++++++++++++++++++++++++++++++++++++-----
-	 1 files changed, 41 insertions(+), 5 deletions(-)
-
-	diff --git a/plugins/rst b/plugins/rst
-	index a2d07eb..a74baa8 100755
-	--- a/plugins/rst
-	+++ b/plugins/rst
-	@@ -6,22 +6,58 @@
-	 # based a little bit on rst.pm by Sergio Talens-Oliag, but only a little bit. :)
-	 #
-	 # Copyright © martin f. krafft 
-	+# Copyright © Ulrik Sverdrup , 2009
-	+#
-	 # Released under the terms of the GNU GPL version 2
-	 #
-	+
-	 __name__ = 'rst'
-	 __description__ = 'xml-rpc-based ikiwiki plugin to process RST files'
-	-__version__ = '0.3'
-	+__version__ = '0.3+'
-	 __author__ = 'martin f. krafft '
-	 __copyright__ = 'Copyright © ' + __author__
-	 __licence__ = 'GPLv2'
-	 
-	 from docutils.core import publish_parts;
-	+from docutils.writers import html4css1
-	 from proxy import IkiWikiProcedureProxy
-	 
-	-def rst2html(proxy, *kwargs):
-	-    # FIXME arguments should be treated as a hash, the order could change
-	-    # at any time and break this.
-	-    parts = publish_parts(kwargs[3], writer_name='html',
-	+class IkiwikiWriter(html4css1.Writer):
-	+    def resolve_node(self, node):
-	+        refname = node.get('refname', None)
-	+        if not refname:
-	+            return False
-	+
-	+        bestlink = self.proxy.rpc('bestlink', self.page, refname)
-	+
-	+        node.resolved = 1
-	+        node['class'] = 'wiki'
-	+        del node['refname']
-	+
-	+        if not bestlink:
-	+            rel_url = "#"
-	+        else:
-	+            rel_url = self.proxy.rpc('urlto', bestlink, self.page)
-	+            self.proxy.rpc('add_link', self.page, bestlink)
-	+        node['refuri'] = rel_url
-	+        self.proxy.rpc('debug', "Emitting link %s => %s" % (refname, rel_url))
-	+        return True
-	+
-	+    resolve_node.priority = 1
-	+
-	+    def __init__(self, proxy, page):
-	+        html4css1.Writer.__init__(self)
-	+        self.proxy = proxy
-	+        self.page = page
-	+        self.unknown_reference_resolvers = (self.resolve_node, )
-	+
-	+def rst2html(proxy, *args):
-	+    # args is a list paired by key, value, so we turn it into a dict
-	+    kwargs = dict((k, v) for k, v in zip(*[iter(args)]*2))
-	+    page = kwargs['page']
-	+
-	+    parts = publish_parts(kwargs['content'],
-	+                          writer=IkiwikiWriter(proxy, page),
-	                           settings_overrides = { 'halt_level': 6
-	                                                , 'file_insertion_enabled': 0
-	                                                , 'raw_enabled': 1
-	-- 
-	1.6.4
-
-
----- -- cgit v1.2.3 From c399f65b627064de80107f8ee695a9a811604bcd Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Mon, 21 Sep 2009 19:39:03 -0400 Subject: a remark about pproc-indent: I'm not a perl coder. --- doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 54d9a6c4b..d5c92ed6f 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -108,6 +108,9 @@ picture before it. Preserving indents in the preprocessor are in branch [pproc-indent][ppi] +(These simple patches come with a warning: _Those are the first lines of +Perl I've ever written!_) + [ppi]: http://github.com/engla/ikiwiki/commits/pproc-indent ## Discussion ## -- cgit v1.2.3 From d163b06cd6c4a3018a10ced73ec2e74108c3da2a Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Tue, 22 Sep 2009 07:52:10 -0400 Subject: What is missing: Create-links, htmllink --- doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index d5c92ed6f..4bde25bd2 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -76,6 +76,10 @@ Some rst-custom [examples are here](http://kaizer.se/wiki/rst_examples/) [rst-custom]: http://github.com/engla/ikiwiki/commits/rst-customize +**What is missing?** links to nonexistant pages are not resolved. +Perhaps the "link resolver" part should use Ikiwiki's htmllink instead +of its simple subsitutions. + ## Directives ## Now **Directives**: As it is now, ikiwiki goes though (roughly): -- cgit v1.2.3 From 92b3be2f3ef4123f2e5d9afb761cfd7251c2511d Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Tue, 22 Sep 2009 17:17:11 -0400 Subject: rst-wikilinks uses 'htmllink' --- .../Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 4bde25bd2..1782af824 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -65,6 +65,11 @@ Implementation of Proposal-2 wikilinks are in the branch [rst-wl]: http://github.com/engla/ikiwiki/commits/rst-wikilinks +**rst-wikilinks** patch series includes changes at the end to use ikiwiki's +'htmllink' for the links (which is the only sane thing to do to work in all configurations). +This means a :wiki:`Link` should render just exactly like [[Link]] whether +the target exists or not. + On top of **rst-wikilinks** is [rst-customize][rst-custom] which adds two power user features: Global (python) file to read in custom directives (unsafe), and a wikifile as "header" file for all parsed .rst files (safe, @@ -76,10 +81,6 @@ Some rst-custom [examples are here](http://kaizer.se/wiki/rst_examples/) [rst-custom]: http://github.com/engla/ikiwiki/commits/rst-customize -**What is missing?** links to nonexistant pages are not resolved. -Perhaps the "link resolver" part should use Ikiwiki's htmllink instead -of its simple subsitutions. - ## Directives ## Now **Directives**: As it is now, ikiwiki goes though (roughly): -- cgit v1.2.3 From bac0174b786a10d3cb8277bfa519918bd38762c4 Mon Sep 17 00:00:00 2001 From: brush Date: Tue, 22 Sep 2009 18:49:03 -0400 Subject: installation attachments q's --- doc/plugins/contrib/album/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/plugins/contrib/album/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn new file mode 100644 index 000000000..ee3aa6ce4 --- /dev/null +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -0,0 +1,7 @@ +thanks for this plugin. it might help me in my application, which is to provide album/galleries which can be edited (ie. new images added, taken away, etc.) through web interface. + +i have two challenges: firstly, for installation, i'm not sure what all the files are that need to be downloaded (because of my setup i can't easily pull the repo). so far i have Ikiwiki/Plugins/album.pm; ikiwiki-album; and 4 files in templates/ any others? + +secondly: barring the CGI interface for editing the album, which would be great, is there at least a way to use attachment plugin or any other to manually add images and then create viewers for them? + +i'm new to ikiwiki, apologies if this is dealt with elsewhere. -brush -- cgit v1.2.3 From 82ad4f57d67fa6a210436621dcb72404a099da8a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Sep 2009 13:33:15 -0400 Subject: response --- doc/css/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/css/discussion.mdwn b/doc/css/discussion.mdwn index c97682e71..dc9663e56 100644 --- a/doc/css/discussion.mdwn +++ b/doc/css/discussion.mdwn @@ -8,3 +8,11 @@ I am using ikiwiki_3.1415926.tar.gz installed into /usr/local. --- Sorry. Never mind. RTFM. --refresh duh. + +> Hmm, well. Using --refresh is a good thing because it allow ikiwiki to +> update a site quicker. But, it must only be hiding the real problem. +> Sounds like you are trying to edit local.css directly inside +> the destdir. But ikiwiki has a local.css located in its basewiki, +> so when you rebuild your local mods are lost. Fix is to put you +> locally modified local.css inside the srcdir, along with the other pages +> of your wiki. --[[Joey]] -- cgit v1.2.3 From 655e2ddc1f44236d3396be722d55a0afd755d39d Mon Sep 17 00:00:00 2001 From: NicolasLimare Date: Thu, 24 Sep 2009 06:22:13 -0400 Subject: images are not always scaled *down* --- doc/ikiwiki/directive/img.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/img.mdwn b/doc/ikiwiki/directive/img.mdwn index 66efd008e..94cc754bd 100644 --- a/doc/ikiwiki/directive/img.mdwn +++ b/doc/ikiwiki/directive/img.mdwn @@ -22,7 +22,7 @@ You can also pass `alt`, `title`, `class`, `align` and `id` parameters. These are passed through unchanged to the html img tag. If you include a `caption` parameter, the caption will be displayed centered beneath the image. -The `link` parameter is used to control whether the scaled down image links +The `link` parameter is used to control whether the scaled image links to the full size version. By default it does; set "link=somepage" to link to another page instead, or "link=no" to disable the link, or "link=http://url" to link to a given url. -- cgit v1.2.3 From 9540b7e5715ae5886345cdd9c392a92550f7b4bd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 24 Sep 2009 19:05:58 -0400 Subject: add news item for ikiwiki 3.14159265 --- doc/news/version_3.141.mdwn | 28 ---------------------------- doc/news/version_3.14159265.mdwn | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 28 deletions(-) delete mode 100644 doc/news/version_3.141.mdwn create mode 100644 doc/news/version_3.14159265.mdwn (limited to 'doc') diff --git a/doc/news/version_3.141.mdwn b/doc/news/version_3.141.mdwn deleted file mode 100644 index ac76ce023..000000000 --- a/doc/news/version_3.141.mdwn +++ /dev/null @@ -1,28 +0,0 @@ -ikiwiki 3.141 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * comment: Make comment directives no longer use the internal "\_comment" - form, and document the comment directive syntax. - * Avoid relying on translators preserving the case when translating - "discussion", which caused Discussion pages to get unwanted Discussion - links. - * Tighten up matching of bare words inside directives; do not - allow an unterminated triple string to be treated as a series - of bare words. Fixes runaway regexp recursion/backtracking - in strange situations. - * Setup automator: Check that each plugin added to the generated - setup file can be loaded and that its config is ok. If a plugin - fails for any reason, disable it in the generated file. - Closes: [532001](http://bugs.debian.org/532001) - * pagecount: Fix broken optimisation for * pagespec. - * goto: Support being passed a page title that is not a valid page - name, to support several cases including mercurial's long user - names on the RecentChanges page, and urls with spaces being handled - by the 404 plugin. - * Optimise use of gettext, and avoid ugly warnings if Locale::gettext - is not available. Closes: #[532285](http://bugs.debian.org/532285) - * meta: Add openid delegate parameter to allow delegating only - openid or openid2. - * Disable the Preferences link if no plugin with an auth hook is enabled. - * Updated French translation. Closes: #[532654](http://bugs.debian.org/532654) - * aggregate: Fix storing of changed md5. - * aggregate: Avoid resetting ctime when an item md5 changes."""]] diff --git a/doc/news/version_3.14159265.mdwn b/doc/news/version_3.14159265.mdwn new file mode 100644 index 000000000..ed46b09ea --- /dev/null +++ b/doc/news/version_3.14159265.mdwn @@ -0,0 +1,18 @@ +ikiwiki 3.14159265 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Add complete French basewiki and underlays translation from the Debian + French l10n team, including Philippe Batailler, Alexandre Dupas, and + Steve Petruzzello. + * Expand banned\_users; it can now include PageSpecs, which + allows banning by IP address. + * underlay: Also allow configuring additional directories to search + for template files in. + * Fix parsing web commits from ipv6 addresses. + * Add genwrapper hook, that can be used to add code into the C wrapper. + * cvs: Yeah, ikiwiki even supports CVS now. Plugin contributed by + Amitai Schlair. + * Updated Czech translation from Miroslav Kure. Closes: #[546223](http://bugs.debian.org/546223) + * rsync: New plugin that allows pushing the destdir to a remote host + via rsync or similar. Thanks, Amitai Schlair. + * auto.setup, auto-blog.setup: Fix sanitization of entered wikiname. + Closes: #[547378](http://bugs.debian.org/547378)"""]] \ No newline at end of file -- cgit v1.2.3 From 0b0116cb986bf5840c8e40e57f5a45501c3d22f6 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Fri, 25 Sep 2009 06:35:43 +0200 Subject: create myself a user page and link from my signatures so far --- doc/forum/How_does_ikiwiki_remember_times__63__.mdwn | 1 + doc/plugins/tag/discussion.mdwn | 2 +- doc/users/David_Riebenbauer.mdwn | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 doc/users/David_Riebenbauer.mdwn (limited to 'doc') diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index df9636a1e..6ce576db1 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -106,3 +106,4 @@ Do I have it right? done +> --[[David_Riebenbauer]] diff --git a/doc/plugins/tag/discussion.mdwn b/doc/plugins/tag/discussion.mdwn index b6dab5358..03dcb7b2f 100644 --- a/doc/plugins/tag/discussion.mdwn +++ b/doc/plugins/tag/discussion.mdwn @@ -16,7 +16,7 @@ Thanks. That works fine. @Ben: could you publish the code for that? ---David Riebenbauer +--[[David_Riebenbauer]] AOLMODE=true echo "I too would really like this feature, which would make cgi free life much better" --[[DavidBremner]] diff --git a/doc/users/David_Riebenbauer.mdwn b/doc/users/David_Riebenbauer.mdwn new file mode 100644 index 000000000..657314ee1 --- /dev/null +++ b/doc/users/David_Riebenbauer.mdwn @@ -0,0 +1,2 @@ +Runs ikiwiki on his [homepage](http://liegesta.at/) and can be reached through +davrieb@liegesta.at -- cgit v1.2.3 From 9106d3218c7b32f3fe74aab4ff044e7449a8d4da Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Fri, 25 Sep 2009 06:48:39 +0200 Subject: fix email address linking --- doc/users/David_Riebenbauer.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/David_Riebenbauer.mdwn b/doc/users/David_Riebenbauer.mdwn index 657314ee1..372a28588 100644 --- a/doc/users/David_Riebenbauer.mdwn +++ b/doc/users/David_Riebenbauer.mdwn @@ -1,2 +1,2 @@ Runs ikiwiki on his [homepage](http://liegesta.at/) and can be reached through -davrieb@liegesta.at + -- cgit v1.2.3 From be47e501c32cec7660129f430a4f93ee7fe8d3ff Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 25 Sep 2009 14:19:49 -0400 Subject: reply to potential album user --- doc/plugins/contrib/album/discussion.mdwn | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index ee3aa6ce4..7a3c19cf6 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -1,7 +1,53 @@ thanks for this plugin. it might help me in my application, which is to provide album/galleries which can be edited (ie. new images added, taken away, etc.) through web interface. +> That's my goal eventually, too. Perhaps you can help to +> design/write this plugin? At the moment I'm mostly +> waiting for a design "sanity check" from [[Joey]], +> but any feedback you can provide on the design would +> also be helpful. --[[smcv]] + i have two challenges: firstly, for installation, i'm not sure what all the files are that need to be downloaded (because of my setup i can't easily pull the repo). so far i have Ikiwiki/Plugins/album.pm; ikiwiki-album; and 4 files in templates/ any others? +> Those are all the added files; ikiwiki-album isn't strictly +> needed (IkiWiki itself doesn't use that code, but you can +> use it to turn a directory full of images into correct +> input for the album plugin). +> +> You probably also want the album plugin's expanded version of +> style.css (or put its extra rules in your local.css). +> Without that, your albums will be quite ugly. +> +> There aren't currently any other files modified by my branch. +> --[[smcv]] + secondly: barring the CGI interface for editing the album, which would be great, is there at least a way to use attachment plugin or any other to manually add images and then create viewers for them? +> Images are just attachments, and viewers are pages (any supported +> format, but .html will be fastest to render). Attach each image, +> then write a page for each image containing the +> \[[!albumimage]] directive (usually it will *only* contain that +> directive). +> +> The script ikiwiki-album can help you to do this in a git/svn/etc. +> tree; doing it over the web will be a lot of work (until I get +> the CGI interface written), but it should already be possible! +> +> The structure is something like this: +> +> * album.mdwn (contains the \[[!album]] directive, and perhaps also +> some \[[!albumsection]] directives) +> * album/a.jpg +> * album/a.html (contains the \[[!albumimage]] directive for a.jpg) +> * album/b.jpg +> * album/b.html (contains the \[[!albumimage]] directive for b.jpg) +> +> Have a look at ikiwiki-album to see how the directives are meant to +> work in practice. +> +> --[[smcv]] + i'm new to ikiwiki, apologies if this is dealt with elsewhere. -brush + +> This plugin is pretty ambitious, and is unfinished, so I'd recommend +> playing with a normal IkiWiki installation for a bit, then trying +> out this plugin when you've mastered the basics of IkiWiki. --[[smcv]] -- cgit v1.2.3 From 9d96253d2b10f5bf56b7bd64635754508d969cb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 25 Sep 2009 15:41:13 -0400 Subject: add comments page to example blog, listing all comments --- doc/examples/blog/comments.mdwn | 3 +++ doc/examples/blog/index.mdwn | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 doc/examples/blog/comments.mdwn (limited to 'doc') diff --git a/doc/examples/blog/comments.mdwn b/doc/examples/blog/comments.mdwn new file mode 100644 index 000000000..c46f95df7 --- /dev/null +++ b/doc/examples/blog/comments.mdwn @@ -0,0 +1,3 @@ +This page will show all comments made to posts in my [[blog|index]]. + +[[!inline pages="*/Discussion or internal(./posts/*/comment_*)"]] diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index 84c732dd1..aef46eb68 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -3,7 +3,7 @@ Welcome to my blog. Have a look at the most recent posts below, or browse the tag cloud on the -right. An archive of all [[posts]] is also available. +right. Archives of all [[posts]] and all [[comments]] are also available. [[!inline pages="./posts/* and !*/Discussion" show="10" actions=yes rootpage="posts"]] -- cgit v1.2.3 From 5b14129e0b03e66013c8ab2adbf65cae00b623fd Mon Sep 17 00:00:00 2001 From: "95.88.220.68" <95.88.220.68@web> Date: Fri, 25 Sep 2009 18:59:26 -0400 Subject: poll vote (Accept only password logins) --- doc/news/openid.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index 79eeaec01..d61266133 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 63 "Accept only OpenID for logins" 20 "Accept only password logins" 36 "Accept both"]] +[[!poll 63 "Accept only OpenID for logins" 21 "Accept only password logins" 36 "Accept both"]] -- cgit v1.2.3 From 490b17dc1582c7ce4e9f9a78c10954b10ee7c2a2 Mon Sep 17 00:00:00 2001 From: "121.21.240.138" <121.21.240.138@web> Date: Fri, 25 Sep 2009 23:25:19 -0400 Subject: poll vote (Accept only OpenID for logins) --- doc/news/openid.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index d61266133..4f1ee7bf7 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 63 "Accept only OpenID for logins" 21 "Accept only password logins" 36 "Accept both"]] +[[!poll 64 "Accept only OpenID for logins" 21 "Accept only password logins" 36 "Accept both"]] -- cgit v1.2.3 From cd296bb7762f8fc2f2e767e9d3c54a00ee1fb063 Mon Sep 17 00:00:00 2001 From: "http://openid2.kisikew.org/simonraven" Date: Sat, 26 Sep 2009 15:02:52 -0400 Subject: --- doc/users/simonraven.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/users/simonraven.mdwn b/doc/users/simonraven.mdwn index 5fc24711e..85c530fbe 100644 --- a/doc/users/simonraven.mdwn +++ b/doc/users/simonraven.mdwn @@ -6,3 +6,8 @@ New ikiwiki site at my web site, blog, kisikew.org home site, for indigenews, an Maintain my own branch, partly to learn about VCS, git, ikiwiki, Debian packaging, and Perl. I don't recommend anyone pull from it, as I use third-party plugins included on this site that people may not want in a default installation of ikiwiki. This is why I don't push to Joey's -- so it's nothing personal, I just don't want to mess things up for other people, from my mistakes and stumbles. +### Logins here + +[[http://openid2.kisikew.org/simonraven|http://openid2.kisikew.org/simonraven]] + +[[simonraven|simonraven]] -- cgit v1.2.3 From 3440a015ba7f4995f5a9c54c5ffff4aeec54ca54 Mon Sep 17 00:00:00 2001 From: "http://openid2.kisikew.org/simonraven" Date: Sat, 26 Sep 2009 15:05:57 -0400 Subject: --- doc/users/simonraven.mdwn | 5 ----- 1 file changed, 5 deletions(-) (limited to 'doc') diff --git a/doc/users/simonraven.mdwn b/doc/users/simonraven.mdwn index 85c530fbe..5fc24711e 100644 --- a/doc/users/simonraven.mdwn +++ b/doc/users/simonraven.mdwn @@ -6,8 +6,3 @@ New ikiwiki site at my web site, blog, kisikew.org home site, for indigenews, an Maintain my own branch, partly to learn about VCS, git, ikiwiki, Debian packaging, and Perl. I don't recommend anyone pull from it, as I use third-party plugins included on this site that people may not want in a default installation of ikiwiki. This is why I don't push to Joey's -- so it's nothing personal, I just don't want to mess things up for other people, from my mistakes and stumbles. -### Logins here - -[[http://openid2.kisikew.org/simonraven|http://openid2.kisikew.org/simonraven]] - -[[simonraven|simonraven]] -- cgit v1.2.3 From 217141eb1a12d5f49616f907c127b74d9d9f0aab Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" Date: Sun, 27 Sep 2009 16:43:50 -0400 Subject: --- doc/bugs/libdir_not_used_in_wrappers.mdwn | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/bugs/libdir_not_used_in_wrappers.mdwn (limited to 'doc') diff --git a/doc/bugs/libdir_not_used_in_wrappers.mdwn b/doc/bugs/libdir_not_used_in_wrappers.mdwn new file mode 100644 index 000000000..baca5750e --- /dev/null +++ b/doc/bugs/libdir_not_used_in_wrappers.mdwn @@ -0,0 +1,28 @@ +If I install ikiwiki in a user directory (let's say /home/bruno/ikiwiki) with all perl modules (thoses coming from Bundle::Ikiwiki and Bundle::Ikiwiki:Extras) inside that directory (in /home/bruno/ikiwiki/lib/perl5) then the generated CGI wrapper generated does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. + +This is bad when you try to install Ikiwiki in such a way (everything needed by ikiwiki in one single directory) since ikiwiki is unusable in such case. + +Situations where this behavior (everything in one directory) may be wanted include installing latest ikiwiki on Debian stable, Ubuntu or more simply installing it on any hosting provider without root access. + +Here is a simple patch correcting that behavior. + +
+---
+ IkiWiki/Wrapper.pm |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
+index ff110b5..5289966 100644
+--- a/IkiWiki/Wrapper.pm
++++ b/IkiWiki/Wrapper.pm
+@@ -121,6 +121,7 @@ $check_commit_hook
+ $envsave
+        newenviron[i++]="HOME=$ENV{HOME}";
+        newenviron[i++]="WRAPPED_OPTIONS=$configstring";
++       newenviron[i++]="PERL5LIB=$config{libdir}";
+        newenviron[i]=NULL;
+        environ=newenviron;
+ 
+-- 
+1.6.0.4
+
-- cgit v1.2.3 From 362033885f8eb68addd3ef5e53a22a772cfe5fd7 Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" Date: Sun, 27 Sep 2009 16:48:04 -0400 Subject: --- doc/bugs/libdir_not_used_in_wrappers.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/libdir_not_used_in_wrappers.mdwn b/doc/bugs/libdir_not_used_in_wrappers.mdwn index baca5750e..d3baa0bfb 100644 --- a/doc/bugs/libdir_not_used_in_wrappers.mdwn +++ b/doc/bugs/libdir_not_used_in_wrappers.mdwn @@ -1,3 +1,5 @@ +[[!tag patch wishlist]] + If I install ikiwiki in a user directory (let's say /home/bruno/ikiwiki) with all perl modules (thoses coming from Bundle::Ikiwiki and Bundle::Ikiwiki:Extras) inside that directory (in /home/bruno/ikiwiki/lib/perl5) then the generated CGI wrapper generated does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. This is bad when you try to install Ikiwiki in such a way (everything needed by ikiwiki in one single directory) since ikiwiki is unusable in such case. @@ -26,3 +28,5 @@ index ff110b5..5289966 100644 -- 1.6.0.4 + +-- [[/users/bbb]] -- cgit v1.2.3 From 40947d522ccdc4187fd6fcb16c5865085fe393c7 Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" Date: Sun, 27 Sep 2009 16:49:43 -0400 Subject: --- doc/bugs/libdir_not_used_in_wrappers.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/libdir_not_used_in_wrappers.mdwn b/doc/bugs/libdir_not_used_in_wrappers.mdwn index d3baa0bfb..05ccf44c9 100644 --- a/doc/bugs/libdir_not_used_in_wrappers.mdwn +++ b/doc/bugs/libdir_not_used_in_wrappers.mdwn @@ -1,6 +1,6 @@ [[!tag patch wishlist]] -If I install ikiwiki in a user directory (let's say /home/bruno/ikiwiki) with all perl modules (thoses coming from Bundle::Ikiwiki and Bundle::Ikiwiki:Extras) inside that directory (in /home/bruno/ikiwiki/lib/perl5) then the generated CGI wrapper generated does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. +If I install ikiwiki in a user directory (let's say /home/bruno/ikiwiki) with all perl modules (thoses coming from Bundle::Ikiwiki and Bundle::Ikiwiki:Extras) inside that directory (in /home/bruno/ikiwiki/lib/perl5) then the generated CGI wrapper does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. This is bad when you try to install Ikiwiki in such a way (everything needed by ikiwiki in one single directory) since ikiwiki is unusable in such case. -- cgit v1.2.3 From bfad3f23d07ab58502a507fcdaf9254b08f4f23d Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sun, 27 Sep 2009 18:05:52 -0400 Subject: rename forum/missing_pages_redirected_to_search.mdwn to forum/missing_pages_redirected_to_search-SOLVED.mdwn --- doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn | 4 ++++ doc/forum/missing_pages_redirected_to_search.mdwn | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn delete mode 100644 doc/forum/missing_pages_redirected_to_search.mdwn (limited to 'doc') diff --git a/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn new file mode 100644 index 000000000..cd544ecaf --- /dev/null +++ b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn @@ -0,0 +1,4 @@ +Is it possible to have any missing pages(404's) redirected to the search(omega) ? +So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au) + + diff --git a/doc/forum/missing_pages_redirected_to_search.mdwn b/doc/forum/missing_pages_redirected_to_search.mdwn deleted file mode 100644 index cd544ecaf..000000000 --- a/doc/forum/missing_pages_redirected_to_search.mdwn +++ /dev/null @@ -1,4 +0,0 @@ -Is it possible to have any missing pages(404's) redirected to the search(omega) ? -So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au) - - -- cgit v1.2.3 From ba4071bde21a199e77f15b54d8785debc69613e6 Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sun, 27 Sep 2009 18:06:19 -0400 Subject: updated with nginx solution --- .../missing_pages_redirected_to_search-SOLVED.mdwn | 34 +++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn index cd544ecaf..3af83396c 100644 --- a/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn +++ b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn @@ -1,4 +1,36 @@ Is it possible to have any missing pages(404's) redirected to the search(omega) ? -So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au) +So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au) +##DONE + +I use nginx instead of apache. +Just add the following to the `server` block outside of any location block in nginx.conf +You must also make sure you have setup and enabled the search plugin(omega) + + error_page 404 /ikiwiki.cgi?P=$uri; + + +My full nginx.conf + + server { + listen [::]:80; #IPv6 capable + server_name www.lunix.com.au; + access_log /var/log/nginx/www.lunix.com.au-access.log main; + error_log /var/log/nginx/www.lunix.com.au-error.log warn; + error_page 404 /ikiwiki.cgi?P=$uri; + + location / { + root /home/lunix/public_html/lunix; + index index.html index.htm; + } + + location ~ ikiwiki\.cgi$ { + root /home/lunix/public_html/lunix; + include /etc/nginx/fastcgi_params.cgi; + + fastcgi_pass 127.0.0.1:9999; + fastcgi_param SCRIPT_FILENAME /home/lunix/public_html/lunix$fastcgi_script_name; # same path as above + } + } + -- cgit v1.2.3 From 6c418c284877f5ddf4795594bc9ac43de63de9cb Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" Date: Sun, 27 Sep 2009 20:30:50 -0400 Subject: removed --- doc/bugs/libdir_not_used_in_wrappers.mdwn | 32 ------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 doc/bugs/libdir_not_used_in_wrappers.mdwn (limited to 'doc') diff --git a/doc/bugs/libdir_not_used_in_wrappers.mdwn b/doc/bugs/libdir_not_used_in_wrappers.mdwn deleted file mode 100644 index 05ccf44c9..000000000 --- a/doc/bugs/libdir_not_used_in_wrappers.mdwn +++ /dev/null @@ -1,32 +0,0 @@ -[[!tag patch wishlist]] - -If I install ikiwiki in a user directory (let's say /home/bruno/ikiwiki) with all perl modules (thoses coming from Bundle::Ikiwiki and Bundle::Ikiwiki:Extras) inside that directory (in /home/bruno/ikiwiki/lib/perl5) then the generated CGI wrapper does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. - -This is bad when you try to install Ikiwiki in such a way (everything needed by ikiwiki in one single directory) since ikiwiki is unusable in such case. - -Situations where this behavior (everything in one directory) may be wanted include installing latest ikiwiki on Debian stable, Ubuntu or more simply installing it on any hosting provider without root access. - -Here is a simple patch correcting that behavior. - -
----
- IkiWiki/Wrapper.pm |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
-index ff110b5..5289966 100644
---- a/IkiWiki/Wrapper.pm
-+++ b/IkiWiki/Wrapper.pm
-@@ -121,6 +121,7 @@ $check_commit_hook
- $envsave
-        newenviron[i++]="HOME=$ENV{HOME}";
-        newenviron[i++]="WRAPPED_OPTIONS=$configstring";
-+       newenviron[i++]="PERL5LIB=$config{libdir}";
-        newenviron[i]=NULL;
-        environ=newenviron;
- 
--- 
-1.6.0.4
-
- --- [[/users/bbb]] -- cgit v1.2.3 From 3525a6b7f23421779091daad7a1e19b02d7db141 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 28 Sep 2009 16:21:03 -0400 Subject: toggle, relativedate: Support templates that add attributes to the body tag. --- IkiWiki/Plugin/relativedate.pm | 2 +- IkiWiki/Plugin/toggle.pm | 2 +- debian/changelog | 2 ++ doc/bugs/toggle_expects_body_element_without_attributes.mdwn | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index 3e33cd5c3..06df2efd5 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -26,7 +26,7 @@ sub getsetup () { sub format (@) { my %params=@_; - if (! ($params{content}=~s!^()!$1.include_javascript($params{page})!em)) { + if (! ($params{content}=~s!^(]*>)!$1.include_javascript($params{page})!em)) { # no tag, probably in preview mode $params{content}=include_javascript($params{page}, 1).$params{content}; } diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index aae8cdf84..ef066a42f 100644 --- a/IkiWiki/Plugin/toggle.pm +++ b/IkiWiki/Plugin/toggle.pm @@ -68,7 +68,7 @@ sub format (@) { if ($params{content}=~s!(
\s*)
!$1!g) { $params{content}=~s/
//g; - if (! ($params{content}=~s!^()!$1.include_javascript($params{page})!em)) { + if (! ($params{content}=~s!^(]*>)!$1.include_javascript($params{page})!em)) { # no tag, probably in preview mode $params{content}=include_javascript($params{page}, 1).$params{content}; } diff --git a/debian/changelog b/debian/changelog index 44c810b00..b368618b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low the toplevel index differently etc. * img: Correct bug in image size calculation code. * img: Fix dependency code for full size images. + * toggle, relativedate: Support templates that add attributes + to the body tag. -- Joey Hess Sun, 27 Sep 2009 17:40:03 -0400 diff --git a/doc/bugs/toggle_expects_body_element_without_attributes.mdwn b/doc/bugs/toggle_expects_body_element_without_attributes.mdwn index 6cb03e934..0b39346f4 100644 --- a/doc/bugs/toggle_expects_body_element_without_attributes.mdwn +++ b/doc/bugs/toggle_expects_body_element_without_attributes.mdwn @@ -1 +1,3 @@ The toggle plugins checks for a `` in the page; if not found, javascript tags are inserted at the top of the document. Since my page uses ``; a plain `` is not found and I get script links before the docstring declaration. Please see the source of the following toggle-using page: http://kaizer.se/wiki/kupfer/ -- ulrik [kaizer.se] + +[[fixed|done]] --[[Joey]] -- cgit v1.2.3 From 2736055af532feeb20e23ea49be8115486777439 Mon Sep 17 00:00:00 2001 From: "http://mhymn.pip.verisignlabs.com/" Date: Tue, 29 Sep 2009 09:50:51 -0400 Subject: removing extra space to avoid mistakes --- doc/tips/github.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/github.mdwn b/doc/tips/github.mdwn index c3fdab734..9bdf15751 100644 --- a/doc/tips/github.mdwn +++ b/doc/tips/github.mdwn @@ -24,7 +24,7 @@ for more space, or you can migrate your site elsewhere. ## Local Setup * On your laptop, create two empty git repositories to correspond to the github repositories:
- `YOU = your github username here`
+ `YOU=your github username here`
`mkdir ~/$YOU.github.com`
`cd ~/$YOU.github.com`
`git init`
-- cgit v1.2.3 From d00ccc2f65a915a284b564cc39568fa316c48c57 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" Date: Tue, 29 Sep 2009 12:22:21 -0400 Subject: point backports to lenny instead of etch --- doc/download.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/download.mdwn b/doc/download.mdwn index 015c87f1b..8f5004ca9 100644 --- a/doc/download.mdwn +++ b/doc/download.mdwn @@ -16,8 +16,8 @@ To install with apt, if using Debian or Ubuntu: Or download the deb from . -There is a backport of a recent version of ikiwiki for Debian 4.0 at -. +There is a backport of a recent version of ikiwiki for Debian 5.0 at +. Fedora versions 8 and newer have RPMs of ikiwiki available. -- cgit v1.2.3 From 89577c689c8d1306bbf4c95fd26d9caa50eefabb Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" Date: Tue, 29 Sep 2009 12:41:10 -0400 Subject: test backlinks --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 1f842d499..9dc808219 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -48,6 +48,7 @@ blah ## Different sorts of links: * [[Features]] +* * [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] * * [GNU](http://www.gnu.org/) -- cgit v1.2.3 From 9bea3db4f37a934846cf8d3ac9f57a615bdad422 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Tue, 29 Sep 2009 13:20:13 -0400 Subject: short report so that others know when they encouter this. --- doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn (limited to 'doc') diff --git a/doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn b/doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn new file mode 100644 index 000000000..0b3d4fb2a --- /dev/null +++ b/doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn @@ -0,0 +1,11 @@ +Upgrading to `librpc-xml-perl` 0.69-1 on debian breaks external XML-RPC plugins (such as [[rst]]). +Refresing the wiki fails with an error message like this: + + RPC::XML::Parser::new: This method should have + been overridden by the RPC::XML::Parser class at + /usr/share/perl5/RPC/XML/Parser.pm line 46, line 30. + +It appears an incompatible change in the library creates this problem. + +`librpc-xml-perl` version 0.67-1 works. The easiest solution is to downgrade to this version, +or disable XML-RPC plugins if they are not needed. -- cgit v1.2.3 From 9ed7ee836e977c8a2ea746c27b1638328ec44364 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 29 Sep 2009 13:36:09 -0400 Subject: fixed --- doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn b/doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn index 0b3d4fb2a..d8def82aa 100644 --- a/doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn +++ b/doc/bugs/librpc-xml-perl_0.69_breaks_XML-RPC_plugins.mdwn @@ -9,3 +9,5 @@ It appears an incompatible change in the library creates this problem. `librpc-xml-perl` version 0.67-1 works. The easiest solution is to downgrade to this version, or disable XML-RPC plugins if they are not needed. + +[[fixed|done]] --[[Joey]] -- cgit v1.2.3 From 2aa93377e8845b4dd19af5a470e270c23e4e7e15 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Sep 2009 13:57:36 -0400 Subject: comments and some code review --- ...ve_reStructuredText_links_to_ikiwiki_pages.mdwn | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 1782af824..5f21b2272 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -109,6 +109,25 @@ picture before it. but rST directives allow a direct line (after :: on first line), an option list, and a content block. +> You've done a lot of work already, but ... +> +> The filter approach seems much simpler than the other approaches +> for users to understand, since they can just use identical ikiwiki +> markup on rst pages as they would use anywhere else. This is very desirable +> if the wiki allows rst in addition to mdwn, since then users don't have +> to learn two completly different ways of doing wikilinks and directives. +> I also wonder if even those familiar with rst would find entirely natural +> the ways you've found to shoehorn in wikilinks, named wikilinks, and ikiwiki +> directives? +> +> Htmlize in filter avoids these problems. It also leaves open the possibility +> that ikiwiki could become smarter about the rendering chain later, and learn +> to use a better order for rst (ie, htmlize first). If that later happened, +> the htmlize in filter hack could go away. --[[Joey]] + +> (BTW, the [[plugins/txt]] plugin already does html formatting +> in filter, for similar reasons.) --[[Joey]] + ### Implementation ### Preserving indents in the preprocessor are in branch [pproc-indent][ppi] @@ -116,6 +135,20 @@ Preserving indents in the preprocessor are in branch [pproc-indent][ppi] (These simple patches come with a warning: _Those are the first lines of Perl I've ever written!_) +> This seems like a good idea, since it solves issues for eg, indented +> directives in mdwn as well. But, looking at the diff, I see a clear bug: +> +> - return "[[!$command ". +> + $result = "[[!$command ". +> +> That makes it go on and parse an infinitely nested directive chain, instead +> of immediatly throwing an error. +> +> Also, it seems that the "indent" matching in the regexps may be too broad, +> wouldn't it also match whitespace before a directive that was not at the beginning +> of a line, and treat it as an indent? With some bad luck, that could cause mdwn +> to put the indented output in a pre block. --[[Joey]] + [ppi]: http://github.com/engla/ikiwiki/commits/pproc-indent ## Discussion ## -- cgit v1.2.3 From caa3818effe74c52fc783e31c51f0566c7805e62 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Sep 2009 15:17:03 -0400 Subject: thoughts --- doc/plugins/contrib/album/discussion.mdwn | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 7a3c19cf6..5fb91c5a4 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -51,3 +51,36 @@ i'm new to ikiwiki, apologies if this is dealt with elsewhere. -brush > This plugin is pretty ambitious, and is unfinished, so I'd recommend > playing with a normal IkiWiki installation for a bit, then trying > out this plugin when you've mastered the basics of IkiWiki. --[[smcv]] + +---- + +You had wanted my feedback on the design of this. I have not looked at the +code or tried it yet, but here goes. --[[Joey]] + +* Needing to create the albumimage "viewer" pages for each photo + seems like it will become a pain. Everyone will need to come up + with their own automation for it, and then there's the question + of how to automate it when uploading attachments. +* With each viewer page having next/prev links, I can see how you + were having the scalability issues with ikiwiki's data structures + earlier! +* And doesn't each viewer page really depend on every other page in the + same albumsection? If a new page is added, the next/prev links + may need to be updated, for example. If so, there will be much + unnecessary rebuilding. +* One thing I do like about having individual pages per image is + that they can each have their own comments, etc. +* Seems possibly backwards that the albumimage controls what album + an image appears in. Two use cases -- 1: I may want to make a locked + album, but then anyone who can write to any other page on the wiki can + add an image to it. 2: I may want an image to appear in more than one + album. Think tags. So it seems it would be better to have the album + directive control what pages it includes (a la inline). +* Putting a few of the above thoughts together, my ideal album system + seems to be one where I can just drop the images into a directory and + have them appear in the album index, as well as each generate their own wiki + page. Plus some way I can, later, edit metadata for captions, + etc. (Real pity we can't just put arbitrary metadata into the images + themselves.) This is almost pointing toward making the images first-class + wiki page sources. Hey, it worked for po! :) But the metadata and editing + problems probably don't really allow that. -- cgit v1.2.3 From 4f37413050d4c17cb428820991541595e4645c66 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Wed, 30 Sep 2009 20:54:21 +0200 Subject: Comment, type, discuss and otherwise type wayy to much sorry!! --- ...ve_reStructuredText_links_to_ikiwiki_pages.mdwn | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 5f21b2272..4468ce1e9 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -128,6 +128,54 @@ picture before it. > (BTW, the [[plugins/txt]] plugin already does html formatting > in filter, for similar reasons.) --[[Joey]] +>> Thank you for the comments! Forget the work, it's not so much. +>> I'd rank the :wiki: link addition pretty high, and the other changes way +>> behind that: +>> +>> The :wiki:`Wiki Link` syntax is *very* appropriate as rst syntax +>> since it fits well with other uses of roles (notice that :RFC:`822` +>> inserts a link to RFC822 etc, and that the default role is a *title* role +>> (title of some work); thus very appropriate for medium-specific links like +>> wiki links. So I'd rank :wiki: links a worthwhile addition regardless of +>> outcome here, since it's a very rst-like alternative for those who wish to +>> use more rst-like syntax (and documents degrades better outside the wiki as +>> noted). +>> +>> The named link syntax (just like the :wiki: role) are inspired from trac +>> and a good fit, but only if the wiki is committed to using only rst, +>> which I don't think is the case. +>> +>> The rst-customize changes are very useful for custom directive +>> installations (like the sourcecode directive, or shortcut roles I show +>> in the examples page), but there might be a way for the user to inject +>> docutils addons that I'm missing (one very ugly way would be to stick +>> them in sitecustomize.py which affects all Python programs). +>> +>> With the presented changes, I already have a working RestructuredText +>> wiki, but I'm admitting that using .. raw:: html around all directives is +>> very ugly (I use few directives: inline, toggle, meta, tag, map) +>> +>> On filter/htmlize: Well **rst** is clearly antisocial: It can't see HTML, +>> and ikiwiki directives are wrappend in paragraph tags. (For wikilinks +>> this is probably no problem). So the suggestion about `.. ikiwiki:` is +>> partly because it looks good in rst syntax, but also since it would emit +>> a div to wrap around the element instead of a paragraph. +>> +>> I don't know if you mean that rst could be reordered to do htmlize before +>> other phases? rst must be before any preprocess hook to avoid seeing any +>> HTML. +>> +>> With the presented changes, I already have a working RestructuredText +>> wiki, but I'm admitting that using .. raw:: html around all directives is +>> very ugly (I use few directives: inline, toggle, meta, tag, map) +>> +>> If I'm thinking right, processing to HTML already in filter means any +>> processing in scan can be reused directly (or skipped if it's legal to +>> emit 'add_link' in filter.) +>> +>> -- [[ulrik]] + + ### Implementation ### Preserving indents in the preprocessor are in branch [pproc-indent][ppi] @@ -148,6 +196,29 @@ Perl I've ever written!_) > wouldn't it also match whitespace before a directive that was not at the beginning > of a line, and treat it as an indent? With some bad luck, that could cause mdwn > to put the indented output in a pre block. --[[Joey]] +> +>> You are probably right about the bug. I'm not quite sure what the nested +>> directives examples looks like, but I must have overlooked how the +>> recursion counter works; I thought simply changing if to elif the next +>> few lines would solve that. I'm sorry for that! +>> +>> We don't have to change the `$handle` function at all, if it is possible +>> to do the indent substitution all in one line instead of passing it to +>> handle, I don't know if it is possible to turn: +>> +>> $content =~ s{$regex}{$handle->($1, $2, $3, $4, $5)}eg; +>> +>> into +>> +>> $content =~ s{$regex}{s/^/$1/gm{$handle->($2, $3, $4, $5)}}eg; +>> +>> Well, no idea how that would be expressed, but I mean, replace the indent +>> directly in $handle's return value. +>> +>> The indent-catching regex is wrong in the way you mention, it has been +>> nagigng my mind a bit as well; I think matching start of line + spaces +>> and tabs is the only thing we want. +>> -- [[ulrik]] [ppi]: http://github.com/engla/ikiwiki/commits/pproc-indent -- cgit v1.2.3 From 0159612ee0b3c18c9b1aca6245d6c97e9af14a24 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Wed, 30 Sep 2009 15:29:40 -0400 Subject: minimal user page for this guy --- doc/users/ulrik.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/users/ulrik.mdwn (limited to 'doc') diff --git a/doc/users/ulrik.mdwn b/doc/users/ulrik.mdwn new file mode 100644 index 000000000..02e1c1cbd --- /dev/null +++ b/doc/users/ulrik.mdwn @@ -0,0 +1,3 @@ +I use ikiwiki for a small personal website at + +I have proposed some patches for ikiwiki: (subject to change) -- cgit v1.2.3 From e04e9ccea930aefb3b1dbeb8203dce8c6f8bef13 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Sep 2009 15:39:51 -0400 Subject: response --- ..._native_reStructuredText_links_to_ikiwiki_pages.mdwn | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 4468ce1e9..0f8e63aae 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -77,6 +77,9 @@ but disruptive since all .rst depend on it). Well, the customizations have to be picked and chosen from this, but at least the global python file can be very convenient. +> Did you consider just including the global rst header text into an item +> in the setup file? --[[Joey]] + Some rst-custom [examples are here](http://kaizer.se/wiki/rst_examples/) [rst-custom]: http://github.com/engla/ikiwiki/commits/rst-customize @@ -141,6 +144,11 @@ picture before it. >> use more rst-like syntax (and documents degrades better outside the wiki as >> noted). >> +>>> Unsure about the degredation argument. It will work some of +>>> the time, but ikiwiki's [[ikiwiki/subpage/linkingrules]] +>>> are sufficiently different from normal html relative link +>>> rules that it often won't work. --[[Joey]] +>> >> The named link syntax (just like the :wiki: role) are inspired from trac >> and a good fit, but only if the wiki is committed to using only rst, >> which I don't think is the case. @@ -165,9 +173,11 @@ picture before it. >> other phases? rst must be before any preprocess hook to avoid seeing any >> HTML. >> ->> With the presented changes, I already have a working RestructuredText ->> wiki, but I'm admitting that using .. raw:: html around all directives is ->> very ugly (I use few directives: inline, toggle, meta, tag, map) +>>> One of my long term goals is to refactor all the code in ikiwiki +>>> that manually runs the various stages of the render pipeline, +>>> into one centralized place. Once that's done, that place can get +>>> smart about what order to run the stages, and use a different +>>> order for rst. --[[Joey]] >> >> If I'm thinking right, processing to HTML already in filter means any >> processing in scan can be reused directly (or skipped if it's legal to @@ -175,6 +185,7 @@ picture before it. >> >> -- [[ulrik]] +>>> Seems it could be, yes. --[[Joey]] ### Implementation ### -- cgit v1.2.3 From e7de3f0762d9b9ae64bd40d9fe07b00d9d6dc4d7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Sep 2009 15:45:16 -0400 Subject: furthermore --- .../Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 0f8e63aae..bee57f7e7 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -226,10 +226,16 @@ Perl I've ever written!_) >> Well, no idea how that would be expressed, but I mean, replace the indent >> directly in $handle's return value. >> +>> Yes, in effect just `indent($1, handle->($2,$,4))` --[[Joey]] +>> >> The indent-catching regex is wrong in the way you mention, it has been >> nagigng my mind a bit as well; I think matching start of line + spaces >> and tabs is the only thing we want. >> -- [[ulrik]] +>> +>>> Well, seems you want to match the indent at the start of the line containing +>>> the directive, even if the directive does not start the line. That would +>>> be quite hard to make a regexp do, though. --[[Joey]] [ppi]: http://github.com/engla/ikiwiki/commits/pproc-indent -- cgit v1.2.3 From f8ad5988da8676bfeff6db9375f2518a12f79a48 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Wed, 30 Sep 2009 21:59:11 +0200 Subject: clarifications. and indent one of joey's oneliner responses. --- ...ative_reStructuredText_links_to_ikiwiki_pages.mdwn | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index bee57f7e7..084f03304 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -79,6 +79,14 @@ be very convenient. > Did you consider just including the global rst header text into an item > in the setup file? --[[Joey]] +> +>> Then `rst_header` would not be much different from the python script +>> `rst_customize`. rst_header is as safe as other files (though disruptive +>> as noted), so it should/could be a editable file in the Wiki. A Python +>> script of course can not be. There is nothing you can do in the +>> rst_header (that you sensibly would do, I think) that couldn't be done in +>> the Python script. `rst_header` has very limited use, but it is another +>> possibility, mainly for the user-editable aspect. --[[ulrik]] Some rst-custom [examples are here](http://kaizer.se/wiki/rst_examples/) @@ -148,6 +156,15 @@ picture before it. >>> the time, but ikiwiki's [[ikiwiki/subpage/linkingrules]] >>> are sufficiently different from normal html relative link >>> rules that it often won't work. --[[Joey]] +>>> +>>>> With degradation I mean that if you take a file out of the wiki; the +>>>> links degrade to stylized text. If using default role, they degrade to +>>>> :title: which renders italicized text (which I find is exactly +>>>> appropriate). There is no way for them to degrade into links, except of +>>>> course if you reimplement the :wiki: role. You can also respecify +>>>> either the default role (the `wikilink` syntax) or the :wiki: role (the +>>>> :wiki:`wikilink` syntax) to any other markup, for example None. +>>>> --[[ulrik]] >> >> The named link syntax (just like the :wiki: role) are inspired from trac >> and a good fit, but only if the wiki is committed to using only rst, @@ -226,7 +243,7 @@ Perl I've ever written!_) >> Well, no idea how that would be expressed, but I mean, replace the indent >> directly in $handle's return value. >> ->> Yes, in effect just `indent($1, handle->($2,$,4))` --[[Joey]] +>>> Yes, in effect just `indent($1, handle->($2,$,4))` --[[Joey]] >> >> The indent-catching regex is wrong in the way you mention, it has been >> nagigng my mind a bit as well; I think matching start of line + spaces -- cgit v1.2.3 From d4511f730e1c159f570c8d39eb5a3aa1de7f641a Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" Date: Thu, 1 Oct 2009 05:36:09 -0400 Subject: add my openid --- doc/users/weakish.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/users/weakish.mdwn b/doc/users/weakish.mdwn index ccd5665ad..30a14d303 100644 --- a/doc/users/weakish.mdwn +++ b/doc/users/weakish.mdwn @@ -1 +1,3 @@ email: weakish@gmail.com + +openid: -- cgit v1.2.3 From 13940c57736a28803f11c871cada7a6e8734f029 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" Date: Thu, 1 Oct 2009 05:48:09 -0400 Subject: [patch] add an option to determine whether put autoindex pages in repo or not --- doc/plugins/autoindex/discussion.mdwn | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'doc') diff --git a/doc/plugins/autoindex/discussion.mdwn b/doc/plugins/autoindex/discussion.mdwn index 82e30aab1..2d6b6f1f0 100644 --- a/doc/plugins/autoindex/discussion.mdwn +++ b/doc/plugins/autoindex/discussion.mdwn @@ -5,3 +5,59 @@ The reason being that I have a lot of directories which need to be autoindexed, but I would prefer if the index files didn't clutter up my git repository. even without that feature the plugin is a great help, thanks + + +------ + +If you just don't want to clutter your git repo, below it's a patch does the following: + +* If you set autoindex_commit to 0 in your ikiwiki.setup file, we *do* place auto-generated markdown files in the **wiki source** but *not* in the **repo** + +* If you set autoindex_commit to 1 (this is the default), auto-generated index files will be put in the repo provided you enabled rcs backend. + +
+--- autoindex.pm.orig	2009-10-01 17:13:51.000000000 +0800
++++ autoindex.pm	2009-10-01 17:21:09.000000000 +0800
+@@ -17,6 +17,13 @@
+ 			safe => 1,
+ 			rebuild => 0,
+ 		},
++        autoindex_commit => {
++            type => 'boolean',
++            default => 1,
++            description => 'commit generated autoindex pages into RCS',
++            safe => 0,
++            rebuild => 0,
++        },
+ }
+ 
+ sub genindex ($) {
+@@ -25,7 +32,7 @@
+ 	my $template=template("autoindex.tmpl");
+ 	$template->param(page => $page);
+ 	writefile($file, $config{srcdir}, $template->output);
+-	if ($config{rcs}) {
++	if ($config{rcs} and $config{autoindex_commit}) {
+ 		IkiWiki::rcs_add($file);
+ 	}
+ }
+@@ -94,13 +101,13 @@
+ 	}
+ 	
+ 	if (@needed) {
+-		if ($config{rcs}) {
++		if ($config{rcs} and $config{autoindex_commit}) {
+ 			IkiWiki::disable_commit_hook();
+ 		}
+ 		foreach my $page (@needed) {
+ 			genindex($page);
+ 		}
+-		if ($config{rcs}) {
++		if ($config{rcs} and $config{autoindex_commit}) {
+ 			IkiWiki::rcs_commit_staged(
+ 				gettext("automatic index generation"),
+ 				undef, undef);
+
+ + +Warning: I guess this patch may work, but I *haven't tested it yet*. -- [[weakish]] -- cgit v1.2.3 From bef2011cbdbe49cc2ec988ddfdf1b9a13f880b3b Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" Date: Thu, 1 Oct 2009 05:57:53 -0400 Subject: checking external links seems not practical --- doc/ikiwiki/directive/brokenlinks/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/brokenlinks/discussion.mdwn b/doc/ikiwiki/directive/brokenlinks/discussion.mdwn index 65e97cff6..34760584d 100644 --- a/doc/ikiwiki/directive/brokenlinks/discussion.mdwn +++ b/doc/ikiwiki/directive/brokenlinks/discussion.mdwn @@ -1 +1,3 @@ Would it be possible to have such a thing also checking for external links? -- [[user/emptty]] + +> I guess this is not very practical. For internal wiki links, we only need to check if the linked source file exist or not. But for external links, we have to ping every links, which will slow down the build process a lot. --[[weakish]] -- cgit v1.2.3 From 1837abd404b6707aea6eaf0fdd0a95ee984dc455 Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Thu, 1 Oct 2009 08:07:38 -0400 Subject: empty page --- doc/users/Mick_Pollard.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/Mick_Pollard.mdwn (limited to 'doc') diff --git a/doc/users/Mick_Pollard.mdwn b/doc/users/Mick_Pollard.mdwn new file mode 100644 index 000000000..9c558e357 --- /dev/null +++ b/doc/users/Mick_Pollard.mdwn @@ -0,0 +1 @@ +. -- cgit v1.2.3 From f62de29638ec3d8d1d2e27601b0096cf865c48cc Mon Sep 17 00:00:00 2001 From: martin Date: Thu, 1 Oct 2009 08:12:49 -0400 Subject: documentation seems inaccurate --- doc/plugins/sidebar/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/plugins/sidebar/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/sidebar/discussion.mdwn b/doc/plugins/sidebar/discussion.mdwn new file mode 100644 index 000000000..78af3525c --- /dev/null +++ b/doc/plugins/sidebar/discussion.mdwn @@ -0,0 +1,3 @@ +> Warning: Any change to the sidebar will cause a rebuild of the whole wiki, since every page includes a copy that has to be updated. This can especially be a problem if the sidebar includes inline or map directives, since any changes to pages inlined or mapped onto the sidebar will change the sidebar and cause a full wiki rebuild. + +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? -- cgit v1.2.3 From 9584dfddd89a0b65632201c6aa280b7c5bc964f2 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Thu, 1 Oct 2009 14:55:36 +0200 Subject: Link to trac's Wiki-RestructuredText syntax description --- .../Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 084f03304..afe50cf07 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -166,9 +166,9 @@ picture before it. >>>> :wiki:`wikilink` syntax) to any other markup, for example None. >>>> --[[ulrik]] >> ->> The named link syntax (just like the :wiki: role) are inspired from trac ->> and a good fit, but only if the wiki is committed to using only rst, ->> which I don't think is the case. +>> The named link syntax (just like the :wiki: role) are inspired from +>> [trac][tracrst] and a good fit, but only if the wiki is committed to +>> using only rst, which I don't think is the case. >> >> The rst-customize changes are very useful for custom directive >> installations (like the sourcecode directive, or shortcut roles I show @@ -204,6 +204,8 @@ picture before it. >>> Seems it could be, yes. --[[Joey]] +[tracrst]: http://trac.edgewall.org/wiki/WikiRestructuredText + ### Implementation ### Preserving indents in the preprocessor are in branch [pproc-indent][ppi] -- cgit v1.2.3 From 4b8dd763729fccc1a36b3d128ea0f7957f3e537a Mon Sep 17 00:00:00 2001 From: test Date: Thu, 1 Oct 2009 15:28:31 -0400 Subject: --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 9dc808219..b0862f28f 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -44,7 +44,7 @@ Bulleted list [[!haiku hint="sandbox play"]] ---- -blah + ## Different sorts of links: * [[Features]] -- cgit v1.2.3 From 009f7ffded7446f1b3954ab1973faed5b96acf4d Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Fri, 2 Oct 2009 15:03:14 +0200 Subject: link to docutils mailing list discussion. also ask about

[[!directives]]

--- ...e_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index afe50cf07..e42f22970 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -87,6 +87,17 @@ be very convenient. >> rst_header (that you sensibly would do, I think) that couldn't be done in >> the Python script. `rst_header` has very limited use, but it is another >> possibility, mainly for the user-editable aspect. --[[ulrik]] +>> +>> (I foresaw only two things to be added to the rst_header: the default +>> role could be configured there (as with rst_wikirole), and if you have a +>> meta-role like :shortcut:, shortcuts could be defined there.) +> +> I have some discussion on the [docutils mailing list][dml], the developers +> of docutils seems to favor "Proposal 1", while I defend my ideas. They +> want all users of ReST to use only the basic featureset to remain +> compatible, of course. -- [[ulrik]] + +[dml]: http://thread.gmane.org/gmane.text.docutils.user/5376 Some rst-custom [examples are here](http://kaizer.se/wiki/rst_examples/) @@ -203,6 +214,11 @@ picture before it. >> -- [[ulrik]] >>> Seems it could be, yes. --[[Joey]] +>>> +>>>> It is not clear how we can work around reST wrapping directives with +>>>> paragraph tags. Also, some escaping of xml characters & <> might +>>>> happen, but I can't imagine right now what breakage can come from that. +>>>> -- [[ulrik]] [tracrst]: http://trac.edgewall.org/wiki/WikiRestructuredText -- cgit v1.2.3 From e29950ded621525bef0d2981b8d3cad4ea395cf1 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 09:08:22 -0400 Subject: remove unintended wikilink --- doc/bugs/unicode_encoded_urls_and_recentchanges.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/unicode_encoded_urls_and_recentchanges.mdwn b/doc/bugs/unicode_encoded_urls_and_recentchanges.mdwn index 88dbfc39b..262aa24fc 100644 --- a/doc/bugs/unicode_encoded_urls_and_recentchanges.mdwn +++ b/doc/bugs/unicode_encoded_urls_and_recentchanges.mdwn @@ -2,7 +2,7 @@ it appears that unicode characters in the title that are unicode letters are spa > Filenames can have any alphanumerics in them without the __ escaping. > Your locale determines whether various unicode characters are considered -> alphanumeric. In other words, it just looks at the [[:alpha:]] character +> alphanumeric. In other words, it just looks at the \[[:alpha:]] character > class, whatever your locale defines it to be. --[[Joey]] this is not a problem per se, but (at least with git backend) the recent changes missinterpret the file name character set (it seems to read the filenames as latin1) and both display wrong titles and create broken links. -- cgit v1.2.3 From d902444875abfe77811e3ef488535a82bb5e579b Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 09:11:11 -0400 Subject: remove some unintended wikilinks --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index b3fe9f86c..e2eb56d47 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -286,7 +286,7 @@ Mediawiki.pm - A plugin which supports mediawiki format. } - # Called to handle bookmarks like [[#heading]] or ?#a + # Called to handle bookmarks like \[[#heading]] or ?#a sub generate_fragment_link { my $url = shift; @@ -316,10 +316,10 @@ Mediawiki.pm - A plugin which supports mediawiki format. # Ikiwiki's link link plugin wrecks this line when displaying on the site. # Until the code highlighter plugin can turn off link finding, - # always escape double brackets in double quotes: [[ + # always escape double brackets in double quotes: \[[ if($inlink eq '..') { - # Mediawiki doesn't touch links like [[..#hi|ho]]. - return "[[" . $inlink . ($anchor?"#$anchor":"") . + # Mediawiki doesn't touch links like \[[..#hi|ho]]. + return "\[[" . $inlink . ($anchor?"#$anchor":"") . ($title?"|$title":"") . "]]" . $trailing; } @@ -380,7 +380,7 @@ Mediawiki.pm - A plugin which supports mediawiki format. add_depends($page, $redir_page); my $link=bestlink($page, underscorize(translate_path($page,$redir_page))); if (! length $link) { - return "Redirect Error: [[$redir_page]] not found."; + return "Redirect Error: \[[$redir_page]] not found."; } $value=urlto($link, $page); @@ -393,7 +393,7 @@ Mediawiki.pm - A plugin which supports mediawiki format. my %seen; while (exists $pagestate{$at}{mediawiki}{redir}) { if ($seen{$at}) { - return "Redirect Error: cycle found on [[$at]]"; + return "Redirect Error: cycle found on \[[$at]]"; } $seen{$at}=1; $at=$pagestate{$at}{mediawiki}{redir}; -- cgit v1.2.3 From 827c2c8bbe35da51fe3615a2b9a4207e5c56c09c Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" Date: Fri, 2 Oct 2009 09:56:37 -0400 Subject: add link --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index d38bc5015..a98abf578 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -126,6 +126,7 @@ Personal sites and blogs * [tumashu's page](http://tumashu.github.com) This is my personal site in github created with ikiwiki and only a page,you can get the [source](http://github.com/tumashu/tumashu/tree/master) * [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage * [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) +* [Weakish Jiang's Homepage](http://weakish.pigro.net) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From b9b06d9303179833129adb3c93cc97d13188b3d2 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 13:53:52 -0400 Subject: --- doc/users/jon.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 551d4764a..a3b37bc55 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -25,3 +25,5 @@ I am also working on some ikiwiki hacks: * a system for [[forum/managing_todo_lists]] (see also [[todo/interactive todo lists]] and for the current WIP). + +I am currently mostly interested in ikiwiki usability issues: -- cgit v1.2.3 From b9b4bb5cb924ce74b2eb8a9cd5e25fb4bed69ef9 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 14:20:35 -0400 Subject: weird tag/brokenlinks bug --- doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn (limited to 'doc') diff --git a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn new file mode 100644 index 000000000..4b9743094 --- /dev/null +++ b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn @@ -0,0 +1,11 @@ +After several runs of ikiwiki --refresh, the page I use with the [[plugin/brokenlinks]] directive on it accumulates multiple repeated lists of pages on the RHS. For example: + + * ?freebies from free kilowatts, free kilowatts, free kilowatts, free kilowatts, free kilowatts + +In this case the page "free kilowatts" has one link to "freebies" (it's tagged freebies). + +I think this may just be links caused by tags, actually. + +ikiwiki version 3.14159265. + +-- [[Jon]] -- cgit v1.2.3 From b2f3514029a17a6cd6e1f4b6b85fe9f4e0317d49 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 14:22:47 -0400 Subject: opinion about login page clarity --- doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn (limited to 'doc') diff --git a/doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn b/doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn new file mode 100644 index 000000000..b06743951 --- /dev/null +++ b/doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn @@ -0,0 +1,6 @@ +When multiple login methods are enabled, the ikiwiki login page lists one form per method, e.g. + + * one for openid + * one for local user/password store + +Followed by the "login" button underneath. It's not obvious to anyone unfamiliar with the software that these are distinct forms, or that there are multiple ways of logging in, etc. -- [[Jon]] -- cgit v1.2.3 From e0bb2396b59ab42d47d6c3b721008d741247c132 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 14:24:03 -0400 Subject: +bugs/ the login page is unclear when multiple methods exist --- doc/users/jon.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index a3b37bc55..960486b0c 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -27,3 +27,5 @@ I am also working on some ikiwiki hacks: current WIP). I am currently mostly interested in ikiwiki usability issues: + + * [[bugs/the login page is unclear when multiple methods exist]] -- cgit v1.2.3 From 10ef2091362d623a848c6b17f2f70c725f93dd75 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:02:02 -0400 Subject: followup --- doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn index 4b9743094..395c7789e 100644 --- a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn +++ b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn @@ -9,3 +9,12 @@ I think this may just be links caused by tags, actually. ikiwiki version 3.14159265. -- [[Jon]] + +> Is it possible that you upgraded from a version older than 3.12, +> and have not rebuilt your wiki since, but just refreshed? And did not run +> `ikiwiki-transition deduplinks`? If so, suggest you rebuild the wiki, +> or run that, either would probably fix the problem. +> +> If you can get to the problem after rebuilding with the current ikiwiki, +> and then refreshing a few times, I guess I will need a copy of the wiki +> source and the `.ikiwiki` directory to reproduce this. --[[Joey]] -- cgit v1.2.3 From 49f0745050e6b844592c0352a852d2956239690c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:05:40 -0400 Subject: didn't we already close this bug? Yes, we did. hmm --- .../the_login_page_is_unclear_when_multiple_methods_exist.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn b/doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn index b06743951..9985c13a0 100644 --- a/doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn +++ b/doc/bugs/the_login_page_is_unclear_when_multiple_methods_exist.mdwn @@ -4,3 +4,11 @@ When multiple login methods are enabled, the ikiwiki login page lists one form p * one for local user/password store Followed by the "login" button underneath. It's not obvious to anyone unfamiliar with the software that these are distinct forms, or that there are multiple ways of logging in, etc. -- [[Jon]] + +> As discussed in [[login_page_non-obvious_with_openid]], +> architectural reasons disallow multiple forms, with multiple +> submit buttons. But the default style sheet includes +> a styling for the openid portion of the form that makes +> it visually distinct from the rest of the form. I'm sure the styling +> could be improved, but the current form does not seem too non-obvious +> to me, or to naive users in the field. --[[Joey]] -- cgit v1.2.3 From 4f9c5896b242ac08be181047ad426bd458a0bf49 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:15:23 -0400 Subject: add bug about transitive dependencies --- doc/bugs/transitive_dependencies.mdwn | 47 +++++++++++++++++++++++++++ doc/plugins/sidebar/discussion.mdwn | 2 ++ doc/todo/tracking_bugs_with_dependencies.mdwn | 5 +-- 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 doc/bugs/transitive_dependencies.mdwn (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn new file mode 100644 index 000000000..c61afe81e --- /dev/null +++ b/doc/bugs/transitive_dependencies.mdwn @@ -0,0 +1,47 @@ +If a sidebar contains a map, or inline (etc), one would expect a +change/add/remove of any of the mapped/inlined pages to cause a full wiki +rebuild. But this does not happen. + +If page A inlines page B, which inlines page C, a change to C will cause B +to be updated, but A will not "notice" that this means A needs to be +updated. + +One way to look at this bug is that it's a bug in where dependencies are +recorded when preprocessing the rendered or sidebar page. The current code +does: + + add_depends($params{page}, $somepage); + +Where `$params{page}` is page B. If this is changed to `$params{destpage}`, +then the dependency is added to page A, and updates to C cause it to +change. This does result in the page A's getting lots more dependency info +recorded than before (essentially a copy of all the B's dependency info). + +It's also a fragile, since all plugins that handle dependencies have to be +changed, and do this going forward. And it seems non-obvious that this should +be done. Or really, whether to use `page` or `destpage` there. Currently, +making the "wrong" choice and using `destpage` instead of `page` (which nearly +everything uses) will just result in semi-redundant dependency info being +recorded. If we make destpage mandatory to fix this, goofing up will lead to +this bug coming back. Ugh. + +Another approach to fix it could be to say that anything that causes a +rebuild of B is treated as a change of B. Then when C is changed, B is +rebuilt due to dependencies, and in turn this means A is rebuild because B +"changed". + +This is essentially what is done with wikilinks now, and why, if a sidebar +links to page C, add/remove of C causes all pages to be rebuilt, as seen +here: + + removing old page meep + building sidebar.mdwn, which links to meep + building TourBusStop.mdwn, which depends on sidebar + building contact.mdwn, which depends on sidebar + ... + +The only downside I can see with this approach is that it involves more work. +Does the dep resolver have to keep looping until no new pages are rebuilt? +Seems worth a try to implement this approach. + +--[[Joey]] diff --git a/doc/plugins/sidebar/discussion.mdwn b/doc/plugins/sidebar/discussion.mdwn index 78af3525c..eb441529c 100644 --- a/doc/plugins/sidebar/discussion.mdwn +++ b/doc/plugins/sidebar/discussion.mdwn @@ -1,3 +1,5 @@ > Warning: Any change to the sidebar will cause a rebuild of the whole wiki, since every page includes a copy that has to be updated. This can especially be a problem if the sidebar includes inline or map directives, since any changes to pages inlined or mapped onto the sidebar will change the sidebar and cause a full wiki rebuild. 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]] diff --git a/doc/todo/tracking_bugs_with_dependencies.mdwn b/doc/todo/tracking_bugs_with_dependencies.mdwn index bfdbf0875..3894df5f6 100644 --- a/doc/todo/tracking_bugs_with_dependencies.mdwn +++ b/doc/todo/tracking_bugs_with_dependencies.mdwn @@ -472,10 +472,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W >>>>> possibly by adding a dependency of the second type along with the dependency of the first type. >>>>>> An example of the current system not tracking enough data is ->>>>>> where A inlines B which inlines C. A change to C will cause B to ->>>>>> rebuild, but A will not "notice" that B has implicitly changed. ->>>>>> That example suggests it might be fixable without explicitly storing ->>>>>> data, by causing a rebuild of B to be treated as a change to B. +>>>>>> described in [[bugs/transitive_dependencies]]. >>>>>> --[[Joey]] >>>>> The second type of dependency is a little more tricky. For each page, we'd need a list of pagespecs that -- cgit v1.2.3 From 53a8aeb1d1cfd42ae069e173437b34489d28d157 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:45:14 -0400 Subject: implemented one fix in transitive-dependencies branch, but not really happy with it --- doc/bugs/transitive_dependencies.mdwn | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index c61afe81e..89f0d7085 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -25,9 +25,15 @@ everything uses) will just result in semi-redundant dependency info being recorded. If we make destpage mandatory to fix this, goofing up will lead to this bug coming back. Ugh. -Another approach to fix it could be to say that anything that causes a +---- + +## rebuild = change approach + +[[!template id=gitbranch branch=master/transitive-dependencies author="[[joey]]"]] + +Another approach to fix it is to say that anything that causes a rebuild of B is treated as a change of B. Then when C is changed, B is -rebuilt due to dependencies, and in turn this means A is rebuild because B +rebuilt due to dependencies, and in turn this means A is rebuilt because B "changed". This is essentially what is done with wikilinks now, and why, if a sidebar @@ -40,8 +46,17 @@ here: building contact.mdwn, which depends on sidebar ... -The only downside I can see with this approach is that it involves more work. -Does the dep resolver have to keep looping until no new pages are rebuilt? -Seems worth a try to implement this approach. +Downsides here: + +* Means a minimum of 2x as much time spent resolving dependencies, + at least in my simple implementation, which re-runs the dependency + resolution loop until no new pages are rebuilt. +* Causes extra work for some transitive dependencies that we don't + actually care about. For example, changing index causes + plugins/brokenlinks to update in the first pass; if there's a second + pass, plugins/map is then updated, because it depends on plugins/brokenlinks. + (Of course, this is just a special case of the issue that a real + modification to plugins/brokenlinks causes an unnecessary update of plugins/map, + because we have only one kind of dependency.) --[[Joey]] -- cgit v1.2.3 From 537824a2791485536746e78b27d232e868560171 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:46:27 -0400 Subject: fix branch name --- doc/bugs/transitive_dependencies.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index 89f0d7085..e3043b61b 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -29,7 +29,7 @@ this bug coming back. Ugh. ## rebuild = change approach -[[!template id=gitbranch branch=master/transitive-dependencies author="[[joey]]"]] +[[!template id=gitbranch branch=origin/transitive-dependencies author="[[joey]]"]] Another approach to fix it is to say that anything that causes a rebuild of B is treated as a change of B. Then when C is changed, B is -- cgit v1.2.3 From 4c88d42762380928d352a26a4faaffb88cbb2406 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:48:47 -0400 Subject: mention loop optimisation --- doc/bugs/transitive_dependencies.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index e3043b61b..d5571cb6a 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -51,6 +51,8 @@ Downsides here: * Means a minimum of 2x as much time spent resolving dependencies, at least in my simple implementation, which re-runs the dependency resolution loop until no new pages are rebuilt. + (I added an optimisation that gets it down to 1.5X as much work on + average, still 2x as much worst case.) * Causes extra work for some transitive dependencies that we don't actually care about. For example, changing index causes plugins/brokenlinks to update in the first pass; if there's a second -- cgit v1.2.3 From 8bb94bb197714fcac1ac48f9b330bef4d17dd800 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:56:44 -0400 Subject: split out dependency type issue into its own todo --- doc/todo/dependency_types.mdwn | 83 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 doc/todo/dependency_types.mdwn (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn new file mode 100644 index 000000000..db7d06914 --- /dev/null +++ b/doc/todo/dependency_types.mdwn @@ -0,0 +1,83 @@ +Moved this relevant discussion to here from +[[tracking_bugs_with_dependencies]]: --[[Joey]] + +>> it seems that there are two types of dependency, and ikiwiki +>> currently only handles one of them. The first type is "Rebuild this +>> page when any of these other pages changes" - ikiwiki handles this. +>> The second type is "rebuild this page when set of pages referred to by +>> this pagespec changes" - ikiwiki doesn't seem to handle this. I +>> suspect that named pagespecs would make that second type of dependency +>> more important. I'll try to come up with a good example. -- [[Will]] + +>>> Hrm, I was going to build an example of this with backlinks, but it +>>> looks like that is handled as a special case at the moment (line 458 of +>>> render.pm). I'll see if I can breapk +>>> things another way. Fixing this properly would allow removal of that special case. -- [[Will]] + +>>>> I can't quite understand the distinction you're trying to draw +>>>> between the two types of dependencies. Backlinks are a very special +>>>> case though and I'll be suprised if they fit well into pagespecs. +>>>> --[[Joey]] + +>>>>> The issue is that the existential pagespec matching allows you to build things that have similar +>>>>> problems to backlinks. +>>>>> e.g. the following inline: + + \[[!inline pages="define(~done, link(done)) and link(~done)" archive=yes]] + +>>>>> includes any page that links to a page that links to done. Now imagine I add a new link to 'done' on +>>>>> some random page somewhere - a page which some other page links to which didn't previously get included - the set of pages accepted by the pagespec, and hence the set of +>>>>> pages inlined, will change. But, there is no dependency anywhere on the page that I altered, so +>>>>> ikiwiki will not rebuild the page with the inline in it. What is happening is that the page that I altered affects +>>>>> the set of pages matched by the pagespec without itself being matched by the pagespec, and hence included in the dependency list. + +>>>>> To make this work well, I think you need to recognise two types of dependencies for each page (and no +>>>>> special cases for particular types of links, eg backlinks). The first type of dependency says, "The content of +>>>>> this page depends upon the content of these other pages". The `add_depends()` in the shortcuts +>>>>> plugin is of this form: any time the shortcuts page is edited, any page with a shortcut on it +>>>>> is rebuilt. The inline plugin also needs to add dependencies of this form to detect when the inlined +>>>>> content changes. By contrast, the map plugin does not need a dependency of this form, because it +>>>>> doesn't actually care about the content of any pages, just which pages it needs to include (which we'll handle next). + +>>>>> The second type of dependency says, "The content of this page depends upon the exact set of pages matched +>>>>> by this pagespec". The first type of dependency was about the content of some pages, the second type is about +>>>>> which pages get matched by a pagespec. This is the type of dependency tracking that the map plugin needs. +>>>>> If the set of pages matched by map pagespec changes, then the page with the map on it needs to be rebuilt to show a different list of pages. +>>>>> Inline needs this type of dependency as well as the previous type - This type handles a change in which pages +>>>>> are inlined, the previous type handles a change in the content of any of those pages. Shortcut does not need this type of +>>>>> dependency. Most of the places that use `add_depends()` seem to need this type of dependency rather than the first type. + +>>>>>> Note that inline and map currently achieve the second type of dependency by +>>>>>> explicitly calling `add_depends` for each page the displayed. +>>>>>> If any of those pages are removed, the regular pagespec would not +>>>>>> match them -- since they're gone. However, the explicit dependency +>>>>>> on them does cause them to match. It's an ugly corner I'd like to +>>>>>> get rid of. --[[Joey]] + +>>>>> Implementation Details: The first type of dependency can be handled very similarly to the current +>>>>> dependency system. You just need to keep a list of pages that the content depends upon. You could +>>>>> keep that list as a pagespec, but if you do this you might want to check that the pagespec doesn't change, +>>>>> possibly by adding a dependency of the second type along with the dependency of the first type. + +>>>>>> An example of the current system not tracking enough data is +>>>>>> described in [[bugs/transitive_dependencies]]. +>>>>>> --[[Joey]] + +>>>>> The second type of dependency is a little more tricky. For each page, we'd need a list of pagespecs that +>>>>> the page depended on, and for each pagespec you'd want to store the list of pages that currently match it. +>>>>> On refresh, you'd need to check each pagespec to see if the set of pages that match it has changed, and if +>>>>> that set has changed, then rebuild the dependent page(s). Oh, and for this second type of dependency, I +>>>>> don't think you can merge pagespecs. If I wanted to know if either "\*" or "link(done)" changes, then just checking +>>>>> to see if the set of pages matched by "\* or link(done)" changes doesn't work. + +>>>>> The current system works because even though you usually want dependencies of the second type, the set of pages +>>>>> referred to by a pagespec can only change if one of those pages itself changes. i.e. A dependency check of the +>>>>> first type will catch a dependency change of the second type with current pagespecs. +>>>>> This doesn't work with backlinks, and it doesn't work with existential matching. Backlinks are currently special-cased. I don't know +>>>>> how to special-case existential matching - I suspect you're better off just getting the dependency tracking right. + +>>>>> I also tried to come up with other possible solutions: e.g. can we find the dependencies for a pagespec? That +>>>>> would be the set of pages where a change on one of those pages could lead to a change in the set of pages matched by the pagespec. +>>>>> For old-style pagespecs without backlinks, the dependency set for a pagespec is the same as the set of pages the pagespec matches. +>>>>> Unfortunately, with existential matching, the set of pages that each +>>>>> pagespec depends upon can quickly become "*", which is not very useful. -- [[Will]] -- cgit v1.2.3 From 8c2d221ca93ed6fbe8f093408c4e2cea835e5b4c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 16:17:56 -0400 Subject: split off todo item for multiple dependency types --- doc/bugs/transitive_dependencies.mdwn | 2 +- doc/todo/dependency_types.mdwn | 46 +++++++++++++- doc/todo/tracking_bugs_with_dependencies.mdwn | 86 ++------------------------- 3 files changed, 50 insertions(+), 84 deletions(-) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index d5571cb6a..546f4f3aa 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -59,6 +59,6 @@ Downsides here: pass, plugins/map is then updated, because it depends on plugins/brokenlinks. (Of course, this is just a special case of the issue that a real modification to plugins/brokenlinks causes an unnecessary update of plugins/map, - because we have only one kind of dependency.) + because we have [[only_one_kind_of_dependency|todo/dependency_types]].) --[[Joey]] diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index db7d06914..6d722aab9 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -1,5 +1,24 @@ -Moved this relevant discussion to here from -[[tracking_bugs_with_dependencies]]: --[[Joey]] +Ikiwiki currently only has one type of dependency between pages +(plus wikilinks special cased in on the side). This has resulted in various +problems, and it's seemed for a long time to me that ikiwiki needs to get +smarter about what types of dependencies are supported. + +### unnecessary work + +The current single dependency type causes the depending page to be rebuilt +whenever a matching dependency is added, removed, or *modified*. But a +great many things don't care about the modification case, and often cause +unnecessary page rebuilds: + +* meta only cares if the pages are added or removed. Content change does + not matter (unless show=title is used). +* brokenlinks, orphans, pagecount, ditto +* inline in archive mode cares about page title, author changing, but + not content. (Ditto for meta with show=title.) +* Causes extra work when solving the [[bug/transitive_dependencies]] + problem. + +### two types of dependencies needed for [[tracking_bugs_with_dependencies]] >> it seems that there are two types of dependency, and ikiwiki >> currently only handles one of them. The first type is "Rebuild this @@ -81,3 +100,26 @@ Moved this relevant discussion to here from >>>>> For old-style pagespecs without backlinks, the dependency set for a pagespec is the same as the set of pages the pagespec matches. >>>>> Unfortunately, with existential matching, the set of pages that each >>>>> pagespec depends upon can quickly become "*", which is not very useful. -- [[Will]] + +### proposal + +I propose the following. --[[Joey]] + +* Add a second type of dependency, call it an "contentless dependency". +* `add_depends` defaults to adding a regular ("full") dependency, as + before. (So nothing breaks.) +* `add_depends($page, $spec, content => 0)` adds an contentless dependency. +* Contentless dependencies are stored in `%depends_contentless` and + `%depends_contentless_simple`, which are stored in the index similarly + to the existing hashes. +* `refresh` only looks at added/removed pages when resolving contentless + dependencies. + +This seems straightforwardly doable. I'd like [[Will]]'s feedback on it, if +possible. The type types of dependencies I am proposing are not identical +to the two types he talks about above, but I hope are close enough that +they can be used. + +This doesn't deal with the stuff that only depend on the metadata of a +page, as collected in the scan pass, changing. But it does leave a window +open for adding such a dependency type later. diff --git a/doc/todo/tracking_bugs_with_dependencies.mdwn b/doc/todo/tracking_bugs_with_dependencies.mdwn index 3894df5f6..5f3ece290 100644 --- a/doc/todo/tracking_bugs_with_dependencies.mdwn +++ b/doc/todo/tracking_bugs_with_dependencies.mdwn @@ -360,7 +360,10 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W > --[[Joey]] >> There is one issue that I've been thinking about that I haven't raised anywhere (or checked myself), and that is how this all interacts with page dependencies. ->> Firstly, I'm not sure anymore that the `pagespec_merge` function will continue to work in all cases. +>> +>>> I've moved the discussion of that to [[dependency_types]]. --[[Joey]] +>> +>> I'm not sure anymore that the `pagespec_merge` function will continue to work in all cases. >>> The problem I can see there is that if two pagespecs >>> get merged and both use `~foo` but define it differently, @@ -413,86 +416,7 @@ account all comments above (which doesn't mean it is above reproach :) ). --[[W >>> My [[remove-pagespec-merge|should_optimise_pagespecs]] branch has now >>> solved all this by deleting the offending function :-) --[[smcv]] ->> Secondly, it seems that there are two types of dependency, and ikiwiki ->> currently only handles one of them. The first type is "Rebuild this ->> page when any of these other pages changes" - ikiwiki handles this. ->> The second type is "rebuild this page when set of pages referred to by ->> this pagespec changes" - ikiwiki doesn't seem to handle this. I ->> suspect that named pagespecs would make that second type of dependency ->> more important. I'll try to come up with a good example. -- [[Will]] - ->>> Hrm, I was going to build an example of this with backlinks, but it ->>> looks like that is handled as a special case at the moment (line 458 of ->>> render.pm). I'll see if I can breapk ->>> things another way. Fixing this properly would allow removal of that special case. -- [[Will]] - ->>>> I can't quite understand the distinction you're trying to draw ->>>> between the two types of dependencies. Backlinks are a very special ->>>> case though and I'll be suprised if they fit well into pagespecs. ->>>> --[[Joey]] - ->>>>> The issue is that the existential pagespec matching allows you to build things that have similar ->>>>> problems to backlinks. ->>>>> e.g. the following inline: - - \[[!inline pages="define(~done, link(done)) and link(~done)" archive=yes]] - ->>>>> includes any page that links to a page that links to done. Now imagine I add a new link to 'done' on ->>>>> some random page somewhere - a page which some other page links to which didn't previously get included - the set of pages accepted by the pagespec, and hence the set of ->>>>> pages inlined, will change. But, there is no dependency anywhere on the page that I altered, so ->>>>> ikiwiki will not rebuild the page with the inline in it. What is happening is that the page that I altered affects ->>>>> the set of pages matched by the pagespec without itself being matched by the pagespec, and hence included in the dependency list. - ->>>>> To make this work well, I think you need to recognise two types of dependencies for each page (and no ->>>>> special cases for particular types of links, eg backlinks). The first type of dependency says, "The content of ->>>>> this page depends upon the content of these other pages". The `add_depends()` in the shortcuts ->>>>> plugin is of this form: any time the shortcuts page is edited, any page with a shortcut on it ->>>>> is rebuilt. The inline plugin also needs to add dependencies of this form to detect when the inlined ->>>>> content changes. By contrast, the map plugin does not need a dependency of this form, because it ->>>>> doesn't actually care about the content of any pages, just which pages it needs to include (which we'll handle next). - ->>>>> The second type of dependency says, "The content of this page depends upon the exact set of pages matched ->>>>> by this pagespec". The first type of dependency was about the content of some pages, the second type is about ->>>>> which pages get matched by a pagespec. This is the type of dependency tracking that the map plugin needs. ->>>>> If the set of pages matched by map pagespec changes, then the page with the map on it needs to be rebuilt to show a different list of pages. ->>>>> Inline needs this type of dependency as well as the previous type - This type handles a change in which pages ->>>>> are inlined, the previous type handles a change in the content of any of those pages. Shortcut does not need this type of ->>>>> dependency. Most of the places that use `add_depends()` seem to need this type of dependency rather than the first type. - ->>>>>> Note that inline and map currently achieve the second type of dependency by ->>>>>> explicitly calling `add_depends` for each page the displayed. ->>>>>> If any of those pages are removed, the regular pagespec would not ->>>>>> match them -- since they're gone. However, the explicit dependency ->>>>>> on them does cause them to match. It's an ugly corner I'd like to ->>>>>> get rid of. --[[Joey]] - ->>>>> Implementation Details: The first type of dependency can be handled very similarly to the current ->>>>> dependency system. You just need to keep a list of pages that the content depends upon. You could ->>>>> keep that list as a pagespec, but if you do this you might want to check that the pagespec doesn't change, ->>>>> possibly by adding a dependency of the second type along with the dependency of the first type. - ->>>>>> An example of the current system not tracking enough data is ->>>>>> described in [[bugs/transitive_dependencies]]. ->>>>>> --[[Joey]] - ->>>>> The second type of dependency is a little more tricky. For each page, we'd need a list of pagespecs that ->>>>> the page depended on, and for each pagespec you'd want to store the list of pages that currently match it. ->>>>> On refresh, you'd need to check each pagespec to see if the set of pages that match it has changed, and if ->>>>> that set has changed, then rebuild the dependent page(s). Oh, and for this second type of dependency, I ->>>>> don't think you can merge pagespecs. If I wanted to know if either "\*" or "link(done)" changes, then just checking ->>>>> to see if the set of pages matched by "\* or link(done)" changes doesn't work. - ->>>>> The current system works because even though you usually want dependencies of the second type, the set of pages ->>>>> referred to by a pagespec can only change if one of those pages itself changes. i.e. A dependency check of the ->>>>> first type will catch a dependency change of the second type with current pagespecs. ->>>>> This doesn't work with backlinks, and it doesn't work with existential matching. Backlinks are currently special-cased. I don't know ->>>>> how to special-case existential matching - I suspect you're better off just getting the dependency tracking right. - ->>>>> I also tried to come up with other possible solutions: e.g. can we find the dependencies for a pagespec? That ->>>>> would be the set of pages where a change on one of those pages could lead to a change in the set of pages matched by the pagespec. ->>>>> For old-style pagespecs without backlinks, the dependency set for a pagespec is the same as the set of pages the pagespec matches. ->>>>> Unfortunately, with existential matching, the set of pages that each ->>>>> pagespec depends upon can quickly become "*", which is not very useful. -- [[Will]] + Patch updated to use closures rather than inline generated code for named pagespecs. Also includes some new use of ErrorReason where appropriate. -- [[Will]] -- cgit v1.2.3 From 1df5c5a22c7e04635c669f7d977da0318dfde9cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 16:22:47 -0400 Subject: fix --- doc/todo/dependency_types.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 6d722aab9..215a65c8a 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -15,7 +15,7 @@ unnecessary page rebuilds: * brokenlinks, orphans, pagecount, ditto * inline in archive mode cares about page title, author changing, but not content. (Ditto for meta with show=title.) -* Causes extra work when solving the [[bug/transitive_dependencies]] +* Causes extra work when solving the [[bugs/transitive_dependencies]] problem. ### two types of dependencies needed for [[tracking_bugs_with_dependencies]] -- cgit v1.2.3 From c1ca46a785164eec099e003c0883245ca728e461 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 17:23:37 -0400 Subject: response --- doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn index 395c7789e..2091570d1 100644 --- a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn +++ b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn @@ -18,3 +18,5 @@ ikiwiki version 3.14159265. > If you can get to the problem after rebuilding with the current ikiwiki, > and then refreshing a few times, I guess I will need a copy of the wiki > source and the `.ikiwiki` directory to reproduce this. --[[Joey]] + +>> Hi Joey, thanks for your response. I've reproduced it post rebuild and after having ran ikiwiki-transition and many refreshes (both resulting from content changes and otherwise) unfortunately, with ikiwiki 3.14159265 (different machine to above report, though). I will contact you privately to provide a git URL and a copy of my .ikiwiki. -- [[Jon]] -- cgit v1.2.3 From a56fd6fde977cc48170b61d3518b13a3e1e1a936 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 17:25:18 -0400 Subject: +bugs/ backlinks onhover thing can go weird --- doc/users/jon.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 960486b0c..e37090485 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -29,3 +29,4 @@ I am also working on some ikiwiki hacks: I am currently mostly interested in ikiwiki usability issues: * [[bugs/the login page is unclear when multiple methods exist]] + * [[bugs/backlinks onhover thing can go weird]] -- cgit v1.2.3 From 1d0d98eec4370f6daaf513f9553c5813e57e837e Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 17:30:46 -0400 Subject: wishlist/todo item: disable/enable directives by pagespec --- doc/todo/pagespec_to_disable_ikiwiki_directives.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/todo/pagespec_to_disable_ikiwiki_directives.mdwn (limited to 'doc') diff --git a/doc/todo/pagespec_to_disable_ikiwiki_directives.mdwn b/doc/todo/pagespec_to_disable_ikiwiki_directives.mdwn new file mode 100644 index 000000000..4211c2d10 --- /dev/null +++ b/doc/todo/pagespec_to_disable_ikiwiki_directives.mdwn @@ -0,0 +1,5 @@ +I would like some pages (identified by pagespec) to not expand ikiwiki directives (wikilinks, or \[[!, or both, or perhaps either). + +I will tag this [[wishlist]]. It's something I might try myself. It's part of my thinking about how to handle [[comments]], as I'm still ruminating on alternatives to [[smcv]]'s approach. (with the greatest of respect to smcv!) (Perhaps my attempt will try to factor out the no-directives-allowed logic from the comments plugin). + + -- [[Jon]] -- cgit v1.2.3 From 1ead5f7987ef06f872fb638777d6621f06eb6caf Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Fri, 2 Oct 2009 17:31:40 -0400 Subject: --- doc/users/jon.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index e37090485..b873a51e1 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -21,7 +21,7 @@ I am also working on some ikiwiki hacks: * an alternative approach to [[plugins/comments]] (see [[todo/more flexible inline postform]] for one piece of the puzzle; for some investigation into making the post - form more integrated) + form more integrated); possibly also [[todo/pagespec to disable ikiwiki directives]] * a system for [[forum/managing_todo_lists]] (see also [[todo/interactive todo lists]] and for the current WIP). -- cgit v1.2.3 From 06a1ad7e760258eb0689e327825c15e2aa5234b2 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Fri, 2 Oct 2009 18:28:11 -0400 Subject: Add reference to new plugin --- doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn (limited to 'doc') diff --git a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn new file mode 100644 index 000000000..4cfbbbf3c --- /dev/null +++ b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn @@ -0,0 +1,5 @@ +At the moment, IkiWiki allows you to set the template for individual pages using the [[plugins/pagetemplate]] directive/plugin, but not for whole sections of the wiki. + +I've written a new plugin, sectiontemplate, available in the `page_tmpl` branch of my git repository that allows setting the template by pagespec in the config file. + +-- [[Will]] -- cgit v1.2.3 From 7ef22f25969741fb7aed9be650dd026dd6dddcc9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 18:45:56 -0400 Subject: improve wording --- doc/ikiwiki/directive/pagetemplate.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/pagetemplate.mdwn b/doc/ikiwiki/directive/pagetemplate.mdwn index 0e4066f34..8ad901c1a 100644 --- a/doc/ikiwiki/directive/pagetemplate.mdwn +++ b/doc/ikiwiki/directive/pagetemplate.mdwn @@ -1,6 +1,8 @@ The `pagetemplate` directive is supplied by the [[!iki plugins/pagetemplate desc=pagetemplate]] plugin. -This directive allows a page to be created using a different wikitemplates. +This directive allows a page to be displayed using a different template than +the default `page.tmpl` template. + The page text is inserted into the template, so the template controls the overall look and feel of the wiki page. This is in contrast to the [[ikiwiki/directive/template]] directive, which allows inserting templates -- cgit v1.2.3 From 6e133959bc69877459fec2ea32788d0656b92168 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 18:47:15 -0400 Subject: fix wording here too --- doc/plugins/pagetemplate.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/pagetemplate.mdwn b/doc/plugins/pagetemplate.mdwn index afd5eb500..53f069d0d 100644 --- a/doc/plugins/pagetemplate.mdwn +++ b/doc/plugins/pagetemplate.mdwn @@ -2,8 +2,8 @@ [[!tag type/chrome]] This plugin provides the [[ikiwiki/directive/pagetemplate]] -[[ikiwiki/directive]], which allows a page to be created using a different -[[template|wikitemplates]]. +[[ikiwiki/directive]], which allows a page to be displayed +using a different [[template|wikitemplates]] than the default. This plugin can only use templates that are already installed in `/usr/share/ikiwiki/templates` (or wherever ikiwiki is configured to look for -- cgit v1.2.3 From db64972b65c7504b6d2bbed69e438203eef0a518 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 18:51:52 -0400 Subject: combine with pagetemplate? --- doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn index 4cfbbbf3c..ed9740068 100644 --- a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn +++ b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn @@ -3,3 +3,9 @@ At the moment, IkiWiki allows you to set the template for individual pages using I've written a new plugin, sectiontemplate, available in the `page_tmpl` branch of my git repository that allows setting the template by pagespec in the config file. -- [[Will]] + +> This is an excellent idea and looks ready for merging. +> Before I do though, would it perhaps make sense to merge +> this in with the pagetemplate plugin? They do such a similar thing, +> and unless letting users control the template by editing a page is not +> wanted, I can't see any reason not to combine them. --[[Joey]] -- cgit v1.2.3 From 9673806a6d94b320bf2289dd091175a742bcee26 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 18:58:07 -0400 Subject: consistency with edittemplate? --- doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn index ed9740068..b9c397358 100644 --- a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn +++ b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn @@ -8,4 +8,10 @@ I've written a new plugin, sectiontemplate, available in the `page_tmpl` branch > Before I do though, would it perhaps make sense to merge > this in with the pagetemplate plugin? They do such a similar thing, > and unless letting users control the template by editing a page is not -> wanted, I can't see any reason not to combine them. --[[Joey]] +> wanted, I can't see any reason not to combine them. --[[Joey]] + +> One other idea is moving the pagespec from setup file to a directive. +> The edittemplate plugin does that, and it might be nice +> to be consistent with that. To implement it, you'd have to +> make the scan hook store the template pagespecs in `%pagestate`, +> so a bit more complicated. --[[Joey]] -- cgit v1.2.3 From 5de7ba82911ee1ab966a755e97931d5b6a3bacb1 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Sat, 3 Oct 2009 01:39:06 -0400 Subject: response --- doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn index b9c397358..cd57c1257 100644 --- a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn +++ b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn @@ -15,3 +15,11 @@ I've written a new plugin, sectiontemplate, available in the `page_tmpl` branch > to be consistent with that. To implement it, you'd have to > make the scan hook store the template pagespecs in `%pagestate`, > so a bit more complicated. --[[Joey]] + +>> I started with the pagetemplate plugin, which is why they're so similar. I guess they could be combined. +>> I had a brief think about having the specs and templates defined in a directive rather than the config file, but it got tricky. +>> How do you know what needs to be rebuilt when? There is probably a solution, maybe even an obvious one, but I thought that getting something done was more important than polishing it. +>> In the worst case, admins can always use the web interface to change the setup :). + +>> I wanted this to put comments on my new blog, and was more interested in that goal than this subgoal. I've moved most of my web pages to IkiWiki and there is only one small part that is the blog. +>> I wanted to use [[Disqus comments|tips/Adding_Disqus_to_your_wiki/]], but only on the blog pages. (I'm using Disqus rather than IkiWiki comments because I don't want to have to deal with spam, security, etc. I'll happily just let someone else host the comments.) -- [[Will]] -- cgit v1.2.3 From ffa73790b5c381df6e0385995b720dd24188969b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Oct 2009 14:14:30 -0400 Subject: Fix a bug that could lead to duplicate links being recorded for tags. Here I was bitten by perl's aliasing of foreach variables to the loop array contents, and match_link accidentially changed the contents of %links. In Jon's testcase, a tag added an absolute link, which was made relative by the above bug, and then the link was added again in preprocess, and turned into a duplicate. --- IkiWiki.pm | 6 +++--- debian/changelog | 2 ++ doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 974e36902..2637f6017 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2052,10 +2052,10 @@ sub match_link ($$;@) { else { return IkiWiki::SuccessReason->new("$page links to page $p matching $link") if match_glob($p, $link, %params); - $p=~s/^\///; + my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p matching $link") - if match_glob($p, $link, %params); + return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link") + if match_glob($p_rel, $link, %params); } } return IkiWiki::FailReason->new("$page does not link to $link"); diff --git a/debian/changelog b/debian/changelog index b6383bacb..ca5409af7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low to the body tag. * Support RPC::XML 0.69's incompatable object instantiation method. * mirrorlist: Display nothing if list is empty. + * Fix a bug that could lead to duplicate links being recorded + for tags. -- Joey Hess Sun, 27 Sep 2009 17:40:03 -0400 diff --git a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn index 2091570d1..d07b2381d 100644 --- a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn +++ b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn @@ -20,3 +20,6 @@ ikiwiki version 3.14159265. > source and the `.ikiwiki` directory to reproduce this. --[[Joey]] >> Hi Joey, thanks for your response. I've reproduced it post rebuild and after having ran ikiwiki-transition and many refreshes (both resulting from content changes and otherwise) unfortunately, with ikiwiki 3.14159265 (different machine to above report, though). I will contact you privately to provide a git URL and a copy of my .ikiwiki. -- [[Jon]] + +>>> Found the bug that was causing duplicates to get in, and fixed it. +>>> [[done]] --[[Joey]] -- cgit v1.2.3 From fd9d9680242c0d1c835fc56f969f8e2a2618a5de Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Oct 2009 15:37:57 -0400 Subject: document add_depends dependency type interface --- doc/plugins/write.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 668f8d8b6..c244c1f2f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -609,10 +609,17 @@ page created from it. (Ie, it appends ".html".) Use this when constructing the filename of a html file. Use `urlto` when generating a link to a page. -#### `add_depends($$)` +#### `add_depends($$;@)` Makes the specified page depend on the specified [[ikiwiki/PageSpec]]. +Additional named parameters can be passed, to indicate what type of +dependency this is. + +Currently, only a "content" parameter is specified. If set to 0, the +dependency does not involve the content of pages matching the PageSpec, but +only their existence. + #### `pagespec_match($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns true if the -- cgit v1.2.3 From c7bdd17087475ef0e659cb5f3b204e2619929dff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Oct 2009 17:17:48 -0400 Subject: clarify --- doc/ikiwiki/directive/pagestats.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/pagestats.mdwn b/doc/ikiwiki/directive/pagestats.mdwn index 426f3e4af..66f851dbd 100644 --- a/doc/ikiwiki/directive/pagestats.mdwn +++ b/doc/ikiwiki/directive/pagestats.mdwn @@ -12,7 +12,7 @@ And here's how to create a table of all the pages on the wiki: \[[!pagestats style="table"]] -The optional `among` parameter limits counting to pages that match a +The optional `among` parameter limits display to pages that match a [[ikiwiki/PageSpec]]. For instance, to display a cloud of tags used on blog entries, you could use: -- cgit v1.2.3 From bd958f91a2b71761e9aa20fa25a6702dab3b4b8d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Oct 2009 17:38:47 -0400 Subject: did a scratch implementation of dependancy types, but found it more complex --- doc/todo/dependency_types.mdwn | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 215a65c8a..6218222f7 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -12,7 +12,7 @@ unnecessary page rebuilds: * meta only cares if the pages are added or removed. Content change does not matter (unless show=title is used). -* brokenlinks, orphans, pagecount, ditto +* brokenlinks, orphans, pagecount, ditto (generally) * inline in archive mode cares about page title, author changing, but not content. (Ditto for meta with show=title.) * Causes extra work when solving the [[bugs/transitive_dependencies]] @@ -109,9 +109,6 @@ I propose the following. --[[Joey]] * `add_depends` defaults to adding a regular ("full") dependency, as before. (So nothing breaks.) * `add_depends($page, $spec, content => 0)` adds an contentless dependency. -* Contentless dependencies are stored in `%depends_contentless` and - `%depends_contentless_simple`, which are stored in the index similarly - to the existing hashes. * `refresh` only looks at added/removed pages when resolving contentless dependencies. @@ -121,5 +118,35 @@ to the two types he talks about above, but I hope are close enough that they can be used. This doesn't deal with the stuff that only depend on the metadata of a -page, as collected in the scan pass, changing. But it does leave a window +page, as collected in the scan pass, changing. But it does leave a window open for adding such a dependency type later. + +---- + +I implemented the above in a branch. +[[!template id=gitbranch branch=origin/dependency-types author="[[joey]]"]] + +Then I found some problems: + +* pagestats is often used with a pagespec that uses `tagged()`. + A pure contentless dependency does not work for that, it needs to look + at link info. +* orphans and brokenlinks cannot use contentless dependencies because they + need to update when links change. +* Something simple like pagecount, that seems like it could use a + contentless dependency, can have a pagespec that uses metadata, like + `author()` or `copyright()`. + +Now I'm thinking about having a contentless dependency look at page +metadata, and fire if the metadata changes. And it seems links should +either be included in that, or there should be a way to make a dependency +that fires when a page's links change. (And what about backlinks?) + +It's easy to see when a page's links change, since there is `%oldlinks`. +To see when metadata is changed is harder, since it's stored in the +pagestate by the meta plugin. + +(Alternative: Make add_depends look at the pagespec. Ie, if it is a simple +page name, or a glob, we know a contentless dependency can be valid. +If's more complex, convert the dependency from contentless to full. Finding +a non-ad-hoc, non-sucky way to do that could be hard.) -- cgit v1.2.3 From ba11568f1e1e0b0da0490d817262f13539736262 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Oct 2009 17:43:23 -0400 Subject: response --- doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn index cd57c1257..d0c09796f 100644 --- a/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn +++ b/doc/todo/Set_templates_for_whole_sections_of_the_site.mdwn @@ -23,3 +23,9 @@ I've written a new plugin, sectiontemplate, available in the `page_tmpl` branch >> I wanted this to put comments on my new blog, and was more interested in that goal than this subgoal. I've moved most of my web pages to IkiWiki and there is only one small part that is the blog. >> I wanted to use [[Disqus comments|tips/Adding_Disqus_to_your_wiki/]], but only on the blog pages. (I'm using Disqus rather than IkiWiki comments because I don't want to have to deal with spam, security, etc. I'll happily just let someone else host the comments.) -- [[Will]] + +>>> Yes, handing the rebuild is a good reason not to use directives for +>>> this. +>>> +>>> I do still think combining this with pagetemplate would be good. +>>> --[[Joey]] -- cgit v1.2.3 From 7b692b5d6ec2c1cf86b627c4e3ed7a5d0a751580 Mon Sep 17 00:00:00 2001 From: "http://kaizer.se/" Date: Sun, 4 Oct 2009 14:43:38 -0400 Subject: Updated pproc-indent by catching only indent at beginning of line --- ...esolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index e42f22970..ca7b282fa 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -271,6 +271,17 @@ Perl I've ever written!_) >>> Well, seems you want to match the indent at the start of the line containing >>> the directive, even if the directive does not start the line. That would >>> be quite hard to make a regexp do, though. --[[Joey]] +>> +>> I wasted a long time getting the simpler `indent($1, handle->($2,$,4))` to +>> work (remember, I don't know perl at all). Somehow `$1` does not arrive, I +>> made a simple testcase that worked, and I conclude something inside $handle +>> results in the value of $1 not arriving as it should! +>> +>> Anyway, instead a very simple incremental patch is in [pproc-indent][ppi] +>> where the indentation regex is `(^[ \t]+|)` instead, which seems to work +>> very well (and the regex is multiline now as well). I'm happy to rebase the +>> changes if you want or you can just squash the four patches 1+3 => 1+1 +>> -- [[ulrik]] [ppi]: http://github.com/engla/ikiwiki/commits/pproc-indent -- cgit v1.2.3 From 6f1ebdd6922a2c96fd57c71cd2052992d13f9c22 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Oct 2009 15:53:54 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 6218222f7..58b5ee955 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -10,7 +10,7 @@ whenever a matching dependency is added, removed, or *modified*. But a great many things don't care about the modification case, and often cause unnecessary page rebuilds: -* meta only cares if the pages are added or removed. Content change does +* map only cares if the pages are added or removed. Content change does not matter (unless show=title is used). * brokenlinks, orphans, pagecount, ditto (generally) * inline in archive mode cares about page title, author changing, but @@ -128,14 +128,11 @@ I implemented the above in a branch. Then I found some problems: -* pagestats is often used with a pagespec that uses `tagged()`. - A pure contentless dependency does not work for that, it needs to look - at link info. -* orphans and brokenlinks cannot use contentless dependencies because they - need to update when links change. * Something simple like pagecount, that seems like it could use a contentless dependency, can have a pagespec that uses metadata, like `author()` or `copyright()`. +* pagestats, orphans and brokenlinks cannot use contentless dependencies + because they need to update when links change. Now I'm thinking about having a contentless dependency look at page metadata, and fire if the metadata changes. And it seems links should @@ -146,7 +143,14 @@ It's easy to see when a page's links change, since there is `%oldlinks`. To see when metadata is changed is harder, since it's stored in the pagestate by the meta plugin. -(Alternative: Make add_depends look at the pagespec. Ie, if it is a simple -page name, or a glob, we know a contentless dependency can be valid. -If's more complex, convert the dependency from contentless to full. Finding -a non-ad-hoc, non-sucky way to do that could be hard.) +Quick alternative: Make add_depends look at the pagespec. Ie, if it +is a simple page name, or a glob, we know a contentless dependency +can be valid. If's more complex, convert the dependency from +contentless to full. + +There is a lot to dislike about this method. Its parsing of the +pagespec, as currently implemented, does not let plugins add new types of +pagespecs that are contentless. Its pagespec parsing is also subject to +false negatives (though these should be somewhat rare, and no false +positives). Still, it does work, and it makes things like simple maps and +pagecounts much more efficient. -- cgit v1.2.3 From a8af271e5aed1c4aef3f66cee0847d609aedc705 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Oct 2009 16:28:14 -0400 Subject: document effect of contentless dependencies on sidebar efficiency --- doc/plugins/sidebar.mdwn | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/sidebar.mdwn b/doc/plugins/sidebar.mdwn index 36982eff3..4e356d65a 100644 --- a/doc/plugins/sidebar.mdwn +++ b/doc/plugins/sidebar.mdwn @@ -16,6 +16,10 @@ will turn off the sidebar altogether. Warning: Any change to the sidebar will cause a rebuild of the whole wiki, since every page includes a copy that has to be updated. This can -especially be a problem if the sidebar includes [[inline]] or [[map]] -directives, since any changes to pages inlined or mapped onto the sidebar +especially be a problem if the sidebar includes an [[ikiwiki/directive/inline]] +directive, since any changes to pages inlined into the sidebar will change the sidebar and cause a full wiki rebuild. + +Instead, if you include a [[ikiwiki/directive/map]] directive on the sidebar, +and it does not use the `show` parameter, only adding or removing pages +included in the map will cause a full rebuild. Modifying pages will not. -- cgit v1.2.3 From 4a20402ba0da25b5f47aaa5c6bc7b9184816cd50 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Oct 2009 16:36:39 -0400 Subject: update --- doc/bugs/transitive_dependencies.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index 546f4f3aa..b073f190b 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -52,7 +52,8 @@ Downsides here: at least in my simple implementation, which re-runs the dependency resolution loop until no new pages are rebuilt. (I added an optimisation that gets it down to 1.5X as much work on - average, still 2x as much worst case.) + average, still 2x as much worst case. I suppose building a directed + graph and traversing it would be theoretically more efficient.) * Causes extra work for some transitive dependencies that we don't actually care about. For example, changing index causes plugins/brokenlinks to update in the first pass; if there's a second @@ -60,5 +61,7 @@ Downsides here: (Of course, this is just a special case of the issue that a real modification to plugins/brokenlinks causes an unnecessary update of plugins/map, because we have [[only_one_kind_of_dependency|todo/dependency_types]].) + (Fixed now for cases like this one where contenless dependencies avoid + the unnecessary work.) --[[Joey]] -- cgit v1.2.3 From b0314296a8a3bf4293850003790bedec44911796 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Oct 2009 16:40:36 -0400 Subject: update --- doc/bugs/transitive_dependencies.mdwn | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index b073f190b..9586bc9b0 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -1,5 +1,5 @@ If a sidebar contains a map, or inline (etc), one would expect a -change/add/remove of any of the mapped/inlined pages to cause a full wiki +add/remove of any of the mapped/inlined pages to cause a full wiki rebuild. But this does not happen. If page A inlines page B, which inlines page C, a change to C will cause B @@ -55,13 +55,14 @@ Downsides here: average, still 2x as much worst case. I suppose building a directed graph and traversing it would be theoretically more efficient.) * Causes extra work for some transitive dependencies that we don't - actually care about. For example, changing index causes + actually care about. This is amelorated, but not solved by + the current work on [[todo/dependency_types]]. + For example, changing index causes plugins/brokenlinks to update in the first pass; if there's a second - pass, plugins/map is then updated, because it depends on plugins/brokenlinks. + pass, plugins/map is no longer updated (contentless dependencies FTW), + but plugins is, because it depends on plugins/brokenlinks. (Of course, this is just a special case of the issue that a real - modification to plugins/brokenlinks causes an unnecessary update of plugins/map, - because we have [[only_one_kind_of_dependency|todo/dependency_types]].) - (Fixed now for cases like this one where contenless dependencies avoid - the unnecessary work.) + modification to plugins/brokenlinks causes an unnecessary update of + plugins, and could be solved by adding more dependency types.) --[[Joey]] -- cgit v1.2.3 From be032a7b87d1080f1a54327346cb5b40432a056c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Oct 2009 20:30:21 -0400 Subject: rework dependency types code Simplify, change default content depends number to 1, change interface to make more sense. --- IkiWiki.pm | 35 +++++++++++++++-------------------- IkiWiki/Plugin/calendar.pm | 18 +++++++++--------- IkiWiki/Plugin/edittemplate.pm | 2 +- IkiWiki/Plugin/listdirectives.pm | 2 +- IkiWiki/Plugin/meta.pm | 2 +- IkiWiki/Plugin/pagecount.pm | 4 ++-- IkiWiki/Plugin/postsparkline.pm | 2 +- IkiWiki/Plugin/progress.pm | 4 ++-- IkiWiki/Render.pm | 28 +++++++++++++--------------- doc/plugins/write.mdwn | 15 +++++++++------ ikiwiki-transition | 2 +- 11 files changed, 55 insertions(+), 59 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 5e5dc739d..c1d07531e 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -29,8 +29,8 @@ our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE # Page dependency types. -our $DEPEND_EXISTS=1; -our $DEPEND_CONTENT=2; +our $DEPEND_CONTENT=1; +our $DEPEND_PRESENCE=2; # Optimisation. use Memoize; @@ -1540,13 +1540,13 @@ sub loadindex () { if (exists $d->{dependslist}) { # old format $depends{$page}={ - map { $_ => $DEPEND_CONTENT | $DEPEND_EXISTS } + map { $_ => $DEPEND_CONTENT } @{$d->{dependslist}} }; } elsif (exists $d->{depends} && ! ref $d->{depends}) { # old format - $depends{$page}={$d->{depends} => $DEPEND_CONTENT | $DEPEND_EXISTS}; + $depends{$page}={$d->{depends} => $DEPEND_CONTENT }; } elsif (exists $d->{depends}) { $depends{$page}=$d->{depends}; @@ -1771,16 +1771,23 @@ sub add_depends ($$;@) { my $page=shift; my $pagespec=shift; + # Is the pagespec a simple page name? my $simple=$pagespec =~ /$config{wiki_file_regexp}/ && $pagespec !~ /[\s*?()!]/; - my $deptype=$DEPEND_CONTENT | $DEPEND_EXISTS; + my $deptype=$DEPEND_CONTENT; if (@_) { my %params=@_; - if (defined $params{content} && $params{content} == 0 && - ($simple || pagespec_contentless($pagespec))) { - $deptype=$deptype & ~$DEPEND_CONTENT; + + # Is the pagespec limited to terms that will continue + # to match pages as long as those pages exist? + my $limited=1; + while ($limited && $pagespec=~m/(\w+)\([^\)]*\)/g) { + $limited = $1 =~ /^(glob|internal|creation_month|creation_day|creation_year|created_before|created_after)$/; } + + $deptype=$deptype & ~$DEPEND_CONTENT & $DEPEND_PRESENCE + if $params{presence} && $limited; } if ($simple) { @@ -1976,18 +1983,6 @@ sub pagespec_valid ($) { return ! $@; } -sub pagespec_contentless ($) { - my $spec=shift; - - while ($spec=~m{ - (\w+)\([^\)]*\) # only match pagespec functions - }igx) { - return 0 unless $1=~/^(glob|internal|creation_month|creation_day|creation_year|created_before|created_after)$/; - } - - return 1; -} - sub glob2re ($) { my $re=quotemeta(shift); $re=~s/\\\*/.*/g; diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index a5cc20882..a1117992a 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -105,21 +105,21 @@ sub format_month (@) { linktext => " $monthname "); } add_depends($params{page}, "$archivebase/$year/".sprintf("%02d", $month), - content => 0); + presence => 1); if (exists $cache{$pagespec}{"$pyear/$pmonth"}) { $purl = htmllink($params{page}, $params{destpage}, "$archivebase/$pyear/" . sprintf("%02d", $pmonth), linktext => " $pmonthname "); } add_depends($params{page}, "$archivebase/$pyear/".sprintf("%02d", $pmonth), - content => 0); + presence => 1); if (exists $cache{$pagespec}{"$nyear/$nmonth"}) { $nurl = htmllink($params{page}, $params{destpage}, "$archivebase/$nyear/" . sprintf("%02d", $nmonth), linktext => " $nmonthname "); } add_depends($params{page}, "$archivebase/$nyear/".sprintf("%02d", $nmonth), - content => 0); + presence => 1); # Start producing the month calendar $calendar=< 0); + add_depends($params{page}, $params{pages}, presence => 1); # Explicitly add all currently linked pages as dependencies, so # that if they are removed, the calendar will be sure to be updated. foreach my $p (@list) { - add_depends($params{page}, $p, content => 0); + add_depends($params{page}, $p, presence => 1); } return $calendar; @@ -249,19 +249,19 @@ sub format_year (@) { "$archivebase/$year", linktext => "$year"); } - add_depends($params{page}, "$archivebase/$year", content => 0); + add_depends($params{page}, "$archivebase/$year", presence => 1); if (exists $cache{$pagespec}{"$pyear"}) { $purl = htmllink($params{page}, $params{destpage}, "$archivebase/$pyear", linktext => "\←"); } - add_depends($params{page}, "$archivebase/$pyear", content => 0); + add_depends($params{page}, "$archivebase/$pyear", presence => 1); if (exists $cache{$pagespec}{"$nyear"}) { $nurl = htmllink($params{page}, $params{destpage}, "$archivebase/$nyear", linktext => "\→"); } - add_depends($params{page}, "$archivebase/$nyear", content => 0); + add_depends($params{page}, "$archivebase/$nyear", presence => 1); # Start producing the year calendar $calendar=<$monthabbr\n}; } - add_depends($params{page}, "$archivebase/$year/$mtag", content => 0); + add_depends($params{page}, "$archivebase/$year/$mtag", presence => 1); $calendar.=qq{\t\n} if ($month % $params{months_per_row} == 0); } diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index 89d450725..2dd1dbe68 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -58,7 +58,7 @@ sub preprocess (@) { $pagestate{$params{page}}{edittemplate}{$params{match}}=$link; return "" if ($params{silent} && IkiWiki::yesno($params{silent})); - add_depends($params{page}, $link, content => 0); + add_depends($params{page}, $link, presence => 1); return sprintf(gettext("edittemplate %s registered for %s"), htmllink($params{page}, $params{destpage}, $link), $params{match}); diff --git a/IkiWiki/Plugin/listdirectives.pm b/IkiWiki/Plugin/listdirectives.pm index 96150f986..4023ed7d7 100644 --- a/IkiWiki/Plugin/listdirectives.pm +++ b/IkiWiki/Plugin/listdirectives.pm @@ -84,7 +84,7 @@ sub preprocess (@) { foreach my $plugin (@pluginlist) { $result .= '
  • '; my $link=linkpage($config{directive_description_dir}."/".$plugin); - add_depends($params{page}, $link, content => 0); + add_depends($params{page}, $link, presence => 1); $result .= htmllink($params{page}, $params{destpage}, $link); $result .= '
  • '; } diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index eef3013a0..9b041a748 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -195,7 +195,7 @@ sub preprocess (@) { if (! length $link) { error gettext("redir page not found") } - add_depends($page, $link, content => 0); + add_depends($page, $link, presence => 1); $value=urlto($link, $page); $value.='#'.$redir_anchor if defined $redir_anchor; diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index 17eda0618..80561350b 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -23,8 +23,8 @@ sub preprocess (@) { $params{pages}="*" unless defined $params{pages}; # Needs to update count whenever a page is added or removed, so - # register a contentless dependency. - add_depends($params{page}, $params{pages}, content => 0); + # register a presence dependency. + add_depends($params{page}, $params{pages}, presence => 1); my @pages; if ($params{pages} eq "*") { diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm index 694d39575..3205958d4 100644 --- a/IkiWiki/Plugin/postsparkline.pm +++ b/IkiWiki/Plugin/postsparkline.pm @@ -48,7 +48,7 @@ sub preprocess (@) { error gettext("unknown formula"); } - add_depends($params{page}, $params{pages}, content => 0); + add_depends($params{page}, $params{pages}, presence => 1); my @list=sort { $params{timehash}->{$b} <=> $params{timehash}->{$a} } pagespec_match_list( diff --git a/IkiWiki/Plugin/progress.pm b/IkiWiki/Plugin/progress.pm index 3b664f4cb..26c537a84 100644 --- a/IkiWiki/Plugin/progress.pm +++ b/IkiWiki/Plugin/progress.pm @@ -36,8 +36,8 @@ sub preprocess (@) { $fill.="%"; } elsif (defined $params{totalpages} and defined $params{donepages}) { - add_depends($params{page}, $params{totalpages}, content => 0); - add_depends($params{page}, $params{donepages}, content => 0); + add_depends($params{page}, $params{totalpages}, presence => 1); + add_depends($params{page}, $params{donepages}, presence => 1); my @pages=keys %pagesources; my $totalcount=0; diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 3fc750925..cf0c3fe08 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -473,13 +473,11 @@ sub refresh () { if (exists $depends_simple{$p}) { foreach my $d (keys %{$depends_simple{$p}}) { - if ($depends_simple{$p}{$d} == $IkiWiki::DEPEND_EXISTS) { - if (exists $lc_exists_changed{$d}) { - $reason = $d; - last; - } - } - elsif (exists $lc_changed{$d}) { + if (($depends_simple{$p}{$d} & $IkiWiki::DEPEND_CONTENT && + exists $lc_changed{$d}) + || + ($depends_simple{$p}{$d} & $IkiWiki::DEPEND_PRESENCE && + exists $lc_exists_changed{$d})) { $reason = $d; last; } @@ -492,22 +490,22 @@ sub refresh () { next if $@ || ! defined $sub; my @candidates; - if ($depends{$p}{$d} == $IkiWiki::DEPEND_EXISTS) { - @candidates=@exists_changed; - } - else { + if ($depends_simple{$p}{$d} & $IkiWiki::DEPEND_CONTENT) { @candidates=@changed; } + elsif ($depends{$p}{$d} & $IkiWiki::DEPEND_PRESENCE) { + @candidates=@exists_changed; + } # only consider internal files # if the page explicitly depends # on such files if ($d =~ /internal\(/) { - if ($depends{$p}{$d} == $IkiWiki::DEPEND_EXISTS) { - push @candidates, @internal; - } - else { + if ($depends_simple{$p}{$d} & $IkiWiki::DEPEND_CONTENT) { push @candidates, @internal, @internal_change; } + elsif ($depends{$p}{$d} & $IkiWiki::DEPEND_PRESENCE) { + push @candidates, @internal; + } } foreach my $file (@candidates) { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index c244c1f2f..73db6f12a 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -613,12 +613,15 @@ generating a link to a page. Makes the specified page depend on the specified [[ikiwiki/PageSpec]]. -Additional named parameters can be passed, to indicate what type of -dependency this is. - -Currently, only a "content" parameter is specified. If set to 0, the -dependency does not involve the content of pages matching the PageSpec, but -only their existence. +By default, dependencies are full content dependencies, meaning that the +page will be updated whenever anything matching the PageSpec is modified. +This default can be overridden by additional named parameters, which can be +used to indicate weaker types of dependencies: + +* `presence` if set to true, only the presence of a matching page triggers + the dependency. +* `links` if set to true, any change in the text of links on a matching page + triggers the dependency #### `pagespec_match($$;@)` diff --git a/ikiwiki-transition b/ikiwiki-transition index c50a748e8..1bebb1176 100755 --- a/ikiwiki-transition +++ b/ikiwiki-transition @@ -299,7 +299,7 @@ sub oldloadindex { $pagemtime{$page}=$items{mtime}[0]; $oldlinks{$page}=[@{$items{link}}]; $links{$page}=[@{$items{link}}]; - $depends{$page}={ $items{depends}[0] => $IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_EXISTS } if exists $items{depends}; + $depends{$page}={ $items{depends}[0] => $IkiWiki::DEPEND_CONTENT } if exists $items{depends}; $destsources{$_}=$page foreach @{$items{dest}}; $renderedfiles{$page}=[@{$items{dest}}]; $pagecase{lc $page}=$page; -- cgit v1.2.3 From bcad00b0467c9435636dff3feb540d17fb2296d4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Oct 2009 20:35:26 -0400 Subject: update, add spec for link dependencies --- doc/todo/dependency_types.mdwn | 43 ++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 58b5ee955..f13f1448e 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -105,11 +105,11 @@ unnecessary page rebuilds: I propose the following. --[[Joey]] -* Add a second type of dependency, call it an "contentless dependency". +* Add a second type of dependency, call it an "presence dependency". * `add_depends` defaults to adding a regular ("full") dependency, as before. (So nothing breaks.) -* `add_depends($page, $spec, content => 0)` adds an contentless dependency. -* `refresh` only looks at added/removed pages when resolving contentless +* `add_depends($page, $spec, presence => 0)` adds an presence dependency. +* `refresh` only looks at added/removed pages when resolving presence dependencies. This seems straightforwardly doable. I'd like [[Will]]'s feedback on it, if @@ -129,28 +129,47 @@ I implemented the above in a branch. Then I found some problems: * Something simple like pagecount, that seems like it could use a - contentless dependency, can have a pagespec that uses metadata, like + presence dependency, can have a pagespec that uses metadata, like `author()` or `copyright()`. -* pagestats, orphans and brokenlinks cannot use contentless dependencies +* pagestats, orphans and brokenlinks cannot use presence dependencies because they need to update when links change. -Now I'm thinking about having a contentless dependency look at page +Now I'm thinking about having a special dependency look at page metadata, and fire if the metadata changes. And it seems links should either be included in that, or there should be a way to make a dependency that fires when a page's links change. (And what about backlinks?) It's easy to see when a page's links change, since there is `%oldlinks`. To see when metadata is changed is harder, since it's stored in the -pagestate by the meta plugin. +pagestate by the meta plugin. Also, there are many different types of +metadata, that would need to be matched with the pagespecs somehow. Quick alternative: Make add_depends look at the pagespec. Ie, if it -is a simple page name, or a glob, we know a contentless dependency +is a simple page name, or a glob, we know a presence dependency can be valid. If's more complex, convert the dependency from -contentless to full. +presence to full. -There is a lot to dislike about this method. Its parsing of the -pagespec, as currently implemented, does not let plugins add new types of -pagespecs that are contentless. Its pagespec parsing is also subject to +There is a lot to dislike about this method. Its parsing of the pagespec, +as currently implemented, does not let plugins add new types of pagespecs +that only care about presence. Its pagespec parsing is also subject to false negatives (though these should be somewhat rare, and no false positives). Still, it does work, and it makes things like simple maps and pagecounts much more efficient. + +---- + +Link dependencies: + +* `add_depends($page, $spec, links => 1, presence => 1)` + adds a links + presence dependency. +* `refresh` only rebuilds a page with a links dependency if + pages matched by the pagespec gain or lose links. (What the link + actually points to may change independent of this, due to changes + elsewhere, without it firing.) +* So, brokenlinks can fire whenever any links in any of the + pages it's tracking change, or when pages are added or + removed. + +TODO: How to determine if a pagespec is valid to be used with a links +dependency? Use the same simple pagespecs that are valid for presence +dependencies? -- cgit v1.2.3 From 204e733d795d94218465982701cdb8a776893ba0 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 5 Oct 2009 15:17:11 +0100 Subject: good work, thank you! --- doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn index d07b2381d..7fe92f7a9 100644 --- a/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn +++ b/doc/bugs/brokenlinks_accumulates_duplicate_items.mdwn @@ -23,3 +23,5 @@ ikiwiki version 3.14159265. >>> Found the bug that was causing duplicates to get in, and fixed it. >>> [[done]] --[[Joey]] + +>>>> Good work Joey, thanks! -- [[Jon]] -- cgit v1.2.3 From bccea01c07a112f4ded504724557085c870b56f6 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 5 Oct 2009 15:27:03 +0100 Subject: would you accept patches for this? --- doc/todo/CSS_classes_for_links.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/todo/CSS_classes_for_links.mdwn b/doc/todo/CSS_classes_for_links.mdwn index 5013a9d12..43a480be8 100644 --- a/doc/todo/CSS_classes_for_links.mdwn +++ b/doc/todo/CSS_classes_for_links.mdwn @@ -75,3 +75,20 @@ I find CSS3 support still spotty... Here are some notes on how to do this in Ik > [[rel_attribute|rel_attribute_for_links]] now that CSS can use.) > > --[[Joey]] + +>> I had a little look at this, last weekend. I added a class definition to +>> the `htmllink` call in `linkify` in `link.pm`. It works pretty well, but +>> I'd also need to adjust other `htmllink` calls (map, inline, etc.). I found +>> other methods (CSS3 selectors, etc.) to be unreliable. +>> +>> Would you potentially accept a patch that added `class="internal"` to +>> various `htmllink` calls in ikiwiki? +>> +>> How configurable do you think this behaviour should be? I'm considering a +>> config switch to enable or disable this behaviour, or possibly a +>> configurable list of class names to append for internal links (defaulting +>> to an empty list for backwards compatibility)> +>> +>> As an alternative to patching the uses of `htmllink`, what do you think +>> about patching `htmllink` itself? Are there circumstances where it might be +>> used to generate a non-internal link? -- [[Jon]] -- cgit v1.2.3 From b8fae0ec3986b675d055a55fa986388d6c35658f Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 5 Oct 2009 15:27:41 +0100 Subject: another UI issue I'm interested in --- doc/users/jon.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index b873a51e1..54f1ac383 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -30,3 +30,4 @@ I am currently mostly interested in ikiwiki usability issues: * [[bugs/the login page is unclear when multiple methods exist]] * [[bugs/backlinks onhover thing can go weird]] + * [[todo/CSS classes for links]] -- cgit v1.2.3 From c6bf4228d5c988e715ff08a9374b72ce054daa2c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 15:01:05 -0400 Subject: make links dependencies fire if broken links change --- IkiWiki/Render.pm | 41 ++++++++++++++++++++++++++++------------- doc/plugins/write.mdwn | 6 ++++-- 2 files changed, 32 insertions(+), 15 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 4e8aae3bc..599bb26e2 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -63,24 +63,39 @@ sub find_changed_links (@_) { my %linkchangers; foreach my $file (@_) { my $page=pagename($file); - + if (exists $links{$page}) { - foreach my $link (map { bestlink($page, $_) } @{$links{$page}}) { - if (length $link && - (! exists $oldlinks{$page} || - ! grep { bestlink($page, $_) eq $link } @{$oldlinks{$page}})) { - $linkchanged{$link}=1; - $linkchangers{lc($page)}=1; + foreach my $l (@{$links{$page}}) { + my $link=bestlink($page, $l); + if (length $link) { + if (! exists $oldlinks{$page} || + ! grep { bestlink($page, $_) eq $link } @{$oldlinks{$page}}) { + $linkchanged{$link}=1; + $linkchangers{lc($page)}=1; + } + } + else { + if (! grep { lc $_ eq lc $l } @{$oldlinks{$page}}) { + $linkchangers{lc($page)}=1 + } } + } } if (exists $oldlinks{$page}) { - foreach my $link (map { bestlink($page, $_) } @{$oldlinks{$page}}) { - if (length $link && - (! exists $links{$page} || - ! grep { bestlink($page, $_) eq $link } @{$links{$page}})) { - $linkchanged{$link}=1; - $linkchangers{lc($page)}=1; + foreach my $l (@{$oldlinks{$page}}) { + my $link=bestlink($page, $l); + if (length $link) { + if (! exists $links{$page} || + ! grep { bestlink($page, $_) eq $link } @{$links{$page}}) { + $linkchanged{$link}=1; + $linkchangers{lc($page)}=1; + } + } + else { + if (! grep { lc $_ eq lc $l } @{$links{$page}}) { + $linkchangers{lc($page)}=1 + } } } } diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 73db6f12a..133030f08 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -620,8 +620,10 @@ used to indicate weaker types of dependencies: * `presence` if set to true, only the presence of a matching page triggers the dependency. -* `links` if set to true, any change in the text of links on a matching page - triggers the dependency +* `links` if set to true, any change to links on a matching page + triggers the dependency. This includes when a link is added, removed, + or changes what it points to due to other changes. It does not include + the addition or removal of a duplicate link. #### `pagespec_match($$;@)` -- cgit v1.2.3 From fc864515b857694da6752879edeb2f82fd12e3a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 15:16:14 -0400 Subject: omit forum and javascript from list --- doc/plugins/orphans.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn index ea7c4df13..8c0d0b933 100644 --- a/doc/plugins/orphans.mdwn +++ b/doc/plugins/orphans.mdwn @@ -10,5 +10,6 @@ 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 !templates/* and +!forum/* and !*.js !wikiicons/* and !plugins/*"]] """]] -- cgit v1.2.3 From dc6fab3824c9848cdaf8b252253d690f96573d25 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 15:17:36 -0400 Subject: syntax --- doc/plugins/orphans.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn index 8c0d0b933..e403c2d18 100644 --- a/doc/plugins/orphans.mdwn +++ b/doc/plugins/orphans.mdwn @@ -10,6 +10,6 @@ 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 !templates/* and -!forum/* and !*.js +!forum/* and !*.js and !wikiicons/* and !plugins/*"]] """]] -- cgit v1.2.3 From d6cdced589f31471622ed481f88e33e070388c27 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 15:22:17 -0400 Subject: fix documentation of quick It *always* turns off feeds, because feeds require a look at all pages. --- doc/ikiwiki/directive/inline.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index 99f795972..4e087ab6c 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -98,7 +98,7 @@ Here are some less often needed parameters: * `feedonly` - Only generate the feed, do not display the pages inline on the page. * `quick` - Build archives in quick mode, without reading page contents for - metadata. By default, this also turns off generation of any feeds. + metadata. This also turns off generation of any feeds. * `timeformat` - Use this to specify how to display the time or date for pages in the blog. The format string is passed to the strftime(3) function. * `feedpages` - A [[PageSpec]] of inlined pages to include in the rss/atom -- cgit v1.2.3 From f7d04d106721a6bff6dfd4a0a7aa162cd2ce5536 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 15:26:15 -0400 Subject: switch plugins page to use a map instead of an inline A map just seems a better fit for reference, since it deliniates the contrib plugins better, and orders better. It also has the advantage of being less expensive, since the plugins page does not need to update when eg, the pagecount page changes. Only downside is, no rss feed of new plugins. Which I know a few people were subscribed to. --- doc/plugins.mdwn | 6 ++---- doc/plugins/contrib.mdwn | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/plugins.mdwn b/doc/plugins.mdwn index 527568208..bd7ee538b 100644 --- a/doc/plugins.mdwn +++ b/doc/plugins.mdwn @@ -13,7 +13,5 @@ will fit most uses of ikiwiki. ## Plugin directory -[[!inline pages="plugins/* and !plugins/type/* and !plugins/write and -!plugins/write/* and !plugins/contrib and !plugins/install and !*/Discussion" -feedpages="created_after(plugins/graphviz)" archive="yes" sort=title -rootpage="plugins/contrib" postformtext="Add a new plugin named:" show=0]] +[[!map pages="plugins/* and !plugins/type/* and !plugins/write and +!plugins/write/* and !plugins/contrib and !plugins/install and !*/Discussion"]] diff --git a/doc/plugins/contrib.mdwn b/doc/plugins/contrib.mdwn index a03e6a95d..ac6c1b751 100644 --- a/doc/plugins/contrib.mdwn +++ b/doc/plugins/contrib.mdwn @@ -1,6 +1,4 @@ These plugins are provided by third parties and are not currently included in ikiwiki. See [[install]] for installation help. -[[!inline pages="plugins/contrib/* and !*/Discussion" -feedpages="created_after(plugins/contrib/navbar)" archive="yes" -rootpage="plugins/contrib" postformtext="Add a new plugin named:" show=0]] +[[!map pages="plugins/contrib/* and !*/Discussion"]] -- cgit v1.2.3 From e7144e918f0d15a9bbb1a4842ff7300ce61a1886 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 15:36:51 -0400 Subject: clarify amoung I found it really hard to understand from the old description.. --- doc/ikiwiki/directive/pagestats.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/pagestats.mdwn b/doc/ikiwiki/directive/pagestats.mdwn index 66f851dbd..f14c80b07 100644 --- a/doc/ikiwiki/directive/pagestats.mdwn +++ b/doc/ikiwiki/directive/pagestats.mdwn @@ -12,13 +12,13 @@ And here's how to create a table of all the pages on the wiki: \[[!pagestats style="table"]] -The optional `among` parameter limits display to pages that match a -[[ikiwiki/PageSpec]]. For instance, to display a cloud of tags used on blog -entries, you could use: +The optional `among` parameter limits the pages whose outgoing links are +considered. For instance, to display a cloud of tags used on blog +entries, while ignoring other pages that use those tags, you could use: \[[!pagestats pages="tags/*" among="blog/posts/*"]] -or to display a cloud of tags related to Linux, you could use: +Or to display a cloud of tags related to Linux, you could use: \[[!pagestats pages="tags/* and not tags/linux" among="tagged(linux)"]] -- cgit v1.2.3 From 61a36de432c58a8d7703b1ecc5d5704981e10e2d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 15:40:18 -0400 Subject: closures --- doc/bugs/transitive_dependencies.mdwn | 2 +- doc/todo/dependency_types.mdwn | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index 9586bc9b0..0a2e9ec28 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -65,4 +65,4 @@ Downsides here: modification to plugins/brokenlinks causes an unnecessary update of plugins, and could be solved by adding more dependency types.) ---[[Joey]] +[[done]] --[[Joey]] diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index f13f1448e..f46a6a7c6 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -162,14 +162,13 @@ Link dependencies: * `add_depends($page, $spec, links => 1, presence => 1)` adds a links + presence dependency. -* `refresh` only rebuilds a page with a links dependency if - pages matched by the pagespec gain or lose links. (What the link - actually points to may change independent of this, due to changes - elsewhere, without it firing.) +* Use backlinks change code to detect changes to link dependencies too. * So, brokenlinks can fire whenever any links in any of the pages it's tracking change, or when pages are added or removed. TODO: How to determine if a pagespec is valid to be used with a links dependency? Use the same simple pagespecs that are valid for presence -dependencies? +dependencies? Seems ok. + +[[done]] -- cgit v1.2.3 From 3a188c047b4fed29865e7516f3b208901b22161d Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Mon, 5 Oct 2009 16:08:19 -0400 Subject: thoughts about renaming the actual images to .albumimage --- doc/plugins/contrib/album/discussion.mdwn | 127 ++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 5fb91c5a4..a613bb2d2 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -61,21 +61,59 @@ code or tried it yet, but here goes. --[[Joey]] seems like it will become a pain. Everyone will need to come up with their own automation for it, and then there's the question of how to automate it when uploading attachments. + +> There's already a script (ikiwiki-album) to populate a git +> checkout with skeleton "viewer" pages; I was planning to make a +> specialized CGI interface for albums after getting feedback from +> you (since the requirements for that CGI interface change depending +> on the implementation). I agree that this is ugly, though. -s + * With each viewer page having next/prev links, I can see how you were having the scalability issues with ikiwiki's data structures earlier! + +> Yeah, I think they're a basic requirement from a UI point of view +> though (although they don't necessarily have to be full wikilinks). +> -s + * And doesn't each viewer page really depend on every other page in the same albumsection? If a new page is added, the next/prev links may need to be updated, for example. If so, there will be much unnecessary rebuilding. + +> albumsections are just a way to insert headings into the flow of +> photos, so they don't actually affect dependencies. +> +> One non-obvious constraint of ikiwiki's current design is that +> everything "off-page" necessary to build any page has to happen +> at scan time, which has caused a few strange design decisions, +> like the fact that each viewer controls what album it's in. +> +> It's difficult for the contents of the album to just be a +> pagespec, like for inline, because pagespecs can depend on +> metadata, which is gathered in arbitrary order at scan time; +> so the earliest you can safely apply a pagespec to the wiki +> contents to get a concrete list of pages is at rebuild time. +> +> (This stalled my attempt at a trail plugin, too.) -s + * One thing I do like about having individual pages per image is that they can each have their own comments, etc. + +> Yes; also, they can be wikilinked. I consider those to be +> UI requirements. -s + * Seems possibly backwards that the albumimage controls what album an image appears in. Two use cases -- 1: I may want to make a locked album, but then anyone who can write to any other page on the wiki can add an image to it. 2: I may want an image to appear in more than one album. Think tags. So it seems it would be better to have the album directive control what pages it includes (a la inline). + +> See note above about pagespecs not being very safe early on. +> You did merge my inline-with-pagenames feature, which is safe to use +> at scan time, though. + * Putting a few of the above thoughts together, my ideal album system seems to be one where I can just drop the images into a directory and have them appear in the album index, as well as each generate their own wiki @@ -84,3 +122,92 @@ code or tried it yet, but here goes. --[[Joey]] themselves.) This is almost pointing toward making the images first-class wiki page sources. Hey, it worked for po! :) But the metadata and editing problems probably don't really allow that. + +> Putting a JPEG in the web form is not an option from my point of +> view :-) but perhaps there could just be a "web-editable" flag supplied +> by plugins, and things could be changed to respect it. +> +> In a way, what you really want for metadata is to have it in the album +> page, so you can batch-edit the whole lot by editing one file (this +> does mean that editing the album necessarily causes each of its viewers +> to be rebuilt, but in practice that happens anyway). -s + +---- + +Trying to use the "special extension" design: + +Suppose that each viewer is a JPEG-or-GIF-or-something, with extension +".albumimage". We have a gallery "memes" with three images, badger, +mushroom and snake. + +Files in git repo: + +* index.mdwn +* memes.mdwn +* memes/badger.albumimage (a renamed JPEG) +* memes/badger/comment_1._comment +* memes/badger/comment_2._comment +* memes/mushroom.albumimage (a renamed GIF) +* memes/mushroom.meta (sidecar file with metadata) +* memes/snake.albumimage (a renamed video) + +Files in web content: + +* index.html +* memes/index.html +* memes/96x96-badger.jpg (from img) +* memes/96x96-mushroom.jpg (from img) +* memes/96x96-snake.jpg (from img, hacked up to use totem-video-thumbnailer :-) ) +* memes/badger/index.html (including comments) +* memes/badger.jpg +* memes/mushroom/index.html +* memes/mushroom.gif +* memes/snake/index.html +* memes/snake.mov + +ispage("memes/badger") (etc.) must be true, to make the above rendering +happen, so albumimage needs to be a "page" extension. + +To not confuse other plugins, album should probably have a filter() hook +that turns .albumimage files into HTML? That'd probably be a reasonable +way to get them rendered anyway. + +do=edit&page=memes/badger needs to not put the JPG in a text box: somehow +divert or override the normal edit CGI by telling it that .albumimage +files are not editable in the usual way? + +Every image needs to depend on, and link to, the next and previous images, +which is a bit tricky. In previous thinking about this I'd been applying +the overly strict constraint that the ordered sequence of pages in each +album must be known at scan time. However, that's not *necessarily* needed: +the album and each photo could collect an unordered superset of dependencies +at scan time, and at rebuild time that could be refined to be the exact set, +in order. Perhaps restricting to "the images in an album A must match A/*" +would be useful; then the unordered superset could just be "A/*". Your +"albums via tags" idea would be nice too though, particularly for feature +parity with e.g. Facebook: "photos of Joey" -> "tags/joey and albumimage()" +maybe? + +If images are allowed to be considered to be part of more than one album, +then a pretty and usable UI becomes harder - "next/previous" expands into +"next photo in holidays/2009/germany / next photo in tagged/smcv / ..." +and it could get quite hard to navigate. Perhaps next/previous links could +be displayed only for the closest ancestor (in URL space) that is an +album, or something? + +Requiring renaming is awkward for non-technical Windows/Mac users, with both +platforms' defaults being to hide extensions; however, this could be +circumvented by adding some sort of hook in attachment to turn things into +a .albumimage at upload time, and declaring that using git/svn/... without +extensions visible is a "don't do that then" situation :-) + +Ideally attachment could also be configured to upload into a specified +underlay, so that photos don't have to be in your source-code control +(you might want that, but I don't!). + +Things that would be nice, and are probably possible: + +* make the "Edit page" link on viewers divert to album-specific CGI instead + of just failing or not appearing +* some way to deep-link to memes/badger.jpg with a wikilink, without knowing a + priori that it's secretly a JPEG -- cgit v1.2.3 From 4b2eaac156433d6e16b4b63660654bb26561b77f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 16:18:54 -0400 Subject: response --- doc/todo/CSS_classes_for_links.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/CSS_classes_for_links.mdwn b/doc/todo/CSS_classes_for_links.mdwn index 43a480be8..38db87724 100644 --- a/doc/todo/CSS_classes_for_links.mdwn +++ b/doc/todo/CSS_classes_for_links.mdwn @@ -92,3 +92,12 @@ I find CSS3 support still spotty... Here are some notes on how to do this in Ik >> As an alternative to patching the uses of `htmllink`, what do you think >> about patching `htmllink` itself? Are there circumstances where it might be >> used to generate a non-internal link? -- [[Jon]] + +>>> I think that the minimum configurability to get something that +>>> can be used by CSS to style the links however the end user wants +>>> is the best thing to shoot for. Ideally, no configurability. And +>>> a tip or something documenting how to use the classes in your CSS +>>> to style links so that eg, external links have a warning icon. +>>> +>>> `htmllink` can never be used to generate an external link. So, +>>> patching it seems the best approach. --[[Joey]] -- cgit v1.2.3 From 786dcf15c4117f9ae6b000318ac9809399df4d69 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 16:47:12 -0400 Subject: responses, questions, ideas --- doc/plugins/contrib/album/discussion.mdwn | 45 ++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index a613bb2d2..5c8e74fa6 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -76,6 +76,12 @@ code or tried it yet, but here goes. --[[Joey]] > though (although they don't necessarily have to be full wikilinks). > -s +>> I think that with the new dependency types system, the dependencies for +>> these can be presence dependencies, which will probably help with +>> avoiding rebuilds of a page if the next/prev page is changed. +>> (Unless you use img to make the thumbnails for those links, then it +>> would rebuild the thumbnails anyway. Have not looked at the code.) --[[Joey]] + * And doesn't each viewer page really depend on every other page in the same albumsection? If a new page is added, the next/prev links may need to be updated, for example. If so, there will be much @@ -97,6 +103,11 @@ code or tried it yet, but here goes. --[[Joey]] > > (This stalled my attempt at a trail plugin, too.) -s +>> Not sure I understand why these need to look at pagespecs at scan time? +>> Also, note that it is fairly doable to detect if a pagespec uses such +>> metadata. Er, I mean, I have a cheezy hack in `add_depends` now that does +>> it to deal with a similar case. --[[Joey]] + * One thing I do like about having individual pages per image is that they can each have their own comments, etc. @@ -131,6 +142,15 @@ code or tried it yet, but here goes. --[[Joey]] > page, so you can batch-edit the whole lot by editing one file (this > does mean that editing the album necessarily causes each of its viewers > to be rebuilt, but in practice that happens anyway). -s +> +>> Yes, that would make some sense.. It also allows putting one image in +>> two albums, with different caption etc. (Maybe for different audiences.) +>> +>> It would probably be possible to add a new dependency type, and thus +>> make ikiwiki smart about noticing whether the metadata has actually +>> changed, and only update those viewers where it has. But the dependency +>> type stuff is still very new, and not plugin friendly .. so only just +>> possible, --[[Joey]] ---- @@ -140,6 +160,10 @@ Suppose that each viewer is a JPEG-or-GIF-or-something, with extension ".albumimage". We have a gallery "memes" with three images, badger, mushroom and snake. +> An alternative might be to use ".album.jpg", and ".album.gif" +> etc as the htmlize extensions. May need some fixes to ikiwiki to support +> that. --[[Joey]] + Files in git repo: * index.mdwn @@ -172,6 +196,10 @@ To not confuse other plugins, album should probably have a filter() hook that turns .albumimage files into HTML? That'd probably be a reasonable way to get them rendered anyway. +> I guess that is needed to avoid preprocess, scan, etc trying to process +> the image, as well as eg, smiley trying to munge it in sanitize. +> --[[Joey]] + do=edit&page=memes/badger needs to not put the JPG in a text box: somehow divert or override the normal edit CGI by telling it that .albumimage files are not editable in the usual way? @@ -182,7 +210,14 @@ the overly strict constraint that the ordered sequence of pages in each album must be known at scan time. However, that's not *necessarily* needed: the album and each photo could collect an unordered superset of dependencies at scan time, and at rebuild time that could be refined to be the exact set, -in order. Perhaps restricting to "the images in an album A must match A/*" +in order. + +> Why do you need to collect this info at scan time? You can determine it +> at build time via `pagespec_match_list`, surely .. maybe with some +> memoization to avoid each image in an album building the same list. +> I sense that I may be missing a subtelty though. --[[Joey]] + +Perhaps restricting to "the images in an album A must match A/*" would be useful; then the unordered superset could just be "A/*". Your "albums via tags" idea would be nice too though, particularly for feature parity with e.g. Facebook: "photos of Joey" -> "tags/joey and albumimage()" @@ -195,12 +230,20 @@ and it could get quite hard to navigate. Perhaps next/previous links could be displayed only for the closest ancestor (in URL space) that is an album, or something? +> Ugh, yeah, that is a problem. Perhaps wanting to support that was just +> too ambitious. --[[Joey]] + Requiring renaming is awkward for non-technical Windows/Mac users, with both platforms' defaults being to hide extensions; however, this could be circumvented by adding some sort of hook in attachment to turn things into a .albumimage at upload time, and declaring that using git/svn/... without extensions visible is a "don't do that then" situation :-) +> Or extend `pagetype` so it can do the necessary matching without +> renaming. Maybe by allowing a subdirectory to be specified along +> with an extension. (Or allow specifying a full pagespec, +> but I hesitate to seriously suggest that.) --[[Joey]] + Ideally attachment could also be configured to upload into a specified underlay, so that photos don't have to be in your source-code control (you might want that, but I don't!). -- cgit v1.2.3 From 031d1bf5046ab77c796477a19967e7c0c512c417 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 17:03:16 -0400 Subject: use among limit for correctness --- IkiWiki/Plugin/pagestats.pm | 2 +- doc/plugins.mdwn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 00b919325..0765c1cfa 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -39,7 +39,7 @@ sub preprocess (@) { add_depends($params{page}, $params{pages}, exists => 1); # Also needs to update when any page with links changes, # in case the links point to our displayed pages. - # (Amoung limits this further.) + # (Among limits this further.) add_depends($params{page}, exists $params{among} ? $params{among} : "*", links => 1); diff --git a/doc/plugins.mdwn b/doc/plugins.mdwn index bd7ee538b..697b4a219 100644 --- a/doc/plugins.mdwn +++ b/doc/plugins.mdwn @@ -1,7 +1,7 @@ Most of ikiwiki's [[features]] are implemented as plugins. Many of these plugins are included with ikiwiki. -[[!pagestats pages="plugins/type/* and !plugins/type/slow"]] +[[!pagestats pages="plugins/type/* and !plugins/type/slow" among="plugins/*"]] There's documentation if you want to [[write]] your own plugins, or you can [[install]] plugins [[contributed|contrib]] by others. -- cgit v1.2.3 From ba71687077f0acd902294f9081eff11f7e843532 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 17:10:00 -0400 Subject: note that this old bug affects more stuff now --- doc/bugs/bestlink_change_update_issue.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/bestlink_change_update_issue.mdwn b/doc/bugs/bestlink_change_update_issue.mdwn index 5ce4a93d2..fee65c0de 100644 --- a/doc/bugs/bestlink_change_update_issue.mdwn +++ b/doc/bugs/bestlink_change_update_issue.mdwn @@ -11,3 +11,6 @@ calculation in refresh(), which doesn't detect that the link has changed in this case. Still true in 1.43 although the code is much different now.. + +> Still true as of 031d1bf5046ab77c796477a19967e7c0c512c417, +> and now this same problem also affects link dependencies. -- cgit v1.2.3 From bf10130165f2696666e273b5ea29348089496c1c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 17:11:03 -0400 Subject: close --- doc/bugs/cgi_does_not_use_templatedir_overlay.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/cgi_does_not_use_templatedir_overlay.mdwn b/doc/bugs/cgi_does_not_use_templatedir_overlay.mdwn index eb300e7c4..d86a3ac3e 100644 --- a/doc/bugs/cgi_does_not_use_templatedir_overlay.mdwn +++ b/doc/bugs/cgi_does_not_use_templatedir_overlay.mdwn @@ -20,3 +20,7 @@ However, when I make a change via the CGI (which has been created by the last se > problems; it could check if the templatedir exists, and check that it's > readable. This would add some extra system calls to every ikiwiki run, > and I'm not convinced it's worth it. --[[Joey]] + +>> Closing this bug since I never heard back that it was not one +>> of the above two problems, and I consider both problems local +>> configuration errors. --[[Joey]] [[done]] -- cgit v1.2.3 From 4dd289ba312126a3eaad84638fb290f94ecfcf42 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 17:12:38 -0400 Subject: fixed a while ago --- doc/bugs/git_utf8.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/git_utf8.mdwn b/doc/bugs/git_utf8.mdwn index dc8df1dab..39903d51c 100644 --- a/doc/bugs/git_utf8.mdwn +++ b/doc/bugs/git_utf8.mdwn @@ -6,3 +6,7 @@ appearing. Probably git's output needs to be force encoded to utf-8. --[[Joey]] + +> I did that in 4ac0b2953131d7a53562ab8918c8e5a49952d8ac , [[done]] +> --[[Joey]] + -- cgit v1.2.3 From cdd7334c3185eb7c35237e1ea1c11ed0da494029 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 17:15:37 -0400 Subject: close --- doc/bugs/discussion_of_what__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/discussion_of_what__63__.mdwn b/doc/bugs/discussion_of_what__63__.mdwn index 2f469fed9..763e599bf 100644 --- a/doc/bugs/discussion_of_what__63__.mdwn +++ b/doc/bugs/discussion_of_what__63__.mdwn @@ -1,3 +1,7 @@ When searching in ikiwiki, sometimes discussion pages turn up. However, they are only titled "discussion". In order to know what topic they are discussing, you have to look at the URL. Shouldn't they be titled "foo/discussion" or "discussion of foo" or something? Thanks, --[[perolofsson]] + +> This bug was filed when ikiwiki still used hyperestradier. +> Now that it uses xapian, the search results include the full +> page name, which seems sufficient to call this [[done]] --[[Joey]] -- cgit v1.2.3 From 7a520974b59c1a498232512978e4abd926292066 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 17:44:15 -0400 Subject: uh oh, this affects link deps --- doc/bugs/bestlink_change_update_issue.mdwn | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/bugs/bestlink_change_update_issue.mdwn b/doc/bugs/bestlink_change_update_issue.mdwn index fee65c0de..211a78332 100644 --- a/doc/bugs/bestlink_change_update_issue.mdwn +++ b/doc/bugs/bestlink_change_update_issue.mdwn @@ -1,16 +1,15 @@ * Has bugs updating things if the bestlink of a page changes due to adding/removing a page. For example, if Foo/Bar links to "Baz", which is Foo/Baz, and Foo/Bar/Baz gets added, it will update the links in Foo/Bar - to point to it, but will forget to update the linkbacks in Foo/Baz. + to point to it, but will forget to update the backlinks in Foo/Baz. -* And if Foo/Bar/Baz is then removed, it forgets to update Foo/Bar to link - back to Foo/Baz. +* And if Foo/Bar/Baz is then removed, Foo/Bar gets a broken link, + instead of changing back to linking to Foo/Baz. -As of 1.33, this is still true. The buggy code is the %linkchanged -calculation in refresh(), which doesn't detect that the link has changed in -this case. +This old bug still exists as of 031d1bf5046ab77c796477a19967e7c0c512c417. +and now this same problem also affects link dependencies. -Still true in 1.43 although the code is much different now.. - -> Still true as of 031d1bf5046ab77c796477a19967e7c0c512c417, -> and now this same problem also affects link dependencies. +(Some of) The buggy code is in `find_changed_links` +which doesn't detect that the link has changed in +this case, because when it looks at where the `%oldlinks` link to, +it does so after having updated state to add/remove the page. -- cgit v1.2.3 From 0cb9e588e4253d317945399120a1ef5780b59d7a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 20:54:38 -0400 Subject: add among limit to pagestats --- doc/examples/blog/index.mdwn | 2 +- doc/examples/blog/tags.mdwn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index aef46eb68..01b714fcd 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -1,4 +1,4 @@ -[[!pagestats pages="./tags/*"]] +[[!pagestats pages="./tags/*" among="./posts/*"]] Welcome to my blog. diff --git a/doc/examples/blog/tags.mdwn b/doc/examples/blog/tags.mdwn index 53cc8d368..b5eca5b71 100644 --- a/doc/examples/blog/tags.mdwn +++ b/doc/examples/blog/tags.mdwn @@ -1,3 +1,3 @@ -[[!pagestats pages="./tags/*"]] +[[!pagestats pages="./tags/*" among="./posts/*"]] On the right you can see the tag cloud for this blog. -- cgit v1.2.3 From 534518792d95fb51f6d49c0c48f3f8b3b7398df3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 22:30:14 -0400 Subject: update --- doc/bugs/bestlink_change_update_issue.mdwn | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/bugs/bestlink_change_update_issue.mdwn b/doc/bugs/bestlink_change_update_issue.mdwn index 211a78332..8a526e821 100644 --- a/doc/bugs/bestlink_change_update_issue.mdwn +++ b/doc/bugs/bestlink_change_update_issue.mdwn @@ -3,13 +3,27 @@ Foo/Baz, and Foo/Bar/Baz gets added, it will update the links in Foo/Bar to point to it, but will forget to update the backlinks in Foo/Baz. + The buggy code is in `refresh()`, when it determines what + links, on what pages, have changed. It only looks at + changed/added/deleted pages when doing this. But when Foo/Bar/Baz + is added, Foo/Bar is not changed -- so the change it its + backlinks is not noticed. + + To fix this, it needs to consider, when rebuilding Foo/Bar for the changed + links, what oldlinks Foo/Bar had. If one of the oldlinks linked to + Foo/Baz, and not links to Foo/Bar/Baz, it could then rebuild Foo/Baz. + + Problem is that in order to do that, it needs to be able to tell that + the oldlinks linked to Foo/Baz. Which would mean either calculating + all links before the scan phase, or keeping a copy of the backlinks + from the last build, and using that. The first option would be a lot + of work for this minor issue.. it might be less expensive to just rebuild + *all* pages that Foo/Bar links to. + + Keeping a copy of the backlinks has some merit. It could also be + incrementally updated. + * And if Foo/Bar/Baz is then removed, Foo/Bar gets a broken link, instead of changing back to linking to Foo/Baz. This old bug still exists as of 031d1bf5046ab77c796477a19967e7c0c512c417. -and now this same problem also affects link dependencies. - -(Some of) The buggy code is in `find_changed_links` -which doesn't detect that the link has changed in -this case, because when it looks at where the `%oldlinks` link to, -it does so after having updated state to add/remove the page. -- cgit v1.2.3 From 9f4c5d2466b71d6a80fc1af3c1d0367aafde3112 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 22:59:33 -0400 Subject: new todo --- doc/todo/cache_backlinks.mdwn | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 doc/todo/cache_backlinks.mdwn (limited to 'doc') diff --git a/doc/todo/cache_backlinks.mdwn b/doc/todo/cache_backlinks.mdwn new file mode 100644 index 000000000..dc13d464e --- /dev/null +++ b/doc/todo/cache_backlinks.mdwn @@ -0,0 +1,25 @@ +I'm thinking about caching the backlinks between runs. --[[Joey]] + +* It would save some time (spent resolving every single link + on every page, every run). The cached backlinks could be + updated by only updating backlinks from changed pages. + (Saved time is less than 1/10th of a second for docwiki.) + +* It may allow attacking [[bugs/bestlink_change_update_issue]], + since that seems to need a copy of the old backlinks. + Actually, just the next change will probably solve that: + +* It should allow removing the `%oldlink_targets`, `%backlinkchanged`, + and `%linkchangers` calculation code. Instead, just generate + a record of which pages' backlinks have changed when updating + the backlinks, and then rebuild those pages. + +Proposal: + +* Store a page's backlinks in the index, same as everything else. + +* Do *something* to generate or store the `%brokenlinks` data. + This is currently generated when calculating backlinks, and + is only used by the brokenlinks plugin. It's not the right + "shape" to be stored in the index, but could be changed around + to fit. -- cgit v1.2.3 From af85f62d6fd7c3b437fa527bff3392616d3513dc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Oct 2009 17:47:10 -0400 Subject: linkmap: Use a combination of presence and link dependencies. This makes the map be regenerated much less frequently, so larger maps are more practical to use now. --- IkiWiki/Plugin/linkmap.pm | 6 +++--- debian/changelog | 3 +++ doc/ikiwiki/directive/linkmap.mdwn | 4 +--- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm index d0671ae0e..d7ba68da9 100644 --- a/IkiWiki/Plugin/linkmap.pm +++ b/IkiWiki/Plugin/linkmap.pm @@ -28,9 +28,9 @@ sub preprocess (@) { $params{pages}="*" unless defined $params{pages}; - # Needs to update whenever a page is added, removed, or - # its links change, so register a dependency. - add_depends($params{page}, $params{pages}); + # Needs to update whenever a relevant page is added, or removed, or + # its links change. + add_depends($params{page}, $params{pages}, presence => 1, links => 1); # Can't just return the linkmap here, since the htmlscrubber # scrubs out all tags (with good reason!) diff --git a/debian/changelog b/debian/changelog index 89d377769..a006d3177 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,9 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low This makes them more efficient. It also fixes a longstanding bug, where if only a small set of pages were considered by orphans/pagestats, changes to links on other pages failed to cause an update. + * linkmap: Use a combination of presence and link dependencies. + This makes the map be regenerated much less frequently, so larger + maps are more practical to use now. * Transitive dependencies are now correctly supported. * Rebuild wikis on upgrade to this version to get improved dependency info. diff --git a/doc/ikiwiki/directive/linkmap.mdwn b/doc/ikiwiki/directive/linkmap.mdwn index db79a1491..38cf0fd11 100644 --- a/doc/ikiwiki/directive/linkmap.mdwn +++ b/doc/ikiwiki/directive/linkmap.mdwn @@ -9,9 +9,7 @@ Only links between mapped pages will be shown; links pointing to or from unmapped pages will be omitted. If the pages to include are not specified, the links between all pages (and other files) in the wiki are mapped. For best results, only a small set of pages should be mapped, since otherwise -the map can become very large, unwieldy, and complicated. Also, the map is -rebuilt whenever one of the mapped pages is changed, which can make the -wiki a bit slow. +the map can become very large, unwieldy, and complicated. Here are descriptions of all the supported parameters to the `linkmap` directive: -- cgit v1.2.3 From 348a6aaee3c13e0afababc4b9bb41743d7227f12 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Oct 2009 18:20:11 -0400 Subject: pagespec for links dependencies --- doc/todo/dependency_types.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index f46a6a7c6..19294bba0 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -166,9 +166,10 @@ Link dependencies: * So, brokenlinks can fire whenever any links in any of the pages it's tracking change, or when pages are added or removed. - -TODO: How to determine if a pagespec is valid to be used with a links -dependency? Use the same simple pagespecs that are valid for presence -dependencies? Seems ok. +* To determine if a pagespec is valid to be used with a links dependency, + use the same set that are valid for presence dependencies. But also + allow `backlinks()` to be used in it, since that matches pages + that the page links to, which is just what link dependencies are + triggered on. [[done]] -- cgit v1.2.3 From 0582365a56aedaee8dd53ec2f86ea189aff01a38 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Oct 2009 20:19:17 -0400 Subject: notes on removal problem --- doc/todo/dependency_types.mdwn | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index f13f1448e..59ccc7591 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -158,7 +158,7 @@ pagecounts much more efficient. ---- -Link dependencies: +### Link dependencies * `add_depends($page, $spec, links => 1, presence => 1)` adds a links + presence dependency. @@ -173,3 +173,33 @@ Link dependencies: TODO: How to determine if a pagespec is valid to be used with a links dependency? Use the same simple pagespecs that are valid for presence dependencies? + +---- + +### the removal problem + +So far I have not addressed fixing the removal problem (which Will +discusses above). + +Summary of problem: A has a dependency on a pagespec such as +"bugs/* and !link(done)". B currently matches. Then B is updated, +in a way that makes A's dependency not match it (ie, it links to done). +Now A is not updated, because ikiwiki does not realize that it +depended on B before. + +This was worked around to fix [[bugs/inline_page_not_updated_on_removal]] +by inline and map adding explicit dependencies on each page that appears +on them. Then a change to B triggers the explicit dep. While this works, +it's 1) ugly 2) probably not implemented by all plugins that could +be affected by this problem (ie, linkmap) and 3) is most of the reason why +we grew the complication of `depends_simple`. + +One way to fix this is to include with each dependency, a list of pages +that currently match it. If the list changes, the dependency is triggered. + +Should be doable, but seems to involve a more work than +currently. Consider that a dependency on "bugs/*" currently +is triggered by just checking until *one* page is found to match it. +But to store the list, *every* page would have to be tried against it. +Unless the list can somehow be intelligently updated, looking at only the +changed pages. -- cgit v1.2.3 From d8607f5e73990e7802e03eef2065ebac102fbd2f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Oct 2009 20:20:05 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 59ccc7591..7e940543c 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -169,10 +169,11 @@ pagecounts much more efficient. * So, brokenlinks can fire whenever any links in any of the pages it's tracking change, or when pages are added or removed. - -TODO: How to determine if a pagespec is valid to be used with a links -dependency? Use the same simple pagespecs that are valid for presence -dependencies? +* To determine if a pagespec is valid to be used with a links dependency, + use the same set that are valid for presence dependencies. But also + allow `backlinks()` to be used in it, since that matches pages + that the page links to, which is just what link dependencies are + triggered on. ---- -- cgit v1.2.3 From 3d609928e5d166897f26d2afe1b39e518f67a22c Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Wed, 7 Oct 2009 02:40:32 -0400 Subject: Comments (maybe not so helpful - sorry) --- doc/todo/dependency_types.mdwn | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 7e940543c..0503b47af 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -156,6 +156,67 @@ false negatives (though these should be somewhat rare, and no false positives). Still, it does work, and it makes things like simple maps and pagecounts much more efficient. +---- + +#### Will's first pass feedback. + +If the API is going to be updated, then it would be good to make it forward compatible. +I'd like for the API to be extendible to what is useful for complex pagespecs, even if we +that is a little redundant at the moment. + +My attempt to play with this is in my git repo. [[!template id=gitbranch branch=origin/depends-spec author="[[will]]"]] +That branch is a little out of date, but if you just look at the changes in IkiWiki.pm you'll see the concept I was looking at. +I added an "add_depends_spec()" function that adds a dependency on the pagespec passed to it. If the set of matched pages +changes, then the dependent page is rebuilt. At the moment the implementation uses the same hack used by map and inline - +just add all the pages that currently exist as traditional content dependencies. + +Getting back to commenting on your proposal: + +Just talking about the definition of a "presence dependency" for the moment, and ignoring implementation. Is a +"presence dependency" supposed to cause an update when a page disappears? I assume so. Is a presence dependency +supposed to cause an update when a pages existence hasn't changed, but it no longer matches the pagespec. +(e.g. you use `created_before(test_page)` in a pagespec, and there was a page, `new_page`, that was created +after `test_page`. `new_page` will not match the spec. Now we'll delete and then re-create `test_page`. Now +`new_page` will match the spec, and yet `new_page` itself hasn't changed. Nor has its 'presence' - it was present +before and it is present now. Should this cause a re-build of any page that has a 'presence' dependency on the spec? + +I think that is another version of the problem you encountered with meta-data. + +In the longer term I was thinking we'd have to introduce a concept of 'internal pagespec dependencies'. Note that I'm +defining 'internal' pagespec dependencies differently to the pagespec dependencies I defined above. Perhaps an example: +If you had a pagespec that was `created_before(test_page)`, then you could list all pages created before `test_page` +with a `map` directive. The map directive would add a pagespec dependency on `created_before(test_page)`. +Internally, there would be a second page-spec parsing function that discovers which pages a given pagespec +depends on. As well as the function `match_created_before()`, we'd have to add a new function `depend_created_before()`. +This new function would return a list of pages, which when any of them change, the output of `match_created_before()` +would change. In this example, it would just return `test_page`. + +These lists of dependent pages could just be concatenated for every `match_...()` function in a pagespec - you can ignore +the boolean formula aspects of the pagespec for this. If a content dependency were added on these pages, then I think +the correct rebuilds would occur. + +In all, this is a surprisingly difficult problem to solve perfectly. Consider the following case: + +PageA.mdwn: + +> [ShavesSelf] + +PageB.mdwn + +> Doesn't shave self. + +ShavedByBob.mdwn: + +> [!include pages="!link(ShavesSelf)"] + +Does ShavedByBob.mdwn include itself? + +(Yeah - in IkiWiki currently links are included by include, but the idea holds. I had a good example a while back, but I can't think of it right now.) + +sigh. + +-- [[Will]] + ---- ### Link dependencies -- cgit v1.2.3 From 66e894c8771c5a5dfbd4cb92f826d4d397b2256f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 13:35:48 -0400 Subject: thoughts --- doc/todo/dependency_types.mdwn | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 0503b47af..9d649e1e0 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -170,6 +170,11 @@ I added an "add_depends_spec()" function that adds a dependency on the pagespec changes, then the dependent page is rebuilt. At the moment the implementation uses the same hack used by map and inline - just add all the pages that currently exist as traditional content dependencies. +> As I note below, a problem with this approach is that it has to try +> matching the pagespec against every page, redundantly with the work done +> by the plugin. (But there are ways to avoid that redundant matching.) +> --[[Joey]] + Getting back to commenting on your proposal: Just talking about the definition of a "presence dependency" for the moment, and ignoring implementation. Is a @@ -180,6 +185,11 @@ after `test_page`. `new_page` will not match the spec. Now we'll delete and th `new_page` will match the spec, and yet `new_page` itself hasn't changed. Nor has its 'presence' - it was present before and it is present now. Should this cause a re-build of any page that has a 'presence' dependency on the spec? +> Yes, a presence dep will trigger when a page is added, or removed. + +> Your example is valid.. but it's also not handled right by normal, +> (content) dependencies, for the same reasons. --[[Joey]] + I think that is another version of the problem you encountered with meta-data. In the longer term I was thinking we'd have to introduce a concept of 'internal pagespec dependencies'. Note that I'm @@ -217,6 +227,19 @@ sigh. -- [[Will]] +> I have also been thinking about some sort of analysis pass over pagespecs +> to determine what metadata, pages, etc they depend on. It is indeed +> tricky to do. Even if it's just limited to returning a list of pages +> as you suggest. +> +> Consider: For a `*` glob, it has to return a list of all pages +> in the wiki. Which is expensive. And what if the pagespec is +> something like `* and backlink(index)`? Without analyising the +> boolean relationship between terms, the returned list +> will have many more items in it than it should. Or do we not make +> globs return their matches? (If so we have to deal with those +> with one of the other methods disucssed.) --[[Joey]] + ---- ### Link dependencies @@ -259,9 +282,22 @@ we grew the complication of `depends_simple`. One way to fix this is to include with each dependency, a list of pages that currently match it. If the list changes, the dependency is triggered. -Should be doable, but seems to involve a more work than +Should be doable, but may involve more work than currently. Consider that a dependency on "bugs/*" currently is triggered by just checking until *one* page is found to match it. But to store the list, *every* page would have to be tried against it. Unless the list can somehow be intelligently updated, looking at only the -changed pages. +changed pages. + +---- + +What if there were a function that added a dependency, and at the same time +returned a list of pages matching the pagespec? Plugins that use this would +be exactly the ones, like inline and map, for which this is a problem, and +which already do a match pass over all pages. + +Adding explicit dependencies during this pass would thus be nearly free. +Not 100% free since it would add explicit deps for things that are not +shown on an inline that limits its display to the first sorted N items. +I suppose we could reach 100% free by making the function also handle +sorting and limiting, though that could be overkill. -- cgit v1.2.3 From a48b59a4afd01f3f53466eae83bb2b52244ee8e1 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 7 Oct 2009 19:53:28 +0200 Subject: Use %S instead of %s for the debbug shortcut, so that things like [[!debbug 522689#38]] work as expected. --- doc/shortcuts.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index 500146a31..4213295ad 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -18,7 +18,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=wikipedia url="http://en.wikipedia.org/wiki/%s"]] * [[!shortcut name=wikitravel url="http://wikitravel.org/en/%s"]] * [[!shortcut name=wiktionary url="http://en.wiktionary.org/wiki/%s"]] -* [[!shortcut name=debbug url="http://bugs.debian.org/%s" desc="bug #%s"]] +* [[!shortcut name=debbug url="http://bugs.debian.org/%S" desc="bug #%s"]] * [[!shortcut name=deblist url="http://lists.debian.org/debian-%s" desc="debian-%s@lists.debian.org"]] * [[!shortcut name=debpkg url="http://packages.debian.org/%s"]] * [[!shortcut name=debpkgsid url="http://packages.debian.org/sid/%s"]] -- cgit v1.2.3 From 93ddca3e9c420f334cc0bebd53945633452513a3 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 7 Oct 2009 19:54:46 +0200 Subject: Make it obvious for the reader of the rendered page that the debbug shortcut links to Debian bug reports. --- doc/shortcuts.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index 4213295ad..ad3f2a890 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -18,7 +18,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=wikipedia url="http://en.wikipedia.org/wiki/%s"]] * [[!shortcut name=wikitravel url="http://wikitravel.org/en/%s"]] * [[!shortcut name=wiktionary url="http://en.wiktionary.org/wiki/%s"]] -* [[!shortcut name=debbug url="http://bugs.debian.org/%S" desc="bug #%s"]] +* [[!shortcut name=debbug url="http://bugs.debian.org/%S" desc="Debian bug #%s"]] * [[!shortcut name=deblist url="http://lists.debian.org/debian-%s" desc="debian-%s@lists.debian.org"]] * [[!shortcut name=debpkg url="http://packages.debian.org/%s"]] * [[!shortcut name=debpkgsid url="http://packages.debian.org/sid/%s"]] -- cgit v1.2.3 From 0fb4474cf82ffe0ccd2b206843ba4f61160e4cf8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 13:55:02 -0400 Subject: limit to discussion pages of blog posts, not whole wiki --- doc/examples/blog/comments.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/examples/blog/comments.mdwn b/doc/examples/blog/comments.mdwn index c46f95df7..4735dea08 100644 --- a/doc/examples/blog/comments.mdwn +++ b/doc/examples/blog/comments.mdwn @@ -1,3 +1,3 @@ This page will show all comments made to posts in my [[blog|index]]. -[[!inline pages="*/Discussion or internal(./posts/*/comment_*)"]] +[[!inline pages="./posts/*/Discussion or internal(./posts/*/comment_*)"]] -- cgit v1.2.3 From 8fa0cfced9a3d0f79cbf7867e354530d11f9f211 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 14:11:35 -0400 Subject: remove test case for closed bug --- doc/bugs/Inline_doesn__39__t_wikilink_to_pages.mdwn | 4 ---- 1 file changed, 4 deletions(-) (limited to 'doc') diff --git a/doc/bugs/Inline_doesn__39__t_wikilink_to_pages.mdwn b/doc/bugs/Inline_doesn__39__t_wikilink_to_pages.mdwn index 32f9f1245..13b80b436 100644 --- a/doc/bugs/Inline_doesn__39__t_wikilink_to_pages.mdwn +++ b/doc/bugs/Inline_doesn__39__t_wikilink_to_pages.mdwn @@ -2,10 +2,6 @@ It seems that the [[ikiwiki/directive/inline]] directive doesn't generate wikili \[[!inline pages="bugs/* and !*/discussion and backlink(bugs)" feeds=no postform=no archive=yes show="10"]] -But here it is: - -[[!inline pages="bugs/* and !*/discussion and backlink(bugs)" feeds=no postform=no archive=yes show="10"]] - and note that it only included the 'normal' wikilinks (and also note that this page is not marked done even though the done page is inlined). One might also wonder if inline would make this page link to any internal links on those inlined pages too, but I think that would be overkill. -- cgit v1.2.3 From a09c79ccf1b9523c4b82db8846435c81f7404d44 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 14:25:45 -0400 Subject: problem with explicit, presence dependencies --- doc/todo/dependency_types.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 9d649e1e0..7714f2891 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -301,3 +301,22 @@ Not 100% free since it would add explicit deps for things that are not shown on an inline that limits its display to the first sorted N items. I suppose we could reach 100% free by making the function also handle sorting and limiting, though that could be overkill. + +---- + +Found a further complication in presence dependencies. Map now uses +presence dependencies when adding its explicit dependencies on pages. But +this defeats the purpose of the explicit dependencies! Because, now, +when B is changed to not match a pagespec, the A's presence dep does +not fire. + +I didn't think things through when switching it to use presense +dependencies there. But, if I change it to use full dependencies, then all +the work that was done to allow map to use presence dependencies for its +main pagespec is for naught. The map will once again have to update +whenever *any* content of the page changes. + +This points toward the conclusion that explicit dependencies, however they +are added, are not the right solution at all. Some other approach, such as +maintaining the list of pages that match a dependency, and noticing when it +changes, is needed. -- cgit v1.2.3 From 88a244a523f1b5ebe804d169fa38c11ff7760acc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 14:30:19 -0400 Subject: close --- doc/bugs/debbug_shortcut_should_expand_differently.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bugs/debbug_shortcut_should_expand_differently.mdwn b/doc/bugs/debbug_shortcut_should_expand_differently.mdwn index d34c40244..b93b20a32 100644 --- a/doc/bugs/debbug_shortcut_should_expand_differently.mdwn +++ b/doc/bugs/debbug_shortcut_should_expand_differently.mdwn @@ -9,3 +9,9 @@ instead of There are problems with code. bug #123456 is a good example of... Thanks, --[[madduck]] + +> Tschwinge changed it to expand to "Debian bug #xxxx". Which happens to +> sidestep the start of sentence problem. I think it makes sense to be +> explicit about whose bug it is, in general -- but you can always edit the +> shortcuts page for your own wiki to use something shorter and more +> implicit. --[[Joey]] [[done]] -- cgit v1.2.3 From 7abd079bc081d3f929b0b187336a276d00f6eff8 Mon Sep 17 00:00:00 2001 From: Jogo Date: Wed, 7 Oct 2009 15:22:32 -0400 Subject: --- doc/sandbox.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index b0862f28f..242ffb327 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -55,6 +55,10 @@ Bulleted list ----- +[[!progress percent=27]] + +----- + This SandBox is also a [[blog]]! [[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] -- cgit v1.2.3 From 4e7e4e43065f7335c1aee1d36f2dd740543d1332 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 18:04:13 -0400 Subject: a theory of pagespec influence lists, for Will's perusal --- doc/todo/dependency_types.mdwn | 141 +++++++++++++++++++++++++++++++++-------- 1 file changed, 116 insertions(+), 25 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 7714f2891..dca873f34 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -188,7 +188,8 @@ before and it is present now. Should this cause a re-build of any page that has > Yes, a presence dep will trigger when a page is added, or removed. > Your example is valid.. but it's also not handled right by normal, -> (content) dependencies, for the same reasons. --[[Joey]] +> (content) dependencies, for the same reasons. Still, I think I've +> addressed it with the pagespec influence stuff below. --[[Joey]] I think that is another version of the problem you encountered with meta-data. @@ -229,16 +230,7 @@ sigh. > I have also been thinking about some sort of analysis pass over pagespecs > to determine what metadata, pages, etc they depend on. It is indeed -> tricky to do. Even if it's just limited to returning a list of pages -> as you suggest. -> -> Consider: For a `*` glob, it has to return a list of all pages -> in the wiki. Which is expensive. And what if the pagespec is -> something like `* and backlink(index)`? Without analyising the -> boolean relationship between terms, the returned list -> will have many more items in it than it should. Or do we not make -> globs return their matches? (If so we have to deal with those -> with one of the other methods disucssed.) --[[Joey]] +> tricky to do. More thoughts on influence lists a bit below. --[[Joey]] ---- @@ -291,26 +283,13 @@ changed pages. ---- -What if there were a function that added a dependency, and at the same time -returned a list of pages matching the pagespec? Plugins that use this would -be exactly the ones, like inline and map, for which this is a problem, and -which already do a match pass over all pages. - -Adding explicit dependencies during this pass would thus be nearly free. -Not 100% free since it would add explicit deps for things that are not -shown on an inline that limits its display to the first sorted N items. -I suppose we could reach 100% free by making the function also handle -sorting and limiting, though that could be overkill. - ----- - Found a further complication in presence dependencies. Map now uses presence dependencies when adding its explicit dependencies on pages. But this defeats the purpose of the explicit dependencies! Because, now, when B is changed to not match a pagespec, the A's presence dep does not fire. -I didn't think things through when switching it to use presense +I didn't think things through when switching it to use presence dependencies there. But, if I change it to use full dependencies, then all the work that was done to allow map to use presence dependencies for its main pagespec is for naught. The map will once again have to update @@ -320,3 +299,115 @@ This points toward the conclusion that explicit dependencies, however they are added, are not the right solution at all. Some other approach, such as maintaining the list of pages that match a dependency, and noticing when it changes, is needed. + +---- + +### pagespec influence lists + +I'm using this term for the concept of a list of pages whose modification +can indirectly influence what pages a pagespec matches. + +#### Examples + +* The pagespec "created_before(foo)" has an influence list that contains foo. + The removal or (re)creation of foo changes what pages match it. + +* The pagespec "foo" has an empty influence list. This is because a + modification/creation/removal of foo directly changes what the pagespec + matches. + +* The pagespec "*" has an empty influence list, for the same reason. + Avoiding including every page in the wiki into its influence list is + very important! + +* The pagespec "title(foo)" has an influence list that contains every page + that currently matches it. A change to any matching page can change its + title. Why is that considered an indirect influence? Well, the pagespec + might be used in a presence dependency, and so its title changing + would not directly affect the dependency. + +* The pagespec "backlink(index)" has an influence list + that contains index (because a change to index changes the backlinks). + +* The pagespec "link(done)" has an influence list that + contains every page that it matches. A change to any matching page can + remove a link and make it not match any more, and so the list is needed + due to the removal problem. + +#### Low-level Calculation + +One way to calculate a pagespec's influence would be to +expand the SuccessReason and FailReason objects used and returned +by `pagespec_match`. Make the objects be created with an +influence list included, and when the objects are ANDed or ORed +together, combine the influence lists. + +That would have the benefit of allowing just using the existing `match_*` +functions, with minor changes to a few of them to gather influence info. + +But does it work? Let's try some examples: + +Consider "bugs/* and link(done) and backlink(index)". + +Its influence list contains index, and it contains all pages that the whole +pagespec matches. It should, ideally, not contain all pages that link +to done. There are a lot of such pages, and only a subset influence this +pagespec. + +When matching this pagespec against a page, the `link` will put the page +on the list. The `backlink` will put index on the list, and they will be +anded together and combined. If we combine the influences from each +successful match, we get the right result. + +Now consider "bugs/* and link(done) and !backlink(index)". + +It influence list is the same as the previous one, even though a term has +been negated. Because a change to index still influences it, though in a +different way. + +If negation of a SuccessReason preserves the influence list, the right +influence list will be calculated. + +Consider "bugs/* and (link(done) or backlink(index))" +and "bugs/* and (backlink(index) or link(done))' + +Its clear that the influence lists for these are identical. And they +contain index, plus all matching pages. + +When matching the first against page P, the `link` will put P on the list. +The OR needs to be a non-short-circuiting type. (In perl, `or`, not `||` -- +so, `pagespec_translate` will need to be changed to not use `||`.) +Given that, the `backlink` will always be evalulated, and will put index +onto the influence list. If we combine the influences from each +successful match, we get the right result. + +#### High-level Calculation and Storage + +Calculating the full influence list for a pagespec requires trying to match +it against every page in the wiki. + +I'd like to avoid doing such expensive matching redundantly. So add a +`pagespec_match_all`, which returns a list of all pages in the whole +wiki that match the pagespec, and also adds the pagespec as a dependency, +and while it's at it, calculates and stores the influence list. + +It could have an optional sort parameter, and limit parameter, to control +how many items to return and the sort order. So when inline wants to +display the 10 newest, only the influence lists for those ten are added. + +If `pagespec_match_depends` can be used by all plugins, then great, +influences are automatically calculated, no extra work needs to be done. + +If not, and some plugins still need to use `pagespec_match_list` or +`pagespec_match`, and `add_depends`, then I guess that `add_depends` can do +a slightly more expensive influence calculation. + +Bonus: If `add_depends` is doing an influence calculation, then I can remove +the nasty hack it currently uses to decide if a given pagespec is safe to use +with an existence or links dependency. + +Where to store the influence list? Well, it appears that we can just add +(content) dependencies for each item on the list, to the page's +regular list of simple dependencies. So, the data stored ends up looking +just like what is stored today by the explicit dependency hacks. Except, +it's calculated more smartly, and is added automatically. -- cgit v1.2.3 From 4528b95d2562831208d490ef378a089631000767 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 18:06:49 -0400 Subject: mention that pagespec_match returns an overloaded value --- doc/plugins/write.mdwn | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 668f8d8b6..8e8c3311e 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -609,15 +609,31 @@ page created from it. (Ie, it appends ".html".) Use this when constructing the filename of a html file. Use `urlto` when generating a link to a page. -#### `add_depends($$)` +#### `add_depends($$;@)` Makes the specified page depend on the specified [[ikiwiki/PageSpec]]. +By default, dependencies are full content dependencies, meaning that the +page will be updated whenever anything matching the PageSpec is modified. +This default can be overridden by additional named parameters, which can be +used to indicate weaker types of dependencies: + +* `presence` if set to true, only the presence of a matching page triggers + the dependency. +* `links` if set to true, any change to links on a matching page + triggers the dependency. This includes when a link is added, removed, + or changes what it points to due to other changes. It does not include + the addition or removal of a duplicate link. + #### `pagespec_match($$;@)` -Passed a page name, and [[ikiwiki/PageSpec]], returns true if the +Passed a page name, and [[ikiwiki/PageSpec]], returns a true value if the [[ikiwiki/PageSpec]] matches the page. +Note that the return value is overloaded. If stringified, it will be a +message indicating why the PageSpec succeeded, or failed, to match the +page. + Additional named parameters can be passed, to further limit the match. The most often used is "location", which specifies the location the PageSpec should match against. If not passed, relative PageSpecs will match -- cgit v1.2.3 From 4002d7c1a4657e769b036c6e76106991ec5c3897 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 20:31:13 -0400 Subject: add influence info to match_* Also update docs, test suite. --- IkiWiki.pm | 24 ++++++++++++------------ IkiWiki/Plugin/meta.pm | 8 ++++---- debian/changelog | 2 ++ doc/plugins/write.mdwn | 7 +++++++ t/pagespec_match.t | 15 +++++++++++++-- 5 files changed, 38 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 73d2a9763..9c386e154 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2039,7 +2039,7 @@ use overload ( sub new { my $class = shift; my $value = shift; - return bless [$value, {@_}], $class; + return bless [$value, {map { $_ => 1 } @_}], $class; } sub influences { @@ -2099,23 +2099,23 @@ sub match_link ($$;@) { my $from=exists $params{location} ? $params{location} : ''; my $links = $IkiWiki::links{$page}; - return IkiWiki::FailReason->new("$page has no links") unless $links && @{$links}; + return IkiWiki::FailReason->new("$page has no links", $link) unless $links && @{$links}; my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { if (length $bestlink) { - return IkiWiki::SuccessReason->new("$page links to $link") + return IkiWiki::SuccessReason->new("$page links to $link", $page) if $bestlink eq IkiWiki::bestlink($page, $p); } else { - return IkiWiki::SuccessReason->new("$page links to page $p matching $link") + return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page) if match_glob($p, $link, %params); my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link") + return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page) if match_glob($p_rel, $link, %params); } } - return IkiWiki::FailReason->new("$page does not link to $link"); + return IkiWiki::FailReason->new("$page does not link to $link", $page); } sub match_backlink ($$;@) { @@ -2131,14 +2131,14 @@ sub match_created_before ($$;@) { if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage}) { - return IkiWiki::SuccessReason->new("$page created before $testpage"); + return IkiWiki::SuccessReason->new("$page created before $testpage", $testpage); } else { - return IkiWiki::FailReason->new("$page not created before $testpage"); + return IkiWiki::FailReason->new("$page not created before $testpage", $testpage); } } else { - return IkiWiki::ErrorReason->new("$testpage does not exist"); + return IkiWiki::ErrorReason->new("$testpage does not exist", $testpage); } } @@ -2151,14 +2151,14 @@ sub match_created_after ($$;@) { if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} > $IkiWiki::pagectime{$testpage}) { - return IkiWiki::SuccessReason->new("$page created after $testpage"); + return IkiWiki::SuccessReason->new("$page created after $testpage", $testpage); } else { - return IkiWiki::FailReason->new("$page not created after $testpage"); + return IkiWiki::FailReason->new("$page not created after $testpage", $testpage); } } else { - return IkiWiki::ErrorReason->new("$testpage does not exist"); + return IkiWiki::ErrorReason->new("$testpage does not exist", $testpage); } } diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 9b041a748..a8ee5bc85 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -291,21 +291,21 @@ sub match { if (defined $val) { if ($val=~/^$re$/i) { - return IkiWiki::SuccessReason->new("$re matches $field of $page"); + return IkiWiki::SuccessReason->new("$re matches $field of $page", $page); } else { - return IkiWiki::FailReason->new("$re does not match $field of $page"); + return IkiWiki::FailReason->new("$re does not match $field of $page", $page); } } else { - return IkiWiki::FailReason->new("$page does not have a $field"); + return IkiWiki::FailReason->new("$page does not have a $field", $page); } } package IkiWiki::PageSpec; sub match_title ($$;@) { - IkiWiki::Plugin::meta::match("title", @_); + IkiWiki::Plugin::meta::match("title", @_); } sub match_author ($$;@) { diff --git a/debian/changelog b/debian/changelog index dc6ee0a81..565a0cffa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low * Transitive dependencies are now correctly supported. * Rebuild wikis on upgrade to this version to get improved dependency info. + * Plugins providing PageSpec `match_*` functions should pass additional + influence information when creating result objects. -- Joey Hess Sun, 27 Sep 2009 17:40:03 -0400 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 8e8c3311e..6b47033e5 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -982,6 +982,13 @@ an IkiWiki::FailReason object if the match fails. If the match cannot be attempted at all, for any page, it can instead return an IkiWiki::ErrorReason object explaining why. +When constructing these objects, you should also include a list of any +pages whose contents or other metadata influenced the result of the match. +For example, "backlink(foo)" is influenced by the contents of page foo; +"link(foo)" and "title(bar)" are influenced by the contents of any +page they match; "created_before(foo)" is influenced by the metadata of +foo; while "glob(*)" is not influenced by the contents of any page. + ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look diff --git a/t/pagespec_match.t b/t/pagespec_match.t index a1fcba7c8..f73bfdfe1 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 56; +use Test::More tests => 61; BEGIN { use_ok("IkiWiki"); } @@ -89,6 +89,17 @@ my $ret=pagespec_match("foo", "(invalid"); ok(! $ret, "syntax error"); ok($ret =~ /syntax error/, "error message"); -my $ret=pagespec_match("foo", "bar or foo"); +$ret=pagespec_match("foo", "bar or foo"); ok($ret, "simple match"); is($ret, "foo matches foo", "stringified return"); + +$ret=pagespec_match("foo", "link(bar)"); +is(join(",", $ret->influences), 'foo', "link is influenced by the page with the link"); +$ret=pagespec_match("bar", "backlink(foo)"); +is(join(",", $ret->influences), 'foo', "backlink is influenced by the page with the link"); +$ret=pagespec_match("bar", "backlink(foo)"); +is(join(",", $ret->influences), 'foo', "backlink is influenced by the page with the link"); +$ret=pagespec_match("bar", "created_before(foo)"); +is(join(",", $ret->influences), 'foo', "created_before is influenced by the comparison page"); +$ret=pagespec_match("bar", "created_after(foo)"); +is(join(",", $ret->influences), 'foo', "created_after is influenced by the comparison page"); -- cgit v1.2.3 From 43a8b40032c3774e0f5105ca5cbeb7a40fdc6893 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 20:36:25 -0400 Subject: influences calculation implemented --- doc/todo/dependency_types.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index dca873f34..a6260821e 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -381,6 +381,8 @@ Given that, the `backlink` will always be evalulated, and will put index onto the influence list. If we combine the influences from each successful match, we get the right result. +> This is implemented, seems to work ok. --[[Joey]] + #### High-level Calculation and Storage Calculating the full influence list for a pagespec requires trying to match -- cgit v1.2.3 From f7601954a862afd4c5a5b9ba83480af0472e1cf9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 21:26:50 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index a6260821e..3bb1b5452 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -238,10 +238,7 @@ sigh. * `add_depends($page, $spec, links => 1, presence => 1)` adds a links + presence dependency. -* `refresh` only rebuilds a page with a links dependency if - pages matched by the pagespec gain or lose links. (What the link - actually points to may change independent of this, due to changes - elsewhere, without it firing.) +* Use backlinks change code to detect changes to link dependencies too. * So, brokenlinks can fire whenever any links in any of the pages it's tracking change, or when pages are added or removed. @@ -413,3 +410,14 @@ Where to store the influence list? Well, it appears that we can just add regular list of simple dependencies. So, the data stored ends up looking just like what is stored today by the explicit dependency hacks. Except, it's calculated more smartly, and is added automatically. + +> I've implemented influence calculation in `add_depends`. As expected, +> it means rather a lot more work, and makes some things much slower. +> Optimisation via `pagespec_match_depends` next.. --[[Joey]] + +#### Influence types + +Note that influences can also have types, same as dependency types. +For example, "backlink(foo)" has an influence of foo, of type links. +"created_before(foo)" also is influenced by foo, but it's a presence +type. Etc. -- cgit v1.2.3 From 5f9860e65c65aa769f11e550e63cc164b1519710 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Oct 2009 21:48:03 -0400 Subject: add type info to influence information --- IkiWiki.pm | 49 ++++++++++++++++++++++++++++++------------------- IkiWiki/Plugin/meta.pm | 6 +++--- doc/plugins/write.mdwn | 6 +++--- docwiki.setup | 2 +- t/add_depends.t | 14 +++++++------- t/pagespec_match.t | 32 ++++++++++++++++---------------- 6 files changed, 60 insertions(+), 49 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7adc63139..39a43ddbe 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1795,8 +1795,10 @@ sub add_depends ($$;@) { return if $@; foreach my $p (keys %pagesources) { my $r=$sub->($p, location => $page ); - map { $depends_simple{$page}{lc $_} |= $DEPEND_CONTENT } $r->influences - if $r; + my %i=$r->influences; + foreach my $i (keys %i) { + $depends_simple{$page}{lc $i} |= $i{$i}; + } } $depends{$page}{$pagespec} |= $deptype; @@ -1998,8 +2000,8 @@ use overload ( '""' => sub { $_[0][0] }, '0+' => sub { 0 }, '!' => sub { bless $_[0], 'IkiWiki::SuccessReason'}, - '&' => sub { $_[0][1]={%{$_[0][1]}, %{$_[1][1]}}; $_[0] }, - '|' => sub { $_[1][1]={%{$_[0][1]}, %{$_[1][1]}}; $_[1] }, + '&' => sub { $_[0]->merge_influences($_[1]); $_[0] }, + '|' => sub { $_[1]->merge_influences($_[0]); $_[1] }, fallback => 1, ); @@ -2011,19 +2013,27 @@ use overload ( '""' => sub { $_[0][0] }, '0+' => sub { 1 }, '!' => sub { bless $_[0], 'IkiWiki::FailReason'}, - '&' => sub { $_[1][1]={%{$_[0][1]}, %{$_[1][1]}}; $_[1] }, - '|' => sub { $_[0][1]={%{$_[0][1]}, %{$_[1][1]}}; $_[0] }, + '&' => sub { $_[1]->merge_influences($_[0]); $_[1] }, + '|' => sub { $_[0]->merge_influences($_[1]); $_[0] }, fallback => 1, ); sub new { my $class = shift; my $value = shift; - return bless [$value, {map { $_ => 1 } @_}], $class; + return bless [$value, {@_}], $class; } sub influences { - return keys %{$_[0][1]}; + return %{$_[0][1]}; +} + +sub merge_influences { + my $this=shift; + my $other=shift; + foreach my $influence (keys %{$other->[1]}) { + $this->[1]{$influence} |= $other->[1]{$influence}; + } } package IkiWiki::ErrorReason; @@ -2079,23 +2089,24 @@ sub match_link ($$;@) { my $from=exists $params{location} ? $params{location} : ''; my $links = $IkiWiki::links{$page}; - return IkiWiki::FailReason->new("$page has no links", $page) unless $links && @{$links}; + return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS) + unless $links && @{$links}; my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { if (length $bestlink) { - return IkiWiki::SuccessReason->new("$page links to $link", $page) + return IkiWiki::SuccessReason->new("$page links to $link", $page => $IkiWiki::DEPEND_LINKS) if $bestlink eq IkiWiki::bestlink($page, $p); } else { - return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page) + return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page => $IkiWiki::DEPEND_LINKS) if match_glob($p, $link, %params); my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page) + return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page => $IkiWiki::DEPEND_LINKS) if match_glob($p_rel, $link, %params); } } - return IkiWiki::FailReason->new("$page does not link to $link", $page); + return IkiWiki::FailReason->new("$page does not link to $link", $page => $IkiWiki::DEPEND_LINKS); } sub match_backlink ($$;@) { @@ -2111,14 +2122,14 @@ sub match_created_before ($$;@) { if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage}) { - return IkiWiki::SuccessReason->new("$page created before $testpage", $testpage); + return IkiWiki::SuccessReason->new("$page created before $testpage", $testpage => $IkiWiki::DEPEND_PRESENCE); } else { - return IkiWiki::FailReason->new("$page not created before $testpage", $testpage); + return IkiWiki::FailReason->new("$page not created before $testpage", $testpage => $IkiWiki::DEPEND_PRESENCE); } } else { - return IkiWiki::ErrorReason->new("$testpage does not exist", $testpage); + return IkiWiki::ErrorReason->new("$testpage does not exist", $testpage => $IkiWiki::DEPEND_PRESENCE); } } @@ -2131,14 +2142,14 @@ sub match_created_after ($$;@) { if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} > $IkiWiki::pagectime{$testpage}) { - return IkiWiki::SuccessReason->new("$page created after $testpage", $testpage); + return IkiWiki::SuccessReason->new("$page created after $testpage", $testpage => $IkiWiki::DEPEND_PRESENCE); } else { - return IkiWiki::FailReason->new("$page not created after $testpage", $testpage); + return IkiWiki::FailReason->new("$page not created after $testpage", $testpage => $IkiWiki::DEPEND_PRESENCE); } } else { - return IkiWiki::ErrorReason->new("$testpage does not exist", $testpage); + return IkiWiki::ErrorReason->new("$testpage does not exist", $testpage => $IkiWiki::DEPEND_PRESENCE); } } diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index a8ee5bc85..c160e7eba 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -291,14 +291,14 @@ sub match { if (defined $val) { if ($val=~/^$re$/i) { - return IkiWiki::SuccessReason->new("$re matches $field of $page", $page); + return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT); } else { - return IkiWiki::FailReason->new("$re does not match $field of $page", $page); + return IkiWiki::FailReason->new("$re does not match $field of $page", $page => $IkiWiki::DEPEND_CONTENT); } } else { - return IkiWiki::FailReason->new("$page does not have a $field", $page); + return IkiWiki::FailReason->new("$page does not have a $field", $page => $IkiWiki::DEPEND_CONTENT); } } diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 6b47033e5..232430079 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -982,9 +982,9 @@ an IkiWiki::FailReason object if the match fails. If the match cannot be attempted at all, for any page, it can instead return an IkiWiki::ErrorReason object explaining why. -When constructing these objects, you should also include a list of any -pages whose contents or other metadata influenced the result of the match. -For example, "backlink(foo)" is influenced by the contents of page foo; +When constructing these objects, you should also include information about +of any pages whose contents or other metadata influenced the result of the +match. For example, "backlink(foo)" is influenced by the contents of page foo; "link(foo)" and "title(bar)" are influenced by the contents of any page they match; "created_before(foo)" is influenced by the metadata of foo; while "glob(*)" is not influenced by the contents of any page. diff --git a/docwiki.setup b/docwiki.setup index 52421e501..41c07f024 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -16,5 +16,5 @@ use IkiWiki::Setup::Standard { userdir => "users", usedirs => 0, prefix_directives => 1, - add_plugins => [qw{goodstuff version haiku polygen fortune}], + add_plugins => [qw{linkmap goodstuff version haiku polygen fortune}], } diff --git a/t/add_depends.t b/t/add_depends.t index d49aa74ce..9f426187b 100755 --- a/t/add_depends.t +++ b/t/add_depends.t @@ -57,17 +57,17 @@ ok($IkiWiki::depends{foo0}{"*"} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_L ok(! ($IkiWiki::depends{foo0}{"*"} & $IkiWiki::DEPEND_PRESENCE)); # Adding a pagespec that requires page metadata should add the influence -# as an explicit content dependency. +# as an explicit dependency. In the case of a link, a links dependency. $links{foo0}=$links{foo9}=[qw{bar baz}]; foreach my $spec ("* and ! link(bar)", "* or link(bar)") { ok(add_depends("foo3", $spec, presence => 1)); ok($IkiWiki::depends{foo3}{$spec} & $IkiWiki::DEPEND_PRESENCE); ok(! ($IkiWiki::depends{foo3}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_LINKS))); - ok($IkiWiki::depends_simple{foo3}{foo3} == $IkiWiki::DEPEND_CONTENT); + ok($IkiWiki::depends_simple{foo3}{foo3} == $IkiWiki::DEPEND_LINKS); ok(add_depends("foo4", $spec, links => 1)); ok($IkiWiki::depends{foo4}{$spec} & $IkiWiki::DEPEND_LINKS); ok(! ($IkiWiki::depends{foo4}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_PRESENCE))); - ok($IkiWiki::depends_simple{foo4}{foo4} == $IkiWiki::DEPEND_CONTENT); + ok($IkiWiki::depends_simple{foo4}{foo4} == $IkiWiki::DEPEND_LINKS); } # a pagespec with backlinks() will add as an influence the page with the links @@ -76,20 +76,20 @@ foreach my $spec ("bugs or (backlink(foo0) and !*.png)", "backlink(foo)") { ok(add_depends("foo5", $spec, presence => 1)); ok($IkiWiki::depends{foo5}{$spec} & $IkiWiki::DEPEND_PRESENCE); ok(! ($IkiWiki::depends{foo5}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_LINKS))); - ok($IkiWiki::depends_simple{foo5}{foo0} == $IkiWiki::DEPEND_CONTENT); + ok($IkiWiki::depends_simple{foo5}{foo0} == $IkiWiki::DEPEND_LINKS); ok(add_depends("foo6", $spec, links => 1)); ok($IkiWiki::depends{foo6}{$spec} & $IkiWiki::DEPEND_LINKS); ok(! ($IkiWiki::depends{foo6}{$spec} & ($IkiWiki::DEPEND_PRESENCE | $IkiWiki::DEPEND_CONTENT))); - ok($IkiWiki::depends_simple{foo5}{foo0} == $IkiWiki::DEPEND_CONTENT); + ok($IkiWiki::depends_simple{foo5}{foo0} == $IkiWiki::DEPEND_LINKS); ok(add_depends("foo7", $spec, presence => 1, links => 1)); ok($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_PRESENCE); ok($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_LINKS); ok(! ($IkiWiki::depends{foo7}{$spec} & $IkiWiki::DEPEND_CONTENT)); - ok($IkiWiki::depends_simple{foo7}{foo0} == $IkiWiki::DEPEND_CONTENT); + ok($IkiWiki::depends_simple{foo7}{foo0} == $IkiWiki::DEPEND_LINKS); ok(add_depends("foo8", $spec)); ok($IkiWiki::depends{foo8}{$spec} & $IkiWiki::DEPEND_CONTENT); ok(! ($IkiWiki::depends{foo8}{$spec} & ($IkiWiki::DEPEND_PRESENCE | $IkiWiki::DEPEND_LINKS))); - ok($IkiWiki::depends_simple{foo8}{foo0} == $IkiWiki::DEPEND_CONTENT); + ok($IkiWiki::depends_simple{foo8}{foo0} == $IkiWiki::DEPEND_LINKS); } # content is the default if unknown types are entered diff --git a/t/pagespec_match.t b/t/pagespec_match.t index 1a0db1cef..36fa04370 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -93,19 +93,19 @@ $ret=pagespec_match("foo", "bar or foo"); ok($ret, "simple match"); is($ret, "foo matches foo", "stringified return"); -$ret=pagespec_match("foo", "link(bar)"); -is(join(",", $ret->influences), 'foo', "link is influenced by the page with the link"); -$ret=pagespec_match("bar", "backlink(foo)"); -is(join(",", $ret->influences), 'foo', "backlink is influenced by the page with the link"); -$ret=pagespec_match("bar", "backlink(foo)"); -is(join(",", $ret->influences), 'foo', "backlink is influenced by the page with the link"); -$ret=pagespec_match("bar", "created_before(foo)"); -is(join(",", $ret->influences), 'foo', "created_before is influenced by the comparison page"); -$ret=pagespec_match("bar", "created_after(foo)"); -is(join(",", $ret->influences), 'foo', "created_after is influenced by the comparison page"); -$ret=pagespec_match("bar", "link(quux) and created_after(foo)"); -is(join(",", sort $ret->influences), 'foo,quux', "influences add up over AND"); -$ret=pagespec_match("bar", "link(quux) and created_after(foo)"); -is(join(",", sort $ret->influences), 'foo,quux', "influences add up over OR"); -$ret=pagespec_match("bar", "!link(quux) and !created_after(foo)"); -is(join(",", sort $ret->influences), 'foo,quux', "influences unaffected by negation"); +my %i=pagespec_match("foo", "link(bar)")->influences; +is(join(",", keys %i), 'foo', "link is influenced by the page with the link"); +%i=pagespec_match("bar", "backlink(foo)")->influences; +is(join(",", keys %i), 'foo', "backlink is influenced by the page with the link"); +%i=pagespec_match("bar", "backlink(foo)")->influences; +is(join(",", keys %i), 'foo', "backlink is influenced by the page with the link"); +%i=pagespec_match("bar", "created_before(foo)")->influences; +is(join(",", keys %i), 'foo', "created_before is influenced by the comparison page"); +%i=pagespec_match("bar", "created_after(foo)")->influences; +is(join(",", keys %i), 'foo', "created_after is influenced by the comparison page"); +%i=pagespec_match("bar", "link(quux) and created_after(foo)")->influences; +is(join(",", sort keys %i), 'bar,foo', "influences add up over AND"); +%i=pagespec_match("bar", "link(quux) and created_after(foo)")->influences; +is(join(",", sort keys %i), 'bar,foo', "influences add up over OR"); +%i=pagespec_match("bar", "!link(quux) and !created_after(foo)")->influences; +is(join(",", sort keys %i), 'bar,foo', "influences unaffected by negation"); -- cgit v1.2.3 From 61105cca4f219323a0b490e6251ac60abc549c2a Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Thu, 8 Oct 2009 01:33:23 -0400 Subject: Questions... --- doc/todo/dependency_types.mdwn | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 3bb1b5452..01205f178 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -222,7 +222,7 @@ ShavedByBob.mdwn: Does ShavedByBob.mdwn include itself? -(Yeah - in IkiWiki currently links are included by include, but the idea holds. I had a good example a while back, but I can't think of it right now.) +(Yeah - in IkiWiki currently links are *not* included by include, but the idea holds. I had a good example a while back, but I can't think of it right now.) sigh. @@ -232,6 +232,10 @@ sigh. > to determine what metadata, pages, etc they depend on. It is indeed > tricky to do. More thoughts on influence lists a bit below. --[[Joey]] +>> The big part of what makes this tricky is that there may be cycles in the +>> dependency graph. This can lead to situations where the result is just not +>> well defined. This is what I was trying to get at above. -- [[Will]] + ---- ### Link dependencies @@ -304,6 +308,20 @@ changes, is needed. I'm using this term for the concept of a list of pages whose modification can indirectly influence what pages a pagespec matches. +> Trying to make a formal definition of this: (Note, I'm using the term sets rather than lists, but they're roughly equivalent) +> +> * Let the *matching set* for a pagespec be the set of pages that the pagespec matches. +> * Let a *complete influence set* for a pagespec be the set of all pages whose alteration might change the matching set of that pagespec. +> * Let the *direct influence set* be the intersection of the matching set and the complete influence set. +> * Let the *indirect influence set* be the compliment of the direct influence set with respect to the complete influence set. +> +> Is that a fair definition? I don't think it quite matches your examples below unfortunately. +> I was unsure if I should insert the word 'existing' in there in a few places. As it stands, these definitions could include sets of pages that don't exist, e.g. "*". +> The one I'm least sure of is the definition of the direct influence set. It feels like you want something +> like "the traditional set of things we thought about that could cause a pagespec to change", but that definition +> is not very formal and I suspect will lead to problems. Something like "The set of pages matched by the globs in the pagespec" might be closer? +> --[[Will]] + #### Examples * The pagespec "created_before(foo)" has an influence list that contains foo. @@ -331,6 +349,10 @@ can indirectly influence what pages a pagespec matches. remove a link and make it not match any more, and so the list is needed due to the removal problem. +>> Why doesn't this include every page? If I change a page that doesn't have a link to +>> 'done' to include a link to 'done', then it will now match... or is that considered a +>> 'direct match'? -- [[Will]] + #### Low-level Calculation One way to calculate a pagespec's influence would be to @@ -421,3 +443,8 @@ Note that influences can also have types, same as dependency types. For example, "backlink(foo)" has an influence of foo, of type links. "created_before(foo)" also is influenced by foo, but it's a presence type. Etc. + +> This is an interesting concept that I hadn't considered. It might +> allow significant computational savings, but I suspect will be tricky +> to implement. -- [[Will]] + -- cgit v1.2.3 From b91ccb4963fe7074b64cb538a2439d4cb9dad45e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 04:06:53 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 57 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 01205f178..d3ffdf7b2 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -236,6 +236,9 @@ sigh. >> dependency graph. This can lead to situations where the result is just not >> well defined. This is what I was trying to get at above. -- [[Will]] +>>> Hmm, I'm not seeing cycles be a problem, at least with the current +>>> pagespec terms. --[[Joey]] + ---- ### Link dependencies @@ -322,6 +325,17 @@ can indirectly influence what pages a pagespec matches. > is not very formal and I suspect will lead to problems. Something like "The set of pages matched by the globs in the pagespec" might be closer? > --[[Will]] +>> I appreciate the formalism! +>> +>> Only existing pages need to be in these sets, because if a page is added +>> in the future, the existing dependency code will always test to see +>> if it matches. So it will be in the maching set (or not) at that point. +>> +>> The problem with your definition of direct influence set seems to be +>> that it doesn't allow `link()` and `title()` to have as an indirect +>> influence, the page that matches. But I'm quite sure we need those. +>> --[[Joey]] + #### Examples * The pagespec "created_before(foo)" has an influence list that contains foo. @@ -337,9 +351,8 @@ can indirectly influence what pages a pagespec matches. * The pagespec "title(foo)" has an influence list that contains every page that currently matches it. A change to any matching page can change its - title. Why is that considered an indirect influence? Well, the pagespec - might be used in a presence dependency, and so its title changing - would not directly affect the dependency. + title, making it not match any more, and so the list is needed due to the + removal problem. * The pagespec "backlink(index)" has an influence list that contains index (because a change to index changes the backlinks). @@ -353,6 +366,10 @@ can indirectly influence what pages a pagespec matches. >> 'done' to include a link to 'done', then it will now match... or is that considered a >> 'direct match'? -- [[Will]] +>>> The regular dependency calculation code will check if every changed +>>> page matches every dependency. So it will notice the link was added. +>>> --[[Joey]] + #### Low-level Calculation One way to calculate a pagespec's influence would be to @@ -404,13 +421,29 @@ successful match, we get the right result. #### High-level Calculation and Storage -Calculating the full influence list for a pagespec requires trying to match -it against every page in the wiki. - -I'd like to avoid doing such expensive matching redundantly. So add a -`pagespec_match_all`, which returns a list of all pages in the whole -wiki that match the pagespec, and also adds the pagespec as a dependency, -and while it's at it, calculates and stores the influence list. +Naively calculating the full influence list for a pagespec requires trying +to match it against every page in the wiki. I'd like to avoid doing such +expensive matching redundantly. + +It may be possible, for some types of pagespecs, to just try matching a +single, arbitrary page against it, and know the full influence list has +been obtained. It seems to be that case that if a pagespec has any +influences, matching any page will return at least one. So if none are +returned, we can skip trying other pages. + +If the influence list does not include the page that was tried, we know +that the pagespec does not things like `link()` and `title()`, that are +influenced by the page's own content. So it *might* be safe to not try +matching any more pages in this case too. I think it would work for all +current pagespec terms. There might be a hypothetical term where this +optimisation doesn't work. We could add a special case to ensure it can +work: If a term declares it is unfluenced by "", then it means it is +always influenced by the matching page. + +Anyway, this seems worth doing: Add a `pagespec_match_all`, which returns a +list of all pages in the whole wiki that match the pagespec, and also adds +the pagespec as a dependency, and while it's at it, calculates and stores +the influence list. It could have an optional sort parameter, and limit parameter, to control how many items to return and the sort order. So when inline wants to @@ -435,7 +468,7 @@ it's calculated more smartly, and is added automatically. > I've implemented influence calculation in `add_depends`. As expected, > it means rather a lot more work, and makes some things much slower. -> Optimisation via `pagespec_match_depends` next.. --[[Joey]] +> Optimisations next.. --[[Joey]] #### Influence types @@ -448,3 +481,5 @@ type. Etc. > allow significant computational savings, but I suspect will be tricky > to implement. -- [[Will]] +>> It was actually really easy to implement it, assuming I picked the right +>> dependency types of course. --[[Joey]] -- cgit v1.2.3 From 808c699961eae0de7125812d4f1c51ecd5fc6c18 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Thu, 8 Oct 2009 06:38:40 -0400 Subject: --- doc/todo/dependency_types.mdwn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index d3ffdf7b2..97cff97c5 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -279,7 +279,7 @@ One way to fix this is to include with each dependency, a list of pages that currently match it. If the list changes, the dependency is triggered. Should be doable, but may involve more work than -currently. Consider that a dependency on "bugs/*" currently +currently. Consider that a dependency on `bugs/*` currently is triggered by just checking until *one* page is found to match it. But to store the list, *every* page would have to be tried against it. Unless the list can somehow be intelligently updated, looking at only the @@ -417,7 +417,10 @@ Given that, the `backlink` will always be evalulated, and will put index onto the influence list. If we combine the influences from each successful match, we get the right result. -> This is implemented, seems to work ok. --[[Joey]] +> This is implemented, seems to work ok. --[[Joey]] + +> `or` short-circuits too, but the implementation correctly uses `|`, +> which I assume is what you meant. --[[smcv]] #### High-level Calculation and Storage -- cgit v1.2.3 From 57d694046f6cd76543720615ba6913ed6dc96423 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Thu, 8 Oct 2009 07:26:01 -0400 Subject: Tweaks --- doc/todo/dependency_types.mdwn | 46 +++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 97cff97c5..d31797f3d 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -239,6 +239,21 @@ sigh. >>> Hmm, I'm not seeing cycles be a problem, at least with the current >>> pagespec terms. --[[Joey]] +>>>> Oh, they're not with current pagespec terms. But this is really close to extending to handle +>>>> functional pagespecs, etc. And I think I'd like to think about that now. +>>>> +>>>> Having said that, I don't want to hold you up - you seem to be making progress. The best is +>>>> the enemy of the good, etc. etc. +>>>> +>>>> For my part, I'm imagining we have two more constructs in IkiWiki: +>>>> +>>>> * A map directive that actually wikilinks to the pages it links to, and +>>>> * A `match_sharedLink(pageX)` matching function that matches pageY if both pageX and pageY each have links to any same third page, pageZ. +>>>> +>>>> With those two constructs, one page changing might change the set of pages included in a map somewhere, which might then change the set of pages matched by some other pagespec, which might then... +>>>> +>>>> --[[Will]] + ---- ### Link dependencies @@ -313,16 +328,13 @@ can indirectly influence what pages a pagespec matches. > Trying to make a formal definition of this: (Note, I'm using the term sets rather than lists, but they're roughly equivalent) > -> * Let the *matching set* for a pagespec be the set of pages that the pagespec matches. -> * Let a *complete influence set* for a pagespec be the set of all pages whose alteration might change the matching set of that pagespec. -> * Let the *direct influence set* be the intersection of the matching set and the complete influence set. -> * Let the *indirect influence set* be the compliment of the direct influence set with respect to the complete influence set. +> * Let the *matching set* for a pagespec be the set of existing pages that the pagespec matches. +> * Let a *influence set* for a pagespec be the set of all pages, *p*, whose alteration might: +> * cause the pagespec to include or exclude a page other than *p*, or +> * cause the pagespec to exclude *p*. +> +>> \[Will snipped some stuff and edited the formal definition] > -> Is that a fair definition? I don't think it quite matches your examples below unfortunately. -> I was unsure if I should insert the word 'existing' in there in a few places. As it stands, these definitions could include sets of pages that don't exist, e.g. "*". -> The one I'm least sure of is the definition of the direct influence set. It feels like you want something -> like "the traditional set of things we thought about that could cause a pagespec to change", but that definition -> is not very formal and I suspect will lead to problems. Something like "The set of pages matched by the globs in the pagespec" might be closer? > --[[Will]] >> I appreciate the formalism! @@ -331,11 +343,24 @@ can indirectly influence what pages a pagespec matches. >> in the future, the existing dependency code will always test to see >> if it matches. So it will be in the maching set (or not) at that point. >> +>>> Hrm, I agree with you in general, but I think I can come up with nasty counter-examples. What about a pagespec +>>> of "!backlink(bogus)" where the page bogus doesn't exist? In this case, the page 'bogus' needs to be in the influence +>>> set even though it doesn't exist. +>>> +>>> Also, I would really like the formalism to include the whole dependency system, not just any additions to it. That will make +>>> the whole thing much easier to reason about. +>> >> The problem with your definition of direct influence set seems to be >> that it doesn't allow `link()` and `title()` to have as an indirect >> influence, the page that matches. But I'm quite sure we need those. >> --[[Joey]] +>>> I see what you mean. Does the revised definition capture this effectively? +>>> The problem with this revised definition is that it still doesn't match your examples below. +>>> My revised definition will include pretty much all currently matching pages to be in the influence list +>>> because deletion of any of them would cause a change in which pages are matched - the removal problem. +>>> -- [[Will]] + #### Examples * The pagespec "created_before(foo)" has an influence list that contains foo. @@ -349,6 +374,9 @@ can indirectly influence what pages a pagespec matches. Avoiding including every page in the wiki into its influence list is very important! +>>> So, why don't the above influence lists contain the currently matched pages? +>>> Don't you need this to handle the removal problem? -- [[Will]] + * The pagespec "title(foo)" has an influence list that contains every page that currently matches it. A change to any matching page can change its title, making it not match any more, and so the list is needed due to the -- cgit v1.2.3 From 79f3e32ea7adf3e5adbef0a8c9c68cd32a67cac4 Mon Sep 17 00:00:00 2001 From: "http://www.larted.org.uk/~dom/" Date: Thu, 8 Oct 2009 11:38:34 -0400 Subject: add cpanrt --- doc/shortcuts.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index ad3f2a890..b84d71c3d 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -59,6 +59,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=flickr url="http://www.flickr.com/photos/%s"]] * [[!shortcut name=man url="http://linux.die.net/man/%s"]] * [[!shortcut name=ohloh url="http://www.ohloh.net/projects/%s"]] +* [[!shortcut name=cpanrt url="https://rt.cpan.org/Ticket/Display.html?id=%s" desc="CPAN RT#%s"]] To add a new shortcut, use the `shortcut` [[ikiwiki/directive]]. In the url, "%s" is replaced with the -- cgit v1.2.3 From e82aeb3e4359d3d07f6dbbee7c12cbcbbc1aa4b4 Mon Sep 17 00:00:00 2001 From: "http://shoorick.livejournal.com/" Date: Thu, 8 Oct 2009 13:07:41 -0400 Subject: --- doc/bugs/Another_UTF-8_problem.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Another_UTF-8_problem.mdwn b/doc/bugs/Another_UTF-8_problem.mdwn index 031576f00..d67ed2fa0 100644 --- a/doc/bugs/Another_UTF-8_problem.mdwn +++ b/doc/bugs/Another_UTF-8_problem.mdwn @@ -11,3 +11,6 @@ with my pretty standard Ubuntu gutsy Firefox installation? --[[tschwinge]] > removed that line to fix it. --[[Joey]] [[!tag done]] + +Now we test it for Cyrillic and Western letters: +Протестируем кириллицу и ещё «_другие_» буквы: grüne Öl & hôtel — 3² × 2° --Shoorick -- cgit v1.2.3 From 3baf6980aa5725b647bf72452be2c05db1ad0bff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 13:54:51 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 55 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index d31797f3d..cce5997e8 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -254,6 +254,14 @@ sigh. >>>> >>>> --[[Will]] +>>>>> I think that should be supported by [[bugs/transitive_dependencies]]. +>>>>> At least in the current implementation, which considers each page +>>>>> that is rendered to be changed, and rebuilds pages that are dependent +>>>>> on it, in a loop. An alternate implementation, which could be faster, +>>>>> is to construct a directed graph and traverse it just once. Sounds +>>>>> like that would probably not support what you want to do. +>>>>> --[[Joey]] + ---- ### Link dependencies @@ -347,6 +355,13 @@ can indirectly influence what pages a pagespec matches. >>> of "!backlink(bogus)" where the page bogus doesn't exist? In this case, the page 'bogus' needs to be in the influence >>> set even though it doesn't exist. >>> +>>>> I think you're right, this is a case that the current code is not +>>>> handling. Actually, I made all the pagespecs return influences +>>>> even if the influence was not present or did not match. But, it +>>>> currently only records influences as dependencies when a pagespec +>>>> successfully matches. Now I'm sure that is wrong, and I've removed +>>>> that false optimisation. I've updated some of the below. --[[Joey]] +>>> >>> Also, I would really like the formalism to include the whole dependency system, not just any additions to it. That will make >>> the whole thing much easier to reason about. >> @@ -364,7 +379,8 @@ can indirectly influence what pages a pagespec matches. #### Examples * The pagespec "created_before(foo)" has an influence list that contains foo. - The removal or (re)creation of foo changes what pages match it. + The removal or (re)creation of foo changes what pages match it. Note that + this is true even if the pagespec currently fails to match. * The pagespec "foo" has an empty influence list. This is because a modification/creation/removal of foo directly changes what the pagespec @@ -377,13 +393,27 @@ can indirectly influence what pages a pagespec matches. >>> So, why don't the above influence lists contain the currently matched pages? >>> Don't you need this to handle the removal problem? -- [[Will]] +>>>> The removal problem is slightly confusingly named, since it does not +>>>> affect pages that were matched by a glob and have been removed. Such +>>>> pages can be handled without being influences, because ikiwiki knows +>>>> they have been removed, and so can still match them against the +>>>> pagespec, and see they used to match; and thus knows that the +>>>> dependency has triggered. +>>>> +>>>> Maybe the thing to do is consider this an optimisation, where such +>>>> pages are influences, but ikiwiki is able to implicitly find them, +>>>> so they do not need to be explicitly stored. --[[Joey]] + * The pagespec "title(foo)" has an influence list that contains every page that currently matches it. A change to any matching page can change its title, making it not match any more, and so the list is needed due to the - removal problem. + removal problem. A page that does not have a matching title is not an + influence, because modifying the page to change its title directly + changes what the pagespec matches. * The pagespec "backlink(index)" has an influence list that contains index (because a change to index changes the backlinks). + Note that this is true even if the backlink currently fails. * The pagespec "link(done)" has an influence list that contains every page that it matches. A change to any matching page can @@ -450,6 +480,27 @@ successful match, we get the right result. > `or` short-circuits too, but the implementation correctly uses `|`, > which I assume is what you meant. --[[smcv]] +>> Er, yeah. --[[Joey]] + +---- + +What about: "!link(done)" + +Specifically, I want to make sure it works now that I've changed +`match_link` to only return a page as an influence if it *does* +link to done. + +So, when matching against page P, that does not link to done, +there are no influences, and the pagespec matches. If P is later +changed to add a link to done, then the dependency resolver will directly +notice that. + +When matching against page P, that does link to done, P +is an influence, and the pagespec does not match. If P is later changed +to not link to done, the influence will do its job. + +Looks good! + #### High-level Calculation and Storage Naively calculating the full influence list for a pagespec requires trying -- cgit v1.2.3 From 3948b422381a0f05225aaf8b973d0cd54f089348 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 15:33:47 -0400 Subject: found a way to get false positive influences --- doc/todo/dependency_types.mdwn | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index cce5997e8..56153239f 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -501,6 +501,34 @@ to not link to done, the influence will do its job. Looks good! +---- + +Here is a case where this approach has some false positives. + +"bugs/* and link(patch)" + +This finds as influences all pages that link to patch, even +if they are not under bugs/, and so can never match. + +To fix this, the influence calculation would need to consider boolean +operators. Currently, this turns into roughly: + +`FailReason() & SuccessReason(patch)` + +Let's say that the glob instead returns a HardFailReason, which when +ANDed with another object, drops their influences. (But when ORed, combines +them.) Fixes the above, but does it always work? + +"(bugs/* or link(patch)) and backlink(index)" => +`( HardFailReason() | SuccessReason(patch) ) & SuccessReason(index)`` => +`SuccessReason(patch) & SuccessReason(index)` => +SuccessReason(patch, index) => right + +"(bugs/* and link(patch)) or backlink(index)" => +`( HardFailReason() & SuccessReason(patch) ) | SuccessReason(index)`` => +`HardFailReason() | SuccessReason(index)` => +`SuccessReason(index)` => right + #### High-level Calculation and Storage Naively calculating the full influence list for a pagespec requires trying -- cgit v1.2.3 From 5e236f5d25b68f5fb4a421b24470419c6042cb1c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 16:49:53 -0400 Subject: add use_pagespec and deptype functions --- IkiWiki.pm | 135 +++++++++++++++++++++++++++++++++++++++++-------- debian/changelog | 4 +- doc/plugins/write.mdwn | 61 +++++++++++++++++----- t/use_pagespec.t | 30 +++++++++++ 4 files changed, 194 insertions(+), 36 deletions(-) create mode 100755 t/use_pagespec.t (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 2064c881a..c787612e1 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -17,11 +17,12 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %forcerebuild %loaded_plugins}; use Exporter q{import}; -our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match - pagespec_match_list bestlink htmllink readfile writefile - pagetype srcfile pagename displaytime will_render gettext urlto - targetpage add_underlay pagetitle titlepage linkpage - newpagefile inject add_link +our @EXPORT = qw(hook debug error template htmlpage deptype use_pagespec + add_depends pagespec_match pagespec_match_list bestlink + htmllink readfile writefile pagetype srcfile pagename + displaytime will_render gettext urlto targetpage + add_underlay pagetitle titlepage linkpage newpagefile + inject add_link %config %links %pagestate %wikistate %renderedfiles %pagesources %destsources); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version @@ -1768,18 +1769,10 @@ sub rcs_receive () { $hooks{rcs}{rcs_receive}{call}->(); } -sub add_depends ($$;@) { +sub add_depends ($$;$) { my $page=shift; my $pagespec=shift; - - my $deptype=0; - if (@_) { - my %params=@_; - - $deptype=$deptype | $DEPEND_PRESENCE if $params{presence}; - $deptype=$deptype | $DEPEND_LINKS if $params{links}; - } - $deptype=$DEPEND_CONTENT unless $deptype; + my $deptype=shift || $DEPEND_CONTENT; # Is the pagespec a simple page name? if ($pagespec =~ /$config{wiki_file_regexp}/ && @@ -1791,18 +1784,118 @@ sub add_depends ($$;@) { # Analyse the pagespec, and match it against all pages # to get a list of influences, and add explicit dependencies # for those. + #my $sub=pagespec_translate($pagespec); + #return if $@; + #foreach my $p (keys %pagesources) { + # my $r=$sub->($p, location => $page ); + # my %i=$r->influences; + # foreach my $i (keys %i) { + # $depends_simple{$page}{lc $i} |= $i{$i}; + # } + #} + print STDERR "warning: use of add_depends; influences not tracked\n"; + + $depends{$page}{$pagespec} |= $deptype; + return 1; +} + +sub use_pagespec ($$;@) { + my $page=shift; + my $pagespec=shift; + my %params=@_; + my $sub=pagespec_translate($pagespec); - return if $@; - foreach my $p (keys %pagesources) { - my $r=$sub->($p, location => $page ); - my %i=$r->influences; + error "syntax error in pagespec \"$pagespec\"" + if $@ || ! defined $sub; + + my @candidates; + if (exists $params{limit}) { + @candidates=grep { $params{limit}->($_) } keys %pagesources; + } + else { + @candidates=keys %pagesources; + } + + if (defined $params{sort}) { + my $f; + if ($params{sort} eq 'title') { + $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; + } + elsif ($params{sort} eq 'title_natural') { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } + $f=sub { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) }; + } + elsif ($params{sort} eq 'mtime') { + $f=sub { $pagemtime{$b} <=> $pagemtime{$a} }; + } + elsif ($params{sort} eq 'age') { + $f=sub { $pagectime{$b} <=> $pagectime{$a} }; + } + else { + error sprintf(gettext("unknown sort type %s"), $params{sort}); + } + @candidates = sort { &$f } @candidates; + } + + @candidates=reverse(@candidates) if $params{reverse}; + + my @matches; + my $firstfail; + my $count=0; + foreach my $p (@candidates) { + my $r=$sub->($p, location => $page); + if ($r) { + push @matches, [$p, $r]; + last if defined $params{num} && ++$count == $params{num}; + } + elsif (! defined $firstfail) { + $firstfail=$r; + } + } + + $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); + + my @ret; + if (@matches) { + # Add all influences from successful matches. + foreach my $m (@matches) { + push @ret, $m->[0]; + my %i=$m->[1]->influences; + foreach my $i (keys %i) { + $depends_simple{$page}{lc $i} |= $i{$i}; + } + } + } + elsif (defined $firstfail) { + # Add influences from one failure. (Which one should not + # matter; all should have the same influences.) + my %i=$firstfail->influences; foreach my $i (keys %i) { $depends_simple{$page}{lc $i} |= $i{$i}; } + error(sprintf(gettext("cannot match pages: %s"), $firstfail)); } - $depends{$page}{$pagespec} |= $deptype; - return 1; + return @ret; +} + +sub deptype (@) { + my $deptype=0; + foreach my $type (@_) { + if ($type eq 'presence') { + $deptype |= $DEPEND_PRESENCE; + } + elsif ($type eq 'links') { + $deptype |= $DEPEND_LINKS; + } + elsif ($type eq 'content') { + $deptype |= $DEPEND_CONTENT; + } + } + return $deptype; } sub file_pruned ($$) { diff --git a/debian/changelog b/debian/changelog index 565a0cffa..12ddebac9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,7 +13,6 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low * Added support framework for multiple types of dependencies. * Allow declaring that a dependency is only affected by page presence or changes to its links. - (By passing presence => 1 or links => 1 to add_depends.) * pagecount, calendar, postsparkline, progress: Use a presence dependency, which makes these directives much less expensive to use, since page edits will no longer trigger an unnecessary update. @@ -34,6 +33,9 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low info. * Plugins providing PageSpec `match_*` functions should pass additional influence information when creating result objects. + * Added `use_pagespec` function, that plugins can use to find a list + of matching pages and add dependencies and influences, all at once, + and efficiently. -- Joey Hess Sun, 27 Sep 2009 17:40:03 -0400 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 232430079..3d5650758 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -609,21 +609,52 @@ page created from it. (Ie, it appends ".html".) Use this when constructing the filename of a html file. Use `urlto` when generating a link to a page. -#### `add_depends($$;@)` +### `deptype(@)` + +Use this function to generate ikiwiki's internal representation of a +dependency type from one or more of these keywords: + +* `content` is the default. Any change to the content + of a page triggers the dependency. +* `presence` is only triggered by a change to the presence + of a page. +* `links` is only triggered by a change to the links of a page. + This includes when a link is added, removed, or changes what + it points to due to other changes. It does not include the + addition or removal of a duplicate link. + +If multiple types are specified, they are combined. + +#### `use_pagespec($$;@)` + +Passed a page name, and [[ikiwiki/PageSpec]], returns a list of pages +in the wiki that match the [[ikiwiki/PageSpec]]. + +The page will automatically be made to depend on the specified +[[ikiwiki/PageSpec]], so `add_depends` does not need to be called. This +is significantly more efficient than calling `add_depends` +followed by `pagespec_match_list`. You should use this anytime a plugin +needs to match a set of pages and generate something based on that list. + +Additional named parameters can be specified: + +* `deptype` optionally specifies the type of dependency to add. Use the + `deptype` function to generate a dependency type. +* `limit` is a reference to a function, that is called and passed a page, + and must return true for the page to be included. +* `sort` specifies a sort order for the list. See + [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. +* `reverse` if true, sorts in reverse. +* `num` if nonzero, specifies the maximum number of matching pages that + will be returned. + +#### `add_depends($$;$)` Makes the specified page depend on the specified [[ikiwiki/PageSpec]]. By default, dependencies are full content dependencies, meaning that the page will be updated whenever anything matching the PageSpec is modified. -This default can be overridden by additional named parameters, which can be -used to indicate weaker types of dependencies: - -* `presence` if set to true, only the presence of a matching page triggers - the dependency. -* `links` if set to true, any change to links on a matching page - triggers the dependency. This includes when a link is added, removed, - or changes what it points to due to other changes. It does not include - the addition or removal of a duplicate link. +This can be overridden by passing a `deptype` value as the third parameter. #### `pagespec_match($$;@)` @@ -984,10 +1015,12 @@ IkiWiki::ErrorReason object explaining why. When constructing these objects, you should also include information about of any pages whose contents or other metadata influenced the result of the -match. For example, "backlink(foo)" is influenced by the contents of page foo; -"link(foo)" and "title(bar)" are influenced by the contents of any -page they match; "created_before(foo)" is influenced by the metadata of -foo; while "glob(*)" is not influenced by the contents of any page. +match. Do this by passing a list of pages, followed by `deptype` values. + +For example, "backlink(foo)" is influenced by the contents of page foo; +"link(foo)" and "title(bar)" are influenced by the contents of any page +they match; "created_before(foo)" is influenced by the metadata of foo; +while "glob(*)" is not influenced by the contents of any page. ### Setup plugins diff --git a/t/use_pagespec.t b/t/use_pagespec.t new file mode 100755 index 000000000..7b904075e --- /dev/null +++ b/t/use_pagespec.t @@ -0,0 +1,30 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 64; + +BEGIN { use_ok("IkiWiki"); } + +%pagesources=( + foo => "foo.mdwn", + bar => "bar.mdwn", + "post/1" => "post/1.mdwn", + "post/2" => "post/2.mdwn", + "post/3" => "post/3.mdwn", +); + +is_deeply([use_pagespec("foo", "bar")], ["bar"]); +is_deeply([sort(use_pagespec("foo", "post/*"))], ["post/1", "post/2", "post/3"]); +is_deeply([use_pagespec("foo", "post/*", sort => "title", reverse => 1)], + ["post/3", "post/2", "post/1"]); +is_deeply([use_pagespec("foo", "post/*", sort => "title", num => 2)], + ["post/1", "post/2"]); +is_deeply([use_pagespec("foo", "post/*", sort => "title", num => 50)], + ["post/1", "post/2", "post/3"]); +is_deeply([use_pagespec("foo", "post/*", sort => "title", + limit => sub { $_[0] !~ /3/}) ], + ["post/1", "post/2"]); +eval { use_pagespec("foo", "beep") }; +ok($@, "fails with error when unable to match anything"); +eval { use_pagespec("foo", "this is not a legal pagespec!") }; +ok($@, "fails with error when pagespec bad"); -- cgit v1.2.3 From 4b8ca7cfc147b2016b17cc88a21052a7ee6d46fb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 18:00:10 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 56153239f..f06603874 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -520,15 +520,19 @@ ANDed with another object, drops their influences. (But when ORed, combines them.) Fixes the above, but does it always work? "(bugs/* or link(patch)) and backlink(index)" => -`( HardFailReason() | SuccessReason(patch) ) & SuccessReason(index)`` => -`SuccessReason(patch) & SuccessReason(index)` => -SuccessReason(patch, index) => right +`( HardFailReason() | SuccessReason(page) ) & SuccessReason(index)`` => +`SuccessReason(page & SuccessReason(index)` => +SuccessReason(page, index) => right "(bugs/* and link(patch)) or backlink(index)" => -`( HardFailReason() & SuccessReason(patch) ) | SuccessReason(index)`` => +`( HardFailReason() & SuccessReason(page) ) | SuccessReason(index)`` => `HardFailReason() | SuccessReason(index)` => `SuccessReason(index)` => right +"!bugs/* and link(patch)" => +`HardFailReason() | SuccessReason(bugs/foo)` => +`HardFailReason()` => right + #### High-level Calculation and Storage Naively calculating the full influence list for a pagespec requires trying -- cgit v1.2.3 From 65d57902ca9f05b7958ea0a47b3fa3c651da89f5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 18:17:36 -0400 Subject: add sorting page --- doc/ikiwiki/directive/inline.mdwn | 8 ++------ doc/ikiwiki/pagespec/sorting.mdwn | 11 +++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 doc/ikiwiki/pagespec/sorting.mdwn (limited to 'doc') diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index 4e087ab6c..c6a23ce3c 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -86,12 +86,8 @@ Here are some less often needed parameters: if raw is set to "yes", the page will be included raw, without additional markup around it, as if it were a literal part of the source of the inlining page. -* `sort` - Controls how inlined pages are sorted. The default, "age" is to - sort newest created pages first. Setting it to "title" will sort pages by - title, and "mtime" sorts most recently modified pages first. If - [[!cpan Sort::Naturally]] is installed, `sort` can be set to "title_natural" - to sort by title with numbers treated as such ("1 2 9 10 20" instead of - "1 10 2 20 9"). +* `sort` - Controls how inlined pages are [[sorted|pagespec/sorting]]. + The default is to sort the newest created pages first. * `reverse` - If set to "yes", causes the sort order to be reversed. * `feedshow` - Specify the maximum number of matching pages to include in the rss/atom feeds. The default is the same as the `show` value above. diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn new file mode 100644 index 000000000..1e0366029 --- /dev/null +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -0,0 +1,11 @@ +Some [[directives|ikiwiki/directive]] that use +[[PageSpecs|ikiwiki/pagespec]], such as [[ikiwiki/directive/inline]], allow +specifying the order that matching pages are shown in. The following sort +orders can be specified. + +* `age` - List pages from the most recently created to the oldest. +* `mtime` - List pages with the most recently modified first. +* `title` - Order by title. +* `title_natural` - Only available if [[!cpan Sort::Naturally]] is + installed. Orders by title, but numbers in the title are treated + as such, ("1 2 9 10 20" instead of "1 10 2 20 9") -- cgit v1.2.3 From 32cd5f0b798c41b2320a4165c5b6ecc18a4e6e3e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 18:26:36 -0400 Subject: inline: switch to use_pagespec Taking advantage of every single one of its features, of course. Even had to add one more.. --- IkiWiki/Plugin/inline.pm | 49 +++++++++++++++++++++--------------------------- doc/plugins/write.mdwn | 2 ++ 2 files changed, 23 insertions(+), 28 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index be1781520..748e02df4 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -196,45 +196,37 @@ sub preprocess_inline (@) { @list = map { bestlink($params{page}, $_) } split ' ', $params{pagenames}; + if (yesno($params{reverse})) { + @list=reverse(@list); + } + foreach my $p (@list) { add_depends($params{page}, $p, deptype($quick ? "presence" : "content")); } } else { - add_depends($params{page}, $params{pages}, - deptype($quick ? "presence" : "content")); - - @list = pagespec_match_list( - [ grep { $_ ne $params{page} } keys %pagesources ], - $params{pages}, location => $params{page}); - - if (exists $params{sort} && $params{sort} eq 'title') { - @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list; + my $num=0; + if ($params{show}) { + $num=$params{show}; } - elsif (exists $params{sort} && $params{sort} eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - @list=sort { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) } @list; + if ($params{feedshow} && $num < $params{feedshow}) { + $num=$params{feedshow}; } - elsif (exists $params{sort} && $params{sort} eq 'mtime') { - @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list; + if ($params{skip}) { + $num+=$params{skip}; } - elsif (! exists $params{sort} || $params{sort} eq 'age') { - @list=sort { $pagectime{$b} <=> $pagectime{$a} } @list; - } - else { - error sprintf(gettext("unknown sort type %s"), $params{sort}); - } - } - if (yesno($params{reverse})) { - @list=reverse(@list); + @list = use_pagespec($params{page}, $params{pages}, + deptype => deptype($quick ? "presence" : "content"), + limit => sub { $_[0] ne $params{page} }, + sort => exists $params{sort} ? $params{sort} : "age", + reverse => yesno($params{reverse}), + num => $num, + ); } if (exists $params{skip}) { - @list=@list[$params{skip} .. scalar @list - 1]; + @list=@list[$params{skip} .. $#list]; } my @feedlist; @@ -253,7 +245,8 @@ sub preprocess_inline (@) { } if ($feeds && exists $params{feedpages}) { - @feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page}); + @feedlist = use_pagespec($params{page}, $params{feedpages}, + list => \@feedlist); } my ($feedbase, $feednum); diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 3d5650758..62bebbeed 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -647,6 +647,8 @@ Additional named parameters can be specified: * `reverse` if true, sorts in reverse. * `num` if nonzero, specifies the maximum number of matching pages that will be returned. +* `list` makes it only match amoung the specified list of pages. + Default is to match amoung all pages in the wiki. #### `add_depends($$;$)` -- cgit v1.2.3 From a198c89e8f968549416d3871bddafa831240e6b8 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Thu, 8 Oct 2009 21:09:08 -0400 Subject: Minor comment --- doc/todo/dependency_types.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index f06603874..d2b121d81 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -262,6 +262,8 @@ sigh. >>>>> like that would probably not support what you want to do. >>>>> --[[Joey]] +>>>>>> Yes - that's what I'm talking about - I'll add some comments there. -- [[Will]] + ---- ### Link dependencies -- cgit v1.2.3 From d73c54b9a7406f4f8d23b2a36e1968bba70f1089 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Thu, 8 Oct 2009 21:30:17 -0400 Subject: comments on cycles in the dependency graph --- doc/bugs/transitive_dependencies.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index 9586bc9b0..bdad67f60 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -66,3 +66,20 @@ Downsides here: plugins, and could be solved by adding more dependency types.) --[[Joey]] + +> Some questions/comments... I've thought about this a lot for [[todo/tracking_bugs_with_dependencies]]. +> +> * When you say that anything that causes a rebuild of B is treated as a change of B, are you: i) Treating +> any rebuild as a change, or ii) Treating any rebuild that gives a new result as a change? Option ii) would +> lead to fewer rebuilds. Implementation is easy: when you're about to rebuild a page, load the old rendered html in. Do the rebuild. Compare +> the new and old html. If there is a difference, then mark that page as having changed. If there is no difference +> then you don't need to mark that pages as changed, even though it has been rebuilt. (This would ignore pages in meta-data that don't +> cause changes in html, but I don't think that is a huge issue.) +> * The second comment I have relates to cycles in transitive dependencies. At the moment I don't think this is +> possible, but with some additions it may well become so. This could be problematic as it could lead to a) +> updates that never complete, or b) it being theoretically unclear what the final result should be (i.e. you +> can construct logical paradoxes in the system). I think the point above about marking things as changed only when +> the output actually changes fixes any cases that are well defined. For logical paradoxes and infinite loops (e.g. +> two pages that include each other), you might want to put a limit on the number of times you'll rebuild a page in any +> given run of ikiwiki. Say, only allow a page to rebuild twice on any run, regardless of whether a page it depends on changes. +> This is not a perfect solution, but would be a good approximation. -- [[Will]] -- cgit v1.2.3 From 0e2ce171c9e897b6b55d31cfeff7566f7adab7b8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 22:31:13 -0400 Subject: response --- doc/bugs/transitive_dependencies.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/bugs/transitive_dependencies.mdwn b/doc/bugs/transitive_dependencies.mdwn index bdad67f60..70b5fb4d4 100644 --- a/doc/bugs/transitive_dependencies.mdwn +++ b/doc/bugs/transitive_dependencies.mdwn @@ -75,6 +75,13 @@ Downsides here: > the new and old html. If there is a difference, then mark that page as having changed. If there is no difference > then you don't need to mark that pages as changed, even though it has been rebuilt. (This would ignore pages in meta-data that don't > cause changes in html, but I don't think that is a huge issue.) + +>> That is a good idea. I will have to look at it to see if the overhead of +>> reading back in the html of every page before building actually is a +>> win though. So far, I've focused on avoiding unnecessary rebuilds, and +>> there is still some room for more dependency types doing so. +>> (Particularly for metadata dependencies..) --[[Joey]] + > * The second comment I have relates to cycles in transitive dependencies. At the moment I don't think this is > possible, but with some additions it may well become so. This could be problematic as it could lead to a) > updates that never complete, or b) it being theoretically unclear what the final result should be (i.e. you @@ -83,3 +90,5 @@ Downsides here: > two pages that include each other), you might want to put a limit on the number of times you'll rebuild a page in any > given run of ikiwiki. Say, only allow a page to rebuild twice on any run, regardless of whether a page it depends on changes. > This is not a perfect solution, but would be a good approximation. -- [[Will]] + +>> Ikiwiki only builds any given output file once per run, already. --[[Joey]] -- cgit v1.2.3 From 4299f22ae8b20f3cbc23876c8fac0a0856a164c2 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Thu, 8 Oct 2009 22:36:29 -0400 Subject: Another tweak to the formal definition. --- doc/todo/dependency_types.mdwn | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index d2b121d81..465796135 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -339,11 +339,25 @@ can indirectly influence what pages a pagespec matches. > Trying to make a formal definition of this: (Note, I'm using the term sets rather than lists, but they're roughly equivalent) > > * Let the *matching set* for a pagespec be the set of existing pages that the pagespec matches. -> * Let a *influence set* for a pagespec be the set of all pages, *p*, whose alteration might: +> * Let the *assignment dependent glob matching set* for a particular assignment of True/False to the `match_()` functions of a pagespec, be the set of pages that would match if the `match_()` functions returned those true/false values. +> * Let the *glob matching set* be the intersection of all assignment dependent glob matching sets. i.e. the set of pages that can match this pagespec just based on glob information, regardless of what the `match_()` functions return. +> * Let the *indirect influence set* for a pagespec be the set of all pages, *p*, whose alteration might: > * cause the pagespec to include or exclude a page other than *p*, or -> * cause the pagespec to exclude *p*. +> * cause the pagespec to exclude *p* unless *p* is in the glob matching set. > ->> \[Will snipped some stuff and edited the formal definition] +> Justification: The 'base dependency mechanism' is to compare changed pages against each pagespec. If the page matches, then rebuild the spec. For this comparison, creation and removal +> of pages are both considered changes. This base mechanism will catch: +> +> * The addition of any page to the matching set through its own modification/creation +> * The removal of any page *that would still match if it existed* from the matching set through its own removal. (Note: The base mechanism cannot remove a page cannot from the matching set because of that page's own modification. If the page should be removed, then cannot match the spec after the change.) This 'match after the change' criterion is what I tried to capture in the glob matching set above. I think my glob matching set is slightly more restrictive than the set of pages that 'still match after the change', but more restrictive is safer than less restrictive for that set. +> +> The base mechanism may therefore not catch: +> +> * The addition or removal of any page from the matching set through the modification/addition/removal of any other page. +> * The removal of any page from the matching set through its own modification/removal if it does not still match after the change. +> +> The indirect influence set then should handle anything that the base mechanism will not catch. +>> At the moment the indirect influence set is a little conservative, in that the glob matching set doesn't exactly equal the set of pages that still match after the change. It is quite hard to get this right - thoughts on tuning the glob matching set definition are welcome. I've tried to err on the side of a longer indirect influence set, as that will make sure we do enough updates. > > --[[Will]] @@ -380,10 +394,13 @@ can indirectly influence what pages a pagespec matches. #### Examples -* The pagespec "created_before(foo)" has an influence list that contains foo. +* The pagespec "created_before(foo)" has an indirect influence list that contains foo. The removal or (re)creation of foo changes what pages match it. Note that this is true even if the pagespec currently fails to match. +>>> This is an annoying example. I think the indirect influence list must contain 'foo' and all currently matching pages. `created_before(foo)` will not match +>>> a deleted page, and so the base mechanism would not cause a rebuild. The removal problem strikes. Note that the glob matching set is empty in this case. -- [[Will]] + * The pagespec "foo" has an empty influence list. This is because a modification/creation/removal of foo directly changes what the pagespec matches. @@ -402,6 +419,8 @@ can indirectly influence what pages a pagespec matches. >>>> pagespec, and see they used to match; and thus knows that the >>>> dependency has triggered. >>>> +>>>>> IkiWiki can only see that they used to match if they're in the glob matching set. -- [[Will]] +>>>> >>>> Maybe the thing to do is consider this an optimisation, where such >>>> pages are influences, but ikiwiki is able to implicitly find them, >>>> so they do not need to be explicitly stored. --[[Joey]] -- cgit v1.2.3 From 6533bec35af422d2db3b5b7347e883035fea6e99 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Thu, 8 Oct 2009 22:59:34 -0400 Subject: Yet another tweak to the formal definition. Much better this time. --- doc/todo/dependency_types.mdwn | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 465796135..9a031aac9 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -339,17 +339,17 @@ can indirectly influence what pages a pagespec matches. > Trying to make a formal definition of this: (Note, I'm using the term sets rather than lists, but they're roughly equivalent) > > * Let the *matching set* for a pagespec be the set of existing pages that the pagespec matches. -> * Let the *assignment dependent glob matching set* for a particular assignment of True/False to the `match_()` functions of a pagespec, be the set of pages that would match if the `match_()` functions returned those true/false values. -> * Let the *glob matching set* be the intersection of all assignment dependent glob matching sets. i.e. the set of pages that can match this pagespec just based on glob information, regardless of what the `match_()` functions return. +> * Let the *missing document matching set* be the set of pages that would match the spec if they didn't exist. These pages may or may not currently exist. Note that membership of this set depends upon how the `match_()` functions react to non-existant pages. > * Let the *indirect influence set* for a pagespec be the set of all pages, *p*, whose alteration might: > * cause the pagespec to include or exclude a page other than *p*, or -> * cause the pagespec to exclude *p* unless *p* is in the glob matching set. +> * cause the pagespec to exclude *p*, unless the alteration is the removal of *p* and *p* is in the missing document matching set. > > Justification: The 'base dependency mechanism' is to compare changed pages against each pagespec. If the page matches, then rebuild the spec. For this comparison, creation and removal > of pages are both considered changes. This base mechanism will catch: > > * The addition of any page to the matching set through its own modification/creation -> * The removal of any page *that would still match if it existed* from the matching set through its own removal. (Note: The base mechanism cannot remove a page cannot from the matching set because of that page's own modification. If the page should be removed, then cannot match the spec after the change.) This 'match after the change' criterion is what I tried to capture in the glob matching set above. I think my glob matching set is slightly more restrictive than the set of pages that 'still match after the change', but more restrictive is safer than less restrictive for that set. +> * The removal of any page *that would still match while non-existant* from the matching set through its own removal. (Note: The base mechanism cannot remove a page cannot from the matching set because of that page's own modification (not deletion). If the page should be removed matching set, then it obviously cannot match the spec after the change.) +> * The modification (not deletion) of any page that still matches after the modification. > > The base mechanism may therefore not catch: > @@ -357,7 +357,6 @@ can indirectly influence what pages a pagespec matches. > * The removal of any page from the matching set through its own modification/removal if it does not still match after the change. > > The indirect influence set then should handle anything that the base mechanism will not catch. ->> At the moment the indirect influence set is a little conservative, in that the glob matching set doesn't exactly equal the set of pages that still match after the change. It is quite hard to get this right - thoughts on tuning the glob matching set definition are welcome. I've tried to err on the side of a longer indirect influence set, as that will make sure we do enough updates. > > --[[Will]] @@ -398,8 +397,8 @@ can indirectly influence what pages a pagespec matches. The removal or (re)creation of foo changes what pages match it. Note that this is true even if the pagespec currently fails to match. ->>> This is an annoying example. I think the indirect influence list must contain 'foo' and all currently matching pages. `created_before(foo)` will not match ->>> a deleted page, and so the base mechanism would not cause a rebuild. The removal problem strikes. Note that the glob matching set is empty in this case. -- [[Will]] +>>> This is an annoying example (hence well worth having :) ). I think the indirect influence list must contain 'foo' and all currently matching pages. `created_before(foo)` will not match +>>> a deleted page, and so the base mechanism would not cause a rebuild. The removal problem strikes. -- [[Will]] * The pagespec "foo" has an empty influence list. This is because a modification/creation/removal of foo directly changes what the pagespec @@ -436,6 +435,9 @@ can indirectly influence what pages a pagespec matches. that contains index (because a change to index changes the backlinks). Note that this is true even if the backlink currently fails. +>>> This is another interesting example. The missing document matching set contains all links on the page index, and so +>>> the influence list only needs to contain 'index' itself. -- [[Will]] + * The pagespec "link(done)" has an influence list that contains every page that it matches. A change to any matching page can remove a link and make it not match any more, and so the list is needed -- cgit v1.2.3 From 5e7b2dea84a35163b599b88efc02cd7ef3e0ad46 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Oct 2009 23:51:06 -0400 Subject: rename use_pagespec to pagespec_match_list To avoid breaking plugins, also support the old pagespec_match_list calling convention, with a deprecation warning. --- IkiWiki.pm | 183 ++++++++++++++++++---------------------- IkiWiki/Plugin/calendar.pm | 2 +- IkiWiki/Plugin/inline.pm | 8 +- IkiWiki/Plugin/map.pm | 3 +- IkiWiki/Plugin/orphans.pm | 2 +- IkiWiki/Plugin/pagecount.pm | 2 +- IkiWiki/Plugin/pagestats.pm | 9 +- IkiWiki/Plugin/postsparkline.pm | 2 +- debian/changelog | 6 +- doc/plugins/write.mdwn | 24 ++---- t/pagespec_match_list.t | 31 +++++++ t/use_pagespec.t | 31 ------- 12 files changed, 140 insertions(+), 163 deletions(-) create mode 100755 t/pagespec_match_list.t delete mode 100755 t/use_pagespec.t (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index daa71059b..fd7e23524 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -17,7 +17,7 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %forcerebuild %loaded_plugins}; use Exporter q{import}; -our @EXPORT = qw(hook debug error template htmlpage deptype use_pagespec +our @EXPORT = qw(hook debug error template htmlpage deptype add_depends pagespec_match pagespec_match_list bestlink htmllink readfile writefile pagetype srcfile pagename displaytime will_render gettext urlto targetpage @@ -1798,91 +1798,6 @@ sub add_depends ($$;$) { return 1; } -sub use_pagespec ($$;@) { - my $page=shift; - my $pagespec=shift; - my %params=@_; - - my $sub=pagespec_translate($pagespec); - error "syntax error in pagespec \"$pagespec\"" - if $@ || ! defined $sub; - - my @candidates; - if (exists $params{limit}) { - @candidates=grep { $params{limit}->($_) } keys %pagesources; - } - else { - @candidates=keys %pagesources; - } - - if (defined $params{sort}) { - my $f; - if ($params{sort} eq 'title') { - $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; - } - elsif ($params{sort} eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - $f=sub { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) }; - } - elsif ($params{sort} eq 'mtime') { - $f=sub { $pagemtime{$b} <=> $pagemtime{$a} }; - } - elsif ($params{sort} eq 'age') { - $f=sub { $pagectime{$b} <=> $pagectime{$a} }; - } - else { - error sprintf(gettext("unknown sort type %s"), $params{sort}); - } - @candidates = sort { &$f } @candidates; - } - - @candidates=reverse(@candidates) if $params{reverse}; - - my @matches; - my $firstfail; - my $count=0; - foreach my $p (@candidates) { - my $r=$sub->($p, location => $page); - if ($r) { - push @matches, [$p, $r]; - last if defined $params{num} && ++$count == $params{num}; - } - elsif (! defined $firstfail) { - $firstfail=$r; - } - } - - $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); - - my @ret; - if (@matches) { - # Add all influences from successful matches. - foreach my $m (@matches) { - push @ret, $m->[0]; - my %i=$m->[1]->influences; - foreach my $i (keys %i) { - $depends_simple{$page}{lc $i} |= $i{$i}; - } - } - } - elsif (defined $firstfail) { - # Add influences from one failure. (Which one should not - # matter; all should have the same influences.) - my %i=$firstfail->influences; - foreach my $i (keys %i) { - $depends_simple{$page}{lc $i} |= $i{$i}; - } - - error(sprintf(gettext("cannot match pages: %s"), $firstfail)) - if $firstfail->isa("IkiWiki::ErrorReason"); - } - - return @ret; -} - sub deptype (@) { my $deptype=0; foreach my $type (@_) { @@ -2055,27 +1970,95 @@ sub pagespec_match ($$;@) { } sub pagespec_match_list ($$;@) { - my $pages=shift; - my $spec=shift; - my @params=@_; + my $page=shift; + my $pagespec=shift; + my %params=@_; - my $sub=pagespec_translate($spec); - error "syntax error in pagespec \"$spec\"" + # Backwards compatability with old calling convention. + if (ref $page) { + print STDERR "warning: a plugin (".caller().") is using pagespec_match_list in an obsolete way, and needs to be updated\n"; + $params{list}=$page; + $page=$params{location}; # ugh! + } + + my $sub=pagespec_translate($pagespec); + error "syntax error in pagespec \"$pagespec\"" if $@ || ! defined $sub; + + my @candidates; + if (exists $params{limit}) { + @candidates=grep { $params{limit}->($_) } keys %pagesources; + } + else { + @candidates=keys %pagesources; + } + + if (defined $params{sort}) { + my $f; + if ($params{sort} eq 'title') { + $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; + } + elsif ($params{sort} eq 'title_natural') { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } + $f=sub { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) }; + } + elsif ($params{sort} eq 'mtime') { + $f=sub { $pagemtime{$b} <=> $pagemtime{$a} }; + } + elsif ($params{sort} eq 'age') { + $f=sub { $pagectime{$b} <=> $pagectime{$a} }; + } + else { + error sprintf(gettext("unknown sort type %s"), $params{sort}); + } + @candidates = sort { &$f } @candidates; + } + + @candidates=reverse(@candidates) if $params{reverse}; - my @ret; - my $r; - foreach my $page (@$pages) { - $r=$sub->($page, @params); - push @ret, $page if $r; + my @matches; + my $firstfail; + my $count=0; + foreach my $p (@candidates) { + my $r=$sub->($p, location => $page); + if ($r) { + push @matches, [$p, $r]; + last if defined $params{num} && ++$count == $params{num}; + } + elsif (! defined $firstfail) { + $firstfail=$r; + } } + + $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); - if (! @ret && defined $r && $r->isa("IkiWiki::ErrorReason")) { - error(sprintf(gettext("cannot match pages: %s"), $r)); + my @ret; + if (@matches) { + # Add all influences from successful matches. + foreach my $m (@matches) { + push @ret, $m->[0]; + my %i=$m->[1]->influences; + foreach my $i (keys %i) { + $depends_simple{$page}{lc $i} |= $i{$i}; + } + } } - else { - return @ret; + elsif (defined $firstfail) { + # Add influences from one failure. (Which one should not + # matter; all should have the same influences.) + my %i=$firstfail->influences; + foreach my $i (keys %i) { + $depends_simple{$page}{lc $i} |= $i{$i}; + } + + error(sprintf(gettext("cannot match pages: %s"), $firstfail)) + if $firstfail->isa("IkiWiki::ErrorReason"); } + + return @ret; } sub pagespec_valid ($) { diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index a89175cfb..c50d038df 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -74,7 +74,7 @@ sub format_month (@) { my $nyear = $params{nyear}; my %linkcache; - foreach my $p (use_pagespec($params{page}, $params{pagespec}, + foreach my $p (pagespec_match_list($params{page}, $params{pagespec}, # add presence dependencies to update # month calendar when pages are added/removed deptype => deptype("presence"))) { diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index c02137aed..815a37838 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -216,7 +216,7 @@ sub preprocess_inline (@) { $num+=$params{skip}; } - @list = use_pagespec($params{page}, $params{pages}, + @list = pagespec_match_list($params{page}, $params{pages}, deptype => deptype($quick ? "presence" : "content"), limit => sub { $_[0] ne $params{page} }, sort => exists $params{sort} ? $params{sort} : "age", @@ -245,9 +245,11 @@ sub preprocess_inline (@) { } if ($feeds && exists $params{feedpages}) { - @feedlist = use_pagespec($params{page}, "($params{pages}) and ($params{feedpages})", + @feedlist = pagespec_match_list( + $params{page}, "($params{pages}) and ($params{feedpages})", deptype => deptype($quick ? "presence" : "content"), - list => \@feedlist); + list => \@feedlist, + ); } my ($feedbase, $feednum); diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 634b0e4d6..788b96827 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -36,7 +36,8 @@ sub preprocess (@) { # Get all the items to map. my %mapitems; - foreach my $page (use_pagespec($params{page}, $params{pages}, deptype => $deptype)) { + foreach my $page (pagespec_match_list($params{page}, $params{pages}, + deptype => $deptype)) { if (exists $params{show} && exists $pagestate{$page} && exists $pagestate{$page}{meta}{$params{show}}) { diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index 607239500..b1ebd1b9d 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -28,7 +28,7 @@ sub preprocess (@) { # considering as orphans. add_depends($params{page}, "*", deptype("links")); - my @orphans=use_pagespec($params{page}, $params{pages}, + my @orphans=pagespec_match_list($params{page}, $params{pages}, # update when orphans are added/removed deptype => deptype("presence"), limit => sub { diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index 40474b2a1..8d36f057e 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -32,7 +32,7 @@ sub preprocess (@) { return scalar keys %pagesources; } - return scalar use_pagespec($params{page}, $pages, + return scalar pagespec_match_list($params{page}, $pages, deptype => deptype("presence")); } diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index e64f7d9c3..47638210a 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -37,16 +37,17 @@ sub preprocess (@) { my %counts; my $max = 0; - foreach my $page (use_pagespec($params{page}, $params{pages}, - # update when a displayed page is added or removed - deptype => deptype("presence"))) { + foreach my $page (pagespec_match_list($params{page}, $params{pages}, + # update when a displayed page is added/removed + deptype => deptype("presence"))) { use IkiWiki::Render; my @backlinks = IkiWiki::backlink_pages($page); if (exists $params{among}) { # only consider backlinks from the amoung pages - @backlinks = use_pagespec($params{page}, $params{among}, + @backlinks = pagespec_match_list( + $params{page}, $params{among}, # update whenever links on those pages change deptype => deptype("links"), list => \@backlinks diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm index f51e309c8..1d4532366 100644 --- a/IkiWiki/Plugin/postsparkline.pm +++ b/IkiWiki/Plugin/postsparkline.pm @@ -54,7 +54,7 @@ sub preprocess (@) { } my @list=sort { $params{timehash}->{$b} <=> $params{timehash}->{$a} } - use_pagespec($params{page}, $params{pages}, + pagespec_match_list($params{page}, $params{pages}, deptype => $deptype, limit => sub { $_[0] ne $params{page} }, ); diff --git a/debian/changelog b/debian/changelog index 3a6fdf77d..49809e6cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,9 +33,9 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low info. * Plugins providing PageSpec `match_*` functions should pass additional influence information when creating result objects. - * Added `use_pagespec` function, that plugins can use to find a list - of matching pages and add dependencies and influences, all at once, - and efficiently. + * API change: `pagespec_match_list` has completly changed its interface. + The old interface will be removed soon, and a warning will be printed + if any plugins try to use it. * Optimize away most expensive file prune calls, when refreshing, by only checking new files. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 62bebbeed..f6ea76c36 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -625,16 +625,16 @@ dependency type from one or more of these keywords: If multiple types are specified, they are combined. -#### `use_pagespec($$;@)` +#### `pagespec_match_list($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns a list of pages in the wiki that match the [[ikiwiki/PageSpec]]. The page will automatically be made to depend on the specified [[ikiwiki/PageSpec]], so `add_depends` does not need to be called. This -is significantly more efficient than calling `add_depends` -followed by `pagespec_match_list`. You should use this anytime a plugin -needs to match a set of pages and generate something based on that list. +is significantly more efficient than calling `add_depends` and +`pagespec_match` in a loop. You should use this anytime a plugin +needs to match a set of pages and do something based on that list. Additional named parameters can be specified: @@ -650,6 +650,9 @@ Additional named parameters can be specified: * `list` makes it only match amoung the specified list of pages. Default is to match amoung all pages in the wiki. +Unlike pagespec_match, this may throw an error if there is an error in +the pagespec. + #### `add_depends($$;$)` Makes the specified page depend on the specified [[ikiwiki/PageSpec]]. @@ -672,19 +675,6 @@ The most often used is "location", which specifies the location the PageSpec should match against. If not passed, relative PageSpecs will match relative to the top of the wiki. -#### `pagespec_match_list($$;@)` - -Passed a reference to a list of page names, and [[ikiwiki/PageSpec]], -returns the set of pages that match the [[ikiwiki/PageSpec]]. - -Additional named parameters can be passed, to further limit the match. -The most often used is "location", which specifies the location the -PageSpec should match against. If not passed, relative PageSpecs will match -relative to the top of the wiki. - -Unlike pagespec_match, this may throw an error if there is an error in -the pagespec. - #### `bestlink($$)` Given a page and the text of a link on the page, determine which diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t new file mode 100755 index 000000000..85a30b542 --- /dev/null +++ b/t/pagespec_match_list.t @@ -0,0 +1,31 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 10; + +BEGIN { use_ok("IkiWiki"); } + +%pagesources=( + foo => "foo.mdwn", + bar => "bar.mdwn", + "post/1" => "post/1.mdwn", + "post/2" => "post/2.mdwn", + "post/3" => "post/3.mdwn", +); + +is_deeply([pagespec_match_list("foo", "bar")], ["bar"]); +is_deeply([sort(pagespec_match_list("foo", "post/*"))], ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title", reverse => 1)], + ["post/3", "post/2", "post/1"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 2)], + ["post/1", "post/2"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50)], + ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title", + limit => sub { $_[0] !~ /3/}) ], + ["post/1", "post/2"]); +my $r=eval { pagespec_match_list("foo", "beep") }; +ok(eval { pagespec_match_list("foo", "beep") } == 0); +ok(! $@, "does not fail with error when unable to match anything"); +eval { pagespec_match_list("foo", "this is not a legal pagespec!") }; +ok($@, "fails with error when pagespec bad"); diff --git a/t/use_pagespec.t b/t/use_pagespec.t deleted file mode 100755 index 92d7977cf..000000000 --- a/t/use_pagespec.t +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/perl -use warnings; -use strict; -use Test::More tests => 10; - -BEGIN { use_ok("IkiWiki"); } - -%pagesources=( - foo => "foo.mdwn", - bar => "bar.mdwn", - "post/1" => "post/1.mdwn", - "post/2" => "post/2.mdwn", - "post/3" => "post/3.mdwn", -); - -is_deeply([use_pagespec("foo", "bar")], ["bar"]); -is_deeply([sort(use_pagespec("foo", "post/*"))], ["post/1", "post/2", "post/3"]); -is_deeply([use_pagespec("foo", "post/*", sort => "title", reverse => 1)], - ["post/3", "post/2", "post/1"]); -is_deeply([use_pagespec("foo", "post/*", sort => "title", num => 2)], - ["post/1", "post/2"]); -is_deeply([use_pagespec("foo", "post/*", sort => "title", num => 50)], - ["post/1", "post/2", "post/3"]); -is_deeply([use_pagespec("foo", "post/*", sort => "title", - limit => sub { $_[0] !~ /3/}) ], - ["post/1", "post/2"]); -my $r=eval { use_pagespec("foo", "beep") }; -ok(eval { use_pagespec("foo", "beep") } == 0); -ok(! $@, "does not fail with error when unable to match anything"); -eval { use_pagespec("foo", "this is not a legal pagespec!") }; -ok($@, "fails with error when pagespec bad"); -- cgit v1.2.3 From fb3fd6b60fb584d8c1c0f76253d53633127afb18 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 00:06:08 -0400 Subject: don't link to inline, not available when directives underlay is not enabled --- doc/ikiwiki/pagespec/sorting.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 1e0366029..41aa58151 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -1,5 +1,5 @@ Some [[directives|ikiwiki/directive]] that use -[[PageSpecs|ikiwiki/pagespec]], such as [[ikiwiki/directive/inline]], allow +[[PageSpecs|ikiwiki/pagespec]] allow specifying the order that matching pages are shown in. The following sort orders can be specified. -- cgit v1.2.3 From 769b78df078d0287a10166ce828941a491858ff2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 13:02:10 -0400 Subject: pagespec_match_list allow additional pagespec limit parameters again --- IkiWiki.pm | 12 ++++++++---- doc/plugins/write.mdwn | 7 +++++-- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 475e278c3..f959d868b 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2019,21 +2019,25 @@ sub pagespec_match_list ($$;@) { @candidates=reverse(@candidates) if $params{reverse}; + $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); + + # clear params, remainder is passed to pagespec + my $num=$params{num}; + delete @params{qw{num deptype reverse sort limit}}; + my @matches; my $firstfail; my $count=0; foreach my $p (@candidates) { - my $r=$sub->($p, location => $page); + my $r=$sub->($p, %params, location => $page); if ($r) { push @matches, [$p, $r]; - last if defined $params{num} && ++$count == $params{num}; + last if defined $num && ++$count == $num; } elsif (! defined $firstfail) { $firstfail=$r; } } - - $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); my @ret; if (@matches) { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index f6ea76c36..9661bf4de 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -636,6 +636,9 @@ is significantly more efficient than calling `add_depends` and `pagespec_match` in a loop. You should use this anytime a plugin needs to match a set of pages and do something based on that list. +Unlike pagespec_match, this may throw an error if there is an error in +the pagespec. + Additional named parameters can be specified: * `deptype` optionally specifies the type of dependency to add. Use the @@ -650,8 +653,8 @@ Additional named parameters can be specified: * `list` makes it only match amoung the specified list of pages. Default is to match amoung all pages in the wiki. -Unlike pagespec_match, this may throw an error if there is an error in -the pagespec. +Any other named parameters are passed on to `pagespec_match`, to further +limit the match. #### `add_depends($$;$)` -- cgit v1.2.3 From 6f2cc5ac8cc7e76b3faf20cd7516f82bcb3de7ed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 13:20:41 -0400 Subject: pagespec_match_list: change limit to filter --- IkiWiki.pm | 6 +++--- IkiWiki/Plugin/inline.pm | 2 +- IkiWiki/Plugin/orphans.pm | 10 +++++----- IkiWiki/Plugin/postsparkline.pm | 2 +- doc/plugins/write.mdwn | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index f959d868b..49c76c4d4 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1986,8 +1986,8 @@ sub pagespec_match_list ($$;@) { if $@ || ! defined $sub; my @candidates; - if (exists $params{limit}) { - @candidates=grep { $params{limit}->($_) } keys %pagesources; + if (exists $params{filter}) { + @candidates=grep { ! $params{filter}->($_) } keys %pagesources; } else { @candidates=keys %pagesources; @@ -2023,7 +2023,7 @@ sub pagespec_match_list ($$;@) { # clear params, remainder is passed to pagespec my $num=$params{num}; - delete @params{qw{num deptype reverse sort limit}}; + delete @params{qw{num deptype reverse sort filter}}; my @matches; my $firstfail; diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 815a37838..0fe0bd2e1 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -218,7 +218,7 @@ sub preprocess_inline (@) { @list = pagespec_match_list($params{page}, $params{pages}, deptype => deptype($quick ? "presence" : "content"), - limit => sub { $_[0] ne $params{page} }, + filter => sub { $_[0] eq $params{page} }, sort => exists $params{sort} ? $params{sort} : "age", reverse => yesno($params{reverse}), num => $num, diff --git a/IkiWiki/Plugin/orphans.pm b/IkiWiki/Plugin/orphans.pm index b1ebd1b9d..702943f87 100644 --- a/IkiWiki/Plugin/orphans.pm +++ b/IkiWiki/Plugin/orphans.pm @@ -31,24 +31,24 @@ sub preprocess (@) { my @orphans=pagespec_match_list($params{page}, $params{pages}, # update when orphans are added/removed deptype => deptype("presence"), - limit => sub { + filter => sub { my $page=shift; # Filter out pages that other pages link to. - return 0 if IkiWiki::backlink_pages($page); + return 1 if IkiWiki::backlink_pages($page); # Toplevel index is assumed to never be orphaned. - return 0 if $page eq 'index'; + return 1 if $page eq 'index'; # If the page has a link to some other page, it's # indirectly linked via that page's backlinks. - return 0 if grep { + return 1 if grep { length $_ && ($_ !~ /\/\Q$config{discussionpage}\E$/i || ! $config{discussion}) && bestlink($page, $_) !~ /^(\Q$page\E|)$/ } @{$links{$page}}; - return 1; + return 0; }, ); diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm index 1d4532366..0d5a12e33 100644 --- a/IkiWiki/Plugin/postsparkline.pm +++ b/IkiWiki/Plugin/postsparkline.pm @@ -56,7 +56,7 @@ sub preprocess (@) { my @list=sort { $params{timehash}->{$b} <=> $params{timehash}->{$a} } pagespec_match_list($params{page}, $params{pages}, deptype => $deptype, - limit => sub { $_[0] ne $params{page} }, + filter => sub { $_[0] eq $params{page} }, ); my @data=eval qq{IkiWiki::Plugin::postsparkline::formula::$formula(\\\%params, \@list)}; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9661bf4de..2254d7025 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -643,8 +643,8 @@ Additional named parameters can be specified: * `deptype` optionally specifies the type of dependency to add. Use the `deptype` function to generate a dependency type. -* `limit` is a reference to a function, that is called and passed a page, - and must return true for the page to be included. +* `filter` is a reference to a function, that is called and passed a page, + and returns true if the page should be filtered out of the list. * `sort` specifies a sort order for the list. See [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. * `reverse` if true, sorts in reverse. -- cgit v1.2.3 From e0b0b57211e8fe609c09a37605a21f42a6d734d3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 13:33:49 -0400 Subject: fix link --- doc/translation.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/translation.mdwn b/doc/translation.mdwn index d869a6821..9d874d98e 100644 --- a/doc/translation.mdwn +++ b/doc/translation.mdwn @@ -23,7 +23,7 @@ essentially three pieces needed for a complete translation: file, and in preprocessor directives. 1. The [[basewiki]] needs to be translated. The - [[plugins/contrib/po]] ikiwiki plugin will allow translating + [[plugins/po]] ikiwiki plugin will allow translating wikis using po files and can be used for this. There is now a website, [l10n.ikiwiki.info](http://l10n.ikiwiki.info) -- cgit v1.2.3 From f977eaf39493984924b6ae9409be3e1d504fc0ae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 14:52:03 -0400 Subject: response --- doc/todo/dependency_types.mdwn | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 9a031aac9..6ca06fdab 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -348,7 +348,7 @@ can indirectly influence what pages a pagespec matches. > of pages are both considered changes. This base mechanism will catch: > > * The addition of any page to the matching set through its own modification/creation -> * The removal of any page *that would still match while non-existant* from the matching set through its own removal. (Note: The base mechanism cannot remove a page cannot from the matching set because of that page's own modification (not deletion). If the page should be removed matching set, then it obviously cannot match the spec after the change.) +> * The removal of any page *that would still match while non-existant* from the matching set through its own removal. (Note: The base mechanism cannot remove a page from the matching set because of that page's own modification (not deletion). If the page should be removed matching set, then it obviously cannot match the spec after the change.) > * The modification (not deletion) of any page that still matches after the modification. > > The base mechanism may therefore not catch: @@ -397,8 +397,16 @@ can indirectly influence what pages a pagespec matches. The removal or (re)creation of foo changes what pages match it. Note that this is true even if the pagespec currently fails to match. ->>> This is an annoying example (hence well worth having :) ). I think the indirect influence list must contain 'foo' and all currently matching pages. `created_before(foo)` will not match ->>> a deleted page, and so the base mechanism would not cause a rebuild. The removal problem strikes. -- [[Will]] +>>> This is an annoying example (hence well worth having :) ). I think the +>>> indirect influence list must contain 'foo' and all currently matching +>>> pages. `created_before(foo)` will not match +>>> a deleted page, and so the base mechanism would not cause a rebuild. The +>>> removal problem strikes. -- [[Will]] + +>>>> But `created_before` can in fact match a deleted page. Because the mtime +>>>> of a deleted page is temporarily set to 0 while the base mechanism runs to +>>>> find changes in deleted pages. (I verified this works by experiment, +>>>> also that `created_after` is triggered by a deleted page.) --[[Joey]] * The pagespec "foo" has an empty influence list. This is because a modification/creation/removal of foo directly changes what the pagespec -- cgit v1.2.3 From 74409f940d24f51a08becb626e266c91d40d69bd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 17:15:40 -0400 Subject: add_depends: optimise influence calculation I made match_* functions whose influences can vary depending on the page matched set a special "" influence to indicate this. Then add_depends can try just one page, and if static influences are found, stop there. --- IkiWiki.pm | 52 +++++++++++++++++++++++++------------------------- IkiWiki/Plugin/meta.pm | 6 +++--- doc/plugins/write.mdwn | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index c67a1e138..cd93fe969 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1780,19 +1780,17 @@ sub add_depends ($$;$) { return 1; } - # Analyse the pagespec, and match it against all pages - # to get a list of influences, and add explicit dependencies - # for those. - #my $sub=pagespec_translate($pagespec); - #return if $@; - #foreach my $p (keys %pagesources) { - # my $r=$sub->($p, location => $page ); - # my %i=$r->influences; - # foreach my $i (keys %i) { - # $depends_simple{$page}{lc $i} |= $i{$i}; - # } - #} - print STDERR "warning: use of add_depends by ".caller()."; influences not tracked\n"; + # Add explicit dependencies for influences. + my $sub=pagespec_translate($pagespec); + return if $@; + foreach my $p (keys %pagesources) { + my $r=$sub->($p, location => $page); + my $i=$r->influences; + foreach my $k (keys %$i) { + $depends_simple{$page}{lc $k} |= $i->{$k}; + } + last if $r->influences_static; + } $depends{$page}{$pagespec} |= $deptype; return 1; @@ -2045,9 +2043,9 @@ sub pagespec_match_list ($$;@) { } # Add simple dependencies for accumulated influences. - my %i=$accum->influences; - foreach my $i (keys %i) { - $depends_simple{$page}{lc $i} |= $i{$i}; + my $i=$accum->influences; + foreach my $k (keys %$i) { + $depends_simple{$page}{lc $k} |= $i->{$k}; } return @matches; @@ -2099,12 +2097,14 @@ sub new { sub influences { my $this=shift; - if (! @_) { - return %{$this->[1]}; - } - else { - $this->[1]={@_}; - } + $this->[1]={@_} if @_; + my %i=%{$this->[1]}; + delete $i{""}; + return \%i; +} + +sub influences_static { + return ! $_[0][1]->{""}; } sub merge_influences { @@ -2173,19 +2173,19 @@ sub match_link ($$;@) { my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { if (length $bestlink) { - return IkiWiki::SuccessReason->new("$page links to $link", $page => $IkiWiki::DEPEND_LINKS) + return IkiWiki::SuccessReason->new("$page links to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) if $bestlink eq IkiWiki::bestlink($page, $p); } else { - return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page => $IkiWiki::DEPEND_LINKS) + return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) if match_glob($p, $link, %params); my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page => $IkiWiki::DEPEND_LINKS) + return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) if match_glob($p_rel, $link, %params); } } - return IkiWiki::FailReason->new("$page does not link to $link"); + return IkiWiki::FailReason->new("$page does not link to $link", "" => 1); } sub match_backlink ($$;@) { diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index c675880b3..8dcd73a1a 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -291,14 +291,14 @@ sub match { if (defined $val) { if ($val=~/^$re$/i) { - return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT); + return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT, "" => 1); } else { - return IkiWiki::FailReason->new("$re does not match $field of $page"); + return IkiWiki::FailReason->new("$re does not match $field of $page", "" => 1); } } else { - return IkiWiki::FailReason->new("$page does not have a $field"); + return IkiWiki::FailReason->new("$page does not have a $field", "" => 1); } } diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 2254d7025..c72418c3c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -632,7 +632,7 @@ in the wiki that match the [[ikiwiki/PageSpec]]. The page will automatically be made to depend on the specified [[ikiwiki/PageSpec]], so `add_depends` does not need to be called. This -is significantly more efficient than calling `add_depends` and +is often significantly more efficient than calling `add_depends` and `pagespec_match` in a loop. You should use this anytime a plugin needs to match a set of pages and do something based on that list. -- cgit v1.2.3 From 2ba8bd386142e7f3c0fb03c86eb90eb3885aabd2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 17:19:07 -0400 Subject: remove highlevel influence calculation stuff I have it implemented in both add_depends and pagespec_match_list. The add_depends implementation is optimised to only try one page if the pagespec's influences are all static, and do not vary by page matched. --- doc/todo/dependency_types.mdwn | 51 ------------------------------------------ 1 file changed, 51 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 6ca06fdab..e95965c33 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -564,57 +564,6 @@ SuccessReason(page, index) => right `HardFailReason() | SuccessReason(bugs/foo)` => `HardFailReason()` => right -#### High-level Calculation and Storage - -Naively calculating the full influence list for a pagespec requires trying -to match it against every page in the wiki. I'd like to avoid doing such -expensive matching redundantly. - -It may be possible, for some types of pagespecs, to just try matching a -single, arbitrary page against it, and know the full influence list has -been obtained. It seems to be that case that if a pagespec has any -influences, matching any page will return at least one. So if none are -returned, we can skip trying other pages. - -If the influence list does not include the page that was tried, we know -that the pagespec does not things like `link()` and `title()`, that are -influenced by the page's own content. So it *might* be safe to not try -matching any more pages in this case too. I think it would work for all -current pagespec terms. There might be a hypothetical term where this -optimisation doesn't work. We could add a special case to ensure it can -work: If a term declares it is unfluenced by "", then it means it is -always influenced by the matching page. - -Anyway, this seems worth doing: Add a `pagespec_match_all`, which returns a -list of all pages in the whole wiki that match the pagespec, and also adds -the pagespec as a dependency, and while it's at it, calculates and stores -the influence list. - -It could have an optional sort parameter, and limit parameter, to control -how many items to return and the sort order. So when inline wants to -display the 10 newest, only the influence lists for those ten are added. - -If `pagespec_match_depends` can be used by all plugins, then great, -influences are automatically calculated, no extra work needs to be done. - -If not, and some plugins still need to use `pagespec_match_list` or -`pagespec_match`, and `add_depends`, then I guess that `add_depends` can do -a slightly more expensive influence calculation. - -Bonus: If `add_depends` is doing an influence calculation, then I can remove -the nasty hack it currently uses to decide if a given pagespec is safe to use -with an existence or links dependency. - -Where to store the influence list? Well, it appears that we can just add -(content) dependencies for each item on the list, to the page's -regular list of simple dependencies. So, the data stored ends up looking -just like what is stored today by the explicit dependency hacks. Except, -it's calculated more smartly, and is added automatically. - -> I've implemented influence calculation in `add_depends`. As expected, -> it means rather a lot more work, and makes some things much slower. -> Optimisations next.. --[[Joey]] - #### Influence types Note that influences can also have types, same as dependency types. -- cgit v1.2.3 From a75591eaa772c1b875cca2d96b5015935a8617f3 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Fri, 9 Oct 2009 18:08:21 -0400 Subject: response --- doc/todo/dependency_types.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index e95965c33..1c2f579b3 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -408,6 +408,11 @@ can indirectly influence what pages a pagespec matches. >>>> find changes in deleted pages. (I verified this works by experiment, >>>> also that `created_after` is triggered by a deleted page.) --[[Joey]] +>>>>> Oh, okie. I looked at the source, saw the `if (exists $IkiWiki::pagectime{$testpage})` and assumed it would fail. +>>>>> Of course, having it succeed doesn't cure all the issues -- just moves them. With `created_before()` succeeding +>>>>> for deleted files, this pagespec will be match any removal in the entire wiki with the base mechanism. Whether this is +>>>>> better or worse than the longer indirect influence list is an empirical question. -- [[Will]] + * The pagespec "foo" has an empty influence list. This is because a modification/creation/removal of foo directly changes what the pagespec matches. -- cgit v1.2.3 From 36003bad0ad5746af841a0373ded1e271ae57840 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 20:08:42 -0400 Subject: add news item for ikiwiki 3.20091009 --- doc/news/version_3.1415.mdwn | 7 ------- doc/news/version_3.20091009.mdwn | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 doc/news/version_3.1415.mdwn create mode 100644 doc/news/version_3.20091009.mdwn (limited to 'doc') diff --git a/doc/news/version_3.1415.mdwn b/doc/news/version_3.1415.mdwn deleted file mode 100644 index 93310bc64..000000000 --- a/doc/news/version_3.1415.mdwn +++ /dev/null @@ -1,7 +0,0 @@ -ikiwiki 3.1415 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * img: Fix extra double quote with alt text. (smcv) - * Updated French debconf templates translation. Closes: #[535103](http://bugs.debian.org/535103) - * openid: Support Net::OpenID 2.x when pretty-printing - openids. (smcv) - * highlight: Fix utf-8 encoding bug. Closes: #[535028](http://bugs.debian.org/535028)"""]] \ No newline at end of file diff --git a/doc/news/version_3.20091009.mdwn b/doc/news/version_3.20091009.mdwn new file mode 100644 index 000000000..9ab1299b9 --- /dev/null +++ b/doc/news/version_3.20091009.mdwn @@ -0,0 +1,14 @@ +ikiwiki 3.20091009 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * parentlinks: Add has\_parentlinks template parameter to allow styling + the toplevel index differently etc. + * img: Correct bug in image size calculation code. + * img: Fix dependency code for full size images. + * toggle, relativedate: Support templates that add attributes + to the body tag. + * Support RPC::XML 0.69's incompatible object instantiation method. + * mirrorlist: Display nothing if list is empty. + * Fix a bug that could lead to duplicate links being recorded + for tags. + * Optimize away most expensive file prune calls, when refreshing, + by only checking new files."""]] \ No newline at end of file -- cgit v1.2.3 From a169e7b6a81485a918992328f053d899e3614547 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 9 Oct 2009 20:30:22 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index bf6a76d87..da9b5e6cf 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -566,9 +566,16 @@ SuccessReason(page, index) => right `HardFailReason() | SuccessReason(index)` => `SuccessReason(index)` => right +Ok so far, but: + "!bugs/* and link(patch)" => -`HardFailReason() | SuccessReason(bugs/foo)` => -`HardFailReason()` => right +`!SuccessReason() | SuccessReason(bugs/foo)` => +'FailReason() | SuccessReason(bugs/foo) +`FailReason(bugs/foo)` => wrong! + +This could be fixed by adding a HardSuccessReason that glob also returns. +Maybe just a field of the object that is set if it is "hard" is a better +approach though. #### Influence types -- cgit v1.2.3 From 97dd750380de2176b6f43f8bc9c27ec8122cadd3 Mon Sep 17 00:00:00 2001 From: trianta Date: Sat, 10 Oct 2009 04:14:18 -0400 Subject: --- doc/sandbox.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 242ffb327..e326319da 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -57,8 +57,10 @@ Bulleted list [[!progress percent=27]] +[[!progress percent=78]] + ----- -This SandBox is also a [[blog]]! +This **SandBox** is also a [[blog]]! [[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] -- cgit v1.2.3 From 800d165037ee9bc3362e21048ab07bdd120dcfe0 Mon Sep 17 00:00:00 2001 From: Jogo Date: Sat, 10 Oct 2009 04:22:41 -0400 Subject: --- doc/plugins/lockedit/discussion.mdwn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/plugins/lockedit/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/lockedit/discussion.mdwn b/doc/plugins/lockedit/discussion.mdwn new file mode 100644 index 000000000..b058b2b07 --- /dev/null +++ b/doc/plugins/lockedit/discussion.mdwn @@ -0,0 +1,21 @@ +This plugin not only locks pages but ensures too a user is logged in. This seems to me redundant with signedit. I propose : + + sub canedit ($$) { + my $page=shift; + my $cgi=shift; + my $session=shift; + + my $user=$session->param("name"); + return undef if defined $user && IkiWiki::is_admin($user); + + if (defined $config{locked_pages} && length $config{locked_pages} && + pagespec_match($page, $config{locked_pages}, + user => $session->param("name"), + ip => $ENV{REMOTE_ADDR}, + )) { + return sprintf(gettext("%s is locked and cannot be edited"), + htmllink("", "", $page, noimageinline => 1)); + } + + return undef; + } -- cgit v1.2.3 From 9900d6164aca858587b1c603e2fdc53a78f880b9 Mon Sep 17 00:00:00 2001 From: Jogo Date: Sun, 11 Oct 2009 03:18:32 -0400 Subject: --- doc/sandbox.mdwn | 5 ----- 1 file changed, 5 deletions(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index e326319da..8aedcbb9e 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,10 +1,5 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). -Here's a paragraph. - -Here's another one with *emphasised* text. - -test 2 # Header -- cgit v1.2.3 From 22ed3f388b6433c512ca7a026d868861ea1990ea Mon Sep 17 00:00:00 2001 From: Jogo Date: Sun, 11 Oct 2009 04:34:17 -0400 Subject: --- doc/plugins/contrib/groupfile.mdwn | 105 +++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 doc/plugins/contrib/groupfile.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/groupfile.mdwn b/doc/plugins/contrib/groupfile.mdwn new file mode 100644 index 000000000..e5c0ded42 --- /dev/null +++ b/doc/plugins/contrib/groupfile.mdwn @@ -0,0 +1,105 @@ +[[!template id=plugin name=groupfile core=0 author="[[Jogo]]"]] + +This plugin add a `group(groupname)` function to [[ikiwiki/PageSpec]], which is true +only if the actual user is member of the group named `groupname`. + +Groups membership are read from a file. The syntax of this file is very close to +usual `/etc/passwd` Unix file : the group's name, followed by a colon, followed by +a coma separated list of user's names. For exemple : + + dev:toto,foo + i18n:zorba + +----- + + #!/usr/bin/perl + # GroupFile plugin. + # by Joseph Boudou + + package IkiWiki::Plugin::groupfile; + + use warnings; + use strict; + use IkiWiki 3.00; + + sub import { + hook(type => 'getsetup', id => 'groups', call => \&get_setup); + } + + sub get_setup () { + return ( + plugin => { + safe => 0, + rebuild => 0, + }, + group_file => { + type => 'string', + example => '/etc/ikiwiki/group', + description => 'group file location', + safe => 0, + rebuild => 0, + }, + ); + } + + my $users_of = 0; + + sub get_groups () { + if (not $users_of) { + + if (not defined $config{group_file}) { + return 'group_file option not set'; + } + + open my $file, '<', $config{group_file} + or return 'Unable to open group_file'; + + $users_of = {}; + READ: + while (<$file>) { + next READ if (/^\s*$/); + + if (/^(\w+):([\w,]+)/) { + %{ $users_of->{$1} } = map { $_ => 1 } split /,/, $2; + } + else { + $users_of = "Error at group_file:$."; + last READ; + } + } + + close $file; + } + + return $users_of; + } + + package IkiWiki::PageSpec; + + sub match_group ($$;@) { + shift; + my $group = shift; + my %params = @_; + + if (not exists $params{user}) { + return IkiWiki::ErrorReason->new('no user specified'); + } + if (not defined $params{user}) { + return IkiWiki::FailReason->new('not logged in'); + } + + my $users_of = IkiWiki::Plugin::groupfile::get_groups(); + if (not ref $users_of) { + return IkiWiki::ErrorReason->new($users_of); + } + + if (exists $users_of->{$group}{ $params{user} }) { + return IkiWiki::SuccessReason->new("user is member of $group"); + } + else { + return IkiWiki::FailReason->new( + "user $params{user} isn't member of $group"); + } + } + + 1 -- cgit v1.2.3 From 5dba91cdc88c01ac1d314f24b12eb2cda651e206 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Oct 2009 13:51:23 -0400 Subject: typo --- doc/plugins/calendar.mdwn | 2 +- t/pagespec_match_result.t | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index d695762b7..8ade70004 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -6,7 +6,7 @@ The directive displays a calendar, similar to the typical calendars shown on some blogs. Since ikiwiki is a wiki compiler, to keep the calendar up-to-date, -wikis that include it need to be periodically refreshes, typically by cron +wikis that include it need to be periodically refreshed, typically by cron at midnight. Example crontab: 0 0 * * * ikiwiki -setup ~/ikiwiki.setup -refresh diff --git a/t/pagespec_match_result.t b/t/pagespec_match_result.t index d9c31d6f0..c2112bf14 100755 --- a/t/pagespec_match_result.t +++ b/t/pagespec_match_result.t @@ -57,3 +57,21 @@ ok(! $s->influences->{foo}, "removed 0 influence"); ok(! $s->influences->{bar}, "removed 1 influence"); ok($s->influences->{baz}, "set influence"); ok($s->influences_static); + +# influence blocking +my $r=F()->block & S(foo => 1); +ok(! $r->influences->{foo}, "failed blocker & influence -> does not pass"); +$r=F()->block | S(foo => 1); +ok($r->influences->{foo}, "failed blocker | influence -> does pass"); +$r=S(foo => 1) & F()->block; +ok(! $r->influences->{foo}, "influence & failed blocker -> does not pass"); +$r=S(foo => 1) | F()->block; +ok($r->influences->{foo}, "influence | failed blocker -> does pass"); +$r=S(foo => 1) & F()->block & S(foo => 2); +ok(! $r->influences->{foo}, "influence & failed blocker & influence -> does not pass"); +$r=S(foo => 1) | F()->block | S(foo => 2); +ok($r->influences->{foo}, "influence | failed blocker | influence -> does pass"); +$r=S()->block & S(foo => 1); +ok($r->influences->{foo}, "successful blocker -> does pass"); +$r=(! S()->block) & S(foo => 1); +ok(! $r->influences->{foo}, "! successful blocker -> failed blocker"); -- cgit v1.2.3 From 5cddd8a0a3b1b42dd3a92eb4f839679c12ddf97e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Oct 2009 16:04:03 -0400 Subject: typo --- doc/plugins/calendar.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index d695762b7..8ade70004 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -6,7 +6,7 @@ The directive displays a calendar, similar to the typical calendars shown on some blogs. Since ikiwiki is a wiki compiler, to keep the calendar up-to-date, -wikis that include it need to be periodically refreshes, typically by cron +wikis that include it need to be periodically refreshed, typically by cron at midnight. Example crontab: 0 0 * * * ikiwiki -setup ~/ikiwiki.setup -refresh -- cgit v1.2.3 From e1939185d29e1431861e63d6526cb3a498d6033e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Oct 2009 16:42:49 -0400 Subject: ikiwiki-calendar: New command automates creation of archive pages using the calendar plugin. --- debian/changelog | 7 +++++ doc/examples/blog.mdwn | 4 +++ doc/ikiwiki-calendar.mdwn | 51 ++++++++++++++++++++++++++++++++ doc/ikiwiki/directive/calendar.mdwn | 29 ++++++++++++------ doc/plugins/calendar.mdwn | 8 ++--- ikiwiki-calendar | 59 +++++++++++++++++++++++++++++++++++++ templates/calendarmonth.tmpl | 3 ++ templates/calendaryear.tmpl | 1 + 8 files changed, 147 insertions(+), 15 deletions(-) create mode 100644 doc/ikiwiki-calendar.mdwn create mode 100755 ikiwiki-calendar create mode 100644 templates/calendarmonth.tmpl create mode 100644 templates/calendaryear.tmpl (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index a79faf7fb..22935955a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20091010) UNRELEASED; urgency=low + + * ikiwiki-calendar: New command automates creation of archive pages + using the calendar plugin. + + -- Joey Hess Sun, 11 Oct 2009 15:54:45 -0400 + ikiwiki (3.20091009) unstable; urgency=low * parentlinks: Add has_parentlinks template parameter to allow styling diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn index 2155d7fea..f542cad0c 100644 --- a/doc/examples/blog.mdwn +++ b/doc/examples/blog.mdwn @@ -23,3 +23,7 @@ Some additional configuration you might want to do: enable comments to posts to the blog: comments_pagespec => 'blog/posts/* and !*/Discussion', + +* Enable the [[calendar|plugins/calendar]] plugin and run the + [[ikiwiki-calendar]] command from cron daily to get an interlinked + set of calendar archives. diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn new file mode 100644 index 000000000..e2cc612f3 --- /dev/null +++ b/doc/ikiwiki-calendar.mdwn @@ -0,0 +1,51 @@ +# NAME + +ikiwiki-calendar - create calendar archive pages + +# SYNOPSIS + +ikiwiki-calendar [-f] your.setup [pagespec] [year] + +# DESCRIPTION + +`ikiwiki-calendar` creates pages that use the [[ikiwiki/directive/calendar]] +directive, allowing the archives to be browsed one month +at a time, with calendar-based navigation. + +You must specify the setup file for your wiki. The pages will +be created inside its `srcdir`, beneath the `archivebase` +directory used by the calendar plugin (default "archives"). + +You will probably want to specify a [[ikiwiki/PageSpec]] +to control which pages are included on the calendars. The +default is all pages. To limit it to only posts in a blog, +use something like "posts/* and !*/Discussion". + +It defaults to creating calendar pages for the current +year, as well as the previous year, and the next year. +If you specify a year, it will create pages for that year. + +Existing pages will not be overwritten by this command by default. +Use the `-f` switch to force it to overwrite any existing pages. + +## CRONTAB + +While this command only needs to be run once a year to update +the archive pages for each new year, you are recommended to set up +a cron job to run it daily, at midnight. Then it will also update +the calendars to highlight the current day. + +An example crontab: + + 0 0 * * * ikiwiki-calendar ~/ikiwiki.setup "posts/* and !*/Discussion" + +# TEMPLATES + +This command uses two [[template|wikitemplates]] to generate +the pages, `calendarmonth.tmpl` and `calendaryear.tmpl`. + +# AUTHOR + +Joey Hess + +Warning: this page is automatically made into ikiwiki-calendar's man page, edit with care diff --git a/doc/ikiwiki/directive/calendar.mdwn b/doc/ikiwiki/directive/calendar.mdwn index 8a257d6eb..b2ac75b11 100644 --- a/doc/ikiwiki/directive/calendar.mdwn +++ b/doc/ikiwiki/directive/calendar.mdwn @@ -1,5 +1,4 @@ The `calendar` directive is supplied by the [[!iki plugins/calendar desc=calendar]] plugin. -This plugin requires extra setup. See the plugin documentation for details. This directive displays a calendar, similar to the typical calendars shown on some blogs. @@ -12,16 +11,28 @@ some blogs. \[[!calendar type="year" year="2005" pages="blog/* and !*/Discussion"]] +## setup + The calendar is essentially a fancy front end to archives of previous pages, usually used for blogs. It can produce a calendar for a given month, -or a list of months for a given year. - -The month format calendar simply links to any page posted on each -day of the month. The year format calendar links to archive pages, with -names like `archives/2007` (for all of 2007) and `archives/2007/01` -(for January, 2007). For this to work, you'll need to create these archive -pages. They typically use [[inline]] to display or list pages created in -the given time frame. +or a list of months for a given year. The month format calendar simply +links to any page posted on each day of the month. The year format calendar +links to archive pages, with names like `archives/2007` (for all of 2007) +and `archives/2007/01` (for January, 2007). + +While you can insert calendar directives anywhere on your wiki, including +in the sidebar, you'll also need to create these archive pages. They +typically use this directive to display a calendar, and also use [[inline]] +to display or list pages created in the given time frame. + +The `ikiwiki-calendar` command can be used to automatically generate the +archive pages. It also refreshes the wiki, updating the calendars to +highlight the current day. This command is typically run at midnight from +cron. An example crontab: + +An example crontab: + + 0 0 * * * ikiwiki-calendar ~/ikiwiki.setup "posts/* and !*/Discussion" ## usage diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index 8ade70004..bc1bc6c71 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -3,13 +3,9 @@ This plugin provides a [[ikiwiki/directive/calendar]] [[ikiwiki/directive]]. The directive displays a calendar, similar to the typical calendars shown on -some blogs. +some blogs. -Since ikiwiki is a wiki compiler, to keep the calendar up-to-date, -wikis that include it need to be periodically refreshed, typically by cron -at midnight. Example crontab: - - 0 0 * * * ikiwiki -setup ~/ikiwiki.setup -refresh +The [[ikiwiki-calendar]] command is used to keep the calendar up-to-date. ## CSS diff --git a/ikiwiki-calendar b/ikiwiki-calendar new file mode 100755 index 000000000..ec572cb7c --- /dev/null +++ b/ikiwiki-calendar @@ -0,0 +1,59 @@ +#!/usr/bin/perl +use warnings; +use strict; +use IkiWiki; +use IkiWiki::Setup; +use Getopt::Long; + +sub usage () { + die gettext("usage: ikiwiki-calendar [-f] your.setup [pagespec] [year]"), "\n"; +} + +my $force=0; +GetOptions( + "force" => \$force, +) || usage(); +my $setup=shift || usage(); +my $pagespec=shift || "*"; +my $year=shift || 1900+(localtime(time))[5]; + +%config=IkiWiki::defaultconfig(); +IkiWiki::Setup::load($setup); +IkiWiki::loadplugins(); +IkiWiki::checkconfig(); + +my $archivebase = 'archives'; +$archivebase = $config{archivebase} if defined $config{archivebase}; + +sub writearchive ($$;$) { + my $template=template(shift); + my $year=shift; + my $month=shift; + + my $page=defined $month ? "$year/$month" : $year; + + my $pagefile=newpagefile("$archivebase/$page", $config{default_pageext}); + $template->param(pagespec => $pagespec); + $template->param(year => $year); + $template->param(month => $month) if defined $month; + + if ($force || ! -e "$config{srcdir}/$pagefile") { + writefile($pagefile, $config{srcdir}, $template->output); + IkiWiki::rcs_add($pagefile) if $config{rcs}; + } +} + +IkiWiki::lockwiki(); + +foreach my $y ($year-1, $year, $year+1) { + writearchive("calendaryear.tmpl", $y); + foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) { + writearchive("calendarmonth.tmpl", $y, $m); + } +} + +IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) + if $config{rcs}; +IkiWiki::unlockwiki(); + +system("ikiwiki", "-setup", $setup, "-refresh"); diff --git a/templates/calendarmonth.tmpl b/templates/calendarmonth.tmpl new file mode 100644 index 000000000..37ad78c5c --- /dev/null +++ b/templates/calendarmonth.tmpl @@ -0,0 +1,3 @@ +[[!calendar type=month month= year= pages=""]] + +[[!inline pages="creation_month() and creation_year() and " show=0 feeds=no reverse=yes]] diff --git a/templates/calendaryear.tmpl b/templates/calendaryear.tmpl new file mode 100644 index 000000000..714bd6d47 --- /dev/null +++ b/templates/calendaryear.tmpl @@ -0,0 +1 @@ +[[!calendar type=year year= pages=""]] -- cgit v1.2.3 From 6993d1f905c35bbad415d3f60cde924da32e80a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Oct 2009 22:58:17 -0400 Subject: response --- doc/plugins/lockedit/discussion.mdwn | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'doc') diff --git a/doc/plugins/lockedit/discussion.mdwn b/doc/plugins/lockedit/discussion.mdwn index b058b2b07..8a08edaad 100644 --- a/doc/plugins/lockedit/discussion.mdwn +++ b/doc/plugins/lockedit/discussion.mdwn @@ -1,21 +1,8 @@ -This plugin not only locks pages but ensures too a user is logged in. This seems to me redundant with signedit. I propose : +This plugin not only locks pages but ensures too a user is logged in. This +seems to me redundant with signedit. I propose [removing the if block that +calls needsignin ]. - sub canedit ($$) { - my $page=shift; - my $cgi=shift; - my $session=shift; - - my $user=$session->param("name"); - return undef if defined $user && IkiWiki::is_admin($user); - - if (defined $config{locked_pages} && length $config{locked_pages} && - pagespec_match($page, $config{locked_pages}, - user => $session->param("name"), - ip => $ENV{REMOTE_ADDR}, - )) { - return sprintf(gettext("%s is locked and cannot be edited"), - htmllink("", "", $page, noimageinline => 1)); - } - - return undef; - } +> That was added because the most typical reason for being unable to edit a +> page is that you are not logged in. And without the jump to logging the +> user in, there is no way for the user to log in, without navigating away +> from the page they were trying to edit. --[[Joey]] -- cgit v1.2.3 From 1c6794f46a729eea8c7e7d49fcf7c6a54dae2ba9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Oct 2009 23:44:50 -0400 Subject: allow spans --- doc/ikiwiki-calendar.mdwn | 6 +++--- ikiwiki-calendar | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index e2cc612f3..3f5c6a29e 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -4,7 +4,7 @@ ikiwiki-calendar - create calendar archive pages # SYNOPSIS -ikiwiki-calendar [-f] your.setup [pagespec] [year] +ikiwiki-calendar [-f] your.setup [pagespec] [startyear [endyear]] # DESCRIPTION @@ -22,8 +22,8 @@ default is all pages. To limit it to only posts in a blog, use something like "posts/* and !*/Discussion". It defaults to creating calendar pages for the current -year, as well as the previous year, and the next year. -If you specify a year, it will create pages for that year. +year. If you specify a year, it will create pages for that year. +Specify a second year to create pages for a span of years. Existing pages will not be overwritten by this command by default. Use the `-f` switch to force it to overwrite any existing pages. diff --git a/ikiwiki-calendar b/ikiwiki-calendar index 074f0d6fd..a9548d6ec 100755 --- a/ikiwiki-calendar +++ b/ikiwiki-calendar @@ -15,7 +15,8 @@ GetOptions( ) || usage(); my $setup=shift || usage(); my $pagespec=shift || "*"; -my $year=shift || 1900+(localtime(time))[5]; +my $startyear=shift || 1900+(localtime(time))[5]; +my $endyear=shift || $startyear; %config=IkiWiki::defaultconfig(); IkiWiki::Setup::load($setup); @@ -43,7 +44,7 @@ sub writearchive ($$;$) { } } -foreach my $y ($year-1, $year, $year+1) { +foreach my $y ($startyear..$endyear) { writearchive("calendaryear.tmpl", $y); foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) { writearchive("calendarmonth.tmpl", $y, $m); -- cgit v1.2.3 From 7e7953f0e240bc0e9201942dd88a4f911904d151 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 12 Oct 2009 00:05:31 -0400 Subject: formatting --- doc/ikiwiki-calendar.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index 3f5c6a29e..982892fca 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -28,7 +28,7 @@ Specify a second year to create pages for a span of years. Existing pages will not be overwritten by this command by default. Use the `-f` switch to force it to overwrite any existing pages. -## CRONTAB +# CRONTAB While this command only needs to be run once a year to update the archive pages for each new year, you are recommended to set up -- cgit v1.2.3 From 6678ab8fb3c956ea52d08e546cea7c8e3204aefb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 12 Oct 2009 12:21:46 -0400 Subject: Added minimal default CSS for calendar plugin, just highlighting the current day. --- debian/changelog | 2 ++ doc/style.css | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index b9d1923cd..ef92e48fc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,8 @@ ikiwiki (3.2009XXXX) UNRELEASED; urgency=low * git: --getctime will now follow renames back to the original creation of a file. * calendar: Fix CSS for year calendar to match the plugin documentation. + * Added minimal default CSS for calendar plugin, just highlighting the + current day. -- Joey Hess Fri, 09 Oct 2009 19:53:50 -0400 diff --git a/doc/style.css b/doc/style.css index 4770fc942..be86a0818 100644 --- a/doc/style.css +++ b/doc/style.css @@ -403,7 +403,6 @@ span.color { } /* Used by the highlight plugin. */ - pre.hl { color:#000000; background-color:#ffffff; } .hl.num { color:#2928ff; } .hl.esc { color:#ff00ff; } @@ -419,3 +418,7 @@ pre.hl { color:#000000; background-color:#ffffff; } .hl.kwb { color:#830000; } .hl.kwc { color:#000000; font-weight:bold; } .hl.kwd { color:#010181; } + +/* For the calendar plugin. */ +.month-calendar-day-this-day { background-color: #eee; } +.year-calendar-this-month { background-color: #eee; } -- cgit v1.2.3 From 7272938a116b2c87f8c34057034b5f4e9244cdf8 Mon Sep 17 00:00:00 2001 From: Jogo Date: Mon, 12 Oct 2009 16:44:12 -0400 Subject: --- doc/plugins/lockedit/discussion.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/plugins/lockedit/discussion.mdwn b/doc/plugins/lockedit/discussion.mdwn index 8a08edaad..867fc6a51 100644 --- a/doc/plugins/lockedit/discussion.mdwn +++ b/doc/plugins/lockedit/discussion.mdwn @@ -6,3 +6,13 @@ calls needsignin ]. > page is that you are not logged in. And without the jump to logging the > user in, there is no way for the user to log in, without navigating away > from the page they were trying to edit. --[[Joey]] + +>> Ok, but the problem is that when you don't want any signin form you end up +>> with a lone login button. That might happend if you lock pages only on IP +>> adresses, if you use another cookie from another webapp... + +>> That happends to me and I had to reimplement lockedit in my private auth +>> plugin. + +>> Perhaps you could return undef on that case and let another plugin do the +>> needsignin call ? -- [[Jogo]] -- cgit v1.2.3 From 68433d82b88e93962561d6ddad8689984398def1 Mon Sep 17 00:00:00 2001 From: lnussel Date: Tue, 13 Oct 2009 05:09:37 -0400 Subject: add shortcut for novell bugzilla --- doc/shortcuts.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index b84d71c3d..54dd0fdb1 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -60,6 +60,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=man url="http://linux.die.net/man/%s"]] * [[!shortcut name=ohloh url="http://www.ohloh.net/projects/%s"]] * [[!shortcut name=cpanrt url="https://rt.cpan.org/Ticket/Display.html?id=%s" desc="CPAN RT#%s"]] +* [[!shortcut name=novellbug url="https://bugzilla.novell.com/show_bug.cgi?id=%s" desc="bug %s"]] To add a new shortcut, use the `shortcut` [[ikiwiki/directive]]. In the url, "%s" is replaced with the -- cgit v1.2.3 From 129bde667604a73e26fce2491dd5e431aef143af Mon Sep 17 00:00:00 2001 From: "http://jeremiahfoster.myopenid.com/" Date: Tue, 13 Oct 2009 13:35:44 -0400 Subject: Added a question about permissions. --- doc/setup/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/setup/discussion.mdwn b/doc/setup/discussion.mdwn index 0501f443a..32a8f6de2 100644 --- a/doc/setup/discussion.mdwn +++ b/doc/setup/discussion.mdwn @@ -1,3 +1,5 @@ +I have copied over the ikiwiki.setup file from /usr/share/doc/ikiwiki/ to /etc/ikiwiki/ and run it after editing. My site gets built but when I click on the 'edit' button, firefox and google chrome download the cgi file instead of creating a way to edit it. The permissions on my ikiwiki.cgi script look like this: -rwsr-sr-x 1 root root 13359 2009-10-13 19:21 ikiwiki.cgi. Is there something I should do, i.e. change permissions, so I can get it to run correctly? (jeremiah) + I just went through the standard procedure described for setup, copied the blog directory from examples into my source directory, ran ikiwiki, and everything seems to have worked, except that none of the [[!meta ... ]] tags get converted. They simply show up in the html files unformatted, with no exclamation point, and with p tags around them. Any ideas? using ikiwiki version 2.40 on freebsd --mjg -- cgit v1.2.3 From 7e326ebfce89b7e81b361afacefa361fd8919586 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 13 Oct 2009 13:57:39 -0400 Subject: update --- doc/todo/dependency_types.mdwn | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/todo/dependency_types.mdwn b/doc/todo/dependency_types.mdwn index 1c2f579b3..2bdf1d6a3 100644 --- a/doc/todo/dependency_types.mdwn +++ b/doc/todo/dependency_types.mdwn @@ -552,22 +552,16 @@ operators. Currently, this turns into roughly: `FailReason() & SuccessReason(patch)` Let's say that the glob instead returns a HardFailReason, which when -ANDed with another object, drops their influences. (But when ORed, combines -them.) Fixes the above, but does it always work? - -"(bugs/* or link(patch)) and backlink(index)" => -`( HardFailReason() | SuccessReason(page) ) & SuccessReason(index)`` => -`SuccessReason(page & SuccessReason(index)` => -SuccessReason(page, index) => right - -"(bugs/* and link(patch)) or backlink(index)" => -`( HardFailReason() & SuccessReason(page) ) | SuccessReason(index)`` => -`HardFailReason() | SuccessReason(index)` => -`SuccessReason(index)` => right - -"!bugs/* and link(patch)" => -`HardFailReason() | SuccessReason(bugs/foo)` => -`HardFailReason()` => right +ANDed with another object, blocks their influences. (But when ORed, +combines them.) + +Question: Are all pagespec terms that return reason objects w/o any +influence info, suitable to block influence in this way? + +To be suitable to block, a term should never change from failing to match a +page to successfully matching it, unless that page is directly changed in a +way that influences are not needed for ikiwiki to notice. But, if a term +did not meet these criteria, it would have an influence. QED. #### Influence types -- cgit v1.2.3 From 6ece984c39713117d356843ba8f71fb2beb47e91 Mon Sep 17 00:00:00 2001 From: Jogo Date: Tue, 13 Oct 2009 17:26:11 -0400 Subject: --- doc/setup/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/setup/discussion.mdwn b/doc/setup/discussion.mdwn index 32a8f6de2..1c5ad8260 100644 --- a/doc/setup/discussion.mdwn +++ b/doc/setup/discussion.mdwn @@ -1,5 +1,7 @@ I have copied over the ikiwiki.setup file from /usr/share/doc/ikiwiki/ to /etc/ikiwiki/ and run it after editing. My site gets built but when I click on the 'edit' button, firefox and google chrome download the cgi file instead of creating a way to edit it. The permissions on my ikiwiki.cgi script look like this: -rwsr-sr-x 1 root root 13359 2009-10-13 19:21 ikiwiki.cgi. Is there something I should do, i.e. change permissions, so I can get it to run correctly? (jeremiah) +> Have a look [[here|tips/dot_cgi]]. --[[Jogo]] + I just went through the standard procedure described for setup, copied the blog directory from examples into my source directory, ran ikiwiki, and everything seems to have worked, except that none of the [[!meta ... ]] tags get converted. They simply show up in the html files unformatted, with no exclamation point, and with p tags around them. Any ideas? using ikiwiki version 2.40 on freebsd --mjg -- cgit v1.2.3 From 7e25c2116cc2ababf7b099e1044dee619837dd23 Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Tue, 13 Oct 2009 20:51:43 -0400 Subject: .htaccess hack --- doc/plugins/rsync/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/rsync/discussion.mdwn b/doc/plugins/rsync/discussion.mdwn index 6bf7a3826..ef0fa9967 100644 --- a/doc/plugins/rsync/discussion.mdwn +++ b/doc/plugins/rsync/discussion.mdwn @@ -47,6 +47,8 @@ The wiki now lives on (1), and clicking "edit" just works. --[[schmonz]] >> a DVCS (of which I've got at least one other), and possibly for >> other uses not yet imagined. ;-) --[[schmonz]] +>>> I'm now using this plugin for an additional purpose. One of the aforementioned wikis (there are actually two) can only be read by trusted users, the list of which is kept in an `.htaccess` file. I added it to git as `htaccess.txt`, enabled the [[plugins/txt]] plugin, and in my `rsync_command` script, have it copied to the destdir as `.htaccess` before calling `rsync`. Now my users (who aren't tech-savvy, but are trustworthy) can edit the access list directly in the wiki. This idea might also be useful for wikis not using `rsync` at all. --[[schmonz]] + ---- Revew: --[[Joey]] -- cgit v1.2.3 From c82ca7aa56d0902bfc44687d54df53f4fab402ad Mon Sep 17 00:00:00 2001 From: "http://schmonz.livejournal.com/" Date: Tue, 13 Oct 2009 20:56:29 -0400 Subject: point to "rsync" .htaccess trick --- doc/todo/enable-htaccess-files.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn index e302a49ed..412cb5eba 100644 --- a/doc/todo/enable-htaccess-files.mdwn +++ b/doc/todo/enable-htaccess-files.mdwn @@ -59,3 +59,5 @@ It should be off by default of course. --Max --- +1 for various purposes (but sometimes the filename isn't `.htaccess`, so please make it configurable) --[[schmonz]] + +> I've described a workaround for one use case at the [[plugins/rsync]] [[plugins/rsync/discussion]] page. --[[schmonz]] -- cgit v1.2.3 From 143e2de17d084db00487ee4db67b7b0131ccc441 Mon Sep 17 00:00:00 2001 From: Chadius Date: Thu, 15 Oct 2009 09:26:05 -0400 Subject: Asking for a repost of page, as the link is broken. --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index e2eb56d47..1e6fc94a7 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -612,3 +612,5 @@ Mediawiki.pm - A plugin which supports mediawiki format. } 1 + +Hello. Got ikiwiki running and I'm planning to convert my personal Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone has an old copy of the instructions, or any advice on where to start I'd be glad to hear it. Otherwise I'm just going to chronicle my journey on the page.--[[users/Chadius]] -- cgit v1.2.3 From 4c3264cd46e48e3b3327e5b02689ad2eba6a53b9 Mon Sep 17 00:00:00 2001 From: "http://seanh.myopenid.com/" Date: Thu, 15 Oct 2009 11:54:59 -0400 Subject: --- ...working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn (limited to 'doc') diff --git a/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn new file mode 100644 index 000000000..a3cb0ae0b --- /dev/null +++ b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn @@ -0,0 +1,5 @@ +Hey, trying to get ikiwiki working on my account on a shared webserver. Actually installing ikiwiki on the server is phase 2. For now I'm running the latest ikiwiki (from source) locally, compiling the output with the ikiwiki command, then rsyncing the output dir up to the server. This works for the static HTML files, but the CGI file doesn't work, the server redirects to an error page. The error log on the server says "Premature end of script headers: /path/to/ikiwiki.cgi" + +My first thought was that this is a Perl CGI and I would need to change the shebang to point to the unusual location of Perl on this server, it's at /usr/pkg/bin/perl. But when I looked at ikiwiki.cgi I found it was a binary file. + +Why is it a binary? And what can I do about this error? -- cgit v1.2.3 From 3d268733a31fb3e8a27745a37ac12bf422acb3d8 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Thu, 15 Oct 2009 12:41:02 -0400 Subject: why the wrapper is a binary --- ...rking_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn index a3cb0ae0b..dc274c5b2 100644 --- a/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn +++ b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn @@ -3,3 +3,10 @@ Hey, trying to get ikiwiki working on my account on a shared webserver. Actually My first thought was that this is a Perl CGI and I would need to change the shebang to point to the unusual location of Perl on this server, it's at /usr/pkg/bin/perl. But when I looked at ikiwiki.cgi I found it was a binary file. Why is it a binary? And what can I do about this error? + +> It's a binary because it's SUID, so that it has permission to write to the ikiwiki repository. See [[security]], under 'suid wrappers', for more on that. +> +> As to why you get 'premature end of script headers', that suggests there is a problem running +> the script (and there is output occurring before the HTTP headers are printed). Do you have access +> to the webserver logs for your host? They might contain some clues. Are you sure that the webserver +> is setup for CGI properly? -- [[Jon]] -- cgit v1.2.3 From 5a41e6054a7b0782069e4da08a6ab47ffb352392 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 14:34:09 -0400 Subject: response3 --- ...my_server__44___and_it__39__s_a_binary_file__63__.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn index dc274c5b2..d0b4a9363 100644 --- a/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn +++ b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn @@ -10,3 +10,18 @@ Why is it a binary? And what can I do about this error? > the script (and there is output occurring before the HTTP headers are printed). Do you have access > to the webserver logs for your host? They might contain some clues. Are you sure that the webserver > is setup for CGI properly? -- [[Jon]] + +> Quite likely your laptop and your server do not run the same +> OS, so the wrapper binary cannot just be copied from one +> to the other and run. Also, the wrapper is just that, a +> thin wrapper which then runs ikiwiki. As ikiwiki is not +> yet installed on your server, that's another reason what +> you're trying can't work. +> +> If installing ikiwiki on the server is not possible or +> too much work right now, you could try building your wiki +> on your laptop with cgi disabled in the setup file. +> The result would be a static website that you could deploy to +> the server this way. Of course, it wouldn't be editable +> on the server, and other features that need the CGI would +> also be disabled. --[[Joey]] -- cgit v1.2.3 From bfbd0680ce29bcfd5a2a9772cee78b66dd9e48cd Mon Sep 17 00:00:00 2001 From: "http://seanh.myopenid.com/" Date: Thu, 15 Oct 2009 16:05:34 -0400 Subject: --- ...orking_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn index d0b4a9363..35db20dc8 100644 --- a/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn +++ b/doc/forum/Ikiwiki_CGI_not_working_on_my_server__44___and_it__39__s_a_binary_file__63__.mdwn @@ -25,3 +25,9 @@ Why is it a binary? And what can I do about this error? > the server this way. Of course, it wouldn't be editable > on the server, and other features that need the CGI would > also be disabled. --[[Joey]] + +> > Ah, ok thanks. Yes the server runs a different OS and ikiwiki +> > is not installed on it. I've got it working as a static site, +> > so if I want the CGI I'll have to install ikiwiki on the server. +> > Ok. It might not work as I don't have root access, but I might +> > give it a try. Thanks -- cgit v1.2.3 From 68aca6516a1c4b78991b5fc002c66efc5f012a0c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:42:46 -0400 Subject: add --- doc/tips/optimising_ikiwiki.mdwn | 155 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 doc/tips/optimising_ikiwiki.mdwn (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn new file mode 100644 index 000000000..fcf3077f8 --- /dev/null +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -0,0 +1,155 @@ +Is ikiwiki taking too long to build your wiki? Read on for some common +problems that can be avoided to make ikiwiki run quick. + +[[!toc]] + +## rebuild vs refresh + +Are you building your wiki by running a command like this? + + ikiwiki -setup my.setup + +If so, you're always telling ikiwiki to rebuild the entire site, from +scratch. But, ikiwiki is smart, it can incrementally update a site, +building only things affected by the changes you make. You just have to let +it do so: + + ikiwiki -setup my.setup -refresh + +Ikiwiki automatically uses an incremental refresh like this when handing +a web edit, or when run from a [[rcs]] post-commit hook. (If you've +configured the hook in the usual way.) Most people who have run into this +problem got in the habit of running `ikiwiki -setup my.setup` by hand +when their wiki was small, and found it got slower as they added pages. + +### use the latest version + +If your version of ikiwiki is not [[!verison]], try upgrading. New +optimisations are frequently added to ikiwiki, some of them yielding +*enormous* speed increases. + +### expensive inlines + +Do you have an archive page for your blog that shows all posts, +using an inline that looks like this? + + \[[!inline pages="blog/*" show=0]] + +Or maybe you have some tag pages for your blog that show all tagged posts, +something like this? + + \[[!inline pages="blog/* and tagged(foo)" show=0]] + +These are expensive, because they have to be updated whenever you modify a +matching page. And, if there are a lot of pages, it generates a large html +file, which is a lot of work. And also large RSS/Atom files, which is even +more work! + +To optimise the inline, consider enabling quick archive mode. Then the +inline will only need to be updated when new pages are added; no RSS +or Atom feeds will be built, and the generated html file will be much +smaller. + + \[[!inline pages="blog/*" show=0 archive=yes quick=yes]] + + \[[!inline pages="blog/* and link(tag)" show=0 archive=yes quick=yes]] + +Only downsides: This won't show titles set by the [[!ikiwiki/directive/meta]] +directive. And there's no RSS feed for users to use -- but if this page +is only for the archives or tag for your blog, users should be subscribing +to the blog's main page's RSS feed instead. + +For the main blog page, the inline should only show the latest N posts, +which won't be a performance problem: + + \[[!inline pages="blog/*" show=30]] + +## expensive maps + +Do you have a sitemap type page, that uses a map directive like this? + + \[[!map pages="*" show=title]] + +This is expensive because it has to be updated whenever a page is modified. +The resulting html file might get big and expensive to generate as you +keep adding pages. + +First, consider removing the "show=title". Then the map will not show page +titles set by the [[!ikiwiki/directive/meta]] directive -- but will also +only need to be generated when pages are added or removed, not for every +page change. + +Consider limiting the map to only show the toplevel pages of your site, +like this: + + \[[!map pages="* and !*/*" show=title]] + +Or, alternatively, to drop from the map parts of the site that accumulate +lots of pages, like individual blog posts: + + \[[!map pages="* and !blog/*" show=title]] + +## sidebar issues + +If you enable the [[plugins/sidebar]] plugin, be careful of what you put in +your sidebar. Any change that affects what is displayed by the sidebar +will require an update of *every* page in the wiki, since all pages include +the sidebar. + +Putting an expensive map or inline in the sidebar is the most common cause +of problems. At its worst, it can result in any change to any page in the +wiki requiring every page to be rebuilt. + +## avoid htmltidy + +A few plugins do neat stuff, but slowly. Such plugins are tagged +[[plugins/type/slow]]. + +The worst offender is possibly [[plugins/htmltidy]]. This runs an external +`tidy` program on each page that is built, which is necessarily slow. So don't +use it unless you really need it; consider using the faster +[[plugins/htmlbalance]] instead. + +## be careful of large linkmaps + +[[plugins/Linkmap]] generates a cool map of links between pages, but +it does it using the `graphviz` program. And any changes to links between +pages on the map require an update. So, avoid using this to map a large number +of pages with frequently changing links. For example, using it to map +all the pages on a traditional, highly WikiLinked wiki, is asking for things +to be slow. But using it to map a few related pages is probably fine. + +This site's own [[plugins/linkmap]] rarely slows it down, because it +only shows the [[index]] page, and the small set of pages that link to it. +That is accomplished as follows: + + \[!linkmap pages="index or (backlink(index)"]] + +## overhead of the search plugin + +Be aware that the [[plugins/search]] plugin has to update the search index +whenever any page is changed. This can slow things down somewhat. + +## scaling to large numbers of pages + +Finally, let's think about how huge number of pages can affect ikiwiki. + +* Every time it's run, ikiwiki has to scan your `srcdir` to find + new and changed pages. This is similar in speed to running the `find` + command. Obviously, more files will make it take longer. + +* Also, to see what pages match a [[ikiwiki/PageSpec]] like "blog/*", it has + to check if every page in the wiki matches. These checks are done quite + quickly, but still, lots more pages will make PageSpecs more expensive. + +* The backlinks calculation has to consider every link on every page + in the wiki. (In practice, most pages only like to at most a few dozen + other pages, so this is not a `O(N^2)`, but closer to `O(N)`.) + +* Ikiwiki also reads and writes an `index` file, which contains information + about each page, and so if you have a lot of pages, this file gets large, + and more time is spent on it. For a wiki with 2000 pages, this file + will run about 500 kb. + +If your wiki will have 100 thousand files in it, you might start seeing +the above contribute to ikiwiki running slowly. -- cgit v1.2.3 From 4be470a2194aff09056570718d530d103ea2bc45 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:49:05 -0400 Subject: update --- doc/tips/optimising_ikiwiki.mdwn | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index fcf3077f8..579157291 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -1,8 +1,18 @@ -Is ikiwiki taking too long to build your wiki? Read on for some common -problems that can be avoided to make ikiwiki run quick. +Ikiwiki is a wiki compiler, which means that, unlike a traditional wiki, +all the work needed to display your wiki is done up front. Where you can +see it and get annoyed at it. In some ways, this is better than a wiki +where a page view means running a program to generate the page on the fly. + +But enough excuses. If ikiwiki is taking too long to build your wiki, +let's fix that. Read on for some common problems that can be avoided to +make ikiwiki run quick. [[!toc]] +(And if none of that helps, file a [[bug|bugs]]. One other great thing about +ikiwiki being a wiki compiler is that it's easy to provide a test case when +it's slow, and get the problem fixed!) + ## rebuild vs refresh Are you building your wiki by running a command like this? @@ -22,13 +32,13 @@ configured the hook in the usual way.) Most people who have run into this problem got in the habit of running `ikiwiki -setup my.setup` by hand when their wiki was small, and found it got slower as they added pages. -### use the latest version +## use the latest version If your version of ikiwiki is not [[!verison]], try upgrading. New optimisations are frequently added to ikiwiki, some of them yielding *enormous* speed increases. -### expensive inlines +## expensive inlines Do you have an archive page for your blog that shows all posts, using an inline that looks like this? -- cgit v1.2.3 From 19ec5c22599f15b9a3dc5246bea4e8f09ec94180 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:50:40 -0400 Subject: typo --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 579157291..e3973733f 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -133,7 +133,7 @@ This site's own [[plugins/linkmap]] rarely slows it down, because it only shows the [[index]] page, and the small set of pages that link to it. That is accomplished as follows: - \[!linkmap pages="index or (backlink(index)"]] + \[[!linkmap pages="index or (backlink(index)"]] ## overhead of the search plugin -- cgit v1.2.3 From 31ec3a7570061e371e0011831308f88ff0887bb8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 18:51:29 -0400 Subject: typo --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index e3973733f..6d0997603 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -34,7 +34,7 @@ when their wiki was small, and found it got slower as they added pages. ## use the latest version -If your version of ikiwiki is not [[!verison]], try upgrading. New +If your version of ikiwiki is not [[!version]], try upgrading. New optimisations are frequently added to ikiwiki, some of them yielding *enormous* speed increases. -- cgit v1.2.3 From cd5bf7eb7f74c2414a87c77141ed0c502ff7f464 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Thu, 15 Oct 2009 23:16:52 -0400 Subject: comments after trying to implement joey's idea --- doc/plugins/contrib/album/discussion.mdwn | 134 ++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 15 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 5c8e74fa6..156cd7ad8 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -68,6 +68,9 @@ code or tried it yet, but here goes. --[[Joey]] > you (since the requirements for that CGI interface change depending > on the implementation). I agree that this is ugly, though. -s +>> Would you accept a version where the albumimage "viewer" pages +>> could be 0 bytes long, at least until metadata gets added? -s + * With each viewer page having next/prev links, I can see how you were having the scalability issues with ikiwiki's data structures earlier! @@ -80,7 +83,7 @@ code or tried it yet, but here goes. --[[Joey]] >> these can be presence dependencies, which will probably help with >> avoiding rebuilds of a page if the next/prev page is changed. >> (Unless you use img to make the thumbnails for those links, then it ->> would rebuild the thumbnails anyway. Have not looked at the code.) --[[Joey]] +>> would rebuild the thumbnails anyway. Have not looked at the code.) --[[Joey]] * And doesn't each viewer page really depend on every other page in the same albumsection? If a new page is added, the next/prev links @@ -108,6 +111,11 @@ code or tried it yet, but here goes. --[[Joey]] >> metadata. Er, I mean, I have a cheezy hack in `add_depends` now that does >> it to deal with a similar case. --[[Joey]] +>>> I think I was misunderstanding how early you have to call `add_depends`? +>>> The critical thing I missed was that if you're scanning a page, you're +>>> going to rebuild it in a moment anyway, so it doesn't matter if you +>>> have no idea what it depends on until the rebuild phase. -s + * One thing I do like about having individual pages per image is that they can each have their own comments, etc. @@ -121,9 +129,25 @@ code or tried it yet, but here goes. --[[Joey]] album. Think tags. So it seems it would be better to have the album directive control what pages it includes (a la inline). -> See note above about pagespecs not being very safe early on. -> You did merge my inline-with-pagenames feature, which is safe to use -> at scan time, though. +> I'm inclined to fix this by constraining images to be subpages of exactly +> one album: if they're subpages of 2+ nested albums then they're only +> considered to be in the deepest-nested one (i.e. longest URL), and if +> they're not in any album then that's a usage error. This would +> also make prev/next links sane. +> +> If you want to reference images from elsewhere in the wiki and display +> them as if in an album, then you can use an ordinary inline with +> the same template that the album would use, and I'll make sure the +> templates are set up so this works. +> +> (Implementation detail: this means that an image X/Y/Z/W/V, where X and +> Y are albums, Z does not exist and W exists but is not an album, +> would have a content dependency on Y, a presence dependency on Z +> and a content dependency on W.) +> +> Perhaps I should just restrict to having the album images be direct +> subpages of the album, although that would mean breaking some URLs +> on the existing website I'm doing all this work for... -s * Putting a few of the above thoughts together, my ideal album system seems to be one where I can just drop the images into a directory and @@ -137,15 +161,57 @@ code or tried it yet, but here goes. --[[Joey]] > Putting a JPEG in the web form is not an option from my point of > view :-) but perhaps there could just be a "web-editable" flag supplied > by plugins, and things could be changed to respect it. -> + +>> Replying to myself: would you accept patches to support +>> `hook(type => 'htmlize', editable => 0, ...)` in editpage? This would +>> essentially mean "this is an opaque binary: you can delete it +>> or rename it, and it might have its own special editing UI, but you +>> can never get it in a web form". +>> +>> On the other hand, that essentially means we need to reimplement +>> editpage in order to edit the sidecar files that contain the metadata. +>> Having already done one partial reimplementation of editpage (for +>> comments) I'm in no hurry to do another. +>> +>> I suppose another possibility would be to register hook +>> functions to be called by editpage when it loads and saves the +>> file. In this case, the loading hook would be to discard +>> the binary and use filter() instead, and the saving conversion +>> would be to write the edited content into the metadata sidecar +>> (creating it if necessary). +>> +>> I'd also need to make editpage (and also comments!) not allow the +>> creation of a file of type albumjpg, albumgif etc., which is something +>> I previously missed; and I'd need to make attachment able to +>> upload-and-rename. +>> -s + > In a way, what you really want for metadata is to have it in the album > page, so you can batch-edit the whole lot by editing one file (this > does mean that editing the album necessarily causes each of its viewers > to be rebuilt, but in practice that happens anyway). -s -> ->> Yes, that would make some sense.. It also allows putting one image in ->> two albums, with different caption etc. (Maybe for different audiences.) + +>> Replying to myself: in practice that *doesn't* happen anyway. Having +>> the metadata in the album page is somewhat harmful because it means +>> that changing the title of one image causes every viewer in the album +>> to be rebuilt, whereas if you have a metadata file per image, only +>> the album itself, plus the next and previous viewers, need +>> rebuilding. So, I think a file per image is the way to go. >> +>> Ideally we'd have some way to "batch-edit" the metadata of all +>> images in an album at once, except that would make conflict +>> resolution much more complicated to deal with; maybe just +>> give up and scream about mid-air collisions in that case? +>> (That's apparently good enough for Bugzilla, but not really +>> for ikiwiki). -s + +>> Yes, [all metadata in one file] would make some sense.. It also allows putting one image in +>> two albums, with different caption etc. (Maybe for different audiences.) +>> --[[Joey]] + +>>> Eek. No, that's not what I had in mind at all; the metadata ends up +>>> in the "viewer" page, so it's necessarily the same for all albums. -s + >> It would probably be possible to add a new dependency type, and thus >> make ikiwiki smart about noticing whether the metadata has actually >> changed, and only update those viewers where it has. But the dependency @@ -164,23 +230,26 @@ mushroom and snake. > etc as the htmlize extensions. May need some fixes to ikiwiki to support > that. --[[Joey]] +>> foo.albumjpg (etc.) for images, and foo._albummeta (with +>> `keepextension => 1`) for sidecar metadata files, seems viable. -s + Files in git repo: * index.mdwn * memes.mdwn -* memes/badger.albumimage (a renamed JPEG) +* memes/badger.albumjpg (a renamed JPEG) * memes/badger/comment_1._comment * memes/badger/comment_2._comment -* memes/mushroom.albumimage (a renamed GIF) -* memes/mushroom.meta (sidecar file with metadata) -* memes/snake.albumimage (a renamed video) +* memes/mushroom.albumgif (a renamed GIF) +* memes/mushroom._albummeta (sidecar file with metadata) +* memes/snake.albummov (a renamed video) Files in web content: * index.html * memes/index.html * memes/96x96-badger.jpg (from img) -* memes/96x96-mushroom.jpg (from img) +* memes/96x96-mushroom.gif (from img) * memes/96x96-snake.jpg (from img, hacked up to use totem-video-thumbnailer :-) ) * memes/badger/index.html (including comments) * memes/badger.jpg @@ -200,10 +269,28 @@ way to get them rendered anyway. > the image, as well as eg, smiley trying to munge it in sanitize. > --[[Joey]] +>> As long as nothing has a filter() hook that assumes it's already +>> text... filters are run in arbitrary order. We seem to be OK so far +>> though. +>> +>> If this is the route I take, I propose to have the result of filter() +>> be the contents of the sidecar metadata file (empty string if none), +>> with the `\[[!albumimage]]` directive (which no longer requires +>> arguments) prepended if not already present. This would mean that +>> meta directives in the metadata file would work as normal, and it +>> would be possible to insert text both before and after the viewer +>> if desired. The result of filter() would also be a sensible starting +>> point for editing, and the result of editing could be diverted into +>> the metadata file. -s + do=edit&page=memes/badger needs to not put the JPG in a text box: somehow divert or override the normal edit CGI by telling it that .albumimage files are not editable in the usual way? +> Something I missed here is that editpage also needs to be told that +> creating new files of type albumjpg, albumgif etc. is not allowed +> either! -s + Every image needs to depend on, and link to, the next and previous images, which is a bit tricky. In previous thinking about this I'd been applying the overly strict constraint that the ordered sequence of pages in each @@ -217,6 +304,9 @@ in order. > memoization to avoid each image in an album building the same list. > I sense that I may be missing a subtelty though. --[[Joey]] +>> I think I was misunderstanding how early you have to call `add_depends` +>> as mentioned above. -s + Perhaps restricting to "the images in an album A must match A/*" would be useful; then the unordered superset could just be "A/*". Your "albums via tags" idea would be nice too though, particularly for feature @@ -233,6 +323,9 @@ album, or something? > Ugh, yeah, that is a problem. Perhaps wanting to support that was just > too ambitious. --[[Joey]] +>> I propose to restrict to having images be subpages of albums, as +>> described above. -s + Requiring renaming is awkward for non-technical Windows/Mac users, with both platforms' defaults being to hide extensions; however, this could be circumvented by adding some sort of hook in attachment to turn things into @@ -244,13 +337,24 @@ extensions visible is a "don't do that then" situation :-) > with an extension. (Or allow specifying a full pagespec, > but I hesitate to seriously suggest that.) --[[Joey]] +>> I think that might be a terrifying idea for another day. If we can +>> mutate the extension during the `attach` upload, that'd be enough; +>> I don't think people who are skilled enough to use git/svn/..., +>> but not skilled enough to tell Explorer to show file extensions, +>> represent a major use case. -s + Ideally attachment could also be configured to upload into a specified underlay, so that photos don't have to be in your source-code control (you might want that, but I don't!). +> Replying to myself: perhaps best done as an orthogonal extension +> to attach? -s + Things that would be nice, and are probably possible: * make the "Edit page" link on viewers divert to album-specific CGI instead - of just failing or not appearing + of just failing or not appearing (probably possible via pagetemplate) + * some way to deep-link to memes/badger.jpg with a wikilink, without knowing a - priori that it's secretly a JPEG + priori that it's secretly a JPEG (probably harder than it looks - you'd + have to make a directive for it and it's probably not worth it) -- cgit v1.2.3 From 969ce8c5f889f8f2696c3ed4995f021b2a6539e1 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Thu, 15 Oct 2009 23:22:18 -0400 Subject: add a bit more attribution so it's clearer what Joey wrote --- doc/plugins/contrib/album/discussion.mdwn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 156cd7ad8..50d6c8ddd 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -60,7 +60,7 @@ code or tried it yet, but here goes. --[[Joey]] * Needing to create the albumimage "viewer" pages for each photo seems like it will become a pain. Everyone will need to come up with their own automation for it, and then there's the question - of how to automate it when uploading attachments. + of how to automate it when uploading attachments. -J > There's already a script (ikiwiki-album) to populate a git > checkout with skeleton "viewer" pages; I was planning to make a @@ -73,7 +73,7 @@ code or tried it yet, but here goes. --[[Joey]] * With each viewer page having next/prev links, I can see how you were having the scalability issues with ikiwiki's data structures - earlier! + earlier! -J > Yeah, I think they're a basic requirement from a UI point of view > though (although they don't necessarily have to be full wikilinks). @@ -88,7 +88,7 @@ code or tried it yet, but here goes. --[[Joey]] * And doesn't each viewer page really depend on every other page in the same albumsection? If a new page is added, the next/prev links may need to be updated, for example. If so, there will be much - unnecessary rebuilding. + unnecessary rebuilding. -J > albumsections are just a way to insert headings into the flow of > photos, so they don't actually affect dependencies. @@ -117,7 +117,7 @@ code or tried it yet, but here goes. --[[Joey]] >>> have no idea what it depends on until the rebuild phase. -s * One thing I do like about having individual pages per image is - that they can each have their own comments, etc. + that they can each have their own comments, etc. -J > Yes; also, they can be wikilinked. I consider those to be > UI requirements. -s @@ -127,7 +127,7 @@ code or tried it yet, but here goes. --[[Joey]] album, but then anyone who can write to any other page on the wiki can add an image to it. 2: I may want an image to appear in more than one album. Think tags. So it seems it would be better to have the album - directive control what pages it includes (a la inline). + directive control what pages it includes (a la inline). -J > I'm inclined to fix this by constraining images to be subpages of exactly > one album: if they're subpages of 2+ nested albums then they're only @@ -156,7 +156,7 @@ code or tried it yet, but here goes. --[[Joey]] etc. (Real pity we can't just put arbitrary metadata into the images themselves.) This is almost pointing toward making the images first-class wiki page sources. Hey, it worked for po! :) But the metadata and editing - problems probably don't really allow that. + problems probably don't really allow that. -J > Putting a JPEG in the web form is not an option from my point of > view :-) but perhaps there could just be a "web-editable" flag supplied -- cgit v1.2.3 From bc4b8e4e239e56fedcc3cf065f7c6cbd224f7525 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Thu, 15 Oct 2009 23:27:53 -0400 Subject: not another hidden requirement... --- doc/plugins/contrib/album/discussion.mdwn | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 50d6c8ddd..9720589b4 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -69,7 +69,16 @@ code or tried it yet, but here goes. --[[Joey]] > on the implementation). I agree that this is ugly, though. -s >> Would you accept a version where the albumimage "viewer" pages ->> could be 0 bytes long, at least until metadata gets added? -s +>> could be 0 bytes long, at least until metadata gets added? +>> +>> The more I think about the "binaries as first-class pages" approach, +>> the more subtle interactions I notice with other plugins. I +>> think I'm up to needing changes to editpage, comments, attachment +>> and recentchanges, plus adjustments to img and Render (to reduce +>> duplication when thumbnailing an image with a strange extension +>> while simultaneously changing the extension, and to hardlink/copy +>> an image with a strange extension to a differing target filename +>> with the normal extension, respectively). -s * With each viewer page having next/prev links, I can see how you were having the scalability issues with ikiwiki's data structures @@ -350,6 +359,10 @@ underlay, so that photos don't have to be in your source-code control > Replying to myself: perhaps best done as an orthogonal extension > to attach? -s +> Yet another non-obvious thing this design would need to do is to find +> some way to have each change to memes/badger._albummeta show up as a +> change to memes/badger in `recentchanges`. -s + Things that would be nice, and are probably possible: * make the "Edit page" link on viewers divert to album-specific CGI instead -- cgit v1.2.3 From e59ba3a11326bbce1c31b0e86ebb28980cbcced3 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Fri, 16 Oct 2009 03:14:03 -0400 Subject: minor: tiny rendering error --- doc/bugs/minor:_tiny_rendering_error.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/bugs/minor:_tiny_rendering_error.mdwn (limited to 'doc') diff --git a/doc/bugs/minor:_tiny_rendering_error.mdwn b/doc/bugs/minor:_tiny_rendering_error.mdwn new file mode 100644 index 000000000..5131e61fa --- /dev/null +++ b/doc/bugs/minor:_tiny_rendering_error.mdwn @@ -0,0 +1 @@ +`\[[!inline]]` is rendered with a space in front of the first closing bracket. --[[tschwinge]] -- cgit v1.2.3 From 002b6d2c41300052a056f4f95f417d5d0667f5ce Mon Sep 17 00:00:00 2001 From: tschwinge Date: Fri, 16 Oct 2009 03:19:55 -0400 Subject: shortcuts: local file. --- doc/plugins/shortcut/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/plugins/shortcut/discussion.mdwn b/doc/plugins/shortcut/discussion.mdwn index 4e11ce08c..2e2b1b281 100644 --- a/doc/plugins/shortcut/discussion.mdwn +++ b/doc/plugins/shortcut/discussion.mdwn @@ -9,4 +9,10 @@ Maybe use the `default_pageext` is better than hardcode .mdwn? > done, it will use `default_pageext` now --[[Joey]] +--- +Instead of modifying the [[basewiki]]'s [[shortcuts]] file for local needs -- +thus copying it at some point and losing continuity with upstream enhancements -- +what about handling a `shortcuts-local.mdwn` or `shortcuts/local.mdwn` (if such +a file exists in the wiki), and additionally process that one. Possibily a +conditional `\[[!inline]]` could be used. --[[tschwinge]] -- cgit v1.2.3 From 6823a51f42a268ba124b287208af7659704ec7d5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 10:53:05 +0200 Subject: Handling non-existing pages in parentlinks. --- doc/bugs/non-existing_pages_in_parentlinks.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/non-existing_pages_in_parentlinks.mdwn (limited to 'doc') diff --git a/doc/bugs/non-existing_pages_in_parentlinks.mdwn b/doc/bugs/non-existing_pages_in_parentlinks.mdwn new file mode 100644 index 000000000..532b0acca --- /dev/null +++ b/doc/bugs/non-existing_pages_in_parentlinks.mdwn @@ -0,0 +1,5 @@ + does not exist. +Then, on +, in the +*parentlinks* line, *writing* links to the top-level *index* file. It should +rather not link anywhere at all. -- cgit v1.2.3 From 3e2f99cba10e2bf9194a5788b4174844aeb566e3 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:01:22 +0200 Subject: A list of stuff that would be nice to work on for enhancing the GNU Hurd web pages. --- doc/users/tschwinge.mdwn | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index bb5cef6a6..5953cf802 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -9,3 +9,64 @@ web pages and previous wiki pages to a *[[ikiwiki]]* system; and all that while preserving the previous content's history, which was stored in a CVS repository for the HTML web pages and a TWiki RCS repository for the wiki; see . + +# Issues to Work On + +## Stability of Separate Builds + +The goal is that separate builds of the same source files should yield the +exactly same HTML code (of course, except for changes due to differences in +Markdown rendering, for example). + + * Timestamps -- [[forum/ikiwiki__39__s_notion_of_time]], [[forum/How_does_ikiwiki_remember_times__63__]] + + Git set's the current *mtime* when checking out files. The result is that + and + show different *Last + edited* timestamps. + + This can either be solved by adding a facility to Git to set the + checked-out files' *mtime* according to the *AuthorDate* / *CommitDate* + (which one...), or doing that retroactively with the + script before building, or + with a ikiwiki-internal solution. + + * HTML character entities + + + +## Tags -- [[bugs/tagged__40____41___matching_wikilinks]] + +Tags should be a separate concept from wikilinks. + +### \[[!map]] behavior + +The \[[!map]] on, for example, +, should not show +the complete hierarchy of pages, but instead just the pages that actually *do* +contain the \[[!tag open_issue_hurd]]. + +## Anchors -- [[ikiwiki/wikilink/discussion]] + +## Default Content for Meta Values -- [[plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__]] + +This will decrease to be relevant, as we're going to add copyright and +licensing headers to every single file. + +## Texinfo -- [[plugins/contrib/texinfo]] + +Not very important. + +## Shortcuts -- [[plugins/shortcut/discussion]] + +## \[[!meta redir]] -- [[todo/__42__forward__42__ing_functionality_for_the_meta_plugin]] + +Implement a checker that makes sure that no pages that use \[[!meta redir]] +redirect to another page (and are thus considered legacy pages for providing +stable URLs, for example) are linked to from other wiki pages. This is useful +w.r.t. backlinks. Alternative, the backlinks to the \[[!meta redir]]-using +pages could perhaps be passed on to the referred-to page? + +## Sendmail -- [[todo/passwordauth:_sendmail_interface]] + +## Parentlinks -- [[bugs/non-existing_pages_in_parentlinks]] -- cgit v1.2.3 From 7d76e36edd27663ae7fca653f36a08a63cb36c50 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:05:51 +0200 Subject: Issue with [[!meta date]] / [[!meta updated]] vs. RSS / Atom feeds? --- doc/users/tschwinge.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 5953cf802..0fe09696b 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -70,3 +70,9 @@ pages could perhaps be passed on to the referred-to page? ## Sendmail -- [[todo/passwordauth:_sendmail_interface]] ## Parentlinks -- [[bugs/non-existing_pages_in_parentlinks]] + +## Unverified -- these may be bugs, but have yet to be verified + + * ikiwiki doesn't change its internal database when \[[!meta date]] / + \[[!meta updated]] are added / removed, and thusly these meta values are + not promulgated in RSS / Atom feeds. -- cgit v1.2.3 From b94d9589d39dfa720231fb982340741a139478cf Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:11:59 +0200 Subject: Issue with ``no text was copied in this page'' in RSS feeds? --- doc/users/tschwinge.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 0fe09696b..306338ae4 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -76,3 +76,8 @@ pages could perhaps be passed on to the referred-to page? * ikiwiki doesn't change its internal database when \[[!meta date]] / \[[!meta updated]] are added / removed, and thusly these meta values are not promulgated in RSS / Atom feeds. + + * Complicated issue w.r.t. *no text was copied in this page* + ([[plugins/cutpaste]]) in RSS feed (only; not Atom?) under some conditions + (refresh only, but not rebuild?). Perhaps missing to read in / parse some + files? -- cgit v1.2.3 From ab68f96494409e4ce8f689b5c27ef9ea3a73172c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:12:28 +0200 Subject: Discussion pages of Discussion pages (etc.)? --- doc/users/tschwinge.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 306338ae4..657de85f3 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -71,6 +71,12 @@ pages could perhaps be passed on to the referred-to page? ## Parentlinks -- [[bugs/non-existing_pages_in_parentlinks]] +## Discussion Pages of Discussion Pages of... + +Is it useful to have Discussion pages of Discussion pages (etc.)? -- On +, +this possibility is offered. + ## Unverified -- these may be bugs, but have yet to be verified * ikiwiki doesn't change its internal database when \[[!meta date]] / -- cgit v1.2.3 From 07b28cfcf98c40d1c45276b18d09aab3fa491103 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:24:21 +0200 Subject: TODO: How to preview changes before git://... commit. --- doc/todo/preview_changes_before_git_commit.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/todo/preview_changes_before_git_commit.mdwn (limited to 'doc') diff --git a/doc/todo/preview_changes_before_git_commit.mdwn b/doc/todo/preview_changes_before_git_commit.mdwn new file mode 100644 index 000000000..e0e6ba866 --- /dev/null +++ b/doc/todo/preview_changes_before_git_commit.mdwn @@ -0,0 +1,7 @@ +ikiwiki allows to commit changes to the doc wiki over the `git://...` protocol. +It would be nice if there'd be a uniform way to view these changes before `git +push`ing. For the GNU Hurd's web pages, we include a *render_locally* script, +, with instructions on +, section +*Preview Changes*. With ikiwiki, one can use `make docwiki`, but that excludes +a set of pages, as per `docwiki.setup`. --[[tschwinge]] -- cgit v1.2.3 From a91bfd55069a0131d46937a8ef9eedc38e8d6de9 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:25:23 +0200 Subject: Sign. --- doc/bugs/non-existing_pages_in_parentlinks.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/non-existing_pages_in_parentlinks.mdwn b/doc/bugs/non-existing_pages_in_parentlinks.mdwn index 532b0acca..b4ea42b17 100644 --- a/doc/bugs/non-existing_pages_in_parentlinks.mdwn +++ b/doc/bugs/non-existing_pages_in_parentlinks.mdwn @@ -2,4 +2,4 @@ Then, on , in the *parentlinks* line, *writing* links to the top-level *index* file. It should -rather not link anywhere at all. +rather not link anywhere at all. --[[tschwinge]] -- cgit v1.2.3 From 027d28a6a1795b5b1b81aa381793f225682cc0e5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:28:06 +0200 Subject: Link to the forum from the top-level page. --- doc/index.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 93526c42c..732cf7a89 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -20,6 +20,7 @@ ikiwiki [[!version ]]. ## developer resources The [[RoadMap]] describes where the project is going. +The [[forum]] is open for discussions. [[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] can be submitted and tracked using this wiki. -- cgit v1.2.3 From 3cf62292e11f0a8809f9f53f1be77acd80d0fb43 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:33:42 +0200 Subject: Forum: discussion about the ever-growing list of pages. --- doc/forum/ever-growing_list_of_pages.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/forum/ever-growing_list_of_pages.mdwn (limited to 'doc') diff --git a/doc/forum/ever-growing_list_of_pages.mdwn b/doc/forum/ever-growing_list_of_pages.mdwn new file mode 100644 index 000000000..84b9fe6ee --- /dev/null +++ b/doc/forum/ever-growing_list_of_pages.mdwn @@ -0,0 +1,12 @@ +What is overyone's idea about the ever-growing list of pages in bugs/ etc.? +Once linked to `done`, they're removed from the rendered [[bugs]] page -- but +they're still present in the repository. + +Shouldn't there be some clean-up at some point for those that have been +resolved? Or should all of them be kept online forever? + +Likewise, for example in [[forum/ikiwiki__39__s_notion_of_time]], should one +remove the text about the implementation bug that has been fixed, or should it +stay there, for reference? + +--[[tschwinge]] -- cgit v1.2.3 From 9da02428d4f62f84bdadc15f6aadf553a9d16c58 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:40:35 +0200 Subject: Appetizer for the inline plugin? --- doc/users/tschwinge.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 657de85f3..54614e922 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -77,6 +77,16 @@ Is it useful to have Discussion pages of Discussion pages (etc.)? -- On , this possibility is offered. +## Modifying [[plugins/inline]] for showing only an *appetizer* + +Currently ikiwiki's inline plugin will either show the full page or nothing of +it. Often that's too much. One can manually use the [[plugins/toggle]] plugin +-- see the *News* section on . Adding a new +mode to the inline plugin to only show an *appetizer* ending with *... (read +on)* after a customizable amount of characters (or lines) would be a another +possibility. The *... (read on)* would then either toggle the full content +being displayed or link to the complete page. + ## Unverified -- these may be bugs, but have yet to be verified * ikiwiki doesn't change its internal database when \[[!meta date]] / -- cgit v1.2.3 From 0a2e4e167dc0a6b9fc0b038c4174694117b74628 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Fri, 16 Oct 2009 10:44:14 +0100 Subject: substantially expand the mediawiki tip with some of the steps. More to come --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 101 +++++++++++++++++++++++++++-- 1 file changed, 97 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index f03703b46..c522eaec3 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -1,4 +1,97 @@ -[[sabr]] explains how to [import MediaWiki content into -git](http://u32.net/Mediawiki_Conversion/index.html?updated), including -full edit hostory. The [[plugins/contrib/mediawiki]] plugin can then be -used by ikiwiki to build the wiki. +Mediawiki is a dynamically-generated wiki which stores it's data in a +relational database. Pages are marked up using a proprietary markup. It is +possible to import the contents of a Mediawiki site into an ikiwiki, +converting some of the Mediawiki conventions into Ikiwiki ones. + +The following instructions describe ways of obtaining the current version of +the wiki. We do not yet cover importing the history of edits. + +## Step 1: Getting a list of pages + +The first bit of information you require is a list of pages in the Mediawiki. +There are several different ways of obtaining these. + +### Parsing the output of `Special:Allpages` + +Mediawikis have a special page called `Special:Allpages` which list all the +pages for a given namespace on the wiki. + +If you fetch the output of this page to a local file with something like + + wget -q -O tmpfile 'http://your-mediawiki/wiki/Special:Allpages' + +You can extract the list of page names using the following python script. Note +that this script is sensitive to the specific markup used on the page, so if +you have tweaked your mediawiki theme a lot from the original, you will need +to adjust this script too: + + from xml.dom.minidom import parse, parseString + + dom = parse(argv[1]) + tables = dom.getElementsByTagName("table") + pagetable = tables[-1] + anchors = pagetable.getElementsByTagName("a") + for a in anchors: + print a.firstChild.toxml().\ + replace('&,'&').\ + replace('<','<').\ + replace('>','>') + +Also, if you have pages with titles that need to be encoded to be represented +in HTML, you may need to add further processing to the last line. + +### Querying the database + +If you have access to the relational database in which your mediawiki data is +stored, it is possible to derive a list of page names from this. + +## Step 2: fetching the page data + +Once you have a list of page names, you can fetch the data for each page. + +### Method 1: via HTTP and `action=raw` + +You need to create two derived strings from the page titles already: the +destination path for the page and the source URL. Assuming `$pagename` +contains a pagename obtained above, and `$wiki` contains the URL to your +mediawiki's `index.php` file: + + src=`echo "$pagename" | tr ' ' _ | sed 's,&,&,g'` + dest=`"$pagename" | tr ' ' _ | sed 's,&,__38__,g'` + + mkdir -p `dirname "$dest"` + wget -q "$wiki?title=$src&action=raw" -O "$dest" + +### Method 2: via HTTP and `Special:Export` + +Mediawiki also has a special page `Special:Export` which can be used to obtain +the source of the page and other metadata such as the last contributor, or the +full history, etc. + +You need to send a `POST` request to the `Special:Export` page. See the source +of the page fetched via `GET` to determine the correct arguments. + +You will then need to write an XML parser to extract the data you need from +the result. + +### Method 3: via the database + +It is possible to extract the page data from the database with some +well-crafted queries. + +## Step 2: format conversion + +The next step is to convert Mediawiki conventions into Ikiwiki ones. These +include + + * convert Categories into tags + * ... + +## External links + +[[sabr]] used to explain how to [import MediaWiki content into +git](http://u32.net/Mediawiki_Conversion/index.html?updated), including full +edit history, but as of 2009/10/16 that site is not available. + +The [[plugins/contrib/mediawiki]] plugin can then be used by ikiwiki to build +the wiki. -- cgit v1.2.3 From 1c3fc89b8462e4cef2d3fa92dc55c4a9a0658aac Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 16 Oct 2009 11:46:27 +0200 Subject: Prefixing the HTML Title. --- doc/users/tschwinge.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 54614e922..384fac09d 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -87,6 +87,12 @@ on)* after a customizable amount of characters (or lines) would be a another possibility. The *... (read on)* would then either toggle the full content being displayed or link to the complete page. +## Prefix For the HTML Title + +The title of each page (as in ``...) should be prefixed with +*GNU Project - GNU Hurd -*. We can either do this directly in `page.tmpl`, or +create a way to modify the `TITLE` template variable suitably. + ## Unverified -- these may be bugs, but have yet to be verified * ikiwiki doesn't change its internal database when \[[!meta date]] / -- cgit v1.2.3 From 53bf9301eab668cb448cf42a318647dc892a2985 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Fri, 16 Oct 2009 11:48:26 +0200 Subject: Potential issues with the recentchanges plugin. --- doc/users/tschwinge.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 384fac09d..05587a24c 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -103,3 +103,13 @@ create a way to modify the `TITLE` template variable suitably. ([[plugins/cutpaste]]) in RSS feed (only; not Atom?) under some conditions (refresh only, but not rebuild?). Perhaps missing to read in / parse some files? + + * [[plugins/recentchanges]] + + * Creates non-existing links to changes. + + * Invalid *directory link* with `--usedirs`. + + * Doesn't honor `$timeformat`. + + * Does create `recentchangees.*` files even if that is overridden. -- cgit v1.2.3 From d352af1da54851cb7dfdcb31664ad43ecfa3ae85 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Fri, 16 Oct 2009 11:53:37 +0200 Subject: inline plugin: feedfile option w/ usedirs. --- doc/users/tschwinge.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 05587a24c..7220310f3 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -93,6 +93,13 @@ The title of each page (as in `<html><head><title>`...) should be prefixed with *GNU Project - GNU Hurd -*. We can either do this directly in `page.tmpl`, or create a way to modify the `TITLE` template variable suitably. +## [[plugins/inline]] feedfile option + +Not that important. Git commit b67632cdcdd333cf0a88d03c0f7e6e62921f32c3. This +would be nice to have even when using *usedirs*. Might involve issues as +discussed in *N-to-M Mapping of Input and Output Files* on +[[plugins/contrib/texinfo]]. + ## Unverified -- these may be bugs, but have yet to be verified * ikiwiki doesn't change its internal database when \[[!meta date]] / -- cgit v1.2.3 From 5757ad87740fc50ead02aa06cadeb8b591dfcb82 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Fri, 16 Oct 2009 11:57:49 +0200 Subject: Add a comment about the texinfo plugin. --- doc/users/tschwinge.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 7220310f3..80eeae0c5 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -55,7 +55,8 @@ licensing headers to every single file. ## Texinfo -- [[plugins/contrib/texinfo]] -Not very important. +Not very important. Have to consider external commands / files / security (see +[[plugins/teximg]] source code)? ## Shortcuts -- [[plugins/shortcut/discussion]] -- cgit v1.2.3 From 811394ec92205112d3fec0d4f6aac380202f114b Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 16 Oct 2009 11:20:32 +0100 Subject: add snippet for converting categories --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index c522eaec3..ce0c684e7 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -1,3 +1,5 @@ +[[!toc levels=2]] + Mediawiki is a dynamically-generated wiki which stores it's data in a relational database. Pages are marked up using a proprietary markup. It is possible to import the contents of a Mediawiki site into an ikiwiki, @@ -85,7 +87,23 @@ The next step is to convert Mediawiki conventions into Ikiwiki ones. These include * convert Categories into tags - * ... + + import sys, re + pattern = r'\[\[Category:([^\]]+)\]\]' + + def manglecat(mo): + return '[[!tag %s]]' % mo.group(1).strip().replace(' ','_') + + for line in sys.stdin.readlines(): + res = re.match(pattern, line) + if res: + sys.stdout.write(re.sub(pattern, manglecat, line)) + else: sys.stdout.write(line) + +## Step 3: Mediawiki plugin + +The [[plugins/contrib/mediawiki]] plugin can be used by ikiwiki to interpret +most of the Mediawiki syntax. ## External links @@ -93,5 +111,3 @@ include git](http://u32.net/Mediawiki_Conversion/index.html?updated), including full edit history, but as of 2009/10/16 that site is not available. -The [[plugins/contrib/mediawiki]] plugin can then be used by ikiwiki to build -the wiki. -- cgit v1.2.3 From 58287a929b0ea209a062d11940232a3d31805885 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 16 Oct 2009 11:21:26 +0100 Subject: explanatory text --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index ce0c684e7..3f771ed9b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -83,10 +83,13 @@ well-crafted queries. ## Step 2: format conversion -The next step is to convert Mediawiki conventions into Ikiwiki ones. These -include +The next step is to convert Mediawiki conventions into Ikiwiki ones. - * convert Categories into tags +### categories + +Mediawiki uses a special page name prefix to define "Categories", which +otherwise behave like ikiwiki tags. You can convert every Mediawiki category +into an ikiwiki tag name using a script such as import sys, re pattern = r'\[\[Category:([^\]]+)\]\]' -- cgit v1.2.3 From 0bee92347020e3034faea5d3cc045ca443e4221c Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 16 Oct 2009 11:23:55 +0100 Subject: minor reworking of page fetch section --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 3f771ed9b..4a750882b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -53,7 +53,7 @@ Once you have a list of page names, you can fetch the data for each page. ### Method 1: via HTTP and `action=raw` -You need to create two derived strings from the page titles already: the +You need to create two derived strings from the page titles: the destination path for the page and the source URL. Assuming `$pagename` contains a pagename obtained above, and `$wiki` contains the URL to your mediawiki's `index.php` file: @@ -64,6 +64,9 @@ mediawiki's `index.php` file: mkdir -p `dirname "$dest"` wget -q "$wiki?title=$src&action=raw" -O "$dest" +You may need to add more conversions here depending on the precise page titles +used in your wiki. + ### Method 2: via HTTP and `Special:Export` Mediawiki also has a special page `Special:Export` which can be used to obtain -- cgit v1.2.3 From f6d08ceb358f6d5e51c54ab1b9e90cc4a86fad37 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 16 Oct 2009 11:44:13 +0100 Subject: notes about namespaces --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 4a750882b..87b1ebc48 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -42,6 +42,16 @@ to adjust this script too: Also, if you have pages with titles that need to be encoded to be represented in HTML, you may need to add further processing to the last line. +Note that by default, `Special:Allpages` will only list pages in the main +namespace. You need to add a `&namespace=XX` argument to get pages in a +different namespace. The following numbers correspond to common namespaces: + + * 10 - templates (`Template:foo`) + * 14 - categories (`Category:bar`) + +Note that the page names obtained this way will not include any namespace +specific prefix: e.g. `Category:` will be stripped off. + ### Querying the database If you have access to the relational database in which your mediawiki data is @@ -67,6 +77,12 @@ mediawiki's `index.php` file: You may need to add more conversions here depending on the precise page titles used in your wiki. +If you are trying to fetch pages from a different namespace to the default, +you will need to prefix the page title with the relevant prefix, e.g. +`Category:` for category pages. You probably don't want to prefix it to the +output page, but you may want to vary the destination path (i.e. insert an +extra directory component corresponding to your ikiwiki's `tagbase`). + ### Method 2: via HTTP and `Special:Export` Mediawiki also has a special page `Special:Export` which can be used to obtain -- cgit v1.2.3 From 7a9512918d981762016bdaf7e6196fe2d46c10c7 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 16 Oct 2009 11:59:27 +0100 Subject: fix step numbering --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 87b1ebc48..1e5b912a9 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -100,7 +100,7 @@ the result. It is possible to extract the page data from the database with some well-crafted queries. -## Step 2: format conversion +## Step 3: format conversion The next step is to convert Mediawiki conventions into Ikiwiki ones. @@ -122,7 +122,7 @@ into an ikiwiki tag name using a script such as sys.stdout.write(re.sub(pattern, manglecat, line)) else: sys.stdout.write(line) -## Step 3: Mediawiki plugin +## Step 4: Mediawiki plugin The [[plugins/contrib/mediawiki]] plugin can be used by ikiwiki to interpret most of the Mediawiki syntax. -- cgit v1.2.3 From 4c9ded61db6baf9a5cbd7342055b9ad783ca2351 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 16 Oct 2009 13:24:37 +0100 Subject: response --- doc/forum/ever-growing_list_of_pages.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/forum/ever-growing_list_of_pages.mdwn b/doc/forum/ever-growing_list_of_pages.mdwn index 84b9fe6ee..85a39e107 100644 --- a/doc/forum/ever-growing_list_of_pages.mdwn +++ b/doc/forum/ever-growing_list_of_pages.mdwn @@ -10,3 +10,10 @@ remove the text about the implementation bug that has been fixed, or should it stay there, for reference? --[[tschwinge]] + +> To answer a question with a question, what harm does having the done bugs +> around cause? At some point in the future perhaps the number of done pages +> will be large enough to be a time or space concern. Do you think we've +> reached a point now? One advantage of having them around is that people +> running older versions of the Ikiwiki software may find the page explaining +> that the bug is fixed if they perform a search. -- [[Jon]] -- cgit v1.2.3 From d216a27e0c448447f798883a4d6692d1a51677ef Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 12:18:04 -0400 Subject: pointer --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 1e6fc94a7..ed3faa324 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -613,4 +613,15 @@ Mediawiki.pm - A plugin which supports mediawiki format. 1 -Hello. Got ikiwiki running and I'm planning to convert my personal Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone has an old copy of the instructions, or any advice on where to start I'd be glad to hear it. Otherwise I'm just going to chronicle my journey on the page.--[[users/Chadius]] +Hello. Got ikiwiki running and I'm planning to convert my personal +Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone +has an old copy of the instructions, or any advice on where to start I'd be +glad to hear it. Otherwise I'm just going to chronicle my journey on the +page.--[[users/Chadius]] + +> Today I saw that someone is working to import wikipedia into git. +> <http://www.gossamer-threads.com/lists/wiki/foundation/181163> +> Since wikipedia uses mediawiki, perhaps his importer will work +> on mediawiki in general. It seems to produce output that could be +> used by the [[plugins/contrib/mediawiki]] plugin, if the filenames +> were fixed to use the right extension. --[[Joey]] -- cgit v1.2.3 From d42f5ec009bff055ebf36feb972cde8e540673f8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 12:38:26 -0400 Subject: response --- doc/todo/preview_changes_before_git_commit.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/todo/preview_changes_before_git_commit.mdwn b/doc/todo/preview_changes_before_git_commit.mdwn index e0e6ba866..187497cf4 100644 --- a/doc/todo/preview_changes_before_git_commit.mdwn +++ b/doc/todo/preview_changes_before_git_commit.mdwn @@ -5,3 +5,13 @@ push`ing. For the GNU Hurd's web pages, we include a *render_locally* script, <http://www.gnu.org/software/hurd/contributing/web_pages.html>, section *Preview Changes*. With ikiwiki, one can use `make docwiki`, but that excludes a set of pages, as per `docwiki.setup`. --[[tschwinge]] + +> `ikiwiki -setup some.setup --render file.mdwn` will build the page and +> dump it to stdout. So, for example: + + ikiwiki -setup docwiki.setup --render doc/todo/preview_changes_before_git_commit.mdwn | w3m -T text/html + +> You have to have a setup file, though it suffices to make up your own +> if you don't have the real one. Using ikiwiki.info's real setup file +> won't actually work since it uses a search plugin that gets unhappy +> if this is not in `/srv/web/ikiwiki.info`. --[[Joey]] -- cgit v1.2.3 From 3cedbc3b65cfa5e2c802da0e92eca716dda13bb8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 12:51:32 -0400 Subject: notes --- doc/users/tschwinge.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 80eeae0c5..341a52953 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -46,6 +46,8 @@ The \[[!map]] on, for example, the complete hierarchy of pages, but instead just the pages that actually *do* contain the \[[!tag open_issue_hurd]]. +> `tagged(open_issue_hurd)` in its pagespec should do that. --[[Joey]] + ## Anchors -- [[ikiwiki/wikilink/discussion]] ## Default Content for Meta Values -- [[plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__]] @@ -68,6 +70,9 @@ stable URLs, for example) are linked to from other wiki pages. This is useful w.r.t. backlinks. Alternative, the backlinks to the \[[!meta redir]]-using pages could perhaps be passed on to the referred-to page? +> I found that backlinks was an easy way to find such links to such pages. +> (Although the redirection made it hard to see the backlinks!) --[[Joey]] + ## Sendmail -- [[todo/passwordauth:_sendmail_interface]] ## Parentlinks -- [[bugs/non-existing_pages_in_parentlinks]] @@ -88,6 +93,9 @@ on)* after a customizable amount of characters (or lines) would be a another possibility. The *... (read on)* would then either toggle the full content being displayed or link to the complete page. +> You're looking for [[plugins/more]] (or possibly a way to do that automatically, +> I suppose. --[[Joey]] + ## Prefix For the HTML Title The title of each page (as in `<html><head><title>`...) should be prefixed with @@ -101,12 +109,22 @@ would be nice to have even when using *usedirs*. Might involve issues as discussed in *N-to-M Mapping of Input and Output Files* on [[plugins/contrib/texinfo]]. +> Do you mean when *not* using usedirs? It is currently supported for usedirs, +> only. --[[Joey]] + ## Unverified -- these may be bugs, but have yet to be verified * ikiwiki doesn't change its internal database when \[[!meta date]] / \[[!meta updated]] are added / removed, and thusly these meta values are not promulgated in RSS / Atom feeds. + > I would rather see this filed as a bug, but FWIW, the problem + > is probably that meta does not override the mdate_3339 + > template variable used by the atom and rss templates. + > (Meta does store ctime directly in the ikiwiki database, but cannot + > store mtime in \%pagemtime because it would mess up detection of when + > actual file mtimes change.) --[[Joey]] + * Complicated issue w.r.t. *no text was copied in this page* ([[plugins/cutpaste]]) in RSS feed (only; not Atom?) under some conditions (refresh only, but not rebuild?). Perhaps missing to read in / parse some -- cgit v1.2.3 From e772c5527b534976f19364b380e05bfe0bd31426 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 12:58:54 -0400 Subject: merge duplicate bug into original note behavior change, also that presense dependencies could let this be fixed now --- doc/bugs/broken_parentlinks.mdwn | 21 +++++++++++++++++++++ doc/bugs/non-existing_pages_in_parentlinks.mdwn | 5 ----- 2 files changed, 21 insertions(+), 5 deletions(-) delete mode 100644 doc/bugs/non-existing_pages_in_parentlinks.mdwn (limited to 'doc') diff --git a/doc/bugs/broken_parentlinks.mdwn b/doc/bugs/broken_parentlinks.mdwn index caf1eeb0e..f8f96b6ca 100644 --- a/doc/bugs/broken_parentlinks.mdwn +++ b/doc/bugs/broken_parentlinks.mdwn @@ -19,6 +19,10 @@ example/*! ikiwiki doesn't have a way to represent this dependency and can't get one without a lot of new complex code being added. +> Note that this code has now been added. In new terms, example/* has a +> presence dependency on example. So this bug is theoretically fixable now. +> --[[Joey]] + For now the best thing to do is to make sure that you always create example if you create example/foo. Which is probably a good idea anyway.. @@ -27,3 +31,20 @@ example if you create example/foo. Which is probably a good idea anyway.. Note that this bug does not exist if the wiki is built with the "usedirs" option, since in that case, the parent link will link to a subdirectory, that will just be missing the index.html file, but still nicely usable. +--[[Joey]] + +---- + +<http://www.gnu.org/software/hurd/hurd/translator/writing.html> does not exist. +Then, on +<http://www.gnu.org/software/hurd/hurd/translator/writing/example.html>, in the +*parentlinks* line, *writing* links to the top-level *index* file. It should +rather not link anywhere at all. --[[tschwinge]] + +> So, the bug has changed behavior a bit. Rather than a broken link, we get +> a link to the toplevel page. This, FWIW, is because the template now +> uses this for each parentlink: + + <a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/ + +> Best workaround is still to enable usedirs. --[[Joey]] diff --git a/doc/bugs/non-existing_pages_in_parentlinks.mdwn b/doc/bugs/non-existing_pages_in_parentlinks.mdwn deleted file mode 100644 index b4ea42b17..000000000 --- a/doc/bugs/non-existing_pages_in_parentlinks.mdwn +++ /dev/null @@ -1,5 +0,0 @@ -<http://www.gnu.org/software/hurd/hurd/translator/writing.html> does not exist. -Then, on -<http://www.gnu.org/software/hurd/hurd/translator/writing/example.html>, in the -*parentlinks* line, *writing* links to the top-level *index* file. It should -rather not link anywhere at all. --[[tschwinge]] -- cgit v1.2.3 From 5b49890be04c5691437e33e2c28fe46a0c65198f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 13:01:02 -0400 Subject: respinse --- doc/bugs/minor:_tiny_rendering_error.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/minor:_tiny_rendering_error.mdwn b/doc/bugs/minor:_tiny_rendering_error.mdwn index 5131e61fa..b2e07eef9 100644 --- a/doc/bugs/minor:_tiny_rendering_error.mdwn +++ b/doc/bugs/minor:_tiny_rendering_error.mdwn @@ -1 +1,5 @@ `\[[!inline]]` is rendered with a space in front of the first closing bracket. --[[tschwinge]] + +> I don't think that complicating the directive parser +> is warrented by the minorness of this bug. The result that it outputs is +> still valid. --[[Joey]] -- cgit v1.2.3 From 13c93b1ab9a7ae3efb845b7fb73e34c94b912e3d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 15:34:33 -0400 Subject: note that chrome fixes this nicely --- doc/todo/edit_form:_no_fixed_size_for_textarea.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/edit_form:_no_fixed_size_for_textarea.mdwn b/doc/todo/edit_form:_no_fixed_size_for_textarea.mdwn index 4c9c2352a..0c45f0c90 100644 --- a/doc/todo/edit_form:_no_fixed_size_for_textarea.mdwn +++ b/doc/todo/edit_form:_no_fixed_size_for_textarea.mdwn @@ -10,7 +10,7 @@ On longer pages its not very comfortable to edit pages with such a small box. Th > } > > Perhaps you have replaced it with a modified style sheet that does not -> include that? --[[Joey]] [[!tag done]] +> include that? --[[Joey]] >> The screen shot was made with http://ikiwiki.info/ where i didn't change anything. The width is optimally used. The problem is the height. @@ -32,3 +32,9 @@ On longer pages its not very comfortable to edit pages with such a small box. Th >>> --[[Joey]] >>>>>> the javascript approach would need to work something like this: you need to know about the "bottom-most" item on the edit page, and get a handle for that object in the DOM. You can then obtain the absolute position height-wise of this element and the absolute position of the bottom of the window to determine the pixel-difference. Then, you set the height of the textarea to (current height in px) + determined-value. This needs to be re-triggered on various resize events, at least for the window and probably for other elements too. I may have a stab at this at some point. -- [[Jon]] + +Google chrome has a completly elegant fix for this problem: All textareas +have a small resize handle in a corner, that can be dragged around. No +nasty javascript needed. IMHO, this is the right solution, and I hope other +browsers emulate it. [[done]] +--[[Joey]] -- cgit v1.2.3 From aa5fa1f11dcec93bae1420e175e17b768372d31c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 15:37:31 -0400 Subject: response --- doc/forum/ever-growing_list_of_pages.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/forum/ever-growing_list_of_pages.mdwn b/doc/forum/ever-growing_list_of_pages.mdwn index 85a39e107..435b12c8c 100644 --- a/doc/forum/ever-growing_list_of_pages.mdwn +++ b/doc/forum/ever-growing_list_of_pages.mdwn @@ -17,3 +17,6 @@ stay there, for reference? > reached a point now? One advantage of having them around is that people > running older versions of the Ikiwiki software may find the page explaining > that the bug is fixed if they perform a search. -- [[Jon]] + +> I like to keep old bugs around. OTOH, I have no problem with cleaning up +> obsolete stuff in the forum, tips, etc. --[[Joey]] -- cgit v1.2.3 From 2209a07ba34830c63ce578881da6a006bc48d90f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 15:43:32 -0400 Subject: update --- doc/forum/speeding_up_ikiwiki.mdwn | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/forum/speeding_up_ikiwiki.mdwn b/doc/forum/speeding_up_ikiwiki.mdwn index 0b2164238..2c2ac240e 100644 --- a/doc/forum/speeding_up_ikiwiki.mdwn +++ b/doc/forum/speeding_up_ikiwiki.mdwn @@ -77,15 +77,14 @@ wrapper. > Dependencies go in the `%IkiWiki::depends` hash, which is not exported. It > can also be dumped out as part of the wiki state - see [[tips/inside_dot_ikiwiki]]. > -> It's a map from page name to increasingly complex pagespec, although -> the `optimize-depends` branch in my git repository changes that to a -> map from a page name to a *list* of pagespecs which are automatically -> or'd together for use (this at least means duplicates can be weeded out). -> -> See [[todo/should_optimise_pagespecs]] for more on that. +> Nowadays, it's a hash of pagespecs, and there +> is also a `IkiWiki::depends_simple` hash of simple page names. > > I've been hoping to speed up IkiWiki too - making a lot of photo albums > with my [[plugins/contrib/album]] plugin makes it pretty slow. > > One thing that I found was a big improvement was to use `quick=yes` on all > my `archive=yes` [[ikiwiki/directive/inline]]s. --[[smcv]] + +> Take a look at [[tips/optimising_ikiwiki]] for lots of helpful advice. +> --[[Joey]] -- cgit v1.2.3 From b2fd4f9b254610283d3fa6944ea73941c2045769 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 15:50:33 -0400 Subject: explain how to profile --- doc/tips/optimising_ikiwiki.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 6d0997603..085ef0306 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -140,6 +140,21 @@ That is accomplished as follows: Be aware that the [[plugins/search]] plugin has to update the search index whenever any page is changed. This can slow things down somewhat. +## profiling + +If you have a repeatable change that ikiwiki takes a long time to build, +and none of the above help, the next thing to consider is profiling +ikiwiki. + +The best way to do it is: + +* Install [[cpan Devel::NYTProf]] +* `PERL5OPT=-d:NYTProf` +* `export PER5OPT` +* Now run ikiwiki as usual, and it will generate a `nytprof.out` file. +* Run `nytprofhtml` to generate html files. +* Those can be examined to see what parts of ikiwiki are being slow. + ## scaling to large numbers of pages Finally, let's think about how huge number of pages can affect ikiwiki. -- cgit v1.2.3 From 69a1ebce16debf8b0aeb61329ff26d235e248e7d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Oct 2009 16:43:26 -0400 Subject: link --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 085ef0306..cf166998b 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -148,7 +148,7 @@ ikiwiki. The best way to do it is: -* Install [[cpan Devel::NYTProf]] +* Install [[!cpan Devel::NYTProf]] * `PERL5OPT=-d:NYTProf` * `export PER5OPT` * Now run ikiwiki as usual, and it will generate a `nytprof.out` file. -- cgit v1.2.3 From 31633c7addf25619a2a3042fc3e27f21aa97a831 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Sat, 17 Oct 2009 14:43:11 +0200 Subject: Add some more reasoning. Split out unrelated issue. --- .../cleaning_up_discussion_pages_and_the_like.mdwn | 11 +++++++++++ doc/forum/ever-growing_list_of_pages.mdwn | 19 +++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn (limited to 'doc') diff --git a/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn b/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn new file mode 100644 index 000000000..35ceae59b --- /dev/null +++ b/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn @@ -0,0 +1,11 @@ +For example in [[forum/ikiwiki__39__s_notion_of_time]], should one remove the +text about the implementation bug that has been fixed, or should it stay there, +for reference? --[[tschwinge]] + +> I have no problem with cleaning up obsolete stuff in the forum, tips, etc. +> --[[Joey]] + +That's also what I think: such discussions or comments on [[forum]] discussion +pages, or generally on all pages' [[Discussion]] subpages, can be removed if +either they're simply not valid / interesting / ... anymore, or if they've been +used to improve the *real* documentation. --[[tschwinge]] diff --git a/doc/forum/ever-growing_list_of_pages.mdwn b/doc/forum/ever-growing_list_of_pages.mdwn index 435b12c8c..9920e34bb 100644 --- a/doc/forum/ever-growing_list_of_pages.mdwn +++ b/doc/forum/ever-growing_list_of_pages.mdwn @@ -5,10 +5,6 @@ they're still present in the repository. Shouldn't there be some clean-up at some point for those that have been resolved? Or should all of them be kept online forever? -Likewise, for example in [[forum/ikiwiki__39__s_notion_of_time]], should one -remove the text about the implementation bug that has been fixed, or should it -stay there, for reference? - --[[tschwinge]] > To answer a question with a question, what harm does having the done bugs @@ -18,5 +14,16 @@ stay there, for reference? > running older versions of the Ikiwiki software may find the page explaining > that the bug is fixed if they perform a search. -- [[Jon]] -> I like to keep old bugs around. OTOH, I have no problem with cleaning up -> obsolete stuff in the forum, tips, etc. --[[Joey]] +> I like to keep old bugs around. --[[Joey]] + +So, I guess it depends on whether you want to represent the development of the +software (meaning: which bugs are open, which are fixed) *(a)* in a snapshot of +the repository (a checkout; that is, what you see rendered on +<http://ikiwiki.info/>), or *(b)* if that information is to be contained in the +backing repository's revision history only. Both approaches are valid. For +people used to using Git for accessing a project's history, *(b)* is what +they're used to, but for those poor souls ;-) that only use a web browser to +access this database, *(a)* is the more useful approach indeed. For me, using +Git, it is a bit of a hindrance, as, when doing a full-text search for a +keyword on a checkout, I'd frequently hit pages that reported a bug, but are +tagged `done` by now. --[[tschwinge]] -- cgit v1.2.3 From f71e84c918827a482158073af45fa7f9acc5ed31 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Sat, 17 Oct 2009 15:00:12 +0200 Subject: Reflect merge of page. --- doc/bugs/broken_parentlinks.mdwn | 2 +- doc/users/tschwinge.mdwn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/bugs/broken_parentlinks.mdwn b/doc/bugs/broken_parentlinks.mdwn index f8f96b6ca..556d89b65 100644 --- a/doc/bugs/broken_parentlinks.mdwn +++ b/doc/bugs/broken_parentlinks.mdwn @@ -10,7 +10,7 @@ a dead link for every subpage. This is a bug, but fixing it is very tricky. Consider what would happen if example.mdwn were created: example/page.html and the rest of example/* -would need to be updated to change the parentlink from a bare work to a +would need to be updated to change the parentlink from a bare word to a link to the new page. Now if example.mdwn were removed again, they'd need to be updated again. So example/* depends on example. But it's even more tricky, because if example.mdwn is modified, we _don't_ want to rebuild diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 341a52953..3bab61bc1 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -75,7 +75,7 @@ pages could perhaps be passed on to the referred-to page? ## Sendmail -- [[todo/passwordauth:_sendmail_interface]] -## Parentlinks -- [[bugs/non-existing_pages_in_parentlinks]] +## [[bugs/Broken Parentlinks]] ## Discussion Pages of Discussion Pages of... -- cgit v1.2.3 From f51a2b654fbcf6b3b6ae7ad50b2c1929705f2b22 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Sat, 17 Oct 2009 15:16:02 +0200 Subject: [[!map tagged=...]]: Try to tell more clearly what I'd expect. --- doc/users/tschwinge.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 3bab61bc1..53902a7df 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -48,6 +48,20 @@ contain the \[[!tag open_issue_hurd]]. > `tagged(open_issue_hurd)` in its pagespec should do that. --[[Joey]] +>> Well, that's exactly what this page contains: \[[!map +>> pages="tagged(open_issue_hurd) and !open_issues and !*/discussion" +>> show=title]] +>> +>> This is currently rendered as can be seen on +>> <http://www.gnu.org/software/hurd/tag/open_issue_hurd.html>, but I'd imagine +>> it to be rendered by **only** linking to the pages that actually do contain +>> the tag, (**only** the outer leaf ones, which are *capturing stdout and +>> stderr*, *ramdisk*, *syncfs*, ...; but **not** to *hurd*, *debugging*, +>> *translator*, *libstore*, *examples*, ...). Otherwise, the way it's being +>> rendered at the moment, it appears to the reader that *hurd*, *debugging*, +>> *translator*, *libstore*, *examples*, ... were all tagged, too, and not only +>> the outer ones. + ## Anchors -- [[ikiwiki/wikilink/discussion]] ## Default Content for Meta Values -- [[plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__]] -- cgit v1.2.3 From 1859ccf8ace69c7f2db4872b269be10a66b41e4d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Sat, 17 Oct 2009 15:19:01 +0200 Subject: feedfile: Thanks, Joey, indeed *not* using usedirs was what I meant. --- doc/users/tschwinge.mdwn | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 53902a7df..33a139784 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -119,13 +119,10 @@ create a way to modify the `TITLE` template variable suitably. ## [[plugins/inline]] feedfile option Not that important. Git commit b67632cdcdd333cf0a88d03c0f7e6e62921f32c3. This -would be nice to have even when using *usedirs*. Might involve issues as +would be nice to have even when *not* using *usedirs*. Might involve issues as discussed in *N-to-M Mapping of Input and Output Files* on [[plugins/contrib/texinfo]]. -> Do you mean when *not* using usedirs? It is currently supported for usedirs, -> only. --[[Joey]] - ## Unverified -- these may be bugs, but have yet to be verified * ikiwiki doesn't change its internal database when \[[!meta date]] / -- cgit v1.2.3 From 4227c0e3cb6c2b6663c67c549259e662c57367bf Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 17 Oct 2009 20:57:26 -0400 Subject: add news item for ikiwiki 3.20091017 --- doc/news/version_3.14159.mdwn | 5 ---- doc/news/version_3.20091017.mdwn | 49 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 5 deletions(-) delete mode 100644 doc/news/version_3.14159.mdwn create mode 100644 doc/news/version_3.20091017.mdwn (limited to 'doc') diff --git a/doc/news/version_3.14159.mdwn b/doc/news/version_3.14159.mdwn deleted file mode 100644 index 21f91fdb4..000000000 --- a/doc/news/version_3.14159.mdwn +++ /dev/null @@ -1,5 +0,0 @@ -ikiwiki 3.14159 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * svn: Fix rcs\_rename to properly scope call to dirname. - * img: Pass the align parameter through to the generated img tag. - * Move OpenID pretty-printing from openid plugin to core (smcv)"""]] \ No newline at end of file diff --git a/doc/news/version_3.20091017.mdwn b/doc/news/version_3.20091017.mdwn new file mode 100644 index 000000000..aba830a82 --- /dev/null +++ b/doc/news/version_3.20091017.mdwn @@ -0,0 +1,49 @@ +News for ikiwiki 3.20091017: + + To take advantage of significant performance improvements, all + wikis need to be rebuilt on upgrade to this version. If you + listed your wiki in /etc/ikiwiki/wikilist this will be done + automatically when the Debian package is upgraded. Or use + ikiwiki-mass-rebuild to force a rebuild. + +ikiwiki 3.20091017 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Added support framework for multiple types of dependencies, including + dependncies that are only affected by page precence or link changes. + * Rebuild wikis on upgrade to this version to get improved dependency + info. + * pagecount, calendar, postsparkline, progress: Use a presence dependency, + which makes these directives much less expensive to use, since page + edits will no longer trigger an unnecessary update. + * map: Use a presence dependency unless show= is specified. + This makes maps efficient enough that they can be used on sidebars! + * inline: Use a presence dependency in quick mode. + * brokenlinks: Use a link dependency. + This makes it much more efficient, only updating when really necessary. + * orphans, pagestats: Use a combination of presence and link dependencies. + This makes them more efficient. It also fixes a longstanding bug, + where if only a small set of pages were considered by orphans/pagestats, + changes to links on other pages failed to cause an update. + * linkmap: Use a combination of presence and link dependencies. + This makes the map be regenerated much less frequently in many cases, + so larger maps are more practical to use now. + * Plugins providing PageSpec `match\_*` functions should pass additional + influence information when creating result objects. This allows correctly + handling many more complicated dependencies. + * API change: `pagespec\_match\_list` has completly changed its interface. + The old interface will be removed soon, and a warning will be printed + if any plugins try to use it. + * Transitive dependencies are now correctly supported. + * ikiwiki-calendar: New command automates creation of archive pages + using the calendar plugin. + * calendar: Fix midnight rebuild trigger of calendars with explicit + month/year. + * calendar: Fix bug in next/previous year/month links, which sometimes + linked to an archive page from the wrong year, or were missing. + * git: --getctime will now follow renames back to the original creation + of a file. + * calendar: Fix CSS for year calendar to match the plugin documentation. + * Added minimal default CSS for calendar plugin, just highlighting the + current day. + * inline: Optimize generation of archives, etc by not getting inlined page + content if the template does not use it."""]] \ No newline at end of file -- cgit v1.2.3 From 967c845e473a34ac5c3b112f53a7721d029204a4 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 17 Oct 2009 20:59:01 -0400 Subject: remove discussion page for removed page --- doc/news/version_3.141/discussion.mdwn | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 doc/news/version_3.141/discussion.mdwn (limited to 'doc') diff --git a/doc/news/version_3.141/discussion.mdwn b/doc/news/version_3.141/discussion.mdwn deleted file mode 100644 index 1f5f39282..000000000 --- a/doc/news/version_3.141/discussion.mdwn +++ /dev/null @@ -1,16 +0,0 @@ -Version 3.141!? Is it not a mistake? Maybe you meant 3.14.1 or 3.15? ---[[Paweł|users/ptecza]] - -> I suspect the next version will be 3.1415 ;) -- [[Jon]] - ->> And next 3.14159, 3.141592, etc. :) I think that version schema ->> should be patented by Joey ;) --[[Paweł|users/ptecza]] - ->>> That's not exactly new; quoting from <http://www-cs-faculty.stanford.edu/~knuth/abcde.html>: ->>> ->>>> The latest and best TeX is currently version 3.1415926 (and plain.tex is version 3.141592653); METAFONT is currently version 2.718281 (and plain.mf is version 2.71). My last will and testament for TeX and METAFONT is that their version numbers ultimately become $\pi$ and $e$, respectively. At that point they will be completely error-free by definition. ->>> ->>> --[[tschwinge]] - ->>>> Thanks for the info, Thomas! I didn't know about it. Sorry Joey, ->>>> but Don Knuth was faster. What a pity... ;) --[[Paweł|users/ptecza]] -- cgit v1.2.3 From f4c40a62aab3cdb13e5e766f3a3e0dafa49a165b Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" <http://bruno.boulgour.com/@web> Date: Sun, 18 Oct 2009 14:42:23 -0400 Subject: Added bbb git repository --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index a3b56c682..ce762b0cd 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -51,6 +51,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[schmonz]] `git://github.com/schmonz/ikiwiki.git` * [[will]] `http://www.cse.unsw.edu.au/~willu/ikiwiki.git` * [[kaizer]] `git://github.com/engla/ikiwiki.git` +* [[bbb]] `http://git.boulgour.com/bbb/ikiwiki.git` ## branches -- cgit v1.2.3 From 8a05bb2c1193517f993c90716710b933985dea9d Mon Sep 17 00:00:00 2001 From: martin <martin@web> Date: Sun, 18 Oct 2009 17:56:30 -0400 Subject: filed bug --- doc/bugs/inline_breaks_PERMALINK_variable.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/bugs/inline_breaks_PERMALINK_variable.mdwn (limited to 'doc') diff --git a/doc/bugs/inline_breaks_PERMALINK_variable.mdwn b/doc/bugs/inline_breaks_PERMALINK_variable.mdwn new file mode 100644 index 000000000..8a50b1262 --- /dev/null +++ b/doc/bugs/inline_breaks_PERMALINK_variable.mdwn @@ -0,0 +1,9 @@ +in 3.20091017 the following inline + +> `\[[!inline pages="internal(foo/bar/baz/*)" show=3 archive="yes" feeds="no" template="sometemplates"]]` + +with sometemplate being + +> `<p><a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a> (<TMPL_VAR CTIME>)</p>` + +produced output that links nowhere (`<a href="">`) while the other variables do fine. This problem does not occur in 3.1415926. -- cgit v1.2.3 From 5864184c0b66a5441a0b8cd146dee3224b0d94c4 Mon Sep 17 00:00:00 2001 From: "http://openid.headfucking.net/pankkake" <http://openid.headfucking.net/pankkake@web> Date: Sun, 18 Oct 2009 17:57:19 -0400 Subject: --- doc/sandbox/plop.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/sandbox/plop.mdwn (limited to 'doc') diff --git a/doc/sandbox/plop.mdwn b/doc/sandbox/plop.mdwn new file mode 100644 index 000000000..e8b7c915c --- /dev/null +++ b/doc/sandbox/plop.mdwn @@ -0,0 +1 @@ +plop -- cgit v1.2.3 From 04aa977b45cbd67792f7873b02175d408ce1fd85 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Mon, 19 Oct 2009 04:58:46 -0400 Subject: bad generation of links in map directive --- doc/bugs/pages_missing_top-level_directory.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/bugs/pages_missing_top-level_directory.mdwn (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn new file mode 100644 index 000000000..302d3653a --- /dev/null +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -0,0 +1,17 @@ +Hi, + +I've rebuilt two sites now, and anything that requires a working directory structure isn't working properly. I have no idea how it's doing this. I don't see anything in my templates, and I haven't messed around with the back-end code much. + +An example would show this best I think. + +<pre> +/ <- root of site +/About/ <- sub-directory + /Policy/ <- sub-sub- +</pre> + +When you're on /About/, any generated links get mapped to /Policy/ and NOT /About/Policy/ - of course this results in a 404 error. + +I used to be able to use relative links or absolute ones to get the links I want, and now I can't do either. The generated link results in a 404 due to the stripping of a directory. + +I don't know if it's related to the fact that I have one ikiwiki install under another (/blog/ under / is also ikiwiki), but both are FUBAR. -- cgit v1.2.3 From 6695a710b6c86ef353e04d8cd33598290a0fe056 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Mon, 19 Oct 2009 10:42:09 +0100 Subject: request for more detail --- doc/bugs/pages_missing_top-level_directory.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index 302d3653a..14e016187 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -15,3 +15,9 @@ When you're on /About/, any generated links get mapped to /Policy/ and NOT /Abou I used to be able to use relative links or absolute ones to get the links I want, and now I can't do either. The generated link results in a 404 due to the stripping of a directory. I don't know if it's related to the fact that I have one ikiwiki install under another (/blog/ under / is also ikiwiki), but both are FUBAR. + +> what do you mean by generated links: do you mean the output of +> [[ikiwiki/wikilink]]s? Or are you generating links some other way? +> When you say "on /About/, any generated links get mapped to +> /Policy/ and NOT /About/Policy" can you provide an example of what +> source generates the link? -- [[Jon]] -- cgit v1.2.3 From 190c34804451532673bd46d2073f444f820a2687 Mon Sep 17 00:00:00 2001 From: "http://xdnf.myopenid.com/" <http://xdnf.myopenid.com/@web> Date: Mon, 19 Oct 2009 12:38:36 -0400 Subject: --- doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn b/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn index 35ceae59b..0c9619647 100644 --- a/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn +++ b/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn @@ -9,3 +9,5 @@ That's also what I think: such discussions or comments on [[forum]] discussion pages, or generally on all pages' [[Discussion]] subpages, can be removed if either they're simply not valid / interesting / ... anymore, or if they've been used to improve the *real* documentation. --[[tschwinge]] + +test -- cgit v1.2.3 From 80edf46ff216a547676de9e7902072777f715a35 Mon Sep 17 00:00:00 2001 From: "http://xdnf.myopenid.com/" <http://xdnf.myopenid.com/@web> Date: Mon, 19 Oct 2009 12:43:56 -0400 Subject: --- doc/index/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn index d52cb0a2d..a9633934b 100644 --- a/doc/index/discussion.mdwn +++ b/doc/index/discussion.mdwn @@ -462,3 +462,4 @@ Any thoughts or examples on this? Any links to examples of news sites or blogs w Thanks --[[JeremyReed]] +test -- cgit v1.2.3 From 39f8071aacf9913304d907694002e2e5294aa987 Mon Sep 17 00:00:00 2001 From: "http://xdnf.myopenid.com/" <http://xdnf.myopenid.com/@web> Date: Mon, 19 Oct 2009 12:44:23 -0400 Subject: --- doc/index/discussion.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn index a9633934b..d52cb0a2d 100644 --- a/doc/index/discussion.mdwn +++ b/doc/index/discussion.mdwn @@ -462,4 +462,3 @@ Any thoughts or examples on this? Any links to examples of news sites or blogs w Thanks --[[JeremyReed]] -test -- cgit v1.2.3 From 8dbb95371384d2a33f1c936d003adead5554fdab Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Tue, 20 Oct 2009 11:14:25 +0200 Subject: This reverts commit 190c34804451532673bd46d2073f444f820a2687. --- doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn b/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn index 0c9619647..35ceae59b 100644 --- a/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn +++ b/doc/forum/cleaning_up_discussion_pages_and_the_like.mdwn @@ -9,5 +9,3 @@ That's also what I think: such discussions or comments on [[forum]] discussion pages, or generally on all pages' [[Discussion]] subpages, can be removed if either they're simply not valid / interesting / ... anymore, or if they've been used to improve the *real* documentation. --[[tschwinge]] - -test -- cgit v1.2.3 From d926c73a6673047650008204f841061e98e35084 Mon Sep 17 00:00:00 2001 From: ian <ian@web> Date: Tue, 20 Oct 2009 10:59:15 -0400 Subject: --- doc/forum/Cannot_write_to_commitlock.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/forum/Cannot_write_to_commitlock.mdwn (limited to 'doc') diff --git a/doc/forum/Cannot_write_to_commitlock.mdwn b/doc/forum/Cannot_write_to_commitlock.mdwn new file mode 100644 index 000000000..a5d4bf440 --- /dev/null +++ b/doc/forum/Cannot_write_to_commitlock.mdwn @@ -0,0 +1,17 @@ +I am following the laptop wiki with git tip page. I have set up my local and remote wiki as suggested. However, when I try to push my local changes back to the server I get the following error: + +Writing objects: 100% (4/4), 359 bytes, done. +Total 4 (delta 2), reused 0 (delta 0) +cannot write to /home/ian/ianbarton/.ikiwiki/commitlock: No such file or directory +To ian@wilkesley.org:~/ikiwiki/ianbarton.git + 5cf9054..16a871d master -> master + +The relevnt bit of my setup file is: + +git_wrapper => '/home/ian/ianbarton.git/hooks/post-commit', + +Now ~/ianbarton/.ikiwiki exists and is owned and writable by me. I have tried touching commitlock and also removing lock and commitlock before pushing. Any suggestions for further trouble shooting? + +Ian. + + -- cgit v1.2.3 From b69f9eba9250b5c71e81415c977836d4421ef0a4 Mon Sep 17 00:00:00 2001 From: "http://telmich.myopenid.com/" <http://telmich.myopenid.com/@web> Date: Wed, 21 Oct 2009 08:06:08 -0400 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index a98abf578..f6ab34653 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -127,6 +127,7 @@ Personal sites and blogs * [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage * [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) * [Weakish Jiang's Homepage](http://weakish.pigro.net) +* [Nico Schottelius' homepage](http://www.nico.schottelius.org) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From b6f6f126d0e3fa23687f2d8c537de207e2c7b5d3 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 21 Oct 2009 16:27:44 -0400 Subject: avoid -O default for CFLAGS, and document --- IkiWiki/Wrapper.pm | 6 +++--- debian/changelog | 1 + doc/usage.mdwn | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 7a1529119..5427a5c80 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -142,9 +142,9 @@ $pre_exec } EOF - my $cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc'; - my $cflags=exists $ENV{CFLAGS} ? possibly_foolish_untaint($ENV{CFLAGS}) : '-O'; - if (system($cc, $cflags, "$wrapper.c", "-o", "$wrapper.new") != 0) { + my @cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc'; + push @cc, possibly_foolish_untaint($ENV{CFLAGS}) if exists $ENV{CFLAGS}; + if (system(@cc, "$wrapper.c", "-o", "$wrapper.new") != 0) { #translators: The parameter is a C filename. error(sprintf(gettext("failed to compile %s"), "$wrapper.c")); } diff --git a/debian/changelog b/debian/changelog index f6739952e..0ff7a0d13 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ ikiwiki (3.20091018) UNRELEASED; urgency=low * edittemplate: Work around bug #551499 in CGI::FormBuilder. * Fix a bug introduced in the last version that caused ikiwiki to skip all files if a sourcedir of "./" was specified. + * Support CFLAGS when building wrapper. -- Joey Hess <joeyh@debian.org> Sun, 18 Oct 2009 13:44:09 -0400 diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 0c618de5c..4ee935f73 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -345,6 +345,10 @@ also be configured using a setup file. This controls what C compiler is used to build wrappers. Default is 'cc'. +* CFLAGS + + This can be used to pass options to the C compiler when building wrappers. + # SEE ALSO * [[ikiwiki-mass-rebuild]](8) -- cgit v1.2.3 From 7ae0f754f3d82273948f8c5f1426fda91420aeb1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 21 Oct 2009 16:31:32 -0400 Subject: thanks telmich --- doc/tipjar.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/tipjar.mdwn b/doc/tipjar.mdwn index 787df9bf7..1f361f99f 100644 --- a/doc/tipjar.mdwn +++ b/doc/tipjar.mdwn @@ -13,6 +13,7 @@ Thanks to the following people for their kind contributions: * Martin Krafft * Paweł Tęcza * Mick Pollard +* Nico Schottelius (Note that this page is locked to prevent anyone from tampering with the PayPal button. If you prefer your donation *not* be listed here, let [[Joey]] know.) -- cgit v1.2.3 From b9071082717cd7fd56e66963b47a6d589848e062 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 21 Oct 2009 16:42:25 -0400 Subject: meta: Gather permalink info on scan pass so it is available to inline when using a template that does not include page content. --- IkiWiki/Plugin/meta.pm | 7 +++++-- debian/changelog | 2 ++ doc/bugs/inline_breaks_PERMALINK_variable.mdwn | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 8dcd73a1a..6fe9cda34 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -121,6 +121,10 @@ sub preprocess (@) { $pagestate{$page}{meta}{authorurl}=$value if safeurl($value); # fallthrough } + elsif ($key eq 'permalink') { + $pagestate{$page}{meta}{permalink}=$value if safeurl($value); + # fallthrough + } elsif ($key eq 'date') { eval q{use Date::Parse}; if (! $@) { @@ -141,10 +145,9 @@ sub preprocess (@) { return; } - # Metadata collection that happens only during preprocessing pass. + # Metadata handling that happens only during preprocessing pass. if ($key eq 'permalink') { if (safeurl($value)) { - $pagestate{$page}{meta}{permalink}=$value; push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />', $destpage); } } diff --git a/debian/changelog b/debian/changelog index 0ff7a0d13..be30b498c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ ikiwiki (3.20091018) UNRELEASED; urgency=low * Fix a bug introduced in the last version that caused ikiwiki to skip all files if a sourcedir of "./" was specified. * Support CFLAGS when building wrapper. + * meta: Gather permalink info on scan pass so it is available + to inline when using a template that does not include page content. -- Joey Hess <joeyh@debian.org> Sun, 18 Oct 2009 13:44:09 -0400 diff --git a/doc/bugs/inline_breaks_PERMALINK_variable.mdwn b/doc/bugs/inline_breaks_PERMALINK_variable.mdwn index 8a50b1262..fc891bb25 100644 --- a/doc/bugs/inline_breaks_PERMALINK_variable.mdwn +++ b/doc/bugs/inline_breaks_PERMALINK_variable.mdwn @@ -7,3 +7,19 @@ with sometemplate being > `<p><a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a> (<TMPL_VAR CTIME>)</p>` produced output that links nowhere (`<a href="">`) while the other variables do fine. This problem does not occur in 3.1415926. + +> This must be caused by an optimisation that avoids reading the page +> content when using a template that does not use CONTENT. +> +> I guess that it needs to instead check all the variables the template +> uses, and read content if PERMALINK, or probably any other unknown +> variable is used. Unfortunatly, that will lose the optimisation +> for the archivepage template as well -- it also uses PERMALINK. +> +> So, revert the optimisation? Or, make meta gather the permalink +> data on scan? That seems doable, but is not a general fix for +> other stuff that might be a) used in a template and b) gathered +> at preprocess time. +> +> For now, I am going with the special case fix of fixing meta. I may need +> to go for a more general fix later. --[[Joey]] [[!tag done]] -- cgit v1.2.3 From 14526ef59772c0e1b60866b8149e478d82a4b70f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 21 Oct 2009 16:46:22 -0400 Subject: response --- doc/forum/Cannot_write_to_commitlock.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/Cannot_write_to_commitlock.mdwn b/doc/forum/Cannot_write_to_commitlock.mdwn index a5d4bf440..81b0cdeb3 100644 --- a/doc/forum/Cannot_write_to_commitlock.mdwn +++ b/doc/forum/Cannot_write_to_commitlock.mdwn @@ -14,4 +14,11 @@ Now ~/ianbarton/.ikiwiki exists and is owned and writable by me. I have tried to Ian. - +> I'm guessing that this is some kind of permissions problem, +> and that the error message is just being misleading. +> +> When you push the changes to the server, what user is +> git logging into the server as? If that user is different +> than `ian` (possibly due to using git-daemon?), the post-commit +> wrapper needs to be setuid to `ian`. This ensures that ikiwiki +> runs as you and can see and write to the files. --[[Joey]] -- cgit v1.2.3 From f9de9f22d89892152438d5a83cd2100daf97ce3e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 21 Oct 2009 16:48:20 -0400 Subject: also confused --- doc/bugs/pages_missing_top-level_directory.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index 14e016187..0f967db44 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -21,3 +21,6 @@ I don't know if it's related to the fact that I have one ikiwiki install under a > When you say "on /About/, any generated links get mapped to > /Policy/ and NOT /About/Policy" can you provide an example of what > source generates the link? -- [[Jon]] + +> I'm also confused about what is generating the links. The map directive? +> You? --[[Joey]] -- cgit v1.2.3 From c83f8b9b25fb170b0e91a4ece350f9c549f3b336 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Wed, 21 Oct 2009 19:33:20 -0400 Subject: --- doc/bugs/pages_missing_top-level_directory.mdwn | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index 0f967db44..974ea1179 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -22,5 +22,31 @@ I don't know if it's related to the fact that I have one ikiwiki install under a > /Policy/ and NOT /About/Policy" can you provide an example of what > source generates the link? -- [[Jon]] +>> No, a \[[map]] call, such as: +>> +>> (actual code)<br /> +>> = = = = =<br /> +>> \[[!map pages="About/*" show="title"]]<br /> +>> = = = = =<br /> +>> +>> The end result is:<br /> +>> (actual code) +>> +<pre> +<div class="map"> +<ul> +<li><a class="mapitem" href="./Policy/">Policy</a> +<ul> +<li><a class="mapitem" href="./Policy/Microblog/">Microblogging subscription policy</a> +</li> +</ul> +</li> +</ul> +</div> +</pre> + > I'm also confused about what is generating the links. The map directive? -> You? --[[Joey]] +> You? --[[Joey]] + +>> see above :) + -- cgit v1.2.3 From 6b16d1996c90cdaa0279075f9673cc0d859e3c2b Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Wed, 21 Oct 2009 19:36:21 -0400 Subject: --- doc/bugs/pages_missing_top-level_directory.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index 974ea1179..381bcd85b 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -50,3 +50,5 @@ I don't know if it's related to the fact that I have one ikiwiki install under a >> see above :) +>> I suspect this is due to git scanning everything under the pwd of the .git/ directory, but not totally so. +>> Other ikiwiki sites I have don't do this, and work OK, on the same server, but different docroots. -- cgit v1.2.3 From 54be16aaa8a6428b8f6e3015e452678a80dc233c Mon Sep 17 00:00:00 2001 From: ian <ian@web> Date: Thu, 22 Oct 2009 10:29:36 -0400 Subject: --- doc/forum/Cannot_write_to_commitlock.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/Cannot_write_to_commitlock.mdwn b/doc/forum/Cannot_write_to_commitlock.mdwn index 81b0cdeb3..05490a799 100644 --- a/doc/forum/Cannot_write_to_commitlock.mdwn +++ b/doc/forum/Cannot_write_to_commitlock.mdwn @@ -22,3 +22,7 @@ Ian. > than `ian` (possibly due to using git-daemon?), the post-commit > wrapper needs to be setuid to `ian`. This ensures that ikiwiki > runs as you and can see and write to the files. --[[Joey]] + +The user is logging as ian, the same user as the laptop. I can push and pull git repos on the same server owned by the same user via ssh with no problem. I have deleted and re-started from scratch several times. However, for my use case I think it's simpler to keep the repo on my local computer and just rsync the web pages to the server. + +Ian. -- cgit v1.2.3 From 0699013dac6136acaee2674caee40e0ba03a3c16 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 22 Oct 2009 20:35:35 -0400 Subject: add news item for ikiwiki 3.20091022 --- doc/news/version_3.141592.mdwn | 19 ------------------- doc/news/version_3.20091022.mdwn | 10 ++++++++++ 2 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 doc/news/version_3.141592.mdwn create mode 100644 doc/news/version_3.20091022.mdwn (limited to 'doc') diff --git a/doc/news/version_3.141592.mdwn b/doc/news/version_3.141592.mdwn deleted file mode 100644 index 5911e07f9..000000000 --- a/doc/news/version_3.141592.mdwn +++ /dev/null @@ -1,19 +0,0 @@ -ikiwiki 3.141592 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Add new hooks: canremove, canrename, rename. (intrigeri) - * rename: Refactor subpage rename handling code into rename hook. (intrigeri) - * po: New plugin, suporting translation of wiki pages using po files. - (intrigeri) - * Add build machinery to build po files to translate the underlay wikis, - * Add further build machinery to generate translated underlays from - the po file, for use by wikis whose primary language is not English. - * Add Danish basewiki translation by Jonas Smedegaard. - * img: Fix adding of dependency from page to the image. - * pagestats: add `among` parameter, which only counts links from specified - pages (smcv) - * pagestats: when making a tag cloud, don't emit links where the tag is - unused (smcv) - * map: Avoid emitting an unclosed ul element if the map is empty. (harishcm) - * inline: Add pagenames parameter that can be used to list a set of - pages to inline, in a specific order, without using a PageSpec. (smcv) - * Add getsource plugin (Will, smcv)"""]] \ No newline at end of file diff --git a/doc/news/version_3.20091022.mdwn b/doc/news/version_3.20091022.mdwn new file mode 100644 index 000000000..6fc9713c0 --- /dev/null +++ b/doc/news/version_3.20091022.mdwn @@ -0,0 +1,10 @@ +ikiwiki 3.20091022 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * edittemplate: Allow template page name to be specified using anything + legal for a wikilink (including eg, leading slashes). + * edittemplate: Work around bug #551499 in CGI::FormBuilder. + * Fix a bug introduced in the last version that caused ikiwiki + to skip all files if a sourcedir of "./" was specified. + * Support CFLAGS when building wrapper. + * meta: Gather permalink info on scan pass so it is available + to inline when using a template that does not include page content."""]] \ No newline at end of file -- cgit v1.2.3 From 6807c0422619abbb2ec710f3260c2d21cd1378a5 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 23 Oct 2009 12:17:19 +0100 Subject: update user page to track another todo item --- doc/users/jon.mdwn | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 54f1ac383..7895a03bf 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -18,6 +18,16 @@ of software for this task. I am also working on some ikiwiki hacks: +* [[todo/allow site-wide meta definitions]] + +I am mostly interested in ikiwiki usability issues: + + * [[bugs/the login page is unclear when multiple methods exist]] + * [[bugs/backlinks onhover thing can go weird]] + * [[todo/CSS classes for links]] + +The following I have been looking at, but are on the back-burner: + * an alternative approach to [[plugins/comments]] (see [[todo/more flexible inline postform]] for one piece of the puzzle; <http://dev.jmtd.net/comments/> for some investigation into making the post @@ -25,9 +35,3 @@ I am also working on some ikiwiki hacks: * a system for [[forum/managing_todo_lists]] (see also [[todo/interactive todo lists]] and <http://dev.jmtd.net/outliner/> for the current WIP). - -I am currently mostly interested in ikiwiki usability issues: - - * [[bugs/the login page is unclear when multiple methods exist]] - * [[bugs/backlinks onhover thing can go weird]] - * [[todo/CSS classes for links]] -- cgit v1.2.3 From 0aa1ce01dda6d0c2c997e55294dddd430709413a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 23 Oct 2009 12:44:36 -0400 Subject: add news item for ikiwiki 3.20091023 --- doc/news/version_3.1415926.mdwn | 53 ---------------------------------------- doc/news/version_3.20091023.mdwn | 3 +++ 2 files changed, 3 insertions(+), 53 deletions(-) delete mode 100644 doc/news/version_3.1415926.mdwn create mode 100644 doc/news/version_3.20091023.mdwn (limited to 'doc') diff --git a/doc/news/version_3.1415926.mdwn b/doc/news/version_3.1415926.mdwn deleted file mode 100644 index d31812c8e..000000000 --- a/doc/news/version_3.1415926.mdwn +++ /dev/null @@ -1,53 +0,0 @@ -News for ikiwiki 3.1415926: - - In order to fix a performance bug, all wikis need to be rebuilt on - upgrade to this version. If you listed your wiki in - /etc/ikiwiki/wikilist this will be done automatically when the - Debian package is upgraded. Or use ikiwiki-mass-rebuild to force - a rebuild. - -ikiwiki 3.1415926 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * [ Joey Hess ] - * po: Detect if nowrapi18n can't be passed to po4a, and warn about - the old version, but continue. Closes: #[541205](http://bugs.debian.org/541205) - * inline: Avoid use of my $\_ as it fails with older perls. - Closes: #[541215](http://bugs.debian.org/541215) - * Add discussionpage configuration setting. - * Several optimisations, including speedups to orphans and brokenlinks - calculation. - * meta, img: Fix bugs in dependency code. (smcv) - * Allow building ikiwiki on systems w/o po4a -- - building of the translated underlays will be skipped in this case. - * Add basic styling of po plugin's languages list. - * inline: Display an error if feedpages is specified and fails to match - due to a problem such as created\_before being told to check against - a page that does not exist. - * Remove deprecated ikiwiki/blog and ikiwiki/preprocessordirective - pages from the basewiki. - * Updated French program translation from Philippe Batailler. - Closes: #[542036](http://bugs.debian.org/542036) - * po: Fixed to run rcs\_add ralative to srcdir. - * Italian program translation from Luca Bruno. - * Fix example blog's tags/life to not have a broken PageSpec. - Closes: #[543510](http://bugs.debian.org/543510) - * Optimize the dependencies list. This also fixes a bug - that could cause repeated refreshes of the wiki to grow - increasingly larger dependency lists, and get increasingly - slower. (smcv) - * Rebuild wikis on upgrade to this version to fix bloat caused - by the dependency bug. - * Further optimisation of dependency handling by adding a special - case for simple page dependencies. (smcv) - * htmltidy: Return an error message if tidy fails. Closes: #[543722](http://bugs.debian.org/543722) - * po: Fix name of translated toplevel index page. (intrigeri) - * po: Fix display of links from a translated page to itself (ntrigeri) - * Add Czech basewiki translation from Miroslav Kure. - * po: fix interdiction to create pages of type po (intrigeri) - * po: po: favor the type of linking page's masterpage on page creation - (intrigeri) - * img: Don't generate new verison of image if it is scaled to be - larger in either dimension. - * [ Josh Triplett ] - * teximg: Replace the insufficient blacklist with the built-in security - mechanisms of TeX. ([[!cve CVE-2009-2944]])"""]] diff --git a/doc/news/version_3.20091023.mdwn b/doc/news/version_3.20091023.mdwn new file mode 100644 index 000000000..1d4167a1a --- /dev/null +++ b/doc/news/version_3.20091023.mdwn @@ -0,0 +1,3 @@ +ikiwiki 3.20091023 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * inline: Fix raw mode. Closes: #[552114](http://bugs.debian.org/552114)"""]] \ No newline at end of file -- cgit v1.2.3 From ed1fa6c887c0677e9ba80e1d422ba133a218ac54 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 23 Oct 2009 12:49:31 -0400 Subject: belated thanks to Jon Dowland --- doc/tipjar.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/tipjar.mdwn b/doc/tipjar.mdwn index 1f361f99f..87a497fd1 100644 --- a/doc/tipjar.mdwn +++ b/doc/tipjar.mdwn @@ -14,6 +14,7 @@ Thanks to the following people for their kind contributions: * Paweł Tęcza * Mick Pollard * Nico Schottelius +* Jon Dowland (Note that this page is locked to prevent anyone from tampering with the PayPal button. If you prefer your donation *not* be listed here, let [[Joey]] know.) -- cgit v1.2.3 From ba7442b845d7857d69c77bcd512aa4e41dca4a22 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Fri, 23 Oct 2009 19:15:23 -0400 Subject: had a crack at this tonight --- doc/todo/allow_site-wide_meta_definitions.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 70ccc2b68..57bc7a6fd 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -72,3 +72,13 @@ my github ikiwiki fork): > by the fact that some (but not all!) meta headers are idempotent. > > --[[smcv]] + +>> Thanks for your comment. Tonight I had a go at implementing the syntax +>> you propose here. I decided the simplest thing to do might be for the scan +>> subroutine to convert any hashes found in the meta_defaults list into calls +>> to the preprocess routine. I've got a bit stuck trying to convert a hash to +>> a named parameter list (or just a subroutine parameter list that is). I may +>> try to look again in the morning (brain a bit sleepy) +>> +>> ...and on writing this comment I see your second suggestion was essentially +>> to do exactly that :) -- [[Jon]] -- cgit v1.2.3 From 9e4fa42676ddc6c8e73469bca52a66245845723c Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Fri, 23 Oct 2009 19:48:04 -0400 Subject: progress --- doc/todo/allow_site-wide_meta_definitions.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 57bc7a6fd..f935a9acb 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -82,3 +82,14 @@ my github ikiwiki fork): >> >> ...and on writing this comment I see your second suggestion was essentially >> to do exactly that :) -- [[Jon]] + +>>> ok, it's easier than I thought, I just pass the hash and it's handled +>>> correctly. Right now can't figure out why my hashes get converted into +>>> strings prior to me seeing them in scan(): + + $VAR64 = [ + 'HASH(0xc2daf8)', + 'HASH(0xc2db40)' + ]; + +>>> ...but it *really* is bedtime :) -- [[Jon]] -- cgit v1.2.3 From de59a76e157936e6d95ed6474e188c0fdc353ee4 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Sat, 24 Oct 2009 16:49:37 +0100 Subject: update allow_site-wide_meta_definitions with last night's hacking --- doc/todo/allow_site-wide_meta_definitions.mdwn | 117 ++++++++++++++----------- 1 file changed, 66 insertions(+), 51 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index f935a9acb..3c6c3b5aa 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -5,11 +5,39 @@ I'd like to define [[plugins/meta]] values to apply across all pages site-wide unless the pages define their own: default values for meta definitions essentially. -Here's a patch to achieve this (also in the "defaultmeta" branch of -my github ikiwiki fork): + <snip old patch, see below for latest> + +-- [[Jon]] + +> This doesn't support multiple-argument meta directives like +> `link=x rel=y`, or meta directives with special side-effects like +> `updated`. +> +> The first could be solved (if you care) by a syntax like this: +> +> meta_defaults => [ +> { copyright => "© me" }, +> { link => "about:blank", rel => "silly", }, +> ] +> +> The second could perhaps be solved by invoking `meta::preprocess` from within +> `scan` (which might be a simplification anyway), although this is complicated +> by the fact that some (but not all!) meta headers are idempotent. +> +> --[[smcv]] + +>> Thanks for your comment. I've revised the patch to use the config syntax +>> you suggest. I need to perform some more testing to make sure I've +>> addressed the issues you highlight. +>> +>> I had to patch part of IkiWiki core, the merge routine in Setup, because +>> the use of `possibly_foolish_untaint` was causing the hashrefs at the deep +>> end of the data structure to be converted into strings. The specific change +>> I've made may not be acceptable, though -- I'd appreciate someone providing +>> some feedback on that hunk! diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm - index b229592..3132257 100644 + index 6fe9cda..c4079fd 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -13,6 +13,7 @@ sub import { @@ -20,76 +48,63 @@ my github ikiwiki fork): } sub getsetup () { - @@ -302,6 +303,15 @@ sub match { + @@ -305,6 +306,17 @@ sub match { } } +sub scan() { + my %params = @_; + my $page = $params{page}; - + foreach my $type (map { s/^meta_//; $_ } grep /^meta_/, keys %config) { - + $pagestate{$page}{meta}{$type} = $config{"meta_$type"} - + unless defined $pagestate{$page}{meta}{$type}; + + if($config{"meta_defaults"}) { + + foreach my $default (@{$config{"meta_defaults"}}) { + + preprocess(%$default, page => $page, + + destpage => $page, preview => 0); + + } + } +} + package IkiWiki::PageSpec; sub match_title ($$;@) { + diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm + index 8a25ecc..e4d50c9 100644 + --- a/IkiWiki/Setup.pm + +++ b/IkiWiki/Setup.pm + @@ -51,7 +51,13 @@ sub merge ($) { + $config{$c}=$setup{$c}; + } + else { + - $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}] + + $config{$c}=[map { + + if(ref $_ eq 'HASH') { + + $_ + + } else { + + IkiWiki::possibly_foolish_untaint($_) + + } + + } @{$setup{$c}}]; + } + } + elsif (ref $setup{$c} eq 'HASH') { diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn - index 000f461..200c4b2 100644 + index 000f461..8d34ee4 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn - @@ -12,6 +12,12 @@ also specifies some additional sub-parameters. + @@ -12,6 +12,16 @@ also specifies some additional sub-parameters. The field values are treated as HTML entity-escaped text, so you can include a quote in the text by writing `"` and so on. +You can also define site-wide defaults for meta values by including them - +in your setup file, e.g. + +in your setup file. The key used is `meta_defaults` and the value is a list + +of hashes, one per meta directive. e.g.: + - + meta_copyright => "Copyright 2007 by Joey Hess", - + meta_license => "GPL v2+", + + meta_defaults = [ + + { copyright => "Copyright 2007 by Joey Hess" }, + + { license => "GPL v2+" }, + + { link => "somepage", rel => "site entrypoint", }, + + ], + Supported fields: * title --- [[Jon]] - -> This doesn't support multiple-argument meta directives like -> `link=x rel=y`, or meta directives with special side-effects like -> `updated`. -> -> The first could be solved (if you care) by a syntax like this: -> -> meta_defaults => [ -> { copyright => "© me" }, -> { link => "about:blank", rel => "silly", }, -> ] -> -> The second could perhaps be solved by invoking `meta::preprocess` from within -> `scan` (which might be a simplification anyway), although this is complicated -> by the fact that some (but not all!) meta headers are idempotent. -> -> --[[smcv]] - ->> Thanks for your comment. Tonight I had a go at implementing the syntax ->> you propose here. I decided the simplest thing to do might be for the scan ->> subroutine to convert any hashes found in the meta_defaults list into calls ->> to the preprocess routine. I've got a bit stuck trying to convert a hash to ->> a named parameter list (or just a subroutine parameter list that is). I may ->> try to look again in the morning (brain a bit sleepy) ->> ->> ...and on writing this comment I see your second suggestion was essentially ->> to do exactly that :) -- [[Jon]] - ->>> ok, it's easier than I thought, I just pass the hash and it's handled ->>> correctly. Right now can't figure out why my hashes get converted into ->>> strings prior to me seeing them in scan(): - - $VAR64 = [ - 'HASH(0xc2daf8)', - 'HASH(0xc2db40)' - ]; - ->>> ...but it *really* is bedtime :) -- [[Jon]] +>> -- [[Jon]] -- cgit v1.2.3 From 0c28536117d55fbc3a97ea59f1b37e5ef8807a34 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Sat, 24 Oct 2009 16:59:41 +0100 Subject: split the patch out of the page (and minor update it) --- doc/todo/allow_site-wide_meta_definitions.mdwn | 75 ++-------------------- .../current-patch.mdwn | 70 ++++++++++++++++++++ 2 files changed, 74 insertions(+), 71 deletions(-) create mode 100644 doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 3c6c3b5aa..3d506965f 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -36,75 +36,8 @@ definitions essentially. >> I've made may not be acceptable, though -- I'd appreciate someone providing >> some feedback on that hunk! - diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm - index 6fe9cda..c4079fd 100644 - --- a/IkiWiki/Plugin/meta.pm - +++ b/IkiWiki/Plugin/meta.pm - @@ -13,6 +13,7 @@ sub import { - hook(type => "needsbuild", id => "meta", call => \&needsbuild); - hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); - hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); - + hook(type => "scan", id => "meta", call => \&scan); - } - - sub getsetup () { - @@ -305,6 +306,17 @@ sub match { - } - } - - +sub scan() { - + my %params = @_; - + my $page = $params{page}; - + if($config{"meta_defaults"}) { - + foreach my $default (@{$config{"meta_defaults"}}) { - + preprocess(%$default, page => $page, - + destpage => $page, preview => 0); - + } - + } - +} - + - package IkiWiki::PageSpec; - - sub match_title ($$;@) { - diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm - index 8a25ecc..e4d50c9 100644 - --- a/IkiWiki/Setup.pm - +++ b/IkiWiki/Setup.pm - @@ -51,7 +51,13 @@ sub merge ($) { - $config{$c}=$setup{$c}; - } - else { - - $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}] - + $config{$c}=[map { - + if(ref $_ eq 'HASH') { - + $_ - + } else { - + IkiWiki::possibly_foolish_untaint($_) - + } - + } @{$setup{$c}}]; - } - } - elsif (ref $setup{$c} eq 'HASH') { - diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn - index 000f461..8d34ee4 100644 - --- a/doc/ikiwiki/directive/meta.mdwn - +++ b/doc/ikiwiki/directive/meta.mdwn - @@ -12,6 +12,16 @@ also specifies some additional sub-parameters. - The field values are treated as HTML entity-escaped text, so you can include - a quote in the text by writing `"` and so on. - - +You can also define site-wide defaults for meta values by including them - +in your setup file. The key used is `meta_defaults` and the value is a list - +of hashes, one per meta directive. e.g.: - + - + meta_defaults = [ - + { copyright => "Copyright 2007 by Joey Hess" }, - + { license => "GPL v2+" }, - + { link => "somepage", rel => "site entrypoint", }, - + ], - + - Supported fields: - - * title +<code> +[[!inline pages="current-patch" raw=yes quick=yes]] +</code> ->> -- [[Jon]] + -- [[Jon]] diff --git a/doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn b/doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn new file mode 100644 index 000000000..c5e37e76e --- /dev/null +++ b/doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn @@ -0,0 +1,70 @@ +diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm +index 6fe9cda..c4079fd 100644 +--- a/IkiWiki/Plugin/meta.pm ++++ b/IkiWiki/Plugin/meta.pm +@@ -13,6 +13,7 @@ sub import { + hook(type => "needsbuild", id => "meta", call => \&needsbuild); + hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); + hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); ++ hook(type => "scan", id => "meta", call => \&scan); + } + + sub getsetup () { +@@ -305,6 +306,17 @@ sub match { + } + } + ++sub scan() { ++ my %params = @_; ++ my $page = $params{page}; ++ if($config{"meta_defaults"}) { ++ foreach my $default (@{$config{"meta_defaults"}}) { ++ preprocess(%$default, page => $page, ++ destpage => $page, preview => 0); ++ } ++ } ++} ++ + package IkiWiki::PageSpec; + + sub match_title ($$;@) { +diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm +index 8a25ecc..e4d50c9 100644 +--- a/IkiWiki/Setup.pm ++++ b/IkiWiki/Setup.pm +@@ -51,7 +51,13 @@ sub merge ($) { + $config{$c}=$setup{$c}; + } + else { +- $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}] ++ $config{$c}=[map { ++ if(ref $_ eq 'HASH') { ++ $_ ++ } else { ++ IkiWiki::possibly_foolish_untaint($_) ++ } ++ } @{$setup{$c}}]; + } + } + elsif (ref $setup{$c} eq 'HASH') { +diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn +index 000f461..8d34ee4 100644 +--- a/doc/ikiwiki/directive/meta.mdwn ++++ b/doc/ikiwiki/directive/meta.mdwn +@@ -12,6 +12,16 @@ also specifies some additional sub-parameters. + The field values are treated as HTML entity-escaped text, so you can include + a quote in the text by writing `"` and so on. + ++You can also define site-wide defaults for meta values by including them ++in your setup file. The key used is `meta_defaults` and the value is a list ++of hashes, one per meta directive. e.g.: ++ ++ meta_defaults = [ ++ { copyright => "Copyright 2007 by Joey Hess" }, ++ { license => "GPL v2+" }, ++ { link => "somepage", rel => "site entrypoint", }, ++ ], ++ + Supported fields: + + * title -- cgit v1.2.3 From 6f84c0b5608ccf8faae52040d5ebbeb6b59fb063 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Sat, 24 Oct 2009 17:01:20 +0100 Subject: try to fix my inline --- doc/todo/allow_site-wide_meta_definitions.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 3d506965f..f56bf5c3c 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -37,7 +37,7 @@ definitions essentially. >> some feedback on that hunk! <code> -[[!inline pages="current-patch" raw=yes quick=yes]] +[[!inline pages="allow site-wide meta definitions/current-patch" raw=yes quick=yes]] </code> -- [[Jon]] -- cgit v1.2.3 From b474e61eee26c5f0f7c9537562a9d6c2be0ad68f Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Sat, 24 Oct 2009 17:22:01 +0100 Subject: try to fix my inline, second attempt --- doc/todo/allow_site-wide_meta_definitions.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index f56bf5c3c..2e8296640 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -37,7 +37,7 @@ definitions essentially. >> some feedback on that hunk! <code> -[[!inline pages="allow site-wide meta definitions/current-patch" raw=yes quick=yes]] +[[!inline pages="allow_site-wide_meta_definitions/current-patch" raw=yes quick=yes]] </code> -- [[Jon]] -- cgit v1.2.3 From 118058f0f530f0171fb625815aa0aae992e3f4b6 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Sat, 24 Oct 2009 17:23:52 +0100 Subject: give up and just inline the patch again --- doc/todo/allow_site-wide_meta_definitions.mdwn | 74 +++++++++++++++++++++- .../current-patch.mdwn | 70 -------------------- 2 files changed, 71 insertions(+), 73 deletions(-) delete mode 100644 doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 2e8296640..d95f8bf13 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -36,8 +36,76 @@ definitions essentially. >> I've made may not be acceptable, though -- I'd appreciate someone providing >> some feedback on that hunk! -<code> -[[!inline pages="allow_site-wide_meta_definitions/current-patch" raw=yes quick=yes]] -</code> + + diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm + index 6fe9cda..c4079fd 100644 + --- a/IkiWiki/Plugin/meta.pm + +++ b/IkiWiki/Plugin/meta.pm + @@ -13,6 +13,7 @@ sub import { + hook(type => "needsbuild", id => "meta", call => \&needsbuild); + hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); + hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); + + hook(type => "scan", id => "meta", call => \&scan); + } + + sub getsetup () { + @@ -305,6 +306,17 @@ sub match { + } + } + + +sub scan() { + + my %params = @_; + + my $page = $params{page}; + + if($config{"meta_defaults"}) { + + foreach my $default (@{$config{"meta_defaults"}}) { + + preprocess(%$default, page => $page, + + destpage => $page, preview => 0); + + } + + } + +} + + + package IkiWiki::PageSpec; + + sub match_title ($$;@) { + diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm + index 8a25ecc..e4d50c9 100644 + --- a/IkiWiki/Setup.pm + +++ b/IkiWiki/Setup.pm + @@ -51,7 +51,13 @@ sub merge ($) { + $config{$c}=$setup{$c}; + } + else { + - $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}] + + $config{$c}=[map { + + if(ref $_ eq 'HASH') { + + $_ + + } else { + + IkiWiki::possibly_foolish_untaint($_) + + } + + } @{$setup{$c}}]; + } + } + elsif (ref $setup{$c} eq 'HASH') { + diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn + index 000f461..8d34ee4 100644 + --- a/doc/ikiwiki/directive/meta.mdwn + +++ b/doc/ikiwiki/directive/meta.mdwn + @@ -12,6 +12,16 @@ also specifies some additional sub-parameters. + The field values are treated as HTML entity-escaped text, so you can include + a quote in the text by writing `"` and so on. + + +You can also define site-wide defaults for meta values by including them + +in your setup file. The key used is `meta_defaults` and the value is a list + +of hashes, one per meta directive. e.g.: + + + + meta_defaults = [ + + { copyright => "Copyright 2007 by Joey Hess" }, + + { license => "GPL v2+" }, + + { link => "somepage", rel => "site entrypoint", }, + + ], + + + Supported fields: + + * title -- [[Jon]] diff --git a/doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn b/doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn deleted file mode 100644 index c5e37e76e..000000000 --- a/doc/todo/allow_site-wide_meta_definitions/current-patch.mdwn +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm -index 6fe9cda..c4079fd 100644 ---- a/IkiWiki/Plugin/meta.pm -+++ b/IkiWiki/Plugin/meta.pm -@@ -13,6 +13,7 @@ sub import { - hook(type => "needsbuild", id => "meta", call => \&needsbuild); - hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); - hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); -+ hook(type => "scan", id => "meta", call => \&scan); - } - - sub getsetup () { -@@ -305,6 +306,17 @@ sub match { - } - } - -+sub scan() { -+ my %params = @_; -+ my $page = $params{page}; -+ if($config{"meta_defaults"}) { -+ foreach my $default (@{$config{"meta_defaults"}}) { -+ preprocess(%$default, page => $page, -+ destpage => $page, preview => 0); -+ } -+ } -+} -+ - package IkiWiki::PageSpec; - - sub match_title ($$;@) { -diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm -index 8a25ecc..e4d50c9 100644 ---- a/IkiWiki/Setup.pm -+++ b/IkiWiki/Setup.pm -@@ -51,7 +51,13 @@ sub merge ($) { - $config{$c}=$setup{$c}; - } - else { -- $config{$c}=[map { IkiWiki::possibly_foolish_untaint($_) } @{$setup{$c}}] -+ $config{$c}=[map { -+ if(ref $_ eq 'HASH') { -+ $_ -+ } else { -+ IkiWiki::possibly_foolish_untaint($_) -+ } -+ } @{$setup{$c}}]; - } - } - elsif (ref $setup{$c} eq 'HASH') { -diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn -index 000f461..8d34ee4 100644 ---- a/doc/ikiwiki/directive/meta.mdwn -+++ b/doc/ikiwiki/directive/meta.mdwn -@@ -12,6 +12,16 @@ also specifies some additional sub-parameters. - The field values are treated as HTML entity-escaped text, so you can include - a quote in the text by writing `"` and so on. - -+You can also define site-wide defaults for meta values by including them -+in your setup file. The key used is `meta_defaults` and the value is a list -+of hashes, one per meta directive. e.g.: -+ -+ meta_defaults = [ -+ { copyright => "Copyright 2007 by Joey Hess" }, -+ { license => "GPL v2+" }, -+ { link => "somepage", rel => "site entrypoint", }, -+ ], -+ - Supported fields: - - * title -- cgit v1.2.3 From 128e31d658b67411168775dcf8d9b9c9675e28cc Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Sat, 24 Oct 2009 17:27:48 +0100 Subject: inline the correct patch, and then go shopping --- doc/todo/allow_site-wide_meta_definitions.mdwn | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index d95f8bf13..20c8c02ac 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -36,31 +36,29 @@ definitions essentially. >> I've made may not be acceptable, though -- I'd appreciate someone providing >> some feedback on that hunk! - diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm - index 6fe9cda..c4079fd 100644 + index 6fe9cda..2f8c098 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm - @@ -13,6 +13,7 @@ sub import { + @@ -13,6 +13,8 @@ sub import { hook(type => "needsbuild", id => "meta", call => \&needsbuild); hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); - + hook(type => "scan", id => "meta", call => \&scan); + + hook(type => "scan", id => "meta", call => \&scan) + + if $config{"meta_defaults"}; } sub getsetup () { - @@ -305,6 +306,17 @@ sub match { + @@ -305,6 +307,15 @@ sub match { } } +sub scan() { + my %params = @_; + my $page = $params{page}; - + if($config{"meta_defaults"}) { - + foreach my $default (@{$config{"meta_defaults"}}) { - + preprocess(%$default, page => $page, - + destpage => $page, preview => 0); - + } + + foreach my $default (@{$config{"meta_defaults"}}) { + + preprocess(%$default, page => $page, + + destpage => $page, preview => 0); + } +} + @@ -108,4 +106,4 @@ definitions essentially. * title - -- [[Jon]] +-- [[Jon]] -- cgit v1.2.3 From 0dbb16fd5a9f573c6b49006f7452cd60474d9803 Mon Sep 17 00:00:00 2001 From: PaulePanter <PaulePanter@web> Date: Sun, 25 Oct 2009 10:32:49 -0400 Subject: Typo. --- doc/ikiwiki/directive/comment.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/comment.mdwn b/doc/ikiwiki/directive/comment.mdwn index 21386dfc3..693a92770 100644 --- a/doc/ikiwiki/directive/comment.mdwn +++ b/doc/ikiwiki/directive/comment.mdwn @@ -32,7 +32,7 @@ metadata of the comment. * `ip` - Can be used to record the IP address of a commenter, if they posted anonymously. * `claimedauthor` - Records the name that the user entered, - if anonmous commenters are allowed to enter their (unverified) + if anonymous commenters are allowed to enter their (unverified) name. [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From b54b8215d0c150410e4a629caa9b0035d69f89b2 Mon Sep 17 00:00:00 2001 From: PaulePanter <PaulePanter@web> Date: Sun, 25 Oct 2009 16:13:24 -0400 Subject: Question about interaction of `feedshow` and `show`. --- doc/ikiwiki/directive/inline/discussion.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index be0665d04..e5cfeb91c 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -124,3 +124,19 @@ My index page has: Else can you please suggest a smarter way of getting certain data out from pages for a inline index? --[[hendry]] + +--- + +## Interaction of `show` and `feedshow` + +Reading the documentation I would think that `feedshow` does not +influence `show`. + + [[!inline pages="./blog/*" archive=yes quick=yes feedshow=10 sort=title reverse=yes]] + +Only ten pages are listed in this example although `archive` is set to +yes. Removing `feedshow=10` all matching pages are shown. + +Is that behaviour intended? + +--[[PaulePanter]] -- cgit v1.2.3 From 8dfd5289a970e2a77499a2178c493c2c233ba27e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 26 Oct 2009 13:24:27 -0400 Subject: moderatedcomments: New plugin to allow comment moderation w/o relying on blogspam.net. --- IkiWiki/Plugin/moderatedcomments.pm | 44 +++++++++++++++++++++++++++++++++++++ debian/changelog | 2 ++ doc/plugins/comments.mdwn | 3 ++- doc/plugins/moderatedcomments.mdwn | 10 +++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 IkiWiki/Plugin/moderatedcomments.pm create mode 100644 doc/plugins/moderatedcomments.mdwn (limited to 'doc') diff --git a/IkiWiki/Plugin/moderatedcomments.pm b/IkiWiki/Plugin/moderatedcomments.pm new file mode 100644 index 000000000..2555927b7 --- /dev/null +++ b/IkiWiki/Plugin/moderatedcomments.pm @@ -0,0 +1,44 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::moderatedcomments; + +use warnings; +use strict; +use IkiWiki 3.00; + +sub import { + hook(type => "getsetup", id => "moderatedcomments", call => \&getsetup); + hook(type => "checkcontent", id => "moderatedcomments", call => \&checkcontent); +} + +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => 0, + }, + moderate_users => { + type => 'boolean', + example => 1, + description => 'Moderate comments of logged-in users?', + safe => 1, + rebuild => 0, + }, +} + +sub checkcontent (@) { + my %params=@_; + + # only handle comments + return undef unless pagespec_match($params{page}, "postcomment(*)", + location => $params{page}); + + # admins and maybe users can comment w/o moderation + my $session=$params{session}; + my $user=$session->param("name") if $session; + return undef if defined $user && (IkiWiki::is_admin($user) || + (exists $config{moderate_users} && ! $config{moderate_users})); + + return gettext("comment needs moderation"); +} + +1 diff --git a/debian/changelog b/debian/changelog index 336924317..f517111b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ ikiwiki (3.20091024) UNRELEASED; urgency=low * po: Fix breakage caused by changes to render code. * mdwn: Avoid trying to use multimarkdown if it is not installed. + * moderatedcomments: New plugin to allow comment moderation w/o relying + on blogspam.net. -- Joey Hess <joeyh@debian.org> Mon, 26 Oct 2009 11:53:32 -0400 diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn index 7e2232411..b6d4d252b 100644 --- a/doc/plugins/comments.mdwn +++ b/doc/plugins/comments.mdwn @@ -45,7 +45,8 @@ There are some global options for the setup file: ## comment moderation If you enable the [[blogspam]] plugin, comments that appear spammy will be -held for moderation. Wiki admins can access the comment moderation queue +held for moderation. (Or with the [[moderatedcomments]] plugin, all +comments will be held.) Wiki admins can access the comment moderation queue via a button on their Preferences page. The comments are stored in `.ikiwiki/comments_pending/`, and can be diff --git a/doc/plugins/moderatedcomments.mdwn b/doc/plugins/moderatedcomments.mdwn new file mode 100644 index 000000000..97924d742 --- /dev/null +++ b/doc/plugins/moderatedcomments.mdwn @@ -0,0 +1,10 @@ +[[!template id=plugin name=moderatedcomments author="[[Joey]]"]] +[[!tag type/auth]] + +This plugin causes [[comments]] to be held for manual moderation. +Admins can access the comment moderation queue via their preferences page. + +By default, all comments made by anyone who is not an admin will be held +for moderation. The `moderate_users` setting can be set to false to avoid +moderating comments of logged-in users, while still moderating anonymous +comments. -- cgit v1.2.3 From 0961af83fb6d9d7241363644037dccfb2fedaf0a Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 01:50:30 -0400 Subject: --- doc/soc/ideas.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/soc/ideas.mdwn b/doc/soc/ideas.mdwn index 88f06b0f1..07c7e669e 100644 --- a/doc/soc/ideas.mdwn +++ b/doc/soc/ideas.mdwn @@ -6,3 +6,4 @@ but please don't add the `soc` tag yourself. [[!inline pages="(todo/* or bugs/*) and link(soc) and !todo/done and !link(todo/done) and !bugs/done and !link(bugs/done) and !*/Discussion" actions=yes show=0]] +[http://www.yaheodj.com/ khn] -- cgit v1.2.3 From a4693301c22e10fd8d521677bed276bbacfb0628 Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 01:53:23 -0400 Subject: --- doc/todo/Gallery.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Gallery.mdwn b/doc/todo/Gallery.mdwn index f41980333..39316b86f 100644 --- a/doc/todo/Gallery.mdwn +++ b/doc/todo/Gallery.mdwn @@ -80,4 +80,4 @@ Additional details are available [here](http://myweb.unomaha.edu/~ajain/ikiwikig See also [[/users/smcv/gallery]] for another implementation of the same sort of thing. Unfortunately, none of the implementation ideas -I have there seem quite right either... --[[smcv]] +I have there seem quite right either... --[[smcv]] [http://www.pipiskmd.com/ khan] -- cgit v1.2.3 From 7034e3cafe267999104e2ab12ce0dea13473d2e0 Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 01:58:10 -0400 Subject: --- doc/todo/Gallery.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Gallery.mdwn b/doc/todo/Gallery.mdwn index 39316b86f..5018d85c4 100644 --- a/doc/todo/Gallery.mdwn +++ b/doc/todo/Gallery.mdwn @@ -80,4 +80,4 @@ Additional details are available [here](http://myweb.unomaha.edu/~ajain/ikiwikig See also [[/users/smcv/gallery]] for another implementation of the same sort of thing. Unfortunately, none of the implementation ideas -I have there seem quite right either... --[[smcv]] [http://www.pipiskmd.com/ khan] +I have there seem quite right either... --[[smcv]] [Lightbox](http://www.asererogether.com) -- cgit v1.2.3 From fca522cbf3dc6f325d4562cba97cd72372d016cb Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 02:07:33 -0400 Subject: --- doc/ikiwikiusers.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index f6ab34653..a73d7761e 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,7 +47,11 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) - +* [Executive MBA accreditation] [http://www.internationalaccreditation.org/IAO/resources/executive-education.asp] +* [Engineering accreditation] [http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp] +* [Psychology accreditation] [http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp] +* [Bachelors Degree Accreditation] [http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp] +* [Business education accreditation] [http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp] Personal sites and blogs ======================== -- cgit v1.2.3 From b7cc3ef2431c59584c2e57f1468425cbe3ba33cb Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 02:09:59 -0400 Subject: --- doc/ikiwikiusers.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index a73d7761e..f78ba1934 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,11 +47,11 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) -* [Executive MBA accreditation] [http://www.internationalaccreditation.org/IAO/resources/executive-education.asp] -* [Engineering accreditation] [http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp] -* [Psychology accreditation] [http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp] -* [Bachelors Degree Accreditation] [http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp] -* [Business education accreditation] [http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp] +* [Executive MBA accreditation] (http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) +* [Engineering accreditation] (http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) +* [Psychology accreditation] (http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) +* [Bachelors Degree Accreditation] (http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) +* [Business education accreditation] (http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) Personal sites and blogs ======================== -- cgit v1.2.3 From 739b7c158c46de74ee62cdd99b4a818a48bc8f84 Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 02:07:33 -0400 Subject: --- doc/ikiwikiusers.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index f6ab34653..a73d7761e 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,7 +47,11 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) - +* [Executive MBA accreditation] [http://www.internationalaccreditation.org/IAO/resources/executive-education.asp] +* [Engineering accreditation] [http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp] +* [Psychology accreditation] [http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp] +* [Bachelors Degree Accreditation] [http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp] +* [Business education accreditation] [http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp] Personal sites and blogs ======================== -- cgit v1.2.3 From b0bca45892415a09e5294539c3b8c2acc90a8d2b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 27 Oct 2009 02:06:23 -0400 Subject: Revert spam --- doc/soc/ideas.mdwn | 1 - doc/todo/Gallery.mdwn | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/soc/ideas.mdwn b/doc/soc/ideas.mdwn index 07c7e669e..88f06b0f1 100644 --- a/doc/soc/ideas.mdwn +++ b/doc/soc/ideas.mdwn @@ -6,4 +6,3 @@ but please don't add the `soc` tag yourself. [[!inline pages="(todo/* or bugs/*) and link(soc) and !todo/done and !link(todo/done) and !bugs/done and !link(bugs/done) and !*/Discussion" actions=yes show=0]] -[http://www.yaheodj.com/ khn] diff --git a/doc/todo/Gallery.mdwn b/doc/todo/Gallery.mdwn index 5018d85c4..f41980333 100644 --- a/doc/todo/Gallery.mdwn +++ b/doc/todo/Gallery.mdwn @@ -80,4 +80,4 @@ Additional details are available [here](http://myweb.unomaha.edu/~ajain/ikiwikig See also [[/users/smcv/gallery]] for another implementation of the same sort of thing. Unfortunately, none of the implementation ideas -I have there seem quite right either... --[[smcv]] [Lightbox](http://www.asererogether.com) +I have there seem quite right either... --[[smcv]] -- cgit v1.2.3 From 0e6f0cea2cf229fa86a9871fbd290b35748223e7 Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 02:09:59 -0400 Subject: --- doc/ikiwikiusers.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index a73d7761e..f78ba1934 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,11 +47,11 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) -* [Executive MBA accreditation] [http://www.internationalaccreditation.org/IAO/resources/executive-education.asp] -* [Engineering accreditation] [http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp] -* [Psychology accreditation] [http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp] -* [Bachelors Degree Accreditation] [http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp] -* [Business education accreditation] [http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp] +* [Executive MBA accreditation] (http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) +* [Engineering accreditation] (http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) +* [Psychology accreditation] (http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) +* [Bachelors Degree Accreditation] (http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) +* [Business education accreditation] (http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) Personal sites and blogs ======================== -- cgit v1.2.3 From 799fb15cfd8dcae62228018303a564999201a1fb Mon Sep 17 00:00:00 2001 From: Smith <Smith@web> Date: Tue, 27 Oct 2009 02:11:32 -0400 Subject: --- doc/ikiwikiusers.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index f78ba1934..c3fe9f2fa 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,11 +47,11 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) -* [Executive MBA accreditation] (http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) -* [Engineering accreditation] (http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) -* [Psychology accreditation] (http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) -* [Bachelors Degree Accreditation] (http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) -* [Business education accreditation] (http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) +* [Executive MBA accreditation](http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) +* [Engineering accreditation](http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) +* [Psychology accreditation](http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) +* [Bachelors Degree Accreditation](http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) +* [Business education accreditation](http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) Personal sites and blogs ======================== -- cgit v1.2.3 From 52499701db1e7b35b2ea4db95c9bfb2182fa7fc7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 27 Oct 2009 02:10:38 -0400 Subject: Revert spam (and you're banned) --- doc/ikiwikiusers.mdwn | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index f78ba1934..f6ab34653 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,11 +47,7 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) -* [Executive MBA accreditation] (http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) -* [Engineering accreditation] (http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) -* [Psychology accreditation] (http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) -* [Bachelors Degree Accreditation] (http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) -* [Business education accreditation] (http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) + Personal sites and blogs ======================== -- cgit v1.2.3 From bea089d6eced985635498235995e14be41fa4a0d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 27 Oct 2009 02:13:50 -0400 Subject: Revert spam --- doc/ikiwikiusers.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index c3fe9f2fa..f78ba1934 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,11 +47,11 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) -* [Executive MBA accreditation](http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) -* [Engineering accreditation](http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) -* [Psychology accreditation](http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) -* [Bachelors Degree Accreditation](http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) -* [Business education accreditation](http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) +* [Executive MBA accreditation] (http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) +* [Engineering accreditation] (http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) +* [Psychology accreditation] (http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) +* [Bachelors Degree Accreditation] (http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) +* [Business education accreditation] (http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) Personal sites and blogs ======================== -- cgit v1.2.3 From e186cd7d164d468dec3e5780e1df0c0bcfc281c1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 27 Oct 2009 02:15:41 -0400 Subject: Revert spam --- doc/ikiwikiusers.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index f78ba1934..a73d7761e 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,11 +47,11 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) -* [Executive MBA accreditation] (http://www.internationalaccreditation.org/IAO/resources/executive-education.asp) -* [Engineering accreditation] (http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp) -* [Psychology accreditation] (http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp) -* [Bachelors Degree Accreditation] (http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp) -* [Business education accreditation] (http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp) +* [Executive MBA accreditation] [http://www.internationalaccreditation.org/IAO/resources/executive-education.asp] +* [Engineering accreditation] [http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp] +* [Psychology accreditation] [http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp] +* [Bachelors Degree Accreditation] [http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp] +* [Business education accreditation] [http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp] Personal sites and blogs ======================== -- cgit v1.2.3 From 8eec30159e49360257d01311243c4d78528854f1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 27 Oct 2009 02:17:20 -0400 Subject: Revert spam --- doc/ikiwikiusers.mdwn | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index a73d7761e..f6ab34653 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,11 +47,7 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) -* [Executive MBA accreditation] [http://www.internationalaccreditation.org/IAO/resources/executive-education.asp] -* [Engineering accreditation] [http://www.internationalaccreditation.org/IAO/resources/engineering-education-accrediation.asp] -* [Psychology accreditation] [http://www.internationalaccreditation.org/IAO/resources/psychology-education-accrediation.asp] -* [Bachelors Degree Accreditation] [http://www.internationalaccreditation.org/IAO/resources/programs-accreditation.asp] -* [Business education accreditation] [http://www.internationalaccreditation.org/IAO/resources/business-education-accrediation.asp] + Personal sites and blogs ======================== -- cgit v1.2.3 From f1558020131a3fc6d0d611441a12a5598e4b917f Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Tue, 27 Oct 2009 04:17:01 -0400 Subject: --- doc/todo/Support_XML-RPC-based_blogging.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/Support_XML-RPC-based_blogging.mdwn b/doc/todo/Support_XML-RPC-based_blogging.mdwn index f9685be73..6a0593b17 100644 --- a/doc/todo/Support_XML-RPC-based_blogging.mdwn +++ b/doc/todo/Support_XML-RPC-based_blogging.mdwn @@ -9,6 +9,9 @@ blog names would work. --[[JoshTriplett]] >> I'd love to see support for this and would be happy to contribute towards a bounty (say US$100) :-). [PmWiki](http://www.pmwiki.org/) has a plugin which [implements this](http://www.pmwiki.org/wiki/Cookbook/XMLRPC) in a way which seems fairly sensible as an end user. --[[AdamShand]] +>>> Bump. This would be a nice feature, and with the talent on this project I'm sure it could be done safely, too. + + [[!tag soc]] [[!tag wishlist]] -- cgit v1.2.3 From 11fc28970b329334d88d3667e5b55e0d57e353ab Mon Sep 17 00:00:00 2001 From: Jogo <Jogo@web> Date: Tue, 27 Oct 2009 17:44:06 -0400 Subject: 403 response may be a "not found" too --- doc/plugins/404/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/plugins/404/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/404/discussion.mdwn b/doc/plugins/404/discussion.mdwn new file mode 100644 index 000000000..5a8e8ed85 --- /dev/null +++ b/doc/plugins/404/discussion.mdwn @@ -0,0 +1,3 @@ +With Apache, if you have a page foo/bar/baz but no foo/bar, and if you've +disabled `Indexes` option, you'll end up with a `403` response for foo/bar. +The 404 plugin doesn't try to handle that. But it should. -- [[Jogo]] -- cgit v1.2.3 From 57213fa0dbabd52001897d0b63bfb1a8d9d6926a Mon Sep 17 00:00:00 2001 From: Amitai Schlair <schmonz@magnetic-babysitter.(none)> Date: Tue, 27 Oct 2009 22:22:11 -0400 Subject: Google will take a full URL, request that the plugin send it --- doc/plugins/google/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/plugins/google/discussion.mdwn b/doc/plugins/google/discussion.mdwn index babc919d2..39403f9f9 100644 --- a/doc/plugins/google/discussion.mdwn +++ b/doc/plugins/google/discussion.mdwn @@ -4,3 +4,8 @@ This is not very good since the default ikiwiki templates produce XHTML instead of HTML. > Fixed, thanks for the patch! --[[Joey]] + +It works to pass the whole wiki baseurl to Google, not just the +domain, and appears to be legal. I've got a wiki that'd benefit +(it's a few directories down from the root). Can the plugin be +tweaked to do this? --[[schmonz]] -- cgit v1.2.3 From 471c04bfd2222dbb8aec9c350a1512213ef711f5 Mon Sep 17 00:00:00 2001 From: "http://blog.mithis.net/" <http://blog.mithis.net/@web> Date: Wed, 28 Oct 2009 03:47:41 -0400 Subject: Adding information about the media2iki github project. --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 1e5b912a9..ab6984494 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -8,6 +8,9 @@ converting some of the Mediawiki conventions into Ikiwiki ones. The following instructions describe ways of obtaining the current version of the wiki. We do not yet cover importing the history of edits. +Another set of instructions and conversion tools (which imports the full history) +can be found at <http://github.com/mithro/media2iki> + ## Step 1: Getting a list of pages The first bit of information you require is a list of pages in the Mediawiki. @@ -131,5 +134,7 @@ most of the Mediawiki syntax. [[sabr]] used to explain how to [import MediaWiki content into git](http://u32.net/Mediawiki_Conversion/index.html?updated), including full -edit history, but as of 2009/10/16 that site is not available. +edit history, but as of 2009/10/16 that site is not available. A copy of the +information found on this website is stored at <http://github.com/mithro/media2iki> + -- cgit v1.2.3 From 12a27e7025d8ad560976de8a1a76899daaf23a25 Mon Sep 17 00:00:00 2001 From: "http://blog.mithis.net/" <http://blog.mithis.net/@web> Date: Wed, 28 Oct 2009 03:57:05 -0400 Subject: Adding information about the media2iki github project. --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index ed3faa324..3e9c4dc3c 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -16,6 +16,10 @@ Also, some detail on converting mediawiki transclusion to ikiwiki inlines... > "Who knows, the remote site might disappear.". Right now, it appears to > have done just that. -- [[users/Jon]] +I have manage to recover most of the site using the Internet Archive. What +I was unable to retrieve I have rewritten. You can find a copy of the code +at <http://github.com/mithro/media2iki> + The iki-fast-load ruby script from the u32 page is given below: -- cgit v1.2.3 From 8b745be93321dbeca6e090af668a3d7920f680b7 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 28 Oct 2009 13:39:16 +0000 Subject: add XCB library to users --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index f6ab34653..eb998851a 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,6 +47,7 @@ Projects & Organizations * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) +* [The XCB library](http://xcb.freedesktop.org/) Personal sites and blogs ======================== -- cgit v1.2.3 From 6659d78aa2e3c66c9beadf180aa18438db0f40e5 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 28 Oct 2009 13:43:02 +0000 Subject: add dividers to split up the individual discussions going on --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 3e9c4dc3c..12c241a7d 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -13,6 +13,8 @@ Also, some detail on converting mediawiki transclusion to ikiwiki inlines... -- [[users/Jon]] +---- + > "Who knows, the remote site might disappear.". Right now, it appears to > have done just that. -- [[users/Jon]] @@ -20,6 +22,7 @@ I have manage to recover most of the site using the Internet Archive. What I was unable to retrieve I have rewritten. You can find a copy of the code at <http://github.com/mithro/media2iki> +---- The iki-fast-load ruby script from the u32 page is given below: @@ -617,6 +620,8 @@ Mediawiki.pm - A plugin which supports mediawiki format. 1 +---- + Hello. Got ikiwiki running and I'm planning to convert my personal Mediawiki wiki to ikiwiki so I can take offline copies around. If anyone has an old copy of the instructions, or any advice on where to start I'd be -- cgit v1.2.3 From 4df15554f84831d9e39db8719efa1b4b9ef9dd82 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 28 Oct 2009 13:51:00 +0000 Subject: response to mithro --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 12c241a7d..683a3f8ac 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -22,6 +22,21 @@ I have manage to recover most of the site using the Internet Archive. What I was unable to retrieve I have rewritten. You can find a copy of the code at <http://github.com/mithro/media2iki> +> This is excellent news. However, I'm still keen on there being a +> comprehensive and up-to-date set of instructions on *this* site. I wouldn't +> suggest importing that material into ikiwiki like-for-like (not least for +> [[licensing|freesoftware]] reasons), but it's excellent to have it available +> for reference, especially since it (currently) is the only set of +> instructions that gives you the whole history. +> +> The `mediawiki.pm` that was at u32.net is licensed GPL-2. I'd like to see it +> cleaned up and added to IkiWiki proper (although I haven't requested this +> yet, I suspect the way it (ab)uses linkify would disqualify it at present). +> +> I've imported Scott's initial `mediawiki.pm` into a repository at +> <http://github.com/jmtd/mediawiki.pm> as a start. +> -- [[Jon]] + ---- The iki-fast-load ruby script from the u32 page is given below: -- cgit v1.2.3 From 4dd50ba1bc4cb86c408ff45bbe06069e511e28fc Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 28 Oct 2009 13:52:05 +0000 Subject: update URL to mediawiki plugin --- doc/plugins/contrib/mediawiki.mdwn | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/mediawiki.mdwn b/doc/plugins/contrib/mediawiki.mdwn index 7bf1ba0df..13c2d04b2 100644 --- a/doc/plugins/contrib/mediawiki.mdwn +++ b/doc/plugins/contrib/mediawiki.mdwn @@ -1,7 +1,10 @@ [[!template id=plugin name=mediawiki author="[[sabr]]"]] [[!tag type/format]] -[The Mediawiki plugin](http://u32.net/Mediawiki_Plugin/) allows ikiwiki to -process pages written using MediaWiki markup. +The Mediawiki plugin allows ikiwiki to process pages written using MediaWiki +markup. -Available at <http://alcopop.org/~jon/mediawiki.pm> +Available at <http://github.com/jmtd/mediawiki.pm>. + +This plugin originally lived at <http://u32.net/Mediawiki_Plugin/>, but that +website has disappeared. -- cgit v1.2.3 From 16ff34af90b6490e2c2a951d9c74f08547b39730 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 28 Oct 2009 13:53:41 +0000 Subject: update info about my commits --- doc/users/jon.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 7895a03bf..8bb218cdc 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -4,8 +4,8 @@ team-documentation management system for a small-sized group of UNIX sysadmins. * my edits should appear either as 'Jon' (if I've used - [[tips/untrusted_git_push]]) or 'jmtd.net' (or once upon a time - 'alcopop.org/me/openid/' or 'jondowland'). + [[tips/untrusted_git_push]]); 'jmtd.net', 'jmtd.livejournal.com', + or once upon a time 'alcopop.org/me/openid/' or 'jondowland'. * My [homepage](http://jmtd.net/) is powered by ikiwiki I gave a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual -- cgit v1.2.3 From f782021644ddf8d2111f498f99e33db5fcc9c60a Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 28 Oct 2009 13:53:58 +0000 Subject: my talk was in 2008 --- doc/users/jon.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 8bb218cdc..55b3ee137 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -9,10 +9,10 @@ sysadmins. * My [homepage](http://jmtd.net/) is powered by ikiwiki I gave a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual -[Linux conference](http://www.ukuug.org/events/linux2008/) about organising -system administrator documentation. Roughly a third of this talk was -discussing IkiWiki in some technical detail and suggesting it as a good piece -of software for this task. +[Linux conference](http://www.ukuug.org/events/linux2008/) in 2008 about +organising system administrator documentation. Roughly a third of this talk +was discussing IkiWiki in some technical detail and suggesting it as a good +piece of software for this task. * slides at <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/>. -- cgit v1.2.3 From e5cab4165d9c12b8b68a15ce2c037d21dd2090b0 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 28 Oct 2009 13:55:03 +0000 Subject: add notes about mediawiki --- doc/users/jon.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 55b3ee137..ab71426d5 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -19,6 +19,9 @@ piece of software for this task. I am also working on some ikiwiki hacks: * [[todo/allow site-wide meta definitions]] +* Improving the means by which you can migrate from mediawiki to + IkiWiki. See [[tips/convert mediawiki to ikiwiki]] and the + [[plugins/contrib/mediawiki]] plugin. I am mostly interested in ikiwiki usability issues: -- cgit v1.2.3 From 879f2f683e878ca859f98eb8b182002cdbc69a20 Mon Sep 17 00:00:00 2001 From: Amitai Schlair <schmonz@magnetic-babysitter.(none)> Date: Wed, 28 Oct 2009 20:57:27 -0400 Subject: the setup file wants `rsync_command`, not `rsync` --- doc/plugins/rsync.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/rsync.mdwn b/doc/plugins/rsync.mdwn index db7fcb4f7..315b663c0 100644 --- a/doc/plugins/rsync.mdwn +++ b/doc/plugins/rsync.mdwn @@ -7,7 +7,7 @@ The command to run is specified by setting `rsync_command` in your setup file. The command will be run in your destdir, so something like this is a typical command: - rsync => 'rsync -qa --delete . user@host:/path/to/docroot/', + rsync_command => 'rsync -qa --delete . user@host:/path/to/docroot/', If using rsync over ssh, you will need to enable noninteractive ssh login to the remote host. It's also a good idea to specify the exact command line -- cgit v1.2.3 From ed8953716496354561218cdaf10153a8a4f4259d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 29 Oct 2009 07:50:53 -0400 Subject: fix dangling TMPL_IF noticed by rodyaj --- doc/tips/parentlinks_style.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index 5294e5452..b10d7cf56 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -77,6 +77,7 @@ following lines in `page.tmpl`: <a href="<TMPL_VAR NAME="URL">" class="height<TMPL_VAR NAME="HEIGHT">"> <TMPL_VAR NAME="PAGE"> </a> / + </TMPL_IF> </TMPL_LOOP> Then write the appropriate CSS bits for `a.height1`, etc. -- cgit v1.2.3 From 341e5cec5912fd593c0d0836efccf13344488ee2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 29 Oct 2009 07:57:30 -0400 Subject: fix indentation --- doc/tips/parentlinks_style.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index b10d7cf56..b992a11a0 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -77,7 +77,7 @@ following lines in `page.tmpl`: <a href="<TMPL_VAR NAME="URL">" class="height<TMPL_VAR NAME="HEIGHT">"> <TMPL_VAR NAME="PAGE"> </a> / - </TMPL_IF> + </TMPL_IF> </TMPL_LOOP> Then write the appropriate CSS bits for `a.height1`, etc. -- cgit v1.2.3 From ae7591fd18e4d96666971b8f5707dafd62b8d1e2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 29 Oct 2009 10:15:49 -0400 Subject: thoughts --- doc/todo/OpenSearch.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/todo/OpenSearch.mdwn b/doc/todo/OpenSearch.mdwn index e63ded688..c35da54e1 100644 --- a/doc/todo/OpenSearch.mdwn +++ b/doc/todo/OpenSearch.mdwn @@ -15,4 +15,24 @@ contain the wiki title from `ikiwiki.setup`. --[[JoshTriplett]] +> I support adding this. I think all that is needed, beyond the simple task +> of adding the link header, is to make the search plugin write out +> the xml file, probably based on a template. +> +> One problem is that the +> [specification](http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document) +> for the XML file contains a number of silly limits to field lenghs. +> For example, it wants a "ShortName" that identifies the search engine, +> to be 16 characters or less. The Description is limited to 1024, +> the LongName to 48. This limits what existing config settings can be +> reused for those. +> +> Another semi-problem is that the specification saz: +> +>> OpenSearch description documents should include at least one Query element of role="example" that is expected to return search results. Search clients may use this example query to validate that the search engine is working properly. +> +> How should ikiwiki know what example query will return actual results? +> (How would a client know if a HTML page contains results or not, anyway?) +> Sillyness. Ignore this? --[[Joey]] + [[wishlist]] -- cgit v1.2.3 From c4784a437d82c2c7747ffc600ac54355130b2ac0 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 29 Oct 2009 10:32:02 -0400 Subject: add an example of how to use the recently added HAS_PARENTLINKS --- doc/tips/parentlinks_style.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index b992a11a0..8b95cd396 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -82,6 +82,24 @@ following lines in `page.tmpl`: Then write the appropriate CSS bits for `a.height1`, etc. +Avoid showing title of toplevel index page +------------------------------------------ + +If you don't like having "index" appear on the top page of the wiki, +but you do want to see the name of the page otherwise, you can use a +special `HAS_PARENTLINKS` template variable that the plugin provides. +It is true for every page *except* the toplevel index. + +Here is an example of using it to hide the title of the toplevel index +page: + + <TMPL_LOOP NAME="PARENTLINKS"> + <a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>/ + </TMPL_LOOP> + <TMPL_IF HAS_PARENTLINKS> + <TMPL_VAR TITLE> + </TMPL_IF> + Full-blown example ------------------ -- cgit v1.2.3 From 49bdbcd24c8e410a22a1b7140e88c6345077dc18 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 29 Oct 2009 12:15:13 -0400 Subject: update, reorg, mention spec file --- doc/download.mdwn | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/download.mdwn b/doc/download.mdwn index 8f5004ca9..3b02e9127 100644 --- a/doc/download.mdwn +++ b/doc/download.mdwn @@ -1,16 +1,21 @@ -Here's how to get ikiwiki. See [[setup]] for how to use it, and be sure to -add your wiki to [[IkiwikiUsers]] if you use ikiwiki. +Here's how to get ikiwiki in source or prepackaged form. See [[setup]] for +how to use it, and be sure to add your wiki to [[IkiwikiUsers]] if you use +ikiwiki. -## tarball +## source + +Ikiwiki is developed in a [[git_repository|git]]. The best place to download a tarball of the latest release is from <http://packages.debian.org/unstable/source/ikiwiki>. -Installation steps and requirements are listed on the [[install]] page. +Manual installation steps and requirements are listed on the [[install]] page. ## packages -To install with apt, if using Debian or Ubuntu: +### Debian / Ubuntu + +To install with apt: apt-get install ikiwiki @@ -19,17 +24,26 @@ Or download the deb from <http://packages.debian.org/unstable/web/ikiwiki>. There is a backport of a recent version of ikiwiki for Debian 5.0 at <http://packages.debian.org/lenny-backports/ikiwiki>. -Fedora versions 8 and newer have RPMs of ikiwiki available. - There is also an unofficial backport of ikiwiki for Ubuntu Jaunty, provided by [[Paweł_Tęcza|users/ptecza]], at [http://gpa.net.icm.edu.pl/ubuntu/](http://gpa.net.icm.edu.pl/ubuntu/index-en.html). +### Fedora / other RPM based systems + +Fedora versions 8 and newer have RPMs of ikiwiki available. + +Ikiwiki's source includes a RPM spec file, which you can use to build your +own RPM. + +### BSD + NetBSD and many other platforms: pkgsrc has an [ikiwiki package](ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/www/ikiwiki/README.html). FreeBSD has ikiwiki in its [ports collection](http://www.freshports.org/www/ikiwiki/). +### Others + Gentoo has an [ebuild](http://bugs.gentoo.org/show_bug.cgi?id=144453) in its bug database. The [openSUSE Build Service](http://software.opensuse.org/search?baseproject=ALL&p=1&q=ikiwiki) has packages for openSUSE @@ -38,7 +52,3 @@ IkiWiki can be installed [from macports](http://www.macports.org/ports.php?by=na by running `sudo port install ikiwiki`. A [PKGBUILD for Arch Linux](http://aur.archlinux.org/packages.php?ID=12284) is in the AUR. - -## revision control - -Ikiwiki is developed in a [[git_repository|git]]. -- cgit v1.2.3 From 29f2cf4a49fb4d11ef92d0c9d1a8343181f6af6c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 29 Oct 2009 12:23:14 -0400 Subject: header cleanup --- doc/download.mdwn | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/download.mdwn b/doc/download.mdwn index 3b02e9127..45d0d7870 100644 --- a/doc/download.mdwn +++ b/doc/download.mdwn @@ -11,11 +11,9 @@ The best place to download a tarball of the latest release is from Manual installation steps and requirements are listed on the [[install]] page. -## packages +## Debian / Ubuntu packages -### Debian / Ubuntu - -To install with apt: +To install with apt, if using Debian or Ubuntu: apt-get install ikiwiki @@ -28,27 +26,27 @@ There is also an unofficial backport of ikiwiki for Ubuntu Jaunty, provided by [[Paweł_Tęcza|users/ptecza]], at [http://gpa.net.icm.edu.pl/ubuntu/](http://gpa.net.icm.edu.pl/ubuntu/index-en.html). -### Fedora / other RPM based systems +## RPM packages Fedora versions 8 and newer have RPMs of ikiwiki available. Ikiwiki's source includes a RPM spec file, which you can use to build your own RPM. -### BSD +## BSD ports + +IkiWiki can be installed [from macports](http://www.macports.org/ports.php?by=name&substr=ikiwiki) +by running `sudo port install ikiwiki`. NetBSD and many other platforms: pkgsrc has an [ikiwiki package](ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/www/ikiwiki/README.html). FreeBSD has ikiwiki in its [ports collection](http://www.freshports.org/www/ikiwiki/). -### Others +## Other packages Gentoo has an [ebuild](http://bugs.gentoo.org/show_bug.cgi?id=144453) in its bug database. The [openSUSE Build Service](http://software.opensuse.org/search?baseproject=ALL&p=1&q=ikiwiki) has packages for openSUSE -IkiWiki can be installed [from macports](http://www.macports.org/ports.php?by=name&substr=ikiwiki) -by running `sudo port install ikiwiki`. - A [PKGBUILD for Arch Linux](http://aur.archlinux.org/packages.php?ID=12284) is in the AUR. -- cgit v1.2.3 From 9c50ccf3d9f4c694e01f541704b6c98d2a919d99 Mon Sep 17 00:00:00 2001 From: Josh Triplett <josh@joshtriplett.org> Date: Thu, 29 Oct 2009 13:07:27 -0700 Subject: Update user page: I no longer develop or maintain the conversion scripts --- doc/users/joshtriplett.mdwn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/users/joshtriplett.mdwn b/doc/users/joshtriplett.mdwn index f85c068c3..29178057c 100644 --- a/doc/users/joshtriplett.mdwn +++ b/doc/users/joshtriplett.mdwn @@ -6,9 +6,10 @@ Email: `josh@{joshtriplett.org,freedesktop.org,kernel.org,psas.pdx.edu}`. Proud user of ikiwiki. -Currently working on scripts to convert MoinMoin and TWiki wikis to -ikiwikis backed by a git repository, including full history. -Available from the following repositories, though not well-documented: +Worked on scripts to convert MoinMoin and TWiki wikis to ikiwikis backed by a +git repository, including full history. Used for a couple of wikis, and now no +longer maintained, but potentially still useful. Available from the following +repositories, though not well-documented: git clone git://svcs.cs.pdx.edu/git/wiki2iki/moin2iki git clone git://svcs.cs.pdx.edu/git/wiki2iki/html-wikiconverter -- cgit v1.2.3 From da58a21d2832fe95fad992d2031c73add5a33300 Mon Sep 17 00:00:00 2001 From: Jogo <Jogo@web> Date: Thu, 29 Oct 2009 17:53:45 -0400 Subject: --- doc/users/jogo.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/jogo.mdwn b/doc/users/jogo.mdwn index 2a6577990..6f87cbc45 100644 --- a/doc/users/jogo.mdwn +++ b/doc/users/jogo.mdwn @@ -1,3 +1,5 @@ -I'm looking at Ikiwiki, searching the best Wiki. The only other one I've found is [werc](http://werc.cat-v.org/). + * An [economic game](http://sef.matabio.net/) in french, which [use](http://sef.matabio.net/wiki/) IkiWiki. + * Some [plugins](http://kimya.matabio.net/tcgi/hg/IkiPlugins/file/). + * An alternative [base wiki](http://kimya.matabio.net/tcgi/hg/FrIkiWiki/file/) in french. email: `jogo matabio net`. -- cgit v1.2.3 From c29957e0177c3c654a1ea1feffdba00307449560 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 29 Oct 2009 18:05:58 -0400 Subject: google: Pass the whole wiki url to google, not just the domain, so that search works correctly for wikis that are located in subdirectories of domains. --- IkiWiki/Plugin/google.pm | 9 +-------- debian/changelog | 3 +++ doc/plugins/google/discussion.mdwn | 2 ++ templates/googleform.tmpl | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 1683220e7..483fa1707 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -6,8 +6,6 @@ use strict; use IkiWiki 3.00; use URI; -my $host; - sub import { hook(type => "getsetup", id => "google", call => \&getsetup); hook(type => "checkconfig", id => "google", call => \&checkconfig); @@ -26,11 +24,6 @@ sub checkconfig () { if (! length $config{url}) { error(sprintf(gettext("Must specify %s when using the %s plugin"), "url", 'google')); } - my $uri=URI->new($config{url}); - if (! $uri || ! defined $uri->host) { - error(gettext("Failed to parse url, cannot determine domain name")); - } - $host=$uri->host; } my $form; @@ -43,7 +36,7 @@ sub pagetemplate (@) { if ($template->query(name => "searchform")) { if (! defined $form) { my $searchform = template("googleform.tmpl", blind_cache => 1); - $searchform->param(sitefqdn => $host); + $searchform->param(url => $config{url}); $form=$searchform->output; } diff --git a/debian/changelog b/debian/changelog index 4c8c4d6fc..f19b4eae4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ ikiwiki (3.20091024) UNRELEASED; urgency=low url is uri-encoded. Most browsers other than MSIE don't care, but it's the right thing to do. * Add a spec file to allow building rpm from the source package. + * google: Pass the whole wiki url to google, not just the domain, + so that search works correctly for wikis that are located in + subdirectories of domains. -- Joey Hess <joeyh@debian.org> Mon, 26 Oct 2009 11:53:32 -0400 diff --git a/doc/plugins/google/discussion.mdwn b/doc/plugins/google/discussion.mdwn index 39403f9f9..94fc36a35 100644 --- a/doc/plugins/google/discussion.mdwn +++ b/doc/plugins/google/discussion.mdwn @@ -9,3 +9,5 @@ It works to pass the whole wiki baseurl to Google, not just the domain, and appears to be legal. I've got a wiki that'd benefit (it's a few directories down from the root). Can the plugin be tweaked to do this? --[[schmonz]] + +> Done. --[[Joey]] diff --git a/templates/googleform.tmpl b/templates/googleform.tmpl index e2d4a1f43..bcf1004a4 100644 --- a/templates/googleform.tmpl +++ b/templates/googleform.tmpl @@ -1,6 +1,6 @@ <form method="get" action="http://www.google.com/search" id="searchform"> <div> - <input name="sitesearch" value="<TMPL_VAR SITEFQDN>" type="hidden" /> + <input name="sitesearch" value="<TMPL_VAR URL>" type="hidden" /> <input name="q" value="" id="searchbox" size="16" maxlength="255" type="text" /> </div> </form> -- cgit v1.2.3 From df2c15555708a84dbd62ef4b8f4b45a979e1531e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 31 Oct 2009 18:37:09 -0400 Subject: add news item for ikiwiki 3.20091031 --- doc/news/version_3.14159265.mdwn | 18 ------------------ doc/news/version_3.20091031.mdwn | 13 +++++++++++++ 2 files changed, 13 insertions(+), 18 deletions(-) delete mode 100644 doc/news/version_3.14159265.mdwn create mode 100644 doc/news/version_3.20091031.mdwn (limited to 'doc') diff --git a/doc/news/version_3.14159265.mdwn b/doc/news/version_3.14159265.mdwn deleted file mode 100644 index ed46b09ea..000000000 --- a/doc/news/version_3.14159265.mdwn +++ /dev/null @@ -1,18 +0,0 @@ -ikiwiki 3.14159265 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Add complete French basewiki and underlays translation from the Debian - French l10n team, including Philippe Batailler, Alexandre Dupas, and - Steve Petruzzello. - * Expand banned\_users; it can now include PageSpecs, which - allows banning by IP address. - * underlay: Also allow configuring additional directories to search - for template files in. - * Fix parsing web commits from ipv6 addresses. - * Add genwrapper hook, that can be used to add code into the C wrapper. - * cvs: Yeah, ikiwiki even supports CVS now. Plugin contributed by - Amitai Schlair. - * Updated Czech translation from Miroslav Kure. Closes: #[546223](http://bugs.debian.org/546223) - * rsync: New plugin that allows pushing the destdir to a remote host - via rsync or similar. Thanks, Amitai Schlair. - * auto.setup, auto-blog.setup: Fix sanitization of entered wikiname. - Closes: #[547378](http://bugs.debian.org/547378)"""]] \ No newline at end of file diff --git a/doc/news/version_3.20091031.mdwn b/doc/news/version_3.20091031.mdwn new file mode 100644 index 000000000..bb77bfa31 --- /dev/null +++ b/doc/news/version_3.20091031.mdwn @@ -0,0 +1,13 @@ +ikiwiki 3.20091031 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * po: Fix breakage caused by changes to render code. + * mdwn: Avoid trying to use multimarkdown if it is not installed. + * moderatedcomments: New plugin to allow comment moderation w/o relying + on blogspam.net. + * When redirecting to a page, ie, after editing, ensure that the + url is uri-encoded. Most browsers other than MSIE don't care, but it's + the right thing to do. + * Add a spec file to allow building rpm from the source package. + * google: Pass the whole wiki url to google, not just the domain, + so that search works correctly for wikis that are located in + subdirectories of domains."""]] \ No newline at end of file -- cgit v1.2.3 From e4e63a6f17be74985539752da46647eaf09cb69b Mon Sep 17 00:00:00 2001 From: Amitai Schlair <schmonz@magnetic-babysitter.(none)> Date: Sun, 1 Nov 2009 23:39:54 -0500 Subject: note CVS usage --- doc/setup.mdwn | 1 + doc/setup/byhand.mdwn | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/setup.mdwn b/doc/setup.mdwn index 89444c9a8..2d4da5536 100644 --- a/doc/setup.mdwn +++ b/doc/setup.mdwn @@ -65,6 +65,7 @@ source. (Remember to replace "foo" with the real directory name.) git clone foo.git foo.src svn checkout file://`pwd`/foo.svn/trunk foo.src + cvs -d `pwd`/foo get -P ikiwiki bzr clone foo foo.src hg clone foo foo.src # TODO monotone, tla diff --git a/doc/setup/byhand.mdwn b/doc/setup/byhand.mdwn index 53f8d18bb..b2ff7bd01 100644 --- a/doc/setup/byhand.mdwn +++ b/doc/setup/byhand.mdwn @@ -124,6 +124,12 @@ revision control. ikiwiki-makerepo svn $SRCDIR $REPOSITORY """]] +[[!toggle id=subversion text="CVS"]] +[[!toggleable id=cvs text=""" + REPOSITORY=~/wikirepo + ikiwiki-makerepo cvs $SRCDIR $REPOSITORY +"""]] + [[!toggle id=git text="Git"]] [[!toggleable id=git text=""" REPOSITORY=~/wiki.git -- cgit v1.2.3 From 212b248f8b383de3b880a46e4b813a6a0f65d5db Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Mon, 2 Nov 2009 11:12:04 +0000 Subject: fix toggle id for CVS --- doc/setup/byhand.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/setup/byhand.mdwn b/doc/setup/byhand.mdwn index b2ff7bd01..afd1ac27f 100644 --- a/doc/setup/byhand.mdwn +++ b/doc/setup/byhand.mdwn @@ -124,7 +124,7 @@ revision control. ikiwiki-makerepo svn $SRCDIR $REPOSITORY """]] -[[!toggle id=subversion text="CVS"]] +[[!toggle id=cvs text="CVS"]] [[!toggleable id=cvs text=""" REPOSITORY=~/wikirepo ikiwiki-makerepo cvs $SRCDIR $REPOSITORY -- cgit v1.2.3 From a8fd8373a20b26d58c9d49a80ecacfbdb42f5a3f Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Mon, 2 Nov 2009 11:26:25 +0000 Subject: sparse no longer use ikiwiki, it seems --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index eb998851a..af7f5409b 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -10,7 +10,6 @@ Projects & Organizations * The [Portland State Aerospace Society](http://psas.pdx.edu) website. Converted from a combination of TWiki and MoinMoin to ikiwiki, including full history ([[rcs/Git]] backend). * [Planet Debian upstream](http://updo.debian.net/) * [Debian Mentors wiki](http://jameswestby.net/mentors/) -* The [Sparse wiki](http://kernel.org/pub/linux/kernel/people/josh/sparse). * [The BSD Associate Admin Book Project](http://bsdwiki.reedmedia.net/) * The [maildirman wiki](http://svcs.cs.pdx.edu/maildirman) * The [linuxbierwanderung wiki/homepage](http://www.linuxbierwanderung.org) -- cgit v1.2.3 From 9997e0df913aceb6a37855ae61e52ab653d152d7 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Mon, 2 Nov 2009 11:28:47 +0000 Subject: remove broken link to example site (domain squatter) --- doc/css_market.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index c0e349552..fe58e77f1 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -15,7 +15,6 @@ gnomes will convert them to css files..) * **[[css_market/kirkambar.css]]**, contributed by [[Roktas]]. This far from perfect stylesheet follows a [Gitweb](http://www.kernel.org/git/?p=git/git.git;a=tree;f=gitweb) like theme, so it may provide a consistent look'n feel along with the [[rcs/git]] backend. ;-) - You can see it in action on [kirkambar](http://kirkambar.net/) (Turkish content). [[!meta stylesheet="kirkambar"]] * **[[css_market/embeddedmoose.css]]**, contributed by [[JoshTriplett]]. -- cgit v1.2.3 From 06293fc92e17cee816721a95fb3a4dfee34a3d7f Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Wed, 4 Nov 2009 17:51:10 -0500 Subject: from html to ikiwiki with url compatibility --- doc/plugins/html/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/plugins/html/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/html/discussion.mdwn b/doc/plugins/html/discussion.mdwn new file mode 100644 index 000000000..5446468bb --- /dev/null +++ b/doc/plugins/html/discussion.mdwn @@ -0,0 +1,5 @@ +I'm trying to convert hand written html site to ikiwiki and maintain url compatibility. +html plugin with indexpages=1 converts all dir_name/index.html correctly dir_name urls with wiki/css +based content, but somedir/somefile.html files are only accessible as somedir/somefile/. + +How to make somedir/somefile.html accessible as somedir/somefile.html under ikiwiki? -- cgit v1.2.3 From b37bca1dffed48747f89d420798396eddc1991d7 Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Thu, 5 Nov 2009 03:46:13 -0500 Subject: move forum --- doc/plugins/html/discussion.mdwn | 4 ---- 1 file changed, 4 deletions(-) (limited to 'doc') diff --git a/doc/plugins/html/discussion.mdwn b/doc/plugins/html/discussion.mdwn index 5446468bb..8b1378917 100644 --- a/doc/plugins/html/discussion.mdwn +++ b/doc/plugins/html/discussion.mdwn @@ -1,5 +1 @@ -I'm trying to convert hand written html site to ikiwiki and maintain url compatibility. -html plugin with indexpages=1 converts all dir_name/index.html correctly dir_name urls with wiki/css -based content, but somedir/somefile.html files are only accessible as somedir/somefile/. -How to make somedir/somefile.html accessible as somedir/somefile.html under ikiwiki? -- cgit v1.2.3 From 440c7ec20853375e6c6e7aa3668016b9dee39ebd Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Thu, 5 Nov 2009 03:49:37 -0500 Subject: move question from plugins/html to forum --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn new file mode 100644 index 000000000..e48f952fe --- /dev/null +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -0,0 +1,7 @@ +I'm trying to convert hand written html site to ikiwiki and maintain url compatibility. html plugin with indexpages=1 converts all dir_name/index.html correctly to dir_name urls with wiki/css based content, but somedir/somefile.html files are only accessible as somedir/somefile/. Non .html files seem to accessible with their full paths, for example somedir/pic.jpg from hand written html can be accessed by same path under ikiwiki. + +How to make somedir/somefile.html accessible as somedir/somefile.html under ikiwiki? + +Thanks, + +-Mikko -- cgit v1.2.3 From 2faf2d706b98863c74fa27796f080b166ae933ba Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Thu, 5 Nov 2009 09:26:57 +0000 Subject: rm empty discussion page --- doc/plugins/html/discussion.mdwn | 1 - 1 file changed, 1 deletion(-) delete mode 100644 doc/plugins/html/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/html/discussion.mdwn b/doc/plugins/html/discussion.mdwn deleted file mode 100644 index 8b1378917..000000000 --- a/doc/plugins/html/discussion.mdwn +++ /dev/null @@ -1 +0,0 @@ - -- cgit v1.2.3 From 416c9ff2adf0f75bd192cd52047ce4dc6c230f16 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Thu, 5 Nov 2009 09:30:36 +0000 Subject: response --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index e48f952fe..6ea0f5841 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -5,3 +5,13 @@ How to make somedir/somefile.html accessible as somedir/somefile.html under ikiw Thanks, -Mikko + +> Hello! The options you need to investigate are `--usedirs` and +> `--no-usedirs`. The default `--usedirs` takes any source page foo +> (regardless of its format, be it markdown or html) and converts it into a +> destination page foo/index.html (URL foo/). By comparison, `--no-usedirs` +> maps the source file onto a destination file directly: src/foo.html becomes +> dest/foo.html, src/bar.mdwn becomes dest/bar.html, etc. +> +> It sounds like you want `--no-usedirs`, or the corresponding `usedirs => 0,` +> option in your setup file. See [[usage]] for more information. -- [[Jon]] -- cgit v1.2.3 From 83a36abebacfdde679b83f3bd6f5b86140b6d502 Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Thu, 5 Nov 2009 05:27:20 -0500 Subject: --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index 6ea0f5841..5f6d89408 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -15,3 +15,7 @@ Thanks, > > It sounds like you want `--no-usedirs`, or the corresponding `usedirs => 0,` > option in your setup file. See [[usage]] for more information. -- [[Jon]] + +Thanks, usedirs seems to be just the thing I need. + +-Mikko -- cgit v1.2.3 From f603869d749ee33172df45aa964b093b0b97e85a Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Thu, 5 Nov 2009 06:30:36 -0500 Subject: not quite there yet --- .../transition_from_handwritten_html_to_ikiwiki.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index 5f6d89408..e25bc06a7 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -19,3 +19,20 @@ Thanks, Thanks, usedirs seems to be just the thing I need. -Mikko + +Actually usedirs didn't do exactly what I want. The old site contains both +somedir/index.html and somedir/somename.html files. With html plugin and +indexpages=1 the somedir/index.html pages are accessed correctly but +somedir/somefile.html files not. + +With usedirs => 0, somedir/somename.html pages are accessed correctly but +somedir/index.html pages are not. Actually the handwritten somedir/index.html +files were removed on a rebuild: + + $ ikiwiki -setup blog.setup -rebuild -v + ... + removing test2/index.html, no longer built by test2 + +Is there a way for both index.html and somename.html raw html files to show up through ikiwki? + +-Mikko -- cgit v1.2.3 From 57f94bb658f566764d87a26ea324dc2d6146c99f Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 5 Nov 2009 13:17:26 -0500 Subject: --- ...ransition_from_handwritten_html_to_ikiwiki.mdwn | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index e25bc06a7..3203ce0bb 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -36,3 +36,32 @@ files were removed on a rebuild: Is there a way for both index.html and somename.html raw html files to show up through ikiwki? -Mikko + +> I think you want usedirs => 0 and indexpages => 0? +> +> What IkiWiki does is to map the source filename to an abstract page name +> (indexpages alters how this is done), then map the abstract page name +> to an output filename (usedirs alters how this is done). +> +> The three columns here are input, abstract page name, output: +> +> usedirs => 0, indexpages => 0: +> a/index.html -> a/index -> a/index.html +> a/b.html -> a/b -> a/b.html +> usedirs => 1, indexpages => 0: +> a/index.html -> a/index -> a/index/index.html +> a/b.html -> a/b -> a/b/index.html +> usedirs => 0, indexpages => 1: +> a/index.html -> a -> a.html +> a/b.html -> a/b -> a/b.html +> usedirs => 1, indexpages => 1: +> a/index.html -> a -> a/index.html +> a/b.html -> a/b -> a/b/index.html +> +> The abstract page name is what you use in wikilinks and pagespecs. +> +> What I would suggest you do instead, though, is break your URLs once +> (but put in Apache redirections), to get everything to be consistent; +> I strongly recommend usedirs => 1 and indexpages => 0, then always +> advertising URLs that look like <http://www.example.com/a/b/>. This is +> what ikiwiki.info itself does, for instance. --[[smcv]] -- cgit v1.2.3 From e1a2778fa27e5917e3d6c178adcacb7fb7d79048 Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Thu, 5 Nov 2009 17:02:36 -0500 Subject: --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index 3203ce0bb..98fb00736 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -65,3 +65,9 @@ Is there a way for both index.html and somename.html raw html files to show up t > I strongly recommend usedirs => 1 and indexpages => 0, then always > advertising URLs that look like <http://www.example.com/a/b/>. This is > what ikiwiki.info itself does, for instance. --[[smcv]] + +Thanks for the explanation. usedirs => 0 and indexpages => 0 does the trick, +but I'll try to setup mod_rewrite from foo/bar.html to foo/bar in the final +conversion. + +-Mikko -- cgit v1.2.3 From 4be740cc9112789e0a6b2a903d1717b3c584286e Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Thu, 5 Nov 2009 18:27:16 -0500 Subject: binary blob question --- doc/forum/ikiwiki_and_big_files.mdwn | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/forum/ikiwiki_and_big_files.mdwn (limited to 'doc') diff --git a/doc/forum/ikiwiki_and_big_files.mdwn b/doc/forum/ikiwiki_and_big_files.mdwn new file mode 100644 index 000000000..fdd14eee9 --- /dev/null +++ b/doc/forum/ikiwiki_and_big_files.mdwn @@ -0,0 +1,37 @@ +My website has 214 hand written html, 1500 of pictures and a few, err sorry, 114 +video files. All this takes around 1.5 GB of disk space at the moment. +Plain html files take 1.7 MB and fit naturally into git. + +But what about the picture and video files? + +Pictures are mostly static and rarely need to be edited after first upload, +wasting a megabyte or two after an edit while having them in git doesn't really matter. +Videos on the other hand are quite large from megabytes to hundreds. Sometimes +I re-encode them from the original source with better codec parameters and just +replace the files under html root so they are accessible from the same URL. +So having a way to delete a 200 MB file and upload a new one with same name and access URL +is what I need. And it appears git has trouble erasing commits from history, or requires +some serious gitfoo and good backups of the original repository. + +So which ikiwiki backend could handle piles of large binary files? Or should I go for a separate +data/binary blob directory next to ikiwiki content? + +Further complication is my intention to keep URL compatibility with old handwritten and ikiwiki +based site. Sigh, tough job but luckily just a hobby. + +[-Mikko](http://mcfrisk.kapsi.fi) + +ps. here's how to calculate space taken by html, picture and video files: + + ~/www$ unset sum; for size in $( for ext in htm html txt xml log; \ + do find . -iname "*$ext" -exec stat -c "%s" \{\} \; ; done | xargs ); \ + do sum=$(( $sum + $size )); done ; echo $sum + 1720696 + ~/www$ unset sum; for size in $( for ext in jpg gif jpeg png; \ + do find . -iname "*$ext" -exec stat -c "%s" \{\} \; ; done | xargs ); \ + do sum=$(( $sum + $size )); done ; echo $sum + 46032184 + ~/www$ unset sum; for size in $( for ext in avi dv mpeg mp4; \ + do find . -iname "*$ext" -exec stat -c "%s" \{\} \; ; done | xargs ); \ + do sum=$(( $sum + $size )); done ; echo $sum + 1351890888 -- cgit v1.2.3 From 3f2e5abb56efadca99de384ca83ed23e579df915 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 5 Nov 2009 19:02:51 -0500 Subject: response --- doc/forum/ikiwiki_and_big_files.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/forum/ikiwiki_and_big_files.mdwn b/doc/forum/ikiwiki_and_big_files.mdwn index fdd14eee9..bded60ba0 100644 --- a/doc/forum/ikiwiki_and_big_files.mdwn +++ b/doc/forum/ikiwiki_and_big_files.mdwn @@ -35,3 +35,16 @@ ps. here's how to calculate space taken by html, picture and video files: do find . -iname "*$ext" -exec stat -c "%s" \{\} \; ; done | xargs ); \ do sum=$(( $sum + $size )); done ; echo $sum 1351890888 + +> One approach is to use the [[plugins/underlay]] plugin to +> configure a separate underlay directory, and put the large +> files in there. Those files will then be copied to the generated +> wiki, but need not be kept in revision control. (Or could be +> revision controlled in a separate repository -- perhaps one using +> a version control system that handles large files better than git; +> or perhaps one that you periodically blow away the old history to +> in order to save space.) +> +> BTW, the `hardlink` setting is a good thing to enable if you +> have large files, as it saves both disk space and copying time. +> --[[Joey]] -- cgit v1.2.3 From 63b1a4e6ca0de322d5bbfc97c5cc3728661793d1 Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Fri, 6 Nov 2009 04:56:49 -0500 Subject: --- doc/forum/ikiwiki_and_big_files.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/forum/ikiwiki_and_big_files.mdwn b/doc/forum/ikiwiki_and_big_files.mdwn index bded60ba0..8e36278e5 100644 --- a/doc/forum/ikiwiki_and_big_files.mdwn +++ b/doc/forum/ikiwiki_and_big_files.mdwn @@ -48,3 +48,26 @@ ps. here's how to calculate space taken by html, picture and video files: > BTW, the `hardlink` setting is a good thing to enable if you > have large files, as it saves both disk space and copying time. > --[[Joey]] + +Can underlay plugin handle the case that source and destination directories +are the same? I'd rather have just one copy of these underlay files on the server. +And did I goof in the setup file since I got this: + + $ ikiwiki -setup blog.setup -rebuild --verbose + Can't use string ("/home/users/mcfrisk/www/blog/med") as an ARRAY ref while + "strict refs" in use at + /home/users/mcfrisk/bin/share/perl/5.10.0/IkiWiki/Plugin/underlay.pm line 41. + $ grep underlay blog.setup + add_plugins => [qw{goodstuff websetup comments blogspam html sidebar underlay}], + underlaydir => '/home/users/mcfrisk/bin/share/ikiwiki/basewiki', + # underlay plugin + # extra underlay directories to add + add_underlays => '/home/users/mcfrisk/www/blog/media', + $ egrep "(srcdir|destdir)" blog.setup + srcdir => '/home/users/mcfrisk/blog', + destdir => '/home/users/mcfrisk/www/blog', + # allow symlinks in the path leading to the srcdir (potentially insecure) + allow_symlinks_before_srcdir => 1, + # directory in srcdir that contains directive descriptions + +-Mikko -- cgit v1.2.3 From b9e443c4d1ba0fdd64bbc2120831db490b185733 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Fri, 6 Nov 2009 08:21:25 -0500 Subject: --- doc/bugs/pages_missing_top-level_directory.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index 381bcd85b..3e81ed9de 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -52,3 +52,6 @@ I don't know if it's related to the fact that I have one ikiwiki install under a >> I suspect this is due to git scanning everything under the pwd of the .git/ directory, but not totally so. >> Other ikiwiki sites I have don't do this, and work OK, on the same server, but different docroots. + +>>> Well, I've moved my blog to under my site's docroot - in terms of git and ikiwiki - and it's still cutting out a whole directory level. I have no idea what's going on. I need to check the code. + -- cgit v1.2.3 From 5ce231ada7425d2259ccb2c82b4e63ffbbcac14d Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Fri, 6 Nov 2009 08:23:46 -0500 Subject: --- doc/bugs/pages_missing_top-level_directory.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index 3e81ed9de..159006444 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -53,5 +53,5 @@ I don't know if it's related to the fact that I have one ikiwiki install under a >> I suspect this is due to git scanning everything under the pwd of the .git/ directory, but not totally so. >> Other ikiwiki sites I have don't do this, and work OK, on the same server, but different docroots. ->>> Well, I've moved my blog to under my site's docroot - in terms of git and ikiwiki - and it's still cutting out a whole directory level. I have no idea what's going on. I need to check the code. +>>> Well, I've moved my blog to under my site's docroot - in terms of git and ikiwiki - and it's still cutting out a whole directory level. I have no idea what's going on. I need to check the code. The site is at http://simonraven.kisikew.org/ - if you follow the "About" link, you'll understand exactly what's going on, if you look at the URL in your status bar (or under your cursor if you're using a text browser). -- cgit v1.2.3 From c4fcdd54ffbf7bcce319a7fcd21c51022632780b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 6 Nov 2009 12:04:24 -0500 Subject: response --- doc/forum/ikiwiki_and_big_files.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/forum/ikiwiki_and_big_files.mdwn b/doc/forum/ikiwiki_and_big_files.mdwn index 8e36278e5..7c213e5a3 100644 --- a/doc/forum/ikiwiki_and_big_files.mdwn +++ b/doc/forum/ikiwiki_and_big_files.mdwn @@ -51,6 +51,9 @@ ps. here's how to calculate space taken by html, picture and video files: Can underlay plugin handle the case that source and destination directories are the same? I'd rather have just one copy of these underlay files on the server. + +> No, but enabling hardlinks accomplishes the same effect. --[[Joey]] + And did I goof in the setup file since I got this: $ ikiwiki -setup blog.setup -rebuild --verbose @@ -71,3 +74,9 @@ And did I goof in the setup file since I got this: # directory in srcdir that contains directive descriptions -Mikko + +> The plugin seems to present a bad default value in the setup file. +> (Fixed in git.) A correct configuration would be: + + add_underlays => ['/home/users/mcfrisk/www/blog/media'], + -- cgit v1.2.3 From ef33ab76576afd467e73b0016187cdb294e61d4e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 6 Nov 2009 23:03:13 -0500 Subject: add --- doc/quotes.mdwn | 3 +++ doc/quotes/pizza.mdwn | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 doc/quotes.mdwn create mode 100644 doc/quotes/pizza.mdwn (limited to 'doc') diff --git a/doc/quotes.mdwn b/doc/quotes.mdwn new file mode 100644 index 000000000..22f3a28d8 --- /dev/null +++ b/doc/quotes.mdwn @@ -0,0 +1,3 @@ +Collecting some happy quotes about ikiwiki here. + +[[!inline pages="quotes/* and !*/Discussion"]] diff --git a/doc/quotes/pizza.mdwn b/doc/quotes/pizza.mdwn new file mode 100644 index 000000000..c3badac6a --- /dev/null +++ b/doc/quotes/pizza.mdwn @@ -0,0 +1,4 @@ +> Best. Wiki. Ever. Now a wiki that I can't "git clone" and "git push" to is +> like a pizza that I have to eat with a knife and fork. + +-- Don Marti -- cgit v1.2.3 From 8b4d7ca9fb068ee32bcc1ffdbb51dd7aadda2501 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 6 Nov 2009 23:55:02 -0500 Subject: analise and close; template customisation error --- doc/bugs/pages_missing_top-level_directory.mdwn | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index 159006444..b32ab1e0c 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -51,7 +51,25 @@ I don't know if it's related to the fact that I have one ikiwiki install under a >> see above :) >> I suspect this is due to git scanning everything under the pwd of the .git/ directory, but not totally so. + +>>> Ikiwiki never, ever, looks in directories with names starting with a +>>> dot. --[[Joey]] + >> Other ikiwiki sites I have don't do this, and work OK, on the same server, but different docroots. ->>> Well, I've moved my blog to under my site's docroot - in terms of git and ikiwiki - and it's still cutting out a whole directory level. I have no idea what's going on. I need to check the code. The site is at http://simonraven.kisikew.org/ - if you follow the "About" link, you'll understand exactly what's going on, if you look at the URL in your status bar (or under your cursor if you're using a text browser). +>>> Well, I've moved my blog to under my site's docroot - in terms of git +>>> and ikiwiki - and it's still cutting out a whole directory level. I +>>> have no idea what's going on. I need to check the code. The site is at +>>> http://simonraven.kisikew.org/ - if you follow the "About" link, you'll +>>> understand exactly what's going on, if you look at the URL in your +>>> status bar (or under your cursor if you're using a text browser). +>>>> Your page contains the following in its html: +>>>> `<base href="../" />` +>>>> +>>>> Given a link like "./Policy/", which is *correct*, and when on the +>>>> About page will normally link to the About/Policy page, this causes +>>>> the link to really link to ".././Policy/" which is of course broken. +>>>> +>>>> Ikiwiki's standard page templates do not contain this base tag, so +>>>> I guess your customised templates are broken. --[[Joey]] [[done]] -- cgit v1.2.3 From 69f69f5d8b06a79f769732d53c4132700f7c1b3d Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Sat, 7 Nov 2009 04:49:43 -0500 Subject: --- doc/forum/ikiwiki_and_big_files.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/forum/ikiwiki_and_big_files.mdwn b/doc/forum/ikiwiki_and_big_files.mdwn index 7c213e5a3..b45bc1185 100644 --- a/doc/forum/ikiwiki_and_big_files.mdwn +++ b/doc/forum/ikiwiki_and_big_files.mdwn @@ -80,3 +80,18 @@ And did I goof in the setup file since I got this: add_underlays => ['/home/users/mcfrisk/www/blog/media'], +Umm, doesn't quite fix this yet: + + $ ikiwiki -setup blog.setup -v + Can't use an undefined value as an ARRAY reference at /home/users/mcfrisk/bin/share/perl/5.10.0/IkiWiki + /Plugin/underlay.pm line 44. + $ grep underlay blog.setup + add_plugins => [qw{goodstuff websetup comments blogspam html sidebar underlay}], + underlaydir => '/home/users/mcfrisk/bin/share/ikiwiki/basewiki', + # underlay plugin + # extra underlay directories to add + add_underlays => ['/home/users/mcfrisk/www/blog/media'], + $ ikiwiki --version + ikiwiki version 3.20091032 + +-Mikko -- cgit v1.2.3 From 59e1f891189de563c89729d1f835ada62156b7e2 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Sat, 7 Nov 2009 08:11:17 -0500 Subject: mod_alias works too --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index 98fb00736..e54dacdd5 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -71,3 +71,5 @@ but I'll try to setup mod_rewrite from foo/bar.html to foo/bar in the final conversion. -Mikko + +> That's roughly what I do, but you can do it with `Redirect` and `RedirectMatch` from `mod_alias`, rather than fire up rewrite. Mind you I don't write a generic rule, I have a finite set of pages to redirect which I know. -- [[Jon]] -- cgit v1.2.3 From b296bcbb08aabe3eb7a0b1c41e3a7942e1739e57 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 7 Nov 2009 12:37:35 -0500 Subject: response --- doc/forum/ikiwiki_and_big_files.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/forum/ikiwiki_and_big_files.mdwn b/doc/forum/ikiwiki_and_big_files.mdwn index b45bc1185..cd41d9fce 100644 --- a/doc/forum/ikiwiki_and_big_files.mdwn +++ b/doc/forum/ikiwiki_and_big_files.mdwn @@ -95,3 +95,8 @@ Umm, doesn't quite fix this yet: ikiwiki version 3.20091032 -Mikko + +> Yeah, I've fixed that in git, but you can work around it with this: +> --[[Joey]] + + templatedirs => [], -- cgit v1.2.3 From 144ffc0e36568207250a80a31370927eaf4f96ff Mon Sep 17 00:00:00 2001 From: intrigeri <intrigeri@boum.org> Date: Fri, 6 Nov 2009 15:51:14 +0100 Subject: bugs++ --- doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn (limited to 'doc') diff --git a/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn b/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn new file mode 100644 index 000000000..814074e08 --- /dev/null +++ b/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn @@ -0,0 +1,19 @@ +When trying to insert the raw content of an attached shell script +called `whatever` using: + + \[[!inline pages="whatever" raw="yes"]] + +The generated HTML contains: + + \[[!inline Erreur: Can't call method "param" on an undefined value + at /usr/local/share/perl/5.10.0/IkiWiki/Plugin/inline.pm + line 346.]] + +Looking at the inline plugin's code, it is clear that `$template` is +undef in such a situation. Defining `$template` just before line 346, +in case it's not defined, removes the error message, but nothing +gets inlined as `get_inline_content` returns the empty string in +this situation. + +If we explicitely don't want to allow raw inlining of unknown page +types, ikiwiki should output a better error message. -- cgit v1.2.3 From 73c3f0d7018041acac259eedf501dc6d9a52e1af Mon Sep 17 00:00:00 2001 From: tzafrir <tzafrir@web> Date: Sat, 7 Nov 2009 14:01:09 -0500 Subject: s/a name/id/ ? --- doc/ikiwiki/wikilink/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/wikilink/discussion.mdwn b/doc/ikiwiki/wikilink/discussion.mdwn index b146c9447..d6df4cbf6 100644 --- a/doc/ikiwiki/wikilink/discussion.mdwn +++ b/doc/ikiwiki/wikilink/discussion.mdwn @@ -43,6 +43,11 @@ BTW, ikiwiki doesn't displays the #foo anchor in the example >> Fixed that --[[Joey]] +The 'name' attribute of the 'a' element is a depracated way to create a named anchor. The right way to do that is using the 'id' attribute of any element. This is because an anchor may refer to a complete element rather than some point in the page. + +Standard purity aside, if you define an anchor (using either 'a name' or 'id') to a single point in the document but refer to a complete section, the browser may just show that specific point at the bottom of the page rather than trying to show all the section. +--[[tzafrir]] + --- Considering a hierarchy like `foo/bar/bar`, I had the need to link from the -- cgit v1.2.3 From 5f2503e2cf3ea3a3a97ace9ed37e4ac3564083a3 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Sun, 8 Nov 2009 00:52:25 +0100 Subject: New withlist item: [[!meta redir]] -- tell what's going on --- doc/users/tschwinge.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 33a139784..f9eebb73a 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -87,6 +87,12 @@ pages could perhaps be passed on to the referred-to page? > I found that backlinks was an easy way to find such links to such pages. > (Although the redirection made it hard to see the backlinks!) --[[Joey]] +## \[[!meta redir]] -- tell what's going on + +Add functionality that a text like *this page's content has moved to [new +page]; in a few seconds you'll be redirected thither* is displayed on every +page that uses \[[!meta redir]]. + ## Sendmail -- [[todo/passwordauth:_sendmail_interface]] ## [[bugs/Broken Parentlinks]] -- cgit v1.2.3 From 84f606b6fe5a9252a1cc515b083856e3b9a3c455 Mon Sep 17 00:00:00 2001 From: "http://mcfrisk.myopenid.com/" <http://mcfrisk.myopenid.com/@web> Date: Sat, 7 Nov 2009 19:54:08 -0500 Subject: --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index e54dacdd5..96be862d7 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -73,3 +73,8 @@ conversion. -Mikko > That's roughly what I do, but you can do it with `Redirect` and `RedirectMatch` from `mod_alias`, rather than fire up rewrite. Mind you I don't write a generic rule, I have a finite set of pages to redirect which I know. -- [[Jon]] + +I'm getting closer. Now with usedirs => 1 and raw html pages, ikiwiki transforms foo/index.html to foo/index/index.html. +Can ikiwiki be instructed map foo/index.html to page foo instead that foo/index? + +-Mikko -- cgit v1.2.3 From 19ff6180a8bbb2e5441fe177a934e146d129f1c7 Mon Sep 17 00:00:00 2001 From: justin <justin@web> Date: Sat, 7 Nov 2009 21:58:54 -0500 Subject: every search result includes any navigational text --- .../Search_summary_includes_text_from_navigational_elements.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn (limited to 'doc') diff --git a/doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn b/doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn new file mode 100644 index 000000000..874b9ffeb --- /dev/null +++ b/doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn @@ -0,0 +1,9 @@ +Each listed result for a search will show some example text from the beginning of the linked page. It strips out HTML elements, but if there's any navigational text items, they will stay. + +For example, each search result on ikiwiki.info shows "(title) ikiwiki/ (title) Edit RecentChanges History Preferences Discussion" at the start of its results. + +A way to name some CSS ids that should be removed in search results within the ikiwiki setup file would work. Here's something similar that a friend proposed: + +http://leaf.dragonflybsd.org/mailarchive/users/2009-11/msg00077.html + +(bin attachment on that page is actually a .diff.) -- cgit v1.2.3 From 66b46576ec097b9f10b45d4b1de18bb214cd5bd5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 8 Nov 2009 13:48:07 -0500 Subject: Moved the postscan hook to run on the raw html of a page, before the template is filled out. This improves the search plugin's indexing, since it will not include navigational elements from the page template or sidebar. --- IkiWiki/Render.pm | 8 ++++---- debian/changelog | 4 ++++ ...y_includes_text_from_navigational_elements.mdwn | 13 +++++++++++++ doc/plugins/write.mdwn | 22 +++++++++++----------- 4 files changed, 32 insertions(+), 15 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 0889fed62..ab3a71671 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -61,6 +61,10 @@ sub backlinks ($) { sub genpage ($$) { my $page=shift; my $content=shift; + + run_hooks(postscan => sub { + shift->(page => $page, content => $content); + }); my $templatefile; run_hooks(templatefile => sub { @@ -130,10 +134,6 @@ sub genpage ($$) { $content=$template->output; - run_hooks(postscan => sub { - shift->(page => $page, content => $content); - }); - run_hooks(format => sub { $content=shift->( page => $page, diff --git a/debian/changelog b/debian/changelog index 0026d9ddc..6a5ae30ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,10 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low references. * underlay: Avoid crashing if lists of underlays (or template directories) are not configured. + * Moved the postscan hook to run on the raw html of a page, before + the template is filled out. This improves the search plugin's indexing, + since it will not include navigational elements from the page template + or sidebar. -- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500 diff --git a/doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn b/doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn index 874b9ffeb..b774c4531 100644 --- a/doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn +++ b/doc/bugs/Search_summary_includes_text_from_navigational_elements.mdwn @@ -7,3 +7,16 @@ A way to name some CSS ids that should be removed in search results within the i http://leaf.dragonflybsd.org/mailarchive/users/2009-11/msg00077.html (bin attachment on that page is actually a .diff.) + +> So I was looking at this and I relized that while the search plugin used +> to use the format hook, and so there was no way to avoid it seeing all +> the gunk around the page body, it was changed a while ago for different +> reasons to use its own hook, postscan. So there's really no reason not +> to move postscan so it runs before said gunk is added to the page. +> (Aside from a small risk of breaking other third-party plugins that +> somehow use postscan.) +> +> I've implemented that in git, and it drops the navigation elements nicely. +> It's perhaps less general than allowing specific divs to be skipped from +> search, but it seems good enough. Please thank the dragonfly guys for their +> work on this. [[done]] --[[Joey]] diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index c72418c3c..2f179d46f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -201,6 +201,17 @@ like `Makefile` that have no extension. If `hook` is passed an optional "longname" parameter, this value is used when prompting a user to choose a page type on the edit page form. +### postscan + + hook(type => "postscan", id => "foo", call => \&postscan); + +This hook is called once the page has been converted to html (but before +the generated html is put in a template). The most common use is to +update search indexes. Added in ikiwiki 2.54. + +The function is passed named parameters "page" and "content". Its return +value is ignored. + ### pagetemplate hook(type => "pagetemplate", id => "foo", call => \&pagetemplate); @@ -237,17 +248,6 @@ modify the body of a page after it has been fully converted to html. The function is passed named parameters: "page", "destpage", and "content", and should return the sanitized content. -### postscan - - hook(type => "postscan", id => "foo", call => \&postscan); - -This hook is called once the full page body is available (but before the -format hook). The most common use is to update search indexes. Added in -ikiwiki 2.54. - -The function is passed named parameters "page" and "content". Its return -value is ignored. - ### format hook(type => "format", id => "foo", call => \&format); -- cgit v1.2.3 From 940f3d631ea27dd4e8e05302ae191e19cb8115a3 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Sun, 8 Nov 2009 13:55:58 -0500 Subject: rename the source? --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index 96be862d7..3084f764c 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -78,3 +78,7 @@ I'm getting closer. Now with usedirs => 1 and raw html pages, ikiwiki transforms Can ikiwiki be instructed map foo/index.html to page foo instead that foo/index? -Mikko + +> If you don't already have a foo.html in your source, why not just rename foo/index.html to foo.html? With usedirs, it will then map to foo/index.html. Before, you had 'foo/' and 'foo/index.html' as working URLS, and they will work after too. +> +> If you did have a foo.html and a foo/index.html, hmm, that's a tricky one. -- [[Jon]] -- cgit v1.2.3 From ad98c6d5439d658ad291f5c2a41cf56dcef18e97 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Sun, 8 Nov 2009 14:07:20 -0500 Subject: source? --- doc/quotes/pizza/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/quotes/pizza/discussion.mdwn (limited to 'doc') diff --git a/doc/quotes/pizza/discussion.mdwn b/doc/quotes/pizza/discussion.mdwn new file mode 100644 index 000000000..ecf8c44a6 --- /dev/null +++ b/doc/quotes/pizza/discussion.mdwn @@ -0,0 +1 @@ +It would be cool to know where this was written (assuming it was somewhere public :-)) Googling around, I've found a few places Don has recommended ikiwiki, but not in such glowing terms. -- [[Jon]] -- cgit v1.2.3 From 2700289d26ea63331799cf3485dc63e853739ff4 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 8 Nov 2009 14:28:05 -0500 Subject: add a link --- doc/quotes/pizza.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/quotes/pizza.mdwn b/doc/quotes/pizza.mdwn index c3badac6a..34899edfb 100644 --- a/doc/quotes/pizza.mdwn +++ b/doc/quotes/pizza.mdwn @@ -1,4 +1,4 @@ > Best. Wiki. Ever. Now a wiki that I can't "git clone" and "git push" to is > like a pizza that I have to eat with a knife and fork. --- Don Marti +-- [Don Marti](http://lwn.net/Articles/360888/) -- cgit v1.2.3 From a596e6195cde3a1af5d236a5f6c24ebfd56d9e0a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 8 Nov 2009 18:30:12 -0500 Subject: add sublevels to toc --- doc/tips/parentlinks_style.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn index 8b95cd396..f9dfa8f55 100644 --- a/doc/tips/parentlinks_style.mdwn +++ b/doc/tips/parentlinks_style.mdwn @@ -6,7 +6,7 @@ a subset of a page's parents. It also provides a few bonus possibilities, such as styling the parent links depending on their place in the path. -[[!toc ]] +[[!toc levels=2]] Content ======= -- cgit v1.2.3 From daa4e3e906e746fae51df4ae05919f2666ee5290 Mon Sep 17 00:00:00 2001 From: Amitai Schlair <schmonz@magnetic-babysitter.(none)> Date: Sun, 8 Nov 2009 21:13:46 -0500 Subject: add a site of mine (the one that necessitated the rsync plugin) --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index af7f5409b..188330909 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -128,6 +128,7 @@ Personal sites and blogs * [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) * [Weakish Jiang's Homepage](http://weakish.pigro.net) * [Nico Schottelius' homepage](http://www.nico.schottelius.org) +* [The Philolexian Society of Columbia University](http://www.columbia.edu/cu/philo/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 34f41bb8cb6cdc03ecc0d7ac350bbe3f7f874e7f Mon Sep 17 00:00:00 2001 From: Amitai Schlair <schmonz@magnetic-babysitter.(none)> Date: Sun, 8 Nov 2009 21:15:54 -0500 Subject: whoops, it's an organization --- doc/ikiwikiusers.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 188330909..acb63be39 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -47,6 +47,7 @@ Projects & Organizations * [MIT Student Information Processing Board](http://sipb.mit.edu/) * [Tinc VPN](http://tinc-vpn.org/) * [The XCB library](http://xcb.freedesktop.org/) +* [The Philolexian Society of Columbia University](http://www.columbia.edu/cu/philo/) Personal sites and blogs ======================== @@ -128,7 +129,6 @@ Personal sites and blogs * [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) * [Weakish Jiang's Homepage](http://weakish.pigro.net) * [Nico Schottelius' homepage](http://www.nico.schottelius.org) -* [The Philolexian Society of Columbia University](http://www.columbia.edu/cu/philo/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 52e5810c603ddb23690f259aa0f7743d69af05d6 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Mon, 9 Nov 2009 00:13:09 -0500 Subject: yay --- doc/bugs/pages_missing_top-level_directory.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/pages_missing_top-level_directory.mdwn b/doc/bugs/pages_missing_top-level_directory.mdwn index b32ab1e0c..77c31cd27 100644 --- a/doc/bugs/pages_missing_top-level_directory.mdwn +++ b/doc/bugs/pages_missing_top-level_directory.mdwn @@ -73,3 +73,6 @@ I don't know if it's related to the fact that I have one ikiwiki install under a >>>> >>>> Ikiwiki's standard page templates do not contain this base tag, so >>>> I guess your customised templates are broken. --[[Joey]] [[done]] + +>>>>> I totally forgot about that tag... good catch. I was thinking it was my template that was broken, since yesterday, but I couldn't see what. Thank you very much for your eyes. + -- cgit v1.2.3 From 73a296732149d20f9f03d6b8c9177733bea7b619 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Mon, 9 Nov 2009 10:15:48 -0500 Subject: *now* you want to look at indexpages ;-) --- doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn index 3084f764c..a8d04a0ad 100644 --- a/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn +++ b/doc/forum/transition_from_handwritten_html_to_ikiwiki.mdwn @@ -82,3 +82,9 @@ Can ikiwiki be instructed map foo/index.html to page foo instead that foo/index? > If you don't already have a foo.html in your source, why not just rename foo/index.html to foo.html? With usedirs, it will then map to foo/index.html. Before, you had 'foo/' and 'foo/index.html' as working URLS, and they will work after too. > > If you did have a foo.html and a foo/index.html, hmm, that's a tricky one. -- [[Jon]] + +> We may be going round in circles - that's what indexpages => 1 does :-) +> See the table I constructed above, which explains the mapping from input +> files to abstract page names, and then the mapping from abstract page +> names to output files. (I personally think that moving your source pages +> around like Jon suggested is a better solution, though. --[[smcv]] -- cgit v1.2.3 From 1fec2fdd20f04bae4f48980e04681bfa608db99e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 9 Nov 2009 13:12:14 -0500 Subject: add a pointer to meta --- doc/css.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/css.mdwn b/doc/css.mdwn index 5b6b9e1af..20790b3d1 100644 --- a/doc/css.mdwn +++ b/doc/css.mdwn @@ -3,7 +3,7 @@ ## Using CSS with ikiwiki Ikiwiki comes with two CSS stylesheets: [[style.css]] and [[local.css]]. -The idea is to customize the second one overriding the first one and +The idea is to customize the second one, overriding the first one and defining brand new rendering rules. While ikiwiki's default use of stylesheets is intentionally quite plain and @@ -11,3 +11,8 @@ minimalistic, CSS allows creating any kind of look you can dream up. The [[css_market]] page is an attempt to collect user contributed local.css files. + +## Per-page CSS + +The [[plugins/meta]] plugin can be used to add additional style sheets to a +page. -- cgit v1.2.3 From 9f0931ce21e5f58e2e9de0ef302beca08b8f9177 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 9 Nov 2009 13:32:08 -0500 Subject: localstyle: New plugin, allows overrding the toplevel local.css with one that is closer to a page. I chose not to have it override style.css, because style.css is not really intended to be edited; the one from the underlay is intended to be used as a base that local.css overrides. I chose to use a plugin rather than changing the default behavior, both because I didn't want to have to worry about possibly breaking backwards compatability (though this seems unlikely), and because it seemed cleaner to not include style template parameters in the main page template code. I suppose someone might want a way to not override the toplevel local.css, but instead include it as well as foo/local.css. Probably the best way to do that would be to have foo/local.css @import ../local.css (modulo browser compatability issues). Alternatively, edit page.tmpl to always include the toplevel local.css, or swap out this plugin for another one. --- IkiWiki/Plugin/localstyle.pm | 35 +++++++++++++++++++++++++++++++++++ debian/changelog | 2 ++ doc/css.mdwn | 3 +++ doc/plugins/localstyle.mdwn | 12 ++++++++++++ templates/page.tmpl | 5 +++++ 5 files changed, 57 insertions(+) create mode 100644 IkiWiki/Plugin/localstyle.pm create mode 100644 doc/plugins/localstyle.mdwn (limited to 'doc') diff --git a/IkiWiki/Plugin/localstyle.pm b/IkiWiki/Plugin/localstyle.pm new file mode 100644 index 000000000..111f4dc30 --- /dev/null +++ b/IkiWiki/Plugin/localstyle.pm @@ -0,0 +1,35 @@ +#!/usr/bin/perl + +package IkiWiki::Plugin::localstyle; + +use warnings; +use strict; +use IkiWiki 3.00; + +sub import { + hook(type => "getsetup", id => "localstyle", call => \&getsetup); + hook(type => "pagetemplate", id => "localstyle", call => \&pagetemplate); +} + +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => 1, + }, +} + +sub pagetemplate (@) { + my %params=@_; + + my $template=$params{template}; + + if ($template->query(name => "local_css")) { + my $best=bestlink($params{page}, 'local.css'); + if ($best) { + $template->param(local_css => $best); + } + } +} + +1 diff --git a/debian/changelog b/debian/changelog index 6a5ae30ab..4ab63f175 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low the template is filled out. This improves the search plugin's indexing, since it will not include navigational elements from the page template or sidebar. + * localstyle: New plugin, allows overrding the toplevel local.css + with one that is closer to a page. -- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500 diff --git a/doc/css.mdwn b/doc/css.mdwn index 20790b3d1..29a335596 100644 --- a/doc/css.mdwn +++ b/doc/css.mdwn @@ -16,3 +16,6 @@ files. The [[plugins/meta]] plugin can be used to add additional style sheets to a page. + +The [[plugins/localstyle]] plugin can be used to override the toplevel +[[local.css]] for a whole section of the wiki. diff --git a/doc/plugins/localstyle.mdwn b/doc/plugins/localstyle.mdwn new file mode 100644 index 000000000..70a909d68 --- /dev/null +++ b/doc/plugins/localstyle.mdwn @@ -0,0 +1,12 @@ +[[!template id=plugin name=localstyle author="[[Joey]]"]] +[[!tag type/chrome]] + +This plugin allows styling different sections of a wiki using different +versions of the local.css [[CSS]] file. Normally this file is read from the +top level of the wiki, but with this plugin enabled, standard +[[ikiwiki/subpage/LinkingRules]] are used to find the closest local.css +file to each page. + +So, for example, to use different styling for page `foo`, as well as all +of its [[SubPages|ikiwiki/subpage]], such as `foo/bar`, create a +`foo/local.css`. diff --git a/templates/page.tmpl b/templates/page.tmpl index e71ba316d..0e73463ec 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -7,8 +7,13 @@ <TMPL_IF NAME="FAVICON"> <link rel="icon" href="<TMPL_VAR BASEURL><TMPL_VAR FAVICON>" type="image/x-icon" /> </TMPL_IF> +<TMPL_IF NAME="STYLE_CSS"> <link rel="stylesheet" href="<TMPL_VAR BASEURL>style.css" type="text/css" /> +<TMPL_IF NAME="LOCAL_CSS"> +<link rel="stylesheet" href="<TMPL_VAR BASEURL><TMPL_VAR LOCAL_CSS>" type="text/css" /> +<TMPL_ELSE> <link rel="stylesheet" href="<TMPL_VAR BASEURL>local.css" type="text/css" /> +</TMPL_IF> <TMPL_IF NAME="EDITURL"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="<TMPL_VAR EDITURL>" /> </TMPL_IF> -- cgit v1.2.3 From 92a6f2e5e88b513ceaa1b9083ddbf6e928122893 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 10 Nov 2009 00:50:59 -0500 Subject: httpauth: Add cgiauthurl setting that can be used to do http basic auth only when ikiwiki needs authentication, rather than for any access to the cgi/wiki. --- IkiWiki/Plugin/httpauth.pm | 11 +++++++++++ debian/changelog | 3 +++ doc/plugins/httpauth.mdwn | 24 ++++++++++++++++++++---- 3 files changed, 34 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index 1816c9d74..bbfff859a 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -17,6 +17,13 @@ sub getsetup () { safe => 1, rebuild => 0, }, + cgiauthurl => { + type => "string", + example => "ttp://example.com/wiki/auth/ikiwiki.cgi", + description => "url to redirect to when authentication is needed", + safe => 1, + rebuild => 0, + }, } sub auth ($$) { @@ -26,6 +33,10 @@ sub auth ($$) { if (defined $cgi->remote_user()) { $session->param("name", $cgi->remote_user()); } + elsif (defined $config{cgiauthurl}) { + IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); + exit; + } } 1 diff --git a/debian/changelog b/debian/changelog index 4ab63f175..1a703b11f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,9 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low or sidebar. * localstyle: New plugin, allows overrding the toplevel local.css with one that is closer to a page. + * httpauth: Add cgiauthurl setting that can be used to do http basic auth + only when ikiwiki needs authentication, rather than for any access to + the cgi/wiki. -- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500 diff --git a/doc/plugins/httpauth.mdwn b/doc/plugins/httpauth.mdwn index 11ed223e7..77796a3d7 100644 --- a/doc/plugins/httpauth.mdwn +++ b/doc/plugins/httpauth.mdwn @@ -2,8 +2,24 @@ [[!tag type/auth]] This plugin allows HTTP basic authentication to be used to log into the -wiki. To use the plugin, your web server should be set up to perform HTTP -basic authentiation for at least the directory containing `ikiwiki.cgi`. -The authenticated user will be automatically signed into the wiki. +wiki. -This plugin is included in ikiwiki, but is not enabled by default. +## fully authenticated wiki + +One way to use the plugin is to configure your web server to require +HTTP basic authentication for any access to the directory containing the +wiki (and `ikiwiki.cgi`). The authenticated user will be automatically +signed into the wiki. This method is suitable only for private wikis. + +## separate cgiauthurl + +To use httpauth for a wiki where the content is public, and where +the `ikiwiki.cgi` needs to be usable without authentication (for searching +and so on), you can configure a separate url that is used for +authentication, via the `cgiauthurl` option in the setup file. This +url will then be redirected to whenever authentication is needed. + +A typical setup is to make an `auth` subdirectory, and symlink `ikiwiki.cgi` +into it. Then configure the web server to require authentication only for +access to the `auth` subdirectory. Then `cgiauthurl` is pointed at this +symlink. -- cgit v1.2.3 From c13dc4366c14eca6ee9454b284c32ca2b2dc5b12 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Tue, 10 Nov 2009 16:24:57 +0000 Subject: half-formed thoughts --- doc/users/jon.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index ab71426d5..922a20ab9 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -38,3 +38,10 @@ The following I have been looking at, but are on the back-burner: * a system for [[forum/managing_todo_lists]] (see also [[todo/interactive todo lists]] and <http://dev.jmtd.net/outliner/> for the current WIP). + +Finally, the following are merely half-formed thoughts: + + * adding and removing tags to pages via the edit form by ticking and + unticking checkboxes next to a tag name (rather than entering the + directive into the text of the page directly) + * perhaps the same for meta -- cgit v1.2.3 From be6b1c43d06a9022ab7cf88973d18e16645696ef Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Tue, 10 Nov 2009 16:33:01 +0000 Subject: another back-burner todo item --- doc/users/jon.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 922a20ab9..2fea7b4f6 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -38,6 +38,10 @@ The following I have been looking at, but are on the back-burner: * a system for [[forum/managing_todo_lists]] (see also [[todo/interactive todo lists]] and <http://dev.jmtd.net/outliner/> for the current WIP). +* a `tag2` plugin, which does the same thing as [[plugins/tag]], but + does not sit on top of [[ikiwiki/wikilink]]s, so does not result in + bugs such as [[bugs/tagged() matching wikilinks]]. Code for this lives + in my github `tag2` branch: <http://github.com/jmtd/ikiwiki> Finally, the following are merely half-formed thoughts: -- cgit v1.2.3 From 35319202724cbca495b13143b85578b892de0d05 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Mon, 9 Nov 2009 21:04:05 +0000 Subject: comment about patch version --- doc/todo/allow_site-wide_meta_definitions.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 20c8c02ac..18508255e 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -107,3 +107,25 @@ definitions essentially. * title -- [[Jon]] + +>> Ok, I've had a bit of a think about this. There are currently 15 supported +>> meta fields. Of these: title, licence, copyright, author, authorurl, +>> and robots might make sense to define globally and override on a per-page +>> basis. +>> +>> Less so, description (due to its impact on map); openid (why would +>> someone want more than one URI to act as an openid endpoint, delegating +>> to the same place?); updated. +>> +>> Not useful are permalink, date, stylesheet (you already have a global +>> stylesheet), link, redir, guid, updated. +>> +>> In other words, the limitations of my first patch that [[smcv]] outlined +>> are only relevant to defined fields that you wouldn't want to specify a +>> global default for anyway. +>> +>> Due to this, and the added complexity of the second patch (having to adjust +>> `IkiWiki/Setup.pm`), I think the first patch makes more sense. I've thus +>> reverted to it here. +>> +>> --[[Jon]] -- cgit v1.2.3 From 6fead140d810c5e5e90b1be6fb9d1ada97a96ab8 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Mon, 9 Nov 2009 21:05:32 +0000 Subject: adjustments to my comment --- doc/todo/allow_site-wide_meta_definitions.mdwn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 18508255e..9da0dddf8 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -114,11 +114,12 @@ definitions essentially. >> basis. >> >> Less so, description (due to its impact on map); openid (why would ->> someone want more than one URI to act as an openid endpoint, delegating ->> to the same place?); updated. +>> someone want more than one URI to act as an openid endpoint to the same +>> place?); updated. I can almost see why someone might want to set a global +>> updated value. Almost. >> >> Not useful are permalink, date, stylesheet (you already have a global ->> stylesheet), link, redir, guid, updated. +>> stylesheet), link, redir, and guid. >> >> In other words, the limitations of my first patch that [[smcv]] outlined >> are only relevant to defined fields that you wouldn't want to specify a -- cgit v1.2.3 From 31244492a5350dfce50d15d98841b358da41ffa8 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Mon, 9 Nov 2009 21:08:00 +0000 Subject: restore my original patch --- doc/todo/allow_site-wide_meta_definitions.mdwn | 50 ++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 9da0dddf8..8b9c3dca9 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -128,5 +128,51 @@ definitions essentially. >> Due to this, and the added complexity of the second patch (having to adjust >> `IkiWiki/Setup.pm`), I think the first patch makes more sense. I've thus >> reverted to it here. ->> ->> --[[Jon]] + + diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm + index b229592..3132257 100644 + --- a/IkiWiki/Plugin/meta.pm + +++ b/IkiWiki/Plugin/meta.pm + @@ -13,6 +13,7 @@ sub import { + hook(type => "needsbuild", id => "meta", call => \&needsbuild); + hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); + hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); + + hook(type => "scan", id => "meta", call => \&scan); + } + + sub getsetup () { + @@ -302,6 +303,15 @@ sub match { + } + } + + +sub scan() { + + my %params = @_; + + my $page = $params{page}; + + foreach my $type (map { s/^meta_//; $_ } grep /^meta_/, keys %config) { + + $pagestate{$page}{meta}{$type} = $config{"meta_$type"} + + unless defined $pagestate{$page}{meta}{$type}; + + } + +} + + + package IkiWiki::PageSpec; + + sub match_title ($$;@) { + diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn + index 000f461..200c4b2 100644 + --- a/doc/ikiwiki/directive/meta.mdwn + +++ b/doc/ikiwiki/directive/meta.mdwn + @@ -12,6 +12,12 @@ also specifies some additional sub-parameters. + The field values are treated as HTML entity-escaped text, so you can include + a quote in the text by writing `"` and so on. + + +You can also define site-wide defaults for meta values by including them + +in your setup file, e.g. + + + + meta_copyright => "Copyright 2007 by Joey Hess", + + meta_license => "GPL v2+", + + + Supported fields: + + * title + +-- [[Jon]] -- cgit v1.2.3 From beb8c7444e97320a1757ccbfa21602beb34fc243 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Wed, 11 Nov 2009 19:06:00 +0000 Subject: is this merge-worthy? --- doc/todo/allow_site-wide_meta_definitions.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 8b9c3dca9..62317ba1a 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -128,6 +128,8 @@ definitions essentially. >> Due to this, and the added complexity of the second patch (having to adjust >> `IkiWiki/Setup.pm`), I think the first patch makes more sense. I've thus >> reverted to it here. +>> +>> Is this merge-worthy? diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index b229592..3132257 100644 -- cgit v1.2.3 From ac61907a6251639e7235f5baf653b04626009d35 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon+ikiwiki@alcopop.org> Date: Wed, 11 Nov 2009 19:12:37 +0000 Subject: another possible commit name --- doc/users/jon.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 2fea7b4f6..f482c6967 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -5,6 +5,7 @@ sysadmins. * my edits should appear either as 'Jon' (if I've used [[tips/untrusted_git_push]]); 'jmtd.net', 'jmtd.livejournal.com', + 'jmtd' if I've forgotten to set my local git config properly, or once upon a time 'alcopop.org/me/openid/' or 'jondowland'. * My [homepage](http://jmtd.net/) is powered by ikiwiki -- cgit v1.2.3 From 2761faeb5a9620ee506f7e8f1b2090c9b4bf1ef2 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon+ikiwiki@alcopop.org> Date: Wed, 11 Nov 2009 19:14:18 +0000 Subject: a user page redir. not sure which is worse: polluting users/ with redirects, or broken links on /recentchanges. --- doc/users/jmtd.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/jmtd.mdwn (limited to 'doc') diff --git a/doc/users/jmtd.mdwn b/doc/users/jmtd.mdwn new file mode 100644 index 000000000..a816baf6f --- /dev/null +++ b/doc/users/jmtd.mdwn @@ -0,0 +1 @@ +[[!meta redir=users/jon]] -- cgit v1.2.3 From 797ef6f61aced20d0553f748bbe3d04fd9305df9 Mon Sep 17 00:00:00 2001 From: diannetyron <diannetyron@web> Date: Thu, 12 Nov 2009 00:12:10 -0500 Subject: --- doc/index.mdwn | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 732cf7a89..8b1378917 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1,28 +1 @@ -Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages -suitable for publishing on a website. Ikiwiki stores pages and history in a -[[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. -There are many other [[features]], including support for -[[blogging|blog]], as well as a large array of [[plugins]]. -[[!template id=links]] - -## using ikiwiki - -[[Setup]] has a tutorial for setting up ikiwiki, or you can read the -[[man_page|usage]]. There are some [[examples]] of things you can do -with ikiwiki, and some [[tips]]. - -All wikis are supposed to have a [[SandBox]], so this one does too. - -This site generally runs the latest release of ikiwiki; currently, it runs -ikiwiki [[!version ]]. - -## developer resources - -The [[RoadMap]] describes where the project is going. -The [[forum]] is open for discussions. -[[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] -can be submitted and tracked using this wiki. - -ikiwiki is developed by [[Joey]] and many contributors, -and is [[FreeSoftware]]. -- cgit v1.2.3 From 5d040714649e905927cc0ed71edca0875a4e49d8 Mon Sep 17 00:00:00 2001 From: diannetyron <diannetyron@web> Date: Thu, 12 Nov 2009 00:19:28 -0500 Subject: --- doc/index.mdwn | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 8b1378917..fa5ad37ae 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1 +1,28 @@ +Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages +suitable for publishing on a website. Ikiwiki stores pages of [custom essay](http://www.superiorpapers.com/) and history in a +[[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. +There are many other [[features]], including support for +[[blogging|blog]], as well as a large array of [[plugins]]. +[[!template id=links]] + +## using ikiwiki + +[[Setup]] has a tutorial for setting up ikiwiki, or you can read the +[[man_page|usage]]. There are some [[examples]] of things you can do +with ikiwiki, and some [[tips]]. + +All wikis are supposed to have a [[SandBox]], so this one does too. + +This site generally runs the latest release of ikiwiki; currently, it runs +ikiwiki [[!version ]]. + +## developer resources + +The [[RoadMap]] describes where the project is going. +The [[forum]] is open for discussions. +[[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] +can be submitted and tracked using this wiki. + +ikiwiki is developed by [[Joey]] and many contributors, +and is [[FreeSoftware]]. -- cgit v1.2.3 From 91f364d02baae11e2d4d7aaa433ac7574f1fba8e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 12 Nov 2009 00:24:33 -0500 Subject: Revert spam --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index fa5ad37ae..732cf7a89 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1,5 +1,5 @@ Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages -suitable for publishing on a website. Ikiwiki stores pages of [custom essay](http://www.superiorpapers.com/) and history in a +suitable for publishing on a website. Ikiwiki stores pages and history in a [[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. There are many other [[features]], including support for [[blogging|blog]], as well as a large array of [[plugins]]. -- cgit v1.2.3 From 34ae4419a5846336a4cc22976eab60142949c202 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Thu, 12 Nov 2009 14:08:44 +0100 Subject: doc/bugs/img_vs_align: New. --- doc/bugs/img_vs_align.mdwn | 6 ++++++ doc/users/tschwinge.mdwn | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 doc/bugs/img_vs_align.mdwn (limited to 'doc') diff --git a/doc/bugs/img_vs_align.mdwn b/doc/bugs/img_vs_align.mdwn new file mode 100644 index 000000000..9ed5e9e19 --- /dev/null +++ b/doc/bugs/img_vs_align.mdwn @@ -0,0 +1,6 @@ +The *[[ikiwiki/directive/img]]* directive allows for specifying an +*align* parameter -- which is of limited usability as the image is +embedded as `<p><img ...></p>`. That's at least what I see on +<http://www.bddebian.com:8888/~hurd-web/hurd/status/>. On the other +hand, CSS is supposed to be used instead, I guess. (But how... I forgot +almost of my CSS foo again ;-) it seems.) --[[tschwinge]] diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index f9eebb73a..20d8d16a8 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -69,6 +69,8 @@ contain the \[[!tag open_issue_hurd]]. This will decrease to be relevant, as we're going to add copyright and licensing headers to every single file. +## [[bugs/img vs align]] + ## Texinfo -- [[plugins/contrib/texinfo]] Not very important. Have to consider external commands / files / security (see -- cgit v1.2.3 From ed742ab2b580cf1f1b72b5c3e5d7517dad18a3dc Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Thu, 12 Nov 2009 09:14:45 -0500 Subject: explanation: whitespace surrounding your use of the IMG tag --- doc/bugs/img_vs_align.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/bugs/img_vs_align.mdwn b/doc/bugs/img_vs_align.mdwn index 9ed5e9e19..dcb9129b9 100644 --- a/doc/bugs/img_vs_align.mdwn +++ b/doc/bugs/img_vs_align.mdwn @@ -4,3 +4,8 @@ embedded as `<p><img ...></p>`. That's at least what I see on <http://www.bddebian.com:8888/~hurd-web/hurd/status/>. On the other hand, CSS is supposed to be used instead, I guess. (But how... I forgot almost of my CSS foo again ;-) it seems.) --[[tschwinge]] + +> [[!img logo/ikiwiki.png align=right]]The [img tag doesn't create P tags](http://git.ikiwiki.info/?p=ikiwiki;a=blob;f=IkiWiki/Plugin/img.pm;h=32023fa97af8ba8e63192cacaff10a4677d20654;hb=HEAD), but if you have surrounded the img directive with newlines, they will result in paragraph tags. +> +> I've edited the URL you provided to demonstrate this -- hope you don't mind! I've also added an inline, right-aligned image to this page.[[!tag done]] +> -- [[Jon]] -- cgit v1.2.3 From 074d2c27f89693579c6e1b019a2a7b276e56be0e Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Thu, 12 Nov 2009 09:40:33 -0500 Subject: optionally customize the commit message for rename/remove --- doc/todo/adjust_commit_message_for_rename__44___remove.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/todo/adjust_commit_message_for_rename__44___remove.mdwn (limited to 'doc') diff --git a/doc/todo/adjust_commit_message_for_rename__44___remove.mdwn b/doc/todo/adjust_commit_message_for_rename__44___remove.mdwn new file mode 100644 index 000000000..3d0d1aff4 --- /dev/null +++ b/doc/todo/adjust_commit_message_for_rename__44___remove.mdwn @@ -0,0 +1,5 @@ +When you rename or remove pages using the relevant plugins, a commit message is generated automatically by the plugin. + +It would be nice to provide a text field in the remove/rename form, pre-populated with the automatic message, so that a user may customize or append to the message (modulo VCS support) + +-- [[Jon]] -- cgit v1.2.3 From 1e6200f6fc5e718381cef8a86490963f6918aa30 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Thu, 12 Nov 2009 09:41:57 -0500 Subject: +todo/ adjust commit message for rename, remove --- doc/users/jon.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index f482c6967..f08076c2a 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -29,6 +29,7 @@ I am mostly interested in ikiwiki usability issues: * [[bugs/the login page is unclear when multiple methods exist]] * [[bugs/backlinks onhover thing can go weird]] * [[todo/CSS classes for links]] + * [[todo/adjust commit message for rename, remove]] The following I have been looking at, but are on the back-burner: -- cgit v1.2.3 From 5704255b8f65ebbf9d0d20926744f039816e7ca5 Mon Sep 17 00:00:00 2001 From: JeremyReed <JeremyReed@web> Date: Thu, 12 Nov 2009 10:16:44 -0500 Subject: ask question --- doc/ikiwiki/pagespec/attachment/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec/attachment/discussion.mdwn b/doc/ikiwiki/pagespec/attachment/discussion.mdwn index 373242b3f..abfb62edc 100644 --- a/doc/ikiwiki/pagespec/attachment/discussion.mdwn +++ b/doc/ikiwiki/pagespec/attachment/discussion.mdwn @@ -13,3 +13,5 @@ I am interested for [[todo/mbox]] --[[DavidBremner]] >> them. --[[DavidBremner]] >>> Done, [[plugins/filecheck]] --[[Joey]] + +Anyway to make it so an edit page doesn't offer the attachment capability unless it matches a specific user, is an admin, and/or is an allowed page? (For now, I have it on all pages, and then it prohibits after I submit based on the allowed_attachments.) -- cgit v1.2.3 From b9f264d066bd71e5a995f339fcf25181539c9b8f Mon Sep 17 00:00:00 2001 From: JeremyReed <JeremyReed@web> Date: Thu, 12 Nov 2009 10:23:58 -0500 Subject: fix typo --- doc/ikiwiki/pagespec/attachment/discussion.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec/attachment/discussion.mdwn b/doc/ikiwiki/pagespec/attachment/discussion.mdwn index abfb62edc..34f21f84a 100644 --- a/doc/ikiwiki/pagespec/attachment/discussion.mdwn +++ b/doc/ikiwiki/pagespec/attachment/discussion.mdwn @@ -14,4 +14,5 @@ I am interested for [[todo/mbox]] --[[DavidBremner]] >>> Done, [[plugins/filecheck]] --[[Joey]] -Anyway to make it so an edit page doesn't offer the attachment capability unless it matches a specific user, is an admin, and/or is an allowed page? (For now, I have it on all pages, and then it prohibits after I submit based on the allowed_attachments.) + +Any way to make it so an edit page doesn't offer the attachment capability unless it matches a specific user, is an admin, and/or is an allowed page? (For now, I have it on all pages, and then it prohibits after I submit based on the allowed_attachments.) -- cgit v1.2.3 From ad303e878e65c72bf31eb676ced866be56bbee91 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 13 Nov 2009 15:10:58 -0500 Subject: inline: Allow direct inclusion of non-page files in raw mode. --- IkiWiki/Plugin/inline.pm | 6 +++++- debian/changelog | 1 + doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 001d2ed1a..8e7fa9958 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -337,7 +337,7 @@ sub preprocess_inline (@) { foreach my $page (@list) { my $file = $pagesources{$page}; my $type = pagetype($file); - if (! $raw || ($raw && ! defined $type)) { + if (! $raw) { if ($needcontent) { # Get the content before populating the # template, since getting the content uses @@ -391,6 +391,10 @@ sub preprocess_inline (@) { filter($page, $params{destpage}, readfile(srcfile($file))))); } + else { + $ret.="\n". + readfile(srcfile($file)); + } } } } diff --git a/debian/changelog b/debian/changelog index 5a2d94e23..b25651f42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low only when ikiwiki needs authentication, rather than for any access to the cgi/wiki. * inline: Do not generated feeds for nested inlines. + * inline: Allow direct inclusion of non-page files in raw mode. -- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500 diff --git a/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn b/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn index 814074e08..e43540c65 100644 --- a/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn +++ b/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn @@ -17,3 +17,11 @@ this situation. If we explicitely don't want to allow raw inlining of unknown page types, ikiwiki should output a better error message. + +> I have made it just do a direct include if the page type is not known, in +> raw mode. That seems useful if you want to include some other file right +> into a page. You could probably even wrap it in a format directive. +> +> It does allow including binary files right into a page, but nothing is +> stopping you pasting binary data right into the edit form either, so +> while annoying I don't think that will be a security problem. --[[Joey]] -- cgit v1.2.3 From 2bd6ebb42ce3e7a91866f6731563926b09e7806f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 13 Nov 2009 15:31:34 -0500 Subject: move to todo item, some thoughtS --- doc/ikiwiki/pagespec/attachment/discussion.mdwn | 3 --- ...avoid_attachement_ui_if_upload_not_allowed.mdwn | 25 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn (limited to 'doc') diff --git a/doc/ikiwiki/pagespec/attachment/discussion.mdwn b/doc/ikiwiki/pagespec/attachment/discussion.mdwn index 34f21f84a..373242b3f 100644 --- a/doc/ikiwiki/pagespec/attachment/discussion.mdwn +++ b/doc/ikiwiki/pagespec/attachment/discussion.mdwn @@ -13,6 +13,3 @@ I am interested for [[todo/mbox]] --[[DavidBremner]] >> them. --[[DavidBremner]] >>> Done, [[plugins/filecheck]] --[[Joey]] - - -Any way to make it so an edit page doesn't offer the attachment capability unless it matches a specific user, is an admin, and/or is an allowed page? (For now, I have it on all pages, and then it prohibits after I submit based on the allowed_attachments.) diff --git a/doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn b/doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn new file mode 100644 index 000000000..487915850 --- /dev/null +++ b/doc/todo/avoid_attachement_ui_if_upload_not_allowed.mdwn @@ -0,0 +1,25 @@ +Any way to make it so an edit page doesn't offer the attachment capability +unless it matches a specific user, is an admin, and/or is an allowed page? +(For now, I have it on all pages, and then it prohibits after I submit +based on the allowed_attachments.) + +> To do that, ikiwiki would have to try to match the `allowed_attachments` +> pagespec against a sort of dummy upload to the current page. Then if it +> failed, assume all real uploads would fail. Now consider a pagespec like +> "user(joey) and mimetype(audio/mpeg)" -- it'd be hard to make a dummy +> upload to test this pagespec against. +> +> So, there would need to be some sort of test mode, where terms like +> `mimetype()` always succeed. But then consider a pagespec like +> "user(joey) and !mimetype(video/mpeg)" -- if mimetype succeeds, this +> fails. +> +> So, maybe we can instead just filter out all the pagespec terms aside +> from `user()`, `ip()`, and `admin()`. Transforming that into just +> "user(joey)", which would succeed in the test. +> +> That'd work, I guess. Pulling a pagespec apart, filtering out terms, and +> putting it back together is nontrivial, but doable. +> +> Other approach would be to have a separate pagespec that explicitly +> controlls what pages to show the attachment UI on. --[[Joey]] -- cgit v1.2.3 From 2a7e8921d5ace6ca6a053e964d459f5190fc552b Mon Sep 17 00:00:00 2001 From: martin <martin@web> Date: Fri, 13 Nov 2009 17:14:54 -0500 Subject: new bug --- doc/bugs/inline_skip_causes_empty_inline.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/bugs/inline_skip_causes_empty_inline.mdwn (limited to 'doc') diff --git a/doc/bugs/inline_skip_causes_empty_inline.mdwn b/doc/bugs/inline_skip_causes_empty_inline.mdwn new file mode 100644 index 000000000..8a4559360 --- /dev/null +++ b/doc/bugs/inline_skip_causes_empty_inline.mdwn @@ -0,0 +1 @@ +When using the [[directive/inline]] directive with the skip parameter i get emtpy list inline (no output at all). The same inline used to work before but not in 3.20091031. -- cgit v1.2.3 From 956efcfac26bca9f5c00a18efa084881d49f6fae Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 13 Nov 2009 17:35:13 -0500 Subject: cannot reproduce --- doc/bugs/inline_skip_causes_empty_inline.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/inline_skip_causes_empty_inline.mdwn b/doc/bugs/inline_skip_causes_empty_inline.mdwn index 8a4559360..b2fce224e 100644 --- a/doc/bugs/inline_skip_causes_empty_inline.mdwn +++ b/doc/bugs/inline_skip_causes_empty_inline.mdwn @@ -1 +1,6 @@ -When using the [[directive/inline]] directive with the skip parameter i get emtpy list inline (no output at all). The same inline used to work before but not in 3.20091031. +When using the [[directive/inline]] directive with the skip parameter i get +emtpy list inline (no output at all). The same inline used to work before +but not in 3.20091031. + +> I need more information to help. Skip is working as expected here. +> Can I download/clone your wiki? --[[Joey]] -- cgit v1.2.3 From e062693632777b8f3c3fdd2b2b6079a11a95a693 Mon Sep 17 00:00:00 2001 From: martin <martin@web> Date: Fri, 13 Nov 2009 19:00:13 -0500 Subject: repoduced it ... sorry should have pasted this earlier --- doc/bugs/inline_skip_causes_empty_inline.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/inline_skip_causes_empty_inline.mdwn b/doc/bugs/inline_skip_causes_empty_inline.mdwn index b2fce224e..6ee1e601b 100644 --- a/doc/bugs/inline_skip_causes_empty_inline.mdwn +++ b/doc/bugs/inline_skip_causes_empty_inline.mdwn @@ -4,3 +4,7 @@ but not in 3.20091031. > I need more information to help. Skip is working as expected here. > Can I download/clone your wiki? --[[Joey]] + +>> The bug occurs only together with archive="yes" as I Just found out: + +[[!inline pages="news/*" archive="yes" feeds="no" skip=3]] -- cgit v1.2.3 From d8cfd8d431bd3ec44152944f0b8418bbab6b7920 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 13 Nov 2009 20:50:27 -0500 Subject: inline: Fix display of all pages when archive=yes or show=0 are used. --- IkiWiki/Plugin/inline.pm | 4 ++-- debian/changelog | 1 + doc/bugs/inline_skip_causes_empty_inline.mdwn | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 8e7fa9958..f89209a1b 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -212,7 +212,7 @@ sub preprocess_inline (@) { if ($params{feedshow} && $num < $params{feedshow}) { $num=$params{feedshow}; } - if ($params{skip}) { + if ($params{skip} && $num) { $num+=$params{skip}; } @@ -221,7 +221,7 @@ sub preprocess_inline (@) { filter => sub { $_[0] eq $params{page} }, sort => exists $params{sort} ? $params{sort} : "age", reverse => yesno($params{reverse}), - num => $num, + ($num ? (num => $num) : ()), ); } diff --git a/debian/changelog b/debian/changelog index b25651f42..c96919252 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low the cgi/wiki. * inline: Do not generated feeds for nested inlines. * inline: Allow direct inclusion of non-page files in raw mode. + * inline: Fix display of all pages when archive=yes or show=0 are used. -- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500 diff --git a/doc/bugs/inline_skip_causes_empty_inline.mdwn b/doc/bugs/inline_skip_causes_empty_inline.mdwn index 6ee1e601b..e1cbc5470 100644 --- a/doc/bugs/inline_skip_causes_empty_inline.mdwn +++ b/doc/bugs/inline_skip_causes_empty_inline.mdwn @@ -7,4 +7,4 @@ but not in 3.20091031. >> The bug occurs only together with archive="yes" as I Just found out: -[[!inline pages="news/*" archive="yes" feeds="no" skip=3]] +>>> Thanks, [[fixed|done]] in git. --[[Joey]] -- cgit v1.2.3 From 6edd00e9a47116babe2a3addd81d1afb24c3c4d5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 13 Nov 2009 22:11:42 -0500 Subject: releasing version 3.20091113 --- debian/changelog | 4 ++-- doc/quotes/sold.mdwn | 3 +++ ikiwiki.spec | 2 +- po/ikiwiki.pot | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 doc/quotes/sold.mdwn (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index c96919252..ad80d37b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20091032) UNRELEASED; urgency=low +ikiwiki (3.20091113) unstable; urgency=low * underlay: Fix example values put in setup file to be array references. @@ -17,7 +17,7 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low * inline: Allow direct inclusion of non-page files in raw mode. * inline: Fix display of all pages when archive=yes or show=0 are used. - -- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500 + -- Joey Hess <joeyh@debian.org> Fri, 13 Nov 2009 20:51:57 -0500 ikiwiki (3.20091031) unstable; urgency=low diff --git a/doc/quotes/sold.mdwn b/doc/quotes/sold.mdwn new file mode 100644 index 000000000..4bd021f74 --- /dev/null +++ b/doc/quotes/sold.mdwn @@ -0,0 +1,3 @@ +I'm totally sold on ikiwiki now. + +-- Anna Hess diff --git a/ikiwiki.spec b/ikiwiki.spec index f7f96a0d0..491c69a8d 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20091031 +Version: 3.20091113 Release: 1%{?dist} Summary: A wiki compiler diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 45dd49d01..65ee22fb1 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-10-31 18:31-0400\n" +"POT-Creation-Date: 2009-11-13 20:53-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -436,7 +436,7 @@ msgstr "" msgid "nonexistant template %s" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:598 +#: ../IkiWiki/Plugin/inline.pm:602 msgid "RPC::XML::Client not found, not pinging" msgstr "" -- cgit v1.2.3 From df06b9201c298b03cf36ffa8223087157b1c573d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 13 Nov 2009 22:13:05 -0500 Subject: add news item for ikiwiki 3.20091113 --- doc/news/version_3.20091009.mdwn | 14 -------------- doc/news/version_3.20091113.mdwn | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 doc/news/version_3.20091009.mdwn create mode 100644 doc/news/version_3.20091113.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091009.mdwn b/doc/news/version_3.20091009.mdwn deleted file mode 100644 index 9ab1299b9..000000000 --- a/doc/news/version_3.20091009.mdwn +++ /dev/null @@ -1,14 +0,0 @@ -ikiwiki 3.20091009 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * parentlinks: Add has\_parentlinks template parameter to allow styling - the toplevel index differently etc. - * img: Correct bug in image size calculation code. - * img: Fix dependency code for full size images. - * toggle, relativedate: Support templates that add attributes - to the body tag. - * Support RPC::XML 0.69's incompatible object instantiation method. - * mirrorlist: Display nothing if list is empty. - * Fix a bug that could lead to duplicate links being recorded - for tags. - * Optimize away most expensive file prune calls, when refreshing, - by only checking new files."""]] \ No newline at end of file diff --git a/doc/news/version_3.20091113.mdwn b/doc/news/version_3.20091113.mdwn new file mode 100644 index 000000000..f313b57d1 --- /dev/null +++ b/doc/news/version_3.20091113.mdwn @@ -0,0 +1,18 @@ +ikiwiki 3.20091113 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * underlay: Fix example values put in setup file to be array + references. + * underlay: Avoid crashing if lists of underlays (or template + directories) are not configured. + * Moved the postscan hook to run on the raw html of a page, before + the template is filled out. This improves the search plugin's indexing, + since it will not include navigational elements from the page template + or sidebar. + * localstyle: New plugin, allows overrding the toplevel local.css + with one that is closer to a page. + * httpauth: Add cgiauthurl setting that can be used to do http basic auth + only when ikiwiki needs authentication, rather than for any access to + the cgi/wiki. + * inline: Do not generated feeds for nested inlines. + * inline: Allow direct inclusion of non-page files in raw mode. + * inline: Fix display of all pages when archive=yes or show=0 are used."""]] \ No newline at end of file -- cgit v1.2.3 From 65077372fab1e6fa30c3d143e4c68123557d8441 Mon Sep 17 00:00:00 2001 From: "http://www.openid.albertlash.com/openid/" <http://www.openid.albertlash.com/openid/@web> Date: Sat, 14 Nov 2009 14:34:52 -0500 Subject: missing apostrophe in python code --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index ab6984494..e57144109 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -38,7 +38,7 @@ to adjust this script too: anchors = pagetable.getElementsByTagName("a") for a in anchors: print a.firstChild.toxml().\ - replace('&,'&').\ + replace('&','&').\ replace('<','<').\ replace('>','>') -- cgit v1.2.3 From 7b2571adf4ebe989043b9609b0c42ca96eada71d Mon Sep 17 00:00:00 2001 From: "http://www.openid.albertlash.com/openid/" <http://www.openid.albertlash.com/openid/@web> Date: Sat, 14 Nov 2009 14:36:54 -0500 Subject: import sys and sys.argv --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index e57144109..45df683de 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -30,9 +30,10 @@ that this script is sensitive to the specific markup used on the page, so if you have tweaked your mediawiki theme a lot from the original, you will need to adjust this script too: + import sys from xml.dom.minidom import parse, parseString - dom = parse(argv[1]) + dom = parse(sys.argv[1]) tables = dom.getElementsByTagName("table") pagetable = tables[-1] anchors = pagetable.getElementsByTagName("a") -- cgit v1.2.3 From 88a217598d1254774f611f1878883083289606f1 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Sun, 15 Nov 2009 00:33:28 +0100 Subject: Improve img's documentation. Jon is right, of course. User error, not an ikiwiki bug. So, I removed the false bug report and added its gist to img's documentation. --- doc/bugs/img_vs_align.mdwn | 11 ----------- doc/ikiwiki/directive/img.mdwn | 6 ++++++ 2 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 doc/bugs/img_vs_align.mdwn (limited to 'doc') diff --git a/doc/bugs/img_vs_align.mdwn b/doc/bugs/img_vs_align.mdwn deleted file mode 100644 index dcb9129b9..000000000 --- a/doc/bugs/img_vs_align.mdwn +++ /dev/null @@ -1,11 +0,0 @@ -The *[[ikiwiki/directive/img]]* directive allows for specifying an -*align* parameter -- which is of limited usability as the image is -embedded as `<p><img ...></p>`. That's at least what I see on -<http://www.bddebian.com:8888/~hurd-web/hurd/status/>. On the other -hand, CSS is supposed to be used instead, I guess. (But how... I forgot -almost of my CSS foo again ;-) it seems.) --[[tschwinge]] - -> [[!img logo/ikiwiki.png align=right]]The [img tag doesn't create P tags](http://git.ikiwiki.info/?p=ikiwiki;a=blob;f=IkiWiki/Plugin/img.pm;h=32023fa97af8ba8e63192cacaff10a4677d20654;hb=HEAD), but if you have surrounded the img directive with newlines, they will result in paragraph tags. -> -> I've edited the URL you provided to demonstrate this -- hope you don't mind! I've also added an inline, right-aligned image to this page.[[!tag done]] -> -- [[Jon]] diff --git a/doc/ikiwiki/directive/img.mdwn b/doc/ikiwiki/directive/img.mdwn index 94cc754bd..b847aa239 100644 --- a/doc/ikiwiki/directive/img.mdwn +++ b/doc/ikiwiki/directive/img.mdwn @@ -22,6 +22,12 @@ You can also pass `alt`, `title`, `class`, `align` and `id` parameters. These are passed through unchanged to the html img tag. If you include a `caption` parameter, the caption will be displayed centered beneath the image. +Note that for the `align` parameter to work, you have to make sure that the +`img` directive isn't surrounded with newlines, as the [[Markdown]] renderer +would otherwise put the image into its own paragraph, inhibiting this +functionality from working. On the other hand, CSS should probably rather be +used instead. + The `link` parameter is used to control whether the scaled image links to the full size version. By default it does; set "link=somepage" to link to another page instead, or "link=no" to disable the link, or -- cgit v1.2.3 From 11787065a133f4884dfb8a8dc8a5ecacfe2fed63 Mon Sep 17 00:00:00 2001 From: martin <martin@web> Date: Sat, 14 Nov 2009 21:02:34 -0500 Subject: opened bug --- ...map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn (limited to 'doc') diff --git a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn new file mode 100644 index 000000000..2973c6010 --- /dev/null +++ b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn @@ -0,0 +1 @@ +The [[directive/map]] directive sorty by pagename. That looks kind of odd, when used together with show=title. I would expect it to sort by title then. -- cgit v1.2.3 From fb26b9ca849b2cc8090e317c0cba790da76c425a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 15 Nov 2009 14:52:53 -0500 Subject: Revert "Improve img's documentation." The information added is incorrect. --- doc/bugs/img_vs_align.mdwn | 11 +++++++++++ doc/ikiwiki/directive/img.mdwn | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 doc/bugs/img_vs_align.mdwn (limited to 'doc') diff --git a/doc/bugs/img_vs_align.mdwn b/doc/bugs/img_vs_align.mdwn new file mode 100644 index 000000000..dcb9129b9 --- /dev/null +++ b/doc/bugs/img_vs_align.mdwn @@ -0,0 +1,11 @@ +The *[[ikiwiki/directive/img]]* directive allows for specifying an +*align* parameter -- which is of limited usability as the image is +embedded as `<p><img ...></p>`. That's at least what I see on +<http://www.bddebian.com:8888/~hurd-web/hurd/status/>. On the other +hand, CSS is supposed to be used instead, I guess. (But how... I forgot +almost of my CSS foo again ;-) it seems.) --[[tschwinge]] + +> [[!img logo/ikiwiki.png align=right]]The [img tag doesn't create P tags](http://git.ikiwiki.info/?p=ikiwiki;a=blob;f=IkiWiki/Plugin/img.pm;h=32023fa97af8ba8e63192cacaff10a4677d20654;hb=HEAD), but if you have surrounded the img directive with newlines, they will result in paragraph tags. +> +> I've edited the URL you provided to demonstrate this -- hope you don't mind! I've also added an inline, right-aligned image to this page.[[!tag done]] +> -- [[Jon]] diff --git a/doc/ikiwiki/directive/img.mdwn b/doc/ikiwiki/directive/img.mdwn index b847aa239..94cc754bd 100644 --- a/doc/ikiwiki/directive/img.mdwn +++ b/doc/ikiwiki/directive/img.mdwn @@ -22,12 +22,6 @@ You can also pass `alt`, `title`, `class`, `align` and `id` parameters. These are passed through unchanged to the html img tag. If you include a `caption` parameter, the caption will be displayed centered beneath the image. -Note that for the `align` parameter to work, you have to make sure that the -`img` directive isn't surrounded with newlines, as the [[Markdown]] renderer -would otherwise put the image into its own paragraph, inhibiting this -functionality from working. On the other hand, CSS should probably rather be -used instead. - The `link` parameter is used to control whether the scaled image links to the full size version. By default it does; set "link=somepage" to link to another page instead, or "link=no" to disable the link, or -- cgit v1.2.3 From 03fe40cdc5c55bafd0f3b9058fb985e66a872aab Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 15 Nov 2009 15:01:17 -0500 Subject: diagnosis: probably broken browser? --- doc/bugs/img_vs_align.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/bugs/img_vs_align.mdwn b/doc/bugs/img_vs_align.mdwn index dcb9129b9..c70f4d5ef 100644 --- a/doc/bugs/img_vs_align.mdwn +++ b/doc/bugs/img_vs_align.mdwn @@ -9,3 +9,11 @@ almost of my CSS foo again ;-) it seems.) --[[tschwinge]] > > I've edited the URL you provided to demonstrate this -- hope you don't mind! I've also added an inline, right-aligned image to this page.[[!tag done]] > -- [[Jon]] + +> Contrary to all of the above, html does not care about P tags when +> floating an image to the left or right via align. Proof: +> <http://kitenet.net/~joey/pics/toomanypicturesofjoey/>, where the image +> is in its own paragraph but still floats. Also, I re-modified a local +> copy of the hurd page to enclose the image in a P, and it still floats. +> +> Tested with Chromium and Firefox. --[[Joey]] -- cgit v1.2.3 From dbc18a7223da6d2cdd5ae72ef5cb6afeb64352a5 Mon Sep 17 00:00:00 2001 From: NicolasLimare <NicolasLimare@web> Date: Sun, 15 Nov 2009 20:19:34 -0500 Subject: + micro whishlist item --- doc/todo/description_meta_param_passed_to_templates.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/todo/description_meta_param_passed_to_templates.mdwn (limited to 'doc') diff --git a/doc/todo/description_meta_param_passed_to_templates.mdwn b/doc/todo/description_meta_param_passed_to_templates.mdwn new file mode 100644 index 000000000..cbd35f17d --- /dev/null +++ b/doc/todo/description_meta_param_passed_to_templates.mdwn @@ -0,0 +1,8 @@ +[[!tag whishlist]] + +I'd like to use the description parameter from [[meta|/ikiwiki/directive/meta]] directives in custom [[inline|/ikiwiki/directive/inline]] templates. I guess this could be useful to others too. + +The only change required is on [line 266](http://github.com/joeyh/ikiwiki/blob/master/IkiWiki/Plugin/meta.pm#L266) of `meta.pm` + + - foreach my $field (qw{author authorurl permalink}) { + + foreach my $field (qw{author authorurl description permalink}) { -- cgit v1.2.3 From fa7fd79ff0396b1d7b9eca6d3ae493c7092e9950 Mon Sep 17 00:00:00 2001 From: NicolasLimare <NicolasLimare@web> Date: Sun, 15 Nov 2009 20:21:04 -0500 Subject: - typo --- doc/todo/description_meta_param_passed_to_templates.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/description_meta_param_passed_to_templates.mdwn b/doc/todo/description_meta_param_passed_to_templates.mdwn index cbd35f17d..5598698d7 100644 --- a/doc/todo/description_meta_param_passed_to_templates.mdwn +++ b/doc/todo/description_meta_param_passed_to_templates.mdwn @@ -1,4 +1,4 @@ -[[!tag whishlist]] +[[!tag wishlist]] I'd like to use the description parameter from [[meta|/ikiwiki/directive/meta]] directives in custom [[inline|/ikiwiki/directive/inline]] templates. I guess this could be useful to others too. -- cgit v1.2.3 From 6d73c132804b2c725cea257f5b55e5d438ec5640 Mon Sep 17 00:00:00 2001 From: NicolasLimare <NicolasLimare@web> Date: Sun, 15 Nov 2009 20:22:21 -0500 Subject: + patch tag --- doc/todo/description_meta_param_passed_to_templates.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/description_meta_param_passed_to_templates.mdwn b/doc/todo/description_meta_param_passed_to_templates.mdwn index 5598698d7..80a6a8e8a 100644 --- a/doc/todo/description_meta_param_passed_to_templates.mdwn +++ b/doc/todo/description_meta_param_passed_to_templates.mdwn @@ -1,4 +1,4 @@ -[[!tag wishlist]] +[[!tag wishlist patch]] I'd like to use the description parameter from [[meta|/ikiwiki/directive/meta]] directives in custom [[inline|/ikiwiki/directive/inline]] templates. I guess this could be useful to others too. -- cgit v1.2.3 From 2d1dfab20a6ed69f48c1696e00a97b44eac84062 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Mon, 16 Nov 2009 09:10:36 +0100 Subject: Follow up. --- doc/bugs/img_vs_align.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/bugs/img_vs_align.mdwn b/doc/bugs/img_vs_align.mdwn index c70f4d5ef..6eff46178 100644 --- a/doc/bugs/img_vs_align.mdwn +++ b/doc/bugs/img_vs_align.mdwn @@ -17,3 +17,15 @@ almost of my CSS foo again ;-) it seems.) --[[tschwinge]] > copy of the hurd page to enclose the image in a P, and it still floats. > > Tested with Chromium and Firefox. --[[Joey]] + +>> Uh, sorry for not confirming what I supposed to be with looking into +>> the relevant standard. It just seemed too obvious to me that the +>> closure of `<p>...</p>` would confine whatever embedded stuff may be +>> doing. (Meaning, I didn't expect that the *img*'s alignment would +>> propagate to the *p*'s and would thus be visible from the outside.) +>> +>> I confirm (Firefox, Ubuntu jaunty) that your picture page is being +>> shown correctly -- thus I suppose that there's a buglet in our CSS +>> scripts again... +>> +>> --[[tschwinge]] -- cgit v1.2.3 From 65e9fbf6e98e0bf5525c39273f0327c0a122276f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 16 Nov 2009 15:30:08 -0500 Subject: add example of a map showing page descriptions --- doc/ikiwiki/directive/map.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/map.mdwn b/doc/ikiwiki/directive/map.mdwn index 09c95a0c9..4b6499547 100644 --- a/doc/ikiwiki/directive/map.mdwn +++ b/doc/ikiwiki/directive/map.mdwn @@ -13,6 +13,8 @@ the [[meta]] directive). For example: \[[!map pages="* and !blog/* and !*/Discussion" show=title]] + \[[!map pages="* and !blog/* and !*/Discussion" show=description]] + Hint: To limit the map to displaying pages less than a certain level deep, use a [[ikiwiki/PageSpec]] like this: `pages="* and !*/*/*"` -- cgit v1.2.3 From 4fa17df57de29e2b91c552c1b012f3f198dfaa2f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 16 Nov 2009 15:51:00 -0500 Subject: meta: Generate meta description tags even when the html scrubber is enabled. Unlike generic meta foo tags, meta description is known to be safe, so can be special cased to be allowed despite the html scrubber. This makes meta description much more useful, since it is otherwise limited to being used by other plugins like map. --- IkiWiki/Plugin/meta.pm | 4 ++++ debian/changelog | 7 +++++++ doc/ikiwiki/directive/meta.mdwn | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 6bdb6f39c..45d073e28 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -239,6 +239,10 @@ sub preprocess (@) { push @{$metaheaders{$page}}, '<meta name="robots"'. ' content="'.encode_entities($value).'" />'; } + elsif ($key eq 'description') { + push @{$metaheaders{$page}}, '<meta name="'.encode_entities($key). + '" content="'.encode_entities($value).'" />'; + } else { push @{$metaheaders{$page}}, scrub('<meta name="'.encode_entities($key). '" content="'.encode_entities($value).'" />', $destpage); diff --git a/debian/changelog b/debian/changelog index ad80d37b7..9bddf0733 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20091114) UNRELEASED; urgency=low + + * meta: Generate meta description tags even when the html scrubber is + enabled. + + -- Joey Hess <joeyh@debian.org> Mon, 16 Nov 2009 15:46:45 -0500 + ikiwiki (3.20091113) unstable; urgency=low * underlay: Fix example values put in setup file to be array diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index 000f461c9..557441c0b 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -43,8 +43,8 @@ Supported fields: * description - Specifies a "description" of the page. You could use this to provide - a summary, for example, to be picked up by the [[map]] directive. + Specifies a short description for the page. This will be put in + the html header, and can also be displayed by eg, the [[map]] directive. * permalink -- cgit v1.2.3 From 34f046ed4a7873e6dadbd6eb9f096b94f688d1e9 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 16 Nov 2009 15:55:01 -0500 Subject: close --- doc/todo/description_meta_param_passed_to_templates.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/description_meta_param_passed_to_templates.mdwn b/doc/todo/description_meta_param_passed_to_templates.mdwn index 80a6a8e8a..712471258 100644 --- a/doc/todo/description_meta_param_passed_to_templates.mdwn +++ b/doc/todo/description_meta_param_passed_to_templates.mdwn @@ -6,3 +6,5 @@ The only change required is on [line 266](http://github.com/joeyh/ikiwiki/blob/m - foreach my $field (qw{author authorurl permalink}) { + foreach my $field (qw{author authorurl description permalink}) { + +> Good idea, [[done]]. --[[Joey]] -- cgit v1.2.3 From 64fef7c3bb5bab33778d4c4a1bbda42cd88cf735 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 16 Nov 2009 16:12:34 -0500 Subject: why this is hard --- ...rts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn index 2973c6010..f8e257daf 100644 --- a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn +++ b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn @@ -1 +1,8 @@ The [[directive/map]] directive sorty by pagename. That looks kind of odd, when used together with show=title. I would expect it to sort by title then. + +> This would be quite hard to fix. Map sorts the pages it displays by page +> name, which has the happy effect of making "foo/bar" come after "foo"; +> which it *has* to do, so that it can be displayed as a child of the page +> it's located in. If sorting by title, that wouldn't hold. So, map +> would have to be effectively totally rewritten, to build up each group +> of child pages, and then re-sort those. --[[Joey]] -- cgit v1.2.3 From c46b19371a983d5e066494143dd66a3a05f305bd Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 17 Nov 2009 00:50:08 -0500 Subject: add page listing some alternatives to ikiwiki --- doc/competition.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/competition.mdwn (limited to 'doc') diff --git a/doc/competition.mdwn b/doc/competition.mdwn new file mode 100644 index 000000000..2c782ea92 --- /dev/null +++ b/doc/competition.mdwn @@ -0,0 +1,19 @@ +When I started ikiwiki in 2006, there were no other existing systems that +filled quite the niche of generating a static html wiki out of markdown +files stored in a [[VCS|rcs]]. My +[first blog about ikiwiki](http://kitenet.net/~joey/blog/entry/seeking_wiki/) +looked at some projects that were semi-close, and found them wanting. + +My hope was that besides being useful to all its [[users|ikiwikiusers]], +ikiwiki would help spread its underlying concepts. Let a thousand flowers +bloom! These are some that have sprung up since. --[[Joey]] + +* [Gitit](http://gitit.johnmacfarlane.net/) is a wiki backed by a git (or + darcs) filestore. No static rendering here; pages are generated on the fly. + It's written in Haskell and uses the amazing PanDoc to generate html + from markdown or many other formats. + +* [Markdoc](http://blog.zacharyvoase.com/post/246800035) statically builds + a wiki from markdown source (which can be in a VCS, if you check it in). + It includes a built-in webserver to ease serving the generated static + html. -- cgit v1.2.3 From 182043667058d302d33aefa12dcb8678799d7fc7 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Tue, 17 Nov 2009 15:55:01 +0000 Subject: escape something being interpreted as a directive --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 45df683de..3b8e5043c 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -118,7 +118,7 @@ into an ikiwiki tag name using a script such as pattern = r'\[\[Category:([^\]]+)\]\]' def manglecat(mo): - return '[[!tag %s]]' % mo.group(1).strip().replace(' ','_') + return '[\[!tag %s]]' % mo.group(1).strip().replace(' ','_') for line in sys.stdin.readlines(): res = re.match(pattern, line) -- cgit v1.2.3 From 07dcf7d6e75705ff0601cb5b9dcf8f00d8093dde Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Tue, 17 Nov 2009 15:56:42 +0000 Subject: shuffle commit symbol around --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 3b8e5043c..9719d9a7e 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -118,7 +118,7 @@ into an ikiwiki tag name using a script such as pattern = r'\[\[Category:([^\]]+)\]\]' def manglecat(mo): - return '[\[!tag %s]]' % mo.group(1).strip().replace(' ','_') + return '\[[!tag %s]]' % mo.group(1).strip().replace(' ','_') for line in sys.stdin.readlines(): res = re.match(pattern, line) -- cgit v1.2.3 From e8ecc3833f96dfcfdada2b774eec6cef8b0b8019 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 19 Nov 2009 01:41:22 -0500 Subject: initial content --- doc/users/KathrynAndersen.mdwn | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/users/KathrynAndersen.mdwn (limited to 'doc') diff --git a/doc/users/KathrynAndersen.mdwn b/doc/users/KathrynAndersen.mdwn new file mode 100644 index 000000000..c26a91223 --- /dev/null +++ b/doc/users/KathrynAndersen.mdwn @@ -0,0 +1,2 @@ +* Currently an active [PmWiki](http://www.pmwiki.org) user, but investigating changing over to ikiwiki (if I can write the plugins I need). +* <http://kerravonsen.dreamwidth.org> -- cgit v1.2.3 From a56b51aef546dd87d11f7c6bd4944d13442e5df3 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 19 Nov 2009 01:55:30 -0500 Subject: response of potential user --- doc/todo/Mailing_list.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/Mailing_list.mdwn b/doc/todo/Mailing_list.mdwn index b6a207420..4b2406786 100644 --- a/doc/todo/Mailing_list.mdwn +++ b/doc/todo/Mailing_list.mdwn @@ -18,3 +18,12 @@ Does this sound okay? > todo/bugs/forum feeds, or to some other feed they create on their user page. > And there's work on making the discussion pages more structured, on > accepting comments sent via mail, etc. --[[Joey]] + +>>I was going to make the very same request, so I'm glad to know I'm not the only one who felt the need for it. + +>>I can see your reasoning, though I don't think ikiwiki has reached the level (yet) of facilitating discussion as well as a mailing list does. +>>You've already pointed out the need for (a) more structured discussion pages, (b) comments sent via mail, but I'm not sure whether that will be enough. This is because the nature of a wiki means that discussions are scattered all over the site, as people discuss in discussion pages about the given topic - and so they should. The consequence of this, however, is that one has a choice (in regard to RSS feeds) of having too much or too little. Too little, if one only feeds on news/todo/bugs/forum, since one misses out on discussions elsewhere. Too much, because the only other option appears to be subscribing to recentchanges, which will give one *everything*, whether it is relevant or not. +>>Unfortunately, I'm not really sure what the best solution is for this problem. + +>> For those who might be interested, I've added two RSS feeds to <http://www.dreamwidth.org>: ikiwiki_news and ikiwiki_recent. +>>--[[KathrynAndersen]] -- cgit v1.2.3 From 866a915395c78f4b49a3a4f84f52816fe4f0da4f Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 19 Nov 2009 14:10:14 -0500 Subject: added more dreamwidth feeds --- doc/todo/Mailing_list.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Mailing_list.mdwn b/doc/todo/Mailing_list.mdwn index 4b2406786..67cbbb00b 100644 --- a/doc/todo/Mailing_list.mdwn +++ b/doc/todo/Mailing_list.mdwn @@ -25,5 +25,12 @@ Does this sound okay? >>You've already pointed out the need for (a) more structured discussion pages, (b) comments sent via mail, but I'm not sure whether that will be enough. This is because the nature of a wiki means that discussions are scattered all over the site, as people discuss in discussion pages about the given topic - and so they should. The consequence of this, however, is that one has a choice (in regard to RSS feeds) of having too much or too little. Too little, if one only feeds on news/todo/bugs/forum, since one misses out on discussions elsewhere. Too much, because the only other option appears to be subscribing to recentchanges, which will give one *everything*, whether it is relevant or not. >>Unfortunately, I'm not really sure what the best solution is for this problem. ->> For those who might be interested, I've added two RSS feeds to <http://www.dreamwidth.org>: ikiwiki_news and ikiwiki_recent. +>> For those who might be interested, I've added the following RSS feeds to <http://www.dreamwidth.org>: +*ikiwiki_bugs_feed, +ikiwiki_forum_feed, +ikiwiki_news_feed, +ikiwiki_recent_feed, +ikiwiki_todo_feed, +ikiwiki_wishlist_feed* + >>--[[KathrynAndersen]] -- cgit v1.2.3 From 62dd681b3aa406a9bb6c1174eeaaacc8fe6b94ff Mon Sep 17 00:00:00 2001 From: "http://bsorez.myopenid.com/" <http://bsorez.myopenid.com/@web> Date: Fri, 20 Nov 2009 17:09:20 -0500 Subject: --- doc/sandbox.mdwn | 62 +------------------------------------------------------- 1 file changed, 1 insertion(+), 61 deletions(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 8aedcbb9e..2a02d41ce 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,61 +1 @@ -This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). - - -# Header - -## Subheader - -> This is a blockquote. -> -> This is the first level of quoting. -> -> > This is nested blockquote. -> ->> Without a space works too. ->>> to three levels -> -> Back to the first level. - -Numbered list - -1. First item. - 1. Sub item. -1. Another. -1. And another.. - 1. foo - 2. bar - -Bulleted list - -* item -* *item* -* item -* one - * two - ----- - -[[!template id=note text="this is generated by the [[plugins/haiku]] plugin"]] -[[!haiku hint="sandbox play"]] - ----- - -## Different sorts of links: - -* [[Features]] -* <http://ikiwiki.info/ikiwiki/formatting/> -* [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] -* <http://www.gnu.org/> -* [GNU](http://www.gnu.org/) - ------ - -[[!progress percent=27]] - -[[!progress percent=78]] - ------ - -This **SandBox** is also a [[blog]]! - -[[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] +TEST -- cgit v1.2.3 From dc15be03d69604fcae20ce49d684d3146ff068a6 Mon Sep 17 00:00:00 2001 From: harishcm <harishcm@web> Date: Sat, 21 Nov 2009 05:18:00 -0500 Subject: Patch added --- ...a_sidebar_does_not_regenerate_the_subpages.mdwn | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn b/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn index 596719a8b..93aafc2c0 100644 --- a/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn +++ b/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn @@ -7,3 +7,54 @@ If sandbox/page.mdwn has been generated and sandbox/sidebar.mdwn is created, the # currently requires a wiki rebuild. add_depends($page, $sidebar_page); +---- +Below is a patch for the bug. It's inspired by trying to solve [[todo/Post-compilation inclusion of the sidebar]]. +What do you think about it? I have a concern though. If a sidebar is removed, it takes two refreshes to update +the affected pages. Is this a feature or a bug? --[[harishcm]] + + --- sidebar.pm.orig 2009-11-21 17:40:02.000000000 +0800 + +++ sidebar_bugfix.pm 2009-11-21 18:16:11.000000000 +0800 + @@ -10,6 +10,7 @@ + + sub import { + hook(type => "getsetup", id => "sidebar", call => \&getsetup); + + hook(type => "needsbuild", id => "sidebar", call => \&needsbuild); + hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate); + } + + @@ -21,6 +22,22 @@ + }, + } + + +sub needsbuild (@) { + + my $needsbuild=shift; + + + + # Determine every pages' sidebar page + + foreach my $page (keys %pagesources) { + + my $sidebar_page=''; + + $sidebar_page=bestlink($page, "sidebar"); + + + + # If a page's sidebar has changed, force rebuild + + if (!exists $pagestate{$page}{sidebar}{sidebar_page} || $pagestate{$page}{sidebar}{sidebar_page} ne $sidebar_page) { + + $pagestate{$page}{sidebar}{sidebar_page} = $sidebar_page; + + push @$needsbuild, $pagesources{$page}; + + } + + } + +} + + + sub sidebar_content ($) { + my $page=shift; + + @@ -29,9 +46,9 @@ + my $sidebar_type=pagetype($sidebar_file); + + if (defined $sidebar_type) { + - # FIXME: This isn't quite right; it won't take into account + - # adding a new sidebar page. So adding such a page + - # currently requires a wiki rebuild. + + # Record current sidebar page for rechecking bestlink + + # during wiki refresh. Also add depends on the sidebar page. + + $pagestate{$page}{sidebar}{sidebar_page}=$sidebar_page; + add_depends($page, $sidebar_page); + + my $content=readfile(srcfile($sidebar_file)); -- cgit v1.2.3 From ff5ae256b9dd0554a881388d88788366049babf1 Mon Sep 17 00:00:00 2001 From: harishcm <harishcm@web> Date: Sat, 21 Nov 2009 05:28:25 -0500 Subject: --- doc/users/harishcm.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/harishcm.mdwn b/doc/users/harishcm.mdwn index 47f28c83c..164711022 100644 --- a/doc/users/harishcm.mdwn +++ b/doc/users/harishcm.mdwn @@ -1 +1 @@ -Using ikiwiki for my yet to be publish personal website :) +Using ikiwiki for my yet to be published personal website :) -- cgit v1.2.3 From cf6fd45a8a6379232c3c8dec652175c42a96040b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 22 Nov 2009 15:08:49 -0500 Subject: restore sandbox --- doc/sandbox.mdwn | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 2a02d41ce..8aedcbb9e 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1 +1,61 @@ -TEST +This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). + + +# Header + +## Subheader + +> This is a blockquote. +> +> This is the first level of quoting. +> +> > This is nested blockquote. +> +>> Without a space works too. +>>> to three levels +> +> Back to the first level. + +Numbered list + +1. First item. + 1. Sub item. +1. Another. +1. And another.. + 1. foo + 2. bar + +Bulleted list + +* item +* *item* +* item +* one + * two + +---- + +[[!template id=note text="this is generated by the [[plugins/haiku]] plugin"]] +[[!haiku hint="sandbox play"]] + +---- + +## Different sorts of links: + +* [[Features]] +* <http://ikiwiki.info/ikiwiki/formatting/> +* [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] +* <http://www.gnu.org/> +* [GNU](http://www.gnu.org/) + +----- + +[[!progress percent=27]] + +[[!progress percent=78]] + +----- + +This **SandBox** is also a [[blog]]! + +[[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] -- cgit v1.2.3 From ab2f53b081f98f92a40bb782ae9a755d7f6e4f6d Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4" <https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4@web> Date: Mon, 23 Nov 2009 02:16:28 -0500 Subject: --- doc/sandbox.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 2a02d41ce..f789143a6 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1 +1,3 @@ -TEST +# Sandbox + +Omne contento in Wikipedia es subjecte al [Licentia GNU pro Documentation Libere](http://ia.wikipedia.org/wiki/Licentia_GNU_pro_Documentation_Libere). -- cgit v1.2.3 From 34b961e31684bf11cf34aa720f4f75f2e23da5d4 Mon Sep 17 00:00:00 2001 From: Sean Bartell <wingedtachikoma@gmail.com> Date: Mon, 23 Nov 2009 02:25:38 -0500 Subject: Revert removal of sandbox content. This reverts commit 62dd681b3aa406a9bb6c1174eeaaacc8fe6b94ff. Conflicts: doc/sandbox.mdwn --- doc/sandbox.mdwn | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index f789143a6..bf913e78c 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,3 +1,63 @@ # Sandbox Omne contento in Wikipedia es subjecte al [Licentia GNU pro Documentation Libere](http://ia.wikipedia.org/wiki/Licentia_GNU_pro_Documentation_Libere). + +This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). + + +## Subheader + +> This is a blockquote. +> +> This is the first level of quoting. +> +> > This is nested blockquote. +> +>> Without a space works too. +>>> to three levels +> +> Back to the first level. + +Numbered list + +1. First item. + 1. Sub item. +1. Another. +1. And another.. + 1. foo + 2. bar + +Bulleted list + +* item +* *item* +* item +* one + * two + +---- + +[[!template id=note text="this is generated by the [[plugins/haiku]] plugin"]] +[[!haiku hint="sandbox play"]] + +---- + +## Different sorts of links: + +* [[Features]] +* <http://ikiwiki.info/ikiwiki/formatting/> +* [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] +* <http://www.gnu.org/> +* [GNU](http://www.gnu.org/) + +----- + +[[!progress percent=27]] + +[[!progress percent=78]] + +----- + +This **SandBox** is also a [[blog]]! + +[[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] -- cgit v1.2.3 From 6a694c5663666f6f88c5f691de57f48ee1f52b2c Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4" <https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4@web> Date: Mon, 23 Nov 2009 02:29:08 -0500 Subject: new post "Post" --- doc/sandbox/Post.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/sandbox/Post.mdwn (limited to 'doc') diff --git a/doc/sandbox/Post.mdwn b/doc/sandbox/Post.mdwn new file mode 100644 index 000000000..7ae61669b --- /dev/null +++ b/doc/sandbox/Post.mdwn @@ -0,0 +1,5 @@ +Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages +suitable for publishing on a website. Ikiwiki stores pages and history in a +[[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. +There are many other [[features]], including support for +[[blogging|blog]], as well as a large array of [[plugins]]. -- cgit v1.2.3 From 8eb2cbdf93f55090429526371833f108a886f5c6 Mon Sep 17 00:00:00 2001 From: "http://www.openid.albertlash.com/openid/" <http://www.openid.albertlash.com/openid/@web> Date: Mon, 23 Nov 2009 07:44:05 -0500 Subject: --- doc/setup/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/setup/discussion.mdwn b/doc/setup/discussion.mdwn index 1c5ad8260..a4f023dec 100644 --- a/doc/setup/discussion.mdwn +++ b/doc/setup/discussion.mdwn @@ -242,3 +242,6 @@ Thank you! I'm not a Perl programmer, so what's your opinion: is this behavior a > That is not entirely clear to me from the documentation. It doesn't > say the path has to exist, but doesn't say it cannot either. --[[Joey]] + +I am experiencing the same problem "/etc/ikiwiki/custom: failed to set up the repository with ikiwiki-makerepo +" on Debian squeeze with perl5.10.0. -- [Albert](http://www.docunext.com/) -- cgit v1.2.3 From 2a933a07c63056df0a645c501e16a951c7308184 Mon Sep 17 00:00:00 2001 From: "http://www.openid.albertlash.com/openid/" <http://www.openid.albertlash.com/openid/@web> Date: Mon, 23 Nov 2009 07:52:01 -0500 Subject: --- doc/setup/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/setup/discussion.mdwn b/doc/setup/discussion.mdwn index a4f023dec..b71263dae 100644 --- a/doc/setup/discussion.mdwn +++ b/doc/setup/discussion.mdwn @@ -244,4 +244,4 @@ Thank you! I'm not a Perl programmer, so what's your opinion: is this behavior a > say the path has to exist, but doesn't say it cannot either. --[[Joey]] I am experiencing the same problem "/etc/ikiwiki/custom: failed to set up the repository with ikiwiki-makerepo -" on Debian squeeze with perl5.10.0. -- [Albert](http://www.docunext.com/) +" on Debian squeeze with perl5.10.0. Upgrading to ikiwiki 3.10 fixes it. -- [Albert](http://www.docunext.com/) -- cgit v1.2.3 From b8ba8509adb5e8d84670d9f478e790363a89a526 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4" <https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4@web> Date: Mon, 23 Nov 2009 21:22:50 -0500 Subject: sandbox: add text to check searching --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 8aedcbb9e..3575a4dd6 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -31,7 +31,7 @@ Bulleted list * *item* * item * one - * two + * footballs; runner; unices ---- -- cgit v1.2.3 From ca7a05cd6d0608adac13576e8242fc757d054a7f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 23 Nov 2009 21:52:02 -0500 Subject: update --- doc/forum/google_openid_broken__63__.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 1be9d0487..cd71abf64 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -28,3 +28,17 @@ http://openid-provider.appspot.com/larrylud >> URL directly, it doesn't work. I think there is something weird with re-direction. I hope this >> isn't a more general security hole. >> -- [[Will]] + +---- + +So, while the above bug will probably get fixed sooner or later, +the best approach for those of you needing a google openid now is +to use gmail. + + +Just a note that someone has apparently figured out how to use a google +openid, and not a third-party provider either, to edit this site. +The openid is +<https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4> +(what a mouthfull!), and I don't know who that is or how to use it since it +points to a fairly useless xml document, rather than a web page. --[[Joey]] -- cgit v1.2.3 From 2903fe6539cd40e30543bc54933e53d795cb5e7d Mon Sep 17 00:00:00 2001 From: GraceTemplman46 <GraceTemplman46@web> Date: Tue, 24 Nov 2009 02:39:34 -0500 Subject: --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 732cf7a89..3ffcf9b27 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -24,5 +24,5 @@ The [[forum]] is open for discussions. [[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] can be submitted and tracked using this wiki. -ikiwiki is developed by [[Joey]] and many contributors, +ikiwiki is developed by [[Joey]] and many [research paper](http://www.superiorpapers.com) contributors, and is [[FreeSoftware]]. -- cgit v1.2.3 From dcc0d76d8b373a2f4445a06717869859f1fea2b9 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwinge@gnu.org> Date: Tue, 24 Nov 2009 08:52:46 +0100 Subject: Remove spam. This reverts commit 2903fe6539cd40e30543bc54933e53d795cb5e7d. --- doc/index.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 3ffcf9b27..732cf7a89 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -24,5 +24,5 @@ The [[forum]] is open for discussions. [[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] can be submitted and tracked using this wiki. -ikiwiki is developed by [[Joey]] and many [research paper](http://www.superiorpapers.com) contributors, +ikiwiki is developed by [[Joey]] and many contributors, and is [[FreeSoftware]]. -- cgit v1.2.3 From 22a12717010546882860f770c1eb7bd083255914 Mon Sep 17 00:00:00 2001 From: "http://liw.fi/" <http://liw.fi/@web> Date: Tue, 24 Nov 2009 04:07:27 -0500 Subject: --- doc/todo/support_link__40__.__41___in_pagespec.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/todo/support_link__40__.__41___in_pagespec.mdwn (limited to 'doc') diff --git a/doc/todo/support_link__40__.__41___in_pagespec.mdwn b/doc/todo/support_link__40__.__41___in_pagespec.mdwn new file mode 100644 index 000000000..da55bce67 --- /dev/null +++ b/doc/todo/support_link__40__.__41___in_pagespec.mdwn @@ -0,0 +1,10 @@ +[[!tag wishlist]] + +It would be nice to have pagespecs support "link(.)" as syntax. +This would match pages that link to the page that invokes the pagespec. +The use case is a blog with tags, and having a page for each tag +which uses !inline to list all posts with the tag. + +Joey said on IRC that "probably changing the derel() function in +IkiWiki.pm is the best way to do it". + -- cgit v1.2.3 From 43e95adc0ea864d1e59db0c6c1bcdda5c4ab5d50 Mon Sep 17 00:00:00 2001 From: NicolasLimare <NicolasLimare@web> Date: Tue, 24 Nov 2009 04:47:36 -0500 Subject: --- doc/sandbox.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 3575a4dd6..92f6728ef 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -59,3 +59,17 @@ Bulleted list This **SandBox** is also a [[blog]]! [[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]] + +---- + + +[[!toggleable id="foobar" text=""" +foo +"""]] + +[[!toggleable id="foobar" text=""" +bar +"""]] + +[[!toggle id="foobar" text="foo/bar"]] + -- cgit v1.2.3 From 4adf2e27c671d6b5441762df34c5ad32d91defe3 Mon Sep 17 00:00:00 2001 From: ettienne <ettienne@web> Date: Tue, 24 Nov 2009 05:59:30 -0500 Subject: --- doc/tips/dot_cgi/discussion.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/tips/dot_cgi/discussion.mdwn b/doc/tips/dot_cgi/discussion.mdwn index 124b9edff..a8854565c 100644 --- a/doc/tips/dot_cgi/discussion.mdwn +++ b/doc/tips/dot_cgi/discussion.mdwn @@ -34,3 +34,13 @@ there), and so I need to choose the more secure solution. --Ivan Z. >> The easiest way though is probably >> to add your ssh key to the special user's `.ssh/authorized_keys` >> and push that way. --[[Joey]] + +## apache2 - run from userdir +Followed instructions but couldn't get it right to run from user dir (running ubuntu jaunty), +Finally got it working once I've sym linked as follow (& restarted apache): +\# ln -s ../mods-available/userdir.load . +\# ln -s ../mods-available/userdir.conf . +\# pwd +/etc/apache2/mods-enabled + + -- cgit v1.2.3 From df75c5b93a1067461b649e48cc62d4c7f4d18ec7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 25 Nov 2009 01:18:43 -0500 Subject: date: New plugin that allows inserting date directives that expand to pretty-printed dates, using the same formatting as used for page modification date display, etc. --- IkiWiki/Plugin/date.pm | 33 +++++++++++++++++++++++++++++++++ debian/changelog | 3 +++ doc/ikiwiki/directive/date.mdwn | 14 ++++++++++++++ doc/plugins/date.mdwn | 6 ++++++ 4 files changed, 56 insertions(+) create mode 100644 IkiWiki/Plugin/date.pm create mode 100644 doc/ikiwiki/directive/date.mdwn create mode 100644 doc/plugins/date.mdwn (limited to 'doc') diff --git a/IkiWiki/Plugin/date.pm b/IkiWiki/Plugin/date.pm new file mode 100644 index 000000000..8f2aa73d6 --- /dev/null +++ b/IkiWiki/Plugin/date.pm @@ -0,0 +1,33 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::date; + +use warnings; +use strict; +use IkiWiki 3.00; + +sub import { + hook(type => "getsetup", id => "meta", call => \&getsetup); + hook(type => "preprocess", id => "meta", call => \&preprocess); +} + +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + }, +} + +sub preprocess (@) { + my $str=shift; + + eval q{use Date::Parse}; + error $@ if $@; + my $time = str2time($str); + if (! defined $time) { + error("unable to parse $str"); + } + return displaytime($time); +} + +1 diff --git a/debian/changelog b/debian/changelog index 15d56a693..10fcebbec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ ikiwiki (3.20091114) UNRELEASED; urgency=low larger for inlines of many, or complex pages. * Added (incomplete) Turkish po file. Closes: #556744 Thanks, Recai Oktaş + * date: New plugin that allows inserting date directives that expand to + pretty-printed dates, using the same formatting as used for page + modification date display, etc. -- Joey Hess <joeyh@debian.org> Mon, 16 Nov 2009 15:46:45 -0500 diff --git a/doc/ikiwiki/directive/date.mdwn b/doc/ikiwiki/directive/date.mdwn new file mode 100644 index 000000000..df45fa840 --- /dev/null +++ b/doc/ikiwiki/directive/date.mdwn @@ -0,0 +1,14 @@ +The `date` directive is supplied by the [[!iki plugins/date desc=date]] plugin. + +This directive can be used to display a date on a page, using the same +display method that is used to display the modification date in the page +footer, and other dates in the wiki. This can be useful for consistency +of display, or if you want to embed parseable dates into the page source. + +Like the dates used by the [[meta]] directive, the date can be entered in +nearly any format, since it's parsed by [[!cpan TimeDate]]. + +For example, an update to a page with an embedded date stamp could look +like: + + Updated \[[!date "Wed, 25 Nov 2009 01:11:55 -0500"]]: mumble mumble diff --git a/doc/plugins/date.mdwn b/doc/plugins/date.mdwn new file mode 100644 index 000000000..b8dbdfee5 --- /dev/null +++ b/doc/plugins/date.mdwn @@ -0,0 +1,6 @@ +[[!template id=plugin name=date author="[[Joey]]"]] +[[!tag type/meta]] + +This plugin provides the [[ikiwiki/directive/date]] +[[ikiwiki/directive]], which provides a way to display an arbitrary date +in a page. -- cgit v1.2.3 From f4cb6edd0f4d32710e2ef6ddef7de1b06b103389 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 25 Nov 2009 01:31:44 -0500 Subject: remove info about how to manually add relativedates The date directive is a better approach. --- doc/plugins/relativedate.mdwn | 6 ------ 1 file changed, 6 deletions(-) (limited to 'doc') diff --git a/doc/plugins/relativedate.mdwn b/doc/plugins/relativedate.mdwn index 3ada0864b..50c96c5d7 100644 --- a/doc/plugins/relativedate.mdwn +++ b/doc/plugins/relativedate.mdwn @@ -8,9 +8,3 @@ cause a tooltip to pop up with the absolute date. This only works in browsers with javascript enabled; other browsers will show the absolute date instead. Also, this plugin can be used with other plugins like [[prettydate]] that change how the absolute date is displayed. - -If this plugin is enabled, you may also add relative dates to pages in the -wiki, by using html elements in the "relativedate" class. For example, this -will display as a relative date: - - <span class="relativedate">Tue Jan 20 12:00:00 EDT 2009</span> -- cgit v1.2.3 From ae64fadcce529d771c7b7047ba8859757847170a Mon Sep 17 00:00:00 2001 From: harishcm <harishcm@web> Date: Wed, 25 Nov 2009 09:15:40 -0500 Subject: --- doc/bugs/bestlink_returns_deleted_pages.mdwn | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/bugs/bestlink_returns_deleted_pages.mdwn (limited to 'doc') diff --git a/doc/bugs/bestlink_returns_deleted_pages.mdwn b/doc/bugs/bestlink_returns_deleted_pages.mdwn new file mode 100644 index 000000000..59e9dbcb5 --- /dev/null +++ b/doc/bugs/bestlink_returns_deleted_pages.mdwn @@ -0,0 +1,54 @@ +To reproduce: + +1. Add the backlinkbug plugin below to ikiwiki. +2. Create a page named test.mdwn somewhere in the wiki. +3. Refresh ikiwiki in verbose mode. Pages whose bestlink is the test.mwdn page will be printed to the terminal. +4. Delete test.mdwn. +5. Refresh ikiwiki in verbose mode again. The same pages will be printed to the terminal again. +6. Refresh ikiwiki in verbose mode another time. Now no pages will be printed. + +bestlink() checks %links (and %pagecase) to confirm the existance of the page. +However, find_del_files() does not remove the deleted page from %links (and %pagecase). + +Since find_del_files removes the deleted page from %pagesources and %destsources, +won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] + + +---- + + #!/usr/bin/perl + # Plugin to reproduce bestlink returning deleted pages. + # Run with ikiwiki in verbose mode. + + package IkiWiki::Plugin::bestlinkbug; + + use warnings; + use strict; + use IkiWiki 3.00; + + sub import { + hook(type => "getsetup", id => "bestlinkbug", call => \&getsetup); + hook(type => "needsbuild", id => "bestlinkbug", call => \&needsbuild); + } + + sub getsetup () { + return + plugin => { + safe => 1, + rebuild => 0, + }, + } + + sub needsbuild (@) { + my $needsbuild=shift; + + foreach my $page (keys %pagestate) { + my $testpage=bestlink($page, "test") || next; + + debug("$page"); + } + } + + 1 + + -- cgit v1.2.3 From f0d1c32504321ae55e1663af00c15fab88558e3c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 25 Nov 2009 17:19:17 -0500 Subject: google's openid support announced today does work --- doc/forum/google_openid_broken__63__.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index cd71abf64..53713ce10 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -1,3 +1,9 @@ +Now that google supports using thier profiles as OpenIDs, that can be used +directly to sign into ikiwiki. Just use, for example, +<http://www.google.com/profiles/joeyhess> . Tested and it works. --[[Joey]] + +## historical discussion + when I login via to this wiki (or ours) via Google's OpenID, I get this error: Error: OpenID failure: no_identity_server: The provided URL doesn't declare its OpenID identity server. -- cgit v1.2.3 From d334e0221143e20b95e5b979dfc8eac0440c12a7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 25 Nov 2009 17:22:33 -0500 Subject: remove videntity, site not in english now, and does not appear in openid directory --- doc/ikiwiki/openid.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/openid.mdwn b/doc/ikiwiki/openid.mdwn index a79655284..318928139 100644 --- a/doc/ikiwiki/openid.mdwn +++ b/doc/ikiwiki/openid.mdwn @@ -13,7 +13,6 @@ To sign up for an OpenID, visit one of the following identity providers: * [MyOpenID](https://www.myopenid.com/) * [GetOpenID](https://getopenid.com/) -* [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/openid-providers-c-1.html) -- cgit v1.2.3 From 268a2dd54cd47d6ec39c22d61baa5f6f9d40b7f5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 26 Nov 2009 14:10:21 -0500 Subject: htmllink: allow a title attribute to be specified --- IkiWiki.pm | 9 ++++----- debian/changelog | 1 + doc/plugins/write.mdwn | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1e9d1ca2a..611ba6f65 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1081,11 +1081,10 @@ sub htmllink ($$$;@) { } my @attrs; - if (defined $opts{rel}) { - push @attrs, ' rel="'.$opts{rel}.'"'; - } - if (defined $opts{class}) { - push @attrs, ' class="'.$opts{class}.'"'; + foreach my $attr (qw{rel class title}) { + if (defined $opts{$attr}) { + push @attrs, " $attr=\"".$opts{attr}.'"'; + } } return "<a href=\"$bestlink\"@attrs>$linktext</a>"; diff --git a/debian/changelog b/debian/changelog index 10fcebbec..e31928223 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ ikiwiki (3.20091114) UNRELEASED; urgency=low * date: New plugin that allows inserting date directives that expand to pretty-printed dates, using the same formatting as used for page modification date display, etc. + * htmllink: Allow a title attribute to be specified. -- Joey Hess <joeyh@debian.org> Mon, 16 Nov 2009 15:46:45 -0500 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 2f179d46f..45f083b42 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -712,6 +712,7 @@ control some options. These are: * anchor - set to make the link include an anchor * rel - set to add a rel attribute to the link * class - set to add a css class to the link +* title - set to add a title attribute to the link #### `readfile($;$)` -- cgit v1.2.3 From a53bded6941198b33b928c1f7a989e37d4ab1b0e Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/will.uther" <http://www.google.com/profiles/will.uther@web> Date: Fri, 27 Nov 2009 21:54:52 -0500 Subject: Note on delegation of Google profile openids --- doc/forum/google_openid_broken__63__.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 53713ce10..68b44f2c1 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -2,6 +2,8 @@ Now that google supports using thier profiles as OpenIDs, that can be used directly to sign into ikiwiki. Just use, for example, <http://www.google.com/profiles/joeyhess> . Tested and it works. --[[Joey]] +> This seems to work fine if you use the profile directly as an OpenID. It doesn't seem to work with delegation. From that I can see, this is a deliberate decision by Google for security reasons. See the response [here](http://groups.google.com/group/google-federated-login-api/browse_thread/thread/825067789537568c/23451a68c8b8b057?show_docid=23451a68c8b8b057). -- [[Will]] + ## historical discussion when I login via to this wiki (or ours) via Google's OpenID, I get this error: -- cgit v1.2.3 From 617a3acfe462690713fc674abce1a97349efaba8 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/will.uther" <http://www.google.com/profiles/will.uther@web> Date: Fri, 27 Nov 2009 21:56:24 -0500 Subject: Add google profile openid --- doc/users/Will.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/Will.mdwn b/doc/users/Will.mdwn index 043203dc3..f5effdbe3 100644 --- a/doc/users/Will.mdwn +++ b/doc/users/Will.mdwn @@ -2,7 +2,7 @@ I started using Ikiwiki as a way to replace [Trac](http://trac.edgewall.org/) wh Lately I've been using Ikiwiki for other things and seem to be scratching a few itches here and there. :) -I generally use my [[ikiwiki/openid]] login when editing here: <http://www.cse.unsw.edu.au/~willu/> +I generally use my [[ikiwiki/openid]] login when editing here: <http://www.cse.unsw.edu.au/~willu/> or <http://www.google.com/profiles/will.uther>. I have a git repository for some of my IkiWiki code: <http://www.cse.unsw.edu.au/~willu/ikiwiki.git>. -- cgit v1.2.3 From 356bf3fed7700558e2e8dff26d3176aaf25f1b1e Mon Sep 17 00:00:00 2001 From: "http://beza1e1.myopenid.com/" <http://beza1e1.myopenid.com/@web> Date: Sat, 28 Nov 2009 06:13:32 -0500 Subject: added my personal homepage --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index acb63be39..4e5a0b45e 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -129,6 +129,7 @@ Personal sites and blogs * [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) * [Weakish Jiang's Homepage](http://weakish.pigro.net) * [Nico Schottelius' homepage](http://www.nico.schottelius.org) +* [Andreas Zwinkaus homepage](http://beza1e1.tuxen.de) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From e0d4b55bc885550a0e5a4fd49e2389eaeb5ec384 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sat, 28 Nov 2009 21:36:01 -0500 Subject: this would be a nifty feature --- doc/todo/enable_arbitrary_markup_for_directives.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/todo/enable_arbitrary_markup_for_directives.mdwn (limited to 'doc') diff --git a/doc/todo/enable_arbitrary_markup_for_directives.mdwn b/doc/todo/enable_arbitrary_markup_for_directives.mdwn new file mode 100644 index 000000000..7aa0b6d06 --- /dev/null +++ b/doc/todo/enable_arbitrary_markup_for_directives.mdwn @@ -0,0 +1,17 @@ +One of the good things about [PmWiki](http://www.pmwiki.org) is the ability to treat arbitrary markup as directives. +In ikiwiki, all directives have the same format: + +\[[!name arguments]] + +But with PmWiki, directives can be added to the engine (with the "Markup" hook) with the usual name and function passing, but also with a regexp which has capturing parentheses, and the results of the match are passed to the given function. +Would it be possible to alter the "preprocess" hook to have an optional regex argument which acted in a similar fashion? + +For example, one could then write a plugin which would treat + +Category: Foo, Bar + +as a tag, by using a regex such as /^Category:\s*([\w\s,]+)$/; the result "Foo, Bar" could then be further processed by the hook function. + +This could also make it easier to support more styles of markup, rather than having to do all the processing in "htmlize" and/or "filter". + +-- [[KathrynAndersen]] -- cgit v1.2.3 From bac8bc027d4a1bb262300be2323ae4093c193e5b Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" <http://bruno.boulgour.com/@web> Date: Sat, 28 Nov 2009 23:35:31 -0500 Subject: new version of the patch available on my git repo --- doc/todo/cas_authentication.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/todo/cas_authentication.mdwn b/doc/todo/cas_authentication.mdwn index 8bf7042df..ed8010518 100644 --- a/doc/todo/cas_authentication.mdwn +++ b/doc/todo/cas_authentication.mdwn @@ -21,6 +21,19 @@ follows) ? > license statement at the top. I have a few questions that I'll insert > inline with the patch below. --[[Joey]] +>> I have made some corrections to this patch (my cas plugin) in order to use +>> IkiWiki 3.00 interface and take your comments into account. It should work +>> fine now. +>> +>> You can pull it from my git repo at +>> http://git.boulgour.com/bbb/ikiwiki.git/ and maybe add it to your main +>> repo. +>> +>> I will add GNU GPL copyright license statement as soon as I get some free +>> time. +>> +>> --[[/users/bbb]] + ------------------------------------------------------------------------------ diff --git a/IkiWiki/Plugin/cas.pm b/IkiWiki/Plugin/cas.pm new file mode 100644 -- cgit v1.2.3 From 020200d84c8ee49be46d72e6c460f6a1906898e5 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" <http://weakish.pigro.net/@web> Date: Mon, 30 Nov 2009 05:27:25 -0500 Subject: remove of one site which no longer uses ikiwiki --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 4e5a0b45e..418768a2c 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -127,7 +127,6 @@ Personal sites and blogs * [tumashu's page](http://tumashu.github.com) This is my personal site in github created with ikiwiki and only a page,you can get the [source](http://github.com/tumashu/tumashu/tree/master) * [Skirv's Wiki](http://wiki.killfile.org) - formerly Skirv's Homepage * [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) -* [Weakish Jiang's Homepage](http://weakish.pigro.net) * [Nico Schottelius' homepage](http://www.nico.schottelius.org) * [Andreas Zwinkaus homepage](http://beza1e1.tuxen.de) -- cgit v1.2.3 From 5e513aa867fe22e021a5d02bb3fba57302a30ea8 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 30 Nov 2009 06:19:51 -0500 Subject: spew stream-of-conciousness nonsense re web services, fastcgi etc. --- doc/forum/web_service_API__44___fastcgi_support.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/forum/web_service_API__44___fastcgi_support.mdwn (limited to 'doc') diff --git a/doc/forum/web_service_API__44___fastcgi_support.mdwn b/doc/forum/web_service_API__44___fastcgi_support.mdwn new file mode 100644 index 000000000..480014c00 --- /dev/null +++ b/doc/forum/web_service_API__44___fastcgi_support.mdwn @@ -0,0 +1,11 @@ +This is a half-baked thought of mine so I thought I would post it in forum for discussion. + +There are some things that ikiwiki.cgi is asked to do which do not involve changing the repository: these include form generation, handling logins, the "goto" from [[recentchanges]], edit previews, etc. + +For one thing I am working on slowly ([[todo/interactive todo lists]]), I've hit a situation where I am likely to need to implement doing markup evaluation for a subset of a page. The problem I face is, if a user edits content in the browser, markup, ikiwiki directives etc. need to be expanded. I could possibly do this with a round-trip through edit preview, but that would be for the whole content of a page, and I hit the problem with editing a list item. + +Anyway - I've realised that a big part of the interactive todo lists stuff is trying to handle round trips to ikiwiki.cgi through javascript. A web services API would make handling the various conditions of this easier (e.g. need to login, login failed, etc.). I'm not sure what else might benefit from a web services API and I have no real experience of either using or writing them so I don't know what pros/cons there are for REST vs SOAP etc. + +Second, and in a way related, I've been mooting hacking fastcgi support into ikiwiki. Essentially one ikiwiki.cgi process would persist and serve CGI-ish requests on stdin/stdout. The initial content-scanning and dependency generation would happen once and not need to be repeated for future requests. Although, all state-changing operations would need to be careful to ensure the in-memory models were accurate. Also, I don't know how suited the data structures would be for persistence, since the current model is build em up, throw em away, they might not be space-efficient enough for persistence. + +If I did attempt this, I would want to avoid restructuring things in a way which would impair ikiwiki's core philosophy of being a static compiler. -- [[Jon]] -- cgit v1.2.3 From 3540f9fb92903046c86192dc0517d037728fcc5d Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 30 Nov 2009 06:22:23 -0500 Subject: addendum re: plans for structuring JS --- doc/forum/web_service_API__44___fastcgi_support.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/web_service_API__44___fastcgi_support.mdwn b/doc/forum/web_service_API__44___fastcgi_support.mdwn index 480014c00..4a78fb932 100644 --- a/doc/forum/web_service_API__44___fastcgi_support.mdwn +++ b/doc/forum/web_service_API__44___fastcgi_support.mdwn @@ -4,6 +4,8 @@ There are some things that ikiwiki.cgi is asked to do which do not involve chang For one thing I am working on slowly ([[todo/interactive todo lists]]), I've hit a situation where I am likely to need to implement doing markup evaluation for a subset of a page. The problem I face is, if a user edits content in the browser, markup, ikiwiki directives etc. need to be expanded. I could possibly do this with a round-trip through edit preview, but that would be for the whole content of a page, and I hit the problem with editing a list item. +> (slight addendum on this front. I'm planning to split the javascript code for interactive todo lists into two parts: one for handling round trips of content to and from ikiwiki.cgi, and the various failure modes that might occur (permission denied, edit conflicts, login required, etc.) ; then the list-specific stuff can build on top of this. The first chunk might be reusable by others for other AJAXY-edit fu.) + Anyway - I've realised that a big part of the interactive todo lists stuff is trying to handle round trips to ikiwiki.cgi through javascript. A web services API would make handling the various conditions of this easier (e.g. need to login, login failed, etc.). I'm not sure what else might benefit from a web services API and I have no real experience of either using or writing them so I don't know what pros/cons there are for REST vs SOAP etc. Second, and in a way related, I've been mooting hacking fastcgi support into ikiwiki. Essentially one ikiwiki.cgi process would persist and serve CGI-ish requests on stdin/stdout. The initial content-scanning and dependency generation would happen once and not need to be repeated for future requests. Although, all state-changing operations would need to be careful to ensure the in-memory models were accurate. Also, I don't know how suited the data structures would be for persistence, since the current model is build em up, throw em away, they might not be space-efficient enough for persistence. -- cgit v1.2.3 From cdd9ef8d588650b19ebdf7724e25cc15bfb2b218 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" <http://weakish.pigro.net/@web> Date: Mon, 30 Nov 2009 10:13:58 -0500 Subject: add info about webhost for ikiwiki --- doc/ikiwikiusers/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/ikiwikiusers/discussion.mdwn b/doc/ikiwikiusers/discussion.mdwn index 39a9bb921..2c211b097 100644 --- a/doc/ikiwikiusers/discussion.mdwn +++ b/doc/ikiwikiusers/discussion.mdwn @@ -33,3 +33,7 @@ Hopefully I will be one of the ikiwiki users one day :) cheers --[[Chao]] ---- Are there automated hosting sites for ikiwiki yet? If you know one, can you add one in a new section on [[ikiwikiusers]] please? If you don't know any and you're willing to pay to set one up (shouldn't be much more expensive than a single ikiwiki IMO), [contact me](http://www.ttllp.co.uk/contact.html) and let's talk. -- MJR + +---- + +People who have interests in getting a webhost for ikiwiki may have a look at [this site](http://www.pigro.net). -- weakish -- cgit v1.2.3 From 58ce89355f5af0bf2d9cedef66d57acc4ef76497 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 30 Nov 2009 17:39:33 -0500 Subject: I just fixed half of ikiwiki's second-oldest bug. Yay! --- doc/bugs/bestlink_change_update_issue.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/bestlink_change_update_issue.mdwn b/doc/bugs/bestlink_change_update_issue.mdwn index 8a526e821..c26e40d10 100644 --- a/doc/bugs/bestlink_change_update_issue.mdwn +++ b/doc/bugs/bestlink_change_update_issue.mdwn @@ -23,7 +23,10 @@ Keeping a copy of the backlinks has some merit. It could also be incrementally updated. + This old bug still exists as of 031d1bf5046ab77c796477a19967e7c0c512c417. + * And if Foo/Bar/Baz is then removed, Foo/Bar gets a broken link, instead of changing back to linking to Foo/Baz. -This old bug still exists as of 031d1bf5046ab77c796477a19967e7c0c512c417. + This part was finally fixed by commit + f1ddf4bd98821a597d8fa1532092f09d3d9b5483. -- cgit v1.2.3 From e104499f28f99408a6712aa603b9dd34e0b8471c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 30 Nov 2009 18:06:04 -0500 Subject: fixed.. partly --- doc/bugs/bestlink_returns_deleted_pages.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/bugs/bestlink_returns_deleted_pages.mdwn b/doc/bugs/bestlink_returns_deleted_pages.mdwn index 59e9dbcb5..035023c7d 100644 --- a/doc/bugs/bestlink_returns_deleted_pages.mdwn +++ b/doc/bugs/bestlink_returns_deleted_pages.mdwn @@ -13,6 +13,20 @@ However, find_del_files() does not remove the deleted page from %links (and %pag Since find_del_files removes the deleted page from %pagesources and %destsources, won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] +> This same problem turned out to also be the root of half of ikiwiki's +> second-oldest bug, [[bestlink_change_update_issue]]. +> +> Fixing it is really a bit involved, see commit +> f1ddf4bd98821a597d8fa1532092f09d3d9b5483. The fix I committed fixes +> bestlink to not return deleted pages, but only *after* the needsbuild and +> scan hooks are called. So I was able to fix it for every case except the +> one you gave! Sorry for that. To fix it during beedsbuild and scan, +> a much more involved approach would be needed. AFAICS, no existing plugin +> in ikiwiki uses bestlink in needsbuild or scan though. +> +> If the other half of [[bestlink_change_update_issue]] is fixed, +> maybe by keeping a copy of the old backlinks info, then that fix could be +> applied here too. --[[Joey]] ---- -- cgit v1.2.3 From df66288c4db6f670e3c258058712c9835f0ebf20 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 30 Nov 2009 20:31:37 -0500 Subject: an alternative approach using a bare mirror --- doc/tips/laptop_wiki_with_git.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 9758beb80..e85f7d12b 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -1,3 +1,5 @@ +[[!toc]] + Using ikiwiki with the [[rcs/git]] backend, some interesting things can be done with creating mirrors (or, really, branches) of a wiki. In this tip, I'll assume your wiki is located on a server, and you want to take a copy with @@ -8,6 +10,8 @@ version on the laptop, perhaps while offline. You can browse and edit the wiki using a local web server. When you're ready, you can manually push the changes to the main wiki on the server. +## Original approach + First, set up the wiki on the server, if it isn't already. Nothing special needs to be done here, just follow the regular instructions in [[setup]] for setting up ikiwiki with git. @@ -49,3 +53,14 @@ update the wiki, with a command such as `ikiwiki -setup wiki.setup -refresh`. If you'd like it to automatically update when changes are merged in, you can simply make a symlink `post-merge` hook pointing at the `post-update` hook ikiwiki created. + +## Alternative Approach + +As above, set up a normal ikiwiki on the server, with the usual bare repository. + +Next, `git clone --mirror server:/path/to/bare/repository` + +This will be used as the $REPOSITORY on the laptop. Then you can follow the instructions in [[setup by hand|/setup/byhand]] as per a normal ikiwiki installation. +This means that you can clone from the local bare repository as many times as you want (thus being able to have a repository which is used by the ikiwiki CGI, and another which you can use for updating via git). + +When you want to update the server from the laptop, do a `git push` from within the laptop's bare repository, and likewise do a `git pull` to update the laptop from the server. -- cgit v1.2.3 From c6ea46807423f68e903f897c464b0ed35f0c586a Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 30 Nov 2009 20:45:31 -0500 Subject: tagged this wishlist; was I supposed to do that? --- doc/todo/enable_arbitrary_markup_for_directives.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/enable_arbitrary_markup_for_directives.mdwn b/doc/todo/enable_arbitrary_markup_for_directives.mdwn index 7aa0b6d06..94713838e 100644 --- a/doc/todo/enable_arbitrary_markup_for_directives.mdwn +++ b/doc/todo/enable_arbitrary_markup_for_directives.mdwn @@ -15,3 +15,5 @@ as a tag, by using a regex such as /^Category:\s*([\w\s,]+)$/; the result "Foo, This could also make it easier to support more styles of markup, rather than having to do all the processing in "htmlize" and/or "filter". -- [[KathrynAndersen]] + +[[!taglink wishlist]] -- cgit v1.2.3 From 124200f3e31624457eb71167a1e74ce2aa70b819 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 30 Nov 2009 21:42:58 -0500 Subject: added my ikiwiki plugins git repo --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index ce762b0cd..fef2e01e0 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -52,6 +52,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[will]] `http://www.cse.unsw.edu.au/~willu/ikiwiki.git` * [[kaizer]] `git://github.com/engla/ikiwiki.git` * [[bbb]] `http://git.boulgour.com/bbb/ikiwiki.git` +* [[KathrynAndersen]] `git://github.com/rubykat/ikiplugins.git` ## branches -- cgit v1.2.3 From 9f30da3e1cb4fef022e1ad4802a6406e61c524d4 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 30 Nov 2009 21:55:06 -0500 Subject: xslt plugin --- doc/plugins/contrib/xslt.mdwn | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/plugins/contrib/xslt.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/xslt.mdwn b/doc/plugins/contrib/xslt.mdwn new file mode 100644 index 000000000..406d42f4e --- /dev/null +++ b/doc/plugins/contrib/xslt.mdwn @@ -0,0 +1,37 @@ +## NAME + +IkiWiki::Plugin::xslt - ikiwiki directive to process an XML file with XSLT + +## SYNOPSIS + +\[[!xslt file="data1.xml" stylesheet="style1.xsl"]] + +## DESCRIPTION + +IkiWiki::Plugin::xslt is an IkiWiki plugin implementing a directive +to process an input XML data file with XSLT, and output the result in +the page where the directive was called. + +It is expected that the XSLT stylesheet will output valid HTML markup. + +## OPTIONS + +There are two arguments to this directive. + +* **file:** + The file which contains XML data to be processed. This file is searched for using the usual IkiWiki mechanism, thus finding the file first in the same directory as the page, then in the directory above, and so on. + +* **stylesheet:** + The file which contains XSLT stylesheet to apply to the XML data. This file is searched for using the usual IkiWiki mechanism, thus finding the file first in the same directory as the page, then in the directory above, and so on. + +## PREREQUISITES + + IkiWiki + XML::LibXML + XML::LibXSLT + +## DOWNLOAD + +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/xslt.pm> +* git repo at git://github.com/rubykat/ikiplugins.git + -- cgit v1.2.3 From d57ec1c6a4d2e05d2570fb273c7682d383b3b7d9 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Tue, 1 Dec 2009 11:30:03 -0500 Subject: add plugin template --- doc/plugins/contrib/xslt.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/plugins/contrib/xslt.mdwn b/doc/plugins/contrib/xslt.mdwn index 406d42f4e..e26f58e38 100644 --- a/doc/plugins/contrib/xslt.mdwn +++ b/doc/plugins/contrib/xslt.mdwn @@ -1,3 +1,4 @@ +[[!template id=plugin name=xslt author="rubykat"]] ## NAME IkiWiki::Plugin::xslt - ikiwiki directive to process an XML file with XSLT -- cgit v1.2.3 From 99ffde64a8fb9059a32e49ae8653d18d80a1e190 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 1 Dec 2009 15:51:47 -0500 Subject: is this really better? --- doc/todo/enable_arbitrary_markup_for_directives.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/todo/enable_arbitrary_markup_for_directives.mdwn b/doc/todo/enable_arbitrary_markup_for_directives.mdwn index 94713838e..aa7b6fa49 100644 --- a/doc/todo/enable_arbitrary_markup_for_directives.mdwn +++ b/doc/todo/enable_arbitrary_markup_for_directives.mdwn @@ -17,3 +17,19 @@ This could also make it easier to support more styles of markup, rather than hav -- [[KathrynAndersen]] [[!taglink wishlist]] + +> Arbitrary text transformations can already be done via the filter and +> sanitize hooks. That's how the smiley and typography plugins do their +> thing. +> +> AFAICS, the only benefit to having a regexp-based-hook interface is less +> overhead in passing page content into the hooks. But that overhead is a +> small amount of the total render time. +> +> Also, I notice that smiley does such complicated things in its sanitize +> hook (ie, it looks at html context around the smilies) that a simple +> matching regexp would not be sufficient. Furthermore, typography needs to +> pass the page content into the library it uses, which does not expose +> regexps to match on. So ikiwiki's more general filtering interface seems +> to allow both of these to do things that could not be done with the +> PmWiki interface. --[[Joey]] -- cgit v1.2.3 From b042e4a0511a77df97d1be0657a2621bf1a1de1a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 1 Dec 2009 15:54:48 -0500 Subject: rename headers --- doc/tips/laptop_wiki_with_git.mdwn | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index e85f7d12b..85e26c729 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -10,7 +10,7 @@ version on the laptop, perhaps while offline. You can browse and edit the wiki using a local web server. When you're ready, you can manually push the changes to the main wiki on the server. -## Original approach +## simple clone approach First, set up the wiki on the server, if it isn't already. Nothing special needs to be done here, just follow the regular instructions in [[setup]] @@ -54,13 +54,19 @@ If you'd like it to automatically update when changes are merged in, you can simply make a symlink `post-merge` hook pointing at the `post-update` hook ikiwiki created. -## Alternative Approach +## bare mirror approach As above, set up a normal ikiwiki on the server, with the usual bare repository. Next, `git clone --mirror server:/path/to/bare/repository` -This will be used as the $REPOSITORY on the laptop. Then you can follow the instructions in [[setup by hand|/setup/byhand]] as per a normal ikiwiki installation. -This means that you can clone from the local bare repository as many times as you want (thus being able to have a repository which is used by the ikiwiki CGI, and another which you can use for updating via git). +This will be used as the $REPOSITORY on the laptop. Then you can follow +the instructions in [[setup by hand|/setup/byhand]] as per a normal ikiwiki +installation. This means that you can clone from the local bare repository +as many times as you want (thus being able to have a repository which is +used by the ikiwiki CGI, and another which you can use for updating via +git). -When you want to update the server from the laptop, do a `git push` from within the laptop's bare repository, and likewise do a `git pull` to update the laptop from the server. +When you want to update the server from the laptop, do a `git push` from +within the laptop's bare repository, and likewise do a `git pull` to update +the laptop from the server. -- cgit v1.2.3 From db746519ebca6495342d836a77c0664977ee0d99 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 1 Dec 2009 16:04:18 -0500 Subject: security and comments --- doc/plugins/contrib/xslt/discussion.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/plugins/contrib/xslt/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/xslt/discussion.mdwn b/doc/plugins/contrib/xslt/discussion.mdwn new file mode 100644 index 000000000..a549681de --- /dev/null +++ b/doc/plugins/contrib/xslt/discussion.mdwn @@ -0,0 +1,16 @@ +## security + +I'm curious what the security implications of having this plugin on a +publically writable wiki are. + +First, it looks like the way it looks up the stylesheet file will happily +use a regular .mdwn wiki page as the stylsheet. Which means any user can +create a stylesheet and have it be used, without needing permission to +upload arbitrary files. That probably needs to be fixed; one way would be +to mandate that the `srcfile` has a `.xsl` extension. + +Secondly, if an attacker is able to upload a stylesheet file somehow, could +this be used to attack the server where it is built? I know that xslt is +really a full programming language, so I assume at least DOS attacks are +possible. Can it also read other arbitrary files, run other programs, etc? +--[[Joey]] -- cgit v1.2.3 From 3ca05b15d6c47446e89128b405b9ffce8a418a3c Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 1 Dec 2009 18:30:25 -0500 Subject: reply to comment --- doc/plugins/contrib/xslt/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/xslt/discussion.mdwn b/doc/plugins/contrib/xslt/discussion.mdwn index a549681de..3288150a4 100644 --- a/doc/plugins/contrib/xslt/discussion.mdwn +++ b/doc/plugins/contrib/xslt/discussion.mdwn @@ -14,3 +14,9 @@ this be used to attack the server where it is built? I know that xslt is really a full programming language, so I assume at least DOS attacks are possible. Can it also read other arbitrary files, run other programs, etc? --[[Joey]] + +> For the first point, agreed. It should probably check that the data file has a `.xml` extension also. Will fix soon. + +> For the second point, I think the main concern would be resource usage. XSLT is a pretty limited language; it can read other XML files, but it can't run other programs so far as I know. + +> -- [[KathrynAndersen]] -- cgit v1.2.3 From 64765b365e46e0bd557d994829a0592497a5702c Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 1 Dec 2009 18:41:04 -0500 Subject: second thoughts --- doc/todo/enable_arbitrary_markup_for_directives.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/enable_arbitrary_markup_for_directives.mdwn b/doc/todo/enable_arbitrary_markup_for_directives.mdwn index aa7b6fa49..f521204e4 100644 --- a/doc/todo/enable_arbitrary_markup_for_directives.mdwn +++ b/doc/todo/enable_arbitrary_markup_for_directives.mdwn @@ -33,3 +33,6 @@ This could also make it easier to support more styles of markup, rather than hav > regexps to match on. So ikiwiki's more general filtering interface seems > to allow both of these to do things that could not be done with the > PmWiki interface. --[[Joey]] + +>>You have some good points. I was aware of using filter, but it didn't occur to me that one could use sanitize to do processing also, probably because "sanitize" brought to mind removing harmful content rather than doing other alterations. +>>It has also occurred to me, on further thought, that if one wants one's chosen markup to actually be processed during the "preprocess" stage, that one could do so by converting the chosen markup to directive-style markup during the "filter" stage and then processing the directive during the "preprocess" stage as per usual. Is there a tag for "no longer on the wishlist?". --[[KathrynAndersen]] -- cgit v1.2.3 From cbdd0d85078eb8bc9d01698e9cc8ac24e12ca7ea Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 1 Dec 2009 18:51:10 -0500 Subject: bug fix; now checks extensions. --- doc/plugins/contrib/xslt.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/xslt.mdwn b/doc/plugins/contrib/xslt.mdwn index e26f58e38..f98f8378d 100644 --- a/doc/plugins/contrib/xslt.mdwn +++ b/doc/plugins/contrib/xslt.mdwn @@ -20,10 +20,10 @@ It is expected that the XSLT stylesheet will output valid HTML markup. There are two arguments to this directive. * **file:** - The file which contains XML data to be processed. This file is searched for using the usual IkiWiki mechanism, thus finding the file first in the same directory as the page, then in the directory above, and so on. + The file which contains XML data to be processed. This file *must* have a `.xml` extension (`filename.xml`). This file is searched for using the usual IkiWiki mechanism, thus finding the file first in the same directory as the page, then in the directory above, and so on. * **stylesheet:** - The file which contains XSLT stylesheet to apply to the XML data. This file is searched for using the usual IkiWiki mechanism, thus finding the file first in the same directory as the page, then in the directory above, and so on. + The file which contains XSLT stylesheet to apply to the XML data. This file *must* have a `.xsl` extension (`filename.xsl`). This file is searched for using the usual IkiWiki mechanism, thus finding the file first in the same directory as the page, then in the directory above, and so on. ## PREREQUISITES -- cgit v1.2.3 From 18840f67e991e48e1c78bf848ce3dd50a649569b Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 1 Dec 2009 18:51:48 -0500 Subject: now have fixed xslt plugin --- doc/plugins/contrib/xslt/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/xslt/discussion.mdwn b/doc/plugins/contrib/xslt/discussion.mdwn index 3288150a4..9cda02f88 100644 --- a/doc/plugins/contrib/xslt/discussion.mdwn +++ b/doc/plugins/contrib/xslt/discussion.mdwn @@ -15,7 +15,7 @@ really a full programming language, so I assume at least DOS attacks are possible. Can it also read other arbitrary files, run other programs, etc? --[[Joey]] -> For the first point, agreed. It should probably check that the data file has a `.xml` extension also. Will fix soon. +> For the first point, agreed. It should probably check that the data file has a `.xml` extension also. Have now fixed. > For the second point, I think the main concern would be resource usage. XSLT is a pretty limited language; it can read other XML files, but it can't run other programs so far as I know. -- cgit v1.2.3 From 092877335cf0994fc1066e74309f698b2a101f76 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 1 Dec 2009 20:07:21 -0500 Subject: close --- doc/todo/enable_arbitrary_markup_for_directives.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/enable_arbitrary_markup_for_directives.mdwn b/doc/todo/enable_arbitrary_markup_for_directives.mdwn index f521204e4..c1f0f86ed 100644 --- a/doc/todo/enable_arbitrary_markup_for_directives.mdwn +++ b/doc/todo/enable_arbitrary_markup_for_directives.mdwn @@ -36,3 +36,12 @@ This could also make it easier to support more styles of markup, rather than hav >>You have some good points. I was aware of using filter, but it didn't occur to me that one could use sanitize to do processing also, probably because "sanitize" brought to mind removing harmful content rather than doing other alterations. >>It has also occurred to me, on further thought, that if one wants one's chosen markup to actually be processed during the "preprocess" stage, that one could do so by converting the chosen markup to directive-style markup during the "filter" stage and then processing the directive during the "preprocess" stage as per usual. Is there a tag for "no longer on the wishlist?". --[[KathrynAndersen]] + +>>> Yeah, sanitize is a misleading name for the relatively few things that +>>> use it this way. +>>> +>>> While you could do a filter to preprocess step, it is a bit +>>> of a long way round, since filter always runs just before +>>> preprocess. +>>> +>>> Anyway, guess this is [[done]] --[[Joey]] -- cgit v1.2.3 From 18a68a2c4bd671f730968493bbe2916e2d7c012e Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 1 Dec 2009 20:52:59 -0500 Subject: clearing up a bit of confusion about who I am --- doc/users/rubykat.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/rubykat.mdwn (limited to 'doc') diff --git a/doc/users/rubykat.mdwn b/doc/users/rubykat.mdwn new file mode 100644 index 000000000..f37d13306 --- /dev/null +++ b/doc/users/rubykat.mdwn @@ -0,0 +1 @@ +See [[KathrynAndersen]]. -- cgit v1.2.3 From 9cfd232a9c7ead375d6bcdfb5a91c8ec02d3e910 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 1 Dec 2009 20:54:15 -0500 Subject: clearing up a bit of confusion about who I am --- doc/users/KathrynAndersen.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/users/KathrynAndersen.mdwn b/doc/users/KathrynAndersen.mdwn index c26a91223..2f2838367 100644 --- a/doc/users/KathrynAndersen.mdwn +++ b/doc/users/KathrynAndersen.mdwn @@ -1,2 +1,4 @@ +* aka [[rubykat]] * Currently an active [PmWiki](http://www.pmwiki.org) user, but investigating changing over to ikiwiki (if I can write the plugins I need). * <http://kerravonsen.dreamwidth.org> +* <http://github.com/rubykat> -- cgit v1.2.3 From 6eb35262d5c2cd3a9b24029d958cc24743ccd64f Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 1 Dec 2009 20:55:25 -0500 Subject: clearing up a bit of confusion about who I am --- doc/plugins/contrib/xslt.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/xslt.mdwn b/doc/plugins/contrib/xslt.mdwn index f98f8378d..c30e618ea 100644 --- a/doc/plugins/contrib/xslt.mdwn +++ b/doc/plugins/contrib/xslt.mdwn @@ -1,4 +1,4 @@ -[[!template id=plugin name=xslt author="rubykat"]] +[[!template id=plugin name=xslt author="[[rubykat]]"]] ## NAME IkiWiki::Plugin::xslt - ikiwiki directive to process an XML file with XSLT -- cgit v1.2.3 From 5d68ee9e4e920ef3756c7489fd84eafd1b332f87 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 2 Dec 2009 00:43:47 -0500 Subject: here be a plugin for processing POD! --- doc/plugins/contrib/pod.mdwn | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/plugins/contrib/pod.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/pod.mdwn b/doc/plugins/contrib/pod.mdwn new file mode 100644 index 000000000..648e3b0c2 --- /dev/null +++ b/doc/plugins/contrib/pod.mdwn @@ -0,0 +1,35 @@ +## NAME + +IkiWiki::Plugin::pod - process pages written in POD format. + +## SYNOPSIS + +In the ikiwiki setup file, enable this plugin by adding it to the +list of active plugins. + + add_plugins => [qw{goodstuff pod ....}], + +## DESCRIPTION + +IkiWiki::Plugin::pod is an IkiWiki plugin enabling ikiwiki to +process pages written in POD (Plain Old Documentation) format. +This will treat files with a `.pod` or `.pm` extension as files +which contain POD markup. + +## OPTIONS + +The following options can be set in the ikiwiki setup file. + +* **pod_index:** If true, this will generate an index (table of contents) for the page. +* **pod_toplink:** The label to be used for links back to the top of the page. If this is empty, then no top-links will be generated. + +## PREREQUISITES + + IkiWiki + Pod::Xhtml + IO::String + +## DOWNLOAD + +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/pod.pm> +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From 11a6112b561a5624b30cb587a067d35e0098c21d Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 2 Dec 2009 00:45:23 -0500 Subject: added the proper template thingie --- doc/plugins/contrib/pod.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/plugins/contrib/pod.mdwn b/doc/plugins/contrib/pod.mdwn index 648e3b0c2..5ca1b3347 100644 --- a/doc/plugins/contrib/pod.mdwn +++ b/doc/plugins/contrib/pod.mdwn @@ -1,3 +1,4 @@ +[[!template id=plugin name=pod author="[[rubykat]]"]] ## NAME IkiWiki::Plugin::pod - process pages written in POD format. -- cgit v1.2.3 From 2a0f15d2cd2c5d6855650a27c4f6e7e56900ee84 Mon Sep 17 00:00:00 2001 From: harishcm <harishcm@web> Date: Wed, 2 Dec 2009 08:23:08 -0500 Subject: --- doc/bugs/bestlink_returns_deleted_pages.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/bestlink_returns_deleted_pages.mdwn b/doc/bugs/bestlink_returns_deleted_pages.mdwn index 035023c7d..2aed0520c 100644 --- a/doc/bugs/bestlink_returns_deleted_pages.mdwn +++ b/doc/bugs/bestlink_returns_deleted_pages.mdwn @@ -28,6 +28,10 @@ won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] > maybe by keeping a copy of the old backlinks info, then that fix could be > applied here too. --[[Joey]] +>> Cool that was fast! Well at least half the bug is solved :) For now I'll +>> probably try using a workaround if using bestlink within the needsbuild +>> or scan hooks. + ---- #!/usr/bin/perl -- cgit v1.2.3 From bd3bb876c292e5426a0dcf69e30f2e371cc4e59c Mon Sep 17 00:00:00 2001 From: harishcm <harishcm@web> Date: Wed, 2 Dec 2009 08:41:16 -0500 Subject: reply to joey's partial bugfix --- doc/bugs/bestlink_returns_deleted_pages.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/bestlink_returns_deleted_pages.mdwn b/doc/bugs/bestlink_returns_deleted_pages.mdwn index 2aed0520c..861663a56 100644 --- a/doc/bugs/bestlink_returns_deleted_pages.mdwn +++ b/doc/bugs/bestlink_returns_deleted_pages.mdwn @@ -30,7 +30,7 @@ won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] >> Cool that was fast! Well at least half the bug is solved :) For now I'll >> probably try using a workaround if using bestlink within the needsbuild ->> or scan hooks. +>> or scan hooks. Maybe by testing if pagemtime equals zero. --[[harishcm]] ---- -- cgit v1.2.3 From 304e373771405f6f24a235e4113d9746c39803ad Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 2 Dec 2009 13:06:31 -0500 Subject: note --- doc/bugs/bestlink_returns_deleted_pages.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/bestlink_returns_deleted_pages.mdwn b/doc/bugs/bestlink_returns_deleted_pages.mdwn index 861663a56..874f18ead 100644 --- a/doc/bugs/bestlink_returns_deleted_pages.mdwn +++ b/doc/bugs/bestlink_returns_deleted_pages.mdwn @@ -32,6 +32,9 @@ won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] >> probably try using a workaround if using bestlink within the needsbuild >> or scan hooks. Maybe by testing if pagemtime equals zero. --[[harishcm]] +>>> Yeah, and bestlink could also do that. However, it feels nasty to have +>>> it need to look at pagemtime. --[[Joey]] + ---- #!/usr/bin/perl -- cgit v1.2.3 From c4b7d046690a7d35f5f6dc73fcbc83b72bc95f42 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" <http://lj.rossia.org/users/imz/@web> Date: Wed, 2 Dec 2009 13:08:42 -0500 Subject: minor: a link to describe the format --- doc/plugins/contrib/pod.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/pod.mdwn b/doc/plugins/contrib/pod.mdwn index 5ca1b3347..dafffa844 100644 --- a/doc/plugins/contrib/pod.mdwn +++ b/doc/plugins/contrib/pod.mdwn @@ -13,7 +13,7 @@ list of active plugins. ## DESCRIPTION IkiWiki::Plugin::pod is an IkiWiki plugin enabling ikiwiki to -process pages written in POD (Plain Old Documentation) format. +process pages written in POD ([Plain Old Documentation](http://en.wikipedia.org/wiki/Plain_Old_Documentation)) format. This will treat files with a `.pod` or `.pm` extension as files which contain POD markup. -- cgit v1.2.3 From cf29a980bd5486ca70927c35acc0bdc809d4e11f Mon Sep 17 00:00:00 2001 From: testerinchen <testerinchen@web> Date: Wed, 2 Dec 2009 13:09:59 -0500 Subject: --- doc/examples/softwaresite/bugs/needs_more_bugs.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn b/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn index a150570a4..6627ac0b9 100644 --- a/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn +++ b/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn @@ -1,3 +1,4 @@ FooBar does not have enough bugs, which suggests that it's not a real Free Software project. Please help create more bugs by adding code to FooBar! :-) +And what now? -- cgit v1.2.3 From 0a5b34b8e12d9e5e3d5e493d8eafa629a65e2a80 Mon Sep 17 00:00:00 2001 From: testerinchen <testerinchen@web> Date: Wed, 2 Dec 2009 13:11:07 -0500 Subject: --- doc/examples/softwaresite/bugs/New_bug.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/examples/softwaresite/bugs/New_bug.mdwn (limited to 'doc') diff --git a/doc/examples/softwaresite/bugs/New_bug.mdwn b/doc/examples/softwaresite/bugs/New_bug.mdwn new file mode 100644 index 000000000..85f68d2b6 --- /dev/null +++ b/doc/examples/softwaresite/bugs/New_bug.mdwn @@ -0,0 +1 @@ +This is a new bug report! -- cgit v1.2.3 From 9fdd9af2db2bd21e543fa0f5f4bfa85b56b8dd5c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 2 Dec 2009 13:19:19 -0500 Subject: add news item for ikiwiki 3.20091202 --- doc/news/version_3.20091017.mdwn | 49 ---------------------------------------- doc/news/version_3.20091202.mdwn | 17 ++++++++++++++ 2 files changed, 17 insertions(+), 49 deletions(-) delete mode 100644 doc/news/version_3.20091017.mdwn create mode 100644 doc/news/version_3.20091202.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091017.mdwn b/doc/news/version_3.20091017.mdwn deleted file mode 100644 index aba830a82..000000000 --- a/doc/news/version_3.20091017.mdwn +++ /dev/null @@ -1,49 +0,0 @@ -News for ikiwiki 3.20091017: - - To take advantage of significant performance improvements, all - wikis need to be rebuilt on upgrade to this version. If you - listed your wiki in /etc/ikiwiki/wikilist this will be done - automatically when the Debian package is upgraded. Or use - ikiwiki-mass-rebuild to force a rebuild. - -ikiwiki 3.20091017 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Added support framework for multiple types of dependencies, including - dependncies that are only affected by page precence or link changes. - * Rebuild wikis on upgrade to this version to get improved dependency - info. - * pagecount, calendar, postsparkline, progress: Use a presence dependency, - which makes these directives much less expensive to use, since page - edits will no longer trigger an unnecessary update. - * map: Use a presence dependency unless show= is specified. - This makes maps efficient enough that they can be used on sidebars! - * inline: Use a presence dependency in quick mode. - * brokenlinks: Use a link dependency. - This makes it much more efficient, only updating when really necessary. - * orphans, pagestats: Use a combination of presence and link dependencies. - This makes them more efficient. It also fixes a longstanding bug, - where if only a small set of pages were considered by orphans/pagestats, - changes to links on other pages failed to cause an update. - * linkmap: Use a combination of presence and link dependencies. - This makes the map be regenerated much less frequently in many cases, - so larger maps are more practical to use now. - * Plugins providing PageSpec `match\_*` functions should pass additional - influence information when creating result objects. This allows correctly - handling many more complicated dependencies. - * API change: `pagespec\_match\_list` has completly changed its interface. - The old interface will be removed soon, and a warning will be printed - if any plugins try to use it. - * Transitive dependencies are now correctly supported. - * ikiwiki-calendar: New command automates creation of archive pages - using the calendar plugin. - * calendar: Fix midnight rebuild trigger of calendars with explicit - month/year. - * calendar: Fix bug in next/previous year/month links, which sometimes - linked to an archive page from the wrong year, or were missing. - * git: --getctime will now follow renames back to the original creation - of a file. - * calendar: Fix CSS for year calendar to match the plugin documentation. - * Added minimal default CSS for calendar plugin, just highlighting the - current day. - * inline: Optimize generation of archives, etc by not getting inlined page - content if the template does not use it."""]] \ No newline at end of file diff --git a/doc/news/version_3.20091202.mdwn b/doc/news/version_3.20091202.mdwn new file mode 100644 index 000000000..60f17fe63 --- /dev/null +++ b/doc/news/version_3.20091202.mdwn @@ -0,0 +1,17 @@ +ikiwiki 3.20091202 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * meta: Generate meta description tags even when the html scrubber is + enabled. + * meta: Allow use of DESCRIPTION in templates to get at the meta description + value. (Thanks, NicolasLimare) + * inline: Use caching of inlined pages to speed up builds of inlines that + include feeds. Speedup of about 25% for small inlines; could be much + larger for inlines of many, or complex pages. + * Added (incomplete) Turkish po file. Closes: #[556744](http://bugs.debian.org/556744) + Thanks, Recai Oktaş + * date: New plugin that allows inserting date directives that expand to + pretty-printed dates, using the same formatting as used for page + modification date display, etc. + * htmllink: Allow a title attribute to be specified. + * calendar: Add title attributes for all links in the calendars. + * calendar: Fix month wraparound error that broke in December."""]] \ No newline at end of file -- cgit v1.2.3 From 917b8e5ba17ba4b0c9a2cf5c12781f1880d02ff5 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" <http://lj.rossia.org/users/imz/@web> Date: Wed, 2 Dec 2009 13:20:43 -0500 Subject: minor: a link to describe the mentioned format --- doc/plugins/table.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/table.mdwn b/doc/plugins/table.mdwn index 7b080acda..10a85bb2c 100644 --- a/doc/plugins/table.mdwn +++ b/doc/plugins/table.mdwn @@ -3,6 +3,6 @@ This plugin provides the [[ikiwiki/directive/table]] [[ikiwiki/directive]]. It can build HTML tables from data in CSV (comma-separated values) -or DSV (delimiter-separated values) format. +or DSV ([delimiter-separated values](http://en.wikipedia.org/wiki/Delimiter-separated_values)) format. It needs the perl module [[!cpan Text::CSV]] for the CSV data. -- cgit v1.2.3 From bd2316dda729116edca516c4fc6cd906b4f1ef7e Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 2 Dec 2009 21:01:10 -0500 Subject: possible answer --- doc/forum/understanding_filter_hooks.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/forum/understanding_filter_hooks.mdwn b/doc/forum/understanding_filter_hooks.mdwn index 061d6d295..e6ddc91cc 100644 --- a/doc/forum/understanding_filter_hooks.mdwn +++ b/doc/forum/understanding_filter_hooks.mdwn @@ -7,3 +7,11 @@ but right now I have to have a look at the content, which I don't like so much. Is there a better hook to use for this? I need to transform the input before preprocessing. [[DavidBremner]] + +>You can check the type of the page without having to look at the content of the page: + + my $page_file=$pagesources{$page}; + my $page_type=pagetype($page_file); + +>Then you can check whether `$page_type` is "tex". +>--[[KathrynAndersen]] -- cgit v1.2.3 From 28dae7bbef98c1a10f2c389c63c05fb0227d26fb Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" <http://lj.rossia.org/users/imz/@web> Date: Thu, 3 Dec 2009 11:03:15 -0500 Subject: 3.20091017 news item removed? --- doc/news/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/news/discussion.mdwn b/doc/news/discussion.mdwn index 351e39c62..3a8152811 100644 --- a/doc/news/discussion.mdwn +++ b/doc/news/discussion.mdwn @@ -1,3 +1,7 @@ +## 3.20091017 news item removed? +Hi! Why have you [removed](http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;f=doc/news/version_3.20091017.mdwn;h=0000000000000000000000000000000000000000;hp=aba830a82f881bd97d11fe644eb2c78b99c2258d;hb=9fdd9af2db2bd21e543fa0f5f4bfa85b56b8dd5c;hpb=b74dceb884a60f6f7be395378a009ee414726d0b) the item for +3.20091017? Perhaps, it's an error, isn't it? The corresponding code AFAIU is still there. --Ivan Z. + ## Ikiwiki 3.12 Joey, what about news for Ikiwiki 3.12? The changelog says is has been released -- cgit v1.2.3 From 49e585d66289f8299f0d86c3944e95161f017c53 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" <http://lj.rossia.org/users/imz/@web> Date: Thu, 3 Dec 2009 13:22:00 -0500 Subject: a short report: Still true now. --- ...firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn b/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn index 8cb47f864..46e77a265 100644 --- a/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn +++ b/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn @@ -3,3 +3,5 @@ I'm using firefox-3.0.8-alt0.M41.1 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1 Only explicitly pressing "reload" helps. Is it a bug? I haven't been noticing such problems usually on other sites. --Ivan Z. + +This remains to be true now, with Epiphany 2.26.3 (Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.1.4pre) Gecko/20080528 Epiphany/2.22 Firefox/3.5). --Ivan Z. -- cgit v1.2.3 From 091794871c9011acd1195382fd4d968964a04d91 Mon Sep 17 00:00:00 2001 From: "http://joey.kitenet.net/" <http://joey.kitenet.net/@web> Date: Thu, 3 Dec 2009 14:26:29 -0500 Subject: --- doc/news/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/news/discussion.mdwn b/doc/news/discussion.mdwn index 3a8152811..d6a548f8b 100644 --- a/doc/news/discussion.mdwn +++ b/doc/news/discussion.mdwn @@ -2,6 +2,8 @@ Hi! Why have you [removed](http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;f=doc/news/version_3.20091017.mdwn;h=0000000000000000000000000000000000000000;hp=aba830a82f881bd97d11fe644eb2c78b99c2258d;hb=9fdd9af2db2bd21e543fa0f5f4bfa85b56b8dd5c;hpb=b74dceb884a60f6f7be395378a009ee414726d0b) the item for 3.20091017? Perhaps, it's an error, isn't it? The corresponding code AFAIU is still there. --Ivan Z. +> I always remove old news items when making a new release. The info is still there in the changelog if needed. --[[Joey]] + ## Ikiwiki 3.12 Joey, what about news for Ikiwiki 3.12? The changelog says is has been released -- cgit v1.2.3 From 321dbb026449da9ae9b389159f12635f8b105005 Mon Sep 17 00:00:00 2001 From: "http://numbat.myopenid.com/" <http://numbat.myopenid.com/@web> Date: Thu, 3 Dec 2009 16:53:09 -0500 Subject: --- doc/users/joshtriplett/discussion.mdwn | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 doc/users/joshtriplett/discussion.mdwn (limited to 'doc') diff --git a/doc/users/joshtriplett/discussion.mdwn b/doc/users/joshtriplett/discussion.mdwn new file mode 100644 index 000000000..647f93a83 --- /dev/null +++ b/doc/users/joshtriplett/discussion.mdwn @@ -0,0 +1,64 @@ +Can we please have a very brief HOWTO? + +I have a Moin wiki in /var/www/wiki and want to create an IkIwiki clone of it in /var/www/ikiwiki backed by a git repos in /data/ikiwiki. +{{{ +fatal: ambiguous argument 'master': unknown revision or path not in the working tree. +Use '--' to separate paths from revisions +fatal: ambiguous argument 'master': unknown revision or path not in the working tree. +Use '--' to separate paths from revisions +fatal: Not a valid object name master +Traceback (most recent call last): + File "/home/peterc/src/moin2iki/git-map", line 125, in <module> + if __name__ == "__main__": sys.exit(main(sys.argv[1:])) + File "/home/peterc/src/moin2iki/git-map", line 117, in main + print git_map_file('commit', new_head) + File "/home/peterc/src/moin2iki/git-map", line 33, in git_map_file + f(inproc.stdout, outproc.stdin, sha, arg) + File "/home/peterc/src/moin2iki/git-map", line 64, in handle_commit + string, tree = lines.pop(0).split() +IndexError: pop from empty list +}}} +I tried: + mkdir /var/www/ikiwiki + mkdir /data/ikiwiki + PATH=.:/usr/lib/git-core:$PATH ./moin2iki /data/ikiwiki http://localhost/wiki +but this failed. (BTW, I don't usually put . in my PATH). The failure appears to be that the converter doesn't actually create an ikiwiki instance, but appears to want to update one: + + fatal: ambiguous argument 'master': unknown revision or path not in the working tree. + Use '--' to separate paths from revisions + fatal: ambiguous argument 'master': unknown revision or path not in the working tree. + Use '--' to separate paths from revisions + fatal: Not a valid object name master + Traceback (most recent call last): + File "/home/peterc/src/moin2iki/git-map", line 125, in <module> + if __name__ == "__main__": sys.exit(main(sys.argv[1:])) + File "/home/peterc/src/moin2iki/git-map", line 117, in main + print git_map_file('commit', new_head) + File "/home/peterc/src/moin2iki/git-map", line 33, in git_map_file + f(inproc.stdout, outproc.stdin, sha, arg) + File "/home/peterc/src/moin2iki/git-map", line 64, in handle_commit + string, tree = lines.pop(0).split() + IndexError: pop from empty list + +OK, so I created one: + + ikiwiki --setup /etc/ikiwiki/auto.setup + ..... + This process created several files and directories in my home directory: + wiki.git/ + public_html/wiki/ + wiki.setup + .ikiwiki/ + +Following the instructions on the setup page, I did: + mv wiki.git /data/ikiwiki + ( cd /data/ikiwiki; git clone -l wiki.git wiki; ) + mv .ikiwiki /data/ikiwiki/ikiwiki + mv ~/public_html/wiki /var/ikiwiki/ + +then did again + PATH=.:/usr/lib/git-core:$PATH ./moin2iki /data/ikiwiki/wiki http://www/wiki +and saw no output, and no change to the filesystem. + + +Help please! -- cgit v1.2.3 From 251055d748822d8304c8f2094ef61795252bdb0f Mon Sep 17 00:00:00 2001 From: "http://numbat.myopenid.com/" <http://numbat.myopenid.com/@web> Date: Thu, 3 Dec 2009 17:08:14 -0500 Subject: --- doc/users/joshtriplett/discussion.mdwn | 46 ++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'doc') diff --git a/doc/users/joshtriplett/discussion.mdwn b/doc/users/joshtriplett/discussion.mdwn index 647f93a83..16e9be057 100644 --- a/doc/users/joshtriplett/discussion.mdwn +++ b/doc/users/joshtriplett/discussion.mdwn @@ -1,28 +1,14 @@ Can we please have a very brief HOWTO? I have a Moin wiki in /var/www/wiki and want to create an IkIwiki clone of it in /var/www/ikiwiki backed by a git repos in /data/ikiwiki. -{{{ -fatal: ambiguous argument 'master': unknown revision or path not in the working tree. -Use '--' to separate paths from revisions -fatal: ambiguous argument 'master': unknown revision or path not in the working tree. -Use '--' to separate paths from revisions -fatal: Not a valid object name master -Traceback (most recent call last): - File "/home/peterc/src/moin2iki/git-map", line 125, in <module> - if __name__ == "__main__": sys.exit(main(sys.argv[1:])) - File "/home/peterc/src/moin2iki/git-map", line 117, in main - print git_map_file('commit', new_head) - File "/home/peterc/src/moin2iki/git-map", line 33, in git_map_file - f(inproc.stdout, outproc.stdin, sha, arg) - File "/home/peterc/src/moin2iki/git-map", line 64, in handle_commit - string, tree = lines.pop(0).split() -IndexError: pop from empty list -}}} + I tried: - mkdir /var/www/ikiwiki - mkdir /data/ikiwiki - PATH=.:/usr/lib/git-core:$PATH ./moin2iki /data/ikiwiki http://localhost/wiki -but this failed. (BTW, I don't usually put . in my PATH). The failure appears to be that the converter doesn't actually create an ikiwiki instance, but appears to want to update one: + + mkdir /var/www/ikiwiki + mkdir /data/ikiwiki + PATH=.:/usr/lib/git-core:$PATH ./moin2iki /data/ikiwiki http://localhost/wiki + +Help please!but this failed. (BTW, I don't usually put . in my PATH). The failure appears to be that the converter doesn't actually create an ikiwiki instance, but appears to want to update one: fatal: ambiguous argument 'master': unknown revision or path not in the working tree. Use '--' to separate paths from revisions @@ -44,7 +30,8 @@ OK, so I created one: ikiwiki --setup /etc/ikiwiki/auto.setup ..... - This process created several files and directories in my home directory: +This process created several files and directories in my home directory: + wiki.git/ public_html/wiki/ wiki.setup @@ -57,8 +44,23 @@ Following the instructions on the setup page, I did: mv ~/public_html/wiki /var/ikiwiki/ then did again + PATH=.:/usr/lib/git-core:$PATH ./moin2iki /data/ikiwiki/wiki http://www/wiki + and saw no output, and no change to the filesystem. +I'm totally confused. It looks as though the script calls moin2git iff the target directory isn't there, but the script fails in interesting ways if it is. + +The other thing I saw was: + + 2009-12-04 09:00:31,542 WARNING MoinMoin.log:139 using logging configuration read from built-in fallback in MoinMoin.log module! + Traceback (most recent call last): + File "./moin2git", line 128, in <module> + if __name__ == '__main__': main(*sys.argv[1:]) + File "./moin2git", line 43, in main + r = request.RequestCLI() + AttributeError: 'module' object has no attribute 'RequestCLI' + +Moin version is 1.8.5 Help please! -- cgit v1.2.3 From 658da70f6aa52331389566cd1824e8342264dfe5 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 4 Dec 2009 04:09:44 -0500 Subject: added field plugin --- doc/plugins/contrib/field.mdwn | 97 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 doc/plugins/contrib/field.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/field.mdwn b/doc/plugins/contrib/field.mdwn new file mode 100644 index 000000000..f7c2f4b1b --- /dev/null +++ b/doc/plugins/contrib/field.mdwn @@ -0,0 +1,97 @@ +[[!template id=plugin name=pod author="[[rubykat]]"]] +[[!toc]] +## NAME + +IkiWiki::Plugin::field - front-end for per-page record fields. + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff field ....}], + + # simple registration + field_register => [qw{meta}], + +## DESCRIPTION + +This plugin is meant to be used in conjunction with other plugins +in order to provide a uniform interface to access per-page structured +data, where each page is treated like a record, and the structured data +are fields in that record. This can include the meta-data for that page, +such as the page title. + +Plugins can register a function which will return the value of a "field" for +a given page. This can be used in three ways: + +* In page templates; all registered fields will be passed to the page template in the "pagetemplate" processing. +* In PageSpecs; the "field" function can be used to match the value of a field in a page. +* By other plugins, using the field_get_value function, to get the value of a field for a page, and do with it what they will. + +## OPTIONS + +The following options can be set in the ikiwiki setup file. + +**field_register** + +A list of plugin-IDs to register. This assumes that the plugins in +question store data in the %pagestatus hash using the ID of that plugin, +and thus the field values are looked for there. + +This is the simplest form of registration, but the advantage is that it +doesn't require the plugin to be modified in order for it to be +registered with the "field" plugin. + +## PageSpec + +The "field" PageSpec function can be used to match the value of a field for a page. + +field(*name* *glob*) + +For example: + +field(bar Foo*) will match if the "bar" field starts with "Foo". + +## FUNCTIONS + +### field_register + +field_register(id=>$id); + +Register a plugin as having field data. The above form is the simplest, where the field value +is looked up in the %pagestatus hash under the plugin-id. + +Additional Options: + +**call=>&myfunc** + +A reference to a function to call rather than just looking up the value in the %pagestatus hash. +It takes two arguments: the name of the field, and the name of the page. It is expected to return +the value of that field, or undef if there is no field by that name. + + sub myfunc ($$) { + my $field = shift; + my $page = shift; + + ... + + return $value; + } + +**first=>1** + +Set this to be called first in the sequence of calls looking for values. Since the first found +value is the one which is returned, ordering is significant. + +**last=>1** + +Set this to be called last in the sequence of calls looking for values. Since the first found +value is the one which is returned, ordering is significant. + +### field_get_value($field, $page) + +Returns the value of the field for that page, or undef if none is found. + +## DOWNLOAD + +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/field.pm> +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From 2a4f37b4622bd5ce8e2c153fff2ae5d1d57f57de Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 4 Dec 2009 04:11:12 -0500 Subject: oops, fixed name --- doc/plugins/contrib/field.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field.mdwn b/doc/plugins/contrib/field.mdwn index f7c2f4b1b..745a36bcd 100644 --- a/doc/plugins/contrib/field.mdwn +++ b/doc/plugins/contrib/field.mdwn @@ -1,4 +1,4 @@ -[[!template id=plugin name=pod author="[[rubykat]]"]] +[[!template id=plugin name=field author="[[rubykat]]"]] [[!toc]] ## NAME -- cgit v1.2.3 From 27dd2810d48c7a08f6b82632d26d9f6f00f5cb6b Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 4 Dec 2009 04:29:10 -0500 Subject: request for comment --- doc/forum/an_alternative_approach_to_structured_data.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/forum/an_alternative_approach_to_structured_data.mdwn (limited to 'doc') diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn new file mode 100644 index 000000000..8898c90da --- /dev/null +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -0,0 +1,15 @@ +Looking at the discussion about [[todo/structured_page_data]], it looks a bit like folks are bogged down in figuring out what *markup* to use for structured page data, something I doubt that people will really agree on. And thus, little progress is made. + +I propose that, rather than worry about what the data looks like, that we take a similar approach +to the way Revision Control Systems are used in ikiwiki: a front-end + back-end approach. +The front-end would be a common interface, where queries are made about the structured data, +and there would be any number of back-ends, which could use whatever markup or format that they desired. + +To that purpose, I've written the [[plugins/contrib/field]] plugin for a possible front-end. +I called it "field" because each page could be considered a "record" where one could request the values of "fields" of that record. +The idea is that back-end plugins would register functions which can be called when the value of a field is desired. + +This is gone into in more depth on the plugin page itself, but I would appreciate feedback and improvements on the approach. +I think it could be really powerful and useful, especially if it becomes part of ikiwiki proper. + +--[[KathrynAndersen]] -- cgit v1.2.3 From d2c91d1a6b17fcf2c1c19d4c80d7147eef2b35fa Mon Sep 17 00:00:00 2001 From: "http://vibrog.myopenid.com/" <http://vibrog.myopenid.com/@web> Date: Fri, 4 Dec 2009 09:30:08 -0500 Subject: --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 92f6728ef..f25e56ae6 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -62,6 +62,7 @@ This **SandBox** is also a [[blog]]! ---- +What about [relative urls](formatting/)? [[!toggleable id="foobar" text=""" foo -- cgit v1.2.3 From ced9e33776f74d1190a104dcaf839229ba204137 Mon Sep 17 00:00:00 2001 From: "http://vibrog.myopenid.com/" <http://vibrog.myopenid.com/@web> Date: Fri, 4 Dec 2009 09:32:52 -0500 Subject: --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index f25e56ae6..e23c6330b 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -62,7 +62,7 @@ This **SandBox** is also a [[blog]]! ---- -What about [relative urls](formatting/)? +What about [relative urls](../setup/byhand)? [[!toggleable id="foobar" text=""" foo -- cgit v1.2.3 From 2ce7ae08b3559c151a76109a46c97b460922a4c4 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 4 Dec 2009 22:09:57 -0500 Subject: link to further discussion --- doc/todo/structured_page_data.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/structured_page_data.mdwn b/doc/todo/structured_page_data.mdwn index 72bfd8dea..da9da9663 100644 --- a/doc/todo/structured_page_data.mdwn +++ b/doc/todo/structured_page_data.mdwn @@ -1,5 +1,7 @@ This is an idea from [[JoshTriplett]]. --[[Joey]] +* See further discussion at [[forum/an_alternative_approach_to_structured_data]]. + Some uses of ikiwiki, such as for a bug-tracking system (BTS), move a bit away from the wiki end of the spectrum, and toward storing structured data about a page or instead of a page. -- cgit v1.2.3 From 505e94708d900948cb28fbf1d70f0499bf548b11 Mon Sep 17 00:00:00 2001 From: "http://www.google.com.au/profiles/will.uther" <http://www.google.com.au/profiles/will.uther@web> Date: Sat, 5 Dec 2009 01:44:36 -0500 Subject: --- doc/forum/an_alternative_approach_to_structured_data.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn index 8898c90da..fb007f7e9 100644 --- a/doc/forum/an_alternative_approach_to_structured_data.mdwn +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -13,3 +13,5 @@ This is gone into in more depth on the plugin page itself, but I would appreciat I think it could be really powerful and useful, especially if it becomes part of ikiwiki proper. --[[KathrynAndersen]] + +> It looks like an interesting idea. I don't have time right now to look at it in depth, but it looks interesting. -- [[Will]] -- cgit v1.2.3 From cb74161218449bc1bc7648782f421ede9b94334b Mon Sep 17 00:00:00 2001 From: harishcm <harishcm@web> Date: Sat, 5 Dec 2009 02:06:25 -0500 Subject: Removed my previous patch that is still affected by the bestlink returns deleted pages bug --- ...a_sidebar_does_not_regenerate_the_subpages.mdwn | 52 ---------------------- 1 file changed, 52 deletions(-) (limited to 'doc') diff --git a/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn b/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn index 93aafc2c0..419292930 100644 --- a/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn +++ b/doc/bugs/Building_a_sidebar_does_not_regenerate_the_subpages.mdwn @@ -6,55 +6,3 @@ If sandbox/page.mdwn has been generated and sandbox/sidebar.mdwn is created, the # adding a new sidebar page. So adding such a page # currently requires a wiki rebuild. add_depends($page, $sidebar_page); - ----- -Below is a patch for the bug. It's inspired by trying to solve [[todo/Post-compilation inclusion of the sidebar]]. -What do you think about it? I have a concern though. If a sidebar is removed, it takes two refreshes to update -the affected pages. Is this a feature or a bug? --[[harishcm]] - - --- sidebar.pm.orig 2009-11-21 17:40:02.000000000 +0800 - +++ sidebar_bugfix.pm 2009-11-21 18:16:11.000000000 +0800 - @@ -10,6 +10,7 @@ - - sub import { - hook(type => "getsetup", id => "sidebar", call => \&getsetup); - + hook(type => "needsbuild", id => "sidebar", call => \&needsbuild); - hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate); - } - - @@ -21,6 +22,22 @@ - }, - } - - +sub needsbuild (@) { - + my $needsbuild=shift; - + - + # Determine every pages' sidebar page - + foreach my $page (keys %pagesources) { - + my $sidebar_page=''; - + $sidebar_page=bestlink($page, "sidebar"); - + - + # If a page's sidebar has changed, force rebuild - + if (!exists $pagestate{$page}{sidebar}{sidebar_page} || $pagestate{$page}{sidebar}{sidebar_page} ne $sidebar_page) { - + $pagestate{$page}{sidebar}{sidebar_page} = $sidebar_page; - + push @$needsbuild, $pagesources{$page}; - + } - + } - +} - + - sub sidebar_content ($) { - my $page=shift; - - @@ -29,9 +46,9 @@ - my $sidebar_type=pagetype($sidebar_file); - - if (defined $sidebar_type) { - - # FIXME: This isn't quite right; it won't take into account - - # adding a new sidebar page. So adding such a page - - # currently requires a wiki rebuild. - + # Record current sidebar page for rechecking bestlink - + # during wiki refresh. Also add depends on the sidebar page. - + $pagestate{$page}{sidebar}{sidebar_page}=$sidebar_page; - add_depends($page, $sidebar_page); - - my $content=readfile(srcfile($sidebar_file)); -- cgit v1.2.3 From 1370a26030599dc2f7cbeb3df714e7935860e436 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 7 Dec 2009 01:03:37 -0500 Subject: show you the code! --- ...er_ceiling___40__opposite_of_levels__61____41__.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn index 547c7a80a..318375660 100644 --- a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn +++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn @@ -1,3 +1,20 @@ It would be nice if the [[plugins/toc]] plugin let you specify a header level "ceiling" above which (or above and including which) the headers would not be incorporated into the toc. Currently, the levels=X parameter lets you tweak how deep it will go for small headers, but I'd like to chop off the h1's (as I use them for my page title) -- [[Jon]] + +> This change to toc.pm should do it. --[[KathrynAndersen]] + + 56,57c56,57 + < my $startlevel=($params{startlevel} ? $params{startlevel} : 0); + < my $curlevel=$startlevel-1; + --- + > my $curlevel; + > my $startlevel=0; + 70d69 + < # unless we're given startlevel as a parameter + 75,79d73 + < elsif (defined $params{startlevel} + < and $level < $params{startlevel}) + < { + < return; + < } -- cgit v1.2.3 From 4fe1eb7ab542255eaa3d0266bc0437b49bacef4d Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 7 Dec 2009 01:05:35 -0500 Subject: my bad; wrong way around --- ...iling___40__opposite_of_levels__61____41__.mdwn | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn index 318375660..2d90772db 100644 --- a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn +++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn @@ -5,16 +5,17 @@ Currently, the levels=X parameter lets you tweak how deep it will go for small h > This change to toc.pm should do it. --[[KathrynAndersen]] 56,57c56,57 - < my $startlevel=($params{startlevel} ? $params{startlevel} : 0); - < my $curlevel=$startlevel-1; + < my $curlevel; + < my $startlevel=0; --- - > my $curlevel; - > my $startlevel=0; - 70d69 - < # unless we're given startlevel as a parameter - 75,79d73 - < elsif (defined $params{startlevel} - < and $level < $params{startlevel}) - < { - < return; - < } + > my $startlevel=($params{startlevel} ? $params{startlevel} : 0); + > my $curlevel=$startlevel-1; + 69a70 + > # unless we're given startlevel as a parameter + 73a75,79 + > elsif (defined $params{startlevel} + > and $level < $params{startlevel}) + > { + > return; + > } + -- cgit v1.2.3 From 8241b092acab7e8af0e6dd04ea53bdb67a314e44 Mon Sep 17 00:00:00 2001 From: "http://xma.myopenid.com/" <http://xma.myopenid.com/@web> Date: Mon, 7 Dec 2009 15:02:18 -0500 Subject: removed --- doc/users/xma.mdwn | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 doc/users/xma.mdwn (limited to 'doc') diff --git a/doc/users/xma.mdwn b/doc/users/xma.mdwn deleted file mode 100644 index 89f2ff74c..000000000 --- a/doc/users/xma.mdwn +++ /dev/null @@ -1,28 +0,0 @@ -[[!meta title="Xavier Maillard"]] -# Xavier Maillard - -I just started using [[ikiwiki]] for my own webspace at http://maillard.mobi/~xma/wiki - -I am learning how to effectively use it. - -Anyway, [[ikiwiki]] is really *awesome* ! - -## More about me - -I am CLI user living in the linux console. More precisely, I live in an [[GNU_Emacs]] frame all day long. My main computer is an EeePC 901 running Slackware GNU/Linux 12.1. I do not have X installed (too lazy) but when in X, I am running an instance of [[CLFSWM]]. - -## Contacting me - -Various channels to contact me: - -- mail: xma@gnu.org -- jabber: xma01@jabber.fr -- mobile: +33 621-964-362 (I only anwser to people I know though) - -Voila. - -## Plans - -I am planning to make a presentation of [[ikiwiki]]to my [local LUG](http://lolica.org) for our next montly meeting. Any help would be greatly appreciated. - -We are discussing to replace our old unmaintained (and unmaintainable) [SPIP](http://spip.net) website with a wiki. This is why I would like using ikiwiki ;) -- cgit v1.2.3 From d0604bdc745536d8d0c12c7366f838c273dc2e87 Mon Sep 17 00:00:00 2001 From: "http://adam.shand.net/" <http://adam.shand.net/@web> Date: Mon, 7 Dec 2009 21:51:56 -0500 Subject: --- doc/news/version_3.20091113.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/news/version_3.20091113.mdwn b/doc/news/version_3.20091113.mdwn index f313b57d1..579174011 100644 --- a/doc/news/version_3.20091113.mdwn +++ b/doc/news/version_3.20091113.mdwn @@ -13,6 +13,6 @@ ikiwiki 3.20091113 released with [[!toggle text="these changes"]] * httpauth: Add cgiauthurl setting that can be used to do http basic auth only when ikiwiki needs authentication, rather than for any access to the cgi/wiki. - * inline: Do not generated feeds for nested inlines. + * inline: Do not generate feeds for nested inlines. * inline: Allow direct inclusion of non-page files in raw mode. - * inline: Fix display of all pages when archive=yes or show=0 are used."""]] \ No newline at end of file + * inline: Fix display of all pages when archive=yes or show=0 are used."""]] -- cgit v1.2.3 From a132ca7c62df5ceb6c3be425613cd36c1938e335 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 10 Dec 2009 07:40:42 -0500 Subject: --- ..._set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn index 2d90772db..ce51d90a3 100644 --- a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn +++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn @@ -4,6 +4,12 @@ Currently, the levels=X parameter lets you tweak how deep it will go for small h > This change to toc.pm should do it. --[[KathrynAndersen]] +> > The patch looks vaguely OK to me but it's hard to tell without +> > context. It'd be much easier to review if you used unified diff +> > (`diff -u`), which is what `git diff` defaults to - almost all +> > projects prefer to receive changes as unified diffs (or as +> > branches in their chosen VCS, which is [[git]] here). --[[smcv]] + 56,57c56,57 < my $curlevel; < my $startlevel=0; @@ -19,3 +25,4 @@ Currently, the levels=X parameter lets you tweak how deep it will go for small h > return; > } +[[!tag patch]] -- cgit v1.2.3 From 5d4ef9cecc2079355099ed7ede016611945e2fba Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 10 Dec 2009 22:16:58 -0500 Subject: split out the toplevel discussion page into individual forum posts backdated to the date the topic was discussed to avoid flooding --- doc/forum.mdwn | 6 +- ...submitted_and_then_reviewed_before_posting.mdwn | 23 + .../Regex_for_Valid_Characters_in_Filenames.mdwn | 19 + doc/forum/Should_not_create_an_existing_page.mdwn | 15 + doc/forum/Spaces_in_wikilinks.mdwn | 104 +++++ ...teps_from_RecentChanges_CGI_to_static_page.mdwn | 10 + ...arious_ways_to_use_Subversion_with_ikiwiki.mdwn | 23 + doc/forum/editing_the_style_sheet.mdwn | 18 + doc/forum/how_do_I_translate_a_TWiki_site.mdwn | 44 ++ doc/forum/installation_and_setup_questions.mdwn | 52 +++ doc/forum/installation_as_non-root_user.mdwn | 7 + doc/forum/installation_of_selected_docs.mdwn | 29 ++ doc/forum/upgrade_steps.mdwn | 147 +++++++ doc/index/discussion.mdwn | 465 +-------------------- 14 files changed, 496 insertions(+), 466 deletions(-) create mode 100644 doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn create mode 100644 doc/forum/Regex_for_Valid_Characters_in_Filenames.mdwn create mode 100644 doc/forum/Should_not_create_an_existing_page.mdwn create mode 100644 doc/forum/Spaces_in_wikilinks.mdwn create mode 100644 doc/forum/Upgrade_steps_from_RecentChanges_CGI_to_static_page.mdwn create mode 100644 doc/forum/Various_ways_to_use_Subversion_with_ikiwiki.mdwn create mode 100644 doc/forum/editing_the_style_sheet.mdwn create mode 100644 doc/forum/how_do_I_translate_a_TWiki_site.mdwn create mode 100644 doc/forum/installation_and_setup_questions.mdwn create mode 100644 doc/forum/installation_as_non-root_user.mdwn create mode 100644 doc/forum/installation_of_selected_docs.mdwn create mode 100644 doc/forum/upgrade_steps.mdwn (limited to 'doc') diff --git a/doc/forum.mdwn b/doc/forum.mdwn index 729540774..19ca9ed0b 100644 --- a/doc/forum.mdwn +++ b/doc/forum.mdwn @@ -1,6 +1,8 @@ -This is a place for questions and discussions that don't have a Discussion page fitting enough. Users of ikiwiki can ask questions here. +This is a place for questions and discussions that don't have a Discussion +page fitting enough. Users of ikiwiki can ask questions here. -_This is a bold experiment by me, since I have exactly such a question. This overrides the default content/discussion dichotomy, feel free to refactor and discuss! --ulrik_ +Note that for more formal bug reports or todo items, you can also edit the +[[bugs]] and [[todo]] pages. ## Current topics ## diff --git a/doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn b/doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn new file mode 100644 index 000000000..3879c594a --- /dev/null +++ b/doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn @@ -0,0 +1,23 @@ +[[meta date="2008-04-28 14:57:25 -0400"]] + +I am considering moving a news site to Ikiwiki. I am hoping that Ikiwiki has a feature where anonymous posters can submit a form that moderators can review and then accept for it to be posted on a news webpage (like front page of the website). + +> Well, you can have one blog that contains unreviewed articles, and +> moderators can then add a tag that makes the article show up in the main +> news feed. There's nothing stopping someone submitting an article +> pre-tagged though. If you absolutely need to lock that down, you could +> have one blog with unreviewed articles in one subdirectory, and reviewers +> then move the file over to another subdirectory when they're ready to +> publish it. (This second subdirectory would be locked to prevent others +> from writing to it.) --[[Joey]] + +Also it would be good if the news page would keep maybe just the latest 10 entries with links to an archive that make it easy to browse to old entries by date. (Could have over a thousand news articles.) + +> The inline plugin allows setting up things like this. + +Plus users be able to post feedback to news items. If anonymous, they must be approved first. I'd prefer to not use normal "wiki" editor for feedback. + +Any thoughts or examples on this? Any links to examples of news sites or blogs with outside feedback using ikiwiki? + +Thanks --[[JeremyReed]] + diff --git a/doc/forum/Regex_for_Valid_Characters_in_Filenames.mdwn b/doc/forum/Regex_for_Valid_Characters_in_Filenames.mdwn new file mode 100644 index 000000000..618576f81 --- /dev/null +++ b/doc/forum/Regex_for_Valid_Characters_in_Filenames.mdwn @@ -0,0 +1,19 @@ +I'm sure that this is documented somewhere but I've ransacked the wiki and I can't find it. :-( What are the allowed characters in an ikiwiki page name? I'm writing a simple script to make updating my blog easier and need to filter invalid characters (so far I've found that # and , aren't allowed ;-)). Thanks for any pointers. -- [[AdamShand]] + +> The default `wiki_file_regexp` matches filenames containing only +> `[-[:alnum:]_.:/+]` +> +> The titlepage() function will convert freeform text to a valid +> page name. See [[todo/should_use_a_standard_encoding_for_utf_chars_in_filenames]] +> for an example. --[[Joey]] + +>> Perfect, thanks! +>> +>> In the end I decided that I didn't need any special characters in filenames and replaced everything but alphanumeric characters with underscores. In addition to replacing bad characters I also collapse multiple underscores into a single one, and strip off trailing and leading underscores to make tidy filenames. If it's useful to anybody else here's a sed example: +>> +>> # echo "++ Bad: ~@#$%^&*()_=}{[];,? Iki: +_-:./ Num: 65.5 ++" | sed -e 's/[^A-Za-z0-9_]/_/g' -e 's/__*/_/g' -e 's/^_//g' -e 's/_$//g' +>> Bad_Iki_Num_65_5 +>> +>>--[[AdamShand]] + +[[!meta date="2008-01-18 23:40:02 -0500"]] diff --git a/doc/forum/Should_not_create_an_existing_page.mdwn b/doc/forum/Should_not_create_an_existing_page.mdwn new file mode 100644 index 000000000..b9500757f --- /dev/null +++ b/doc/forum/Should_not_create_an_existing_page.mdwn @@ -0,0 +1,15 @@ +[[!meta date="2007-01-08 14:55:31 +0000"]] + +This might be a bug, but will discuss it here first. +Clicking on an old "?" or going to a create link but new Markdown content exists, should not go into "create" mode, but should do a regular "edit". + +> I belive that currently it does a redirect to the new static web page. +> At least that's the intent of the code. --[[Joey]] + +>> Try at your site: `?page=discussion&from=index&do=create` +>> It brings up an empty textarea to start a new webpage -- even though it already exists here. --reed + +>>> Ah, right. Notice that the resulting form allows saving the page as +>>> discussion, or users/discussion, but not index/discussion, since this +>>> page already exists. If all the pages existed, it would do the redirect +>>> thing. --[[Joey]] diff --git a/doc/forum/Spaces_in_wikilinks.mdwn b/doc/forum/Spaces_in_wikilinks.mdwn new file mode 100644 index 000000000..9326ac448 --- /dev/null +++ b/doc/forum/Spaces_in_wikilinks.mdwn @@ -0,0 +1,104 @@ +[[!meta date="2007-07-02 13:21:29 +0000"]] + +# Spaces in WikiLinks? + +Hello Joey, + +I've just switched from ikiwiki 2.0 to ikiwiki 2.2 and I'm really surprised +that I can't use the spaces in WikiLinks. Could you please tell me why the spaces +aren't allowed in WikiLinks now? + +My best regards, + +--[[PaweB|ptecza]] + +> See [[bugs/Spaces_in_link_text_for_ikiwiki_links]] + +---- + +# Build in OpenSolaris? + +Moved to [[bugs/build_in_opensolaris]] --[[Joey]] + +---- + +# Various ways to use Subversion with ikiwiki + +I'm playing around with various ways that I can use subversion with ikiwiki. + +* Is it possible to have ikiwiki point to a subversion repository which is on a different server? The basic checkin/checkout functionality seems to work but there doesn't seem to be any way to make the post-commit hook work for a non-local server? + +> This is difficult to do since ikiwiki's post-commit wrapper expects to +> run on a machine that contains both the svn repository and the .ikiwiki +> state directory. However, with recent versions of ikiwiki, you can get +> away without running the post-commit wrapper on commit, and all you lose +> is the ability to send commit notification emails. + +> (And now that [[recentchanges]] includes rss, you can just subscribe to +> that, no need to worry about commit notification emails anymore.) + +* Is it possible / sensible to have ikiwiki share a subversion repository with other data (either completely unrelated files or another ikiwiki instance)? This works in part but again the post-commit hook seems problematic. + +--[[AdamShand]] + +> Sure, see ikiwiki's subversion repository for example of non-wiki files +> in the same repo. If you have two wikis in one repository, you will need +> to write a post-commit script that calls the post-commit wrappers for each +> wiki. + +---- + +# Regex for Valid Characters in Filenames + +I'm sure that this is documented somewhere but I've ransacked the wiki and I can't find it. :-( What are the allowed characters in an ikiwiki page name? I'm writing a simple script to make updating my blog easier and need to filter invalid characters (so far I've found that # and , aren't allowed ;-)). Thanks for any pointers. -- [[AdamShand]] + +> The default `wiki_file_regexp` matches filenames containing only +> `[-[:alnum:]_.:/+]` +> +> The titlepage() function will convert freeform text to a valid +> page name. See [[todo/should_use_a_standard_encoding_for_utf_chars_in_filenames]] +> for an example. --[[Joey]] + +>> Perfect, thanks! +>> +>> In the end I decided that I didn't need any special characters in filenames and replaced everything but alphanumeric characters with underscores. In addition to replacing bad characters I also collapse multiple underscores into a single one, and strip off trailing and leading underscores to make tidy filenames. If it's useful to anybody else here's a sed example: +>> +>> # echo "++ Bad: ~@#$%^&*()_=}{[];,? Iki: +_-:./ Num: 65.5 ++" | sed -e 's/[^A-Za-z0-9_]/_/g' -e 's/__*/_/g' -e 's/^_//g' -e 's/_$//g' +>> Bad_Iki_Num_65_5 +>> +>>--[[AdamShand]] + +# Upgrade steps from RecentChanges CGI to static page? + +Where are the upgrade steps for RecentChanges change from CGI to static feed? +I run multiple ikiwiki-powered sites on multiple servers, but today I just upgraded one to 2.32.3. +Please have a look at +<http://bsdwiki.reedmedia.net/wiki/recentchanges.html> +Any suggestions? + +> There are no upgrade steps required. It does look like you need to enable +> the meta plugin to get a good recentchanges page though.. --[[Joey]] + +# News site where articles are submitted and then reviewed before posting? + +I am considering moving a news site to Ikiwiki. I am hoping that Ikiwiki has a feature where anonymous posters can submit a form that moderators can review and then accept for it to be posted on a news webpage (like front page of the website). + +> Well, you can have one blog that contains unreviewed articles, and +> moderators can then add a tag that makes the article show up in the main +> news feed. There's nothing stopping someone submitting an article +> pre-tagged though. If you absolutely need to lock that down, you could +> have one blog with unreviewed articles in one subdirectory, and reviewers +> then move the file over to another subdirectory when they're ready to +> publish it. (This second subdirectory would be locked to prevent others +> from writing to it.) --[[Joey]] + +Also it would be good if the news page would keep maybe just the latest 10 entries with links to an archive that make it easy to browse to old entries by date. (Could have over a thousand news articles.) + +> The inline plugin allows setting up things like this. + +Plus users be able to post feedback to news items. If anonymous, they must be approved first. I'd prefer to not use normal "wiki" editor for feedback. + +Any thoughts or examples on this? Any links to examples of news sites or blogs with outside feedback using ikiwiki? + +Thanks --[[JeremyReed]] + diff --git a/doc/forum/Upgrade_steps_from_RecentChanges_CGI_to_static_page.mdwn b/doc/forum/Upgrade_steps_from_RecentChanges_CGI_to_static_page.mdwn new file mode 100644 index 000000000..298ff49f1 --- /dev/null +++ b/doc/forum/Upgrade_steps_from_RecentChanges_CGI_to_static_page.mdwn @@ -0,0 +1,10 @@ +Where are the upgrade steps for RecentChanges change from CGI to static feed? +I run multiple ikiwiki-powered sites on multiple servers, but today I just upgraded one to 2.32.3. +Please have a look at +<http://bsdwiki.reedmedia.net/wiki/recentchanges.html> +Any suggestions? + +> There are no upgrade steps required. It does look like you need to enable +> the meta plugin to get a good recentchanges page though.. --[[Joey]] + +[[!meta date="2008-02-23 21:10:42 -0500"]] diff --git a/doc/forum/Various_ways_to_use_Subversion_with_ikiwiki.mdwn b/doc/forum/Various_ways_to_use_Subversion_with_ikiwiki.mdwn new file mode 100644 index 000000000..8eed30cd8 --- /dev/null +++ b/doc/forum/Various_ways_to_use_Subversion_with_ikiwiki.mdwn @@ -0,0 +1,23 @@ +[[!meta date="2007-08-17 03:54:10 +0000"]] + +I'm playing around with various ways that I can use subversion with ikiwiki. + +* Is it possible to have ikiwiki point to a subversion repository which is on a different server? The basic checkin/checkout functionality seems to work but there doesn't seem to be any way to make the post-commit hook work for a non-local server? + +> This is difficult to do since ikiwiki's post-commit wrapper expects to +> run on a machine that contains both the svn repository and the .ikiwiki +> state directory. However, with recent versions of ikiwiki, you can get +> away without running the post-commit wrapper on commit, and all you lose +> is the ability to send commit notification emails. + +> (And now that [[recentchanges]] includes rss, you can just subscribe to +> that, no need to worry about commit notification emails anymore.) + +* Is it possible / sensible to have ikiwiki share a subversion repository with other data (either completely unrelated files or another ikiwiki instance)? This works in part but again the post-commit hook seems problematic. + +--[[AdamShand]] + +> Sure, see ikiwiki's subversion repository for example of non-wiki files +> in the same repo. If you have two wikis in one repository, you will need +> to write a post-commit script that calls the post-commit wrappers for each +> wiki. --[[Joey]] diff --git a/doc/forum/editing_the_style_sheet.mdwn b/doc/forum/editing_the_style_sheet.mdwn new file mode 100644 index 000000000..c1e1ef815 --- /dev/null +++ b/doc/forum/editing_the_style_sheet.mdwn @@ -0,0 +1,18 @@ +[[!meta date="006-12-29 04:19:51 +0000"]] + +It would be nice to be able to edit the stylesheet by means of the cgi. Or is this possible? I wasn't able to achieve it. +Ok, that's my last 2 cents for a while. --[Mazirian](http://mazirian.com) + +> I don't support editing it, but if/when ikiwiki gets [[todo/fileupload]] support, +> it'll be possible to upload a style sheet. (If .css is in the allowed +> extensions list.. no idea how safe that would be, a style sheet is +> probably a great place to put XSS attacks and evil javascript that would +> be filtered out of any regular page in ikiwiki). --[[Joey]] + +>> I hadn't thought of that at all. It's a common feature and one I've +>> relied on safely, because the wikis I am maintaining at the moment +>> are all private and restricted to trusted users. Given that the whole +>> point of ikiwiki is to be able to access and edit via the shell as +>> well as the web, I suppose the features doesn't add a lot. By the +>> way, the w3m mode is brilliant. I haven't tried it yet, but the idea +>> is great. diff --git a/doc/forum/how_do_I_translate_a_TWiki_site.mdwn b/doc/forum/how_do_I_translate_a_TWiki_site.mdwn new file mode 100644 index 000000000..5bfdbb86c --- /dev/null +++ b/doc/forum/how_do_I_translate_a_TWiki_site.mdwn @@ -0,0 +1,44 @@ +[[!meta date="2006-12-19 09:56:21 +0000"]] + +# Excellent - how do I translate a TWiki site? + +I just discovered ikiwiki quite by chance, I was looking for a console/terminal +menu system and found pdmenu. So pdmenu brought me to here and I've found ikiwiki! +It looks as if it's just what I've been wanting for a long time. I wanted something +to create mostly text web pages which, as far as possible, have source which is human +readable or at least in a standard format. ikiwiki does this twice over by using +markdown for the source and producing static HTML from it. + +I'm currently using TWiki and have a fair number of pages in that format, does +anyone have any bright ideas for translating? I can knock up awk scripts fairly +easily, perl is possible (but I'm not strong in perl). + +> Let us know if you come up with something to transition from the other +> format. Another option would be writing a ikiwiki plugin to support the +> TWiki format. --[[Joey]] + +> Jamey Sharp and I have a set of scripts in progress to convert other wikis to ikiwiki, including history, so that we can migrate a few of our wikis. We already have support for migrating MoinMoin wikis to ikiwiki, including conversion of the entire history to Git. We used this to convert the [XCB wiki](http://xcb.freedesktop.org/wiki/) to ikiwiki; until we finalize the conversion and put the new wiki in place of the old one, you can browse the converted result at <http://xcb.freedesktop.org/ikiwiki>. We already plan to add support for TWiki (including history, since you can just run parsecvs on the TWiki RCS files to get Git), so that we can convert the [Portland State Aerospace Society wiki](http://psas.pdx.edu) (currently in Moin, but with much of its history in TWiki, and with many of its pages still in TWiki format using Jamey's TWiki format for MoinMoin). +> +> Our scripts convert by way of HTML, using portions of the source wiki's code to render as HTML (with some additional code to do things like translate MoinMoin's `\[[TableOfContents]]` to ikiwiki's `\[[!toc ]]`), and then using a modified [[!cpan HTML::WikiConverter]] to turn this into markdown and ikiwiki. This produces quite satisfactory results, apart from things that don't have any markdown equivalent and thus remain HTML, such as tables and definition lists. Conversion of the history occurs by first using another script we wrote to translate MoinMoin history to Git, then using our git-map script to map a transformation over the Git history. +> +> We will post the scripts as soon as we have them complete enough to convert our wikis. +> +> -- [[JoshTriplett]] + +>> Thanks for an excellent Xmas present, I will appreciate the additional +>> users this will help switch to ikiwiki! --[[Joey]] + + +>> Sounds great indeed. Learning from [here](http://www.bddebian.com/~wiki/AboutTheTWikiToIkiwikiConversion/) that HTML::WikiConverter needed for your conversion was not up-to-date on Debian I have now done an unofficial package, including your proposed Markdown patches, apt-get'able at <pre>deb http://debian.jones.dk/ sid wikitools</pre> +>> -- [[JonasSmedegaard]] + + +>>I see the "We will post the scripts ...." was committed about a year ago. A current site search for "Moin" does not turn them up. Any chance of an appearance in the near (end of year) future? +>> +>> -- [[MichaelRasmussen]] + +>>> It appears the scripts were never posted? I recently imported my Mediawiki site into Iki. If it helps, my notes are here: <http://iki.u32.net/Mediawiki_Conversion> --[[sabr]] + +>>>>> The scripts have been posted now, see [[joshtriplett]]'s user page, +>>>>> and I've pulled together all ways I can find to [[convert]] other +>>>>> systems into ikiwiki. --[[Joey]] diff --git a/doc/forum/installation_and_setup_questions.mdwn b/doc/forum/installation_and_setup_questions.mdwn new file mode 100644 index 000000000..50633ec3f --- /dev/null +++ b/doc/forum/installation_and_setup_questions.mdwn @@ -0,0 +1,52 @@ +[[!meta date="2007-03-02 00:57:08 +0000"]] + +Ikiwiki creates a .ikiwiki directory in my wikiwc working directory. Should I +"svn add .ikiwiki" or add it to svn:ignore? + +> `.ikiwiki` is used by ikiwiki to store internal state. You can add it to +> svn:ignore. --[[Joey]] +> > Thanks a lot. + +Is there an easy way to log via e-mail to some webmaster address, instead +of via syslog? + +> Not sure why you'd want to do that, but couldn't you use a tool like +> logwatch to mail selected lines from the syslog? --[[Joey]] + +> > The reason is that I'm not logged in on the web server regularly to +> > check the log files. I'll see whether I can install a logwatch instance. + +I'm trying to install from scratch on a CentOS 4.6 system. I installed perl 5.8.8 from source and then added all the required modules via CPAN. When I build ikiwiki from the tarball, I get this message: + + rendering todo/calendar_--_archive_browsing_via_a_calendar_frontend.mdwn + *** glibc detected *** double free or corruption (!prev): 0x0922e478 *** + make: *** [extra_build] Aborted + +I'm kind of at a loss how to track this down or work around it. Any suggestions? --Monty + +> All I can tell you is that it looks like a problem with your C library or +> perl. Little perl programs like ikiwiki should only be able to trigger +> such bugs, not contain them. :-) Sorry I can't be of more help. +> --[[Joey]] + +> I had a similar problem after upgrading to the latest version of +> Text::Markdown from CPAN. You might try either looking for a Markdown +> package for CentOS or using the latest version of John Gruber's +> Markdown.pl: +> <http://daringfireball.net/projects/downloads/Markdown_1.0.2b8.tbz> +> --[[JasonBlevins]], April 1, 2008 18:22 EDT + +>> Unfortunately I couldn't find a CentOS package for markdown, and I +>> couldn't quite figure out how to use John Gruber's version instead. +>> I tried copying it to site_perl, etc., but the build doesn't pick +>> it up. For now I can just play with it on my Ubuntu laptop for which +>> the debian package installed flawlessly. I'll probably wait for an +>> updated version of Markdown to see if this is fixed in the future. +>> --Monty + +>I suggest that you pull an older version of Text::Markdown from CPAN. I am using <http://backpan.perl.org/authors/id/B/BO/BOBTFISH/Text-Markdown-1.0.5.tar.gz> and that works just fine. +>There is a step change in version and size between this version (dated 11Jan2008) and the next version (1.0.12 dated 18Feb2008). I shall have a little look to see why, in due course. +>Ubuntu Hardy Heron has a debian package now, but that does not work either. +> --Dirk 22Apr2008 + +> This might be related to [Text::Markdown bug #37297](http://rt.cpan.org/Public/Bug/Display.html?id=37297).--ChapmanFlack 9Jul2008 diff --git a/doc/forum/installation_as_non-root_user.mdwn b/doc/forum/installation_as_non-root_user.mdwn new file mode 100644 index 000000000..4997af2ac --- /dev/null +++ b/doc/forum/installation_as_non-root_user.mdwn @@ -0,0 +1,7 @@ +I'd like to install ikiwiki as a non-root user. I can plow through getting all the +perl dependencies installed because that's well documented in the perl world, +but I don't know how to tell ikiwiki to install somewhere other than / --BrianWilson + +> Checkout the tips section for [[tips/DreamHost]]. It should do the trick. --MattReynolds + +[[!meta date="2008-01-13 16:02:52 -0500"]] diff --git a/doc/forum/installation_of_selected_docs.mdwn b/doc/forum/installation_of_selected_docs.mdwn new file mode 100644 index 000000000..81dd1ee00 --- /dev/null +++ b/doc/forum/installation_of_selected_docs.mdwn @@ -0,0 +1,29 @@ +[[!meta date="2007-09-06 19:47:23 +0000"]] + +# Installation of selected docs (html) + +The latest release has around 560 files (over 2MB) in html. + +Any suggestions or ideas on limiting what html is installed? + +For example, I don't see value in every ikiwiki install out there to also install personal "users" ikiwiki pages. + +For now I copy ikiwiki.setup. And then use pax with -L switch to copy the targets of the symlinks of the basewiki. + +I was thinking of making a list of desired documents from the html directory to install. + +--JeremyReed + +> You don't need any of them, unless you want to read ikiwiki's docs locally. +> +> I don't understand why you're installing the basewiki files manually; +> ikiwiki has a Makefile that will do this for you. --[[Joey]] + +>> The Makefile's install doesn't do what I want so I use different installer for it. +>> It assumes wrong location for man pages for me. (And it should consider using INSTALLVENDORMAN1DIR and +>> MAN1EXT but I don't know about section 8 since I don't know of perl value for that.) +>> I don't want w3m cgi installed; it is optional for my package. +>> I will just patch for that instead of using my own installer. +>> Note: I am working on the pkgsrc package build specification for this. This is for creating +>> packages for NetBSD, DragonFly and other systems that use pkgsrc package system. +>> --JeremyReed diff --git a/doc/forum/upgrade_steps.mdwn b/doc/forum/upgrade_steps.mdwn new file mode 100644 index 000000000..1c85e6402 --- /dev/null +++ b/doc/forum/upgrade_steps.mdwn @@ -0,0 +1,147 @@ +[[!meta date="2007-08-27 21:52:18 +0000"]] + +I upgrades from 1.40 to 2.6.1. I ran "ikiwiki --setup" using my existing ikiwiki.setup configuration. +I had many errors like: + + /home/bsdwiki/www/wiki/wikilink/index.html independently created, not overwriting with version from wikilink + BEGIN failed--compilation aborted at (eval 5) line 129. + +and: + + failed renaming /home/bsdwiki/www/wiki/smileys.ikiwiki-new to /home/bsdwiki/www/wiki/smileys: Is a directory + BEGIN failed--compilation aborted at (eval 5) line 129. + +Probably about six errors like this. I worked around this by removing the files and directories it complained about. +Finally it finished. + +> As of version 2.0, ikiwiki enables usedirs by default. See +> [[tips/switching_to_usedirs]] for details. --[[Joey]] + +>> I read the config wrong. I was thinking that it showed the defaults even though commented out +>> (like ssh configs do). I fixed that part. --JeremyReed + +My next problem was that ikiwiki start letting me edit without any password authentication. It used to prompt +me for a password but now just goes right into the "editing" mode. +The release notes for 2.0 say password auth is still on by default. + +> It sounds like you have the anonok plugin enabled? + +>> Where is the default documented? My config doesn't have it uncommented. + +The third problem is that when editing my textbox is empty -- no content. + +This is using my custom rcs.pm which has been used thousands of times. + +> Have you rebuilt the cgi wrapper since you upgraded ikiwiki? AFAIK I +> fixed a bug that could result in the edit box always being empty back in +> version 2.3. The only other way it could happen is if ikiwiki does not +> have saved state about the page that it's editing (in .ikiwiki/index). + +>> Rebuilt it several times. Now that I think of it, I think my early problem of having +>> no content in the textbox was before I rebuilt the cgi. And after I rebuilt the whole webpage was empty. + +Now I regenerated my ikiwiki.cgi again (no change to my configuration, +and I just get an empty HTML page when attempting editing or "create". + +> If the page is completly empty then ikiwiki is crashing before it can +> output anything, though this seems unlikely. Check the webserver logs. + +Now I see it created directories for my data. I fixed that by setting +usedirs (I see that is in the release notes for 2.0) and rerunning ikiwiki --setup +but I still have empty pages for editing (no textbox no html at all). + +> Is IkiWiki crashing? If so, it would probably leave error text in the apache logs. --[[TaylorKillian]] + +>> Not using apache. Nothing useful in logs other thn the HTTP return codes are "0" and bytes is "-" +>> on the empty ikiwiki.cgi output (should say " 200 " followed by bytes). + +>>> You need to either figure out what your web server does with stderr +>>> from cgi programs, or run ikiwiki.cgi at the command line with an +>>> appropriate environment so it thinks it's being called from a web +>>> server, so you can see how it's failing. --[[Joey]] + +(I am posting this now, but will do some research and post some more.) + +Is there any webpage with upgrade steps? + +> Users are expected to read [[news]], which points out any incompatible +> changes or cases where manual action is needed. + +>> I read it but read the usedirs option wrong :(. +>> Also it appears to be missing the news from between 1.40 to 2.0 unless they dont' exist. +>> If they do exist maybe they have release notes I need? + +>>> All the old ones are in the NEWS file. --[[Joey]] + +--JeremyReed + +My followup: I used a new ikiwiki.setup based on the latest version. But no changes for me. + +Also I forgot to mention that do=recentchanges works good for me. It uses my +rcs_recentchanges in my rcs perl module. + +The do=prefs does nothing though -- just a blank webpage. + +> You need to figure out why ikiwiki is crashing. The webserver logs should +> tell you. + +I also set verbose => 1 and running ikiwiki --setup was verbose, but no changes in running CGI. +I was hoping for some output. + +I am guessing that my rcs perl module stopped working on the upgrade. I didn't notice any release notes +on changes to revision control modules. Has something changed? I will also look. + +> No, the rcs interface has not needed to change in a long time. Also, +> nothing is done with the rcs for do=prefs. + +>> Thanks. I also checked differences between 1.40 Rcs plugins and didn't notice anything significant. + +--JeremyReed + +Another Followup: I created a new ikiwiki configuration and did the --setup to +create an entirely different website. I have same problem there. No prompt for password +and empty webpage when using the cgi. +I never upgraded any perl modules so maybe a new perl module is required but I don't see any errors so I don't know. + +The only errors I see when building and installing ikiwiki are: + + Can't exec "otl2html": No such file or directory at IkiWiki/Plugin/otl.pm line 66. + + gettext 0.14 too old, not updating the pot file + +I don't use GNU gettext on here. + +I may need to revert back to my old ikiwiki install which has been used to thousands of times (with around +1000 rcs commits via ikiwiki). + +--JeremyReed + +I downgraded to version 1.40 (that was what I had before I wrote wrong above). +Now ikiwiki is working for me again (but using 1.40). I shouldn't have tested on production system :) + +--JeremyReed + +I am back. On a different system, I installed ikiwiki 2.6.1. Same problem -- blank CGI webpage. + +So I manually ran with: + + REQUEST_METHOD=GET QUERY_STRING='do=create&page=jcr' kiwiki.cgi + +And clearly saw the error: + + [IkiWiki::main] Fatal: Bad template engine CGI::FormBuilder::Template::div: Can't locate CGI/FormBuilder/Template/div.pm + +So I found my version was too old and 3.05 is the first to provide "Div" support. I upgraded my p5-CGI-FormBuilder to 3.0501. +And ikiwiki CGI started working for me. + +The Ikiwiki docs about this requirement got removed in Revision 4367. There should be a page that lists the requirements. +(I guess I could have used the debian/control file.) + +> There is a page, [[install]] documents that 3.05 is needed. + +>> Sorry, I missed that. With hundreds of wikipages it is hard to read all of them. +>> I am updating the download page now to link to it. + +I am now using ikiwiki 2.6.1 on my testing system. + +--JeremyReed diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn index d52cb0a2d..749042910 100644 --- a/doc/index/discussion.mdwn +++ b/doc/index/discussion.mdwn @@ -1,464 +1 @@ -Seems like there should be a page for you to post your thoughts about -ikiwiki, both pro and con, anything that didn't work, ideas, or whatever. -Do so here.. - -Note that for more formal bug reports or todo items, you can also edit the -[[bugs]] and [[todo]] pages. - -[[!toc ]] - -# Installation/Setup questions - -Ikiwiki creates a .ikiwiki directory in my wikiwc working directory. Should I -"svn add .ikiwiki" or add it to svn:ignore? - -> `.ikiwiki` is used by ikiwiki to store internal state. You can add it to -> svn:ignore. --[[Joey]] -> > Thanks a lot. - -Is there an easy way to log via e-mail to some webmaster address, instead -of via syslog? - -> Not sure why you'd want to do that, but couldn't you use a tool like -> logwatch to mail selected lines from the syslog? --[[Joey]] - -> > The reason is that I'm not logged in on the web server regularly to -> > check the log files. I'll see whether I can install a logwatch instance. - -I'm trying to install from scratch on a CentOS 4.6 system. I installed perl 5.8.8 from source and then added all the required modules via CPAN. When I build ikiwiki from the tarball, I get this message: - - rendering todo/calendar_--_archive_browsing_via_a_calendar_frontend.mdwn - *** glibc detected *** double free or corruption (!prev): 0x0922e478 *** - make: *** [extra_build] Aborted - -I'm kind of at a loss how to track this down or work around it. Any suggestions? --Monty - -> All I can tell you is that it looks like a problem with your C library or -> perl. Little perl programs like ikiwiki should only be able to trigger -> such bugs, not contain them. :-) Sorry I can't be of more help. -> --[[Joey]] - -> I had a similar problem after upgrading to the latest version of -> Text::Markdown from CPAN. You might try either looking for a Markdown -> package for CentOS or using the latest version of John Gruber's -> Markdown.pl: -> <http://daringfireball.net/projects/downloads/Markdown_1.0.2b8.tbz> -> --[[JasonBlevins]], April 1, 2008 18:22 EDT - ->> Unfortunately I couldn't find a CentOS package for markdown, and I ->> couldn't quite figure out how to use John Gruber's version instead. ->> I tried copying it to site_perl, etc., but the build doesn't pick ->> it up. For now I can just play with it on my Ubuntu laptop for which ->> the debian package installed flawlessly. I'll probably wait for an ->> updated version of Markdown to see if this is fixed in the future. ->> --Monty - ->I suggest that you pull an older version of Text::Markdown from CPAN. I am using <http://backpan.perl.org/authors/id/B/BO/BOBTFISH/Text-Markdown-1.0.5.tar.gz> and that works just fine. ->There is a step change in version and size between this version (dated 11Jan2008) and the next version (1.0.12 dated 18Feb2008). I shall have a little look to see why, in due course. ->Ubuntu Hardy Heron has a debian package now, but that does not work either. -> --Dirk 22Apr2008 - -> This might be related to [Text::Markdown bug #37297](http://rt.cpan.org/Public/Bug/Display.html?id=37297).--ChapmanFlack 9Jul2008 - ----- - -# Installation of selected docs (html) - -The latest release has around 560 files (over 2MB) in html. - -Any suggestions or ideas on limiting what html is installed? - -For example, I don't see value in every ikiwiki install out there to also install personal "users" ikiwiki pages. - -For now I copy ikiwiki.setup. And then use pax with -L switch to copy the targets of the symlinks of the basewiki. - -I was thinking of making a list of desired documents from the html directory to install. - ---JeremyReed - -> You don't need any of them, unless you want to read ikiwiki's docs locally. -> -> I don't understand why you're installing the basewiki files manually; -> ikiwiki has a Makefile that will do this for you. --[[Joey]] - ->> The Makefile's install doesn't do what I want so I use different installer for it. ->> It assumes wrong location for man pages for me. (And it should consider using INSTALLVENDORMAN1DIR and ->> MAN1EXT but I don't know about section 8 since I don't know of perl value for that.) ->> I don't want w3m cgi installed; it is optional for my package. ->> I will just patch for that instead of using my own installer. ->> Note: I am working on the pkgsrc package build specification for this. This is for creating ->> packages for NetBSD, DragonFly and other systems that use pkgsrc package system. ->> --JeremyReed - -# Installation as non-root user - -I'd like to install ikiwiki as a non-root user. I can plow through getting all the -perl dependencies installed because that's well documented in the perl world, -but I don't know how to tell ikiwiki to install somewhere other than / --BrianWilson - -> Checkout the tips section for [[tips/DreamHost]]. It should do the trick. --MattReynolds - ----- - -# Upgrade steps - -I upgrades from 1.40 to 2.6.1. I ran "ikiwiki --setup" using my existing ikiwiki.setup configuration. -I had many errors like: - - /home/bsdwiki/www/wiki/wikilink/index.html independently created, not overwriting with version from wikilink - BEGIN failed--compilation aborted at (eval 5) line 129. - -and: - - failed renaming /home/bsdwiki/www/wiki/smileys.ikiwiki-new to /home/bsdwiki/www/wiki/smileys: Is a directory - BEGIN failed--compilation aborted at (eval 5) line 129. - -Probably about six errors like this. I worked around this by removing the files and directories it complained about. -Finally it finished. - -> As of version 2.0, ikiwiki enables usedirs by default. See -> [[tips/switching_to_usedirs]] for details. --[[Joey]] - ->> I read the config wrong. I was thinking that it showed the defaults even though commented out ->> (like ssh configs do). I fixed that part. --JeremyReed - -My next problem was that ikiwiki start letting me edit without any password authentication. It used to prompt -me for a password but now just goes right into the "editing" mode. -The release notes for 2.0 say password auth is still on by default. - -> It sounds like you have the anonok plugin enabled? - ->> Where is the default documented? My config doesn't have it uncommented. - -The third problem is that when editing my textbox is empty -- no content. - -This is using my custom rcs.pm which has been used thousands of times. - -> Have you rebuilt the cgi wrapper since you upgraded ikiwiki? AFAIK I -> fixed a bug that could result in the edit box always being empty back in -> version 2.3. The only other way it could happen is if ikiwiki does not -> have saved state about the page that it's editing (in .ikiwiki/index). - ->> Rebuilt it several times. Now that I think of it, I think my early problem of having ->> no content in the textbox was before I rebuilt the cgi. And after I rebuilt the whole webpage was empty. - -Now I regenerated my ikiwiki.cgi again (no change to my configuration, -and I just get an empty HTML page when attempting editing or "create". - -> If the page is completly empty then ikiwiki is crashing before it can -> output anything, though this seems unlikely. Check the webserver logs. - -Now I see it created directories for my data. I fixed that by setting -usedirs (I see that is in the release notes for 2.0) and rerunning ikiwiki --setup -but I still have empty pages for editing (no textbox no html at all). - -> Is IkiWiki crashing? If so, it would probably leave error text in the apache logs. --[[TaylorKillian]] - ->> Not using apache. Nothing useful in logs other thn the HTTP return codes are "0" and bytes is "-" ->> on the empty ikiwiki.cgi output (should say " 200 " followed by bytes). - ->>> You need to either figure out what your web server does with stderr ->>> from cgi programs, or run ikiwiki.cgi at the command line with an ->>> appropriate environment so it thinks it's being called from a web ->>> server, so you can see how it's failing. --[[Joey]] - -(I am posting this now, but will do some research and post some more.) - -Is there any webpage with upgrade steps? - -> Users are expected to read [[news]], which points out any incompatible -> changes or cases where manual action is needed. - ->> I read it but read the usedirs option wrong :(. ->> Also it appears to be missing the news from between 1.40 to 2.0 unless they dont' exist. ->> If they do exist maybe they have release notes I need? - ->>> All the old ones are in the NEWS file. --[[Joey]] - ---JeremyReed - -My followup: I used a new ikiwiki.setup based on the latest version. But no changes for me. - -Also I forgot to mention that do=recentchanges works good for me. It uses my -rcs_recentchanges in my rcs perl module. - -The do=prefs does nothing though -- just a blank webpage. - -> You need to figure out why ikiwiki is crashing. The webserver logs should -> tell you. - -I also set verbose => 1 and running ikiwiki --setup was verbose, but no changes in running CGI. -I was hoping for some output. - -I am guessing that my rcs perl module stopped working on the upgrade. I didn't notice any release notes -on changes to revision control modules. Has something changed? I will also look. - -> No, the rcs interface has not needed to change in a long time. Also, -> nothing is done with the rcs for do=prefs. - ->> Thanks. I also checked differences between 1.40 Rcs plugins and didn't notice anything significant. - ---JeremyReed - -Another Followup: I created a new ikiwiki configuration and did the --setup to -create an entirely different website. I have same problem there. No prompt for password -and empty webpage when using the cgi. -I never upgraded any perl modules so maybe a new perl module is required but I don't see any errors so I don't know. - -The only errors I see when building and installing ikiwiki are: - - Can't exec "otl2html": No such file or directory at IkiWiki/Plugin/otl.pm line 66. - - gettext 0.14 too old, not updating the pot file - -I don't use GNU gettext on here. - -I may need to revert back to my old ikiwiki install which has been used to thousands of times (with around -1000 rcs commits via ikiwiki). - ---JeremyReed - -I downgraded to version 1.40 (that was what I had before I wrote wrong above). -Now ikiwiki is working for me again (but using 1.40). I shouldn't have tested on production system :) - ---JeremyReed - -I am back. On a different system, I installed ikiwiki 2.6.1. Same problem -- blank CGI webpage. - -So I manually ran with: - - REQUEST_METHOD=GET QUERY_STRING='do=create&page=jcr' kiwiki.cgi - -And clearly saw the error: - - [IkiWiki::main] Fatal: Bad template engine CGI::FormBuilder::Template::div: Can't locate CGI/FormBuilder/Template/div.pm - -So I found my version was too old and 3.05 is the first to provide "Div" support. I upgraded my p5-CGI-FormBuilder to 3.0501. -And ikiwiki CGI started working for me. - -The Ikiwiki docs about this requirement got removed in Revision 4367. There should be a page that lists the requirements. -(I guess I could have used the debian/control file.) - -> There is a page, [[install]] documents that 3.05 is needed. - ->> Sorry, I missed that. With hundreds of wikipages it is hard to read all of them. ->> I am updating the download page now to link to it. - -I am now using ikiwiki 2.6.1 on my testing system. - ---JeremyReed - ----- -# Excellent - how do I translate a TWiki site? - -I just discovered ikiwiki quite by chance, I was looking for a console/terminal -menu system and found pdmenu. So pdmenu brought me to here and I've found ikiwiki! -It looks as if it's just what I've been wanting for a long time. I wanted something -to create mostly text web pages which, as far as possible, have source which is human -readable or at least in a standard format. ikiwiki does this twice over by using -markdown for the source and producing static HTML from it. - -I'm currently using TWiki and have a fair number of pages in that format, does -anyone have any bright ideas for translating? I can knock up awk scripts fairly -easily, perl is possible (but I'm not strong in perl). - -> Let us know if you come up with something to transition from the other -> format. Another option would be writing a ikiwiki plugin to support the -> TWiki format. --[[Joey]] - -> Jamey Sharp and I have a set of scripts in progress to convert other wikis to ikiwiki, including history, so that we can migrate a few of our wikis. We already have support for migrating MoinMoin wikis to ikiwiki, including conversion of the entire history to Git. We used this to convert the [XCB wiki](http://xcb.freedesktop.org/wiki/) to ikiwiki; until we finalize the conversion and put the new wiki in place of the old one, you can browse the converted result at <http://xcb.freedesktop.org/ikiwiki>. We already plan to add support for TWiki (including history, since you can just run parsecvs on the TWiki RCS files to get Git), so that we can convert the [Portland State Aerospace Society wiki](http://psas.pdx.edu) (currently in Moin, but with much of its history in TWiki, and with many of its pages still in TWiki format using Jamey's TWiki format for MoinMoin). -> -> Our scripts convert by way of HTML, using portions of the source wiki's code to render as HTML (with some additional code to do things like translate MoinMoin's `\[[TableOfContents]]` to ikiwiki's `\[[!toc ]]`), and then using a modified [[!cpan HTML::WikiConverter]] to turn this into markdown and ikiwiki. This produces quite satisfactory results, apart from things that don't have any markdown equivalent and thus remain HTML, such as tables and definition lists. Conversion of the history occurs by first using another script we wrote to translate MoinMoin history to Git, then using our git-map script to map a transformation over the Git history. -> -> We will post the scripts as soon as we have them complete enough to convert our wikis. -> -> -- [[JoshTriplett]] - ->> Thanks for an excellent Xmas present, I will appreciate the additional ->> users this will help switch to ikiwiki! --[[Joey]] - - ->> Sounds great indeed. Learning from [here](http://www.bddebian.com/~wiki/AboutTheTWikiToIkiwikiConversion/) that HTML::WikiConverter needed for your conversion was not up-to-date on Debian I have now done an unofficial package, including your proposed Markdown patches, apt-get'able at <pre>deb http://debian.jones.dk/ sid wikitools</pre> ->> -- [[JonasSmedegaard]] - - ->>I see the "We will post the scripts ...." was committed about a year ago. A current site search for "Moin" does not turn them up. Any chance of an appearance in the near (end of year) future? ->> ->> -- [[MichaelRasmussen]] - ->>> It appears the scripts were never posted? I recently imported my Mediawiki site into Iki. If it helps, my notes are here: <http://iki.u32.net/Mediawiki_Conversion> --[[sabr]] - ->>>>> The scripts have been posted now, see [[joshtriplett]]'s user page, ->>>>> and I've pulled together all ways I can find to [[convert]] other ->>>>> systems into ikiwiki. --[[Joey]] - ----- - -# LaTeX support? - -Moved to [[todo/latex]] --[[Joey]] - ----- - -# Using with CVS? - -Moved to a [[todo_item|todo/CVS_backend]]. --[[JoshTriplett]] - ----- - -# Show differences before saving page? - -Moved to the existing [[todo_item|todo/preview_changes]]. --[[JoshTriplett]] - ----- - -# Max submit size? - -Any setting for limiting how many kilobytes can be submitted via the "edit" form? --- [[JeremyReed]] - ->>> See [[todo/fileupload]] for an idea on limiting page size. --[[Joey]] - ----- - -# Editing the style sheet. - -It would be nice to be able to edit the stylesheet by means of the cgi. Or is this possible? I wasn't able to achieve it. -Ok, that's my last 2 cents for a while. --[Mazirian](http://mazirian.com) - -> I don't support editing it, but if/when ikiwiki gets [[todo/fileupload]] support, -> it'll be possible to upload a style sheet. (If .css is in the allowed -> extensions list.. no idea how safe that would be, a style sheet is -> probably a great place to put XSS attacks and evil javascript that would -> be filtered out of any regular page in ikiwiki). --[[Joey]] - ->> I hadn't thought of that at all. It's a common feature and one I've ->> relied on safely, because the wikis I am maintaining at the moment ->> are all private and restricted to trusted users. Given that the whole ->> point of ikiwiki is to be able to access and edit via the shell as ->> well as the web, I suppose the features doesn't add a lot. By the ->> way, the w3m mode is brilliant. I haven't tried it yet, but the idea ->> is great. - ----- - -# Should not create an existing page - -This might be a bug, but will discuss it here first. -Clicking on an old "?" or going to a create link but new Markdown content exists, should not go into "create" mode, but should do a regular "edit". - -> I belive that currently it does a redirect to the new static web page. -> At least that's the intent of the code. --[[Joey]] - ->> Try at your site: `?page=discussion&from=index&do=create` ->> It brings up an empty textarea to start a new webpage -- even though it already exists here. --reed - ->>> Ah, right. Notice that the resulting form allows saving the page as ->>> discussion, or users/discussion, but not index/discussion, since this ->>> page already exists. If all the pages existed, it would do the redirect ->>> thing. --[[Joey]] - ----- - -# Spaces in WikiLinks? - -Hello Joey, - -I've just switched from ikiwiki 2.0 to ikiwiki 2.2 and I'm really surprised -that I can't use the spaces in WikiLinks. Could you please tell me why the spaces -aren't allowed in WikiLinks now? - -My best regards, - ---[[PaweB|ptecza]] - -> See [[bugs/Spaces_in_link_text_for_ikiwiki_links]] - ----- - -# Build in OpenSolaris? - -Moved to [[bugs/build_in_opensolaris]] --[[Joey]] - ----- - -# Various ways to use Subversion with ikiwiki - -I'm playing around with various ways that I can use subversion with ikiwiki. - -* Is it possible to have ikiwiki point to a subversion repository which is on a different server? The basic checkin/checkout functionality seems to work but there doesn't seem to be any way to make the post-commit hook work for a non-local server? - -> This is difficult to do since ikiwiki's post-commit wrapper expects to -> run on a machine that contains both the svn repository and the .ikiwiki -> state directory. However, with recent versions of ikiwiki, you can get -> away without running the post-commit wrapper on commit, and all you lose -> is the ability to send commit notification emails. - -> (And now that [[recentchanges]] includes rss, you can just subscribe to -> that, no need to worry about commit notification emails anymore.) - -* Is it possible / sensible to have ikiwiki share a subversion repository with other data (either completely unrelated files or another ikiwiki instance)? This works in part but again the post-commit hook seems problematic. - ---[[AdamShand]] - -> Sure, see ikiwiki's subversion repository for example of non-wiki files -> in the same repo. If you have two wikis in one repository, you will need -> to write a post-commit script that calls the post-commit wrappers for each -> wiki. - ----- - -# Regex for Valid Characters in Filenames - -I'm sure that this is documented somewhere but I've ransacked the wiki and I can't find it. :-( What are the allowed characters in an ikiwiki page name? I'm writing a simple script to make updating my blog easier and need to filter invalid characters (so far I've found that # and , aren't allowed ;-)). Thanks for any pointers. -- [[AdamShand]] - -> The default `wiki_file_regexp` matches filenames containing only -> `[-[:alnum:]_.:/+]` -> -> The titlepage() function will convert freeform text to a valid -> page name. See [[todo/should_use_a_standard_encoding_for_utf_chars_in_filenames]] -> for an example. --[[Joey]] - ->> Perfect, thanks! ->> ->> In the end I decided that I didn't need any special characters in filenames and replaced everything but alphanumeric characters with underscores. In addition to replacing bad characters I also collapse multiple underscores into a single one, and strip off trailing and leading underscores to make tidy filenames. If it's useful to anybody else here's a sed example: ->> ->> # echo "++ Bad: ~@#$%^&*()_=}{[];,? Iki: +_-:./ Num: 65.5 ++" | sed -e 's/[^A-Za-z0-9_]/_/g' -e 's/__*/_/g' -e 's/^_//g' -e 's/_$//g' ->> Bad_Iki_Num_65_5 ->> ->>--[[AdamShand]] - -# Upgrade steps from RecentChanges CGI to static page? - -Where are the upgrade steps for RecentChanges change from CGI to static feed? -I run multiple ikiwiki-powered sites on multiple servers, but today I just upgraded one to 2.32.3. -Please have a look at -<http://bsdwiki.reedmedia.net/wiki/recentchanges.html> -Any suggestions? - -> There are no upgrade steps required. It does look like you need to enable -> the meta plugin to get a good recentchanges page though.. --[[Joey]] - -# News site where articles are submitted and then reviewed before posting? - -I am considering moving a news site to Ikiwiki. I am hoping that Ikiwiki has a feature where anonymous posters can submit a form that moderators can review and then accept for it to be posted on a news webpage (like front page of the website). - -> Well, you can have one blog that contains unreviewed articles, and -> moderators can then add a tag that makes the article show up in the main -> news feed. There's nothing stopping someone submitting an article -> pre-tagged though. If you absolutely need to lock that down, you could -> have one blog with unreviewed articles in one subdirectory, and reviewers -> then move the file over to another subdirectory when they're ready to -> publish it. (This second subdirectory would be locked to prevent others -> from writing to it.) --[[Joey]] - -Also it would be good if the news page would keep maybe just the latest 10 entries with links to an archive that make it easy to browse to old entries by date. (Could have over a thousand news articles.) - -> The inline plugin allows setting up things like this. - -Plus users be able to post feedback to news items. If anonymous, they must be approved first. I'd prefer to not use normal "wiki" editor for feedback. - -Any thoughts or examples on this? Any links to examples of news sites or blogs with outside feedback using ikiwiki? - -Thanks --[[JeremyReed]] - +All discussion that used to be here has moved to the [[forum]]. -- cgit v1.2.3 From ed7871f65af84692b56f899cbd2655181efc4007 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 10 Dec 2009 22:26:00 -0500 Subject: typo --- ...e_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn b/doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn index 3879c594a..8dd755274 100644 --- a/doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn +++ b/doc/forum/News_site_where_articles_are_submitted_and_then_reviewed_before_posting.mdwn @@ -1,4 +1,4 @@ -[[meta date="2008-04-28 14:57:25 -0400"]] +[[!meta date="2008-04-28 14:57:25 -0400"]] I am considering moving a news site to Ikiwiki. I am hoping that Ikiwiki has a feature where anonymous posters can submit a form that moderators can review and then accept for it to be posted on a news webpage (like front page of the website). -- cgit v1.2.3 From 10785902d42551a7833006a66a157b666f5ce4e2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 10 Dec 2009 22:26:30 -0500 Subject: fix date to not be 80 years ago --- doc/forum/editing_the_style_sheet.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/editing_the_style_sheet.mdwn b/doc/forum/editing_the_style_sheet.mdwn index c1e1ef815..b4aa8c89b 100644 --- a/doc/forum/editing_the_style_sheet.mdwn +++ b/doc/forum/editing_the_style_sheet.mdwn @@ -1,4 +1,4 @@ -[[!meta date="006-12-29 04:19:51 +0000"]] +[[!meta date="2006-12-29 04:19:51 +0000"]] It would be nice to be able to edit the stylesheet by means of the cgi. Or is this possible? I wasn't able to achieve it. Ok, that's my last 2 cents for a while. --[Mazirian](http://mazirian.com) -- cgit v1.2.3 From a3803f3cd82af36b77a8ee718f9057515adf05ea Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Fri, 11 Dec 2009 21:59:08 -0500 Subject: on my unixauth branch now --- doc/plugins/contrib/unixauth.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/unixauth.mdwn b/doc/plugins/contrib/unixauth.mdwn index 137195139..c97312b59 100644 --- a/doc/plugins/contrib/unixauth.mdwn +++ b/doc/plugins/contrib/unixauth.mdwn @@ -1,7 +1,7 @@ [[!template id=plugin name=unixauth core=0 author="[[schmonz]]"]] [[!tag type/auth]] -[[!template id=gitbranch branch=schmonz author="[[schmonz]]"]] +[[!template id=gitbranch branch=unixauth author="[[schmonz]]"]] This plugin authenticates users against the Unix user database. It presents a similar UI to [[plugins/passwordauth]], but simpler, as there's no need to be able to register or change one's password. -- cgit v1.2.3 From 2b5dba4c49fce88d5783f6ccc41359e76b60c282 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sat, 12 Dec 2009 00:38:04 -0500 Subject: map for plugins I've written --- doc/users/KathrynAndersen.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/users/KathrynAndersen.mdwn b/doc/users/KathrynAndersen.mdwn index 2f2838367..14fabbb01 100644 --- a/doc/users/KathrynAndersen.mdwn +++ b/doc/users/KathrynAndersen.mdwn @@ -2,3 +2,6 @@ * Currently an active [PmWiki](http://www.pmwiki.org) user, but investigating changing over to ikiwiki (if I can write the plugins I need). * <http://kerravonsen.dreamwidth.org> * <http://github.com/rubykat> + +Has written the following plugins: +[[!map pages="!*/Discussion and ((link(users/KathrynAndersen) or link(users/rubykat)) and plugins/*) "]] -- cgit v1.2.3 From 5b48f1412e8117372af081c513b8c8a41176d4e7 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/kari.pahula" <http://www.google.com/profiles/kari.pahula@web> Date: Sat, 12 Dec 2009 06:33:21 -0500 Subject: Getting OpenID verified identity externally --- doc/plugins/openid/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/plugins/openid/discussion.mdwn b/doc/plugins/openid/discussion.mdwn index 39e947b82..a88da8b9d 100644 --- a/doc/plugins/openid/discussion.mdwn +++ b/doc/plugins/openid/discussion.mdwn @@ -19,3 +19,8 @@ It looks like OpenID 2.0 (the only supported by Yahoo) is not supported in ikiwi -- Ivan Z. They have more on OpenID 2.0 in [their FAQ](http://developer.yahoo.com/openid/faq.html). --Ivan Z. + +---- +I'm trying to add a way to query the data saved by the OpenID plugin from outside of ikiwiki, to see what identity the user has been authenticated as, if any. I'm thinking of designating some directories as internal pages and check the identity against a list in a mod_perl access hook. I would also write a CGI script that would return a JSON formatted reply to tell if the user is authenticated for those pages and query it with AJAX and only render links to the internal pages if the user would have access to them. That's just a couple of ideas I'm working on first, but I can imagine that there's any number of other tricks that people could implement with that sort of a thing. + +Also, this isn't really specific to OpenID but to all auth plugins, but I'm going to use only OpenID for authentication so that's what I'm targeting right now. I suppose that would be worth its own TODO item. --[[kaol]] -- cgit v1.2.3 From c1ec0037ebf5dfc62bd1d132201c608f3875253d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@finch.kitenet.net> Date: Sat, 12 Dec 2009 15:19:42 -0500 Subject: add news page for in progress server move (new server version) --- doc/news/server_move_2009.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/news/server_move_2009.mdwn (limited to 'doc') diff --git a/doc/news/server_move_2009.mdwn b/doc/news/server_move_2009.mdwn new file mode 100644 index 000000000..8be5debe1 --- /dev/null +++ b/doc/news/server_move_2009.mdwn @@ -0,0 +1,6 @@ +[[!meta title="server move"]] + +The ikiwiki.info domain has been moved to a new server. If you can see +this, your DNS has already caught up and you are using the new server. +By the way, the new server should be somewhat faster. +--[[Joey]] -- cgit v1.2.3 From 3f90eba5a1a5df95f2c9f7fc2d78a382731f2d10 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" <http://lj.rossia.org/users/imz/@web> Date: Mon, 14 Dec 2009 19:35:42 +0000 Subject: minor: Added an external link to the used tool. --- doc/w3mmode.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/w3mmode.mdwn b/doc/w3mmode.mdwn index 3afee5c9b..04e37ba04 100644 --- a/doc/w3mmode.mdwn +++ b/doc/w3mmode.mdwn @@ -1,5 +1,5 @@ It's possible to use all of ikiwiki's web features (page editing, etc) in -the `w3m` web browser without using a web server. `w3m` supports local CGI +the [`w3m`](http://w3m.sourceforge.net/) web browser without using a web server. `w3m` supports local CGI scripts, and ikiwiki can be set up to run that way. This requires some special configuration: -- cgit v1.2.3 From 18320696aefad04ce1d2576219a83347516a5772 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 15 Dec 2009 15:05:21 -0500 Subject: declutter --- doc/examples/softwaresite/bugs/New_bug.mdwn | 1 - doc/examples/softwaresite/bugs/needs_more_bugs.mdwn | 1 - 2 files changed, 2 deletions(-) delete mode 100644 doc/examples/softwaresite/bugs/New_bug.mdwn (limited to 'doc') diff --git a/doc/examples/softwaresite/bugs/New_bug.mdwn b/doc/examples/softwaresite/bugs/New_bug.mdwn deleted file mode 100644 index 85f68d2b6..000000000 --- a/doc/examples/softwaresite/bugs/New_bug.mdwn +++ /dev/null @@ -1 +0,0 @@ -This is a new bug report! diff --git a/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn b/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn index 6627ac0b9..a150570a4 100644 --- a/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn +++ b/doc/examples/softwaresite/bugs/needs_more_bugs.mdwn @@ -1,4 +1,3 @@ FooBar does not have enough bugs, which suggests that it's not a real Free Software project. Please help create more bugs by adding code to FooBar! :-) -And what now? -- cgit v1.2.3 From 351b37823f803f6dcbe1e6f3ce1c3f7e48dc5951 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 18 Dec 2009 21:02:49 -0500 Subject: add news item for ikiwiki 3.20091218 --- doc/news/version_3.20091022.mdwn | 10 ---------- doc/news/version_3.20091218.mdwn | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 doc/news/version_3.20091022.mdwn create mode 100644 doc/news/version_3.20091218.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091022.mdwn b/doc/news/version_3.20091022.mdwn deleted file mode 100644 index 6fc9713c0..000000000 --- a/doc/news/version_3.20091022.mdwn +++ /dev/null @@ -1,10 +0,0 @@ -ikiwiki 3.20091022 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * edittemplate: Allow template page name to be specified using anything - legal for a wikilink (including eg, leading slashes). - * edittemplate: Work around bug #551499 in CGI::FormBuilder. - * Fix a bug introduced in the last version that caused ikiwiki - to skip all files if a sourcedir of "./" was specified. - * Support CFLAGS when building wrapper. - * meta: Gather permalink info on scan pass so it is available - to inline when using a template that does not include page content."""]] \ No newline at end of file diff --git a/doc/news/version_3.20091218.mdwn b/doc/news/version_3.20091218.mdwn new file mode 100644 index 000000000..224e81c4e --- /dev/null +++ b/doc/news/version_3.20091218.mdwn @@ -0,0 +1,11 @@ +ikiwiki 3.20091218 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Add complete Spanish basewiki translation done by Fernando Gonzalez de + Requena. + * Improve javascript onload handling. + * monotone: Deal with format change in version 0.45. + (Thanks, Richard Levitte) + * cvs: Add missing bit to Automator. + * attachment: Fix reversion in attachment sorting by age. + * Fix utf-8 problems in rename, remove, attachment, 404, sourcepage, and + goto."""]] \ No newline at end of file -- cgit v1.2.3 From c46f673d9a70aedff636574db42168c3f579e84c Mon Sep 17 00:00:00 2001 From: "http://www.tychoish.com/" <http://www.tychoish.com/@web> Date: Sat, 19 Dec 2009 20:06:47 +0000 Subject: adding a new css sheet. --- doc/css_market.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index fe58e77f1..733b20676 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -49,6 +49,12 @@ gnomes will convert them to css files..) the action list (Edit, RecentChanges, etc.) as tabs. [[!meta stylesheet="actiontabs"]] +* tychoish's **[wiki.css](http://cyborginstitute.net/includes/wiki.css)** by [[tychoish]]. + I typically throw this in as `local.css` in new wikis as a slightly more clear and readable + layout for wikis that need to be functional and elegant, but not necessarily uniquely designed. + Currently in use by the [the outeralliance wiki](http://oa.criticalfutures.com/). + + If your web browser allows selecting between multiple stylesheets, this page can be viewed using many of the stylesheets above. For example, if using Epiphany with the Select Stylesheet extension enabled, use View -> -- cgit v1.2.3 From cfbd068fa731234782c3fd571f22a1b7a79c9383 Mon Sep 17 00:00:00 2001 From: "http://www.tychoish.com/" <http://www.tychoish.com/@web> Date: Sat, 19 Dec 2009 20:07:39 +0000 Subject: edit my entry to be less dweeby --- doc/css_market.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index 733b20676..a0943547c 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -49,7 +49,7 @@ gnomes will convert them to css files..) the action list (Edit, RecentChanges, etc.) as tabs. [[!meta stylesheet="actiontabs"]] -* tychoish's **[wiki.css](http://cyborginstitute.net/includes/wiki.css)** by [[tychoish]]. +* **[wiki.css](http://cyborginstitute.net/includes/wiki.css)** by [[tychoish]]. I typically throw this in as `local.css` in new wikis as a slightly more clear and readable layout for wikis that need to be functional and elegant, but not necessarily uniquely designed. Currently in use by the [the outeralliance wiki](http://oa.criticalfutures.com/). -- cgit v1.2.3 From eec0c6c3282625586952c0f1d74ce5a1a026ca8a Mon Sep 17 00:00:00 2001 From: kierun <kierun@web> Date: Mon, 21 Dec 2009 16:29:59 +0000 Subject: --- doc/todo/ACL.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/ACL.mdwn b/doc/todo/ACL.mdwn index e9fb2717f..4c3062427 100644 --- a/doc/todo/ACL.mdwn +++ b/doc/todo/ACL.mdwn @@ -69,3 +69,5 @@ Here is how I see it: <pre> \[[!acl user=* page=/subsite/* acl=/subsite/acl.mdwn]] </pre> + +Any idea when this is going to be finished? If you want, I am happy to beta test. -- cgit v1.2.3 From 407a94c6a6d5ea125f5c31787799c864e2c1b7f0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 23 Dec 2009 15:07:11 +0000 Subject: added tag --- doc/plugins/contrib/pod.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/pod.mdwn b/doc/plugins/contrib/pod.mdwn index dafffa844..d6fdf4b63 100644 --- a/doc/plugins/contrib/pod.mdwn +++ b/doc/plugins/contrib/pod.mdwn @@ -34,3 +34,6 @@ The following options can be set in the ikiwiki setup file. * browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/pod.pm> * git repo at git://github.com/rubykat/ikiplugins.git + +---- +[[!taglink format]] -- cgit v1.2.3 From 85eab3e9ff30ba42307a53bf22ef72ce87e18616 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 23 Dec 2009 15:08:14 +0000 Subject: try again with tag --- doc/plugins/contrib/pod.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/pod.mdwn b/doc/plugins/contrib/pod.mdwn index d6fdf4b63..19b0111df 100644 --- a/doc/plugins/contrib/pod.mdwn +++ b/doc/plugins/contrib/pod.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=pod author="[[rubykat]]"]] +[[!tag format]] ## NAME IkiWiki::Plugin::pod - process pages written in POD format. @@ -35,5 +36,3 @@ The following options can be set in the ikiwiki setup file. * browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/pod.pm> * git repo at git://github.com/rubykat/ikiplugins.git ----- -[[!taglink format]] -- cgit v1.2.3 From 01e744af0f099fcf28d9cf0bc0f090262c092bdf Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 23 Dec 2009 15:09:59 +0000 Subject: third time lucky? --- doc/plugins/contrib/pod.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/pod.mdwn b/doc/plugins/contrib/pod.mdwn index 19b0111df..97a9c648a 100644 --- a/doc/plugins/contrib/pod.mdwn +++ b/doc/plugins/contrib/pod.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=pod author="[[rubykat]]"]] -[[!tag format]] +[[!tag type/format]] ## NAME IkiWiki::Plugin::pod - process pages written in POD format. -- cgit v1.2.3 From c7e822a4962c36a3f26e1f0413734b2e67e2e607 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 23 Dec 2009 15:13:04 +0000 Subject: added tag --- doc/plugins/contrib/field.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/plugins/contrib/field.mdwn b/doc/plugins/contrib/field.mdwn index 745a36bcd..a43bf24b2 100644 --- a/doc/plugins/contrib/field.mdwn +++ b/doc/plugins/contrib/field.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=field author="[[rubykat]]"]] +[[!tag type/meta]] [[!toc]] ## NAME -- cgit v1.2.3 From c4a2d93115b6a7826b21f13b9d29bd947551c6c6 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 23 Dec 2009 15:14:57 +0000 Subject: added tag --- doc/plugins/contrib/xslt.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/plugins/contrib/xslt.mdwn b/doc/plugins/contrib/xslt.mdwn index c30e618ea..80c956c58 100644 --- a/doc/plugins/contrib/xslt.mdwn +++ b/doc/plugins/contrib/xslt.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=xslt author="[[rubykat]]"]] +[[!tag type/chrome]] ## NAME IkiWiki::Plugin::xslt - ikiwiki directive to process an XML file with XSLT -- cgit v1.2.3 From 98c00730f6455cce03c2dc7486cdc75c150baa69 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" <http://weakish.pigro.net/@web> Date: Thu, 24 Dec 2009 07:46:42 +0000 Subject: use `SomePage <>` for wikilink? --- .../Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index ca7b282fa..6219f1d14 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -322,3 +322,12 @@ The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to genera >> However, I think that if the cache does not work for a big load, it should >> not work at all; small loads are small so they don't matter. --ulrik +----- + +Another possiblity is use empty url for wiki pages (gitit uses this approach), for example: + + `SomePage <>`_ + +Since it uses *empty* url, I would like to call it *proposal 0* :-) --[weakish] + +[weakish]: http://weakish.pigro.net -- cgit v1.2.3 From 7e0d5aa1fd912cc933c613eab9d3d58d7d71f6d3 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" <http://weakish.pigro.net/@web> Date: Thu, 24 Dec 2009 07:47:50 +0000 Subject: typo --- doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn index 6219f1d14..6e0f32fd5 100644 --- a/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn +++ b/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn @@ -324,7 +324,7 @@ The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to genera ----- -Another possiblity is use empty url for wiki pages (gitit uses this approach), for example: +Another possiblity is using empty url for wikilinks (gitit uses this approach), for example: `SomePage <>`_ -- cgit v1.2.3 From cf26aa6bc76ada153b265ef7851eacb1c6f2417e Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" <http://weakish.pigro.net/@web> Date: Thu, 24 Dec 2009 08:46:40 +0000 Subject: question: "still domain specific or not?" --- doc/plugins/google/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/plugins/google/discussion.mdwn b/doc/plugins/google/discussion.mdwn index 94fc36a35..32a0a41b9 100644 --- a/doc/plugins/google/discussion.mdwn +++ b/doc/plugins/google/discussion.mdwn @@ -11,3 +11,12 @@ domain, and appears to be legal. I've got a wiki that'd benefit tweaked to do this? --[[schmonz]] > Done. --[[Joey]] + +The main page said: + +> Also, if the same domain has other content, outside the wiki's +> content, it will be searched as well. + +Is it still true now? (Or this statement is out of date?) --[weakish] + +[weakish]: http://weakish.pigro.net -- cgit v1.2.3 From db4a98973016e2c3c282d6de7c27848ff76ef729 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" <http://weakish.pigro.net/@web> Date: Thu, 24 Dec 2009 08:54:25 +0000 Subject: add netbsd wiki --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 418768a2c..d2fff2ba9 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -2,6 +2,7 @@ Projects & Organizations ======================== * [This wiki](http://ikiwiki.info) (of course!) +* [NetBSD wiki](http://wiki.netbsd.org) * The [GNU Hurd](http://www.gnu.org/software/hurd/) * [DragonFly BSD](http://www.dragonflybsd.org/) * [Monotone](http://monotone.ca/wiki/FrontPage/) -- cgit v1.2.3 From dbf0f25346a7eb0b63581639df3ac0c73753a0f0 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Thu, 24 Dec 2009 13:50:12 +0000 Subject: not yet, please --- doc/ikiwikiusers.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index d2fff2ba9..aa4b4b4e6 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -2,7 +2,7 @@ Projects & Organizations ======================== * [This wiki](http://ikiwiki.info) (of course!) -* [NetBSD wiki](http://wiki.netbsd.org) +<!-- * [NetBSD wiki](http://wiki.netbsd.org) --> * The [GNU Hurd](http://www.gnu.org/software/hurd/) * [DragonFly BSD](http://www.dragonflybsd.org/) * [Monotone](http://monotone.ca/wiki/FrontPage/) -- cgit v1.2.3 From 3a1c8c2b463b8a4f6b3b2c866c5e1b1500f95193 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 25 Dec 2009 14:31:51 -0500 Subject: pagestats: Add show parameter. Closes: #562129 --- IkiWiki/Plugin/pagestats.pm | 10 ++++++++++ debian/changelog | 6 ++++++ doc/ikiwiki/directive/pagestats.mdwn | 6 ++++++ 3 files changed, 22 insertions(+) (limited to 'doc') diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 47638210a..4313aa271 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -63,6 +63,16 @@ sub preprocess (@) { $max = $counts{$page} if $counts{$page} > $max; } + if (exists $params{show}) { + my $i=0; + my %show; + foreach my $key (sort { $counts{$b} <=> $counts{$a} } keys %counts) { + last if ++$i > $params{show}; + $show{$key}=$counts{$key}; + } + %counts=%show; + } + if ($style eq 'table') { return "<table class='pageStats'>\n". join("\n", map { diff --git a/debian/changelog b/debian/changelog index 0e76bd727..e01037171 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ikiwiki (3.20091219) UNRELEASED; urgency=low + + * pagestats: Add show parameter. Closes: #562129 + + -- Joey Hess <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500 + ikiwiki (3.20091218) unstable; urgency=low * Add complete Spanish basewiki translation done by Fernando Gonzalez de diff --git a/doc/ikiwiki/directive/pagestats.mdwn b/doc/ikiwiki/directive/pagestats.mdwn index f14c80b07..68f4d2734 100644 --- a/doc/ikiwiki/directive/pagestats.mdwn +++ b/doc/ikiwiki/directive/pagestats.mdwn @@ -22,4 +22,10 @@ Or to display a cloud of tags related to Linux, you could use: \[[!pagestats pages="tags/* and not tags/linux" among="tagged(linux)"]] +The optional `show` parameter limits display to the specified number of +pages. For instance, to show a table of the top ten pages with the most +links: + + \[[!pagestats style="table" show="10"]] + [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From 6e632de82550e5d028391e74beb302b80bd9f7a6 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 25 Dec 2009 19:40:59 +0000 Subject: patch in diff -u format --- ...iling___40__opposite_of_levels__61____41__.mdwn | 47 +++++++++++++++------- 1 file changed, 33 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn index ce51d90a3..53cb0dd7c 100644 --- a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn +++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn @@ -10,19 +10,38 @@ Currently, the levels=X parameter lets you tweak how deep it will go for small h > > projects prefer to receive changes as unified diffs (or as > > branches in their chosen VCS, which is [[git]] here). --[[smcv]] - 56,57c56,57 - < my $curlevel; - < my $startlevel=0; - --- - > my $startlevel=($params{startlevel} ? $params{startlevel} : 0); - > my $curlevel=$startlevel-1; - 69a70 - > # unless we're given startlevel as a parameter - 73a75,79 - > elsif (defined $params{startlevel} - > and $level < $params{startlevel}) - > { - > return; - > } +> > > Done. -- [[KathrynAndersen]] + + + --- /files/git/other/ikiwiki/IkiWiki/Plugin/toc.pm 2009-11-16 12:44:00.352050178 +1100 + +++ toc.pm 2009-12-26 06:36:06.686512552 +1100 + @@ -53,8 +53,8 @@ + my $page=""; + my $index=""; + my %anchors; + - my $curlevel; + - my $startlevel=0; + + my $startlevel=($params{startlevel} ? $params{startlevel} : 0); + + my $curlevel=$startlevel-1; + my $liststarted=0; + my $indent=sub { "\t" x $curlevel }; + $p->handler(start => sub { + @@ -67,10 +67,16 @@ + + # Take the first header level seen as the topmost level, + # even if there are higher levels seen later on. + + # unless we're given startlevel as a parameter + if (! $startlevel) { + $startlevel=$level; + $curlevel=$startlevel-1; + } + + elsif (defined $params{startlevel} + + and $level < $params{startlevel}) + + { + + return; + + } + elsif ($level < $startlevel) { + $level=$startlevel; + } [[!tag patch]] -- cgit v1.2.3 From 51bb7d38482cdb109f163594181e8209369b658c Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 25 Dec 2009 19:53:30 +0000 Subject: --- doc/ikiwiki/directive/pagestats/discussion.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/pagestats/discussion.mdwn b/doc/ikiwiki/directive/pagestats/discussion.mdwn index 3c9dc7104..001217cf1 100644 --- a/doc/ikiwiki/directive/pagestats/discussion.mdwn +++ b/doc/ikiwiki/directive/pagestats/discussion.mdwn @@ -7,4 +7,10 @@ I would rather not find and create a page for every tag I have created or will c Thanks ----- +> Hello unknown person. + +> I think it would require a different approach to what "tags" are, and/or what "pagestats" are. The pagestats plugin gives statistical information about *pages*, so it requires the pages in question to exist before it can get information about them. The tags plugin creates links to tag *pages*, with the expectation that a human being will create said pages and put whatever content they want on them (such as describing what the tag is about, and a map linking back to the tagged pages). + +> The approach that [PmWiki](http://www.pmwiki.org) takes is that it enables the optional auto-creation of (empty) pages which match a particular "group" (set of sub-pages); thus one could set all the "tags/*" pages to be auto-created, creating a new tags/foo page the first time the \[[!tag foo]] directive is used. I'm not sure how this could be done in ikiwiki. + +> -- [[KathrynAndersen]] -- cgit v1.2.3 From cc63cee0d491c92b9a518b33d4fd7edcaef0bfc4 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 25 Dec 2009 19:56:19 +0000 Subject: and someone already thought of tag-page auto-creation --- doc/ikiwiki/directive/pagestats/discussion.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/pagestats/discussion.mdwn b/doc/ikiwiki/directive/pagestats/discussion.mdwn index 001217cf1..d72b4058d 100644 --- a/doc/ikiwiki/directive/pagestats/discussion.mdwn +++ b/doc/ikiwiki/directive/pagestats/discussion.mdwn @@ -11,6 +11,5 @@ Thanks > I think it would require a different approach to what "tags" are, and/or what "pagestats" are. The pagestats plugin gives statistical information about *pages*, so it requires the pages in question to exist before it can get information about them. The tags plugin creates links to tag *pages*, with the expectation that a human being will create said pages and put whatever content they want on them (such as describing what the tag is about, and a map linking back to the tagged pages). -> The approach that [PmWiki](http://www.pmwiki.org) takes is that it enables the optional auto-creation of (empty) pages which match a particular "group" (set of sub-pages); thus one could set all the "tags/*" pages to be auto-created, creating a new tags/foo page the first time the \[[!tag foo]] directive is used. I'm not sure how this could be done in ikiwiki. - +> The approach that [PmWiki](http://www.pmwiki.org) takes is that it enables the optional auto-creation of (empty) pages which match a particular "group" (set of sub-pages); thus one could set all the "tags/*" pages to be auto-created, creating a new tags/foo page the first time the \[[!tag foo]] directive is used. See [[todo/auto-create_tag_pages_according_to_a_template]] for more discussion on this idea. > -- [[KathrynAndersen]] -- cgit v1.2.3 From d35bf0be6765d692d97769cd2d81ed143c8e9036 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 25 Dec 2009 15:08:22 -0500 Subject: correction --- doc/plugins/google.mdwn | 3 +-- doc/plugins/google/discussion.mdwn | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/google.mdwn b/doc/plugins/google.mdwn index 7c61e637b..349c278ee 100644 --- a/doc/plugins/google.mdwn +++ b/doc/plugins/google.mdwn @@ -5,8 +5,7 @@ This plugin adds a search form to the wiki, using google's site search. Google is asked to search for pages in the domain specified in the wiki's `url` configuration parameter. Results will depend on whether google has -indexed the site, and how recently. Also, if the same domain has other -content, outside the wiki's content, it will be searched as well. +indexed the site, and how recently. The [[search]] plugin offers full text search of only the wiki, but requires that a search engine be installed on your site. diff --git a/doc/plugins/google/discussion.mdwn b/doc/plugins/google/discussion.mdwn index 32a0a41b9..e664f5723 100644 --- a/doc/plugins/google/discussion.mdwn +++ b/doc/plugins/google/discussion.mdwn @@ -20,3 +20,6 @@ The main page said: Is it still true now? (Or this statement is out of date?) --[weakish] [weakish]: http://weakish.pigro.net + +> I checked, and it's never been true; google is given the url to the top +> of the wiki and only searches things in there. --[[Joey]] -- cgit v1.2.3 From 8e0f45ae670985a0ffde8180776dd8ce5821c7d8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 25 Dec 2009 15:12:05 -0500 Subject: add example --- doc/todo/ACL.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/ACL.mdwn b/doc/todo/ACL.mdwn index 4c3062427..d40701d60 100644 --- a/doc/todo/ACL.mdwn +++ b/doc/todo/ACL.mdwn @@ -70,4 +70,9 @@ Here is how I see it: \[[!acl user=* page=/subsite/* acl=/subsite/acl.mdwn]] </pre> -Any idea when this is going to be finished? If you want, I am happy to beta test. +Any idea when this is going to be finished? If you want, I am happy to beta test. + +> It's already done, though that is sorta hidden in the above. :-) +> Example of use to only allow two users to edit the tipjar page: +> locked_pages => 'tipjar and !(user(joey) or user(bob))', +> --[[Joey]] -- cgit v1.2.3 From ffc9f25e734a8ca5397f2dfd09c1e31725624ee0 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 25 Dec 2009 15:28:18 -0500 Subject: toc: Add startlevel parameter. (kerravonsen) --- IkiWiki/Plugin/toc.pm | 11 ++++++++--- debian/changelog | 1 + doc/ikiwiki/directive/toc.mdwn | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/toc.pm b/IkiWiki/Plugin/toc.pm index a585564e7..b8537d3eb 100644 --- a/IkiWiki/Plugin/toc.pm +++ b/IkiWiki/Plugin/toc.pm @@ -53,8 +53,8 @@ sub format (@) { my $page=""; my $index=""; my %anchors; - my $curlevel; - my $startlevel=0; + my $startlevel=($params{startlevel} ? $params{startlevel} : 0); + my $curlevel=$startlevel-1; my $liststarted=0; my $indent=sub { "\t" x $curlevel }; $p->handler(start => sub { @@ -65,12 +65,17 @@ sub format (@) { my $anchor="index".++$anchors{$level}."h$level"; $page.="$text<a name=\"$anchor\"></a>"; - # Take the first header level seen as the topmost level, + # Unless we're given startlevel as a parameter, + # take the first header level seen as the topmost level, # even if there are higher levels seen later on. if (! $startlevel) { $startlevel=$level; $curlevel=$startlevel-1; } + elsif (defined $params{startlevel} && + $level < $params{startlevel}) { + return; + } elsif ($level < $startlevel) { $level=$startlevel; } diff --git a/debian/changelog b/debian/changelog index d3a510d4a..ae0b5eefd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low * pagestats: Add show parameter. Closes: #562129 (David Paleino) + * toc: Add startlevel parameter. (kerravonsen) -- Joey Hess <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/ikiwiki/directive/toc.mdwn b/doc/ikiwiki/directive/toc.mdwn index bf504dafc..bb1afa1ac 100644 --- a/doc/ikiwiki/directive/toc.mdwn +++ b/doc/ikiwiki/directive/toc.mdwn @@ -14,6 +14,12 @@ the `levels` parameter: The toc directive will take the level of the first header as the topmost level, even if there are higher levels seen later in the file. +To create a table of contents that only shows headers starting with a given +level, use the `startlevel` parameter. For example, to show only h2 and +smaller headers: + + \[[!toc startlevel=2]] + The table of contents will be created as an ordered list. If you want an unordered list instead, you can change the list-style in your local style sheet. -- cgit v1.2.3 From 3bff312697c86a5580ce4bfc32f3fb77ecb7f5f5 Mon Sep 17 00:00:00 2001 From: "http://weakish.pigro.net/" <http://weakish.pigro.net/@web> Date: Sun, 27 Dec 2009 07:18:30 +0000 Subject: repost bug: rst plugin has python hardcode in shebang line --- .../rst_plugin_has_python_hardcode_in_shebang_line.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn (limited to 'doc') diff --git a/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn new file mode 100644 index 000000000..f89c76fe8 --- /dev/null +++ b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn @@ -0,0 +1,13 @@ +Current the rst plugin uses this shebang line: + + #!/usr/bin/python + +The problem is that rst plugin uses some feature (for example, iterator comprehension) which is unavailable on old version of Python. + +So rst plugin will not work on a machine which has an old version of python in system path even though +the user have installed a new version of python in other place. For example, I am using ikiwiki with the rst plugin on Mac OS X 10.4 which ships python 2.3 but I do have python2.6 installed on /opt/local/bin/python (via macports). + +Thus I suggest to change the shebang line to: + + #!/usr/bin/env python + -- cgit v1.2.3 From 8a51384297c66dd1216088ceb5def61d09af021e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sun, 27 Dec 2009 12:40:11 +0000 Subject: note as merged --- ...lugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn index 53cb0dd7c..07d2d383c 100644 --- a/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn +++ b/doc/todo/toc_plugin:_set_a_header_ceiling___40__opposite_of_levels__61____41__.mdwn @@ -12,6 +12,7 @@ Currently, the levels=X parameter lets you tweak how deep it will go for small h > > > Done. -- [[KathrynAndersen]] +> > > > Looks like Joey has now [[merged|done]] this. Thanks! --[[smcv]] --- /files/git/other/ikiwiki/IkiWiki/Plugin/toc.pm 2009-11-16 12:44:00.352050178 +1100 +++ toc.pm 2009-12-26 06:36:06.686512552 +1100 -- cgit v1.2.3 From 31adf108c8760f11e677f7acdb732b28c0d365ed Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 28 Dec 2009 12:55:54 -0500 Subject: add another github fork --- doc/git.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index fef2e01e0..293446772 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -53,6 +53,8 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[kaizer]] `git://github.com/engla/ikiwiki.git` * [[bbb]] `http://git.boulgour.com/bbb/ikiwiki.git` * [[KathrynAndersen]] `git://github.com/rubykat/ikiplugins.git` +* [[ktf]] `git://github.com/ktf/ikiwiki.git` + ## branches -- cgit v1.2.3 From 87c84515e96ac991a67571b26d90a4f2ed58c757 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 28 Dec 2009 13:03:39 -0500 Subject: idea --- doc/todo/conflict_free_comment_merges.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/todo/conflict_free_comment_merges.mdwn (limited to 'doc') diff --git a/doc/todo/conflict_free_comment_merges.mdwn b/doc/todo/conflict_free_comment_merges.mdwn new file mode 100644 index 000000000..e0e8acb34 --- /dev/null +++ b/doc/todo/conflict_free_comment_merges.mdwn @@ -0,0 +1,14 @@ +Currently, new comments are named with an incrementing ID (comment_N). So +if a wiki has multiple disconnected servers, and comments are made to the +same page on both, merging is guaranteed to result in conflicts. + +I propose avoiding such merge problems by naming a comment with a sha1sum +of its (full) content. Keep the incrementing ID too, so there is an +-ordering. And so duplicate comments are allowed..) +So, "comment_N_SHA1". + +Note: The comment body will need to use meta title in the case where no +title is specified, to retain the current behavior of the default title +being "comment N". + +What do you think [[smcv]]? --[[Joey]] -- cgit v1.2.3 From 2143cfcc3d0dc03fe3a67a5cab612fac041c2c9f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 28 Dec 2009 13:14:54 -0500 Subject: thoughts --- doc/todo/tagging_with_a_publication_date.mdwn | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'doc') diff --git a/doc/todo/tagging_with_a_publication_date.mdwn b/doc/todo/tagging_with_a_publication_date.mdwn index 80240ec5a..39fc4e220 100644 --- a/doc/todo/tagging_with_a_publication_date.mdwn +++ b/doc/todo/tagging_with_a_publication_date.mdwn @@ -38,3 +38,34 @@ on vacation". > > > > I no longer have the original wiki for which I wanted this feature, but I can > > see using it on future ones. -- [[DonMarti]] + +>>> FWIW, for the case where one wants to update a site offline, +>>> using an ikiwiki instance on a laptop, and include some deffered +>>> posts in the push, the ad-hoc cron job type approach will be annoying. +>>> +>>> In modern ikiwiki, I guess the way to accomplish this would be to +>>> add a pagespec that matches only pages posted in the present or past. +>>> Then a page can have its post date set to the future, using meta date, +>>> and only show up when its post date rolls around. +>>> +>>> Ikiwiki will need to somehow notice that a pagespec began matching +>>> a page it did not match previously, despite said page not actually +>>> changing. I'm not sure what the best way is. +>>> +>>> * One way could be to +>>> use a needsbuild hook and some stored data about which pagespecs +>>> exclude pages in the future. (But I'm not sure how evaluating the +>>> pagespec could lead to that metadata and hook being set up.) +>>> * Another way would be to use an explicit directive to delay a +>>> page being posted. Then the directive stores the metadata and +>>> sets up the needsbuild hook. +>>> * Another way would be for ikiwiki to remember the last +>>> time it ran. It could then easily find pages that have a post +>>> date after that time, and treat them the same as it treats actually +>>> modified files. Or a plugin could do this via a needsbuild hook, +>>> probably. (Only downside to this is it would probably need to do +>>> a O(n) walk of the list of pages -- but only running an integer +>>> compare per page.) +>>> +>>> You'd still need a cron job to run ikiwiki -refresh every hour, or +>>> whatever, so it can update. --[[Joey]] -- cgit v1.2.3 From 9f841c07dff16433fce805111d8ab45ff38ce228 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 29 Dec 2009 15:56:25 -0500 Subject: Use env hack in python scripts. --- debian/changelog | 1 + doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn | 2 ++ plugins/pythondemo | 2 +- plugins/rst | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index dec2423fe..ee6f9adfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low example sites also used by auto-blog.setup. The example setup file can be generated at any time using ikiwiki --dumpsetup so I do not see a reason to ship it. Closes: #562183 + * Use env hack in python scripts. -- Joey Hess <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn index f89c76fe8..a594adc09 100644 --- a/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn +++ b/doc/bugs/rst_plugin_has_python_hardcode_in_shebang_line.mdwn @@ -11,3 +11,5 @@ Thus I suggest to change the shebang line to: #!/usr/bin/env python +> [[done]], although the irony of all the perl hashbangs in ikiwiki +> being hardcoded doesn't escape me. --[[Joey]] diff --git a/plugins/pythondemo b/plugins/pythondemo index c63ce3973..911f4d7d9 100755 --- a/plugins/pythondemo +++ b/plugins/pythondemo @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # pythondemo — demo Python ikiwiki plugin diff --git a/plugins/rst b/plugins/rst index 449dba415..9f64b33a0 100755 --- a/plugins/rst +++ b/plugins/rst @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # rst — xml-rpc-based ikiwiki plugin to process RST files -- cgit v1.2.3 From 6af6c89df314cf2f9c9e053c04aa2bd492072ab1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 30 Dec 2009 15:41:17 -0500 Subject: comments: Add a checksum to the name of comment pages, to avoid merge conflicts when comments are posted to two branches of a site. --- IkiWiki/Plugin/comments.pm | 32 ++++++++++++++++++++++-------- debian/changelog | 3 +++ doc/todo/conflict_free_comment_merges.mdwn | 9 +++++++++ 3 files changed, 36 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 517e16f9f..6340fc2cb 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -377,8 +377,6 @@ sub editcomment ($$) { IkiWiki::check_canedit($page, $cgi, $session); $postcomment=0; - my $location=unique_comment_location($page, $config{srcdir}); - my $content = "[[!comment format=$type\n"; # FIXME: handling of double quotes probably wrong? @@ -410,8 +408,11 @@ sub editcomment ($$) { my $subject = $form->field('subject'); if (defined $subject && length $subject) { $subject =~ s/"/"/g; - $content .= " subject=\"$subject\"\n"; } + else { + $subject = "comment ".(num_comments($page, $config{srcdir}) + 1); + } + $content .= " subject=\"$subject\"\n"; $content .= " date=\"" . decode_utf8(strftime('%Y-%m-%dT%H:%M:%SZ', gmtime)) . "\"\n"; @@ -421,6 +422,8 @@ sub editcomment ($$) { $editcontent =~ s/"/\\"/g; $content .= " content=\"\"\"\n$editcontent\n\"\"\"]]\n"; + my $location=unique_comment_location($page, $content, $config{srcdir}); + # This is essentially a simplified version of editpage: # - the user does not control the page that's created, only the parent # - it's always a create operation, never an edit @@ -458,7 +461,7 @@ sub editcomment ($$) { if (! $ok) { my $penddir=$config{wikistatedir}."/comments_pending"; - $location=unique_comment_location($page, $penddir); + $location=unique_comment_location($page, $content, $penddir); writefile("$location._comment", $penddir, $content); IkiWiki::printheader($session); print IkiWiki::misctemplate(gettext(gettext("comment stored for moderation")), @@ -554,7 +557,7 @@ sub commentmoderation ($$) { if ($action eq 'Accept') { my $content=eval { readfile($file) }; next if $@; # file vanished since form was displayed - my $dest=unique_comment_location($page, $config{srcdir})."._comment"; + my $dest=unique_comment_location($page, $content, $config{srcdir})."._comment"; writefile($dest, $config{srcdir}, $content); if ($config{rcs} and $config{comments_commit}) { IkiWiki::rcs_add($dest); @@ -813,15 +816,28 @@ sub pagetemplate (@) { } } -sub unique_comment_location ($) { +sub num_comments ($$) { my $page=shift; my $dir=shift; + my @comments=glob("$dir/$page/$config{comments_pagename}*._comment"); + return @comments; +} + +sub unique_comment_location ($$$) { + my $page=shift; + + eval q{use Digest::MD5 'md5_hex'}; + error($@) if $@; + my $content_md5=md5_hex(shift); + + my $dir=shift; + my $location; - my $i = 0; + my $i = num_comments($page, $dir); do { $i++; - $location = "$page/$config{comments_pagename}$i"; + $location = "$page/$config{comments_pagename}${i}_${content_md5}"; } while (-e "$dir/$location._comment"); return $location; diff --git a/debian/changelog b/debian/changelog index ee6f9adfb..984351415 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low can be generated at any time using ikiwiki --dumpsetup so I do not see a reason to ship it. Closes: #562183 * Use env hack in python scripts. + * comments: Add a checksum to the name of comment pages, to + avoid merge conflicts when comments are posted to two branches of a + site. -- Joey Hess <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/todo/conflict_free_comment_merges.mdwn b/doc/todo/conflict_free_comment_merges.mdwn index e0e8acb34..2cef0ee8c 100644 --- a/doc/todo/conflict_free_comment_merges.mdwn +++ b/doc/todo/conflict_free_comment_merges.mdwn @@ -12,3 +12,12 @@ title is specified, to retain the current behavior of the default title being "comment N". What do you think [[smcv]]? --[[Joey]] + +> I had to use md5sums, as sha1sum perl module may not be available and I +> didn't want to drag it in. But I think that's ok; this doesn't need to be +> cryptographically secure and even the chances of being able to +> purposefully cause a md5 collision and thus an undesired merge conflict +> are quite low since it modifies the input text and adds a date stamp to +> it. +> +> Anyway, I think it's good, [[[done]] --[[Joey]] -- cgit v1.2.3 From 2ae1d9d928c12be21a32c9fd4809f12bebc20e77 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 1 Jan 2010 03:37:59 -0500 Subject: linkmap: Add option to omit disconnected pages from the map. --- IkiWiki/Plugin/linkmap.pm | 25 ++++++++++++++++++++----- debian/changelog | 1 + doc/ikiwiki/directive/linkmap.mdwn | 13 ++++++++++--- 3 files changed, 31 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm index 9540bd112..28acbda32 100644 --- a/IkiWiki/Plugin/linkmap.pm +++ b/IkiWiki/Plugin/linkmap.pm @@ -49,6 +49,7 @@ sub genmap ($) { my $mapnum=shift; return "" unless exists $maps{$mapnum}; my %params=%{$maps{$mapnum}}; + my $connected=IkiWiki::yesno($params{connected}); # Get all the items to map. my %mapitems = map { $_ => urlto($_, $params{destpage}) } @@ -79,24 +80,38 @@ sub genmap ($) { print OUT "charset=\"utf-8\";\n"; print OUT "ratio=compress;\nsize=\"".($params{width}+0).", ".($params{height}+0)."\";\n" if defined $params{width} and defined $params{height}; + my %shown; + my $show=sub { + my $item=shift; + if (! $shown{$item}) { + print OUT "\"$item\" [shape=box,href=\"$mapitems{$item}\"];\n"; + $shown{$item}=1; + } + }; foreach my $item (keys %mapitems) { - print OUT "\"$item\" [shape=box,href=\"$mapitems{$item}\"];\n"; + $show->($item) unless $connected; foreach my $link (map { bestlink($item, $_) } @{$links{$item}}) { - print OUT "\"$item\" -> \"$link\";\n" - if $mapitems{$link}; + next unless length $link and $mapitems{$link}; + foreach my $endpoint ($item, $link) { + $show->($endpoint); + } + print OUT "\"$item\" -> \"$link\";\n"; } } print OUT "}\n"; - close OUT; + close OUT || error gettext("failed to run dot"); local $/=undef; my $ret="<object data=\"".urlto($dest, $params{destpage}). "\" type=\"image/png\" usemap=\"#linkmap$mapnum\">\n". <IN>. "</object>"; - close IN; + close IN || error gettext("failed to run dot"); waitpid $pid, 0; + if ($?) { + error gettext("failed to run dot"); + } $SIG{PIPE}="DEFAULT"; error gettext("failed to run dot") if $sigpipe; diff --git a/debian/changelog b/debian/changelog index 984351415..eb9bf496f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low * comments: Add a checksum to the name of comment pages, to avoid merge conflicts when comments are posted to two branches of a site. + * linkmap: Add option to omit disconnected pages from the map. -- Joey Hess <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/ikiwiki/directive/linkmap.mdwn b/doc/ikiwiki/directive/linkmap.mdwn index 38cf0fd11..baa6fff61 100644 --- a/doc/ikiwiki/directive/linkmap.mdwn +++ b/doc/ikiwiki/directive/linkmap.mdwn @@ -7,9 +7,7 @@ graph showing the links between a set of pages in the wiki. Example usage: Only links between mapped pages will be shown; links pointing to or from unmapped pages will be omitted. If the pages to include are not specified, -the links between all pages (and other files) in the wiki are mapped. For -best results, only a small set of pages should be mapped, since otherwise -the map can become very large, unwieldy, and complicated. +the links between all pages (and other files) in the wiki are mapped. Here are descriptions of all the supported parameters to the `linkmap` directive: @@ -18,5 +16,14 @@ directive: * `height`, `width` - Limit the size of the map to a given height and width, in inches. Both must be specified for the limiting to take effect, otherwise the map's size is not limited. +* `connected` - Controls whether to include pages on the map that link to + no other pages (connected=no, the default), or to only show pages that + link to others (connected=yes). + +For best results, only a small set of pages should be mapped, since +otherwise the map can become very large, unwieldy, and complicated. +If too many pages are included, the map may get so large that graphviz +cannot render it. Using the `connected` parameter is a good way to prune +out pages that clutter the map. [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From ddda9800d6bec39a86dd8f76d67a4972138ee394 Mon Sep 17 00:00:00 2001 From: PaulePanter <PaulePanter@web> Date: Fri, 1 Jan 2010 18:56:37 +0000 Subject: Update on interaction between `show`, `feedshow` and `quick`. --- doc/ikiwiki/directive/inline/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index e5cfeb91c..c0d7c76c6 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -134,9 +134,13 @@ influence `show`. [[!inline pages="./blog/*" archive=yes quick=yes feedshow=10 sort=title reverse=yes]] +> Somehow the line above is not displayed correctly. + Only ten pages are listed in this example although `archive` is set to yes. Removing `feedshow=10` all matching pages are shown. Is that behaviour intended? +> Is something going wrong because `quick="yes"` [[»turns off generation of any feeds«|inline]]? --[[PaulePanter]] + --[[PaulePanter]] -- cgit v1.2.3 From 63cc5384bb4bd6a033ff85821b1bb904150d76c2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 1 Jan 2010 15:09:15 -0500 Subject: inline: Fix bug that limited displayed pages when feedshow was specified w/o show. --- IkiWiki/Plugin/inline.pm | 2 +- debian/changelog | 2 ++ doc/ikiwiki/directive/inline/discussion.mdwn | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 93dc0149e..17d1611db 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -209,7 +209,7 @@ sub preprocess_inline (@) { if ($params{show}) { $num=$params{show}; } - if ($params{feedshow} && $num < $params{feedshow}) { + if ($params{feedshow} && $num < $params{feedshow} && $num > 0) { $num=$params{feedshow}; } if ($params{skip} && $num) { diff --git a/debian/changelog b/debian/changelog index eb9bf496f..4ad346c13 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low avoid merge conflicts when comments are posted to two branches of a site. * linkmap: Add option to omit disconnected pages from the map. + * inline: Fix bug that limited displayed pages when feedshow was + specified w/o show. -- Joey Hess <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index c0d7c76c6..998ba642b 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -132,9 +132,7 @@ Else can you please suggest a smarter way of getting certain data out from pages Reading the documentation I would think that `feedshow` does not influence `show`. - [[!inline pages="./blog/*" archive=yes quick=yes feedshow=10 sort=title reverse=yes]] - -> Somehow the line above is not displayed correctly. + \[[!inline pages="./blog/*" archive=yes quick=yes feedshow=10 sort=title reverse=yes]] Only ten pages are listed in this example although `archive` is set to yes. Removing `feedshow=10` all matching pages are shown. @@ -144,3 +142,5 @@ Is that behaviour intended? > Is something going wrong because `quick="yes"` [[»turns off generation of any feeds«|inline]]? --[[PaulePanter]] --[[PaulePanter]] + +>> Bug was that if feedshow was specified without show it limited to it incorrectly. Fixed. --[[Joey]] -- cgit v1.2.3 From 2bf3b3f403f5defa84aae24216226217895e6dfb Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Fri, 1 Jan 2010 20:21:47 +0000 Subject: back from the done --- doc/bugs/disable_sub-discussion_pages.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/disable_sub-discussion_pages.mdwn b/doc/bugs/disable_sub-discussion_pages.mdwn index 5e9c8c9f9..233a377f1 100644 --- a/doc/bugs/disable_sub-discussion_pages.mdwn +++ b/doc/bugs/disable_sub-discussion_pages.mdwn @@ -6,6 +6,9 @@ I do want discussion subpage, but I don't want to have, for example: discussion/ > Discussion pages should clearly be a special case that don't get Discussion > links put at the top... aaand.. [[bugs/done]]! --[[Joey]] +>> This bug appears to have returned. For example, +>> [[plugins/contrib/unixauth/discussion]] has a Discussion link. -- [[schmonz]] + >>> Joey, I've just seen that you closed that bug in ikiwiki 1.37, but it seems >>> you fixed it only for English "discussion" page. The bug still occurs >>> for the international "discussion" pages. I have backported ikiwiki 1.40 -- cgit v1.2.3 From b4d1a4bb9906c41da4174356708e157683f0bdd9 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Fri, 1 Jan 2010 20:36:12 +0000 Subject: when using httpauth, anonok isn't --- doc/bugs/anonok_vs._httpauth.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/bugs/anonok_vs._httpauth.mdwn (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn new file mode 100644 index 000000000..90c8c74c9 --- /dev/null +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -0,0 +1,10 @@ +I've got a wiki where editing requires [[plugins/httpauth]] (with +`cgiauthurl` working nicely). I now want to let the general public +edit Discussion subpages, so I enabled [[plugins/anonok]] and set +`anonok_pagespec` to `'*/Discussion'`, but HTTP auth is still being +required for those. + +(Actually, what I'll really want to do is probably [[plugins/lockedit]] +and a whitelist of OpenIDs in `locked_pages`...) + +--[[schmonz]] -- cgit v1.2.3 From ba1565acc1c92ce409aa341cd14102675f222183 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 1 Jan 2010 18:48:00 -0500 Subject: plugin names are always lowercase --- doc/usage.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 4ee935f73..e4808d4c2 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -249,8 +249,8 @@ also be configured using a setup file. Makes ikiwiki look in the specified directory first, before the regular locations when loading library files and plugins. For example, if you set - libdir to "/home/you/.ikiwiki/", you can install a Foo.pm plugin as - "/home/you/.ikiwiki/IkiWiki/Plugin/Foo.pm". + libdir to "/home/you/.ikiwiki/", you can install a foo.pm plugin as + "/home/you/.ikiwiki/IkiWiki/Plugin/foo.pm". * --discussion, --no-discussion -- cgit v1.2.3 From ed67ff3b844f54392a4eb46cf7da297e7da61126 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 2 Jan 2010 15:12:05 -0500 Subject: add tove --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 293446772..d21a282e4 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -54,6 +54,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[bbb]] `http://git.boulgour.com/bbb/ikiwiki.git` * [[KathrynAndersen]] `git://github.com/rubykat/ikiplugins.git` * [[ktf]] `git://github.com/ktf/ikiwiki.git` +* [[tove]] `git://github.com/tove/ikiwiki.git` ## branches -- cgit v1.2.3 From 7dd074e2e712c67c8c1a26841a69281fa9d293cb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 2 Jan 2010 15:42:20 -0500 Subject: Fix several places that did not properly handle capitalization of the discussionpage setting. Specifically, fixes discussion actions on discussion pages, and unbreaks the opendiscussion plugin. --- IkiWiki/Plugin/inline.pm | 4 ++-- IkiWiki/Plugin/opendiscussion.pm | 2 +- IkiWiki/Render.pm | 2 +- debian/changelog | 7 ++++++- doc/bugs/disable_sub-discussion_pages.mdwn | 3 +++ 5 files changed, 13 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 17d1611db..ec99300b3 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -357,9 +357,9 @@ sub preprocess_inline (@) { my $file = $pagesources{$page}; my $type = pagetype($file); if ($config{discussion}) { - if ($page !~ /.*\/\Q$config{discussionpage}\E$/ && + if ($page !~ /.*\/\Q$config{discussionpage}\E$/i && (length $config{cgiurl} || - exists $pagesources{$page."/".$config{discussionpage}})) { + exists $pagesources{$page."/".lc($config{discussionpage})})) { $template->param(have_actions => 1); $template->param(discussionlink => htmllink($page, diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 1bec4b013..4517ff88b 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -23,7 +23,7 @@ sub canedit ($$) { my $cgi=shift; my $session=shift; - return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/; + return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; return undef; } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 308d60ed0..c82d8a35a 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -92,7 +92,7 @@ sub genpage ($$) { $actions++; } if ($config{discussion}) { - if ($page !~ /.*\/\Q$config{discussionpage}\E$/ && + if ($page !~ /.*\/\Q$config{discussionpage}\E$/i && (length $config{cgiurl} || exists $links{$page."/".$config{discussionpage}})) { $template->param(discussionlink => htmllink($page, $page, $config{discussionpage}, noimageinline => 1, forcesubpage => 1)); diff --git a/debian/changelog b/debian/changelog index 4ad346c13..bccb8b797 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ -ikiwiki (3.20091219) UNRELEASED; urgency=low +ikiwiki (3.20100102.3) UNRELEASED; urgency=low + + Happy palindrome day! * pagestats: Add show parameter. Closes: #562129 (David Paleino) * toc: Add startlevel parameter. (kerravonsen) @@ -14,6 +16,9 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low * linkmap: Add option to omit disconnected pages from the map. * inline: Fix bug that limited displayed pages when feedshow was specified w/o show. + * Fix several places that did not properly handle capitalization of + the discussionpage setting. Specifically, fixes discussion actions + on discussion pages, and unbreaks the opendiscussion plugin. -- Joey Hess <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/bugs/disable_sub-discussion_pages.mdwn b/doc/bugs/disable_sub-discussion_pages.mdwn index 233a377f1..39d9ba528 100644 --- a/doc/bugs/disable_sub-discussion_pages.mdwn +++ b/doc/bugs/disable_sub-discussion_pages.mdwn @@ -9,6 +9,9 @@ I do want discussion subpage, but I don't want to have, for example: discussion/ >> This bug appears to have returned. For example, >> [[plugins/contrib/unixauth/discussion]] has a Discussion link. -- [[schmonz]] +>>> Lots of case issues this time. Audited for and fixed them all. [[done]] +>>> --[[Joey]] + >>> Joey, I've just seen that you closed that bug in ikiwiki 1.37, but it seems >>> you fixed it only for English "discussion" page. The bug still occurs >>> for the international "discussion" pages. I have backported ikiwiki 1.40 -- cgit v1.2.3 From 387e1cc141e474513dcc4429381ffdb147c59e38 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 2 Jan 2010 16:49:42 -0500 Subject: html5 note --- doc/todo/Add_label_to_search_form_input_field.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Add_label_to_search_form_input_field.mdwn b/doc/todo/Add_label_to_search_form_input_field.mdwn index e4e83428c..51b34927d 100644 --- a/doc/todo/Add_label_to_search_form_input_field.mdwn +++ b/doc/todo/Add_label_to_search_form_input_field.mdwn @@ -47,4 +47,8 @@ The patch below adds a label for the field to improve usability: > to get it to appear higher up is to put it first, or to use Evil absolute > positioning. (CSS sucks.) --[[Joey]] -[[!tag done wishlist]] +> Update: html5 allows just adding `placeholder="Search"` to the input +> element. already works in eg, chromium. However, ikiwiki does not use +> html5 yet. --[[Joey]] + +[[!tag wishlist html5]] -- cgit v1.2.3 From b7bb8cdca52c00cded75510c0e6d9869f256c288 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 2 Jan 2010 21:55:24 -0500 Subject: add news item for ikiwiki 3.20100102.3 --- doc/news/version_3.20091023.mdwn | 3 --- doc/news/version_3.20100102.3.mdwn | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) delete mode 100644 doc/news/version_3.20091023.mdwn create mode 100644 doc/news/version_3.20100102.3.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091023.mdwn b/doc/news/version_3.20091023.mdwn deleted file mode 100644 index 1d4167a1a..000000000 --- a/doc/news/version_3.20091023.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -ikiwiki 3.20091023 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * inline: Fix raw mode. Closes: #[552114](http://bugs.debian.org/552114)"""]] \ No newline at end of file diff --git a/doc/news/version_3.20100102.3.mdwn b/doc/news/version_3.20100102.3.mdwn new file mode 100644 index 000000000..9e03e5623 --- /dev/null +++ b/doc/news/version_3.20100102.3.mdwn @@ -0,0 +1,20 @@ +ikiwiki 3.20100102.3 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + Happy palindrome day! + * pagestats: Add show parameter. Closes: #[562129](http://bugs.debian.org/562129) (David Paleino) + * toc: Add startlevel parameter. (kerravonsen) + * Remove example ikiwiki setup file from the Debian package. This + re-enables linking to /usr/share/ikiwiki/examples which has the + example sites also used by auto-blog.setup. The example setup file + can be generated at any time using ikiwiki --dumpsetup so I do + not see a reason to ship it. Closes: #[562183](http://bugs.debian.org/562183) + * Use env hack in python scripts. + * comments: Add a checksum to the name of comment pages, to + avoid merge conflicts when comments are posted to two branches of a + site. + * linkmap: Add option to omit disconnected pages from the map. + * inline: Fix bug that limited displayed pages when feedshow was + specified w/o show. + * Fix several places that did not properly handle capitalization of + the discussionpage setting. Specifically, fixes discussion actions + on discussion pages, and unbreaks the opendiscussion plugin."""]] \ No newline at end of file -- cgit v1.2.3 From 9af117325a10738daa553a30c1d33fac7d115ab4 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Sun, 3 Jan 2010 03:24:18 +0000 Subject: insert linebreak so list renders properly --- doc/news/version_3.20100102.3.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/news/version_3.20100102.3.mdwn b/doc/news/version_3.20100102.3.mdwn index 9e03e5623..b8f61978c 100644 --- a/doc/news/version_3.20100102.3.mdwn +++ b/doc/news/version_3.20100102.3.mdwn @@ -1,6 +1,7 @@ ikiwiki 3.20100102.3 released with [[!toggle text="these changes"]] [[!toggleable text=""" Happy palindrome day! + * pagestats: Add show parameter. Closes: #[562129](http://bugs.debian.org/562129) (David Paleino) * toc: Add startlevel parameter. (kerravonsen) * Remove example ikiwiki setup file from the Debian package. This @@ -17,4 +18,4 @@ ikiwiki 3.20100102.3 released with [[!toggle text="these changes"]] specified w/o show. * Fix several places that did not properly handle capitalization of the discussionpage setting. Specifically, fixes discussion actions - on discussion pages, and unbreaks the opendiscussion plugin."""]] \ No newline at end of file + on discussion pages, and unbreaks the opendiscussion plugin."""]] -- cgit v1.2.3 From a27fad48d45084421a74fc6d24ffc061cc6c66ca Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 3 Jan 2010 14:12:26 -0500 Subject: response --- doc/bugs/anonok_vs._httpauth.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 90c8c74c9..d63e365c1 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -8,3 +8,11 @@ required for those. and a whitelist of OpenIDs in `locked_pages`...) --[[schmonz]] + +> The only way I can see to support this combination is for httpauth with +> cgiauthurl to work more like other actual login types. Which would mean +> that on editing a page that needs authentication, ikiwiki would redirect +> them to the Signin page, which would then have a link they could follow +> to bounce through the cgiauthurl and actually sign in. This would be +> significantly different than the regular httpauth process, in which the +> user signs in in passing. --[[Joey]] -- cgit v1.2.3 From 0fae8d8b69ab191f98608f1dad224a6c6f99d858 Mon Sep 17 00:00:00 2001 From: Sjoerd <Sjoerd@web> Date: Sun, 3 Jan 2010 21:37:37 +0000 Subject: --- ...plugin_sets_editurl_even_when_editpage_is_disabled.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html (limited to 'doc') diff --git a/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html b/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html new file mode 100644 index 000000000..e4e37b34a --- /dev/null +++ b/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html @@ -0,0 +1,14 @@ +see subject, simple patch below +<pre> +--- a/IkiWiki/Plugin/inline.pm ++++ b/IkiWiki/Plugin/inline.pm +@@ -371,7 +371,8 @@ sub preprocess_inline (@) { + } + if (length $config{cgiurl} && defined $type) { + $template->param(have_actions => 1); +- $template->param(editurl => cgiurl(do => "edit", page => $page)); ++ $template->param(editurl => cgiurl(do => "edit", page => $page)) ++ if IkiWiki->can("cgi_editpage"); + } + } +</pre> -- cgit v1.2.3 From 208c7b7ca243717ace469abc234a22c53dbba9be Mon Sep 17 00:00:00 2001 From: "http://adam.shand.net/" <http://adam.shand.net/@web> Date: Mon, 4 Jan 2010 09:42:29 +0000 Subject: --- doc/news/code_swarm/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/news/code_swarm/discussion.mdwn (limited to 'doc') diff --git a/doc/news/code_swarm/discussion.mdwn b/doc/news/code_swarm/discussion.mdwn new file mode 100644 index 000000000..427fb7dc8 --- /dev/null +++ b/doc/news/code_swarm/discussion.mdwn @@ -0,0 +1 @@ +Looks like ImageMagick isn't install on the new server! :-) -- AdamShand -- cgit v1.2.3 From d96a5d9a7325d48524b3cb762fadcd3a08d1ce33 Mon Sep 17 00:00:00 2001 From: "http://adam.shand.net/" <http://adam.shand.net/@web> Date: Mon, 4 Jan 2010 10:22:02 +0000 Subject: --- doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn (limited to 'doc') diff --git a/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn b/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn new file mode 100644 index 000000000..a774cef16 --- /dev/null +++ b/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn @@ -0,0 +1,5 @@ +Using the img plugin to inline an image, the "align" parameter doesn't work as expected if you also include a "caption". + +As best as I can tell this is because the "caption" parameter works by wrapping the image inside a table which means that the "align" parameter is aligning within the table cell rather then the page itself. + +-- AdamShand -- cgit v1.2.3 From a20b07b54b66e36e88201788295b4c59211c3188 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 4 Jan 2010 12:47:54 -0500 Subject: responses --- doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn | 2 ++ doc/news/code_swarm/discussion.mdwn | 2 ++ 2 files changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn b/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn index a774cef16..6500600f3 100644 --- a/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn +++ b/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn @@ -3,3 +3,5 @@ Using the img plugin to inline an image, the "align" parameter doesn't work as e As best as I can tell this is because the "caption" parameter works by wrapping the image inside a table which means that the "align" parameter is aligning within the table cell rather then the page itself. -- AdamShand + +> I agree, this is annoying. --[[Joey]] diff --git a/doc/news/code_swarm/discussion.mdwn b/doc/news/code_swarm/discussion.mdwn index 427fb7dc8..3ecc81b86 100644 --- a/doc/news/code_swarm/discussion.mdwn +++ b/doc/news/code_swarm/discussion.mdwn @@ -1 +1,3 @@ Looks like ImageMagick isn't install on the new server! :-) -- AdamShand + +> Thanks for pointing out problem, fixed now. --[[Joey]] -- cgit v1.2.3 From aed16b4833f98eda566f75b6a1a679febc1ba5ff Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 4 Jan 2010 12:54:18 -0500 Subject: inline: Avoid showing edit links if page editing is disabled. (Sjoerd) --- IkiWiki/Plugin/inline.pm | 5 ++++- debian/changelog | 7 +++++++ .../inline_plugin_sets_editurl_even_when_editpage_is_disabled.html | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index ec99300b3..401852513 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -369,9 +369,12 @@ sub preprocess_inline (@) { forcesubpage => 1)); } } - if (length $config{cgiurl} && defined $type) { + if (length $config{cgiurl} && + defined $type && + IkiWiki->can("cgi_editpage")) { $template->param(have_actions => 1); $template->param(editurl => cgiurl(do => "edit", page => $page)); + } } diff --git a/debian/changelog b/debian/changelog index 02d3ec65b..df3490640 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20100104) UNRELEASED; urgency=low + + * inline: Avoid showing edit links if page editing is disabled. + (Sjoerd) + + -- Joey Hess <joeyh@debian.org> Mon, 04 Jan 2010 12:53:24 -0500 + ikiwiki (3.20100102.3) unstable; urgency=low Happy palindrome day! diff --git a/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html b/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html index e4e37b34a..62c91a932 100644 --- a/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html +++ b/doc/bugs/inline_plugin_sets_editurl_even_when_editpage_is_disabled.html @@ -12,3 +12,5 @@ see subject, simple patch below } } </pre> + +[[done]] --[[Joey]] -- cgit v1.2.3 From 3e6331127b57fe4f3e48d3cf10536b2f2b70eefb Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Tue, 5 Jan 2010 00:29:37 +0000 Subject: response --- doc/bugs/anonok_vs._httpauth.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index d63e365c1..688274d67 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -16,3 +16,11 @@ and a whitelist of OpenIDs in `locked_pages`...) > to bounce through the cgiauthurl and actually sign in. This would be > significantly different than the regular httpauth process, in which the > user signs in in passing. --[[Joey]] + +>> My primary userbase has grown accustomed to the seamlessness of +>> httpauth with SPNEGO, so I'd rather not reintroduce a seam into +>> their web-editing experience in order to let relatively few outsiders +>> edit relatively few pages. When is the decision made about whether +>> the current page can be edited by the current user (if any)? What +>> if there were a way to require particular auth plugins for particular +>> PageSpecs? --[[schmonz]] -- cgit v1.2.3 From 2a717f36ef89d062a359813cdebb2f2e30e4343e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 4 Jan 2010 19:51:37 -0500 Subject: response --- doc/bugs/anonok_vs._httpauth.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 688274d67..0015627b0 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -24,3 +24,13 @@ and a whitelist of OpenIDs in `locked_pages`...) >> the current page can be edited by the current user (if any)? What >> if there were a way to require particular auth plugins for particular >> PageSpecs? --[[schmonz]] + +>>> The decision about whether a user can edit a page is made by plugins +>>> such as signinedit and lockedit, that also use canedit hooks to redirect +>>> the user to a signin page if necessary. +>>> +>>> A tweak on my earlier suggestion would be to have httpauth notice when the +>>> Signin page is being built and immediatly redirect to the cgiauthurl +>>> before the page can be shown to the user. This would, though, not play +>>> well with other authentication methods like openid, since the user +>>> would never see the Signin form. --[[Joey]] -- cgit v1.2.3 From f96a7b775617596f16252f9b8be7cf1761c24da0 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Tue, 5 Jan 2010 01:16:17 +0000 Subject: response --- doc/bugs/anonok_vs._httpauth.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 0015627b0..57ab95985 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -34,3 +34,7 @@ and a whitelist of OpenIDs in `locked_pages`...) >>> before the page can be shown to the user. This would, though, not play >>> well with other authentication methods like openid, since the user >>> would never see the Signin form. --[[Joey]] + +>>>> Would I be able to do what I want with a local plugin that +>>>> knows my auth requirements and abuses canedit -- e.g., if the page +>>>> matches */Discussion, redirect to Signin form, else httpauth? --[[schmonz]] -- cgit v1.2.3 From cd4616e39473a76854158fe3dfd1fc995389e1bc Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Tue, 5 Jan 2010 01:22:24 +0000 Subject: clarify my horrible idea --- doc/bugs/anonok_vs._httpauth.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 57ab95985..8cebfec90 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -36,5 +36,6 @@ and a whitelist of OpenIDs in `locked_pages`...) >>> would never see the Signin form. --[[Joey]] >>>> Would I be able to do what I want with a local plugin that ->>>> knows my auth requirements and abuses canedit -- e.g., if the page ->>>> matches */Discussion, redirect to Signin form, else httpauth? --[[schmonz]] +>>>> abuses canedit (and auth) to reach in and call the appropriate +>>>> plugin's auth method -- e.g., if the page matches */Discussion, +>>>> call `openid:auth()`, else `httpauth:auth()`? --[[schmonz]] -- cgit v1.2.3 From f5bdfc29ee32446fcad4ad2ccc82e109445f4755 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 4 Jan 2010 20:22:32 -0500 Subject: response --- doc/bugs/anonok_vs._httpauth.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 57ab95985..66a68032f 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -38,3 +38,10 @@ and a whitelist of OpenIDs in `locked_pages`...) >>>> Would I be able to do what I want with a local plugin that >>>> knows my auth requirements and abuses canedit -- e.g., if the page >>>> matches */Discussion, redirect to Signin form, else httpauth? --[[schmonz]] + +>>>>> If you wanted users to need to login with openid or passwordauth +>>>>> for discussion pages, you could do that. That seems it would be +>>>>> annoying for httpauth users (who were not current authed) though, +>>>>> as they would then see the openid signin form. +>>>>> +>>>>> --[[Joey]] -- cgit v1.2.3 From 5fdceb49b174fb2ece7cef07479413059f1982c7 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Tue, 5 Jan 2010 01:41:13 +0000 Subject: response --- doc/bugs/anonok_vs._httpauth.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 1bf9a3750..e386a8d96 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -45,3 +45,12 @@ and a whitelist of OpenIDs in `locked_pages`...) >>>>> as they would then see the openid signin form when going to edit a >>>>> Discussion page. >>>>> --[[Joey]] + +>>>>>> I finally see the problem, I think. When you initially +>>>>>> suggested "a link they could follow to bounce through the +>>>>>> cgiauthurl", presumably this could _be_ the Edit link for +>>>>>> non-Discussion pages, so that the typical case of an httpauth +>>>>>> user editing an editable-only-by-httpauth page doesn't visibly +>>>>>> change. And then the Edit link for Discussion subpages could do +>>>>>> as you suggest, adding one click for the httpauth user, who won't +>>>>>> often need to edit those subpages. --[[schmonz]] -- cgit v1.2.3 From 5a2ffaca16cd31db7fd4ba8ed709aeff75ef8b42 Mon Sep 17 00:00:00 2001 From: "http://salas.livejournal.com/" <http://salas.livejournal.com/@web> Date: Tue, 5 Jan 2010 04:33:34 +0000 Subject: --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index cf166998b..5840f2eba 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -168,7 +168,7 @@ Finally, let's think about how huge number of pages can affect ikiwiki. quickly, but still, lots more pages will make PageSpecs more expensive. * The backlinks calculation has to consider every link on every page - in the wiki. (In practice, most pages only like to at most a few dozen + in the wiki. (In practice, most pages only link to at most a few dozen other pages, so this is not a `O(N^2)`, but closer to `O(N)`.) * Ikiwiki also reads and writes an `index` file, which contains information -- cgit v1.2.3 From e0590970b66409c9d31dee6301695a5a8f77cc18 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 4 Jan 2010 23:39:14 -0500 Subject: fix link --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index 5840f2eba..f0ce1b0c3 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -64,7 +64,7 @@ smaller. \[[!inline pages="blog/* and link(tag)" show=0 archive=yes quick=yes]] -Only downsides: This won't show titles set by the [[!ikiwiki/directive/meta]] +Only downsides: This won't show titles set by the [[ikiwiki/directive/meta]] directive. And there's no RSS feed for users to use -- but if this page is only for the archives or tag for your blog, users should be subscribing to the blog's main page's RSS feed instead. -- cgit v1.2.3 From e22b1d05214ee90e7424f856dae43a35902950cf Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 4 Jan 2010 23:40:19 -0500 Subject: fix link --- doc/tips/optimising_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/optimising_ikiwiki.mdwn b/doc/tips/optimising_ikiwiki.mdwn index f0ce1b0c3..14d619ff8 100644 --- a/doc/tips/optimising_ikiwiki.mdwn +++ b/doc/tips/optimising_ikiwiki.mdwn @@ -85,7 +85,7 @@ The resulting html file might get big and expensive to generate as you keep adding pages. First, consider removing the "show=title". Then the map will not show page -titles set by the [[!ikiwiki/directive/meta]] directive -- but will also +titles set by the [[ikiwiki/directive/meta]] directive -- but will also only need to be generated when pages are added or removed, not for every page change. -- cgit v1.2.3 From 86e05970ac1ab2442e3d64d9e6238647c950c0fb Mon Sep 17 00:00:00 2001 From: Enno <Enno@web> Date: Tue, 5 Jan 2010 19:23:16 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index aa4b4b4e6..0ebab313d 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -49,6 +49,7 @@ Projects & Organizations * [Tinc VPN](http://tinc-vpn.org/) * [The XCB library](http://xcb.freedesktop.org/) * [The Philolexian Society of Columbia University](http://www.columbia.edu/cu/philo/) +* [Fachschaft Informatik HU Berlin](http://fachschaft.informatik.hu-berlin.de/) Personal sites and blogs ======================== -- cgit v1.2.3 From 66af1428f04d8b709be5854bb1fa74da7b25fb2d Mon Sep 17 00:00:00 2001 From: "http://j9werdf.myid.net/" <http://j9werdf.myid.net/@web> Date: Wed, 6 Jan 2010 17:12:42 +0000 Subject: --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index e23c6330b..f1a6ed3b4 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -74,3 +74,4 @@ bar [[!toggle id="foobar" text="foo/bar"]] +Hmm, can I dig it? -- cgit v1.2.3 From 4bda18a50aab714e72fce347cb4cff32316e55de Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Date: Tue, 5 Jan 2010 15:23:22 +0100 Subject: Support align attribute for img with caption This is achieved by preparing CSS definitions that emulates the behavior of the align attribute, and passing it to the outermost IMG wrapper (A or TABLE) instead of passing the align value to IMG directly. --- IkiWiki/Plugin/img.pm | 21 ++++++++++++++++----- doc/style.css | 20 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 32023fa97..6f1919ea0 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -155,16 +155,23 @@ sub preprocess (@) { '" height="'.$dheight.'"'. (exists $params{alt} ? ' alt="'.$params{alt}.'"' : ''). (exists $params{title} ? ' title="'.$params{title}.'"' : ''). - (exists $params{align} ? ' align="'.$params{align}.'"' : ''). (exists $params{class} ? ' class="'.$params{class}.'"' : ''). (exists $params{id} ? ' id="'.$params{id}.'"' : ''). ' />'; if (! defined $params{link} || lc($params{link}) eq 'yes') { - $imgtag='<a href="'.$fileurl.'">'.$imgtag.'</a>'; + if (exists $params{caption} || !exists $params{align}) { + $imgtag='<a href="'.$fileurl.'">'.$imgtag.'</a>'; + } else { + $imgtag='<a href="'.$fileurl.'" class="align-'.$params{align}.'">'.$imgtag.'</a>'; + } } elsif ($params{link} =~ /^\w+:\/\//) { - $imgtag='<a href="'.$params{link}.'">'.$imgtag.'</a>'; + if (exists $params{caption} || !exists $params{align}) { + $imgtag='<a href="'.$params{link}.'">'.$imgtag.'</a>'; + } else { + $imgtag='<a href="'.$params{link}.'" class="align-'.$params{align}.'">'.$imgtag.'</a>'; + } } else { my $b = bestlink($params{page}, $params{link}); @@ -173,12 +180,16 @@ sub preprocess (@) { add_depends($params{page}, $b, deptype("presence")); $imgtag=htmllink($params{page}, $params{destpage}, $params{link}, linktext => $imgtag, - noimageinline => 1); + noimageinline => 1, + (exists $params{caption} || !exists $params{align}) ? + () : (class => 'align-'.$params{align})); } } if (exists $params{caption}) { - return '<table class="img">'. + return '<table class="img'. + (exists $params{align} ? ' align-'.$params{align} : ''). + '">'. '<caption>'.$params{caption}.'</caption>'. '<tr><td>'.$imgtag.'</td></tr>'. '</table>'; diff --git a/doc/style.css b/doc/style.css index be86a0818..c56494fff 100644 --- a/doc/style.css +++ b/doc/style.css @@ -82,6 +82,26 @@ div.tags { text-align: center; } +.align-left { + float:left; +} + +.align-right { + float:right; +} + +.align-top { + vertical-align:top; +} + +.align-bottom { + vertical-align:bottom; +} + +.align-middle { + vertical-align:middle; +} + #backlinks { margin-top: 1em; } -- cgit v1.2.3 From a250a55baaf86c6c8ebc35f908a9fc2e3c7526b4 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 6 Jan 2010 15:34:35 -0500 Subject: add repo --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index d21a282e4..5167ad004 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -55,6 +55,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[KathrynAndersen]] `git://github.com/rubykat/ikiplugins.git` * [[ktf]] `git://github.com/ktf/ikiwiki.git` * [[tove]] `git://github.com/tove/ikiwiki.git` +* [[GiuseppeBilotta]] `git://git.oblomov.eu/ikiwiki` ## branches -- cgit v1.2.3 From 436e29731026194e961ed0f11e85517308a400d9 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Thu, 7 Jan 2010 09:40:10 +0000 Subject: seasons greatings, polite nudge --- doc/todo/allow_site-wide_meta_definitions.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 62317ba1a..99a9cf1e2 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -178,3 +178,8 @@ definitions essentially. * title -- [[Jon]] + +>>> Merry Christmas/festive season/happy new year folks. I've been away from +>>> ikiwiki for the break, and now I've returned to watching recentchanges. +>>> Hopefully I'll be back in the mix soon, too. In the meantime, Joey, have +>>> you had a chance to look at this yet? -- [[Jon]] -- cgit v1.2.3 From bde52652152cb4105665f18569fd807b08025d59 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 7 Jan 2010 15:44:32 -0500 Subject: close --- debian/changelog | 1 + doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index f36580d26..4f7c1a60c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ ikiwiki (3.20100104) UNRELEASED; urgency=low * signinedit: Auto-disable the plugin when all authentication methods are disabled. * comments: Fix permalinks for comments using new conflict-free filenames. + * img: Support alignment of images with captions. (Giuseppe Bilotta) -- Joey Hess <joeyh@debian.org> Mon, 04 Jan 2010 12:53:24 -0500 diff --git a/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn b/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn index 6500600f3..e986bdc82 100644 --- a/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn +++ b/doc/bugs/align_doesn__39__t_always_work_with_img_plugin_.mdwn @@ -4,4 +4,4 @@ As best as I can tell this is because the "caption" parameter works by wrapping -- AdamShand -> I agree, this is annoying. --[[Joey]] +> I agree, this is annoying... and [[done]]! --[[Joey]] -- cgit v1.2.3 From cf5f1c3a3a74d5d444736e5bbe6ecaf55c523467 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 7 Jan 2010 16:07:47 -0500 Subject: remove align-top/middle/bottom I think we only need left and right align. The other values including top, middle, bottom, baseline, absbottom, etc, don't make much sense when aligning an image that has a caption included. (They're mostly of value when including a image in a line of text like a word.) --- doc/style.css | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'doc') diff --git a/doc/style.css b/doc/style.css index c56494fff..317d4c7aa 100644 --- a/doc/style.css +++ b/doc/style.css @@ -90,18 +90,6 @@ div.tags { float:right; } -.align-top { - vertical-align:top; -} - -.align-bottom { - vertical-align:bottom; -} - -.align-middle { - vertical-align:middle; -} - #backlinks { margin-top: 1em; } -- cgit v1.2.3 From dfaad14f5364422489dba852b92e0746c35e2c0c Mon Sep 17 00:00:00 2001 From: "http://svend.myopenid.com/" <http://svend.myopenid.com/@web> Date: Thu, 7 Jan 2010 21:50:11 +0000 Subject: Test commit --- doc/sandbox.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index f1a6ed3b4..afd7dbeab 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -75,3 +75,5 @@ bar [[!toggle id="foobar" text="foo/bar"]] Hmm, can I dig it? + +Test -- cgit v1.2.3 From 6257a714077712e818127ed0c68d9a9611d7628f Mon Sep 17 00:00:00 2001 From: intrigeri <intrigeri@boum.org> Date: Thu, 7 Jan 2010 23:22:48 +0100 Subject: selflink detection is suboptimal when using the po plugin --- doc/todo/Fix_selflink_in_po_plugin.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/todo/Fix_selflink_in_po_plugin.mdwn (limited to 'doc') diff --git a/doc/todo/Fix_selflink_in_po_plugin.mdwn b/doc/todo/Fix_selflink_in_po_plugin.mdwn new file mode 100644 index 000000000..ae59e14c2 --- /dev/null +++ b/doc/todo/Fix_selflink_in_po_plugin.mdwn @@ -0,0 +1,4 @@ +Using the po plugin, a link to /bla is present in the sidebar. +When viewing /bla in the default language, this link is detected as +a selflink. When viewing a translation of /bla, it +isn't. --[[intrigeri]] -- cgit v1.2.3 From dca9634202d9ab28c524068e17928f403ec03a2c Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/lingo.t.l.chen" <http://www.google.com/profiles/lingo.t.l.chen@web> Date: Fri, 8 Jan 2010 14:55:58 +0000 Subject: --- doc/bugs/utf-8_bug_in_websetup.pm.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/bugs/utf-8_bug_in_websetup.pm.mdwn (limited to 'doc') diff --git a/doc/bugs/utf-8_bug_in_websetup.pm.mdwn b/doc/bugs/utf-8_bug_in_websetup.pm.mdwn new file mode 100644 index 000000000..efa2c9ffe --- /dev/null +++ b/doc/bugs/utf-8_bug_in_websetup.pm.mdwn @@ -0,0 +1,20 @@ +[[!tag patch]] + +I type chinese characters into the fields. After press "save setup" button the characters turn into gibberish. + +I submit a patch that solve the problem for me. --Lingo + +---- + + --- websetup.pm 2009-12-02 05:07:46.000000000 +0800 + +++ /usr/share/perl5/IkiWiki/Plugin/websetup.pm 2010-01-08 22:05:16.000000000 +0800 + @@ -308,7 +308,8 @@ + $fields{$_}=$shown{$_} foreach keys %shown; + } + } + - + + + + IkiWiki::decode_form_utf8($form); + if ($form->submitted eq "Cancel") { + IkiWiki::redirect($cgi, $config{url}); + return; -- cgit v1.2.3 From fa59bfad847a9895a37803bc21fb28a27f0fc368 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/lingo.t.l.chen" <http://www.google.com/profiles/lingo.t.l.chen@web> Date: Sat, 9 Jan 2010 13:56:39 +0000 Subject: --- doc/bugs/utf-8_bug_in_websetup.pm.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/utf-8_bug_in_websetup.pm.mdwn b/doc/bugs/utf-8_bug_in_websetup.pm.mdwn index efa2c9ffe..c3a5262cd 100644 --- a/doc/bugs/utf-8_bug_in_websetup.pm.mdwn +++ b/doc/bugs/utf-8_bug_in_websetup.pm.mdwn @@ -1,4 +1,4 @@ -[[!tag patch]] +[[!tag patch bugs]] I type chinese characters into the fields. After press "save setup" button the characters turn into gibberish. -- cgit v1.2.3 From a8258dea709c801b148635feaa78bf99e077c5a6 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 19:47:32 +0000 Subject: new forum thread --- .../link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn new file mode 100644 index 000000000..2ec18d3a5 --- /dev/null +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -0,0 +1,9 @@ +how can I create a link to an image which is part of the wiki, without having it inserted in my page? + +I tought this: + +[[look at this|img/lolcat.png]] + +would work, but it doesn't. + +Any hints? -- cgit v1.2.3 From 3d729ee170ef7a3c1ac5210fd1b648ea1128f73d Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 19:48:19 +0000 Subject: corrected wikilink text --- doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 2ec18d3a5..ce7baba50 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -2,7 +2,7 @@ how can I create a link to an image which is part of the wiki, without having it I tought this: -[[look at this|img/lolcat.png]] + \[[look at this|img/lolcat.png]] would work, but it doesn't. -- cgit v1.2.3 From a0e06556db4a5c67f1fdf6f6dc4b6d275137b996 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 9 Jan 2010 15:50:40 -0500 Subject: response --- ..._image_inside_the_wiki_without_inlining_it.mdwn | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index ce7baba50..f58b6b359 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -7,3 +7,35 @@ I tought this: would work, but it doesn't. Any hints? + +> Well, currently the syntax above will display the image +> inline with the specified link text used as an alt attribute. Although +> that does not seem to be documented anywhere. +> +> A few places that use that (found with `git grep '\[\[' | egrep 'png|gif|jpeg|jpg' |grep \|`): +> +> * [[logos]] uses it to provide useful alt texts for the logos. (This +> could easily be changed to use [[ikiwiki/directives/img]] though.) +> * The `change.tmpl` template uses it to display +> the [[diff|wikiicons/diff.png]] with a very useful "diff" alt text. +> Using [[ikiwiki/directives/img]] here would mean that the +> [[ikiwiki/plugins/recentchanges]] plugin would depend upon the img +> plugin. +> +> I do like your suggestion, it makes more sense than the current behavior. +> I'm not sure the transition pain to get from here to there is worth it, +> though. +> +> More broadly, if I were writing ikiwiki now, I might choose to leave out the +> auto-inlining of images altogether. In practice, it has added a certian level +> of complexity to ikiwiki, with numerous plugins needing to specify +> `noimageinline` to avoid accidentially inlining an image. And there has not +> been a lot of payoff from having the auto-inlining feature implicitly +> available most places. And the img directive allows much needed control over +> display, so it would be better for users to not have to worry about its +> lesser cousin. But the transition from here to *there* would be another order +> of pain. +> +> Anyway, the cheap and simple answer to your question is to use html +> or markdown instead of a [[ikiwiki/wikilink]]. Ie, +> `[look at this](img/lolcat.jpg)`. --[[Joey]] -- cgit v1.2.3 From fb0524bd9be5f47cd71d89e2443665dd65d66c0f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 9 Jan 2010 15:51:31 -0500 Subject: links --- doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index f58b6b359..91573d4b5 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -14,12 +14,12 @@ Any hints? > > A few places that use that (found with `git grep '\[\[' | egrep 'png|gif|jpeg|jpg' |grep \|`): > -> * [[logos]] uses it to provide useful alt texts for the logos. (This +> * [[logo]] uses it to provide useful alt texts for the logos. (This > could easily be changed to use [[ikiwiki/directives/img]] though.) > * The `change.tmpl` template uses it to display > the [[diff|wikiicons/diff.png]] with a very useful "diff" alt text. > Using [[ikiwiki/directives/img]] here would mean that the -> [[ikiwiki/plugins/recentchanges]] plugin would depend upon the img +> [[plugins/recentchanges]] plugin would depend upon the img > plugin. > > I do like your suggestion, it makes more sense than the current behavior. -- cgit v1.2.3 From 9d673e31e755a0e1595d3472de12937517d3a24a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 9 Jan 2010 15:51:52 -0500 Subject: links --- doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 91573d4b5..8a7fd7a29 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -15,10 +15,10 @@ Any hints? > A few places that use that (found with `git grep '\[\[' | egrep 'png|gif|jpeg|jpg' |grep \|`): > > * [[logo]] uses it to provide useful alt texts for the logos. (This -> could easily be changed to use [[ikiwiki/directives/img]] though.) +> could easily be changed to use [[ikiwiki/directive/img]] though.) > * The `change.tmpl` template uses it to display > the [[diff|wikiicons/diff.png]] with a very useful "diff" alt text. -> Using [[ikiwiki/directives/img]] here would mean that the +> Using [[ikiwiki/directive/img]] here would mean that the > [[plugins/recentchanges]] plugin would depend upon the img > plugin. > -- cgit v1.2.3 From d249f674161bcee5ee7387dfe2600e9e20292bc8 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 21:11:25 +0000 Subject: --- doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 8a7fd7a29..67bb7f85f 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -6,7 +6,7 @@ I tought this: would work, but it doesn't. -Any hints? +Any hints? --[[jerojasro]] > Well, currently the syntax above will display the image > inline with the specified link text used as an alt attribute. Although @@ -39,3 +39,6 @@ Any hints? > Anyway, the cheap and simple answer to your question is to use html > or markdown instead of a [[ikiwiki/wikilink]]. Ie, > `[look at this](img/lolcat.jpg)`. --[[Joey]] + +> > thanks a lot, that's a quite straightforward solution. I actually wrote a +> > broken plugin to do that, and now I can ditch it --[[jerojasro]] -- cgit v1.2.3 From fe0f6866841d6fb6e85dec42e88c56114d98e7f4 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 21:12:00 +0000 Subject: --- doc/users/jerojasro.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/jerojasro.mdwn (limited to 'doc') diff --git a/doc/users/jerojasro.mdwn b/doc/users/jerojasro.mdwn new file mode 100644 index 000000000..4b331a0b9 --- /dev/null +++ b/doc/users/jerojasro.mdwn @@ -0,0 +1 @@ +Javier Rojas -- cgit v1.2.3 From 59d929d6b1271c84c6d17ffbff65b57bf67d49e6 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 9 Jan 2010 16:20:09 -0500 Subject: websetup: Fix utf-8 problems. --- IkiWiki/Plugin/websetup.pm | 9 +++++++-- debian/changelog | 1 + doc/bugs/utf-8_bug_in_websetup.pm.mdwn | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 9edd22d26..75aa3681c 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -139,7 +139,11 @@ sub showfields ($$$@) { my $value=$config{$key}; if ($info{safe} && (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY')) { - $value=[(ref $value eq 'ARRAY' ? @{$value} : ""), "", ""]; # blank items for expansion + $value=[(ref $value eq 'ARRAY' ? map { Encode::encode_utf8($_) } @{$value} : ""), + "", ""]; # blank items for expansion + } + else { + $value=Encode::encode_utf8($value); } if ($info{type} eq "string") { @@ -290,7 +294,6 @@ sub showform ($$) { shift->(form => $form, cgi => $cgi, session => $session, buttons => $buttons); }); - IkiWiki::decode_form_utf8($form); my %fields=showfields($form, undef, undef, IkiWiki::getsetup()); @@ -308,6 +311,8 @@ sub showform ($$) { $fields{$_}=$shown{$_} foreach keys %shown; } } + + IkiWiki::decode_form_utf8($form); if ($form->submitted eq "Cancel") { IkiWiki::redirect($cgi, $config{url}); diff --git a/debian/changelog b/debian/changelog index 4f7c1a60c..5d5cdd564 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ ikiwiki (3.20100104) UNRELEASED; urgency=low are disabled. * comments: Fix permalinks for comments using new conflict-free filenames. * img: Support alignment of images with captions. (Giuseppe Bilotta) + * websetup: Fix utf-8 problems. -- Joey Hess <joeyh@debian.org> Mon, 04 Jan 2010 12:53:24 -0500 diff --git a/doc/bugs/utf-8_bug_in_websetup.pm.mdwn b/doc/bugs/utf-8_bug_in_websetup.pm.mdwn index c3a5262cd..debedb01c 100644 --- a/doc/bugs/utf-8_bug_in_websetup.pm.mdwn +++ b/doc/bugs/utf-8_bug_in_websetup.pm.mdwn @@ -4,6 +4,8 @@ I type chinese characters into the fields. After press "save setup" button the c I submit a patch that solve the problem for me. --Lingo +> Fully fixing it is slightly more complex, but now [[done]] --[[Joey]] + ---- --- websetup.pm 2009-12-02 05:07:46.000000000 +0800 -- cgit v1.2.3 From cebf8784f02d4706de4b98b76a8153cc32ff09b9 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 9 Jan 2010 16:30:26 -0500 Subject: followup --- .../link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 67bb7f85f..045f8cc68 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -42,3 +42,14 @@ Any hints? --[[jerojasro]] > > thanks a lot, that's a quite straightforward solution. I actually wrote a > > broken plugin to do that, and now I can ditch it --[[jerojasro]] + +>>> The plugin approach is not a bad idea if you want either the ability +>>> to: +>>> +>>> * Have things that are wikilink-aware (like [[plugins/brokenlinks]] +>>> treat your link to the image as a wikilink. +>>> * Use standard wikilink path stuff (and not have to worry about +>>> a raw html link breaking if the page it's on is inlined, for +>>> example). +>>> +>>> I can help you bang that plugin into shape if need be. --[[Joey]] -- cgit v1.2.3 From 10ca7c8f8ac2801ce50a362c58a3561add0b057e Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 21:33:05 +0000 Subject: details about user jerojasro --- doc/users/jerojasro.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/users/jerojasro.mdwn b/doc/users/jerojasro.mdwn index 4b331a0b9..e2e620d3f 100644 --- a/doc/users/jerojasro.mdwn +++ b/doc/users/jerojasro.mdwn @@ -1 +1,3 @@ Javier Rojas + +I keep a personal [wiki](http://devnull.li/~jerojasro/wiki) and my [blog](http://devnull.li/~jerojasro/blog) in ikiwiki. -- cgit v1.2.3 From cf7d03ec80e168ad18d65a90842773da353ee060 Mon Sep 17 00:00:00 2001 From: intrigeri <intrigeri@boum.org> Date: Sat, 9 Jan 2010 22:57:11 +0100 Subject: fixed bug in my po branch, please pull --- doc/todo/Fix_selflink_in_po_plugin.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/Fix_selflink_in_po_plugin.mdwn b/doc/todo/Fix_selflink_in_po_plugin.mdwn index ae59e14c2..55968e3d7 100644 --- a/doc/todo/Fix_selflink_in_po_plugin.mdwn +++ b/doc/todo/Fix_selflink_in_po_plugin.mdwn @@ -2,3 +2,5 @@ Using the po plugin, a link to /bla is present in the sidebar. When viewing /bla in the default language, this link is detected as a selflink. When viewing a translation of /bla, it isn't. --[[intrigeri]] + +Fixed in my po branch => [[!tag patch]]. --[[intrigeri]] -- cgit v1.2.3 From 62a67e161bccba431b8b8a501967ba7acf6e197a Mon Sep 17 00:00:00 2001 From: intrigeri <intrigeri@boum.org> Date: Sat, 9 Jan 2010 22:59:46 +0100 Subject: wiki syntax fix --- doc/todo/Fix_selflink_in_po_plugin.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Fix_selflink_in_po_plugin.mdwn b/doc/todo/Fix_selflink_in_po_plugin.mdwn index 55968e3d7..87fa38911 100644 --- a/doc/todo/Fix_selflink_in_po_plugin.mdwn +++ b/doc/todo/Fix_selflink_in_po_plugin.mdwn @@ -3,4 +3,6 @@ When viewing /bla in the default language, this link is detected as a selflink. When viewing a translation of /bla, it isn't. --[[intrigeri]] -Fixed in my po branch => [[!tag patch]]. --[[intrigeri]] +Fixed in my po branch. --[[intrigeri]] + +[[!tag patch]] -- cgit v1.2.3 From f00b15cc369e1e3b7949a10a6fa9d8688f60a82f Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 23:00:00 +0000 Subject: help request with plugin draft --- .../link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 045f8cc68..2b91cd856 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -53,3 +53,10 @@ Any hints? --[[jerojasro]] >>> example). >>> >>> I can help you bang that plugin into shape if need be. --[[Joey]] + +>>>> both my plugin and your suggestion yield broken html links when inlining the page +>>>> +>>>> I thought using the `bestlink` function would take care of that, but alas, it doesn't. +>>>> Get the "plugin" [here](http://devnull.li/~jerojasro/files/linktoimgonly.pm), see the broken +>>>> links generated [here](http://devnull.li/~jerojasro/blog/posts/job_offers/) and the source +>>>> file for that page [here](http://git.devnull.li/cgi-bin/gitweb.cgi?p=blog-jerojasro.git;a=blob;f=posts/job_offers.mdwn;hb=HEAD) --[[jerojasro]] -- cgit v1.2.3 From fc760812130b2acfad6105d8444af730d3785cbe Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 23:50:23 +0000 Subject: --- doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 2b91cd856..3b19bab15 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -54,7 +54,7 @@ Any hints? --[[jerojasro]] >>> >>> I can help you bang that plugin into shape if need be. --[[Joey]] ->>>> both my plugin and your suggestion yield broken html links when inlining the page +>>>> both my plugin and your suggestion yield broken html links when inlining the page (although propably that's what is expected from your suggestion (`[]()`)) >>>> >>>> I thought using the `bestlink` function would take care of that, but alas, it doesn't. >>>> Get the "plugin" [here](http://devnull.li/~jerojasro/files/linktoimgonly.pm), see the broken -- cgit v1.2.3 From a23d3b6547b80064f8e9af94076aa43798cf6558 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 9 Jan 2010 23:50:45 +0000 Subject: --- doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 3b19bab15..53544e2c4 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -54,7 +54,7 @@ Any hints? --[[jerojasro]] >>> >>> I can help you bang that plugin into shape if need be. --[[Joey]] ->>>> both my plugin and your suggestion yield broken html links when inlining the page (although propably that's what is expected from your suggestion (`[]()`)) +>>>> both my plugin and your suggestion yield broken html links when inlining the page (although probably that's what is expected from your suggestion (`[]()`)) >>>> >>>> I thought using the `bestlink` function would take care of that, but alas, it doesn't. >>>> Get the "plugin" [here](http://devnull.li/~jerojasro/files/linktoimgonly.pm), see the broken -- cgit v1.2.3 From 149e8e1c62a11d73f2fbea4e653cff7f3460c8f2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 9 Jan 2010 21:25:37 -0500 Subject: response --- .../link_to_an_image_inside_the_wiki_without_inlining_it.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn index 53544e2c4..e92cc1b1c 100644 --- a/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn +++ b/doc/forum/link_to_an_image_inside_the_wiki_without_inlining_it.mdwn @@ -49,7 +49,7 @@ Any hints? --[[jerojasro]] >>> * Have things that are wikilink-aware (like [[plugins/brokenlinks]] >>> treat your link to the image as a wikilink. >>> * Use standard wikilink path stuff (and not have to worry about ->>> a raw html link breaking if the page it's on is inlined, for +>>> a relative html link breaking if the page it's on is inlined, for >>> example). >>> >>> I can help you bang that plugin into shape if need be. --[[Joey]] @@ -60,3 +60,10 @@ Any hints? --[[jerojasro]] >>>> Get the "plugin" [here](http://devnull.li/~jerojasro/files/linktoimgonly.pm), see the broken >>>> links generated [here](http://devnull.li/~jerojasro/blog/posts/job_offers/) and the source >>>> file for that page [here](http://git.devnull.li/cgi-bin/gitweb.cgi?p=blog-jerojasro.git;a=blob;f=posts/job_offers.mdwn;hb=HEAD) --[[jerojasro]] + +>>>>> Use this --[[Joey]] + + return htmllink($params{page}, $params{destpage}, $params{"img"}, + linktext => $params{text}, + noimageinline => 1); + -- cgit v1.2.3 From 0c89eabcf5a7f9dd881abc8a8cb5f2271ec4e01e Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 00:37:56 +0000 Subject: more options for field configuration, additional pagespec test --- doc/plugins/contrib/field.mdwn | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field.mdwn b/doc/plugins/contrib/field.mdwn index a43bf24b2..09646d28a 100644 --- a/doc/plugins/contrib/field.mdwn +++ b/doc/plugins/contrib/field.mdwn @@ -13,6 +13,9 @@ IkiWiki::Plugin::field - front-end for per-page record fields. # simple registration field_register => [qw{meta}], + # allow the config to be queried as a field + field_allow_config => 1, + ## DESCRIPTION This plugin is meant to be used in conjunction with other plugins @@ -32,8 +35,17 @@ a given page. This can be used in three ways: The following options can be set in the ikiwiki setup file. +**field_allow_config** + + field_allow_config => 1, + +Allow the $config hash to be queried like any other field; the +keys of the config hash are the field names. + **field_register** + field_register => [qw{meta}], + A list of plugin-IDs to register. This assumes that the plugins in question store data in the %pagestatus hash using the ID of that plugin, and thus the field values are looked for there. @@ -46,12 +58,17 @@ registered with the "field" plugin. The "field" PageSpec function can be used to match the value of a field for a page. -field(*name* *glob*) +**field(*name* *glob*)** For example: field(bar Foo*) will match if the "bar" field starts with "Foo". +**destfield(*name* *glob*)** + +is the same, except that it tests the destination page (that is, in cases +when the source page is being included in another page). + ## FUNCTIONS ### field_register -- cgit v1.2.3 From 9ccd1ba41bff43c1a5d06197b454c8748224e30f Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 02:20:34 +0000 Subject: ymlfront: backend for structured data --- doc/plugins/contrib/ymlfront.mdwn | 99 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 doc/plugins/contrib/ymlfront.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/ymlfront.mdwn b/doc/plugins/contrib/ymlfront.mdwn new file mode 100644 index 000000000..f4438f23c --- /dev/null +++ b/doc/plugins/contrib/ymlfront.mdwn @@ -0,0 +1,99 @@ +[[!template id=plugin name=ymlfront author="[[rubykat]]"]] +[[!tag type/meta]] +[[!toc]] +## NAME + +IkiWiki::Plugin::ymlfront - add YAML-format data to a page + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff ymlfront ....}], + +## DESCRIPTION + +This plugin provides a way of adding arbitrary meta-data (data fields) to any +page by prefixing the page with a YAML-format document. This provides a way to +create per-page structured data, where each page is treated like a record, and +the structured data are fields in that record. This can include the meta-data +for that page, such as the page title. + +This plugin is meant to be used in conjunction with the [[field]] plugin. + +## DETAILS + +The YAML-format data in a page must be placed at the start of the page +and delimited by lines containing precisely three dashes. The "normal" +content of the page then follows. + +For example: + + --- + title: Foo does not work + Urgency: High + Status: Assigned + AssignedTo: Fred Nurk + Version: 1.2.3 + --- + When running on the Sprongle system, the Foo function returns incorrect data. + +What will normally be displayed is everything following the second line of dashes. +That will be htmlized using the page-type of the page-file. + +### Accessing the Data + +There are three ways to access the data given in the YAML section. + +* [[getfield]] plugin + + The **getfield** plugin can display the data as individual variable values. + + For example: + + --- + title: Foo does not work + Urgency: High + Status: Assigned + AssignedTo: Fred Nurk + Version: 1.2.3 + --- + # {{$title}} + + **Urgency:** {{$Urgency}}\\ + **Status:** {{$Status}}\\ + **Assigned To:** {{$AssignedTo}}\\ + **Version:** {{$Version}} + + When running on the Sprongle system, the Foo function returns incorrect data. + +* [[ftemplate]] plugin + + The **ftemplate** plugin is like the [[plugins/template]] plugin, but it is also aware of [[field]] values. + + For example: + + --- + title: Foo does not work + Urgency: High + Status: Assigned + AssignedTo: Fred Nurk + Version: 1.2.3 + --- + \[[!ftemplate id="bug_display_template"]] + + When running on the Sprongle system, the Foo function returns incorrect data. + +* write your own plugin + + In conjunction with the [[field]] plugin, you can write your own plugin to access the data. + +## PREREQUISITES + + IkiWiki + IkiWiki::Plugin::field + YAML::Any + +## DOWNLOAD + +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/ymlfront.pm> +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From ccc8e8868269bf2751596e04f792c388acb85c12 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 02:27:59 +0000 Subject: getfield: query field (meta-data) values --- doc/plugins/contrib/getfield.mdwn | 85 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 doc/plugins/contrib/getfield.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn new file mode 100644 index 000000000..ed03dc439 --- /dev/null +++ b/doc/plugins/contrib/getfield.mdwn @@ -0,0 +1,85 @@ +[[!template id=plugin name=getfield author="[[rubykat]]"]] +[[!tag type/meta]] +[[!toc]] +## NAME + +IkiWiki::Plugin::getfield - query the values of fields + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff getfield ....}], + +## DESCRIPTION + +This plugin provides a way of querying the meta-data (data fields) of a page +inside the page content (rather than inside a template) This provides a way to +use per-page structured data, where each page is treated like a record, and the +structured data are fields in that record. This can include the meta-data for +that page, such as the page title. + +This plugin is meant to be used in conjunction with the B<field> plugin. + +### USAGE + +One can get the value of a field by using special markup in the page. +This does not use directive markup, in order to make it easier to +use the markup inside other directives. There are two forms: + +* {{$*fieldname*}} + + This queries the value of *fieldname* for the source page. + + For example: + + \[[!meta title="My Long and Complicated Title With Potential For Spelling Mistakes"]] + # {{$title}} + + When the page is processed, this will give you: + + <h1>My Long and Complicated Title With Potential For Spelling Mistakes</h1> + +* {{+$*fieldname*+}} + + This queries the value of *fieldname* for the destination page; that is, + the value when this page is included inside another page. + + For example: + + On PageA: + + \[[!meta title="I Am Page A"]] + # {{+$title+}} + + Stuff about A. + + On PageB: + + \[[!meta title="I Am Page B"]] + \[[!inline pagespec="PageA"]] + + When PageA is displayed: + + <h1>I Am Page A</h1> + <p>Stuff about A.</p> + + When PageB is displayed: + + <h1>I Am Page B</h1> + <p>Stuff about A.</p> + +### More Examples + +Listing all the sub-pages of the current page: + + \[[!map pages="{{$page}}/*"]] + +### LIMITATIONS + +One cannot query the values of fields on pages other than the current +page or the destination page. + +## DOWNLOAD + +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/field.pm> +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From 7d997f1007b240c14c04ff73b09a2a62fa3e64ad Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 02:36:28 +0000 Subject: ftemplate: field-aware structured template plugin --- doc/plugins/contrib/ftemplate.mdwn | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 doc/plugins/contrib/ftemplate.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate.mdwn b/doc/plugins/contrib/ftemplate.mdwn new file mode 100644 index 000000000..bcc6f2c67 --- /dev/null +++ b/doc/plugins/contrib/ftemplate.mdwn @@ -0,0 +1,94 @@ +[[!template id=plugin name=ftemplate author="[[rubykat]]"]] +[[!tag type/meta type/format]] +[[!toc]] +## NAME + +IkiWiki::Plugin::ftemplate - field-aware structured template plugin + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff ftemplate ....}], + +## DESCRIPTION + +This plugin provides the **ftemplate** directive. This is like +the [[ikiwiki/directive/template]] directive, with the addition that one does not +have to provide all the values in the call to the template, +because ftemplate can query structured data ("fields") using +the [[field]] plugin. + +Templates are files that can be filled out and inserted into pages in +the wiki, by using the ftemplate directive. The directive has an id +parameter that identifies the template to use. + +Additional parameters can be used to fill out the template, in +addition to the "field" values. Passed-in values override the +"field" values. + +There are two places where template files can live. One is, as with the +[[plugins/template]] plugin, in the /templates directory on the wiki. These +templates are wiki pages, and can be edited from the web like other wiki +pages. + +The second place where template files can live is in the global +templates directory (the same place where the page.tmpl template lives). +This is a useful place to put template files if you want to prevent +them being edited from the web, and you don't want to have to make +them work as wiki pages. + +### EXAMPLES + +#### Example 1 + +PageA: + + [[!meta title="I Am Page A"]] + [[!meta description="A is for Apple."]] + [[!meta author="Fred Nurk"]] + [[!ftemplate id="mytemplate"]] + +Template "mytemplate": + + # <TMPL_VAR NAME="TITLE"> + by <TMPL_VAR NAME="AUTHOR"> + + **Summary:** <TMPL_VAR NAME="DESCRIPTION"> + +This will give: + + <h1>I Am Page A</h1> + <p>by Fred Nurk</p> + <p><strong>Summary:</strong> A is for Apple. + +#### Example 2: Overriding values + +PageB: + + [[!meta title="I Am Page B"]] + [[!meta description="B is for Banana."]] + [[!meta author="Fred Nurk"]] + [[!ftemplate id="mytemplate" title="Bananananananas"]] + +This will give: + + <h1>Bananananananas</h1> + <p>by Fred Nurk</p> + <p><strong>Summary:</strong> B is for Banana. + +### LIMITATIONS + +One cannot query the values of fields on pages other than the current +page. + +## PREREQUISITES + + IkiWiki + IkiWiki::Plugin::field + HTML::Template + Encode + +## DOWNLOAD + +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/ftemplate.pm> +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From a3527672769b93eeb4a70fbe9f316c986706c375 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 02:37:27 +0000 Subject: fixed title --- doc/plugins/contrib/ftemplate.mdwn | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate.mdwn b/doc/plugins/contrib/ftemplate.mdwn index bcc6f2c67..fba51e1c2 100644 --- a/doc/plugins/contrib/ftemplate.mdwn +++ b/doc/plugins/contrib/ftemplate.mdwn @@ -43,10 +43,10 @@ them work as wiki pages. PageA: - [[!meta title="I Am Page A"]] - [[!meta description="A is for Apple."]] - [[!meta author="Fred Nurk"]] - [[!ftemplate id="mytemplate"]] + \[[!meta title="I Am Page A"]] + \[[!meta description="A is for Apple."]] + \[[!meta author="Fred Nurk"]] + \[[!ftemplate id="mytemplate"]] Template "mytemplate": @@ -65,10 +65,10 @@ This will give: PageB: - [[!meta title="I Am Page B"]] - [[!meta description="B is for Banana."]] - [[!meta author="Fred Nurk"]] - [[!ftemplate id="mytemplate" title="Bananananananas"]] + \[[!meta title="I Am Page B"]] + \[[!meta description="B is for Banana."]] + \[[!meta author="Fred Nurk"]] + \[[!ftemplate id="mytemplate" title="Bananananananas"]] This will give: -- cgit v1.2.3 From 2cbf60a431d41b3cb0767f1c0fb1ecf50103bcb0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 02:38:33 +0000 Subject: correcting link --- doc/plugins/contrib/getfield.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index ed03dc439..5e6b01113 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -81,5 +81,5 @@ page or the destination page. ## DOWNLOAD -* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/field.pm> +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/getfield.pm> * git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From 39e1524e9e12e538b439310a20325064657f5979 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 02:45:44 +0000 Subject: more progress on this approach --- doc/forum/an_alternative_approach_to_structured_data.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn index fb007f7e9..eb6ee4445 100644 --- a/doc/forum/an_alternative_approach_to_structured_data.mdwn +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -1,3 +1,5 @@ +## First Pass + Looking at the discussion about [[todo/structured_page_data]], it looks a bit like folks are bogged down in figuring out what *markup* to use for structured page data, something I doubt that people will really agree on. And thus, little progress is made. I propose that, rather than worry about what the data looks like, that we take a similar approach @@ -15,3 +17,13 @@ I think it could be really powerful and useful, especially if it becomes part of --[[KathrynAndersen]] > It looks like an interesting idea. I don't have time right now to look at it in depth, but it looks interesting. -- [[Will]] + +## Second Pass + +I have written additional plugins which integrate with the [[plugins/contrib/field]] plugin to both set and get structured page data. + +* [[plugins/contrib/getfield]] - query field values inside a page using {{$*fieldname*}} markup +* [[plugins/contrib/ftemplate]] - like [[plugins/template]] but uses "field" data as well as passed-in data +* [[plugins/contrib/ymlfront]] - looks for YAML-format data at the front of a page; this is just one possible back-end for the structured data + +--[[KathrynAndersen]] -- cgit v1.2.3 From f90827f29bc1682bf3682375972f5cc836049dc7 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 13 Jan 2010 02:47:59 +0000 Subject: this is sort of format too --- doc/plugins/contrib/getfield.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index 5e6b01113..302569f4b 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=getfield author="[[rubykat]]"]] -[[!tag type/meta]] +[[!tag type/meta type/format]] [[!toc]] ## NAME -- cgit v1.2.3 From f2b8f358652e76e4047f4e304870e25cac51b681 Mon Sep 17 00:00:00 2001 From: parade <parade@web> Date: Thu, 14 Jan 2010 14:25:56 +0000 Subject: --- doc/index.mdwn | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 732cf7a89..13e7564ea 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1,28 +1 @@ -Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages -suitable for publishing on a website. Ikiwiki stores pages and history in a -[[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. -There are many other [[features]], including support for -[[blogging|blog]], as well as a large array of [[plugins]]. - -[[!template id=links]] - -## using ikiwiki - -[[Setup]] has a tutorial for setting up ikiwiki, or you can read the -[[man_page|usage]]. There are some [[examples]] of things you can do -with ikiwiki, and some [[tips]]. - -All wikis are supposed to have a [[SandBox]], so this one does too. - -This site generally runs the latest release of ikiwiki; currently, it runs -ikiwiki [[!version ]]. - -## developer resources - -The [[RoadMap]] describes where the project is going. -The [[forum]] is open for discussions. -[[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] -can be submitted and tracked using this wiki. - -ikiwiki is developed by [[Joey]] and many contributors, -and is [[FreeSoftware]]. +o -- cgit v1.2.3 From b3036541674cc90b1c48203244dd711e399ce9d7 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@schwinge.name> Date: Thu, 14 Jan 2010 16:29:09 +0100 Subject: Restore page. This reverts commit f2b8f358652e76e4047f4e304870e25cac51b681. --- doc/index.mdwn | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 13e7564ea..732cf7a89 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -1 +1,28 @@ -o +Ikiwiki is a **wiki compiler**. It converts wiki pages into HTML pages +suitable for publishing on a website. Ikiwiki stores pages and history in a +[[revision_control_system|rcs]] such as [[Subversion|rcs/svn]] or [[rcs/Git]]. +There are many other [[features]], including support for +[[blogging|blog]], as well as a large array of [[plugins]]. + +[[!template id=links]] + +## using ikiwiki + +[[Setup]] has a tutorial for setting up ikiwiki, or you can read the +[[man_page|usage]]. There are some [[examples]] of things you can do +with ikiwiki, and some [[tips]]. + +All wikis are supposed to have a [[SandBox]], so this one does too. + +This site generally runs the latest release of ikiwiki; currently, it runs +ikiwiki [[!version ]]. + +## developer resources + +The [[RoadMap]] describes where the project is going. +The [[forum]] is open for discussions. +[[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] +can be submitted and tracked using this wiki. + +ikiwiki is developed by [[Joey]] and many contributors, +and is [[FreeSoftware]]. -- cgit v1.2.3 From 4f25d90ebc2d3ff2ad7a5d7bd8578a6c4d673aa8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 14 Jan 2010 18:56:05 -0500 Subject: mention that lighttpd does support this. Example needed. --- doc/plugins/po.mdwn | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f3b70b5f7..da85636ec 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -129,11 +129,10 @@ For details, see [Apache's documentation](http://httpd.apache.org/docs/2.2/conte lighttpd -------- -lighttpd unfortunately does not support content negotiation. - -**FIXME**: does `mod_magnet` provide the functionality needed to - emulate this? +Recent versions of lighttpd should be able to use +`$HTTP["language"]` to configure the translatted pages to be served. +TODO: Example Usage ===== -- cgit v1.2.3 From 65db2f47acfe5815952bb0bfbdbe15b5cf5ce7be Mon Sep 17 00:00:00 2001 From: Spida <Spida@web> Date: Fri, 15 Jan 2010 00:15:33 +0000 Subject: --- doc/plugins/po.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index da85636ec..576d36ec1 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -132,6 +132,8 @@ lighttpd Recent versions of lighttpd should be able to use `$HTTP["language"]` to configure the translatted pages to be served. +See [Lighttpd Issue](http://redmine.lighttpd.net/issues/show/1119) + TODO: Example Usage -- cgit v1.2.3 From a1138ae820d3ea121cbd28552a3300631179b0a5 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sat, 16 Jan 2010 05:19:42 +0000 Subject: the pod bold thingy didn't work, making it a markdown one --- doc/plugins/contrib/getfield.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index 302569f4b..929f70485 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -18,7 +18,7 @@ use per-page structured data, where each page is treated like a record, and the structured data are fields in that record. This can include the meta-data for that page, such as the page title. -This plugin is meant to be used in conjunction with the B<field> plugin. +This plugin is meant to be used in conjunction with the **field** plugin. ### USAGE -- cgit v1.2.3 From 353f722dc439a14d7e74dab9ca2818f955ff4d41 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sat, 16 Jan 2010 05:29:53 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/plugins/contrib/getfield/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn new file mode 100644 index 000000000..61b9f5378 --- /dev/null +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -0,0 +1,3 @@ +## Templating, and other uses + +Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If it can be made to work anywhere, or from a specific place in the wiki - configurable, possibly - you'll have something very similar to mediawiki's templates. I can already think of a few uses for this combined with [[template]] ;) . --[[SR|users/simonraven]] -- cgit v1.2.3 From 3b2772967fdb125bb8160f968729681b7af13269 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sat, 16 Jan 2010 08:08:46 +0000 Subject: responded to discussion --- doc/plugins/contrib/getfield/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 61b9f5378..78462197a 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -1,3 +1,12 @@ ## Templating, and other uses Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If it can be made to work anywhere, or from a specific place in the wiki - configurable, possibly - you'll have something very similar to mediawiki's templates. I can already think of a few uses for this combined with [[template]] ;) . --[[SR|users/simonraven]] + +> Yes, I mentioned "only current page" in the "LIMITATIONS" section. + +> What do you think would be a good syntax for querying other pages? +> It needs to resolve to a single page, though I guess using "bestlink" to find the closest page would mean that one didn't have to spell out the whole page. + +> I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. + +> -- [[users/KathrynAndersen]] -- cgit v1.2.3 From e3a09318a0686a7e3d01206f56ca6019c3c198e0 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sat, 16 Jan 2010 08:42:56 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 78462197a..f3c844e94 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -7,6 +7,10 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i > What do you think would be a good syntax for querying other pages? > It needs to resolve to a single page, though I guess using "bestlink" to find the closest page would mean that one didn't have to spell out the whole page. +>> I don't know the internals very well, I think that's how other plugins do it. *goes to check* Usually it's a `foreach` loop, and use a `pagestate{foo}` to check the page's status/state. There's also some stuff like 'pagespec_match_list($params{page}` ... they do slightly different thing depending on need. --[[SR|users/simonraven]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] + +>> Ooh, sounds nice :) . --[[SR|users/simonraven]] -- cgit v1.2.3 From 354468d280354234d9c8c91333534c9784f427cf Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sun, 17 Jan 2010 00:10:55 +0000 Subject: respond: markup, not internals --- doc/plugins/contrib/getfield/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index f3c844e94..37d65d851 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -9,6 +9,11 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >> I don't know the internals very well, I think that's how other plugins do it. *goes to check* Usually it's a `foreach` loop, and use a `pagestate{foo}` to check the page's status/state. There's also some stuff like 'pagespec_match_list($params{page}` ... they do slightly different thing depending on need. --[[SR|users/simonraven]] +>>> No, I meant what markup I should use; the actual implementation probably wouldn't be too difficult. + +>>> The current markup is {{$*fieldname*}}; what you're wanting, perhaps it should be represented like {{$*pagename*:*fieldname*}}, or {{$*pagename*::*fieldname*}} or something else... +>>> -- [[KathrynAndersen]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] -- cgit v1.2.3 From 1ddef7da7b170bb4bd7c816cba03e3e6338a50b2 Mon Sep 17 00:00:00 2001 From: "http://edrex.myopenid.com/" <http://edrex.myopenid.com/@web> Date: Sun, 17 Jan 2010 07:22:03 +0000 Subject: --- doc/todo/svg.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/todo/svg.mdwn b/doc/todo/svg.mdwn index 0a15af4cd..f264f4107 100644 --- a/doc/todo/svg.mdwn +++ b/doc/todo/svg.mdwn @@ -3,6 +3,7 @@ We should support SVG. In particular: * We could support rendering SVGs to PNGs when compiling the wiki. Not all browsers support SVG yet. * We could support editing SVGs via the web interface. SVG can contain unsafe content such as scripting, so we would need to whitelist safe markup. + * I am interested in seeing [svg-edit](http://code.google.com/p/svg-edit/) integrated --[EricDrechsel]] --[[JoshTriplett]] -- cgit v1.2.3 From 5588abc2befbde83e43cf79f9717e323aa69da11 Mon Sep 17 00:00:00 2001 From: "http://edrex.myopenid.com/" <http://edrex.myopenid.com/@web> Date: Sun, 17 Jan 2010 07:22:54 +0000 Subject: --- doc/todo/svg.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/svg.mdwn b/doc/todo/svg.mdwn index f264f4107..89b183db6 100644 --- a/doc/todo/svg.mdwn +++ b/doc/todo/svg.mdwn @@ -3,7 +3,7 @@ We should support SVG. In particular: * We could support rendering SVGs to PNGs when compiling the wiki. Not all browsers support SVG yet. * We could support editing SVGs via the web interface. SVG can contain unsafe content such as scripting, so we would need to whitelist safe markup. - * I am interested in seeing [svg-edit](http://code.google.com/p/svg-edit/) integrated --[EricDrechsel]] + * I am interested in seeing [svg-edit](http://code.google.com/p/svg-edit/) integrated -- [[EricDrechsel]] --[[JoshTriplett]] -- cgit v1.2.3 From d652bf3ddf33505b540b46e6916d8a36cdeacc08 Mon Sep 17 00:00:00 2001 From: "http://edrex.myopenid.com/" <http://edrex.myopenid.com/@web> Date: Sun, 17 Jan 2010 07:24:31 +0000 Subject: --- doc/users/ericdrechsel.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/ericdrechsel.mdwn (limited to 'doc') diff --git a/doc/users/ericdrechsel.mdwn b/doc/users/ericdrechsel.mdwn new file mode 100644 index 000000000..2efb7039c --- /dev/null +++ b/doc/users/ericdrechsel.mdwn @@ -0,0 +1 @@ +[My homewiki profile](http://wiki.shared.dre.am/people/eric/) -- cgit v1.2.3 From b3363aa89f840fd42b8a621b011326ef41b73513 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sun, 17 Jan 2010 09:28:07 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 37d65d851..9f1337046 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -14,6 +14,8 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>> The current markup is {{$*fieldname*}}; what you're wanting, perhaps it should be represented like {{$*pagename*:*fieldname*}}, or {{$*pagename*::*fieldname*}} or something else... >>> -- [[KathrynAndersen]] +>>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning is less clear that way, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] -- cgit v1.2.3 From 2137d1f68c694af6135d0d84b59bbfbcffe36669 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sun, 17 Jan 2010 09:31:07 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 9f1337046..42338a3c7 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -14,7 +14,7 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>> The current markup is {{$*fieldname*}}; what you're wanting, perhaps it should be represented like {{$*pagename*:*fieldname*}}, or {{$*pagename*::*fieldname*}} or something else... >>> -- [[KathrynAndersen]] ->>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning is less clear that way, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. +>>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning of the separator is less clear with /, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. [[SR|users/simonraven]] > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. -- cgit v1.2.3 From fc7a047a474cc19cc24a5a7d7119ef6f32f395b6 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Sun, 17 Jan 2010 09:55:07 +0000 Subject: --- doc/users/Oblomov.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/Oblomov.mdwn (limited to 'doc') diff --git a/doc/users/Oblomov.mdwn b/doc/users/Oblomov.mdwn new file mode 100644 index 000000000..be6e666cb --- /dev/null +++ b/doc/users/Oblomov.mdwn @@ -0,0 +1 @@ +Getting started with Ikiwiki, like the git backend a lot, would like to see a dynamic version of it. -- cgit v1.2.3 From fa0bbaab21a456f8115d9af508fef06443b8d275 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Sun, 17 Jan 2010 09:56:26 +0000 Subject: Suggest # as page-field separator --- doc/plugins/contrib/getfield/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 42338a3c7..900ca65b2 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -16,6 +16,9 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning of the separator is less clear with /, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. [[SR|users/simonraven]] +>>>>> What about using {{pagename#fieldname}}? The meaning of the hash in URLs sort of fits with what is needed here (reference to a 'named' thing within the page) and it won't conflict with actual hash usages (unless we expect different named parts of pages to define different values for the same field ...) +>>>>> -- [[Oblomov]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] -- cgit v1.2.3 From 9c0c8b57fb9ccaf21888a7eb9e93dc0d312773e0 Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sun, 17 Jan 2010 17:27:51 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 900ca65b2..ce6246034 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -18,6 +18,8 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>>>> What about using {{pagename#fieldname}}? The meaning of the hash in URLs sort of fits with what is needed here (reference to a 'named' thing within the page) and it won't conflict with actual hash usages (unless we expect different named parts of pages to define different values for the same field ...) >>>>> -- [[Oblomov]] +>>>>>> That's a good one too. --[[simonraven]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. -- cgit v1.2.3 From f072f3a9c57bc590b4fb754a7cf65b5f93684006 Mon Sep 17 00:00:00 2001 From: "http://apoca.myopenid.com/" <http://apoca.myopenid.com/@web> Date: Mon, 18 Jan 2010 17:25:13 +0000 Subject: --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/bugs/removing_pages_with_utf8_characters.mdwn (limited to 'doc') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn new file mode 100644 index 000000000..a962a328a --- /dev/null +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -0,0 +1,18 @@ +I have a page with the name "umläute". When I try to remove it, ikiwiki says: + +Error: ?umläute does not exist + +I wrote the following patch, which seems to work on my machine. I'm running on FreeBSD 6.3-RELEASE with ikiwiki-3.20100102.3 and perl-5.8.9_3. + + --- remove.pm.orig 2009-12-14 23:26:20.000000000 +0100 + +++ remove.pm 2010-01-18 17:49:39.000000000 +0100 + @@ -193,6 +193,7 @@ + # and that the user is allowed to edit(/remove) it. + my @files; + foreach my $page (@pages) { + + $page = Encode::decode_utf8($page); + check_canremove($page, $q, $session); + + # This untaint is safe because of the + + -- cgit v1.2.3 From 265b4f0576d5e6be61d80239db372430c52f31b7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 18 Jan 2010 12:38:05 -0500 Subject: response --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn index a962a328a..77ec00575 100644 --- a/doc/bugs/removing_pages_with_utf8_characters.mdwn +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -2,6 +2,10 @@ I have a page with the name "umläute". When I try to remove it, ikiwiki says: Error: ?umläute does not exist +> I'm curious about the '?' in the "?umläute" message. Suggests that the +> filename starts with another strange character. Can I get a copy of a +> git repository or tarball containing this file? --[[Joey]] + I wrote the following patch, which seems to work on my machine. I'm running on FreeBSD 6.3-RELEASE with ikiwiki-3.20100102.3 and perl-5.8.9_3. --- remove.pm.orig 2009-12-14 23:26:20.000000000 +0100 @@ -16,3 +20,9 @@ I wrote the following patch, which seems to work on my machine. I'm running on F # This untaint is safe because of the +> The problem with this patch is that, in a recent fix to the same +> plugin, I made `@pages` come from `$form->field("page")`, and +> that, in turn is already run through `decode_form_utf8` just above the +> code you patched. So I need to understand why that is apparently not +> working for you. (It works fine for me, even when deleting a file named +> "umläute" --[[Joey]] -- cgit v1.2.3 From be523e7740339d7884dabfa915c7c2df8c60bf27 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Mon, 18 Jan 2010 19:13:00 +0000 Subject: response --- doc/bugs/anonok_vs._httpauth.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index e386a8d96..0a62164cb 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -54,3 +54,7 @@ and a whitelist of OpenIDs in `locked_pages`...) >>>>>> change. And then the Edit link for Discussion subpages could do >>>>>> as you suggest, adding one click for the httpauth user, who won't >>>>>> often need to edit those subpages. --[[schmonz]] + +>> On reflection, I've stopped being bothered by the +>> redirect-to-signin-page approach. (It only needs to happen once per +>> browser session, anyway.) Can we try that? --[[schmonz]] -- cgit v1.2.3 From 4a8389825ae0715ba68846881ddc8d25b3f9ccb8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 18 Jan 2010 18:00:10 -0500 Subject: update --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn index 77ec00575..2fa4efa8b 100644 --- a/doc/bugs/removing_pages_with_utf8_characters.mdwn +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -26,3 +26,24 @@ I wrote the following patch, which seems to work on my machine. I'm running on F > code you patched. So I need to understand why that is apparently not > working for you. (It works fine for me, even when deleting a file named > "umläute" --[[Joey]] + +---- + +> Update, having looked at the file in the src of the wiki that +> is causing trouble for remove, it is: `uml\303\203\302\244ute.mdwn` +> And that is not utf-8 encoded, which, represented the same +> would be: `uml\303\244ute.mdwn` +> +> I think it's doubly-utf-8 encoded, which perhaps explains why the above +> patch works around the problem (since the page name gets doubly-decoded +> with it). The patch doesn't fix related problems when using remove, etc. +> +> Apparently, on apoca's system, perl encodes filenames differently +> depending on locale settings. On mine, it does not. Ie, this perl +> program always creates a file named `uml\303\244ute`, no matter +> whether I run it with LANG="" or LANG="en_US.UTF-8": +> +> perl -e 'use IkiWiki; writefile("umläute", "./", "baz")' +> +> Remains to be seen if this is due to the older version of perl used +> there, or perhaps FreeBSD itself. --[[Joey]] -- cgit v1.2.3 From 30c5f62f741b8be4677b46b19a6c7ccb5963e101 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 18 Jan 2010 20:41:12 -0500 Subject: update --- doc/bugs/removing_pages_with_utf8_characters.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/removing_pages_with_utf8_characters.mdwn b/doc/bugs/removing_pages_with_utf8_characters.mdwn index 2fa4efa8b..0d96aa75f 100644 --- a/doc/bugs/removing_pages_with_utf8_characters.mdwn +++ b/doc/bugs/removing_pages_with_utf8_characters.mdwn @@ -47,3 +47,5 @@ I wrote the following patch, which seems to work on my machine. I'm running on F > > Remains to be seen if this is due to the older version of perl used > there, or perhaps FreeBSD itself. --[[Joey]] +> +> Update: Perl 5.10 fixed the problem. --[[Joey]] -- cgit v1.2.3 From 2e585ec001e5b593b14307f7a871e48891c606df Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 22 Jan 2010 07:36:24 +0000 Subject: query, help! --- ...e_than_one_dest_page_from_same_source_page.mdwn | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn (limited to 'doc') diff --git a/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn new file mode 100644 index 000000000..db7b49ae4 --- /dev/null +++ b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn @@ -0,0 +1,23 @@ +Is it possible to render more than one destination page from the same source page? +That is, same source, slightly different presentation at the other end, needing a different output file. + +I have two problems that would be solved by being able to do this. + +1. "full" and "print" versions of a page. + +One has a page "foo", which is rendered into foo.html. +One also wants a foo-print.html page, which uses "page-print.tmpl" rather than "page.tmpl" as its template. + +I want to do this for every page on the site, automatically, so it isn't feasible to do it by hand. + +2. "en" and "en-us" versions of a page. + +My site is in non-US English. However, I want US-English people to find my site when they search for it when they use US spelling on certain search terms (such as "optimise" versus "optimize"). This requires a (crude) US-English version of the site where the spellings are changed automatically, and the LANG is "en-us" rather than "en". (No, don't tell me to use keywords; Google ignores keywords and has for a number of years). + +So I want the page "foo" to render to "foo.en.html" and "foo.en-us.html" where the content is the same, just some automated word-substitution applied before foo.en-us.html is written. And do this for every page on the site. + +I can't do this with the "po" plugin, as it considers "en-us" not to be a valid language. And the "po" plugin is probably overkill for what I want anyway. + +But I'm not sure how to achieve the result I need. + +-- [[KathrynAndersen]] -- cgit v1.2.3 From f24ca627ddf147491dfc987c99b7fda9d5a63f95 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 22 Jan 2010 07:38:12 +0000 Subject: formatting --- doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn index db7b49ae4..73375938c 100644 --- a/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn +++ b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn @@ -3,14 +3,16 @@ That is, same source, slightly different presentation at the other end, needing I have two problems that would be solved by being able to do this. -1. "full" and "print" versions of a page. +[[!toc startlevel=2]] + +##"full" and "print" versions of a page. One has a page "foo", which is rendered into foo.html. One also wants a foo-print.html page, which uses "page-print.tmpl" rather than "page.tmpl" as its template. I want to do this for every page on the site, automatically, so it isn't feasible to do it by hand. -2. "en" and "en-us" versions of a page. +##"en" and "en-us" versions of a page. My site is in non-US English. However, I want US-English people to find my site when they search for it when they use US spelling on certain search terms (such as "optimise" versus "optimize"). This requires a (crude) US-English version of the site where the spellings are changed automatically, and the LANG is "en-us" rather than "en". (No, don't tell me to use keywords; Google ignores keywords and has for a number of years). -- cgit v1.2.3 From d264164673fd64f2e15bd14fa8179d182afd03d7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 22 Jan 2010 15:54:00 -0500 Subject: response --- ...ore_than_one_dest_page_from_same_source_page.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn index 73375938c..e88c23b07 100644 --- a/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn +++ b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn @@ -1,6 +1,17 @@ Is it possible to render more than one destination page from the same source page? That is, same source, slightly different presentation at the other end, needing a different output file. +> It's possible to render more than one output _file_ from a given source +> page. See, for example, the inline plugin's generation of rss files. +> This is done by calling `will_render()` and using `writefile()` to +> generate the additional files. Probably in a format hook if you want +> to generate html files. +> +> It's not possible for one source file to represent multiple wiki pages. +> There is a 1:1 mapping between source filenames and page names. The +> difference between wiki pages and output files is that you can use +> wikilinks to link to wiki pages, etc. --[[Joey]] + I have two problems that would be solved by being able to do this. [[!toc startlevel=2]] @@ -12,6 +23,12 @@ One also wants a foo-print.html page, which uses "page-print.tmpl" rather than " I want to do this for every page on the site, automatically, so it isn't feasible to do it by hand. +> Did you know that ikiwiki's `style.css` arranges for pages to display +> differently when printed out? Things like the Action bar are hidden in +> printouts (search for `@media print`). So I don't see a reason to need +> whole files for printing when you can use these style sheet tricks. +> --[[Joey]] + ##"en" and "en-us" versions of a page. My site is in non-US English. However, I want US-English people to find my site when they search for it when they use US spelling on certain search terms (such as "optimise" versus "optimize"). This requires a (crude) US-English version of the site where the spellings are changed automatically, and the LANG is "en-us" rather than "en". (No, don't tell me to use keywords; Google ignores keywords and has for a number of years). @@ -23,3 +40,6 @@ I can't do this with the "po" plugin, as it considers "en-us" not to be a valid But I'm not sure how to achieve the result I need. -- [[KathrynAndersen]] + +> Sounds like this could be considered a single page that generates two +> html files, so could be handled per above. --[[Joey]] -- cgit v1.2.3 From 450f8b78b87e18374a0c0f4d7461ed29a4d8cdcb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 22 Jan 2010 16:26:31 -0500 Subject: add news item for ikiwiki 3.20100122 --- doc/news/version_3.20091031.mdwn | 13 ------------- doc/news/version_3.20100122.mdwn | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 doc/news/version_3.20091031.mdwn create mode 100644 doc/news/version_3.20100122.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091031.mdwn b/doc/news/version_3.20091031.mdwn deleted file mode 100644 index bb77bfa31..000000000 --- a/doc/news/version_3.20091031.mdwn +++ /dev/null @@ -1,13 +0,0 @@ -ikiwiki 3.20091031 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * po: Fix breakage caused by changes to render code. - * mdwn: Avoid trying to use multimarkdown if it is not installed. - * moderatedcomments: New plugin to allow comment moderation w/o relying - on blogspam.net. - * When redirecting to a page, ie, after editing, ensure that the - url is uri-encoded. Most browsers other than MSIE don't care, but it's - the right thing to do. - * Add a spec file to allow building rpm from the source package. - * google: Pass the whole wiki url to google, not just the domain, - so that search works correctly for wikis that are located in - subdirectories of domains."""]] \ No newline at end of file diff --git a/doc/news/version_3.20100122.mdwn b/doc/news/version_3.20100122.mdwn new file mode 100644 index 000000000..11051fad8 --- /dev/null +++ b/doc/news/version_3.20100122.mdwn @@ -0,0 +1,15 @@ +ikiwiki 3.20100122 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * inline: Avoid showing edit links if page editing is disabled. + (Sjoerd) + * signinedit: Auto-disable the plugin when all authentication methods + are disabled. + * comments: Fix permalinks for comments using new conflict-free filenames. + * img: Support alignment of images with captions. (Giuseppe Bilotta) + * websetup: Fix utf-8 problems. + * websetup: Fix bug in array change detection. + * linkmap: Simplify and improve browser compatibility by using an img, + not object tag. + * git: The new git-notes feature in git 1.6.6 changes git log output + in a way that broke ikiwiki's parser if notes are added to commits. + * po: Avoid crash when a page is empty."""]] \ No newline at end of file -- cgit v1.2.3 From 6c5f9b914a067056e1d42921e639515507b34302 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Fri, 22 Jan 2010 22:46:31 +0000 Subject: new forum thread - file navigation --- ...of_wiki_pages_on_local_filesystem_with_vim.mdwn | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn new file mode 100644 index 000000000..1f67a041d --- /dev/null +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -0,0 +1,72 @@ +I wrote a vim function to help me navigate the wiki when I'm editing it. It extends the 'gf' (goto file) functionality. Once installed, you place the cursor on a wiki page name and press 'gf' (without the quotes); if the file exists, it gets loaded. + +This function takes into account the ikiwiki linking rules when deciding which file to go to. + +let me know what you think + +To enable this functionality, paste the code below in your `.vim/ftplugin/ikiwiki.vim` file + + " returns the directory which can be considered the root of the wiki the + " current buffer belongs to, or an empty string if we are not inside an + " ikiwiki wiki + " + " NOTE: the root of the wiki is considered the first directory that contains a + " .ikiwiki folder, except $HOME/.ikiwiki (the usual ikiwiki libdir) + " + " if you can think of a better heuristic to get ikiwiki's root, let me know! + function! GetWikiRootDir() + let check_str = '%:p:h' + let pos_wiki_root = expand(check_str) + while pos_wiki_root != '/' + if isdirectory(pos_wiki_root . '/.ikiwiki') && pos_wiki_root != $HOME + return pos_wiki_root + endif + let check_str = check_str . ':h' + let pos_wiki_root = expand(check_str) + endwhile + if isdirectory('/.ikiwiki') + return '/' + endif + return '' + endfunction + + " This function searches for a .mdwn file (<a:name>.mdwn) using the ikiwiki + " WikiLink rules and returns its full path. + " + " The rules are the following + " + " if the filename starts with '/', use as base dir the root directory of the + " wiki + " + " if not: + " + " try first ./<bufname>/<a:name>.mdwn + " then for ./<a:name>.mdwn + " then for <root_of_wiki>/<a:name>.mdwn + " + " return the first one that exists + " + " the base path (. above) is the directory that contains the current buffer + " + function! FileForWikiLink(name) + let target_fname=a:name . ".mdwn" + let wikiroot_dir = GetWikiRootDir() + if match(target_fname, '^/') >= 0 + return wikiroot_dir . target_fname + endif + let subdir_file = expand('%:p:r') . "/" . target_fname + let currdir_file = expand('%:p:h') . "/" . target_fname + let wikiroot_file = wikiroot_dir . "/" . target_fname + if filewritable(subdir_file) + return subdir_file + endif + if filewritable(currdir_file) + return currdir_file + endif + if filewritable(wikiroot_file) + return wikiroot_file + endif + return a:name + endfunction + + setlocal includeexpr=FileForWikiLink(v:fname) -- cgit v1.2.3 From cefcf60843968389ad85c232ecbf38dff19a4b67 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 22 Jan 2010 23:24:20 +0000 Subject: --- .../Render_more_than_one_dest_page_from_same_source_page.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn index e88c23b07..e7362c903 100644 --- a/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn +++ b/doc/forum/Render_more_than_one_dest_page_from_same_source_page.mdwn @@ -6,7 +6,9 @@ That is, same source, slightly different presentation at the other end, needing > This is done by calling `will_render()` and using `writefile()` to > generate the additional files. Probably in a format hook if you want > to generate html files. -> + +>> Thanks for the tip, I'll take a look at that. -- [[KathrynAndersen]] + > It's not possible for one source file to represent multiple wiki pages. > There is a 1:1 mapping between source filenames and page names. The > difference between wiki pages and output files is that you can use @@ -29,6 +31,8 @@ I want to do this for every page on the site, automatically, so it isn't feasibl > whole files for printing when you can use these style sheet tricks. > --[[Joey]] +>>Fair enough. --[[KathrynAndersen]] + ##"en" and "en-us" versions of a page. My site is in non-US English. However, I want US-English people to find my site when they search for it when they use US spelling on certain search terms (such as "optimise" versus "optimize"). This requires a (crude) US-English version of the site where the spellings are changed automatically, and the LANG is "en-us" rather than "en". (No, don't tell me to use keywords; Google ignores keywords and has for a number of years). @@ -43,3 +47,5 @@ But I'm not sure how to achieve the result I need. > Sounds like this could be considered a single page that generates two > html files, so could be handled per above. --[[Joey]] + +>>Thanks! --[[KathrynAndersen]] -- cgit v1.2.3 From b3b2402647e1628cea76922f5a6dc12adaa5a2b7 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 22 Jan 2010 23:36:17 +0000 Subject: discovered a wrinkle --- .../discussion.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn new file mode 100644 index 000000000..183a8ef55 --- /dev/null +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn @@ -0,0 +1,10 @@ + " NOTE: the root of the wiki is considered the first directory that contains a + " .ikiwiki folder, except $HOME/.ikiwiki (the usual ikiwiki libdir) + +That's not going to work in all situations; for example, with an ikiwiki which uses git as the backend, the normal setup is that one has + +* a bare git repository +* a git repository which ikiwiki builds the wiki from (which has a .ikiwiki directory in it) +* an *additional* git repository cloned from the bare repository, which is used for making changes from the command-line rather than the web. It is this repository in which one would be editing files with vim, and *this* repository does not have a .ikiwiki directory in it. It does have a .git directory in the root, however, so I suppose you could use that as a method of detection of a root directory, but of course that would only work for git repositories. + +-- [[KathrynAndersen]] -- cgit v1.2.3 From d0a06e6952f13a9a0c7d2959e393f700ee66c192 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Sat, 23 Jan 2010 16:37:42 +0000 Subject: update about wiki page navigation --- .../navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 1f67a041d..9545fda53 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -2,6 +2,14 @@ I wrote a vim function to help me navigate the wiki when I'm editing it. It exte This function takes into account the ikiwiki linking rules when deciding which file to go to. +> 'gf' gets in the way when there are directories with the same name of a wiki page. The +> function below doesn't implement the linking rules properly (test the link (ignoring case), +> if there is no match ascend the dir. hierarchy and start over, until we reach the root of +> the wiki). I'm rewriting it to follow these rules properly +> +> I think the page for [[LinkingRules|ikiwiki/subpage/linkingrules]] should say that ikiwiki **ascends** +> the dir. hierarchy when looking for a wikilink, not that it **descends** it. Am I correct? --[[jerojasro]] + let me know what you think To enable this functionality, paste the code below in your `.vim/ftplugin/ikiwiki.vim` file -- cgit v1.2.3 From 5456f720cd6fca6c5d8ec2d7da3dd745799ea26c Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/gsvick" <http://www.google.com/profiles/gsvick@web> Date: Sat, 23 Jan 2010 19:03:32 +0000 Subject: --- doc/forum/Error:_bad_page_name.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/forum/Error:_bad_page_name.mdwn (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn new file mode 100644 index 000000000..59974ca00 --- /dev/null +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -0,0 +1,5 @@ +I'm trying to use ikiwiki for the first time. In the start, I had problems with installing the package, because I don't have a root account on my server. + +When I solved this, I finally set up my wiki, but whenever I try to edit a page, I get an error: “Error: bad page name”. + +What am I doing wrong? The wiki is at <http://atrey.karlin.mff.cuni.cz/~onderka/wiki/>, the setupfile I used at <http://atrey.karlin.mff.cuni.cz/~onderka/wiki/ikiwiki.setup>. -- cgit v1.2.3 From 8b2977ea7a78556ace2e14a5d30b48e455e37ad0 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 23 Jan 2010 14:14:34 -0500 Subject: response --- doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 9545fda53..14f592fd7 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -10,6 +10,9 @@ This function takes into account the ikiwiki linking rules when deciding which f > I think the page for [[LinkingRules|ikiwiki/subpage/linkingrules]] should say that ikiwiki **ascends** > the dir. hierarchy when looking for a wikilink, not that it **descends** it. Am I correct? --[[jerojasro]] +>> Conventionally, the root directory is considered to be lower than other +>> directories, so I think the current wording is correct. --[[Joey]] + let me know what you think To enable this functionality, paste the code below in your `.vim/ftplugin/ikiwiki.vim` file -- cgit v1.2.3 From dcc70ca629cf999b43bf32d38980df6381f8f282 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 23 Jan 2010 14:34:31 -0500 Subject: response --- doc/forum/Error:_bad_page_name.mdwn | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn index 59974ca00..a16decedb 100644 --- a/doc/forum/Error:_bad_page_name.mdwn +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -1,5 +1,21 @@ -I'm trying to use ikiwiki for the first time. In the start, I had problems with installing the package, because I don't have a root account on my server. +I'm trying to use ikiwiki for the first time. In the start, I had problems +with installing the package, because I don't have a root account on my +server. -When I solved this, I finally set up my wiki, but whenever I try to edit a page, I get an error: “Error: bad page name”. +When I solved this, I finally set up my wiki, but whenever I try to edit a +page, I get an error: “Error: bad page name”. -What am I doing wrong? The wiki is at <http://atrey.karlin.mff.cuni.cz/~onderka/wiki/>, the setupfile I used at <http://atrey.karlin.mff.cuni.cz/~onderka/wiki/ikiwiki.setup>. +What am I doing wrong? The wiki is at +<http://atrey.karlin.mff.cuni.cz/~onderka/wiki/>, the setupfile I used at +<http://atrey.karlin.mff.cuni.cz/~onderka/wiki/ikiwiki.setup>. + +> This means that one of the checks that ikiwiki uses to prevent +> editing files with strange or insecure names has fired incorrectly. +> Your setup file seems fine. +> We can figure out what is going wrong through a series of tests: +> +> * Test if your perl has a problem with matching alphanumerics: +> `perl -le 'print int "index"=~/^([-[:alnum:]+\/.:_]+)$/'` +> * Check if something is breaking pruning of disallowed files: +> `perl -le 'use IkiWiki; %config=IkiWiki::defaultconfig(); print ! IkiWiki::file_pruned("index")'` +> --[[Joey]] -- cgit v1.2.3 From a94039601a46c9679aa81ee01f6462f67652b114 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/gsvick" <http://www.google.com/profiles/gsvick@web> Date: Sat, 23 Jan 2010 19:55:06 +0000 Subject: --- doc/forum/Error:_bad_page_name.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn index a16decedb..17979fd13 100644 --- a/doc/forum/Error:_bad_page_name.mdwn +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -19,3 +19,10 @@ What am I doing wrong? The wiki is at > * Check if something is breaking pruning of disallowed files: > `perl -le 'use IkiWiki; %config=IkiWiki::defaultconfig(); print ! IkiWiki::file_pruned("index")'` > --[[Joey]] + +>>Both seem to run fine: + + onderka@atrey:~$ perl -le 'print int "index"=~/^([-[:alnum:]+\/.:_]+)$/' + 1 + onderka@atrey:~$ perl -le 'use IkiWiki; %config=IkiWiki::defaultconfig(); print ! IkiWiki::file_pruned("index")' + 1 -- cgit v1.2.3 From ce6432128253310dd65dea35a6f7f0a258eb621b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 23 Jan 2010 15:26:12 -0500 Subject: response --- doc/forum/Error:_bad_page_name.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn index 17979fd13..a1d6890a6 100644 --- a/doc/forum/Error:_bad_page_name.mdwn +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -26,3 +26,8 @@ What am I doing wrong? The wiki is at 1 onderka@atrey:~$ perl -le 'use IkiWiki; %config=IkiWiki::defaultconfig(); print ! IkiWiki::file_pruned("index")' 1 + +>>> Try installing this [instrumented +>>> version](http://kitenet.net/~joey/tmp/editpage.pm) of +>>> `IkiWiki/Plugin/editpage.pm`, which will add some debugging info +>>> to the error message. --[[Joey]] -- cgit v1.2.3 From c301ce26a4d5d58a6b57b22fc184a763b310b257 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/gsvick" <http://www.google.com/profiles/gsvick@web> Date: Sat, 23 Jan 2010 20:46:58 +0000 Subject: --- doc/forum/Error:_bad_page_name.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn index a1d6890a6..54fb83532 100644 --- a/doc/forum/Error:_bad_page_name.mdwn +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -31,3 +31,7 @@ What am I doing wrong? The wiki is at >>> version](http://kitenet.net/~joey/tmp/editpage.pm) of >>> `IkiWiki/Plugin/editpage.pm`, which will add some debugging info >>> to the error message. --[[Joey]] + +>>>>When I tried to `make` ikiwiki with this file, I got the error + + ../IkiWiki/Plugin/editpage.pm:101: invalid variable interpolation at "$" -- cgit v1.2.3 From 58eaf27137f57b9a58cec114280125a2c00357e9 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 23 Jan 2010 18:33:13 -0500 Subject: response --- doc/forum/Error:_bad_page_name.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn index 54fb83532..401815f7c 100644 --- a/doc/forum/Error:_bad_page_name.mdwn +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -35,3 +35,5 @@ What am I doing wrong? The wiki is at >>>>When I tried to `make` ikiwiki with this file, I got the error ../IkiWiki/Plugin/editpage.pm:101: invalid variable interpolation at "$" + +>>>>> Sorry about that, I've corrected the above file. --[[Joey]] -- cgit v1.2.3 From 5bcbb584134cf5a52dedd498a973691a2a45d10f Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/gsvick" <http://www.google.com/profiles/gsvick@web> Date: Sun, 24 Jan 2010 00:03:08 +0000 Subject: --- doc/forum/Error:_bad_page_name.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn index 401815f7c..23b5e7262 100644 --- a/doc/forum/Error:_bad_page_name.mdwn +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -37,3 +37,5 @@ What am I doing wrong? The wiki is at ../IkiWiki/Plugin/editpage.pm:101: invalid variable interpolation at "$" >>>>> Sorry about that, I've corrected the above file. --[[Joey]] + +>>>>>> Hmm, funny. Now that I reinstalled it with your changed file, it started working. I didn't remember how exactly did I install it the last time, so this time, it seems I did it correctly. Thank you very much for your help. -- cgit v1.2.3 From 4affa37f8b5fdc61e2e07cfb7c8190041a4ffa4e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 23 Jan 2010 21:13:29 -0500 Subject: response --- doc/forum/Error:_bad_page_name.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/forum/Error:_bad_page_name.mdwn b/doc/forum/Error:_bad_page_name.mdwn index 23b5e7262..70277a1e4 100644 --- a/doc/forum/Error:_bad_page_name.mdwn +++ b/doc/forum/Error:_bad_page_name.mdwn @@ -39,3 +39,8 @@ What am I doing wrong? The wiki is at >>>>> Sorry about that, I've corrected the above file. --[[Joey]] >>>>>> Hmm, funny. Now that I reinstalled it with your changed file, it started working. I didn't remember how exactly did I install it the last time, so this time, it seems I did it correctly. Thank you very much for your help. + +>>>>>>> Well, this makes me suspect you installed an older version of +>>>>>>> ikiwiki and my file, which is from the latest version, included a +>>>>>>> fix for whatever bug you were seeing. If I were you, I'd ensure +>>>>>>> that I have a current version of ikiwiki installed. --[[Joey]] -- cgit v1.2.3 From bcde9b74120d0572d41447d798917ae02134e059 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sun, 24 Jan 2010 02:52:57 +0000 Subject: new report plugin --- doc/plugins/contrib/report.mdwn | 166 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 doc/plugins/contrib/report.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/report.mdwn b/doc/plugins/contrib/report.mdwn new file mode 100644 index 000000000..7130bcb5f --- /dev/null +++ b/doc/plugins/contrib/report.mdwn @@ -0,0 +1,166 @@ +[[!template id=plugin name=report author="[[rubykat]]"]] +[[!tag type/meta type/format]] +[[!toc]] +## NAME + +IkiWiki::Plugin::report - Produce templated reports from page field data. + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff report ....}], + + \[[!report template="blog_summary" + pages="blog/*" + sort="mtime"]] + +## DESCRIPTION + +This plugin provides the **report** directive. This enables one to report on +the structured data ("field" values) of multiple pages; the output is formatted +via a template. This depends on the "field" plugin. + +The pages to report on are selected by a PageSpec given by the "pages" +parameter. The template is given by the "template" parameter. +The template expects the data from a single page; it is applied +to each matching page separately, one after the other. + +Additional parameters can be used to fill out the template, in +addition to the "field" values. Passed-in values override the +"field" values. + +There are two places where template files can live. One, as with the +[[plugins/template]] plugin, is in the /templates directory on the wiki. These +templates are wiki pages, and can be edited from the web like other wiki +pages. + +The second place where template files can live is in the global +templates directory (the same place where the page.tmpl template lives). +This is a useful place to put template files if you want to prevent +them being edited from the web, and you don't want to have to make +them work as wiki pages. + +## OPTIONS + +**template**: The template to use for the report. + +**pages**: A PageSpec to determine the pages to report on. + +**sort**: How the matching pages should be sorted. Sorting criteria are separated by spaces. + +The possible values for sorting are: + +* **page**: Sort by the full page ID. +* **pagename**: Sort by the base page name. +* **pagename_natural**: Sort by the base page name, using Sort::Naturally if it is installed. +* **mtime**: Sort by the page modification time. +* **age**: Sort by the page creation time, newest first. + +Any other value is taken to be a field name to sort by. +If a sort value begins with a minus (-) then the order for that field is reversed. + +### Headers + +An additional option is the "headers" option. This is a space-separated +list of field names which are to be used as headers in the report. This +is a way of getting around one of the limitations of HTML::Template, that +is, not being able to do tests such as +"if this-header is not equal to previous-header". + +Instead, that logic is performed inside the plugin. The template is +given parameters "HEADER1", "HEADER2" and so on, for each header. +If the value of a header field is the same as the previous value, +then HEADER**N** is set to be empty, but if the value of the header +field is new, then HEADER**N** is given that value. + +#### Example + +Suppose you're writing a blog in which you record "moods", and you +want to display your blog posts by mood. + + \[[!report template="mood_summary" + pages="blog/*" + sort="Mood Date title" + headers="Mood"]] + +The "mood_summary" template might be like this: + + <TMPL_IF NAME="HEADER1"> + ## <TMPL_VAR NAME="HEADER1"> + </TMPL_IF> + ### <TMPL_VAR NAME="TITLE"> + (<TMPL_VAR NAME="DATE">) \[[<TMPL_VAR NAME="PAGE"]] + <TMPL_VAR NAME="DESCRIPTION"> + +### Advanced Options + +The following options are used to improve efficiency when dealing +with large numbers of pages; most people probably won't need them. + +**trail**: + +A page or pages to use as a "trail" page. When a trail page is used, +the matching pages are limited to (a subset of) the pages which that +page links to; the "pages" pagespec in this case, rather than selecting +pages from the entire wiki, will select pages from within the set of pages +given by the trail page. + +**doscan**: + +Whether this report should be called in "scan" mode; if it is, then +the pages which match the pagespec are added to the list of links from +this page. This can be used by *another* report by setting this +page to be a "trail" page in *that* report. +It is not possible to use "trail" and "doscan" at the same time. +By default, "doscan" is false. + +## TEMPLATE PARAMETERS + +The templates are in HTML::Template format, just as [[plugins/template]] and +[[ftemplate]] are. The parameters passed in to the template are as follows: + +***fields***: + +The structured data from the current matching page. This includes +"title" and "description" if they are defined. + +***common values***: + +Values known for all pages: "page", "destpage". Also "basename" (the base name of the page). + +***passed-in values***: + +Any additional parameters to the report directive are passed to the +template; a parameter will override the matching "field" value. +For example, if you have a "Mood" field, and you pass Mood="bad" to +the report, then that will be the Mood which is given for the whole +report. + +Generally this is useful if one wishes to make a more generic +template and hide or show portions of it depending on what +values are passed in the report directive call. + +For example, one could have a "hide_mood" parameter which would hide +the "Mood" section of your template when it is true, which one could +use when the Mood is one of the headers. + +***headers***: + +See the section on Headers. + +***first and last***: + +If this is the first page-record in the report, then "first" is true. +If this is the last page-record in the report, then "last" is true. + +## PREREQUISITES + + IkiWiki + IkiWiki::Plugin::field + HTML::Template + Encode + +## DOWNLOAD + +* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/report.pm> +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From 27d2d7115df82908396d460d92857fd0990c556d Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sun, 24 Jan 2010 02:59:11 +0000 Subject: note that report is now released --- doc/plugins/contrib/getfield/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index ce6246034..015e9f5a1 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -26,3 +26,6 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i > -- [[users/KathrynAndersen]] >> Ooh, sounds nice :) . --[[SR|users/simonraven]] + +>>> I've now released the [[plugins/contrib/report]] plugin. I've been using it on my site; the holdup on releasing was because I hadn't yet written the docs for it. I hope you find it useful. +>>> -- [[users/KathrynAndersen]] -- cgit v1.2.3 From 29c475af4da5a50a857b94ff131313a05b1d7221 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sun, 24 Jan 2010 03:06:06 +0000 Subject: link to site --- doc/users/KathrynAndersen.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/users/KathrynAndersen.mdwn b/doc/users/KathrynAndersen.mdwn index 14fabbb01..16cb390c4 100644 --- a/doc/users/KathrynAndersen.mdwn +++ b/doc/users/KathrynAndersen.mdwn @@ -1,6 +1,7 @@ * aka [[rubykat]] * Currently an active [PmWiki](http://www.pmwiki.org) user, but investigating changing over to ikiwiki (if I can write the plugins I need). * <http://kerravonsen.dreamwidth.org> +* <http://www.katspace.org> * <http://github.com/rubykat> Has written the following plugins: -- cgit v1.2.3 From f6b2edef642ccda83a4c96aeeb2e146202707a67 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sun, 24 Jan 2010 09:38:40 +0000 Subject: new release of getfield; can now get values from other pages as well as current page --- doc/plugins/contrib/getfield.mdwn | 60 ++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index 929f70485..0a92894f1 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -18,13 +18,13 @@ use per-page structured data, where each page is treated like a record, and the structured data are fields in that record. This can include the meta-data for that page, such as the page title. -This plugin is meant to be used in conjunction with the **field** plugin. +This plugin is meant to be used in conjunction with the [[field]] plugin. ### USAGE One can get the value of a field by using special markup in the page. This does not use directive markup, in order to make it easier to -use the markup inside other directives. There are two forms: +use the markup inside other directives. There are four forms: * {{$*fieldname*}} @@ -39,6 +39,26 @@ use the markup inside other directives. There are two forms: <h1>My Long and Complicated Title With Potential For Spelling Mistakes</h1> +* {{$*pagename*#*fieldname*}} + + This queries the value of *fieldname* for the page *pagename*. + + For example: + + On PageFoo: + + \[[!meta title="I Am Page Foo"]] + + Stuff about Foo. + + On PageBar: + + For more info, see \[[{{$PageFoo#title}}|PageFoo]]. + + When PageBar is displayed: + + <p>For more info, see <a href="PageFoo">I Am Page Foo</a>.</p> + * {{+$*fieldname*+}} This queries the value of *fieldname* for the destination page; that is, @@ -68,17 +88,43 @@ use the markup inside other directives. There are two forms: <h1>I Am Page B</h1> <p>Stuff about A.</p> +* {{+$*pagename*#*fieldname*+}} + + This queries the value of *fieldname* for the page *pagename*; the + only difference between this and {{$*pagename*#*fieldname*}} is + that the full name of *pagename* is calculated relative to the + destination page rather than the source page. + + I can't really think of a reason why this should be needed, but + this format has been added for completeness. + +### No Value Found + +If no value is found for the given field, then the field name is returned. + +For example: + +On PageFoo: + + \[[!meta title="Foo"]] + My title is {{$title}}. + + My description is {{$description}}. + +When PageFoo is displayed: + + <p>My title is Foo.</p> + + <p>My description is description.</p> + +This is because "description" hasn't been defined for that page. + ### More Examples Listing all the sub-pages of the current page: \[[!map pages="{{$page}}/*"]] -### LIMITATIONS - -One cannot query the values of fields on pages other than the current -page or the destination page. - ## DOWNLOAD * browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/getfield.pm> -- cgit v1.2.3 From e9ee3d7d85e792ee6720696abe62f25cdd7f945a Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Sun, 24 Jan 2010 09:41:44 +0000 Subject: note new version of getfield --- doc/plugins/contrib/getfield/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 015e9f5a1..5f7fffead 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -19,6 +19,7 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>>>> What about using {{pagename#fieldname}}? The meaning of the hash in URLs sort of fits with what is needed here (reference to a 'named' thing within the page) and it won't conflict with actual hash usages (unless we expect different named parts of pages to define different values for the same field ...) >>>>> -- [[Oblomov]] >>>>>> That's a good one too. --[[simonraven]] +>>>>>>> Done! I used {{$*pagename*#*fieldname*}} for the format. -- [[users/KathrynAndersen]] > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. -- cgit v1.2.3 From 2f4ae4fa057bd46001453b5e70f56b4e2ad77b83 Mon Sep 17 00:00:00 2001 From: HelenOliver <HelenOliver@web> Date: Mon, 25 Jan 2010 04:21:27 +0000 Subject: added references --- doc/blog.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/blog.mdwn b/doc/blog.mdwn index c4a379fdb..222351498 100644 --- a/doc/blog.mdwn +++ b/doc/blog.mdwn @@ -1,4 +1,8 @@ -Ikiwiki allows turning any page into a weblog, by using the +Ikiwiki allows turning any page into a weblog, or any information reflected on a [research paper](http://www.superiorpapers.com/) by using the [[ikiwiki/directive/inline]] [[ikiwiki/directive]]. For example: \[[!inline pages="blog/* and !*/Discussion" show="10" rootpage="blog"]] + +For additional information or [homework help](http://www.superiorpapers.com/homework.php) about ikiwiki, consult these online information: +1. [Ikiwiki on Wikipedia](http://en.wikipedia.org/wiki/Ikiwiki) +2. [Debian package of ikiwiki](http://packages.debian.org/sid/ikiwiki) -- cgit v1.2.3 From f89b6f49d021762de8a260e92a4a3787cbf89b32 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 24 Jan 2010 23:32:19 -0500 Subject: Revert spam --- doc/blog.mdwn | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/blog.mdwn b/doc/blog.mdwn index 222351498..c4a379fdb 100644 --- a/doc/blog.mdwn +++ b/doc/blog.mdwn @@ -1,8 +1,4 @@ -Ikiwiki allows turning any page into a weblog, or any information reflected on a [research paper](http://www.superiorpapers.com/) by using the +Ikiwiki allows turning any page into a weblog, by using the [[ikiwiki/directive/inline]] [[ikiwiki/directive]]. For example: \[[!inline pages="blog/* and !*/Discussion" show="10" rootpage="blog"]] - -For additional information or [homework help](http://www.superiorpapers.com/homework.php) about ikiwiki, consult these online information: -1. [Ikiwiki on Wikipedia](http://en.wikipedia.org/wiki/Ikiwiki) -2. [Debian package of ikiwiki](http://packages.debian.org/sid/ikiwiki) -- cgit v1.2.3 From e269fbd7af187b986c9e52ae8459b57d70c64bcd Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 28 Jan 2010 04:35:58 -0500 Subject: new repo --- doc/git.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 5167ad004..30fed6afc 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -56,7 +56,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[ktf]] `git://github.com/ktf/ikiwiki.git` * [[tove]] `git://github.com/tove/ikiwiki.git` * [[GiuseppeBilotta]] `git://git.oblomov.eu/ikiwiki` - +* [[roktas]] `git://github.com/roktas/ikiwiki.git`` ## branches -- cgit v1.2.3 From bcf74bd8f8b72abb6466fef1b6848dc4cb5eb7b2 Mon Sep 17 00:00:00 2001 From: MariaJackson <MariaJackson@web> Date: Thu, 28 Jan 2010 09:58:20 +0000 Subject: --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 683a3f8ac..8e1ab2e56 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -8,6 +8,7 @@ there are some variations on the approach that might be useful: * Or, querying the mysql back-end to get the names * using WWW::MediaWiki for importing/exporting pages from the wiki, instead of Special::Export + * use <a href="http://www.overnightpools.com/Winter_Covers.htm">pool covers</a> Also, some detail on converting mediawiki transclusion to ikiwiki inlines... -- cgit v1.2.3 From 7f462b658953c7907d942e71a17b53a678b2ccc6 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 28 Jan 2010 05:23:28 -0500 Subject: revert spam --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 8e1ab2e56..683a3f8ac 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -8,7 +8,6 @@ there are some variations on the approach that might be useful: * Or, querying the mysql back-end to get the names * using WWW::MediaWiki for importing/exporting pages from the wiki, instead of Special::Export - * use <a href="http://www.overnightpools.com/Winter_Covers.htm">pool covers</a> Also, some detail on converting mediawiki transclusion to ikiwiki inlines... -- cgit v1.2.3 From 5ba9a0ae9797ad5e147985f3ea450a21bfe28667 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 28 Jan 2010 22:41:06 -0500 Subject: added Anna and Mark's bevvy of websites --- doc/ikiwikiusers.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 0ebab313d..aa4d9b96a 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -50,6 +50,7 @@ Projects & Organizations * [The XCB library](http://xcb.freedesktop.org/) * [The Philolexian Society of Columbia University](http://www.columbia.edu/cu/philo/) * [Fachschaft Informatik HU Berlin](http://fachschaft.informatik.hu-berlin.de/) +* [Wetknee Books](http://www.wetknee.com/) Personal sites and blogs ======================== @@ -131,6 +132,10 @@ Personal sites and blogs * [Jimmy Tang - personal blog and wiki](http://www.sgenomics.org/~jtang) * [Nico Schottelius' homepage](http://www.nico.schottelius.org) * [Andreas Zwinkaus homepage](http://beza1e1.tuxen.de) +* [Walden Effect](http://waldeneffect.org) +* [Avian Aqua Miser](http://www.avianaquamiser.com/) +* [Cosmic Cookout](http://www.cosmiccookout.com/) +* [Backyard Deer Deterrents](http://www.backyarddeer.com/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 3f822ed95fec3a9396cd4afe384ccf5067b82f2c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 28 Jan 2010 22:41:35 -0500 Subject: iainmclaren.com not using ikiwiki now --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index aa4d9b96a..153a7fd92 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -82,7 +82,6 @@ Personal sites and blogs * [Proper Treatment 正當作法](http://conway.rutgers.edu/~ccshan/wiki/) * [lost scraps](http://web.mornfall.net), pages/blog of Petr Ročkai aka mornfall * [Ronan Le Hy's blog](http://bayesien.org), in French. -* <http://iainmclaren.com>. * [formorers blog and website](http://www.formorer.de/webwiki/) * [Mark Jaroski's blog](http://movemearound.org/) * I keep my personal project notes and specs in a private ikiwiki - it's the perfect tool for this task. - [the daniel](http://neoglam.com) -- cgit v1.2.3 From ca76d8f38beccfeba40d52e1d8fd2362cada3197 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 28 Jan 2010 22:43:23 -0500 Subject: oh, we didn't convert this one yet. --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 153a7fd92..f750fb4b0 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -134,7 +134,6 @@ Personal sites and blogs * [Walden Effect](http://waldeneffect.org) * [Avian Aqua Miser](http://www.avianaquamiser.com/) * [Cosmic Cookout](http://www.cosmiccookout.com/) -* [Backyard Deer Deterrents](http://www.backyarddeer.com/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From a2ee2aa9c733b2a8df1fc564e5634abe7d209c05 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 29 Jan 2010 16:05:45 -0500 Subject: note on filtering --- doc/tips/add_chatterbox_to_blog.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/tips/add_chatterbox_to_blog.mdwn b/doc/tips/add_chatterbox_to_blog.mdwn index aa35b9331..e07e36b07 100644 --- a/doc/tips/add_chatterbox_to_blog.mdwn +++ b/doc/tips/add_chatterbox_to_blog.mdwn @@ -18,4 +18,7 @@ from there, like I have on [my blog](http://kitenet.net/~joey/blog/) show=5 feeds=no]] """]] +* To filter out `@-replies`, append "and !*@*" to the [[ikiwiki/PageSpec]]. + The same technique can be used for other filtering. + Note: Works best with ikiwiki 3.10 or better. -- cgit v1.2.3 From e9b349fdb0d9bcd3ff8389b4cbf6d5f14e84a740 Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Sat, 30 Jan 2010 21:30:14 -0500 Subject: testing push --- .../discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn index 183a8ef55..62f853f8c 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn @@ -8,3 +8,5 @@ That's not going to work in all situations; for example, with an ikiwiki which u * an *additional* git repository cloned from the bare repository, which is used for making changes from the command-line rather than the web. It is this repository in which one would be editing files with vim, and *this* repository does not have a .ikiwiki directory in it. It does have a .git directory in the root, however, so I suppose you could use that as a method of detection of a root directory, but of course that would only work for git repositories. -- [[KathrynAndersen]] + + -- cgit v1.2.3 From a4611bdebdf8f55bd163b7b3d38366cd2998d931 Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Sat, 30 Jan 2010 21:35:12 -0500 Subject: reply to forum discussion --- .../discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn index 62f853f8c..99e83b50f 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn @@ -9,4 +9,12 @@ That's not going to work in all situations; for example, with an ikiwiki which u -- [[KathrynAndersen]] +You are completely right; all of my wikis are compiled both locally and +remotely, and so the local repo also has a `.ikiwiki` folder. And that's not the +"usual" setup. +checking for a `.git` dir would not work when the wiki's source files aren't +located at the root of the repo. + +So, besides of doing a `touch .ikiwiki` at the root of the wiki in your local +repo, do you see any alternative? -- cgit v1.2.3 From 91cb8d75de2c0a8a57d79935aab7bde381c70b3b Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Sat, 30 Jan 2010 21:38:47 -0500 Subject: missing signature --- .../discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn index 99e83b50f..7b323860b 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn @@ -18,3 +18,5 @@ located at the root of the repo. So, besides of doing a `touch .ikiwiki` at the root of the wiki in your local repo, do you see any alternative? + +-- [[jerojasro]] -- cgit v1.2.3 From 03bb16cf180f0d3af713b4b54a71787aa13fb9af Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Sun, 31 Jan 2010 11:35:33 -0500 Subject: moved discussion to the forum main page --- ...of_wiki_pages_on_local_filesystem_with_vim.mdwn | 22 ++++++++++++++++++++++ .../discussion.mdwn | 22 ---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 14f592fd7..fd9f67ee4 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -15,6 +15,28 @@ This function takes into account the ikiwiki linking rules when deciding which f let me know what you think +> " NOTE: the root of the wiki is considered the first directory that contains a +> " .ikiwiki folder, except $HOME/.ikiwiki (the usual ikiwiki libdir) +> +> That's not going to work in all situations; for example, with an ikiwiki which uses git as the backend, the normal setup is that one has +> +> * a bare git repository +> * a git repository which ikiwiki builds the wiki from (which has a .ikiwiki directory in it) +> * an *additional* git repository cloned from the bare repository, which is used for making changes from the command-line rather than the web. It is this repository in which one would be editing files with vim, and *this* repository does not have a .ikiwiki directory in it. It does have a .git directory in the root, however, so I suppose you could use that as a method of detection of a root directory, but of course that would only work for git repositories. +> +> -- [[KathrynAndersen]] +> +>> You are completely right; all of my wikis are compiled both locally and +>> remotely, and so the local repo also has a `.ikiwiki` folder. And that's not the +>> "usual" setup. +>> +>> checking for a `.git` dir would not work when the wiki's source files aren't +>> located at the root of the repo. +>> +>> So, besides of doing a `touch .ikiwiki` at the root of the wiki in your local +>> repo, do you see any alternative? +>> +>> -- [[jerojasro]] To enable this functionality, paste the code below in your `.vim/ftplugin/ikiwiki.vim` file " returns the directory which can be considered the root of the wiki the diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn deleted file mode 100644 index 7b323860b..000000000 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim/discussion.mdwn +++ /dev/null @@ -1,22 +0,0 @@ - " NOTE: the root of the wiki is considered the first directory that contains a - " .ikiwiki folder, except $HOME/.ikiwiki (the usual ikiwiki libdir) - -That's not going to work in all situations; for example, with an ikiwiki which uses git as the backend, the normal setup is that one has - -* a bare git repository -* a git repository which ikiwiki builds the wiki from (which has a .ikiwiki directory in it) -* an *additional* git repository cloned from the bare repository, which is used for making changes from the command-line rather than the web. It is this repository in which one would be editing files with vim, and *this* repository does not have a .ikiwiki directory in it. It does have a .git directory in the root, however, so I suppose you could use that as a method of detection of a root directory, but of course that would only work for git repositories. - --- [[KathrynAndersen]] - -You are completely right; all of my wikis are compiled both locally and -remotely, and so the local repo also has a `.ikiwiki` folder. And that's not the -"usual" setup. - -checking for a `.git` dir would not work when the wiki's source files aren't -located at the root of the repo. - -So, besides of doing a `touch .ikiwiki` at the root of the wiki in your local -repo, do you see any alternative? - --- [[jerojasro]] -- cgit v1.2.3 From 1e0b724bac67d3f31bfb3620876937ec4291a326 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 31 Jan 2010 14:03:19 -0500 Subject: document that state variables are not available in the checkconfig hook --- doc/plugins/write.mdwn | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 45f083b42..082f0e38f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -68,20 +68,21 @@ In roughly the order they are called. This allows for plugins to perform their own processing of command-line options and so add options to the ikiwiki command line. It's called during -command line processing, with @ARGV full of any options that ikiwiki was +command line processing, with `@ARGV` full of any options that ikiwiki was not able to process on its own. The function should process any options it -can, removing them from @ARGV, and probably recording the configuration -settings in %config. It should take care not to abort if it sees +can, removing them from `@ARGV`, and probably recording the configuration +settings in `%config`. It should take care not to abort if it sees an option it cannot process, and should just skip over those options and -leave them in @ARGV. +leave them in `@ARGV`. ### checkconfig hook(type => "checkconfig", id => "foo", call => \&checkconfig); This is useful if the plugin needs to check for or modify ikiwiki's -configuration. It's called early in the startup process. The -function is passed no values. It's ok for the function to call +configuration. It's called early in the startup process. `%config` +is populated at this point, but other state has not yet been loaded. +The function is passed no values. It's ok for the function to call `error()` if something isn't configured right. ### refresh -- cgit v1.2.3 From 541406818b0ebc0023600db2d6e3fadaec7f9b41 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 1 Feb 2010 11:09:27 +0000 Subject: also potwiki --- doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index fd9f67ee4..c29985497 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -103,3 +103,5 @@ To enable this functionality, paste the code below in your `.vim/ftplugin/ikiwik endfunction setlocal includeexpr=FileForWikiLink(v:fname) + +> Interesting. I was at one point looking at "potwiki.vim", which implements a local wiki and follows CamelCase links, creating new files where necessary etc., to see if it could be adapted for ikiwiki (See [[tips/vim syntax highlighting/discussion]]). I didn't get anywhere. -- [[Jon]] -- cgit v1.2.3 From 438cb249a3f2bc9e04ea4b50d247daa7a43c281d Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Mon, 1 Feb 2010 14:32:21 +0000 Subject: --- ...of_wiki_pages_on_local_filesystem_with_vim.mdwn | 85 +++++----------------- 1 file changed, 20 insertions(+), 65 deletions(-) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index c29985497..261f1579f 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -37,71 +37,26 @@ let me know what you think >> repo, do you see any alternative? >> >> -- [[jerojasro]] -To enable this functionality, paste the code below in your `.vim/ftplugin/ikiwiki.vim` file - " returns the directory which can be considered the root of the wiki the - " current buffer belongs to, or an empty string if we are not inside an - " ikiwiki wiki - " - " NOTE: the root of the wiki is considered the first directory that contains a - " .ikiwiki folder, except $HOME/.ikiwiki (the usual ikiwiki libdir) - " - " if you can think of a better heuristic to get ikiwiki's root, let me know! - function! GetWikiRootDir() - let check_str = '%:p:h' - let pos_wiki_root = expand(check_str) - while pos_wiki_root != '/' - if isdirectory(pos_wiki_root . '/.ikiwiki') && pos_wiki_root != $HOME - return pos_wiki_root - endif - let check_str = check_str . ':h' - let pos_wiki_root = expand(check_str) - endwhile - if isdirectory('/.ikiwiki') - return '/' - endif - return '' - endfunction - - " This function searches for a .mdwn file (<a:name>.mdwn) using the ikiwiki - " WikiLink rules and returns its full path. - " - " The rules are the following - " - " if the filename starts with '/', use as base dir the root directory of the - " wiki - " - " if not: - " - " try first ./<bufname>/<a:name>.mdwn - " then for ./<a:name>.mdwn - " then for <root_of_wiki>/<a:name>.mdwn - " - " return the first one that exists - " - " the base path (. above) is the directory that contains the current buffer - " - function! FileForWikiLink(name) - let target_fname=a:name . ".mdwn" - let wikiroot_dir = GetWikiRootDir() - if match(target_fname, '^/') >= 0 - return wikiroot_dir . target_fname - endif - let subdir_file = expand('%:p:r') . "/" . target_fname - let currdir_file = expand('%:p:h') . "/" . target_fname - let wikiroot_file = wikiroot_dir . "/" . target_fname - if filewritable(subdir_file) - return subdir_file - endif - if filewritable(currdir_file) - return currdir_file - endif - if filewritable(wikiroot_file) - return wikiroot_file - endif - return a:name - endfunction - - setlocal includeexpr=FileForWikiLink(v:fname) +well. I've rewritten the whole thing, to take into account: + + * file matching ignoring case (MyPage matches mypage.mdwn) + * checking all the way down (up) to the root of the wiki (if there is a link `\[[foo]]` on `a/b/page`), + try `a/b/page/foo`, then `a/b/foo`, and so on, up to `foo` + * the alternate name for a page: when looking for the file for `\[[foo]]`, try both `foo.mdwn` and `foo/index.mdwn` + +you can find the file [here](http://git.devnull.li/cgi-bin/gitweb.cgi?p=vim-jerojasro.git;a=blob;f=.vim/ftplugin/ikiwiki_nav.vim;hb=HEAD). To use it, place it in `$HOME/.vim/ftplugin`. After that, hitting `<CR>` (Enter) in normal mode over a wikilink will take you to that page, if it exists. + +the plugin has, as of now, two problems: + + * doesn't work with wikilinks that take more than one line (though this isn't really that bad) + * it assumes that the root of the wiki is the first directory down the filesystem hierarchy that + has a `.ikiwiki` folder on it. If your copy of the wiki doesn't have it, you must create it for + the plugin to work + +-- [[jerojasro]] > Interesting. I was at one point looking at "potwiki.vim", which implements a local wiki and follows CamelCase links, creating new files where necessary etc., to see if it could be adapted for ikiwiki (See [[tips/vim syntax highlighting/discussion]]). I didn't get anywhere. -- [[Jon]] + +>> when I wrote the plugin I also considered the possibility of creating files (and their dirs, if necessary) +>> from new wikilinks; the changes needed to get that working are fairly small -- [[jerojasro]] -- cgit v1.2.3 From f963700a4f418f3498c8d855b5ce88d951391867 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 1 Feb 2010 15:34:10 -0500 Subject: ready to pull, and thoughts --- ...of_wiki_pages_on_local_filesystem_with_vim.mdwn | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 261f1579f..1cb5ed27e 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -60,3 +60,36 @@ the plugin has, as of now, two problems: >> when I wrote the plugin I also considered the possibility of creating files (and their dirs, if necessary) >> from new wikilinks; the changes needed to get that working are fairly small -- [[jerojasro]] + +> Seems about ready for me to think about pulling it into ikiwiki +> alongside [[tips/vim_syntax_highlighting/ikiwiki.vim]]. If you'll +> please slap a license on it. :) --[[Joey]] +> +> Also, I have a possible other approach for finding ikiwiki's root. One +> could consider that any subdirectory of an ikiwiki wiki is itself +> a standalone wiki, though probably one missing a toplevel index page. +> The relative wikilinks work such that this assumption makes sense; +> you can build any subdirectory with ikiwiki and probably get something +> reasonable with links that work, etc. +> +> So, if that's the case, then one could say that the directory that the +> user considers to be the toplevel of their wiki is really also a subwiki, +> enclosed in a succession of parents that go all the way down to the root +> directory (or alternatively, to the user's home directory). I think that +> logically makes some sense. +> +> And if that's the case, you can resolve an absolute link by looking for +> the page closest to the root that matches the link. +> +> It may even make sense to change ikiwiki's own handling of "absolute" +> links to work that way. But even without changing ikiwiki, I think it +> would be a reasonable thing for vim to do. It would only fail in two +> unusual circumstances: +> +> 1. There is a file further down, outside what the user considers +> the wiki, that matches. Say a `$HOME/index.mdwn` +> 2. An absolute link is broken in that the page linked to does +> not exist in the root of the wiki. But it does exist in a subdir, +> and vim would go to that file. +> +> --[[Joey]] -- cgit v1.2.3 From b30fd6327966c4591c76041968b375b04c7e8982 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 1 Feb 2010 16:06:51 -0500 Subject: thanks schmonz for your kind donation --- doc/tipjar.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/tipjar.mdwn b/doc/tipjar.mdwn index 87a497fd1..b725a2eff 100644 --- a/doc/tipjar.mdwn +++ b/doc/tipjar.mdwn @@ -15,6 +15,7 @@ Thanks to the following people for their kind contributions: * Mick Pollard * Nico Schottelius * Jon Dowland +* Amitai Schlair (Note that this page is locked to prevent anyone from tampering with the PayPal button. If you prefer your donation *not* be listed here, let [[Joey]] know.) -- cgit v1.2.3 From deb0bc8bd57bc74709ecb12de36a9cb96c684a93 Mon Sep 17 00:00:00 2001 From: Josh Triplett <josh@joshtriplett.org> Date: Tue, 2 Feb 2010 02:56:06 -0800 Subject: New todo item for wrapperuser configuration option --- doc/todo/wrapperuser.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/todo/wrapperuser.mdwn (limited to 'doc') diff --git a/doc/todo/wrapperuser.mdwn b/doc/todo/wrapperuser.mdwn new file mode 100644 index 000000000..4c42b046f --- /dev/null +++ b/doc/todo/wrapperuser.mdwn @@ -0,0 +1,7 @@ +ikiwiki's .setup file can specify wrappergroup, and ikiwiki will set the group +of the wrappers accordingly. Having had people encounter difficulty before +when trying to do the same thing with users (for instance, making all wrappers +6755 ikiwiki:ikiwiki), I think it would help to have "wrapperuser". This could +only actually take effect if building the wrappers as root (not really the best +plan), but ikiwiki could at least warn if wrapperuser does not match the user +the wrapper will end up with. -- cgit v1.2.3 From 05b99e3cfa8c9044d18d5b07aec24fff555f2889 Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Tue, 2 Feb 2010 13:54:51 +0100 Subject: Document git branch for automatically creating tag pages. --- ...o-create_tag_pages_according_to_a_template.mdwn | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index f1d33114f..95710ced0 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -123,3 +123,40 @@ On the second extra pass, it doesn't notice that it has to update the "?"-link. } is not satisfied for the newly created tag page. I shall put debug msgs into Render.pm to find out better how it works. --Ivan Z. + +--- + +I've made another attempt at fixiing this + +The current progress can be found at my [git repository][gitweb] on branch +`autotag`: + + git://git.liegesta.at/git/ikiwiki + +[gitweb]: http://git.liegesta.at/?p=ikiwiki.git;a=shortlog;h=refs/heads/autotag (gitweb for branch autotag) + +It's not entirely finished yet, but already quite usable. Testing and comments +on code quality, implementation details, as well as other patches would be +appreciated. + +Here's what it does right now: + +* enabled by setting `tag_autocreate=1` in the configuration. +* Tag pages will be created in `tagbase` from the template `autotag.tmpl`. +* Will correctly render all links, and dependencies. Well, AFAIK. +* When a tag page is deleted it will automatically recreated from template. (I +consider this a feature, not a bug) +* Requires a rebuild on first use. +* Adds a function `add_autofile()` to the plugin API, to do all this. + +Todo/Bugs: + +* Will still create a page even if there's a page other than `$tag` under +`tagbase` satisfying the tag link. +* Call from `IkiWiki.pm` to `Render.pm`, which adds a module dependency in the +wrong direction. +* Add files to RCS. +* Unit tests. +* Proper documentation. + +--[[David_Riebenbauer]] -- cgit v1.2.3 From c6f27f9dfaa689a32342a412d6fd19d63453ee85 Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Tue, 2 Feb 2010 14:32:51 +0100 Subject: add git repository 'davrieb' and document branch on userpage --- doc/git.mdwn | 4 +++- doc/users/David_Riebenbauer.mdwn | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 30fed6afc..289937121 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -56,7 +56,9 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[ktf]] `git://github.com/ktf/ikiwiki.git` * [[tove]] `git://github.com/tove/ikiwiki.git` * [[GiuseppeBilotta]] `git://git.oblomov.eu/ikiwiki` -* [[roktas]] `git://github.com/roktas/ikiwiki.git`` +* [[roktas]] `git://github.com/roktas/ikiwiki.git` +* [[davrieb|David_Riebenbauer]] `git://git.liegesta.at/git/ikiwiki` + ([browse](http://git.liegesta.at/?p=ikiwiki.git;a=summary)) ## branches diff --git a/doc/users/David_Riebenbauer.mdwn b/doc/users/David_Riebenbauer.mdwn index 372a28588..d7469696e 100644 --- a/doc/users/David_Riebenbauer.mdwn +++ b/doc/users/David_Riebenbauer.mdwn @@ -1,2 +1,8 @@ Runs ikiwiki on his [homepage](http://liegesta.at/) and can be reached through <davrieb@liegesta.at> + +## Branches in his [[git]] repository ## + +* `autotag` +([browse](http://git.liegesta.at/?p=ikiwiki.git;a=shortlog;h=refs/heads/autotag)) +See [[todo/auto-create_tag_pages_according_to_a_template]] -- cgit v1.2.3 From 1febfda911d29a52b4c4aa1bb286f4c9e1862c5c Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Tue, 2 Feb 2010 14:50:01 +0100 Subject: also tag 'patch/core', considering that over half of the changes are there --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 95710ced0..8c586d706 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -4,7 +4,7 @@ Tags are mainly specific to the object to which they’re stuck. However, I ofte Also see: <http://madduck.net/blog/2008.01.06:new-blog/> and <http://users.itk.ppke.hu/~cstamas/code/ikiwiki/autocreatetagpage/> -[[!tag wishlist plugins/tag patch]] +[[!tag wishlist plugins/tag patch patch/core]] I would love to see this as well. -- dato -- cgit v1.2.3 From 6b98269aa310abc121875753ded37042f3a95988 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 2 Feb 2010 13:31:07 -0500 Subject: partial review --- ...o-create_tag_pages_according_to_a_template.mdwn | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 8c586d706..a0e76fd48 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -160,3 +160,35 @@ wrong direction. * Proper documentation. --[[David_Riebenbauer]] + +> Starting review of this. Some of your commits are to very delicate, +> optimised, and security-sensitive ground, so I have to look at them very +> carefully. --[[Joey]] +> +> * In the refactoring in f3abeac919c4736429bd3362af6edf51ede8e7fe, +> you introduced at least 2 bugs, one a possible security hole. +> Now one part of the code tests `if ($file)` and the other +> caller tests `if ($f)`. These two tests both tested `if (! defined $f)` +> before. Notice that the variable needs to be the untainted variable +> for both. Also notice that `if ($f)` fails if `$f` contains `0`, +> which is a very common perl gotcha. +> * Your refactored code changes `-l $_ || -d _` to `-l $file || -d $file`. +> The latter makes one more stat system call; note the use of a +> bare `_` in the first to make perl reuse the stat buffer. +> * (As a matter of style, could you put a space after the commas in your +> perl?) +> +> I'd like to cherry-pick the above commit, once it's in shape, before +> looking at the rest in detail. So just a few other things that stood out. +> +> * Commit 4af4d26582f0c2b915d7102fb4a604b176385748 seems unnecessary. +> `srcfile($file, 1)` already is documented to return undef if the +> file does not exist. (But without the second parameter, it throws +> an error.) +> +> * Commit f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 adds a line +> that is intented by a space, not a tab. +> +> * Commit f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 says that auto-added +> files will be recreated if the user deletes them. That seems bad. +> `autoindex` goes to some trouble to not recreate deleted files. -- cgit v1.2.3 From 261dcd04750acb166915bfb1cf8d3c31a8fccb96 Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Wed, 3 Feb 2010 21:59:38 -0500 Subject: response --- ...navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 1cb5ed27e..0497b66b6 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -64,6 +64,9 @@ the plugin has, as of now, two problems: > Seems about ready for me to think about pulling it into ikiwiki > alongside [[tips/vim_syntax_highlighting/ikiwiki.vim]]. If you'll > please slap a license on it. :) --[[Joey]] +> +>> GPL version 2 or later (if that doesn't cause any problems here). I'll add it +>> to the file --[[jerojasro]] > > Also, I have a possible other approach for finding ikiwiki's root. One > could consider that any subdirectory of an ikiwiki wiki is itself @@ -80,6 +83,10 @@ the plugin has, as of now, two problems: > > And if that's the case, you can resolve an absolute link by looking for > the page closest to the root that matches the link. +> +>> I like your idea; it doesn't alter the matching of the relative links, and +>> should work fine with absolute links too. I'll implement it, though I see +>> some potential (but small) issues with it --[[jerojasro]] > > It may even make sense to change ikiwiki's own handling of "absolute" > links to work that way. But even without changing ikiwiki, I think it @@ -93,3 +100,7 @@ the plugin has, as of now, two problems: > and vim would go to that file. > > --[[Joey]] +> +>> your approach will add more noise when the plugin grows the page-creation +>> feature, since there will be no real root to limit the possible locations for +>> the new page. But it is far better than demanding for a `.ikiwiki` dir --[[jerojasro]] -- cgit v1.2.3 From c4db8d89a5c1b3eab519fc6268e1fed6b1f4eb2f Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Wed, 3 Feb 2010 22:47:26 -0500 Subject: new forum post --- doc/forum/where_are_the_tags.mdwn | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/forum/where_are_the_tags.mdwn (limited to 'doc') diff --git a/doc/forum/where_are_the_tags.mdwn b/doc/forum/where_are_the_tags.mdwn new file mode 100644 index 000000000..f70c2e69a --- /dev/null +++ b/doc/forum/where_are_the_tags.mdwn @@ -0,0 +1,2 @@ +Where is the tag cloud/tag listing of all the tags used in this wiki? I know we +have tags enabled. -- cgit v1.2.3 From 208335ec80f4678ea352823111b953f1d7eccff9 Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Wed, 3 Feb 2010 22:48:15 -0500 Subject: signature --- doc/forum/where_are_the_tags.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/where_are_the_tags.mdwn b/doc/forum/where_are_the_tags.mdwn index f70c2e69a..3a4debfe5 100644 --- a/doc/forum/where_are_the_tags.mdwn +++ b/doc/forum/where_are_the_tags.mdwn @@ -1,2 +1,2 @@ Where is the tag cloud/tag listing of all the tags used in this wiki? I know we -have tags enabled. +have tags enabled. --[[jerojasro]] -- cgit v1.2.3 From 0e67c26e2e656cf54aa13033c56e204237ef5775 Mon Sep 17 00:00:00 2001 From: "http://edward.myopenid.com/" <http://edward.myopenid.com/@web> Date: Fri, 5 Feb 2010 03:25:22 +0000 Subject: add 'or' to pagespec --- doc/users/Edward_Betts.mdwn | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/users/Edward_Betts.mdwn b/doc/users/Edward_Betts.mdwn index b32927a1c..61d6150ef 100644 --- a/doc/users/Edward_Betts.mdwn +++ b/doc/users/Edward_Betts.mdwn @@ -1,9 +1,4 @@ My watchlist: -[[!inline archive="yes" sort="mtime" atom="yes" pages=" -todo/allow_wiki_syntax_in_commit_messages* -todo/shortcut_with_different_link_text* -todo/structured_page_data* -tips/convert_mediawiki_to_ikiwiki* -"]] +[[!inline archive="yes" sort="mtime" atom="yes" pages="todo/allow_wiki_syntax_in_commit_messages* or todo/shortcut_with_different_link_text* or todo/structured_page_data* or tips/convert_mediawiki_to_ikiwiki*"]] -- cgit v1.2.3 From 34a64557cf5f4a913c07f04d021debdd5fb58b1b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 5 Feb 2010 13:46:12 -0500 Subject: scratch patch --- doc/bugs/anonok_vs._httpauth.mdwn | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 0a62164cb..1c492139b 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -58,3 +58,45 @@ and a whitelist of OpenIDs in `locked_pages`...) >> On reflection, I've stopped being bothered by the >> redirect-to-signin-page approach. (It only needs to happen once per >> browser session, anyway.) Can we try that? --[[schmonz]] + +Here is an attempt. With this httpauth will only redirect to the +`cgiauth_url` when a page is edited, and it will defer to other plugins +like anonok first. I have not tested this. --[[Joey]] + +<pre> +diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm +index 127c321..c181164 100644 +--- a/IkiWiki/Plugin/httpauth.pm ++++ b/IkiWiki/Plugin/httpauth.pm +@@ -9,6 +9,8 @@ use IkiWiki 3.00; + sub import { + hook(type => "getsetup", id => "httpauth", call => \&getsetup); + hook(type => "auth", id => "httpauth", call => \&auth); ++ hook(type => "canedit", id => "httpauth", call => \&canedit, ++ last => 1); + } + + sub getsetup () { +@@ -33,10 +35,20 @@ sub auth ($$) { + if (defined $cgi->remote_user()) { + $session->param("name", $cgi->remote_user()); + } +- elsif (defined $config{cgiauthurl}) { ++} ++ ++sub canedit ($$$) { ++ my $page=shift; ++ my $cgi=shift; ++ my $session=shift; ++ ++ if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { + IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); + exit; + } ++ else { ++ return undef; ++ } +} + + 1 +</pre> -- cgit v1.2.3 From 5541b06de43c70ca9c23231d175d474789dacd25 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 5 Feb 2010 15:22:02 -0500 Subject: response --- IkiWiki/Plugin/httpauth.pm | 14 +++++++++++++- doc/forum/where_are_the_tags.mdwn | 7 +++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index 127c321f0..c1811643b 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -9,6 +9,8 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "httpauth", call => \&getsetup); hook(type => "auth", id => "httpauth", call => \&auth); + hook(type => "canedit", id => "httpauth", call => \&canedit, + last => 1); } sub getsetup () { @@ -33,10 +35,20 @@ sub auth ($$) { if (defined $cgi->remote_user()) { $session->param("name", $cgi->remote_user()); } - elsif (defined $config{cgiauthurl}) { +} + +sub canedit ($$$) { + my $page=shift; + my $cgi=shift; + my $session=shift; + + if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); exit; } + else { + return undef; + } } 1 diff --git a/doc/forum/where_are_the_tags.mdwn b/doc/forum/where_are_the_tags.mdwn index 3a4debfe5..ecb49fe43 100644 --- a/doc/forum/where_are_the_tags.mdwn +++ b/doc/forum/where_are_the_tags.mdwn @@ -1,2 +1,9 @@ Where is the tag cloud/tag listing of all the tags used in this wiki? I know we have tags enabled. --[[jerojasro]] + +> This wiki does not use one global toplevel set of tags (`tagbase` is not +> set). +> +> There are tags used for the [[plugins]], and a tag cloud of those +> there. [[wishlist]] and [[patch]] are tags too, but I don't see the point +> of a tag cloud for such tags. --[[Joey]] -- cgit v1.2.3 From b384af237df92e787f84f845d0d2bc182f7775ff Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 6 Feb 2010 16:19:17 -0500 Subject: opendiscussion: This plugin will also now allow posting comments to otherwise locked-down sites. --- IkiWiki/Plugin/opendiscussion.pm | 1 + debian/changelog | 2 ++ doc/plugins/comments.mdwn | 4 ++-- doc/plugins/lockedit.mdwn | 11 +++-------- doc/plugins/opendiscussion.mdwn | 5 +++-- 5 files changed, 11 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 4b91f5d83..5a455940b 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -25,6 +25,7 @@ sub canedit ($$) { my $session=shift; return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; + return "" if pagespec_match($page, "postcomment(*)"); return undef; } diff --git a/debian/changelog b/debian/changelog index b4acac633..a65592277 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * Add link to userpage (or creation link) to top of preferences page. * auto-blog.setup: Lock all pages, so only admin can post to the blog by default. + * opendiscussion: This plugin will also now allow posting comments + to otherwise locked-down sites. -- Joey Hess <joeyh@debian.org> Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn index b6d4d252b..f933d32be 100644 --- a/doc/plugins/comments.mdwn +++ b/doc/plugins/comments.mdwn @@ -14,8 +14,8 @@ authorship should hopefully be unforgeable by CGI users. The intention is that on a non-wiki site (like a blog) you can lock all pages for admin-only access, then allow otherwise unprivileged (or perhaps even anonymous) users to comment on posts. See the documentation of the -[[lockedit]] and [[anonok]] pages for details on locking down a wiki so -users can only post comments. +[[opendiscussion]], [[lockedit]] and [[anonok]] pages for details on locking +down a wiki so readers can only post comments. Individual comments are stored as internal-use pages named something like `page/comment_1`, `page/comment_2`, etc. These pages internally use a diff --git a/doc/plugins/lockedit.mdwn b/doc/plugins/lockedit.mdwn index c8f64ea47..681163203 100644 --- a/doc/plugins/lockedit.mdwn +++ b/doc/plugins/lockedit.mdwn @@ -12,14 +12,9 @@ to lock. For example, you could choose to lock all pages created before 2006, or all pages that are linked to from the page named "locked". More usually though, you'll just list some names of pages to lock. -One handy thing to do if you're using ikiwiki for your blog is to lock -"* and !*/Discussion". This prevents others from adding to or modifying -posts in your blog, while still letting them comment via the Discussion -pages. - -Alternatively, if you're using the [[comments]] plugin, you can lock -"!postcomment(*)" to allow users to comment on pages, but not edit anything -else. +If you want to lock down a blog so only you can post to it, you can just +lock "*", and enable the [[opendiscussion]] plugin, so readers can still post +[[comments]]. Wiki administrators can always edit locked pages. The [[ikiwiki/PageSpec]] can specify that some pages are not locked for some users. For example, diff --git a/doc/plugins/opendiscussion.mdwn b/doc/plugins/opendiscussion.mdwn index b2ba68bf7..3b5ab4858 100644 --- a/doc/plugins/opendiscussion.mdwn +++ b/doc/plugins/opendiscussion.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=opendiscussion author="[[Joey]]"]] [[!tag type/auth]] -This plugin allows editing of Discussion pages by anonymous users who have -not logged into the wiki. +This plugin allows editing of Discussion pages, and posting of comments, +even when the [[lockedit]] plugin has been configured to otherwise prevent +editing. -- cgit v1.2.3 From 03810ebf4003a5c1cb8c8a247f0e2b429923a675 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 6 Feb 2010 16:29:04 -0500 Subject: add noindex robots directives --- doc/ikiwiki/directive/date.mdwn | 2 ++ doc/ikiwiki/pagespec/po.mdwn | 2 ++ doc/ikiwiki/pagespec/sorting.mdwn | 2 ++ 3 files changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/date.mdwn b/doc/ikiwiki/directive/date.mdwn index df45fa840..b89241e4c 100644 --- a/doc/ikiwiki/directive/date.mdwn +++ b/doc/ikiwiki/directive/date.mdwn @@ -12,3 +12,5 @@ For example, an update to a page with an embedded date stamp could look like: Updated \[[!date "Wed, 25 Nov 2009 01:11:55 -0500"]]: mumble mumble + +[[!meta robots="noindex, follow"]] diff --git a/doc/ikiwiki/pagespec/po.mdwn b/doc/ikiwiki/pagespec/po.mdwn index e0264dd50..40ed9efb6 100644 --- a/doc/ikiwiki/pagespec/po.mdwn +++ b/doc/ikiwiki/pagespec/po.mdwn @@ -14,3 +14,5 @@ wiki: Note that every non-po page is considered to be written in `po_master_language`, as specified in `ikiwiki.setup`. + +[[!meta robots="noindex, follow"]] diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 41aa58151..697818a2a 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -9,3 +9,5 @@ orders can be specified. * `title_natural` - Only available if [[!cpan Sort::Naturally]] is installed. Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") + +[[!meta robots="noindex, follow"]] -- cgit v1.2.3 From aca4c725c37e6d75c7c8f4ba7596bb8358fb34b4 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 6 Feb 2010 16:35:01 -0500 Subject: update --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index f750fb4b0..3035aa8b0 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -134,6 +134,7 @@ Personal sites and blogs * [Walden Effect](http://waldeneffect.org) * [Avian Aqua Miser](http://www.avianaquamiser.com/) * [Cosmic Cookout](http://www.cosmiccookout.com/) +* [Backyard Deer](http://www.backyarddeer.com/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From b0857e75553f33114a0bd5484be86a02b35a09e6 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 6 Feb 2010 17:01:16 -0500 Subject: remove pigro.net Unfortunatly, www.pigro.net is down, and has been for some time. --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 3035aa8b0..469fc0f6d 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -42,7 +42,6 @@ Projects & Organizations * [The Walden Effect](http://www.waldeneffect.org/) * The support pages for [Trinity Centre for High Performance Computing](http://www.tchpc.tcd.ie/support/) * [St Hugh of Lincoln Catholic Primary School in Surrey](http://www.sthugh-of-lincoln.surrey.sch.uk/) -* [Pigro Network](http://www.pigro.net) is running a hg based ikiwiki. (And provides ikiwiki hosting for $10/m.) * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository. * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) * [MIT Student Information Processing Board](http://sipb.mit.edu/) -- cgit v1.2.3 From 961473473ae8f2a386322149cd4668f213aeed25 Mon Sep 17 00:00:00 2001 From: AlbertF <AlbertF@web> Date: Sun, 7 Feb 2010 00:43:34 +0000 Subject: --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index afd7dbeab..62f3ad21a 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -47,6 +47,7 @@ Bulleted list * [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] * <http://www.gnu.org/> * [GNU](http://www.gnu.org/) +* [make money online](http://www.mooladays.com) ----- -- cgit v1.2.3 From a752bc3d1263c65958d978441ca850f6d70eabc2 Mon Sep 17 00:00:00 2001 From: AlbertF <AlbertF@web> Date: Sun, 7 Feb 2010 00:44:09 +0000 Subject: --- doc/sandbox.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 62f3ad21a..1420c1d36 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -46,9 +46,11 @@ Bulleted list * <http://ikiwiki.info/ikiwiki/formatting/> * [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] * <http://www.gnu.org/> +* [make money online](http://www.mooladays.com) * [GNU](http://www.gnu.org/) * [make money online](http://www.mooladays.com) + ----- [[!progress percent=27]] -- cgit v1.2.3 From 343c8768220b3802e479ba466721ed2d2e43db0d Mon Sep 17 00:00:00 2001 From: AlbertF <AlbertF@web> Date: Sun, 7 Feb 2010 00:45:02 +0000 Subject: --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 1420c1d36..29c592502 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -51,6 +51,7 @@ Bulleted list * [make money online](http://www.mooladays.com) + ----- [[!progress percent=27]] -- cgit v1.2.3 From 2700379ef3ffbb504c1be05cc32a3f5f44ab5981 Mon Sep 17 00:00:00 2001 From: AlbertF <AlbertF@web> Date: Sun, 7 Feb 2010 00:46:09 +0000 Subject: --- doc/sandbox.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 29c592502..cfa4e88f9 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -48,7 +48,6 @@ Bulleted list * <http://www.gnu.org/> * [make money online](http://www.mooladays.com) * [GNU](http://www.gnu.org/) -* [make money online](http://www.mooladays.com) -- cgit v1.2.3 From 698386604a4cfa90a89595cfd3164b60046de474 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 6 Feb 2010 20:04:33 -0500 Subject: silly wabbit. spam written in sand washes away. ban for life of IP remains --- doc/sandbox.mdwn | 3 --- 1 file changed, 3 deletions(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index cfa4e88f9..afd7dbeab 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -46,11 +46,8 @@ Bulleted list * <http://ikiwiki.info/ikiwiki/formatting/> * [[different_name_for_a_WikiLink|ikiwiki/WikiLink]] * <http://www.gnu.org/> -* [make money online](http://www.mooladays.com) * [GNU](http://www.gnu.org/) - - ----- [[!progress percent=27]] -- cgit v1.2.3 From 1bb06210e956801d4b64641dbc84059ad36f797e Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Sun, 7 Feb 2010 01:51:30 +0000 Subject: tested --- doc/bugs/anonok_vs._httpauth.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 1c492139b..1940fdad8 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -100,3 +100,6 @@ index 127c321..c181164 100644 1 </pre> + +> With `anonok` enabled, this works for anonymous editing of an +> existing Discussion page. auth is still needed to create one. --[[schmonz]] -- cgit v1.2.3 From 2e55a598350f422a8c064cad6bbba4e2fde13ed8 Mon Sep 17 00:00:00 2001 From: "http://gustaf.thorslund.org/" <http://gustaf.thorslund.org/@web> Date: Sun, 7 Feb 2010 14:09:15 +0000 Subject: Added missing '!' in "!format perl..." --- doc/ikiwiki/directive/format.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/format.mdwn b/doc/ikiwiki/directive/format.mdwn index 23830e9cd..7d11d225f 100644 --- a/doc/ikiwiki/directive/format.mdwn +++ b/doc/ikiwiki/directive/format.mdwn @@ -22,7 +22,7 @@ Note that if the highlight plugin is enabled, this directive can also be used to display syntax highlighted code. Many languages and formats are supported. For example: - \[[format perl """ + \[[!format perl """ print "hello, world\n"; """]] -- cgit v1.2.3 From ef65fd58cf77c27b9063b46b5b61b3090662ddce Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sun, 7 Feb 2010 20:29:24 +0000 Subject: HTTP:BL plugin/inclusion --- doc/wishlist/http_bl_support.mdwn | 59 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 doc/wishlist/http_bl_support.mdwn (limited to 'doc') diff --git a/doc/wishlist/http_bl_support.mdwn b/doc/wishlist/http_bl_support.mdwn new file mode 100644 index 000000000..30fb9c9b3 --- /dev/null +++ b/doc/wishlist/http_bl_support.mdwn @@ -0,0 +1,59 @@ +[Project Honeypot](http://projecthoneypot.org/) has an HTTP:BL API available to subscribed (it's free, accept donations) people/orgs. There's a basic perl package someone wrote, I'm including a copy here. + +[from here](http://projecthoneypot.org/board/read.php?f=10&i=112&t=112) + +<pre> +package Honeypot; + +use Socket qw/inet_ntoa/; + +my $dns = 'dnsbl.httpbl.org'; +my %types = ( +0 => 'Search Engine', +1 => 'Suspicious', +2 => 'Harvester', +4 => 'Comment Spammer' +); +sub query { +my $key = shift || die 'You need a key for this, you get one at http://www.projecthoneypot.org'; +my $ip = shift || do { +warn 'no IP for request in Honeypot::query().'; +return; +}; + +my @parts = reverse split /\./, $ip; +my $lookup_name = join'.', $key, @parts, $dns; + +my $answer = gethostbyname ($lookup_name); +return unless $answer; +$answer = inet_ntoa($answer); +my(undef, $days, $threat, $type) = split /\./, $answer; +my @types; +while(my($bit, $typename) = each %types) { +push @types, $typename if $bit & $type; +} +return { +days => $days, +threat => $threat, +type => join ',', @types +}; + +} +1; +</pre> + +From the page: + +> The usage is simple: + +> use Honeypot; +> my $key = 'XXXXXXX'; # your key +> my $ip = '....'; the IP you want to check +> my $q = Honeypot::query($key, $ip); + +> use Data::Dumper; +> print Dumper $q; + +Any chance of having this as a plugin? + +I could give it a go, too. Would be fun to try my hand at Perl. --[[simonraven]] -- cgit v1.2.3 From c926d2d3f7a47e2c2918fd70634581ea8f1d11ff Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Sun, 7 Feb 2010 20:30:59 +0000 Subject: --- doc/wishlist/http_bl_support.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/wishlist/http_bl_support.mdwn b/doc/wishlist/http_bl_support.mdwn index 30fb9c9b3..024c770d8 100644 --- a/doc/wishlist/http_bl_support.mdwn +++ b/doc/wishlist/http_bl_support.mdwn @@ -57,3 +57,5 @@ From the page: Any chance of having this as a plugin? I could give it a go, too. Would be fun to try my hand at Perl. --[[simonraven]] + +[[!tag wishlist]] -- cgit v1.2.3 From fb6e73b3698089f47ae63d1569225938699d84e1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 8 Feb 2010 13:46:49 -0500 Subject: move to correct location --- doc/todo/http_bl_support.mdwn | 61 +++++++++++++++++++++++++++++++++++++++ doc/wishlist/http_bl_support.mdwn | 61 --------------------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) create mode 100644 doc/todo/http_bl_support.mdwn delete mode 100644 doc/wishlist/http_bl_support.mdwn (limited to 'doc') diff --git a/doc/todo/http_bl_support.mdwn b/doc/todo/http_bl_support.mdwn new file mode 100644 index 000000000..024c770d8 --- /dev/null +++ b/doc/todo/http_bl_support.mdwn @@ -0,0 +1,61 @@ +[Project Honeypot](http://projecthoneypot.org/) has an HTTP:BL API available to subscribed (it's free, accept donations) people/orgs. There's a basic perl package someone wrote, I'm including a copy here. + +[from here](http://projecthoneypot.org/board/read.php?f=10&i=112&t=112) + +<pre> +package Honeypot; + +use Socket qw/inet_ntoa/; + +my $dns = 'dnsbl.httpbl.org'; +my %types = ( +0 => 'Search Engine', +1 => 'Suspicious', +2 => 'Harvester', +4 => 'Comment Spammer' +); +sub query { +my $key = shift || die 'You need a key for this, you get one at http://www.projecthoneypot.org'; +my $ip = shift || do { +warn 'no IP for request in Honeypot::query().'; +return; +}; + +my @parts = reverse split /\./, $ip; +my $lookup_name = join'.', $key, @parts, $dns; + +my $answer = gethostbyname ($lookup_name); +return unless $answer; +$answer = inet_ntoa($answer); +my(undef, $days, $threat, $type) = split /\./, $answer; +my @types; +while(my($bit, $typename) = each %types) { +push @types, $typename if $bit & $type; +} +return { +days => $days, +threat => $threat, +type => join ',', @types +}; + +} +1; +</pre> + +From the page: + +> The usage is simple: + +> use Honeypot; +> my $key = 'XXXXXXX'; # your key +> my $ip = '....'; the IP you want to check +> my $q = Honeypot::query($key, $ip); + +> use Data::Dumper; +> print Dumper $q; + +Any chance of having this as a plugin? + +I could give it a go, too. Would be fun to try my hand at Perl. --[[simonraven]] + +[[!tag wishlist]] diff --git a/doc/wishlist/http_bl_support.mdwn b/doc/wishlist/http_bl_support.mdwn deleted file mode 100644 index 024c770d8..000000000 --- a/doc/wishlist/http_bl_support.mdwn +++ /dev/null @@ -1,61 +0,0 @@ -[Project Honeypot](http://projecthoneypot.org/) has an HTTP:BL API available to subscribed (it's free, accept donations) people/orgs. There's a basic perl package someone wrote, I'm including a copy here. - -[from here](http://projecthoneypot.org/board/read.php?f=10&i=112&t=112) - -<pre> -package Honeypot; - -use Socket qw/inet_ntoa/; - -my $dns = 'dnsbl.httpbl.org'; -my %types = ( -0 => 'Search Engine', -1 => 'Suspicious', -2 => 'Harvester', -4 => 'Comment Spammer' -); -sub query { -my $key = shift || die 'You need a key for this, you get one at http://www.projecthoneypot.org'; -my $ip = shift || do { -warn 'no IP for request in Honeypot::query().'; -return; -}; - -my @parts = reverse split /\./, $ip; -my $lookup_name = join'.', $key, @parts, $dns; - -my $answer = gethostbyname ($lookup_name); -return unless $answer; -$answer = inet_ntoa($answer); -my(undef, $days, $threat, $type) = split /\./, $answer; -my @types; -while(my($bit, $typename) = each %types) { -push @types, $typename if $bit & $type; -} -return { -days => $days, -threat => $threat, -type => join ',', @types -}; - -} -1; -</pre> - -From the page: - -> The usage is simple: - -> use Honeypot; -> my $key = 'XXXXXXX'; # your key -> my $ip = '....'; the IP you want to check -> my $q = Honeypot::query($key, $ip); - -> use Data::Dumper; -> print Dumper $q; - -Any chance of having this as a plugin? - -I could give it a go, too. Would be fun to try my hand at Perl. --[[simonraven]] - -[[!tag wishlist]] -- cgit v1.2.3 From 4ce14aa621be4c6b8551555395b80b68fbcc1ffe Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 8 Feb 2010 13:49:34 -0500 Subject: nte blogspam --- doc/todo/http_bl_support.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/http_bl_support.mdwn b/doc/todo/http_bl_support.mdwn index 024c770d8..f7a46ee6c 100644 --- a/doc/todo/http_bl_support.mdwn +++ b/doc/todo/http_bl_support.mdwn @@ -2,6 +2,12 @@ [from here](http://projecthoneypot.org/board/read.php?f=10&i=112&t=112) +> The [[plugins/blogspam]] service already checks urls against +> the surbl, and has its own IP blacklist. The best way to +> support the HTTP:BL may be to add a plugin +> [there](http://blogspam.repository.steve.org.uk/file/cc858e497cae/server/plugins/). +> --[[Joey]] + <pre> package Honeypot; -- cgit v1.2.3 From 06a56ea9d51d472175cb9279d92f9fb7a62fdf46 Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Mon, 8 Feb 2010 23:32:05 -0500 Subject: added tip about page navigation from within vim --- doc/tips/follow_wikilinks_from_inside_vim.mdwn | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 doc/tips/follow_wikilinks_from_inside_vim.mdwn (limited to 'doc') diff --git a/doc/tips/follow_wikilinks_from_inside_vim.mdwn b/doc/tips/follow_wikilinks_from_inside_vim.mdwn new file mode 100644 index 000000000..93a95bc7a --- /dev/null +++ b/doc/tips/follow_wikilinks_from_inside_vim.mdwn @@ -0,0 +1,43 @@ +The [ikiwiki-nav](http://www.vim.org/scripts/script.php?script_id=2968) plugin +for vim eases the editing of IkiWiki wikis, by letting you "follow" the +wikilinks on your file (page), and loading the file associated with a given +wikilink in vim. The plugin takes care of following the ikiwiki linking rules +to figure out which file a wikilink points to + +The plugin also includes commands (and mappings) to make the cursor jump to the +previous/next wikilink in the current file + +## Jumping to pages + +To open the file associated to a wikilink, place the cursor over its text, and +hit Enter (`<CR>`). This functionality is also available through the +`:IkiJumpToPage` command + +## Moving to next/previous wikilink in current file + +`Ctrl-j` will move the cursor to the next wikilink. `Ctrl-k` will move it to the +previous wikilink. This functionality is also available through the +`:IkiNextWikiLink` command. This command takes one argument, the direction to +move into + + * `:IkiNextWikiLink 0` will look forward for the wikilink + * `:IkiNextWikiLink 1` will look backwards for the wikilink + +## Current issues: + + * The plugin only works for wikilinks contained in a single text line; + multiline wikilinks are not (yet) seen as such + +## Notes + +The official releases of the plugin are in the +[vim.org script page](http://www.vim.org/scripts/script.php?script_id=2968) + +The latest version of this script can be found in the following location + +<http://git.devnull.li/cgi-bin/gitweb.cgi?p=ikiwiki-nav.git;a=blob;f=ftplugin/ikiwiki_nav.vim;hb=HEAD> + +Any feedback you can provide is appreciated; the contact details can be found +inside the plugin + +[[!tag vim]] -- cgit v1.2.3 From 59868bce02f10e1ed378f5625618198daca58d3a Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Mon, 8 Feb 2010 23:37:24 -0500 Subject: more notes about the ikiwiki-nav plugin added installation notes added pointer in the forum page to the created tip --- doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 4 ++++ doc/tips/follow_wikilinks_from_inside_vim.mdwn | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 0497b66b6..980b92740 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -1,3 +1,7 @@ +**UPDATE** I have created a [[page|tips/follow_wikilinks_from_inside_vim]] in +the tips section about the plugin, how to get it, install it and use it. Check +that out. --[[jerojasro]] + I wrote a vim function to help me navigate the wiki when I'm editing it. It extends the 'gf' (goto file) functionality. Once installed, you place the cursor on a wiki page name and press 'gf' (without the quotes); if the file exists, it gets loaded. This function takes into account the ikiwiki linking rules when deciding which file to go to. diff --git a/doc/tips/follow_wikilinks_from_inside_vim.mdwn b/doc/tips/follow_wikilinks_from_inside_vim.mdwn index 93a95bc7a..df8145a51 100644 --- a/doc/tips/follow_wikilinks_from_inside_vim.mdwn +++ b/doc/tips/follow_wikilinks_from_inside_vim.mdwn @@ -23,6 +23,10 @@ move into * `:IkiNextWikiLink 0` will look forward for the wikilink * `:IkiNextWikiLink 1` will look backwards for the wikilink +## Installation + +Copy the `ikiwiki_nav.vim` file to your `.vim/ftplugin` directory. + ## Current issues: * The plugin only works for wikilinks contained in a single text line; -- cgit v1.2.3 From f48e98a2ac0325f3e17b2c25151aa6af4ba93b20 Mon Sep 17 00:00:00 2001 From: Javier Rojas <jerojasro@devnull.li> Date: Mon, 8 Feb 2010 23:39:06 -0500 Subject: redaction --- doc/tips/follow_wikilinks_from_inside_vim.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/follow_wikilinks_from_inside_vim.mdwn b/doc/tips/follow_wikilinks_from_inside_vim.mdwn index df8145a51..015a4ecee 100644 --- a/doc/tips/follow_wikilinks_from_inside_vim.mdwn +++ b/doc/tips/follow_wikilinks_from_inside_vim.mdwn @@ -1,6 +1,6 @@ The [ikiwiki-nav](http://www.vim.org/scripts/script.php?script_id=2968) plugin for vim eases the editing of IkiWiki wikis, by letting you "follow" the -wikilinks on your file (page), and loading the file associated with a given +wikilinks on your file (page), by loading the file associated with a given wikilink in vim. The plugin takes care of following the ikiwiki linking rules to figure out which file a wikilink points to -- cgit v1.2.3 From 5b55237ab14b9916bf51dff06d9a12c9ad81d21e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 10 Feb 2010 12:51:11 -0500 Subject: add a link to another vim plugin --- doc/tips/vim_syntax_highlighting.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/vim_syntax_highlighting.mdwn b/doc/tips/vim_syntax_highlighting.mdwn index 172b763c3..416318f28 100644 --- a/doc/tips/vim_syntax_highlighting.mdwn +++ b/doc/tips/vim_syntax_highlighting.mdwn @@ -1,4 +1,6 @@ [[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki -[[ikiwiki/markdown]] files. +[[ikiwiki/markdown]] files. Installation instructions are at the top of the file. + +See also: [[navigation_of_wiki_pages_on_local_filesystem_with_vim]] -- cgit v1.2.3 From 99f32638fa768be331dfb20318082f7a49690bf2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 10 Feb 2010 12:52:04 -0500 Subject: question --- doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 980b92740..d3f074c96 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -71,6 +71,9 @@ the plugin has, as of now, two problems: > >> GPL version 2 or later (if that doesn't cause any problems here). I'll add it >> to the file --[[jerojasro]] +>> +>>> I see you've put the plugin on vim.org. Do you think it makes sense to +>>> also include a copy in ikiwiki? --[[Joey]] > > Also, I have a possible other approach for finding ikiwiki's root. One > could consider that any subdirectory of an ikiwiki wiki is itself -- cgit v1.2.3 From 8e75bcd2dc192da1e649ae70c3dd6a181367eb2c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 10 Feb 2010 12:55:46 -0500 Subject: fix --- doc/tips/vim_syntax_highlighting.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/vim_syntax_highlighting.mdwn b/doc/tips/vim_syntax_highlighting.mdwn index 416318f28..18b2f1c92 100644 --- a/doc/tips/vim_syntax_highlighting.mdwn +++ b/doc/tips/vim_syntax_highlighting.mdwn @@ -3,4 +3,5 @@ Installation instructions are at the top of the file. -See also: [[navigation_of_wiki_pages_on_local_filesystem_with_vim]] +See also: [[follow_wikilinks_from_inside_vim]] +[[!tag vim]] -- cgit v1.2.3 From 08b335638c809268697bd97078225ece1065ff1c Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Wed, 10 Feb 2010 19:59:35 +0000 Subject: reply, and suggestion --- .../navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index d3f074c96..781245f03 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -74,6 +74,12 @@ the plugin has, as of now, two problems: >> >>> I see you've put the plugin on vim.org. Do you think it makes sense to >>> also include a copy in ikiwiki? --[[Joey]] +>>> +>>>> mmm, no. There would be two copies of it, and the git repo. I'd rather have +>>>> a unique place for the "official" version (vim.org), and another for the dev +>>>> version (its git repo). +>>>> +>>>> actually, I would also suggest to upload the [[`ikiwiki.vim`|tips/vim_syntax_highlighting]] file to vim.org --[[jerojasro]] > > Also, I have a possible other approach for finding ikiwiki's root. One > could consider that any subdirectory of an ikiwiki wiki is itself -- cgit v1.2.3 From e91e88d68a833361f89a9c2fec119643f1295618 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 10 Feb 2010 15:09:08 -0500 Subject: response --- .../navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 781245f03..6bd2eb110 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -80,7 +80,12 @@ the plugin has, as of now, two problems: >>>> version (its git repo). >>>> >>>> actually, I would also suggest to upload the [[`ikiwiki.vim`|tips/vim_syntax_highlighting]] file to vim.org --[[jerojasro]] -> +>>>>> +>>>>> If you have any interest in maintaining the syntax highlighting +>>>>> plugin and putting it there, I'd be fine with that. I think it needs +>>>>> some slight work to catch up with changes to ikiwiki's directives +>>>>> (!-prefixed now), and wikilinks (able to have spaces now). --[[Joey]] +> > Also, I have a possible other approach for finding ikiwiki's root. One > could consider that any subdirectory of an ikiwiki wiki is itself > a standalone wiki, though probably one missing a toplevel index page. -- cgit v1.2.3 From 8e0c0214bbef5ac67c5bd0a300e44d20f12f02f2 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI" <https://www.google.com/accounts/o8/id?id=AItOawn1lGvpPZ8dpuLSPLPa-jqpMef2KqeB1qI@web> Date: Wed, 10 Feb 2010 23:30:11 +0000 Subject: --- doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn index 6bd2eb110..7bc032949 100644 --- a/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn +++ b/doc/forum/navigation_of_wiki_pages_on_local_filesystem_with_vim.mdwn @@ -84,7 +84,10 @@ the plugin has, as of now, two problems: >>>>> If you have any interest in maintaining the syntax highlighting >>>>> plugin and putting it there, I'd be fine with that. I think it needs >>>>> some slight work to catch up with changes to ikiwiki's directives ->>>>> (!-prefixed now), and wikilinks (able to have spaces now). --[[Joey]] +>>>>> (!-prefixed now), and wikilinks (able to have spaces now). --[[Joey]] +>>>>> +>>>>>> I don't really know too much about syntax definitions in vim. But I'll give it a stab. I know it fails when there are 2 \[[my text|link]] wikilinks in the same page. +>>>>>> I'm not promising anything, though ;) --[[jerojasro]] > > Also, I have a possible other approach for finding ikiwiki's root. One > could consider that any subdirectory of an ikiwiki wiki is itself -- cgit v1.2.3 From 26c68a0c7ae6dd7810a2c4277b6589e03e4e9c47 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Feb 2010 16:28:22 -0500 Subject: refresh patch; remaining problem --- doc/bugs/anonok_vs._httpauth.mdwn | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 1940fdad8..d301b53fb 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -65,7 +65,7 @@ like anonok first. I have not tested this. --[[Joey]] <pre> diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm -index 127c321..c181164 100644 +index 127c321..a18f8ca 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -9,6 +9,8 @@ use IkiWiki 3.00; @@ -77,11 +77,13 @@ index 127c321..c181164 100644 } sub getsetup () { -@@ -33,10 +35,20 @@ sub auth ($$) { +@@ -33,9 +35,21 @@ sub auth ($$) { if (defined $cgi->remote_user()) { $session->param("name", $cgi->remote_user()); } - elsif (defined $config{cgiauthurl}) { +- IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); +- exit; +} + +sub canedit ($$$) { @@ -90,16 +92,29 @@ index 127c321..c181164 100644 + my $session=shift; + + if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { - IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); - exit; - } ++ return sub { ++ IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); ++ exit; ++ }; ++ } + else { + return undef; -+ } -} + } + } - 1 </pre> > With `anonok` enabled, this works for anonymous editing of an > existing Discussion page. auth is still needed to create one. --[[schmonz]] + +>> Refreshed above patch to fix that. --[[Joey]] + +>> Remaining issue: Since both signinedit and httpauth have canedit hooks that +>> run "last", behavior will vary depending on which wins and really goes +>> last. So mixing this with openid or passwordauth won't work yet, though +>> it will work mixed with anonok. +>> +>> Seems like what needs to happen is for httpauth's canedit to run before +>> signinedit's, however it still needs to run relatively late; after eg, +>> anonok's hook. Better hook ordering needed. I knew we'd need it sooner +>> or later! --[[Joey]] -- cgit v1.2.3 From c47712b340153fca4015f8d0e344ced5b12a3e17 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Feb 2010 16:35:55 -0500 Subject: clarify --- doc/bugs/anonok_vs._httpauth.mdwn | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index d301b53fb..b738e3b6c 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -109,12 +109,8 @@ index 127c321..a18f8ca 100644 >> Refreshed above patch to fix that. --[[Joey]] ->> Remaining issue: Since both signinedit and httpauth have canedit hooks that ->> run "last", behavior will vary depending on which wins and really goes ->> last. So mixing this with openid or passwordauth won't work yet, though ->> it will work mixed with anonok. ->> ->> Seems like what needs to happen is for httpauth's canedit to run before ->> signinedit's, however it still needs to run relatively late; after eg, ->> anonok's hook. Better hook ordering needed. I knew we'd need it sooner ->> or later! --[[Joey]] +>> Remaining issue: This patch will work with anonok, but not openid or +>> passwordauth, both of which want to display a login page at the same +>> time that httpauth is redirecting to the cgiauthurl. As mentioned above, +>> the only way to deal with that would be to add a link to the signin page +>> that does the httpauth signin. --[[Joey]] -- cgit v1.2.3 From 046095552ac231366d71a3c7a84bdc6d46662212 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Feb 2010 17:26:09 -0500 Subject: httpauth: When cgiauthurl is configured, httpauth can now be used alongside other authentication methods (like openid or anonok). Rather than always redirect to the cgiauthurl for authentication, there is now a button on the login form to use it. --- IkiWiki/Plugin/httpauth.pm | 35 +++++++++++++++++++++++++++++++---- IkiWiki/Plugin/openid.pm | 2 +- debian/changelog | 4 ++++ doc/bugs/anonok_vs._httpauth.mdwn | 2 ++ doc/plugins/httpauth.mdwn | 9 +++++---- 5 files changed, 43 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index a18f8ca54..d0d4da0b7 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -11,6 +11,8 @@ sub import { hook(type => "auth", id => "httpauth", call => \&auth); hook(type => "canedit", id => "httpauth", call => \&canedit, last => 1); + hook(type => "formbuilder_setup", id => "httpauth", + call => \&formbuilder_setup); } sub getsetup () { @@ -27,6 +29,14 @@ sub getsetup () { rebuild => 0, }, } + +sub redir_cgiauthurl ($$) { + my $cgi=shift; + my $params=shift; + + IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$params); + exit; +} sub auth ($$) { my $cgi=shift; @@ -43,14 +53,31 @@ sub canedit ($$$) { my $session=shift; if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { - return sub { - IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); - exit; - }; + return sub { redir_cgiauthurl($cgi, $cgi->query_string()) }; } else { return undef; } } +sub formbuilder_setup (@) { + my %params=@_; + + my $form=$params{form}; + my $session=$params{session}; + my $cgi=$params{cgi}; + my $buttons=$params{buttons}; + + if ($form->title eq "signin" && + ! defined $cgi->remote_user() && defined $config{cgiauthurl}) { + my $button_text="Login with HTTP auth"; + push @$buttons, $button_text; + + if ($form->submitted && $form->submitted eq $button_text) { + redir_cgiauthurl($cgi, "do=postsignin"); + exit; + } + } +} + 1 diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index b60740c0e..382d8286f 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -56,7 +56,7 @@ sub formbuilder_setup (@) { # OpenID fieldset. $form->fieldsets("OpenID"); - $form->field( + $form->field( name => "openid_url", label => gettext("Log in with")." ".htmllink("", "", "ikiwiki/OpenID", noimageinline => 1), fieldset => "OpenID", diff --git a/debian/changelog b/debian/changelog index 358a5dc5c..3dd68558e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,10 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * Fix color and format plugins to appear in the websetup interface. * amazon_s3: Fix to support the EU S3 datacenter, which is more picky about attempts to create already existing buckets. + * httpauth: When cgiauthurl is configured, httpauth can now be used + alongside other authentication methods (like openid or anonok). Rather + than always redirect to the cgiauthurl for authentication, there is now + a button on the login form to use it. -- Joey Hess <joeyh@debian.org> Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index b738e3b6c..bff37e18b 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -114,3 +114,5 @@ index 127c321..a18f8ca 100644 >> time that httpauth is redirecting to the cgiauthurl. As mentioned above, >> the only way to deal with that would be to add a link to the signin page >> that does the httpauth signin. --[[Joey]] + +>>> That's dealt with in final version. [[done]] --[[Joey]] diff --git a/doc/plugins/httpauth.mdwn b/doc/plugins/httpauth.mdwn index 77796a3d7..a7aac558b 100644 --- a/doc/plugins/httpauth.mdwn +++ b/doc/plugins/httpauth.mdwn @@ -14,10 +14,11 @@ signed into the wiki. This method is suitable only for private wikis. ## separate cgiauthurl To use httpauth for a wiki where the content is public, and where -the `ikiwiki.cgi` needs to be usable without authentication (for searching -and so on), you can configure a separate url that is used for -authentication, via the `cgiauthurl` option in the setup file. This -url will then be redirected to whenever authentication is needed. +the `ikiwiki.cgi` needs to be usable without authentication (for searching, +or logging in using other methods, and so on), you can configure a separate +url that is used for authentication, via the `cgiauthurl` option in the setup +file. This url will then be redirected to when a user chooses to log in using +httpauth. A typical setup is to make an `auth` subdirectory, and symlink `ikiwiki.cgi` into it. Then configure the web server to require authentication only for -- cgit v1.2.3 From e11876b7003c700fbc3717ca9c5af5aac3b72ac2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Feb 2010 18:25:10 -0500 Subject: httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. --- IkiWiki.pm | 7 ++++- IkiWiki/Plugin/httpauth.pm | 75 +++++++++++++++++++++++++++++++++------------- debian/changelog | 2 ++ doc/plugins/httpauth.mdwn | 9 ++++++ 4 files changed, 72 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 2a0132745..de7dbfc79 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -941,7 +941,12 @@ sub linkpage ($) { sub cgiurl (@) { my %params=@_; - return $config{cgiurl}."?". + my $cgiurl=$config{cgiurl}; + if (exists $params{cgiurl}) { + $cgiurl=$params{cgiurl}; + delete $params{cgiurl}; + } + return $cgiurl."?". join("&", map $_."=".uri_escape_utf8($params{$_}), keys %params); } diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index d0d4da0b7..202ca1153 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -9,10 +9,10 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "httpauth", call => \&getsetup); hook(type => "auth", id => "httpauth", call => \&auth); - hook(type => "canedit", id => "httpauth", call => \&canedit, - last => 1); hook(type => "formbuilder_setup", id => "httpauth", call => \&formbuilder_setup); + hook(type => "canedit", id => "httpauth", call => \&canedit); + hook(type => "pagetemplate", id => "httpauth", call => \&pagetemplate); } sub getsetup () { @@ -28,13 +28,20 @@ sub getsetup () { safe => 1, rebuild => 0, }, + httpauth_pagespec => { + type => "pagespec", + example => "!*/Discussion", + description => "PageSpec of pages where only httpauth will be used for authentication", + safe => 0, + rebuild => 0, + }, } -sub redir_cgiauthurl ($$) { +sub redir_cgiauthurl ($;@) { my $cgi=shift; - my $params=shift; - IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$params); + IkiWiki::redirect($cgi, + IkiWiki::cgiurl(cgiurl => $config{cgiauthurl}, @_)); exit; } @@ -47,19 +54,6 @@ sub auth ($$) { } } -sub canedit ($$$) { - my $page=shift; - my $cgi=shift; - my $session=shift; - - if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { - return sub { redir_cgiauthurl($cgi, $cgi->query_string()) }; - } - else { - return undef; - } -} - sub formbuilder_setup (@) { my %params=@_; @@ -74,10 +68,51 @@ sub formbuilder_setup (@) { push @$buttons, $button_text; if ($form->submitted && $form->submitted eq $button_text) { - redir_cgiauthurl($cgi, "do=postsignin"); - exit; + # bounce thru cgiauthurl and then back to + # the stored postsignin action + redir_cgiauthurl($cgi, do => "postsignin"); } } } +sub test_httpauth_pagespec ($) { + my $page=shift; + + return defined $config{httpauth_pagespec} && + length $config{httpauth_pagespec} && + defined $config{cgiauthurl} && + pagespec_match($page, $config{httpauth_pagespec}); +} + +sub canedit ($$$) { + my $page=shift; + my $cgi=shift; + my $session=shift; + + if (! defined $cgi->remote_user() && test_httpauth_pagespec($page)) { + return sub { + IkiWiki::redirect($cgi, + $config{cgiauthurl}.'?'.$cgi->query_string()); + exit; + }; + } + else { + return undef; + } +} + +sub pagetemplate (@_) { + my %params=@_; + my $template=$params{template}; + + if ($template->param("editurl") && + test_httpauth_pagespec($params{page})) { + # go directly to cgiauthurl when editing a page matching + # the pagespec + $template->param(editurl => IkiWiki::cgiurl( + cgiurl => $config{cgiauthurl}, + do => "edit", page => $params{page})); + } +} + 1 diff --git a/debian/changelog b/debian/changelog index 3dd68558e..14be7ec69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low alongside other authentication methods (like openid or anonok). Rather than always redirect to the cgiauthurl for authentication, there is now a button on the login form to use it. + * httpauth: Add httpauth_pagespec setting that can be used to limit + pages to only being edited via users authed with httpauth. -- Joey Hess <joeyh@debian.org> Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/plugins/httpauth.mdwn b/doc/plugins/httpauth.mdwn index a7aac558b..0eda5554f 100644 --- a/doc/plugins/httpauth.mdwn +++ b/doc/plugins/httpauth.mdwn @@ -24,3 +24,12 @@ A typical setup is to make an `auth` subdirectory, and symlink `ikiwiki.cgi` into it. Then configure the web server to require authentication only for access to the `auth` subdirectory. Then `cgiauthurl` is pointed at this symlink. + +## using only httpauth for some pages + +If you want to only use httpauth for editing some pages, while allowing +other authentication methods to be used for other pages, you can +configure `httpauth_pagespec` in the setup file. This makes Edit +links on pages that match the [[ikiwiki/PageSpec]] automatically use +the `cgiauthurl`, and prevents matching pages from being edited by +users authentication via other methods. -- cgit v1.2.3 From c923e0ba3377f85107ccea1933a042aaec675c77 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Feb 2010 20:39:10 -0500 Subject: Allow globs to be used in user() pagespecs. --- IkiWiki.pm | 4 +++- debian/changelog | 1 + doc/ikiwiki/pagespec.mdwn | 3 ++- t/pagespec_match.t | 9 ++++++++- 4 files changed, 14 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index de7dbfc79..a96ff1236 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2266,11 +2266,13 @@ sub match_user ($$;@) { my $user=shift; my %params=@_; + my $regexp=IkiWiki::glob2re($user); + if (! exists $params{user}) { return IkiWiki::ErrorReason->new("no user specified"); } - if (defined $params{user} && lc $params{user} eq lc $user) { + if (defined $params{user} && $params{user}=~/^$regexp$/i) { return IkiWiki::SuccessReason->new("user is $user"); } elsif (! defined $params{user}) { diff --git a/debian/changelog b/debian/changelog index 14be7ec69..d74abd0f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low a button on the login form to use it. * httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. + * Allow globs to be used in user() pagespecs. -- Joey Hess <joeyh@debian.org> Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 5f0f44e2e..8d8b1a507 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -44,7 +44,8 @@ Some more elaborate limits can be added to what matches using these functions: metadata, matching the specified glob. * "`user(username)`" - tests whether a modification is being made by a user with the specified username. If openid is enabled, an openid can also - be put here. + be put here. Glob patterns can be used in the username. For example, + to match all openid users, use `user(*://.*)` * "`admin()`" - tests whether a modification is being made by one of the wiki admins. * "`ip(address)`" - tests whether a modification is being made from the diff --git a/t/pagespec_match.t b/t/pagespec_match.t index b96947407..197ff818b 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 64; +use Test::More tests => 70; BEGIN { use_ok("IkiWiki"); } @@ -40,6 +40,13 @@ ok(! pagespec_match("foo", "foo and bar"), "foo and bar"); ok(pagespec_match("{f}oo", "{*}*"), "curly match"); ok(! pagespec_match("foo", "{*}*"), "curly !match"); +ok(pagespec_match("somepage", "user(frodo)", user => "frodo")); +ok(pagespec_match("somepage", "user(frodo)", user => "Frodo")); +ok(! pagespec_match("somepage", "user(frodo)", user => "Sam")); +ok(pagespec_match("somepage", "user(*o)", user => "Bilbo")); +ok(pagespec_match("somepage", "user(*o)", user => "frodo")); +ok(! pagespec_match("somepage", "user(*o)", user => "Sam")); + # The link and backlink stuff needs this. $config{userdir}=""; $links{foo}=[qw{bar baz}]; -- cgit v1.2.3 From a63929f6cc7778ffc4ba57d784cdf2206ec650c7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Feb 2010 22:24:15 -0500 Subject: Group related plugins into sections in the setup file, and drop unused rcs plugins from the setup file. --- IkiWiki/Plugin/anonok.pm | 1 + IkiWiki/Plugin/blogspam.pm | 1 + IkiWiki/Plugin/bzr.pm | 1 + IkiWiki/Plugin/conditional.pm | 1 + IkiWiki/Plugin/cvs.pm | 1 + IkiWiki/Plugin/darcs.pm | 1 + IkiWiki/Plugin/editpage.pm | 1 + IkiWiki/Plugin/git.pm | 1 + IkiWiki/Plugin/htmlscrubber.pm | 1 + IkiWiki/Plugin/httpauth.pm | 1 + IkiWiki/Plugin/inline.pm | 1 + IkiWiki/Plugin/link.pm | 1 + IkiWiki/Plugin/lockedit.pm | 1 + IkiWiki/Plugin/mdwn.pm | 1 + IkiWiki/Plugin/mercurial.pm | 1 + IkiWiki/Plugin/meta.pm | 1 + IkiWiki/Plugin/moderatedcomments.pm | 1 + IkiWiki/Plugin/monotone.pm | 1 + IkiWiki/Plugin/opendiscussion.pm | 1 + IkiWiki/Plugin/openid.pm | 1 + IkiWiki/Plugin/parentlinks.pm | 1 + IkiWiki/Plugin/passwordauth.pm | 1 + IkiWiki/Plugin/recentchanges.pm | 1 + IkiWiki/Plugin/signinedit.pm | 1 + IkiWiki/Plugin/svn.pm | 1 + IkiWiki/Plugin/tla.pm | 1 + IkiWiki/Setup.pm | 32 ++++++++++++++++++++++++++------ IkiWiki/Setup/Standard.pm | 8 ++++++++ debian/changelog | 2 ++ doc/plugins/write.mdwn | 13 ++++++++----- 30 files changed, 70 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/anonok.pm b/IkiWiki/Plugin/anonok.pm index 243b98920..0e74cbfad 100644 --- a/IkiWiki/Plugin/anonok.pm +++ b/IkiWiki/Plugin/anonok.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, anonok_pagespec => { type => "pagespec", diff --git a/IkiWiki/Plugin/blogspam.pm b/IkiWiki/Plugin/blogspam.pm index 626c8ec42..c4e5cf390 100644 --- a/IkiWiki/Plugin/blogspam.pm +++ b/IkiWiki/Plugin/blogspam.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, blogspam_pagespec => { type => 'pagespec', diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 883007367..1ffdc2353 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -36,6 +36,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, bzr_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm index aad617812..beeddc672 100644 --- a/IkiWiki/Plugin/conditional.pm +++ b/IkiWiki/Plugin/conditional.pm @@ -16,6 +16,7 @@ sub getsetup { plugin => { safe => 1, rebuild => undef, + section => "core", }, } diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index f6db8bc98..26a3e9dd2 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -85,6 +85,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, cvsrepo => { type => "string", diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index 0d68f27e5..1c9538e83 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -92,6 +92,7 @@ sub getsetup() { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, darcs_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 9211cca89..44fe5514a 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, } diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 1eec6aee6..b02f4a5ed 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -68,6 +68,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, git_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index a249cdf7a..ee284a45c 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -40,6 +40,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "core", }, htmlscrubber_skip => { type => "pagespec", diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index b2bb2701a..478f67446 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, cgiauthurl => { type => "string", diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 401852513..44919e58c 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -49,6 +49,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "core", }, rss => { type => "boolean", diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm index 4c1add985..3838aec09 100644 --- a/IkiWiki/Plugin/link.pm +++ b/IkiWiki/Plugin/link.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, } diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm index 74ddbb153..1466e8337 100644 --- a/IkiWiki/Plugin/lockedit.pm +++ b/IkiWiki/Plugin/lockedit.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, locked_pages => { type => "pagespec", diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 3de59ef3d..4ddf097ba 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "core", }, multimarkdown => { type => "boolean", diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index 11fdec529..ea00a3364 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -36,6 +36,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, mercurial_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 55c9ddbd1..5f046cb2a 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "core", }, } diff --git a/IkiWiki/Plugin/moderatedcomments.pm b/IkiWiki/Plugin/moderatedcomments.pm index 2555927b7..afe1ceedf 100644 --- a/IkiWiki/Plugin/moderatedcomments.pm +++ b/IkiWiki/Plugin/moderatedcomments.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, moderate_users => { type => 'boolean', diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index 9502804f1..c33cf7e3a 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -68,6 +68,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, mtn_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 5a455940b..2805f60ef 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, } diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index 382d8286f..bb99446b4 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -26,6 +26,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, openidsignup => { type => "string", diff --git a/IkiWiki/Plugin/parentlinks.pm b/IkiWiki/Plugin/parentlinks.pm index e678a057d..728bbc399 100644 --- a/IkiWiki/Plugin/parentlinks.pm +++ b/IkiWiki/Plugin/parentlinks.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, } diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index c07065b7d..4848b47bb 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, account_creation_password => { type => "string", diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 5c7b71aaa..04219b721 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -22,6 +22,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, recentchangespage => { type => "string", diff --git a/IkiWiki/Plugin/signinedit.pm b/IkiWiki/Plugin/signinedit.pm index 8b44a68f7..31160c02f 100644 --- a/IkiWiki/Plugin/signinedit.pm +++ b/IkiWiki/Plugin/signinedit.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, } diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 06b987f51..7d27ec842 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -44,6 +44,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, svnrepo => { type => "string", diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index f4b20a6ec..16d73b136 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -34,6 +34,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, tla_wrapper => { type => "string", diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 8a25ecc57..b21bd7bfe 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -77,7 +77,6 @@ sub merge ($) { sub getsetup () { # Gets all available setup data from all plugins. Returns an # ordered list of [plugin, setup] pairs. - my @ret; # disable logging to syslog while dumping, broken plugins may # whine when loaded @@ -85,27 +84,48 @@ sub getsetup () { $config{syslog}=undef; # Load all plugins, so that all setup options are available. - my @plugins=grep { $_ ne $config{rcs} } sort(IkiWiki::listplugins()); - unshift @plugins, $config{rcs} if $config{rcs}; # rcs plugin 1st + my @plugins=IkiWiki::listplugins(); foreach my $plugin (@plugins) { eval { IkiWiki::loadplugin($plugin) }; if (exists $IkiWiki::hooks{checkconfig}{$plugin}{call}) { my @s=eval { $IkiWiki::hooks{checkconfig}{$plugin}{call}->() }; } } - + + my %sections; foreach my $plugin (@plugins) { if (exists $IkiWiki::hooks{getsetup}{$plugin}{call}) { # use an array rather than a hash, to preserve order my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() }; next unless @s; - push @ret, [ $plugin, \@s ], + + # set default section value (note use of shared + # hashref between array and hash) + my %s=@s; + if (! exists $s{plugin} || ! $s{plugin}->{section}) { + $s{plugin}->{section}="misc"; + } + + # only the selected rcs plugin is included + if ($config{rcs} && $plugin eq $config{rcs}) { + $s{plugin}->{section}="core"; + } + elsif ($s{plugin}->{section} eq "rcs") { + next; + } + + push @{$sections{$s{plugin}->{section}}}, [ $plugin, \@s ]; } } $config{syslog}=$syslog; - return @ret; + return map { sort { $a->[0] cmp $b->[0] } @{$sections{$_}} } + sort { # core first, then alphabetical + ($b eq "core") <=> ($a eq "core") + || + $a cmp $b + } keys %sections; } sub dump ($) { diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 951bcfc56..c99dbb620 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -90,10 +90,18 @@ sub gendump ($) { # disable logging to syslog while dumping $config{syslog}=undef; + my $curr_section; push @ret, dumpvalues(\%setup, IkiWiki::getsetup()); foreach my $pair (IkiWiki::Setup::getsetup()) { my $plugin=$pair->[0]; my $setup=$pair->[1]; + my %s=@{$setup}; + my $section=$s{plugin}->{section}; + if (! defined $curr_section || $curr_section ne $section) { + $curr_section=$section; + push @ret, "", "\t#", "\t# $section plugins", "\t#"; + } + my @values=dumpvalues(\%setup, @{$setup}); if (@values) { push @ret, "", "\t# $plugin plugin", @values; diff --git a/debian/changelog b/debian/changelog index d74abd0f9..f24a453c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. * Allow globs to be used in user() pagespecs. + * Group related plugins into sections in the setup file, and drop + unused rcs plugins from the setup file. -- Joey Hess <joeyh@debian.org> Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 082f0e38f..68454d56c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -457,6 +457,12 @@ describing the option. There can also be an item named "plugin", which describes the plugin as a whole. For example: return + plugin => { + description => "description of this plugin", + safe => 1, + rebuild => 1, + section => "misc", + }, option_foo => { type => "boolean", description => "enable foo?", @@ -471,11 +477,6 @@ describes the plugin as a whole. For example: safe => 1, rebuild => 0, }, - plugin => { - description => "description of this plugin", - safe => 1, - rebuild => 1, - }, * `type` can be "boolean", "string", "integer", "pagespec", or "internal" (used for values that are not user-visible). The type is @@ -496,6 +497,8 @@ describes the plugin as a whole. For example: the plugin) will require a wiki rebuild, false if no rebuild is needed, and undef if a rebuild could be needed in some circumstances, but is not strictly required. +* `section` can optionally specify which section in the config file + the plugin fits in. ### genwrapper -- cgit v1.2.3 From e091fab0e742c3e3f9029c86d47c858e286becf3 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Feb 2010 22:42:10 -0500 Subject: fix openid pagespec example --- doc/ikiwiki/pagespec.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 8d8b1a507..5c191f23f 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -45,7 +45,7 @@ Some more elaborate limits can be added to what matches using these functions: * "`user(username)`" - tests whether a modification is being made by a user with the specified username. If openid is enabled, an openid can also be put here. Glob patterns can be used in the username. For example, - to match all openid users, use `user(*://.*)` + to match all openid users, use `user(*://*)` * "`admin()`" - tests whether a modification is being made by one of the wiki admins. * "`ip(address)`" - tests whether a modification is being made from the -- cgit v1.2.3 From 9cee2962e01ef0538cc8498951867a543f91b47d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 01:10:36 -0500 Subject: format plugin categorization --- IkiWiki/Plugin/creole.pm | 1 + IkiWiki/Plugin/highlight.pm | 1 + IkiWiki/Plugin/hnb.pm | 1 + IkiWiki/Plugin/html.pm | 1 + IkiWiki/Plugin/mdwn.pm | 2 +- IkiWiki/Plugin/otl.pm | 1 + IkiWiki/Plugin/po.pm | 3 ++- IkiWiki/Plugin/rawhtml.pm | 1 + IkiWiki/Plugin/textile.pm | 1 + IkiWiki/Plugin/txt.pm | 1 + IkiWiki/Plugin/wikitext.pm | 1 + doc/plugins/conditional.mdwn | 2 +- doc/plugins/format.mdwn | 2 +- doc/plugins/graphviz.mdwn | 2 +- doc/plugins/more.mdwn | 2 +- doc/plugins/shortcut.mdwn | 2 +- doc/plugins/table.mdwn | 2 +- doc/plugins/template.mdwn | 2 +- doc/plugins/typography.mdwn | 2 +- plugins/rst | 2 +- 20 files changed, 21 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/creole.pm b/IkiWiki/Plugin/creole.pm index 425e71043..a1e4b31d3 100644 --- a/IkiWiki/Plugin/creole.pm +++ b/IkiWiki/Plugin/creole.pm @@ -17,6 +17,7 @@ sub getsetup { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index 9bdde85ae..947fb692e 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -23,6 +23,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, tohighlight => { type => "string", diff --git a/IkiWiki/Plugin/hnb.pm b/IkiWiki/Plugin/hnb.pm index bd2177a06..32c9cf3ad 100644 --- a/IkiWiki/Plugin/hnb.pm +++ b/IkiWiki/Plugin/hnb.pm @@ -23,6 +23,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/html.pm b/IkiWiki/Plugin/html.pm index a7d5e8ce9..4dbae081b 100644 --- a/IkiWiki/Plugin/html.pm +++ b/IkiWiki/Plugin/html.pm @@ -21,6 +21,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 4ddf097ba..b892eabee 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -16,7 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin - section => "core", + section => "format", }, multimarkdown => { type => "boolean", diff --git a/IkiWiki/Plugin/otl.pm b/IkiWiki/Plugin/otl.pm index 3ab2441bf..3801a6ec2 100644 --- a/IkiWiki/Plugin/otl.pm +++ b/IkiWiki/Plugin/otl.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index f8801185e..2cbfb0a45 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -85,7 +85,8 @@ sub getsetup () { return plugin => { safe => 0, - rebuild => 1, + rebuild => 1, # format plugin + section => "format", }, po_master_language => { type => "string", diff --git a/IkiWiki/Plugin/rawhtml.pm b/IkiWiki/Plugin/rawhtml.pm index ad8a610c1..0838bcb22 100644 --- a/IkiWiki/Plugin/rawhtml.pm +++ b/IkiWiki/Plugin/rawhtml.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # changes file types + section => "format", }, } diff --git a/IkiWiki/Plugin/textile.pm b/IkiWiki/Plugin/textile.pm index 8cc5a7951..56bb4bffc 100644 --- a/IkiWiki/Plugin/textile.pm +++ b/IkiWiki/Plugin/textile.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index 8599bdc8e..1ed9f0856 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -29,6 +29,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/wikitext.pm b/IkiWiki/Plugin/wikitext.pm index accb03bbe..b24630b15 100644 --- a/IkiWiki/Plugin/wikitext.pm +++ b/IkiWiki/Plugin/wikitext.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 0, # format plugin rebuild => undef, + section => "format", }, } diff --git a/doc/plugins/conditional.mdwn b/doc/plugins/conditional.mdwn index 95ffb2764..27a99bb7c 100644 --- a/doc/plugins/conditional.mdwn +++ b/doc/plugins/conditional.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=conditional core=1 author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/special-purpose]] This plugin provides the [[ikiwiki/directive/if]] [[ikiwiki/directive]]. With this directive, you can make text be conditionally displayed on a page. diff --git a/doc/plugins/format.mdwn b/doc/plugins/format.mdwn index 91e707fcf..5ec0842ae 100644 --- a/doc/plugins/format.mdwn +++ b/doc/plugins/format.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=format core=0 author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin allows mixing different page formats together, by embedding text formatted one way inside a page formatted another way. This is done diff --git a/doc/plugins/graphviz.mdwn b/doc/plugins/graphviz.mdwn index b89f16b59..8237ae9dc 100644 --- a/doc/plugins/graphviz.mdwn +++ b/doc/plugins/graphviz.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=graphviz author="[[JoshTriplett]]"]] -[[!tag type/chrome type/format]] +[[!tag type/chrome]] This plugin provides the [[ikiwiki/directive/graph]] [[ikiwiki/directive]]. This directive allows embedding [graphviz](http://www.graphviz.org/) graphs in a diff --git a/doc/plugins/more.mdwn b/doc/plugins/more.mdwn index e9a971289..81a9e67e8 100644 --- a/doc/plugins/more.mdwn +++ b/doc/plugins/more.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=more author="Ben"]] -[[!tag type/format]] +[[!tag type/chrome]] This plugin provides the [[ikiwiki/directive/more]] [[ikiwiki/directive]], which is a way to have a "more" link on a post in a blog, that leads to the diff --git a/doc/plugins/shortcut.mdwn b/doc/plugins/shortcut.mdwn index cca1f4bdd..68896f4d3 100644 --- a/doc/plugins/shortcut.mdwn +++ b/doc/plugins/shortcut.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=shortcut author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin provides the [[ikiwiki/directive/shortcut]] [[ikiwiki/directive]]. It allows external links to commonly linked to sites to be made diff --git a/doc/plugins/table.mdwn b/doc/plugins/table.mdwn index 10a85bb2c..fb830044f 100644 --- a/doc/plugins/table.mdwn +++ b/doc/plugins/table.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=table author="[[VictorMoral]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin provides the [[ikiwiki/directive/table]] [[ikiwiki/directive]]. It can build HTML tables from data in CSV (comma-separated values) diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn index 3485fe64c..6675207b2 100644 --- a/doc/plugins/template.mdwn +++ b/doc/plugins/template.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=template author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin provides the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. With this plugin, you can set up templates, and cause them to be filled out diff --git a/doc/plugins/typography.mdwn b/doc/plugins/typography.mdwn index 030ef8052..9ff6c4ffd 100644 --- a/doc/plugins/typography.mdwn +++ b/doc/plugins/typography.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=typography author="[[Roktas]]"]] -[[!tag type/format]] +[[!tag type/chrome]] This plugin, also known as [SmartyPants](http://daringfireball.net/projects/smartypants/), translates diff --git a/plugins/rst b/plugins/rst index 9f64b33a0..838667507 100755 --- a/plugins/rst +++ b/plugins/rst @@ -33,7 +33,7 @@ def _to_dict(args): return dict((k, v) for k, v in zip(*[iter(args)]*2)) def getsetup(proxy, *kwargs): - return 'plugin', { 'safe' : 1, 'rebuild' : 1 } + return 'plugin', { 'safe' : 1, 'rebuild' : 1, 'section' : 'format' } import sys def debug(s): -- cgit v1.2.3 From 04a99c84406d7b1552b15fc0b5ea598644f94c23 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 03:38:00 -0500 Subject: plugin tag reorg --- doc/plugins/404.mdwn | 2 +- doc/plugins/aggregate.mdwn | 2 +- doc/plugins/autoindex.mdwn | 2 +- doc/plugins/calendar.mdwn | 2 +- doc/plugins/color.mdwn | 2 +- doc/plugins/comments.mdwn | 2 +- doc/plugins/contrib/postal.mdwn | 2 +- doc/plugins/cutpaste.mdwn | 2 +- doc/plugins/ddate.mdwn | 1 + doc/plugins/filecheck.mdwn | 2 +- doc/plugins/format.mdwn | 2 +- doc/plugins/fortune.mdwn | 1 + doc/plugins/goto.mdwn | 2 +- doc/plugins/graphviz.mdwn | 2 +- doc/plugins/haiku.mdwn | 1 + doc/plugins/img.mdwn | 2 +- doc/plugins/mirrorlist.mdwn | 2 +- doc/plugins/more.mdwn | 2 +- doc/plugins/poll.mdwn | 2 +- doc/plugins/polygen.mdwn | 1 + doc/plugins/prettydate.mdwn | 1 + doc/plugins/relativedate.mdwn | 1 + doc/plugins/repolist.mdwn | 2 +- doc/plugins/shortcut.mdwn | 2 +- doc/plugins/sparkline.mdwn | 2 +- doc/plugins/table.mdwn | 2 +- doc/plugins/template.mdwn | 2 +- doc/plugins/testpagespec.mdwn | 2 +- doc/plugins/teximg.mdwn | 2 +- doc/plugins/toc.mdwn | 2 +- doc/plugins/toggle.mdwn | 2 +- doc/plugins/type/chrome.mdwn | 2 +- doc/plugins/type/useful.mdwn | 1 - doc/plugins/type/widget.mdwn | 2 ++ doc/plugins/underlay.mdwn | 18 +++++++++--------- doc/plugins/wmd.mdwn | 2 +- 36 files changed, 44 insertions(+), 37 deletions(-) delete mode 100644 doc/plugins/type/useful.mdwn create mode 100644 doc/plugins/type/widget.mdwn (limited to 'doc') diff --git a/doc/plugins/404.mdwn b/doc/plugins/404.mdwn index ad332ee04..53dace3c9 100644 --- a/doc/plugins/404.mdwn +++ b/doc/plugins/404.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=404 author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin lets you use the IkiWiki CGI script as an Apache 404 handler, to give the behaviour of various other wiki engines where visiting a diff --git a/doc/plugins/aggregate.mdwn b/doc/plugins/aggregate.mdwn index e2efcd83f..bb828b05c 100644 --- a/doc/plugins/aggregate.mdwn +++ b/doc/plugins/aggregate.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=aggregate author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin allows content from other feeds to be aggregated into the wiki. To specify feeds to aggregate, use the diff --git a/doc/plugins/autoindex.mdwn b/doc/plugins/autoindex.mdwn index 03e2d12f3..d1133e4f5 100644 --- a/doc/plugins/autoindex.mdwn +++ b/doc/plugins/autoindex.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=autoindex core=0 author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin searches for [[SubPages|ikiwiki/subpage]] with a missing parent page, and generates the parent pages. The generated page content is diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index bc1bc6c71..49fd90627 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=calendar author="[[ManojSrivastava]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides a [[ikiwiki/directive/calendar]] [[ikiwiki/directive]]. The directive displays a calendar, similar to the typical calendars shown on diff --git a/doc/plugins/color.mdwn b/doc/plugins/color.mdwn index dbb8b870c..d639bf563 100644 --- a/doc/plugins/color.mdwn +++ b/doc/plugins/color.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=color core=0 author="[[ptecza]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides a [[ikiwiki/directive/color]] [[ikiwiki/directive]]. The directive can be used to color a piece of text on a page. diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn index f933d32be..775ef75a0 100644 --- a/doc/plugins/comments.mdwn +++ b/doc/plugins/comments.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=comments author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin adds "blog-style" comments. Unlike the wiki-style freeform Discussion pages, these comments are posted by a simple form, cannot later diff --git a/doc/plugins/contrib/postal.mdwn b/doc/plugins/contrib/postal.mdwn index b2f875393..c522f8bcb 100644 --- a/doc/plugins/contrib/postal.mdwn +++ b/doc/plugins/contrib/postal.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=postal author="[[DavidBremner]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] The `postal` plugin allows users to send mail to a special address to comment on a page. It uses the [[mailbox]] diff --git a/doc/plugins/cutpaste.mdwn b/doc/plugins/cutpaste.mdwn index f74f8a269..ea3665c44 100644 --- a/doc/plugins/cutpaste.mdwn +++ b/doc/plugins/cutpaste.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=cutpaste author="[[Enrico]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/cut]], [[ikiwiki/directive/copy]] and [[ikiwiki/directive/paste]] diff --git a/doc/plugins/ddate.mdwn b/doc/plugins/ddate.mdwn index 741606a6e..17bb16cff 100644 --- a/doc/plugins/ddate.mdwn +++ b/doc/plugins/ddate.mdwn @@ -1,6 +1,7 @@ [[!template id=plugin name=ddate author="[[Joey]]"]] [[!tag type/fun]] [[!tag type/date]] +[[!tag type/chrome]] Enables use of Discordian dates. `--timeformat` can be used to change the date format; see `ddate(1)`. diff --git a/doc/plugins/filecheck.mdwn b/doc/plugins/filecheck.mdwn index f4563d58e..e5f68b29c 100644 --- a/doc/plugins/filecheck.mdwn +++ b/doc/plugins/filecheck.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=filecheck core=0 author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin enhances the regular [[ikiwiki/PageSpec]] syntax with some additional tests, for things like file size, mime type, and virus diff --git a/doc/plugins/format.mdwn b/doc/plugins/format.mdwn index 5ec0842ae..b41d365aa 100644 --- a/doc/plugins/format.mdwn +++ b/doc/plugins/format.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=format core=0 author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin allows mixing different page formats together, by embedding text formatted one way inside a page formatted another way. This is done diff --git a/doc/plugins/fortune.mdwn b/doc/plugins/fortune.mdwn index 9966f456d..3cb125ac1 100644 --- a/doc/plugins/fortune.mdwn +++ b/doc/plugins/fortune.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=fortune author="[[Joey]]"]] [[!tag type/fun]] +[[!tag type/widget]] This plugin implements the [[ikiwiki/directive/fortune]] [[ikiwiki/directive]]. This directive uses the `fortune` program to insert a fortune into the page. diff --git a/doc/plugins/goto.mdwn b/doc/plugins/goto.mdwn index 9c401c5d2..8e1de7a10 100644 --- a/doc/plugins/goto.mdwn +++ b/doc/plugins/goto.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=goto author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin adds a `do=goto` mode for the IkiWiki CGI script. It's mainly for internal use by the [[404]], [[comments]] and [[recentchanges]] diff --git a/doc/plugins/graphviz.mdwn b/doc/plugins/graphviz.mdwn index 8237ae9dc..65130ae8c 100644 --- a/doc/plugins/graphviz.mdwn +++ b/doc/plugins/graphviz.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=graphviz author="[[JoshTriplett]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/graph]] [[ikiwiki/directive]]. This directive allows embedding [graphviz](http://www.graphviz.org/) graphs in a diff --git a/doc/plugins/haiku.mdwn b/doc/plugins/haiku.mdwn index 74eac1c29..448733d95 100644 --- a/doc/plugins/haiku.mdwn +++ b/doc/plugins/haiku.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=haiku author="[[Joey]]"]] [[!tag type/fun]] +[[!tag type/widget]] This plugin provides a [[ikiwiki/directive/haiku]] [[ikiwiki/directive]]. The directive allows inserting a randomly generated haiku into a wiki page. diff --git a/doc/plugins/img.mdwn b/doc/plugins/img.mdwn index 114438765..a6cd90f28 100644 --- a/doc/plugins/img.mdwn +++ b/doc/plugins/img.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=img author="Christian Mock"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/img]] [[ikiwiki/directive]]. While ikiwiki supports inlining full-size images by making a diff --git a/doc/plugins/mirrorlist.mdwn b/doc/plugins/mirrorlist.mdwn index b371e8eb7..6e4964ed1 100644 --- a/doc/plugins/mirrorlist.mdwn +++ b/doc/plugins/mirrorlist.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=mirror author="[[Joey]]"]] -[[!tag type/special-purpose]] +[[!tag type/chrome]] This plugin allows adding links a list of mirrors to each page in the wiki. For each mirror, a name and an url should be specified. Pages are diff --git a/doc/plugins/more.mdwn b/doc/plugins/more.mdwn index 81a9e67e8..a0664e843 100644 --- a/doc/plugins/more.mdwn +++ b/doc/plugins/more.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=more author="Ben"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/more]] [[ikiwiki/directive]], which is a way to have a "more" link on a post in a blog, that leads to the diff --git a/doc/plugins/poll.mdwn b/doc/plugins/poll.mdwn index 510f67798..099cb399c 100644 --- a/doc/plugins/poll.mdwn +++ b/doc/plugins/poll.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=poll author="[[Joey]]"]] -[[!tag type/web]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/poll]] [[ikiwiki/directive]], which allows inserting an online poll into a page. diff --git a/doc/plugins/polygen.mdwn b/doc/plugins/polygen.mdwn index 6045c1ec9..f9cea1f4d 100644 --- a/doc/plugins/polygen.mdwn +++ b/doc/plugins/polygen.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=polygen author="Enrico Zini"]] [[!tag type/fun]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/polygen]] [[ikiwiki/directive]], which allows inserting text generated by polygen into a wiki page. diff --git a/doc/plugins/prettydate.mdwn b/doc/plugins/prettydate.mdwn index 11ad4252f..149b7c29c 100644 --- a/doc/plugins/prettydate.mdwn +++ b/doc/plugins/prettydate.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=prettydate author="[[Joey]]"]] [[!tag type/date]] +[[!tag type/chrome]] Enabling this plugin changes the dates displayed on pages in the wiki to a format that is nice and easy to read. Examples: "late Wednesday evening, diff --git a/doc/plugins/relativedate.mdwn b/doc/plugins/relativedate.mdwn index 50c96c5d7..d6e8eb08b 100644 --- a/doc/plugins/relativedate.mdwn +++ b/doc/plugins/relativedate.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=relativedate author="[[Joey]]"]] [[!tag type/date]] +[[!tag type/chrome]] This plugin lets dates be displayed in relative form. Examples: "2 days ago", "1 month and 3 days ago", "30 minutes ago". Hovering over the date will diff --git a/doc/plugins/repolist.mdwn b/doc/plugins/repolist.mdwn index 9b3a7575e..efd9c9352 100644 --- a/doc/plugins/repolist.mdwn +++ b/doc/plugins/repolist.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=repolist author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin allows you to configure ikiwiki with the location of [[rcs]] repositories for your wiki's source. This is done via the diff --git a/doc/plugins/shortcut.mdwn b/doc/plugins/shortcut.mdwn index 68896f4d3..1e8e85ed8 100644 --- a/doc/plugins/shortcut.mdwn +++ b/doc/plugins/shortcut.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=shortcut author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/shortcut]] [[ikiwiki/directive]]. It allows external links to commonly linked to sites to be made diff --git a/doc/plugins/sparkline.mdwn b/doc/plugins/sparkline.mdwn index bcc5daec6..ee3928d7e 100644 --- a/doc/plugins/sparkline.mdwn +++ b/doc/plugins/sparkline.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=sparkline author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/sparkline]] [[ikiwiki/directive]], which allows for easily embedding sparklines into diff --git a/doc/plugins/table.mdwn b/doc/plugins/table.mdwn index fb830044f..fe66f90a8 100644 --- a/doc/plugins/table.mdwn +++ b/doc/plugins/table.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=table author="[[VictorMoral]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/table]] [[ikiwiki/directive]]. It can build HTML tables from data in CSV (comma-separated values) diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn index 6675207b2..da775f232 100644 --- a/doc/plugins/template.mdwn +++ b/doc/plugins/template.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=template author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. With this plugin, you can set up templates, and cause them to be filled out diff --git a/doc/plugins/testpagespec.mdwn b/doc/plugins/testpagespec.mdwn index dabcb0bec..8180d5d4b 100644 --- a/doc/plugins/testpagespec.mdwn +++ b/doc/plugins/testpagespec.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=testpagespec author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin provides a [[ikiwiki/directive/testpagespec]] [[ikiwiki/directive]]. The directive allows testing a [[ikiwiki/PageSpec]] to see if it matches a diff --git a/doc/plugins/teximg.mdwn b/doc/plugins/teximg.mdwn index ae052837f..f3cade85f 100644 --- a/doc/plugins/teximg.mdwn +++ b/doc/plugins/teximg.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=teximg author="[[PatrickWinnertz]]"]] -[[!tag type/chrome type/slow]] +[[!tag type/widget type/slow]] This plugin provides a [[ikiwiki/directive/teximg]] [[ikiwiki/directive]], that renders LaTeX formulas into images. diff --git a/doc/plugins/toc.mdwn b/doc/plugins/toc.mdwn index 2b7686681..a0ad3a5d0 100644 --- a/doc/plugins/toc.mdwn +++ b/doc/plugins/toc.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=toc author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/toc]] [[ikiwiki/directive]], which adds a table of contents to a page. diff --git a/doc/plugins/toggle.mdwn b/doc/plugins/toggle.mdwn index 69ac613e0..d1500eba0 100644 --- a/doc/plugins/toggle.mdwn +++ b/doc/plugins/toggle.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=toggle author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/toggle]] and [[ikiwiki/directive/toggleable]] [[directives|ikiwiki/directive]]. diff --git a/doc/plugins/type/chrome.mdwn b/doc/plugins/type/chrome.mdwn index d3f0eb3d3..a1c6d0728 100644 --- a/doc/plugins/type/chrome.mdwn +++ b/doc/plugins/type/chrome.mdwn @@ -1 +1 @@ -These plugins affect the look and feel of the wiki. +These plugins affect the look and feel of the overall wiki. diff --git a/doc/plugins/type/useful.mdwn b/doc/plugins/type/useful.mdwn deleted file mode 100644 index 92fcf5af1..000000000 --- a/doc/plugins/type/useful.mdwn +++ /dev/null @@ -1 +0,0 @@ -These plugins perform various miscellaneous useful functions. diff --git a/doc/plugins/type/widget.mdwn b/doc/plugins/type/widget.mdwn new file mode 100644 index 000000000..875829d0b --- /dev/null +++ b/doc/plugins/type/widget.mdwn @@ -0,0 +1,2 @@ +These plugins allow inserting various things into pages via a +[[ikiwiki/directive]]. diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn index f7eafee7c..8836a394c 100644 --- a/doc/plugins/underlay.mdwn +++ b/doc/plugins/underlay.mdwn @@ -1,17 +1,17 @@ [[!template id=plugin name=underlay author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] -This plugin adds an `add_underlays` option to the setup file. -Its value is a list of underlay directories whose content is added to the wiki. +This plugin adds an `add_underlays` option to the setup file. Its value is +a list of underlay directories whose content is added to the wiki. Multiple underlays are normally set up automatically by other plugins (for -instance, the images used by the [[plugins/smiley]] plugin), but they can also be -used as a way to pull in external files that you don't want in revision control, -like photos or software releases. +instance, the images used by the [[plugins/smiley]] plugin), but they can +also be used as a way to pull in external files that you don't want in +revision control, like photos or software releases. -Directories in `add_underlays` should usually be absolute. If relative, they're -interpreted as relative to the parent directory of the basewiki underlay, which -is probably not particularly useful in this context. +Directories in `add_underlays` should usually be absolute. If relative, +they're interpreted as relative to the parent directory of the basewiki +underlay, which is probably not particularly useful in this context. -- diff --git a/doc/plugins/wmd.mdwn b/doc/plugins/wmd.mdwn index dc9a30703..96c6e2e6c 100644 --- a/doc/plugins/wmd.mdwn +++ b/doc/plugins/wmd.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=wmd author="[[Will]]"]] -[[!tag type/chrome]] +[[!tag type/web]] [WMD](http://wmd-editor.com/) is a What You See Is What You Mean editor for [[mdwn]]. This plugin makes WMD be used for editing pages in the wiki. -- cgit v1.2.3 From 3ce8030dafc40a8188f6a32567c04d157b0ac39f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 03:43:01 -0500 Subject: more tag reorg --- doc/plugins/date.mdwn | 2 +- doc/plugins/linkmap.mdwn | 1 + doc/plugins/listdirectives.mdwn | 1 + doc/plugins/orphans.mdwn | 1 + doc/plugins/pagecount.mdwn | 1 + doc/plugins/pagestats.mdwn | 2 +- doc/plugins/progress.mdwn | 2 +- doc/plugins/version.mdwn | 1 + 8 files changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/plugins/date.mdwn b/doc/plugins/date.mdwn index b8dbdfee5..2a33f014c 100644 --- a/doc/plugins/date.mdwn +++ b/doc/plugins/date.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=date author="[[Joey]]"]] -[[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/date]] [[ikiwiki/directive]], which provides a way to display an arbitrary date diff --git a/doc/plugins/linkmap.mdwn b/doc/plugins/linkmap.mdwn index 89cb9d8ae..7e51cd935 100644 --- a/doc/plugins/linkmap.mdwn +++ b/doc/plugins/linkmap.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=linkmap author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] [[!tag type/slow]] This plugin provides the [[ikiwiki/directive/linkmap]] [[ikiwiki/directive]]. diff --git a/doc/plugins/listdirectives.mdwn b/doc/plugins/listdirectives.mdwn index 2d9bce01d..df854de52 100644 --- a/doc/plugins/listdirectives.mdwn +++ b/doc/plugins/listdirectives.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=listdirectives author="Will"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/listdirectives]] [[ikiwiki/directive]], which inserts a list of currently available diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn index e403c2d18..09ad0a51d 100644 --- a/doc/plugins/orphans.mdwn +++ b/doc/plugins/orphans.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=orphans author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/orphans]] [[ikiwiki/directive]], which generates a list of possibly orphaned pages -- diff --git a/doc/plugins/pagecount.mdwn b/doc/plugins/pagecount.mdwn index a56027e60..71872fae8 100644 --- a/doc/plugins/pagecount.mdwn +++ b/doc/plugins/pagecount.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=pagecount author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/pagecount]] [[ikiwiki/directive]], which displays the number of pages diff --git a/doc/plugins/pagestats.mdwn b/doc/plugins/pagestats.mdwn index c3eba6363..347e39a89 100644 --- a/doc/plugins/pagestats.mdwn +++ b/doc/plugins/pagestats.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=pagestats author="Enrico Zini"]] -[[!tag type/meta type/tags]] +[[!tag type/meta type/tags type/widget]] This plugin provides the [[ikiwiki/directive/pagestats]] [[ikiwiki/directive]], which can generate stats about how pages link to diff --git a/doc/plugins/progress.mdwn b/doc/plugins/progress.mdwn index e1b560cc8..20736d18c 100644 --- a/doc/plugins/progress.mdwn +++ b/doc/plugins/progress.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=progress author="[[Will]]"]] -[[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/progress]] [[ikiwiki/directive]], which generates a progress bar. diff --git a/doc/plugins/version.mdwn b/doc/plugins/version.mdwn index 43027bdd7..326a2e7ce 100644 --- a/doc/plugins/version.mdwn +++ b/doc/plugins/version.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=version author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/version]] [[ikiwiki/directive]], which inserts the current version -- cgit v1.2.3 From 21b4f11cbb0796e858f95dcee2ff117fb4e10afe Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 03:47:21 -0500 Subject: more tag reorg --- doc/plugins/editpage.mdwn | 1 + doc/plugins/getsource.mdwn | 1 + doc/plugins/inline.mdwn | 1 + doc/plugins/mirrorlist.mdwn | 2 +- doc/plugins/parentlinks.mdwn | 2 +- doc/plugins/recentchanges.mdwn | 1 + doc/plugins/recentchangesdiff.mdwn | 1 + doc/plugins/rsync.mdwn | 1 + 8 files changed, 8 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/editpage.mdwn b/doc/plugins/editpage.mdwn index b830e51aa..346ee7c78 100644 --- a/doc/plugins/editpage.mdwn +++ b/doc/plugins/editpage.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=editpage core=1 author="[[Joey]]"]] +[[!tag type/web]] This plugin allows editing wiki pages in the web interface. It's enabled by default if [[cgi]] is enabled; disable it if you want cgi for other things diff --git a/doc/plugins/getsource.mdwn b/doc/plugins/getsource.mdwn index 20040ccee..d5404a628 100644 --- a/doc/plugins/getsource.mdwn +++ b/doc/plugins/getsource.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=getsource author="[[Will_Uther|Will]]"]] +[[!tag type/web]] This plugin adds a "Source" link to the top of each page that uses the CGI to display the page's source. diff --git a/doc/plugins/inline.mdwn b/doc/plugins/inline.mdwn index 6c3282576..3eb849fdb 100644 --- a/doc/plugins/inline.mdwn +++ b/doc/plugins/inline.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=inline core=1 author="[[Joey]]"]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/inline]] [[ikiwiki/directive]], which allows including one wiki page diff --git a/doc/plugins/mirrorlist.mdwn b/doc/plugins/mirrorlist.mdwn index 6e4964ed1..aedc1f4a0 100644 --- a/doc/plugins/mirrorlist.mdwn +++ b/doc/plugins/mirrorlist.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=mirror author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/web]] This plugin allows adding links a list of mirrors to each page in the wiki. For each mirror, a name and an url should be specified. Pages are diff --git a/doc/plugins/parentlinks.mdwn b/doc/plugins/parentlinks.mdwn index ef262a30c..c2d364bef 100644 --- a/doc/plugins/parentlinks.mdwn +++ b/doc/plugins/parentlinks.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=parentlinks core=1 author="[[intrigeri]]"]] -[[!tag type/link]] +[[!tag type/link type/chrome]] This plugin generates the links to a page's parents that typically appear at the top of a wiki page. diff --git a/doc/plugins/recentchanges.mdwn b/doc/plugins/recentchanges.mdwn index 9375296a4..823f68502 100644 --- a/doc/plugins/recentchanges.mdwn +++ b/doc/plugins/recentchanges.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=recentchanges core=1 author="[[Joey]]"]] +[[!tag type/meta]] This plugin examines the [[revision_control_system|rcs]] history and generates a page describing each recent change made to the wiki. These diff --git a/doc/plugins/recentchangesdiff.mdwn b/doc/plugins/recentchangesdiff.mdwn index a7b113ade..57299f92d 100644 --- a/doc/plugins/recentchangesdiff.mdwn +++ b/doc/plugins/recentchangesdiff.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=recentchangesdiff core=0 author="[[Joey]]"]] +[[!tag type/meta]] This plugin extends the [[recentchanges]] plugin, adding a diff for each change. The diffs are by default hidden from display on the recentchanges diff --git a/doc/plugins/rsync.mdwn b/doc/plugins/rsync.mdwn index 315b663c0..e48886168 100644 --- a/doc/plugins/rsync.mdwn +++ b/doc/plugins/rsync.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=rsync author="[[schmonz]]"]] +[[!tag type/special-purpose]] This plugin allows ikiwiki to push generated pages to another host by running a command such as `rsync`. -- cgit v1.2.3 From 1db0dd855ae49e4bb7b74e1158fc0356836d45a7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 03:56:56 -0500 Subject: one more --- doc/plugins/map.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/map.mdwn b/doc/plugins/map.mdwn index 8f5a9f15e..b164d5ca8 100644 --- a/doc/plugins/map.mdwn +++ b/doc/plugins/map.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=map author="Alessandro Dotti Contra"]] -[[!tag type/meta]] +[[!tag type/meta type/widget]] This plugin provides the [[ikiwiki/directive/map]] [[ikiwiki/directive]], which generates a hierarchical page map for the wiki. -- cgit v1.2.3 From a7eb434afd216e0b473ac82777544c9c45852792 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 04:10:11 -0500 Subject: another (last?) tag change --- doc/plugins/postsparkline.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/postsparkline.mdwn b/doc/plugins/postsparkline.mdwn index c81f91bdc..b0733e343 100644 --- a/doc/plugins/postsparkline.mdwn +++ b/doc/plugins/postsparkline.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=postsparkline author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/postsparkline]] [[ikiwiki/directive]]. It uses the [[sparkline]] plugin to create a sparkline of -- cgit v1.2.3 From 20ba12802b3897bf48d8a7704a57e9cede2466bd Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 04:22:15 -0500 Subject: add section information --- IkiWiki/Plugin/404.pm | 1 + IkiWiki/Plugin/aggregate.pm | 1 + IkiWiki/Plugin/amazon_s3.pm | 1 + IkiWiki/Plugin/attachment.pm | 1 + IkiWiki/Plugin/autoindex.pm | 1 + IkiWiki/Plugin/comments.pm | 1 + IkiWiki/Plugin/editdiff.pm | 1 + IkiWiki/Plugin/edittemplate.pm | 1 + IkiWiki/Plugin/getsource.pm | 1 + IkiWiki/Plugin/google.pm | 1 + IkiWiki/Plugin/goto.pm | 1 + IkiWiki/Plugin/mirrorlist.pm | 1 + IkiWiki/Plugin/norcs.pm | 1 + IkiWiki/Plugin/pingee.pm | 1 + IkiWiki/Plugin/pinger.pm | 1 + IkiWiki/Plugin/remove.pm | 1 + IkiWiki/Plugin/rename.pm | 1 + IkiWiki/Plugin/repolist.pm | 1 + IkiWiki/Plugin/rsync.pm | 1 + IkiWiki/Plugin/search.pm | 1 + IkiWiki/Plugin/testpagespec.pm | 1 + IkiWiki/Plugin/underlay.pm | 1 + IkiWiki/Plugin/websetup.pm | 1 + IkiWiki/Plugin/wmd.pm | 2 ++ doc/plugins/write.mdwn | 3 ++- 25 files changed, 27 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/404.pm b/IkiWiki/Plugin/404.pm index 85486e559..8adfd5dd9 100644 --- a/IkiWiki/Plugin/404.pm +++ b/IkiWiki/Plugin/404.pm @@ -21,6 +21,7 @@ sub getsetup () { # server admin action too safe => 0, rebuild => 0, + section => "web", } } diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 5a9eb433d..c18d413e6 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -43,6 +43,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "special-purpose", }, aggregateinternal => { type => "boolean", diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm index cfd8cd347..f2f4dbcf2 100644 --- a/IkiWiki/Plugin/amazon_s3.pm +++ b/IkiWiki/Plugin/amazon_s3.pm @@ -45,6 +45,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => 0, + section => "special-purpose", }, amazon_s3_key_id => { type => "string", diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index cbe6efc21..ad1dd9bca 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, allowed_attachments => { type => "pagespec", diff --git a/IkiWiki/Plugin/autoindex.pm b/IkiWiki/Plugin/autoindex.pm index 555856b11..e50464dca 100644 --- a/IkiWiki/Plugin/autoindex.pm +++ b/IkiWiki/Plugin/autoindex.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "special-purpose", }, } diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index caed0d58c..1e71749a4 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -38,6 +38,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, comments_pagespec => { type => 'pagespec', diff --git a/IkiWiki/Plugin/editdiff.pm b/IkiWiki/Plugin/editdiff.pm index 7df6a9ffb..d8f53a42e 100644 --- a/IkiWiki/Plugin/editdiff.pm +++ b/IkiWiki/Plugin/editdiff.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, } diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index a163b0d84..5f0551d92 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -23,6 +23,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "web", }, } diff --git a/IkiWiki/Plugin/getsource.pm b/IkiWiki/Plugin/getsource.pm index d1555430e..b362de726 100644 --- a/IkiWiki/Plugin/getsource.pm +++ b/IkiWiki/Plugin/getsource.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, getsource_mimetype => { type => "string", diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 483fa1707..48ad4c8ce 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, } diff --git a/IkiWiki/Plugin/goto.pm b/IkiWiki/Plugin/goto.pm index 439552f62..03bd682b3 100644 --- a/IkiWiki/Plugin/goto.pm +++ b/IkiWiki/Plugin/goto.pm @@ -14,6 +14,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", } } diff --git a/IkiWiki/Plugin/mirrorlist.pm b/IkiWiki/Plugin/mirrorlist.pm index d0a6107ef..92be7913e 100644 --- a/IkiWiki/Plugin/mirrorlist.pm +++ b/IkiWiki/Plugin/mirrorlist.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, mirrorlist => { type => "string", diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm index bfe84c0e1..e6a05a3c5 100644 --- a/IkiWiki/Plugin/norcs.pm +++ b/IkiWiki/Plugin/norcs.pm @@ -25,6 +25,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => 0, + section => "rcs", }, } diff --git a/IkiWiki/Plugin/pingee.pm b/IkiWiki/Plugin/pingee.pm index f5386d0ca..aafce9e70 100644 --- a/IkiWiki/Plugin/pingee.pm +++ b/IkiWiki/Plugin/pingee.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "special-purpose", }, } diff --git a/IkiWiki/Plugin/pinger.pm b/IkiWiki/Plugin/pinger.pm index c20ecb5d4..a797fc7bd 100644 --- a/IkiWiki/Plugin/pinger.pm +++ b/IkiWiki/Plugin/pinger.pm @@ -21,6 +21,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "special-purpose", }, pinger_timeout => { type => "integer", diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index 3c1e0c713..f59d0269e 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, } diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 8213d21f6..3908443ca 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, } diff --git a/IkiWiki/Plugin/repolist.pm b/IkiWiki/Plugin/repolist.pm index f69ec3988..ba7c5f0aa 100644 --- a/IkiWiki/Plugin/repolist.pm +++ b/IkiWiki/Plugin/repolist.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "web", }, repositories => { type => "string", diff --git a/IkiWiki/Plugin/rsync.pm b/IkiWiki/Plugin/rsync.pm index e38801e4a..8dd983be7 100644 --- a/IkiWiki/Plugin/rsync.pm +++ b/IkiWiki/Plugin/rsync.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => 0, + section => "special-purpose", }, rsync_command => { type => "string", diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 393c17e0f..fb68396a1 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, omega_cgi => { type => "string", diff --git a/IkiWiki/Plugin/testpagespec.pm b/IkiWiki/Plugin/testpagespec.pm index 440fca33b..17a77cb69 100644 --- a/IkiWiki/Plugin/testpagespec.pm +++ b/IkiWiki/Plugin/testpagespec.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "special-purpose", }, } diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 116fe7324..ab74fc37e 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => undef, + section => "special-purpose", }, add_underlays => { type => "string", diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 445552e40..5c19c9b63 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, websetup_force_plugins => { type => "string", diff --git a/IkiWiki/Plugin/wmd.pm b/IkiWiki/Plugin/wmd.pm index 9ddd237ab..5361d2914 100644 --- a/IkiWiki/Plugin/wmd.pm +++ b/IkiWiki/Plugin/wmd.pm @@ -17,6 +17,8 @@ sub getsetup () { return plugin => { safe => 1, + rebuild => 0, + section => "web", }, } diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 68454d56c..fbaabb6a0 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -498,7 +498,8 @@ describes the plugin as a whole. For example: and undef if a rebuild could be needed in some circumstances, but is not strictly required. * `section` can optionally specify which section in the config file - the plugin fits in. + the plugin fits in. The convention is to name the sections the + same as the tags used for [[plugins|plugin]] on this wiki. ### genwrapper -- cgit v1.2.3 From 5d566d8b32e7ec260df996366b471631d6a3b47c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 14:38:43 -0500 Subject: reorg and expand docs of some variables --- doc/plugins/write.mdwn | 99 ++++++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 44 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index fbaabb6a0..712dda8bf 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -31,7 +31,7 @@ they're the same as far as how they hook into ikiwiki. This document will explain how to write both sorts of plugins, albeit with an emphasis on perl plugins. -## Considerations +## Remember: Ikiwiki is a compiler One thing to keep in mind when writing a plugin is that ikiwiki is a wiki *compiler*. So plugins influence pages when they are built, not when they @@ -40,7 +40,23 @@ example, will insert the build time. Also, as a compiler, ikiwiki avoids rebuilding pages unless they have changed, so a plugin that prints some random or changing thing on a page will generate a static page that won't change until ikiwiki rebuilds the page for some other reason, like the page -being edited. +being edited. The [[tutorial]] has some other examples of ways that ikiwiki +being a compiler may trip up the unwary. + +## Plugin interface + +To import the ikiwiki plugin interface: + + use IkiWiki '3.00'; + +This will import several variables and functions into your plugin's +namespace. These variables and functions are the ones most plugins need, +and a special effort will be made to avoid changing them in incompatible +ways, and to document any changes that have to be made in the future. + +Note that IkiWiki also provides other variables and functions that are not +exported by default. No guarantee is made about these in the future, so if +it's not exported, the wise choice is to not use it. ## Registering plugins @@ -508,28 +524,17 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. -## Plugin interface - -To import the ikiwiki plugin interface: +### Exported variables - use IkiWiki '3.00'; +Several variables are exported to your plugin when you `use IkiWiki;` -This will import several variables and functions into your plugin's -namespace. These variables and functions are the ones most plugins need, -and a special effort will be made to avoid changing them in incompatible -ways, and to document any changes that have to be made in the future. - -Note that IkiWiki also provides other variables and functions that are not -exported by default. No guarantee is made about these in the future, so if -it's not exported, the wise choice is to not use it. - -### %config +#### %config A plugin can access the wiki's configuration via the `%config` hash. The best way to understand the contents of the hash is to look at your ikiwiki setup file, which sets the hash content to configure the wiki. -### %pagestate +#### %pagestate The `%pagestate` hash can be used by plugins to save state that they will need next time ikiwiki is run. The hash holds per-page state, so to set a value, @@ -547,7 +552,7 @@ When pages are deleted, ikiwiki automatically deletes their pagestate too. Note that page state does not persist across wiki rebuilds, only across wiki updates. -### %wikistate +#### %wikistate The `%wikistate` hash can be used by a plugin to store persistant state that is not bound to any one page. To set a value, use @@ -556,19 +561,25 @@ serialize, `$key` is any string you like, and `$id` must be the same as the "id" parameter passed to `hook()` when registering the plugin, so that the state can be dropped if the plugin is no longer used. -### Other variables +#### %links + +The `%links` hash can be used to look up the names of each page that +a page links to. The name of the page is the key; the value is an array +reference. Do not modify this hash directly; call `add_link()`. + +#### %destsources -If your plugin needs to access data about other pages in the wiki. It can -use the following hashes, using a page name as the key: +The `%destsources` hash records the name of the source file used to +create each destination file. The key is the output filename (ie, +"foo/index.html"), and the value is the source filename that it was built +from (eg, "foo.mdwn"). Note that a single source file may create multiple +destination files. Do not modify this hash directly; call `will_render()`. -* `%links` lists the names of each page that a page links to, in an array - reference. -* `%destsources` contains the name of the source file used to create each - destination file. -* `%pagesources` contains the name of the source file for each page. +#### %pagesources -Also, the `%IkiWiki::version` variable contains the version number for the -ikiwiki program. +The `%pagesources` has can be used to look up the source filename +of a page. So the key is the page name, and the value is the source +filename. Do not modify this hash. ### Library functions @@ -614,22 +625,6 @@ page created from it. (Ie, it appends ".html".) Use this when constructing the filename of a html file. Use `urlto` when generating a link to a page. -### `deptype(@)` - -Use this function to generate ikiwiki's internal representation of a -dependency type from one or more of these keywords: - -* `content` is the default. Any change to the content - of a page triggers the dependency. -* `presence` is only triggered by a change to the presence - of a page. -* `links` is only triggered by a change to the links of a page. - This includes when a link is added, removed, or changes what - it points to due to other changes. It does not include the - addition or removal of a duplicate link. - -If multiple types are specified, they are combined. - #### `pagespec_match_list($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns a list of pages @@ -683,6 +678,22 @@ The most often used is "location", which specifies the location the PageSpec should match against. If not passed, relative PageSpecs will match relative to the top of the wiki. +#### `deptype(@)` + +Use this function to generate ikiwiki's internal representation of a +dependency type from one or more of these keywords: + +* `content` is the default. Any change to the content + of a page triggers the dependency. +* `presence` is only triggered by a change to the presence + of a page. +* `links` is only triggered by a change to the links of a page. + This includes when a link is added, removed, or changes what + it points to due to other changes. It does not include the + addition or removal of a duplicate link. + +If multiple types are specified, they are combined. + #### `bestlink($$)` Given a page and the text of a link on the page, determine which -- cgit v1.2.3 From b1c47b4065b245ccf46b99292d7de61800468237 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 14:41:28 -0500 Subject: heading tweaks --- doc/plugins/write.mdwn | 64 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 712dda8bf..17c54ffc7 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -524,17 +524,17 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. -### Exported variables +## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` -#### %config +### %config A plugin can access the wiki's configuration via the `%config` hash. The best way to understand the contents of the hash is to look at your ikiwiki setup file, which sets the hash content to configure the wiki. -#### %pagestate +### %pagestate The `%pagestate` hash can be used by plugins to save state that they will need next time ikiwiki is run. The hash holds per-page state, so to set a value, @@ -552,7 +552,7 @@ When pages are deleted, ikiwiki automatically deletes their pagestate too. Note that page state does not persist across wiki rebuilds, only across wiki updates. -#### %wikistate +### %wikistate The `%wikistate` hash can be used by a plugin to store persistant state that is not bound to any one page. To set a value, use @@ -561,13 +561,13 @@ serialize, `$key` is any string you like, and `$id` must be the same as the "id" parameter passed to `hook()` when registering the plugin, so that the state can be dropped if the plugin is no longer used. -#### %links +### %links The `%links` hash can be used to look up the names of each page that a page links to. The name of the page is the key; the value is an array reference. Do not modify this hash directly; call `add_link()`. -#### %destsources +### %destsources The `%destsources` hash records the name of the source file used to create each destination file. The key is the output filename (ie, @@ -575,15 +575,15 @@ create each destination file. The key is the output filename (ie, from (eg, "foo.mdwn"). Note that a single source file may create multiple destination files. Do not modify this hash directly; call `will_render()`. -#### %pagesources +### %pagesources The `%pagesources` has can be used to look up the source filename of a page. So the key is the page name, and the value is the source filename. Do not modify this hash. -### Library functions +## Library functions -#### `hook(@)` +### `hook(@)` Hook into ikiwiki's processing. See the discussion of hooks above. @@ -592,12 +592,12 @@ named `no_override` is supported, If it's set to a true value, then this hook will not override any existing hook with the same id. This is useful if the id can be controled by the user. -#### `debug($)` +### `debug($)` Logs a debugging message. These are supressed unless verbose mode is turned on. -#### `error($;$)` +### `error($;$)` Aborts with an error message. If the second parameter is passed, it is a function that is called after the error message is printed, to do any final @@ -611,13 +611,13 @@ In other hooks, error() is a fatal error, so use with care. Try to avoid dying on bad input when building a page, as that will halt the entire wiki build and make the wiki unusable. -#### `template($;@)` +### `template($;@)` Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the file in the template directory. The optional remaining parameters are passed to `HTML::Template->new`. -#### `htmlpage($)` +### `htmlpage($)` Passed a page name, returns the base name that will be used for a the html page created from it. (Ie, it appends ".html".) @@ -625,7 +625,7 @@ page created from it. (Ie, it appends ".html".) Use this when constructing the filename of a html file. Use `urlto` when generating a link to a page. -#### `pagespec_match_list($$;@)` +### `pagespec_match_list($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns a list of pages in the wiki that match the [[ikiwiki/PageSpec]]. @@ -656,7 +656,7 @@ Additional named parameters can be specified: Any other named parameters are passed on to `pagespec_match`, to further limit the match. -#### `add_depends($$;$)` +### `add_depends($$;$)` Makes the specified page depend on the specified [[ikiwiki/PageSpec]]. @@ -678,7 +678,7 @@ The most often used is "location", which specifies the location the PageSpec should match against. If not passed, relative PageSpecs will match relative to the top of the wiki. -#### `deptype(@)` +### `deptype(@)` Use this function to generate ikiwiki's internal representation of a dependency type from one or more of these keywords: @@ -730,7 +730,7 @@ control some options. These are: * class - set to add a css class to the link * title - set to add a title attribute to the link -#### `readfile($;$)` +### `readfile($;$)` Given a filename, reads and returns the entire file. @@ -739,7 +739,7 @@ in binary mode. A failure to read the file will result in it dying with an error. -#### `writefile($$$;$$)` +### `writefile($$$;$$)` Given a filename, a directory to put it in, and the file's content, writes a file. @@ -767,7 +767,7 @@ generally the directory parameter is a trusted toplevel directory like the srcdir or destdir, and any subdirectories of this are included in the filename parameter. -#### `will_render($$)` +### `will_render($$)` Given a page name and a destination file name (not including the base destination directory), register that the page will result in that file @@ -783,34 +783,34 @@ Ikiwiki uses this information to automatically clean up rendered files when the page that rendered them goes away or is changed to no longer render them. will_render also does a few important security checks. -#### `pagetype($)` +### `pagetype($)` Given the name of a source file, returns the type of page it is, if it's a type that ikiwiki knowns how to htmlize. Otherwise, returns undef. -#### `pagename($)` +### `pagename($)` Given the name of a source file, returns the name of the wiki page that corresponds to that file. -#### `pagetitle($)` +### `pagetitle($)` Give the name of a wiki page, returns a version suitable to be displayed as the page's title. This is accomplished by de-escaping escaped characters in the page name. "_" is replaced with a space, and '__NN__' is replaced by the UTF character with code NN. -#### `titlepage($)` +### `titlepage($)` This performs the inverse of `pagetitle`, ie, it converts a page title into a wiki page name. -#### `linkpage($)` +### `linkpage($)` This converts text that could have been entered by the user as a [[ikiwiki/WikiLink]] into a wiki page name. -#### `srcfile($;$)` +### `srcfile($;$)` Given the name of a source file in the wiki, searches for the file in the source directory and the underlay directories (most recently added @@ -820,7 +820,7 @@ Normally srcfile will fail with an error message if the source file cannot be found. The second parameter can be set to a true value to make it return undef instead. -#### `add_underlay($)` +### `add_underlay($)` Adds a directory to the set of underlay directories that ikiwiki will search for files. @@ -828,18 +828,18 @@ search for files. If the directory name is not absolute, ikiwiki will assume it is in the parent directory of the configured underlaydir. -#### `displaytime($;$)` +### `displaytime($;$)` Given a time, formats it for display. The optional second parameter is a strftime format to use to format the time. -#### `gettext` +### `gettext` This is the standard gettext function, although slightly optimised. -#### `urlto($$;$)` +### `urlto($$;$)` Construct a relative url to the first parameter from the page named by the second. The first parameter can be either a page name, or some other @@ -848,13 +848,13 @@ destination file, as registered by `will_render`. If the third parameter is passed and is true, an absolute url will be constructed instead of the default relative url. -#### `newpagefile($$)` +### `newpagefile($$)` This can be called when creating a new page, to determine what filename to save the page to. It's passed a page name, and its type, and returns the name of the file to create, relative to the srcdir. -#### `targetpage($$;$)` +### `targetpage($$;$)` Passed a page and an extension, returns the filename that page will be rendered to. @@ -863,7 +863,7 @@ Optionally, a third parameter can be passed, to specify the preferred filename of the page. For example, `targetpage("foo", "rss", "feed")` will yield something like `foo/feed.rss`. -#### `add_link($$)` +### `add_link($$)` This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. -- cgit v1.2.3 From ba19f940bd071f7065246594751dd49041cbbaba Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 14:44:26 -0500 Subject: move note to sidebox --- doc/plugins/write.mdwn | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 17c54ffc7..07bfd72ac 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -3,6 +3,20 @@ written to extend ikiwiki in many ways. Despite the length of this page, it's not really hard. This page is a complete reference to everything a plugin might want to do. There is also a quick [[tutorial]]. +[[!template type="note" text=""" +Ikiwiki is a compiler + +One thing to keep in mind when writing a plugin is that ikiwiki is a wiki +*compiler*. So plugins influence pages when they are built, not when they +are loaded. A plugin that inserts the current time into a page, for +example, will insert the build time. Also, as a compiler, ikiwiki avoids +rebuilding pages unless they have changed, so a plugin that prints some +random or changing thing on a page will generate a static page that won't +change until ikiwiki rebuilds the page for some other reason, like the page +being edited. The [[tutorial]] has some other examples of ways that ikiwiki +being a compiler may trip up the unwary. +"""]] + [[!toc levels=2]] ## Types of plugins @@ -31,18 +45,6 @@ they're the same as far as how they hook into ikiwiki. This document will explain how to write both sorts of plugins, albeit with an emphasis on perl plugins. -## Remember: Ikiwiki is a compiler - -One thing to keep in mind when writing a plugin is that ikiwiki is a wiki -*compiler*. So plugins influence pages when they are built, not when they -are loaded. A plugin that inserts the current time into a page, for -example, will insert the build time. Also, as a compiler, ikiwiki avoids -rebuilding pages unless they have changed, so a plugin that prints some -random or changing thing on a page will generate a static page that won't -change until ikiwiki rebuilds the page for some other reason, like the page -being edited. The [[tutorial]] has some other examples of ways that ikiwiki -being a compiler may trip up the unwary. - ## Plugin interface To import the ikiwiki plugin interface: -- cgit v1.2.3 From 60410369daef9ce990d516f0d538571db4623ceb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 14:48:22 -0500 Subject: add variable value examples --- doc/plugins/write.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 07bfd72ac..f2b96b6d9 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -3,7 +3,7 @@ written to extend ikiwiki in many ways. Despite the length of this page, it's not really hard. This page is a complete reference to everything a plugin might want to do. There is also a quick [[tutorial]]. -[[!template type="note" text=""" +[[!template id="note" text=""" Ikiwiki is a compiler One thing to keep in mind when writing a plugin is that ikiwiki is a wiki @@ -569,6 +569,8 @@ The `%links` hash can be used to look up the names of each page that a page links to. The name of the page is the key; the value is an array reference. Do not modify this hash directly; call `add_link()`. + $links{"foo"} = ["bar", "baz"]; + ### %destsources The `%destsources` hash records the name of the source file used to @@ -576,6 +578,8 @@ create each destination file. The key is the output filename (ie, "foo/index.html"), and the value is the source filename that it was built from (eg, "foo.mdwn"). Note that a single source file may create multiple destination files. Do not modify this hash directly; call `will_render()`. + + $destsources{"foo/index.html"} = "foo.mdwn"; ### %pagesources @@ -583,6 +587,8 @@ The `%pagesources` has can be used to look up the source filename of a page. So the key is the page name, and the value is the source filename. Do not modify this hash. + $pagesources{"foo"} = "foo.mdwn"; + ## Library functions ### `hook(@)` -- cgit v1.2.3 From 4a7558539cd9d0f1ed5c586c29811035f7c14d14 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 15:38:07 -0500 Subject: add highlevel view of when hooks are called during compile and cgi phases --- doc/plugins/write.mdwn | 97 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index f2b96b6d9..d94216e17 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -9,16 +9,73 @@ Ikiwiki is a compiler One thing to keep in mind when writing a plugin is that ikiwiki is a wiki *compiler*. So plugins influence pages when they are built, not when they are loaded. A plugin that inserts the current time into a page, for -example, will insert the build time. Also, as a compiler, ikiwiki avoids -rebuilding pages unless they have changed, so a plugin that prints some -random or changing thing on a page will generate a static page that won't -change until ikiwiki rebuilds the page for some other reason, like the page -being edited. The [[tutorial]] has some other examples of ways that ikiwiki -being a compiler may trip up the unwary. +example, will insert the build time. + +Also, as a compiler, ikiwiki avoids rebuilding pages unless they have +changed, so a plugin that prints some random or changing thing on a page +will generate a static page that won't change until ikiwiki rebuilds the +page for some other reason, like the page being edited. + +The [[tutorial]] has some other examples of ways that ikiwiki being a +compiler may trip up the unwary. """]] [[!toc levels=2]] +## Highlevel view of ikiwiki + +Ikiwiki mostly has two modes of operation. It can either be running +as a compiler, building or updating a wiki; or as a cgi program, providing +user interface for editing pages, etc. Almost everything ikiwiki does +is accomplished by calling various hooks provided by plugins. + +### compiler + +As a compiler, starts by calling the `refresh` hook. Then it checks +the wiki's source to find new or changed pages. The `needsbuild` hook is +then called to allow manipulation of the list of pages that need to be +built. + +Now that it knows what pages it needs to build, ikiwiki runs two +compile passes. First, it runs `scan` hooks, which collect metadata about +the pages. Then it runs a page rendering pipeline, by calling in turn these +hooks: `filter`, `preprocess`, `linkify`, `htmlize`, `postscan`, +`pagetemplate`, `sanitize`, `format`. + +After all necessary pages are built, it calls the `change` hook. Finally, +if a page is was deleted, the `delete` hook is called, and the files that +page had previously produced are removed. + +### cgi + +The flow between hooks when ikiwiki is run as a cgi is best illistrated by +an example. + +* *Alice browses to a page and clicks Edit.* +* Ikiwiki is run as a cgi. It assigns Alice a session cookie, and, + by calling the `auth` hooks, sees that she is not yet logged in. +* The `sessioncgi` hooks are then called, and one of them, + from the [[editpage]] plugin, notices that the cgi has been told "do=edit". +* The [[editpage]] plugin calls the `canedit` hook to check if this + page edit is allowed. The [[signinedit]] plugin has a hook that says not: + Alice is not signed in. +* The [[signinedit]] plugin then launches the signin process. A signin + page is built by calling the `formbuilder_setup` hook. +* *Alice signs in with her openid.* +* The [[openid]] plugin's `formbuilder` hook sees that an openid was + entered in the signin form, and redirects to Alice's openid provider. +* Alice's openid provider calls back to ikiwiki. The [[openid]] plugin + has an `auth` hook that finishes the openid signin process. +* Signin complete, ikiwiki returns to what Alice was doing before; editing + a page. +* Now all the `canedit` hooks are happy. The [[editpage]] plugin calls + `formbuilder_setup` to display the page editing form. +* *Alice saves her change to the page.* +* The [[editpage]] plugin's `formbuilder` hook sees that the Save button + was pressed, and calls the `checkcontent` and `editcontent` hooks. + Then it saves the page to disk, and branches into the compiler part + of ikiwiki to refresh the wiki. + ## Types of plugins Most ikiwiki [[plugins]] are written in perl, like ikiwiki. This gives the @@ -530,13 +587,13 @@ function of the ikiwiki wrapper when it is being generated. Several variables are exported to your plugin when you `use IkiWiki;` -### %config +### `%config` A plugin can access the wiki's configuration via the `%config` hash. The best way to understand the contents of the hash is to look at your ikiwiki setup file, which sets the hash content to configure the wiki. -### %pagestate +### `%pagestate` The `%pagestate` hash can be used by plugins to save state that they will need next time ikiwiki is run. The hash holds per-page state, so to set a value, @@ -554,7 +611,7 @@ When pages are deleted, ikiwiki automatically deletes their pagestate too. Note that page state does not persist across wiki rebuilds, only across wiki updates. -### %wikistate +### `%wikistate` The `%wikistate` hash can be used by a plugin to store persistant state that is not bound to any one page. To set a value, use @@ -563,7 +620,7 @@ serialize, `$key` is any string you like, and `$id` must be the same as the "id" parameter passed to `hook()` when registering the plugin, so that the state can be dropped if the plugin is no longer used. -### %links +### `%links` The `%links` hash can be used to look up the names of each page that a page links to. The name of the page is the key; the value is an array @@ -571,7 +628,15 @@ reference. Do not modify this hash directly; call `add_link()`. $links{"foo"} = ["bar", "baz"]; -### %destsources +### `%pagesources` + +The `%pagesources` has can be used to look up the source filename +of a page. So the key is the page name, and the value is the source +filename. Do not modify this hash. + + $pagesources{"foo"} = "foo.mdwn"; + +### `%destsources` The `%destsources` hash records the name of the source file used to create each destination file. The key is the output filename (ie, @@ -581,16 +646,10 @@ destination files. Do not modify this hash directly; call `will_render()`. $destsources{"foo/index.html"} = "foo.mdwn"; -### %pagesources - -The `%pagesources` has can be used to look up the source filename -of a page. So the key is the page name, and the value is the source -filename. Do not modify this hash. - - $pagesources{"foo"} = "foo.mdwn"; - ## Library functions +Several functions are exported to your plugin when you `use IkiWiki;` + ### `hook(@)` Hook into ikiwiki's processing. See the discussion of hooks above. -- cgit v1.2.3 From 7b07286a6f4a9903d5a346205b8eaaf93dbb9d0d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 15:41:19 -0500 Subject: layout --- doc/plugins/write.mdwn | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index d94216e17..4fd9c4369 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -31,7 +31,7 @@ is accomplished by calling various hooks provided by plugins. ### compiler -As a compiler, starts by calling the `refresh` hook. Then it checks +As a compiler, ikiwiki starts by calling the `refresh` hook. Then it checks the wiki's source to find new or changed pages. The `needsbuild` hook is then called to allow manipulation of the list of pages that need to be built. @@ -48,10 +48,11 @@ page had previously produced are removed. ### cgi -The flow between hooks when ikiwiki is run as a cgi is best illistrated by +The flow between hooks when ikiwiki is run as a cgi is best illustrated by an example. -* *Alice browses to a page and clicks Edit.* +Alice browses to a page and clicks Edit. + * Ikiwiki is run as a cgi. It assigns Alice a session cookie, and, by calling the `auth` hooks, sees that she is not yet logged in. * The `sessioncgi` hooks are then called, and one of them, @@ -61,7 +62,9 @@ an example. Alice is not signed in. * The [[signinedit]] plugin then launches the signin process. A signin page is built by calling the `formbuilder_setup` hook. -* *Alice signs in with her openid.* + +Alice signs in with her openid. + * The [[openid]] plugin's `formbuilder` hook sees that an openid was entered in the signin form, and redirects to Alice's openid provider. * Alice's openid provider calls back to ikiwiki. The [[openid]] plugin @@ -70,7 +73,9 @@ an example. a page. * Now all the `canedit` hooks are happy. The [[editpage]] plugin calls `formbuilder_setup` to display the page editing form. -* *Alice saves her change to the page.* + +Alice saves her change to the page. + * The [[editpage]] plugin's `formbuilder` hook sees that the Save button was pressed, and calls the `checkcontent` and `editcontent` hooks. Then it saves the page to disk, and branches into the compiler part -- cgit v1.2.3 From f4c517110e1bc1ab9bf6e931073959cdcff1302b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 15:52:03 -0500 Subject: formatting --- doc/plugins/write.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 4fd9c4369..a8c9de2d3 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -536,7 +536,7 @@ The data returned is a list of `%config` options, followed by a hash describing the option. There can also be an item named "plugin", which describes the plugin as a whole. For example: - return + return plugin => { description => "description of this plugin", safe => 1, @@ -736,7 +736,7 @@ By default, dependencies are full content dependencies, meaning that the page will be updated whenever anything matching the PageSpec is modified. This can be overridden by passing a `deptype` value as the third parameter. -#### `pagespec_match($$;@)` +### `pagespec_match($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns a true value if the [[ikiwiki/PageSpec]] matches the page. @@ -766,7 +766,7 @@ dependency type from one or more of these keywords: If multiple types are specified, they are combined. -#### `bestlink($$)` +### `bestlink($$)` Given a page and the text of a link on the page, determine which existing page that link best points to. Prefers pages under a @@ -774,7 +774,7 @@ subdirectory with the same name as the source page, failing that goes down the directory tree to the base looking for matching pages, as described in [[ikiwiki/SubPage/LinkingRules]]. -#### `htmllink($$$;@)` +### `htmllink($$$;@)` Many plugins need to generate html links and add them to a page. This is done by using the `htmllink` function. The usual way to call -- cgit v1.2.3 From 6e8fd3890e96d3b0fdbf1ad91fc84628d2e1aa47 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Feb 2010 17:09:40 -0500 Subject: add news item for ikiwiki 3.20100212 --- doc/news/version_3.20091113.mdwn | 18 ------------------ doc/news/version_3.20100212.mdwn | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 18 deletions(-) delete mode 100644 doc/news/version_3.20091113.mdwn create mode 100644 doc/news/version_3.20100212.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091113.mdwn b/doc/news/version_3.20091113.mdwn deleted file mode 100644 index 579174011..000000000 --- a/doc/news/version_3.20091113.mdwn +++ /dev/null @@ -1,18 +0,0 @@ -ikiwiki 3.20091113 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * underlay: Fix example values put in setup file to be array - references. - * underlay: Avoid crashing if lists of underlays (or template - directories) are not configured. - * Moved the postscan hook to run on the raw html of a page, before - the template is filled out. This improves the search plugin's indexing, - since it will not include navigational elements from the page template - or sidebar. - * localstyle: New plugin, allows overrding the toplevel local.css - with one that is closer to a page. - * httpauth: Add cgiauthurl setting that can be used to do http basic auth - only when ikiwiki needs authentication, rather than for any access to - the cgi/wiki. - * inline: Do not generate feeds for nested inlines. - * inline: Allow direct inclusion of non-page files in raw mode. - * inline: Fix display of all pages when archive=yes or show=0 are used."""]] diff --git a/doc/news/version_3.20100212.mdwn b/doc/news/version_3.20100212.mdwn new file mode 100644 index 000000000..3dcfe5f84 --- /dev/null +++ b/doc/news/version_3.20100212.mdwn @@ -0,0 +1,26 @@ +ikiwiki 3.20100212 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * template: Preprocess parameters before htmlizing. + * img: Fix a bug that could taint @links with undef values. + * setup automator: Configure Term::Readline to use bold for prompt, rather + than default underline. Closes: #[517656](http://bugs.debian.org/517656) + * Allow jumping directly into account registration process by going to + ikiwiki.cgi?do=register + * Improve display of openid in preferences page. + * Add link to userpage (or creation link) to top of preferences page. + * opendiscussion: This plugin will also now allow posting comments + to otherwise locked-down sites. + * auto-blog.setup: Lock all pages, so only admin can post to the blog + by default, and enable opendiscussion so others can comment. + * Fix color and format plugins to appear in the websetup interface. + * amazon\_s3: Fix to support the EU S3 datacenter, which is more picky + about attempts to create already existing buckets. + * httpauth: When cgiauthurl is configured, httpauth can now be used + alongside other authentication methods (like openid or anonok). Rather + than always redirect to the cgiauthurl for authentication, there is now + a button on the login form to use it. + * httpauth: Add httpauth\_pagespec setting that can be used to limit + pages to only being edited via users authed with httpauth. + * Allow globs to be used in user() pagespecs. + * Group related plugins into sections in the setup file, and drop + unused rcs plugins from the setup file."""]] \ No newline at end of file -- cgit v1.2.3 From 172dfa9f64b5a248042af7c4b741fdd4c71813ec Mon Sep 17 00:00:00 2001 From: "http://seeitcoming.myopenid.com/" <http://seeitcoming.myopenid.com/@web> Date: Sat, 13 Feb 2010 15:16:09 +0000 Subject: Added information about python implementation for reference --- doc/todo/abbreviation.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/abbreviation.mdwn b/doc/todo/abbreviation.mdwn index d24166710..f2880091c 100644 --- a/doc/todo/abbreviation.mdwn +++ b/doc/todo/abbreviation.mdwn @@ -2,4 +2,6 @@ We might want some kind of abbreviation and acronym plugin. --[[JoshTriplett]] * Not sure if this is what you mean, but I'd love a way to make works which match existing page names automatically like (eg. if there is a page called "MySQL" then any time the word MySQL is mentioned it should become a link to that page). -- [[AdamShand]] + * The python-markdown-extras package has support for [abbreviations](http://www.freewisdom.org/projects/python-markdown/Abbreviations), with the syntax that you just use the abbreviation in text (e.g. HTML) and then define the abbreviations at the end (like "footnote-style" links). For consistency, it might be good to use the same syntax, which apparently derives from [PHP-markdown-extra](http://michelf.com/projects/php-markdown/extra/#abbr). + [[wishlist]] -- cgit v1.2.3 From a38418a8a3652bad60c83a0dd7502f7afb991512 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Feb 2010 14:07:56 -0500 Subject: close --- doc/todo/openid_user_filtering.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/todo/openid_user_filtering.mdwn b/doc/todo/openid_user_filtering.mdwn index 8b2d0082e..7f8b2a55e 100644 --- a/doc/todo/openid_user_filtering.mdwn +++ b/doc/todo/openid_user_filtering.mdwn @@ -7,3 +7,7 @@ So I suggest an ikiwiki configuration like: users => ["*.webvm.net"], Would only allow edits from openIDs of that form. + +> This kind of thing can be [[done]] now: --[[Joey]] +> +> locked_pages => "user(http://*.webvm.net/)" -- cgit v1.2.3 From 6fc25c8df79c4ce9afde256be5d377ee82562c31 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Feb 2010 14:13:30 -0500 Subject: clarify --- doc/todo/openid_user_filtering.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/openid_user_filtering.mdwn b/doc/todo/openid_user_filtering.mdwn index 7f8b2a55e..6a318c4c0 100644 --- a/doc/todo/openid_user_filtering.mdwn +++ b/doc/todo/openid_user_filtering.mdwn @@ -10,4 +10,4 @@ Would only allow edits from openIDs of that form. > This kind of thing can be [[done]] now: --[[Joey]] > -> locked_pages => "user(http://*.webvm.net/)" +> locked_pages => "* and !user(http://*.webvm.net/)" -- cgit v1.2.3 From 0cc5ed592db082a815d2588d378dd9a3995dcd9f Mon Sep 17 00:00:00 2001 From: jwalzer <jwalzer@web> Date: Sun, 14 Feb 2010 12:40:03 +0000 Subject: new thread --- ...ine_774__44_____60____36__in__62___chunk_1.__39__.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn (limited to 'doc') diff --git a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn b/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn new file mode 100644 index 000000000..56ac4b894 --- /dev/null +++ b/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn @@ -0,0 +1,15 @@ +# getting Warnings about UTF8-Chars. + +I'm getting multiple warnings: + + utf8 "\xAB" does not map to Unicode at /usr/share/perl5/IkiWiki.pm line 774, <$in> chunk 1. + + +I'm assuming this is once per File, but even in verbose mode, it doesn't tell me which file is a problem. +It first reads all the files, and afterwards when parsing/compiling them, it outputs the warning, so I can't +deduce the offending files. + +Is there a way to have ikiwiki output the position, where it encounters the character? + +Probably all this has to do with locale-settings, and usage of mixed locales in a distributed setup ... +I'd rather cleanup some of the file(name)s of unexpected characters. --[[jwalzer]] -- cgit v1.2.3 From 5107530344ca728fc73418a4032a41f22a172a3a Mon Sep 17 00:00:00 2001 From: jwalzer <jwalzer@web> Date: Sun, 14 Feb 2010 14:21:55 +0000 Subject: Update - trying to debug it --- ...4__44_____60____36__in__62___chunk_1.__39__.mdwn | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'doc') diff --git a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn b/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn index 56ac4b894..931e339e2 100644 --- a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn +++ b/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn @@ -13,3 +13,24 @@ Is there a way to have ikiwiki output the position, where it encounters the char Probably all this has to do with locale-settings, and usage of mixed locales in a distributed setup ... I'd rather cleanup some of the file(name)s of unexpected characters. --[[jwalzer]] + +-------- + +**Update** : So I took the chance to insert debug into ikiwiki.pm: + + root@novalis:/usr/share/perl5# diff -p /tmp/IkiWiki.orig.pm IkiWiki.pm + *** /tmp/IkiWiki.orig.pm Sun Feb 14 15:16:08 2010 + --- IkiWiki.pm Sun Feb 14 15:16:28 2010 + *************** sub readfile ($;$$) { + *** 768,773 **** + --- 768,774 ---- + } + + local $/=undef; + + debug("opening File: $file:"); + open (my $in, "<", $file) || error("failed to read $file: $!"); + binmode($in) if ($binary); + return \*$in if $wantfd; + + +But what I see now is not quite helpful, as it seems, STDERR and DEBUG are asyncronous, so they mix up in a way, that I can't really see, whats the problem ... Maybe I'm better off for troubleshooting, to insert an printf to strerr to have it in the same stream.. --[[jwalzer]] -- cgit v1.2.3 From 693fb3b18654abae84efeccd046a358f56dc2be7 Mon Sep 17 00:00:00 2001 From: jwalzer <jwalzer@web> Date: Sun, 14 Feb 2010 14:50:51 +0000 Subject: --- ...pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn b/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn index 931e339e2..72f2d38e0 100644 --- a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn +++ b/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn @@ -34,3 +34,14 @@ I'd rather cleanup some of the file(name)s of unexpected characters. --[[jwalze But what I see now is not quite helpful, as it seems, STDERR and DEBUG are asyncronous, so they mix up in a way, that I can't really see, whats the problem ... Maybe I'm better off for troubleshooting, to insert an printf to strerr to have it in the same stream.. --[[jwalzer]] + + +---- + +**Update:** The "print STDERR $file;"-Trick did it .. I was able to find a mdwn-file, that (was generated by a script of me) had \0xAB in it. + +Nevertheless I still wonder if this should be a problem. This character happend to be in an *\[\[meta title='$CHAR'\]\]-tag* and an *\[$CHAR\]http://foo)-Link* + +Should this throw an warning? Maybe this warning could be catched an reported inclusively the containing filename? maybe even with an override, if one knows that it is correct that way? --[[jwalzer]] + +[[!tag solved]] -- cgit v1.2.3 From f1183cbf0c9c09725192dcc8384381f9112ae222 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 14 Feb 2010 17:25:30 -0500 Subject: add ngettext support & optimize gettext handling As I was adding ngettext support, I realized I could optimize the gettext functions by memoizing the creation of the gettext object. Note that the object creation is still deferred until a gettext function is called, to avoid unnecessary startup penalties on code paths that do not need gettext. A side benefit is that separate stub functions are no longer needed to handle the C language case. --- IkiWiki.pm | 44 ++++++++++++++++++++++++++++++-------------- doc/plugins/write.mdwn | 4 ++++ 2 files changed, 34 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index a96ff1236..b9a419d1d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -20,7 +20,7 @@ use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype add_depends pagespec_match pagespec_match_list bestlink htmllink readfile writefile pagetype srcfile pagename - displaytime will_render gettext urlto targetpage + displaytime will_render gettext ngettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile inject add_link %config %links %pagestate %wikistate %renderedfiles @@ -1820,27 +1820,38 @@ sub file_pruned ($;$) { sub define_gettext () { # If translation is needed, redefine the gettext function to do it. # Otherwise, it becomes a quick no-op. - no warnings 'redefine'; + my $gettext_obj; + my $getobj; if ((exists $ENV{LANG} && length $ENV{LANG}) || (exists $ENV{LC_ALL} && length $ENV{LC_ALL}) || (exists $ENV{LC_MESSAGES} && length $ENV{LC_MESSAGES})) { - *gettext=sub { - my $gettext_obj=eval q{ + $getobj=sub { + $gettext_obj=eval q{ use Locale::gettext q{textdomain}; Locale::gettext->domain('ikiwiki') }; - - if ($gettext_obj) { - $gettext_obj->get(shift); - } - else { - return shift; - } }; } - else { - *gettext=sub { return shift }; - } + + no warnings 'redefine'; + *gettext=sub { + $getobj->() if $getobj; + if ($gettext_obj) { + $gettext_obj->get(shift); + } + else { + return shift; + } + }; + *ngettext=sub { + $getobj->() if $getobj; + if ($gettext_obj) { + $gettext_obj->nget(@_); + } + else { + return ($_[2] == 1 ? $_[0] : $_[1]) + } + }; } sub gettext { @@ -1848,6 +1859,11 @@ sub gettext { gettext(@_); } +sub ngettext { + define_gettext(); + ngettext(@_); +} + sub yesno ($) { my $val=shift; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index a8c9de2d3..96a2aa16d 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -911,6 +911,10 @@ time. This is the standard gettext function, although slightly optimised. +### `ngettext` + +This is the standard ngettext function, although slightly optimised. + ### `urlto($$;$)` Construct a relative url to the first parameter from the page named by the -- cgit v1.2.3 From 427720a21fb202f83c9e8df912cd464a2f5011aa Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Mon, 15 Feb 2010 02:10:23 +0000 Subject: + ipol.im --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 469fc0f6d..4502b589b 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -50,6 +50,7 @@ Projects & Organizations * [The Philolexian Society of Columbia University](http://www.columbia.edu/cu/philo/) * [Fachschaft Informatik HU Berlin](http://fachschaft.informatik.hu-berlin.de/) * [Wetknee Books](http://www.wetknee.com/) +* [IPOL Image Processing On Line](http://www.ipol.im) Personal sites and blogs ======================== -- cgit v1.2.3 From 079377427fbddb20b2b5e7d4e687c6b9631c90ab Mon Sep 17 00:00:00 2001 From: aghitza <aghitza@web> Date: Mon, 15 Feb 2010 10:58:40 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 4502b589b..ee060e063 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -135,6 +135,7 @@ Personal sites and blogs * [Avian Aqua Miser](http://www.avianaquamiser.com/) * [Cosmic Cookout](http://www.cosmiccookout.com/) * [Backyard Deer](http://www.backyarddeer.com/) +* [Alex Ghitza homepage and blog](http://aghitza.org/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From bf33edc573952a8e21b41c8aaf35c66ee5073a12 Mon Sep 17 00:00:00 2001 From: "http://mem.myopenid.com/" <http://mem.myopenid.com/@web> Date: Mon, 15 Feb 2010 22:38:06 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index ee060e063..df2d6b68b 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -51,6 +51,7 @@ Projects & Organizations * [Fachschaft Informatik HU Berlin](http://fachschaft.informatik.hu-berlin.de/) * [Wetknee Books](http://www.wetknee.com/) * [IPOL Image Processing On Line](http://www.ipol.im) +* [Debian Costa Rica](http://cr.debian.net/) Personal sites and blogs ======================== -- cgit v1.2.3 From b12f65d4dcee8063de5252a407491a1dc212cb9a Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Tue, 16 Feb 2010 18:32:39 +0000 Subject: redirect --- doc/users/NicolasLimare.mdwn | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/users/NicolasLimare.mdwn b/doc/users/NicolasLimare.mdwn index 003449d40..602d28ba2 100644 --- a/doc/users/NicolasLimare.mdwn +++ b/doc/users/NicolasLimare.mdwn @@ -1,9 +1 @@ -Nicolas (nil) uses ikiwiki on a site/wiki/blog/something... and feels this approach much more comfortable than the usual web-only ones. - -He didn't touch any perl code before using ikiwiki, ant that was the first opportunity to propose tiny patches. - -Actualy, he would have felt much more comfortable with a python ikiwiki... :) - -Can be reached at nicolas at limare.net - -By the way, I can make translations to french if needed. And maybe to japanese. \ No newline at end of file +[[meta redirect="nil"]] -- cgit v1.2.3 From 1ae028d4fa92d2f6e7a7ec9e2bccabe28ca496b7 Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Tue, 16 Feb 2010 18:33:11 +0000 Subject: fix --- doc/users/NicolasLimare.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/NicolasLimare.mdwn b/doc/users/NicolasLimare.mdwn index 602d28ba2..c409e3a2d 100644 --- a/doc/users/NicolasLimare.mdwn +++ b/doc/users/NicolasLimare.mdwn @@ -1 +1 @@ -[[meta redirect="nil"]] +[[!meta redirect="nil"]] -- cgit v1.2.3 From 8df6055f4cb95b3d8f541acfccc6b0ba2d88f7b6 Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Tue, 16 Feb 2010 18:36:36 +0000 Subject: import --- doc/users/nil.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/users/nil.mdwn (limited to 'doc') diff --git a/doc/users/nil.mdwn b/doc/users/nil.mdwn new file mode 100644 index 000000000..e1826cec6 --- /dev/null +++ b/doc/users/nil.mdwn @@ -0,0 +1,8 @@ +nil first used ikiwiki on a site/wiki/blog/something... and felt this approach much more comfortable than the usual web-only ones. +Since then, ikiwiki is a kind of swiss army knife when it comes to build anything for the web. + +Can be reached at nicolas at limare.net + +The current big ikiwiki-powered project is <http://www.ipol.im> + +TODO: document "how to split public/edition interfaces" -- cgit v1.2.3 From ce8bb219586332032110da8835fde8dd5f0ed91f Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Tue, 16 Feb 2010 18:42:11 +0000 Subject: whishlist --- doc/todo/cdate_and_mdate_available_for_templates.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/todo/cdate_and_mdate_available_for_templates.mdwn (limited to 'doc') diff --git a/doc/todo/cdate_and_mdate_available_for_templates.mdwn b/doc/todo/cdate_and_mdate_available_for_templates.mdwn new file mode 100644 index 000000000..29c36b9f7 --- /dev/null +++ b/doc/todo/cdate_and_mdate_available_for_templates.mdwn @@ -0,0 +1,15 @@ +[[!tag whishlist]] + +`CDATE_3339`, `CDATE_822`, `MDATE_3339` and `MDATE_822` template variables would be useful for evey page, at least for my templates with Dublin Core metadata. + +I tried to pick the relevant lines of the [[inline|plugins/inline]] plugin and hack it into a custom plugin, but it failed miserably because of my obvious lack of perl litteracy... + +Anyway, I'm sure this is almost nothing... + +* `sub date_822 ($) {}` +* `sub date_3339 ($) {}` +* and something like `$template->param('cdate_822' => date_822($IkiWiki::pagectime{$page}));` + +Anyone can fill the missing lines? + +-- [[nil]] -- cgit v1.2.3 From d4bc6e25e43f0cb2f12d7e9d954cbfc227c1686d Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Tue, 16 Feb 2010 18:43:10 +0000 Subject: typo --- doc/todo/cdate_and_mdate_available_for_templates.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/cdate_and_mdate_available_for_templates.mdwn b/doc/todo/cdate_and_mdate_available_for_templates.mdwn index 29c36b9f7..70d8fc8c9 100644 --- a/doc/todo/cdate_and_mdate_available_for_templates.mdwn +++ b/doc/todo/cdate_and_mdate_available_for_templates.mdwn @@ -1,4 +1,4 @@ -[[!tag whishlist]] +[[!tag wishlist]] `CDATE_3339`, `CDATE_822`, `MDATE_3339` and `MDATE_822` template variables would be useful for evey page, at least for my templates with Dublin Core metadata. -- cgit v1.2.3 From f02b87433b271b6229686d1494fbe419c6eca149 Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Tue, 16 Feb 2010 18:44:28 +0000 Subject: s/redirect/redir/ --- doc/users/NicolasLimare.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/NicolasLimare.mdwn b/doc/users/NicolasLimare.mdwn index c409e3a2d..56a950f7e 100644 --- a/doc/users/NicolasLimare.mdwn +++ b/doc/users/NicolasLimare.mdwn @@ -1 +1 @@ -[[!meta redirect="nil"]] +[[!meta redir="nil"]] -- cgit v1.2.3 From 34d6403a4b12c9578e7b0ea3fb765e1c5e72520f Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Wed, 17 Feb 2010 11:54:26 +0000 Subject: new feature request: identifying trivial edits --- ...trivial__44___identify__47__filter_on_trivial_changes.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/todo/mark_edit_as_trivial__44___identify__47__filter_on_trivial_changes.mdwn (limited to 'doc') diff --git a/doc/todo/mark_edit_as_trivial__44___identify__47__filter_on_trivial_changes.mdwn b/doc/todo/mark_edit_as_trivial__44___identify__47__filter_on_trivial_changes.mdwn new file mode 100644 index 000000000..2b2b0242e --- /dev/null +++ b/doc/todo/mark_edit_as_trivial__44___identify__47__filter_on_trivial_changes.mdwn @@ -0,0 +1,11 @@ +One feature of mediawiki which I quite like is the ability to mark a change as 'minor', or 'trivial'. This can then be used to filter the 'recentchanges' page, to only show substantial edits. + +The utility of this depends entirely on whether the editors use it properly. + +I currently use an inline on the front page of my personal homepage to show the most recent pages (by creation date) within a subsection of my site (a blog). Blog posts are rarely modified much after they are 'created' (or published - I bodge the creation time via meta when I publish a post. It might sit in draft form indefinitely), so this effectively shows only non-trivial changes. + +I would like to have a short list of the most recent modifications to the site on the front page. I therefore want to sort by modified time rather than creation time, but exclude edits that I self-identify as minor. I also only want to take a short number of items, the top 5, and display only their titles (which may be derived from filename, or set via meta again). + +I'm still thinking through how this might be achieved in an ikiwiki-suitable fashion, but I think I need a scheme to identify certain edits as trivial. This would have to work via web edits (easier: could add a check box to the edit form) and plain changes in the VCS (harder: scan for keywords in a commit message? in a VCS-agnostic fashion?) + +[[!tag wishlist]] -- cgit v1.2.3 From 995e247f42e88eeefa47e62d1fada49edaa953a3 Mon Sep 17 00:00:00 2001 From: "https://mukund.startssl.com/" <https://mukund.startssl.com/@web> Date: Thu, 18 Feb 2010 11:43:11 +0000 Subject: Add my homepage generated by Ikiwiki --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index df2d6b68b..c9dea83a8 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -137,6 +137,7 @@ Personal sites and blogs * [Cosmic Cookout](http://www.cosmiccookout.com/) * [Backyard Deer](http://www.backyarddeer.com/) * [Alex Ghitza homepage and blog](http://aghitza.org/) +* [Mukund's homepage](http://www.mukund.org/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 3200be56e5fc6c89115277f9f842a3f417f8d7db Mon Sep 17 00:00:00 2001 From: prosper <prosper@web> Date: Fri, 19 Feb 2010 10:23:26 +0000 Subject: --- doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn (limited to 'doc') diff --git a/doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn b/doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn new file mode 100644 index 000000000..8cc97a032 --- /dev/null +++ b/doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn @@ -0,0 +1,7 @@ +It seems that rebuild a wiki (`ikiwiki --rebuild`) after changing the `underlaydir` config option doesn't remove the pages coming from the previous underlaydir. + +I've noticed this with the debian package version 3.20100102.3~bpo50+1. + +Perhaps it is possible to improve this or mention it in the manual page? + +--prosper -- cgit v1.2.3 From 598fdfd1aa1180e296af42f5b15f6b3add716be7 Mon Sep 17 00:00:00 2001 From: Jogo <Jogo@web> Date: Fri, 19 Feb 2010 10:56:31 +0000 Subject: Correct broken links --- doc/users/jogo.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/users/jogo.mdwn b/doc/users/jogo.mdwn index 6f87cbc45..e8068a10f 100644 --- a/doc/users/jogo.mdwn +++ b/doc/users/jogo.mdwn @@ -1,5 +1,5 @@ * An [economic game](http://sef.matabio.net/) in french, which [use](http://sef.matabio.net/wiki/) IkiWiki. - * Some [plugins](http://kimya.matabio.net/tcgi/hg/IkiPlugins/file/). - * An alternative [base wiki](http://kimya.matabio.net/tcgi/hg/FrIkiWiki/file/) in french. + * Some [plugins](http://www.matabio.net/tcgi/hg/IkiPlugins/file/). + * An alternative [base wiki](http://www.matabio.net/tcgi/hg/FrIkiWiki/file/) in french. email: `jogo matabio net`. -- cgit v1.2.3 From d1137697a80ca5e90bfc9d1c1f00b455871b99c5 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Fri, 19 Feb 2010 14:00:52 +0000 Subject: fix 'done' link --- doc/todo/conflict_free_comment_merges.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/conflict_free_comment_merges.mdwn b/doc/todo/conflict_free_comment_merges.mdwn index 2cef0ee8c..e84400c17 100644 --- a/doc/todo/conflict_free_comment_merges.mdwn +++ b/doc/todo/conflict_free_comment_merges.mdwn @@ -20,4 +20,4 @@ What do you think [[smcv]]? --[[Joey]] > are quite low since it modifies the input text and adds a date stamp to > it. > -> Anyway, I think it's good, [[[done]] --[[Joey]] +> Anyway, I think it's good, [[done]] --[[Joey]] -- cgit v1.2.3 From 59017c6ae19f661761d0ae3f143fbda643ca1e8d Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Fri, 19 Feb 2010 14:02:29 +0000 Subject: prevent keyboard mashing --- doc/todo/double-click_protection_for_form_buttons.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/todo/double-click_protection_for_form_buttons.mdwn (limited to 'doc') diff --git a/doc/todo/double-click_protection_for_form_buttons.mdwn b/doc/todo/double-click_protection_for_form_buttons.mdwn new file mode 100644 index 000000000..4c0d95bd6 --- /dev/null +++ b/doc/todo/double-click_protection_for_form_buttons.mdwn @@ -0,0 +1 @@ +A small piece of JS to prevent double-submitting forms would be quite nice. I seem to have developed a habit of doing this and having to resolve a merge conflict for two initial commits. -- [[Jon]] -- cgit v1.2.3 From d01e7248bf4c9f6a7ec6920a0fe4cda4d776e171 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 19 Feb 2010 13:33:48 -0500 Subject: response --- doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn b/doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn index 8cc97a032..8613ef03c 100644 --- a/doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn +++ b/doc/bugs/rebuild_after_changing_the_underlaydir_config_option.mdwn @@ -5,3 +5,8 @@ I've noticed this with the debian package version 3.20100102.3~bpo50+1. Perhaps it is possible to improve this or mention it in the manual page? --prosper + +> --rebuild causes ikiwiki to throw away all its info about what it built +> before, so it will never clean up pages that have been removed, by any +> means. Suggest you do a --refresh, possibly followed by a --rebuild +> if that is really necessary. --[[Joey]] -- cgit v1.2.3 From ef537ed3553c590abbc302a97299ae5082471fea Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 19 Feb 2010 13:38:37 -0500 Subject: response --- doc/todo/double-click_protection_for_form_buttons.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/todo/double-click_protection_for_form_buttons.mdwn b/doc/todo/double-click_protection_for_form_buttons.mdwn index 4c0d95bd6..501be4498 100644 --- a/doc/todo/double-click_protection_for_form_buttons.mdwn +++ b/doc/todo/double-click_protection_for_form_buttons.mdwn @@ -1 +1,5 @@ A small piece of JS to prevent double-submitting forms would be quite nice. I seem to have developed a habit of doing this and having to resolve a merge conflict for two initial commits. -- [[Jon]] + +> By the time you see that merge conflict, the first commit has +> already successfully happened, so you can just hit cancel +> and throw away the second submit. --[[Joey]] -- cgit v1.2.3 From f0b0bb5894e056eeb67c50cf096f950f1fbc718a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 19 Feb 2010 14:27:42 -0500 Subject: ctime idea --- doc/todo/auto_getctime_on_fresh_build.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/todo/auto_getctime_on_fresh_build.mdwn (limited to 'doc') diff --git a/doc/todo/auto_getctime_on_fresh_build.mdwn b/doc/todo/auto_getctime_on_fresh_build.mdwn new file mode 100644 index 000000000..ea95fb8c9 --- /dev/null +++ b/doc/todo/auto_getctime_on_fresh_build.mdwn @@ -0,0 +1,9 @@ +[[!tag wishlist]] + +It might be a good idea to enable --getctime when `.ikiwiki` does not +exist. This way a new checkout of a `srcdir` would automatically get +ctimes right. (Running --getctime whenever a rebuild is done would be too +slow.) --[[Joey]] + +Could this be too annoying in some cases, eg, checking out a large wiki +that needs to get set up right away? --[[Joey]] -- cgit v1.2.3 From d83c4b91576131e1f1815357387e1505e6b59fc1 Mon Sep 17 00:00:00 2001 From: ThomasAdam <ThomasAdam@web> Date: Sun, 21 Feb 2010 13:43:26 +0000 Subject: The Fvwmwiki uses ikiwiki --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index c9dea83a8..958bd54ff 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -138,6 +138,7 @@ Personal sites and blogs * [Backyard Deer](http://www.backyarddeer.com/) * [Alex Ghitza homepage and blog](http://aghitza.org/) * [Mukund's homepage](http://www.mukund.org/) +* [Fvwm Wiki](http://fvwmwiki.xteddy.org) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From c67f96752642d4f01895f8ab135f2c5c6892b8be Mon Sep 17 00:00:00 2001 From: ThomasAdam <ThomasAdam@web> Date: Sun, 21 Feb 2010 13:44:29 +0000 Subject: The Fvwm Wiki not a personal site or blog. --- doc/ikiwikiusers.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 958bd54ff..62064e024 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -52,6 +52,7 @@ Projects & Organizations * [Wetknee Books](http://www.wetknee.com/) * [IPOL Image Processing On Line](http://www.ipol.im) * [Debian Costa Rica](http://cr.debian.net/) +* [Fvwm Wiki](http://fvwmwiki.xteddy.org) Personal sites and blogs ======================== @@ -138,7 +139,6 @@ Personal sites and blogs * [Backyard Deer](http://www.backyarddeer.com/) * [Alex Ghitza homepage and blog](http://aghitza.org/) * [Mukund's homepage](http://www.mukund.org/) -* [Fvwm Wiki](http://fvwmwiki.xteddy.org) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 9d8ae8a483d8fc32de95d7855202d00f85250794 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Wed, 24 Feb 2010 12:30:40 +0000 Subject: add a backlink-style map to the bottom of my page --- doc/users/jon.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index f08076c2a..35bdb5d7c 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -45,9 +45,14 @@ The following I have been looking at, but are on the back-burner: bugs such as [[bugs/tagged() matching wikilinks]]. Code for this lives in my github `tag2` branch: <http://github.com/jmtd/ikiwiki> -Finally, the following are merely half-formed thoughts: +Penultimately, the following are merely half-formed thoughts: * adding and removing tags to pages via the edit form by ticking and unticking checkboxes next to a tag name (rather than entering the directive into the text of the page directly) * perhaps the same for meta + +Finally, backlinks (since I have issues with the current backlinks +implementation, see [[bugs/backlinks onhover thing can go weird]]): + +[[!map pages="link(users/Jon)"]] -- cgit v1.2.3 From cd1c861b151621f76fece06899500f0dac2fec57 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Wed, 24 Feb 2010 12:32:32 +0000 Subject: switch to inline, instead of map --- doc/users/jon.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index 35bdb5d7c..d5593dcbf 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -55,4 +55,4 @@ Penultimately, the following are merely half-formed thoughts: Finally, backlinks (since I have issues with the current backlinks implementation, see [[bugs/backlinks onhover thing can go weird]]): -[[!map pages="link(users/Jon)"]] +[[!inline pages="link(users/Jon)" archive="yes" feeds="no"]] -- cgit v1.2.3 From b9aca496920ffd0edfcaba5d003bb68aa47dcb6a Mon Sep 17 00:00:00 2001 From: "http://people.ee.ethz.ch/~andrmuel/openid/" <http://people.ee.ethz.ch/~andrmuel/openid/@web> Date: Wed, 24 Feb 2010 14:59:31 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 62064e024..12d692979 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -139,6 +139,7 @@ Personal sites and blogs * [Backyard Deer](http://www.backyarddeer.com/) * [Alex Ghitza homepage and blog](http://aghitza.org/) * [Mukund's homepage](http://www.mukund.org/) +* [Andreas's homepage](http://0x7.ch/) - Ikiwiki, Subversion and CSS template Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From feeacaba028afe2e0b8835e2ebedc930de0f33a5 Mon Sep 17 00:00:00 2001 From: martin <martin@web> Date: Wed, 24 Feb 2010 15:12:40 +0000 Subject: --- ...by_pagename_and_not_title_when_show__61__title_is_used.mdwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn index f8e257daf..bc19e7d87 100644 --- a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn +++ b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn @@ -1,4 +1,4 @@ -The [[directive/map]] directive sorty by pagename. That looks kind of odd, when used together with show=title. I would expect it to sort by title then. +The [[ikiwiki/directive/map]] directive sort by pagename. That looks kind of odd, when used together with show=title. I would expect it to sort by title then. > This would be quite hard to fix. Map sorts the pages it displays by page > name, which has the happy effect of making "foo/bar" come after "foo"; @@ -6,3 +6,11 @@ The [[directive/map]] directive sorty by pagename. That looks kind of odd, when > it's located in. If sorting by title, that wouldn't hold. So, map > would have to be effectively totally rewritten, to build up each group > of child pages, and then re-sort those. --[[Joey]] + +>> Ok, you are right, that does would break the tree. This made me think that I do not +>> need to generate a tree for my particular use case just a list, so i thought i could use [[ikiwiki/directive/inline]] instead. +>> This created two new issues: +>> +>> 1. inline also does sort by pagename even when explicitly told to sort by title. +>> +>> 2. I cannot get inline to create a list when the htmltidy plugin is switched on. I have a template which is enclosed in an li tag, and i put the ul tag around the inline manually, but htmltidy breaks this. --martin -- cgit v1.2.3 From 983ecb0915b27f33e14e4b2e20090df69419f374 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 26 Feb 2010 06:37:42 +0000 Subject: made a suggestion --- ...ap_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn index bc19e7d87..de178d415 100644 --- a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn +++ b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn @@ -14,3 +14,5 @@ The [[ikiwiki/directive/map]] directive sort by pagename. That looks kind of odd >> 1. inline also does sort by pagename even when explicitly told to sort by title. >> >> 2. I cannot get inline to create a list when the htmltidy plugin is switched on. I have a template which is enclosed in an li tag, and i put the ul tag around the inline manually, but htmltidy breaks this. --martin + +>>>> You might want to check if the [[plugins/contrib/report]] plugin solves your problem. It can sort by title, among other things. --[[KathrynAndersen]] -- cgit v1.2.3 From 7bf28731d767e1d9b1b69df3927c27bd85974fdf Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/will.uther" <http://www.google.com/profiles/will.uther@web> Date: Sat, 27 Feb 2010 02:38:58 +0000 Subject: disable some inlines that I don't use much. --- doc/users/Will.mdwn | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/users/Will.mdwn b/doc/users/Will.mdwn index f5effdbe3..1956263e0 100644 --- a/doc/users/Will.mdwn +++ b/doc/users/Will.mdwn @@ -13,14 +13,16 @@ Unless otherwise specified, any code that I post to this wiki I release under th ------ +Disabling these as I'm not using them much any more... + ### Open Bugs: -[[!inline pages="link(users/Will) and bugs/* and !bugs/done and !bugs/discussion and !link(patch) and !link(bugs/done) and !bugs/*/*" archive="yes" feeds="no" ]] +\[[!inline pages="link(users/Will) and bugs/* and !bugs/done and !bugs/discussion and !link(patch) and !link(bugs/done) and !bugs/*/*" archive="yes" feeds="no" ]] ### Open ToDos: -[[!inline pages="link(users/Will) and todo/* and !todo/done and !todo/discussion and !link(patch) and !link(todo/done) and !bugs/*/*" archive="yes" feeds="no" ]] +\[[!inline pages="link(users/Will) and todo/* and !todo/done and !todo/discussion and !link(patch) and !link(todo/done) and !bugs/*/*" archive="yes" feeds="no" ]] ### Unapplied Patches: -[[!inline pages="link(users/Will) and (todo/* or bugs/*) and !bugs/done and !bugs/discussion and !todo/done and !todo/discussion and link(patch) and !link(bugs/done) and !link(todo/done) and !bugs/*/*" archive="yes" feeds="no" ]] +\[[!inline pages="link(users/Will) and (todo/* or bugs/*) and !bugs/done and !bugs/discussion and !todo/done and !todo/discussion and link(patch) and !link(bugs/done) and !link(todo/done) and !bugs/*/*" archive="yes" feeds="no" ]] -- cgit v1.2.3 From 100636afa253c9808654b5db45feabc4ca1c6f8c Mon Sep 17 00:00:00 2001 From: "http://privat.myopenid.com/" <http://privat.myopenid.com/@web> Date: Sat, 27 Feb 2010 15:12:39 +0000 Subject: patch for multiple sidebars --- ..._up_sidebar_to_allow_for_multiple_sidebars.mdwn | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'doc') diff --git a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn index fb942a495..02b83244e 100644 --- a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn +++ b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn @@ -13,5 +13,57 @@ those contents instead. > In mine I just copied sidebar out and made some extra "sidebars", but they go elsewhere. Ugly hack, but it works. --[[simonraven]] +>> Here a simple [[patch]] for multiple sidebars. Not too fancy but better than having multiple copies of the sidebar plugin. --[[jeanprivat]] + +<pre> +--- /usr/share/perl5/IkiWiki/Plugin/sidebar.pm 2010-02-11 22:53:17.000000000 -0500 ++++ plugins/IkiWiki/Plugin/sidebar.pm 2010-02-27 09:54:12.524412391 -0500 +@@ -19,12 +19,20 @@ + safe => 1, + rebuild => 1, + }, ++ active_sidebars => { ++ type => "string", ++ example => qw(sidebar banner footer), ++ description => "Which sidebars must be activated and processed.", ++ safe => 1, ++ rebuild => 1 ++ }, + } + +-sub sidebar_content ($) { ++sub sidebar_content ($$) { + my $page=shift; ++ my $sidebar=shift; + +- my $sidebar_page=bestlink($page, "sidebar") || return; ++ my $sidebar_page=bestlink($page, $sidebar) || return; + my $sidebar_file=$pagesources{$sidebar_page} || return; + my $sidebar_type=pagetype($sidebar_file); + +@@ -49,11 +57,17 @@ + + my $page=$params{page}; + my $template=$params{template}; +- +- if ($template->query(name => "sidebar")) { +- my $content=sidebar_content($page); +- if (defined $content && length $content) { +- $template->param(sidebar => $content); ++ ++ my @sidebars; ++ if (defined $config{active_sidebars} && length $config{active_sidebars}) { @sidebars = @{$config{active_sidebars}}; } ++ else { @sidebars = qw(sidebar); } ++ ++ foreach my $sidebar (@sidebars) { ++ if ($template->query(name => $sidebar)) { ++ my $content=sidebar_content($page, $sidebar); ++ if (defined $content && length $content) { ++ $template->param($sidebar => $content); ++ } + } + } + } +</pre> [[!tag wishlist]] -- cgit v1.2.3 From 7e2a22e0bf48ba58677b68d0950e18d2517b7bb3 Mon Sep 17 00:00:00 2001 From: "http://privat.myopenid.com/" <http://privat.myopenid.com/@web> Date: Sat, 27 Feb 2010 15:16:25 +0000 Subject: --- doc/users/jeanprivat.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/users/jeanprivat.mdwn (limited to 'doc') diff --git a/doc/users/jeanprivat.mdwn b/doc/users/jeanprivat.mdwn new file mode 100644 index 000000000..4d75a9867 --- /dev/null +++ b/doc/users/jeanprivat.mdwn @@ -0,0 +1 @@ +Jean Privat is <jean@pryen.org>. -- cgit v1.2.3 From 60d2dd318f66563c3ee3bde950d7f53426530acc Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Feb 2010 00:12:47 -0500 Subject: Add new --clean option; this makes ikiwiki remove all built files in the destdir, as well as wrappers and the .ikiwiki directory. --- IkiWiki.pm | 7 +++++++ IkiWiki/Render.pm | 11 +++++++++++ Makefile.PL | 2 +- debian/changelog | 4 +++- doc/usage.mdwn | 8 ++++++++ ikiwiki.in | 12 +++++++++++- ikiwiki.spec | 2 +- 7 files changed, 42 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 9df6c90d6..00eadfd98 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -409,6 +409,13 @@ sub getsetup () { safe => 0, rebuild => 0, }, + clean => { + type => "internal", + default => 0, + description => "running in clean mode", + safe => 0, + rebuild => 0, + }, refresh => { type => "internal", default => 0, diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 3ebb1a324..af24df155 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -683,6 +683,17 @@ sub refresh () { } } +sub clean_rendered { + lockwiki(); + loadindex(); + remove_unrendered(); + foreach my $page (keys %oldrenderedfiles) { + foreach my $file (@{$oldrenderedfiles{$page}}) { + prune($config{destdir}."/".$file); + } + } +} + sub commandline_render () { lockwiki(); loadindex(); diff --git a/Makefile.PL b/Makefile.PL index 462f7364d..52421a711 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -51,7 +51,7 @@ docwiki: ikiwiki.out $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup docwiki.setup -refresh extra_clean: - rm -rf html doc/.ikiwiki + $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean rm -f *.man ikiwiki.out ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean diff --git a/debian/changelog b/debian/changelog index 832bbaa85..3b92c598d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100213) UNRELEASED; urgency=low +ikiwiki (3.20100228) UNRELEASED; urgency=low * comments: Display number of comments in comment action link. * Rebuild wikis on upgrade to this version to get the comment counts @@ -8,6 +8,8 @@ ikiwiki (3.20100213) UNRELEASED; urgency=low files/directories. * Fix admin openid detection in setup automator, and avoid prompting for a password. + * Add new --clean option; this makes ikiwiki remove all built + files in the destdir, as well as wrappers and the .ikiwiki directory. -- Joey Hess <joeyh@debian.org> Sun, 14 Feb 2010 17:02:10 -0500 diff --git a/doc/usage.mdwn b/doc/usage.mdwn index e4808d4c2..a105d7e59 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -50,6 +50,14 @@ These options control the mode that ikiwiki operates in. If used with --setup --refresh, this makes it also update any configured wrappers. +* --clean + + This makes ikiwiki clean up by removing any files it denerated in the + `destination` directory, as well as any configured wrappers, and the + `.ikiwiki` state directory. This is mostly useful if you're running + ikiwiki in a Makefile to build documentation and want a corresponding + `clean` target. + * --cgi Enable [[CGI]] mode. In cgi mode ikiwiki runs as a cgi script, and diff --git a/ikiwiki.in b/ikiwiki.in index b8581d880..ae1251ff6 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -37,6 +37,7 @@ sub getconfig () { "syslog!" => \$config{syslog}, "rebuild!" => \$config{rebuild}, "refresh!" => \$config{refresh}, + "clean!" => \$config{clean}, "post-commit" => \$config{post_commit}, "render=s" => \$config{render}, "wrappers!" => \$config{genwrappers}, @@ -135,6 +136,7 @@ sub main () { if (@{$config{wrappers}} && ! $config{render} && ! $config{dumpsetup} && + ! $config{clean} && ((! $config{refresh} && ! $config{post_commit}) || $config{genwrappers})) { debug(gettext("generating wrappers..")); @@ -159,7 +161,7 @@ sub main () { # setup implies a wiki rebuild by default if (! $config{refresh} && ! $config{render} && - ! $config{post_commit}) { + ! $config{post_commit} && ! $config{clean}) { $config{rebuild}=1; } } @@ -190,6 +192,14 @@ sub main () { elsif ($config{post_commit} && ! commit_hook_enabled()) { # do nothing } + elsif ($config{clean}) { + require IkiWiki::Render; + foreach my $wrapper (@{$config{wrappers}}) { + prune($wrapper->{wrapper}); + } + clean_rendered(); + system("rm", "-rf", $config{wikistatedir}); + } else { if ($config{rebuild}) { debug(gettext("rebuilding wiki..")); diff --git a/ikiwiki.spec b/ikiwiki.spec index 865c9a325..1dba9f463 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20100212 +Version: 3.20100228 Release: 1%{?dist} Summary: A wiki compiler -- cgit v1.2.3 From 4be426ab1ad01a2a90151d741f737d41a12a6cbe Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Mon, 1 Mar 2010 10:28:59 +0000 Subject: wl from report to field plugin pages --- doc/plugins/contrib/report.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/report.mdwn b/doc/plugins/contrib/report.mdwn index 7130bcb5f..e8cbd0486 100644 --- a/doc/plugins/contrib/report.mdwn +++ b/doc/plugins/contrib/report.mdwn @@ -18,7 +18,7 @@ IkiWiki::Plugin::report - Produce templated reports from page field data. This plugin provides the **report** directive. This enables one to report on the structured data ("field" values) of multiple pages; the output is formatted -via a template. This depends on the "field" plugin. +via a template. This depends on the [[plugins/contrib/field]] plugin. The pages to report on are selected by a PageSpec given by the "pages" parameter. The template is given by the "template" parameter. -- cgit v1.2.3 From a982b9cf193445dccec0e9ba87eeed324825c2cc Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Mon, 1 Mar 2010 13:14:48 +0000 Subject: new tip: spam and software sites --- doc/tips/spam_and_softwaresites.mdwn | 86 ++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 doc/tips/spam_and_softwaresites.mdwn (limited to 'doc') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn new file mode 100644 index 000000000..fe73518ef --- /dev/null +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -0,0 +1,86 @@ +Any wiki with a form of web-editing enabled will have to deal with +spam. (See the [[plugins/blogspam]] plugin for one defensive tool you +can deploy). + +If: + + * you are using ikiwiki to manage the website for a [[examples/softwaresite]] + * you allow web-based commits, to let people correct documentation, or report + bugs, etc. + * the documentation is stored in the same revision control repository as your + software + +It is undesirable to have your software's VCS history tainted by spam and spam +clean-up commits. Here is one approach you can use to prevent this. This +example is for the [[git]] version control system, but the principles should +apply to others. + +## Isolate web commits to a specific branch + +Create a separate branch to contain web-originated edits (named `doc` in this +example): + + $ git checkout -b doc + +Adjust your setup file accordingly: + + gitmaster_branch => 'doc', + +## merging good web commits into the master branch + +You will want to periodically merge legitimate web-based commits back into +your master branch. Ensure that there is no spam in the documentation +branch. If there is, see 'erase spam from the commit history', below, first. + +Once you are confident it's clean: + + # ensure you are on the doc branch + $ git branch + doc + * master + $ git merge --ff doc + +## removing spam + +### short term + +In the short term, just revert the spammy commit. + +If the spammy commit was the top-most: + + $ git revert HEAD + +This will clean the spam out of the files, but it will leave both the spam +commit and the revert commit in the history. + +### erase spam from the commit history + +Git allows you to rewrite your commit history. We will take advantage of this +to eradicate spam from the history of the doc branch. + +This is a useful tool, but it is considered bad practise to rewrite the +history of public repositories. If your software's repository is public, you +should make it clear that the history of the `doc` branch in your repository +is unstable. + +Once you have been spammed, use `git rebase` to remove the spam commits from +the history. Assuming that your `doc` branch was split off from a branch +called `master`: + + # ensure you are on the doc branch + $ git branch + * doc + master + $ git rebase --interactive master + +In your editor session, you will see a series of lines for each commit made to +the `doc` branch since it was branched from `master` (or since the last merge +back into `master`). Delete the lines corresponding to spammy commits, then +save and exit your editor. + +Caveat: if there are no commits you want to keep (i.e. all the commits since +the last merge into master are either spam or spam reverts) then `git rebase` +will abort. Therefore, this approach only works if you have at least one +non-spam commit to the documentation since the last merge into `master`. For +this reason, it's best to tackle spam with reverts until you have at least one +commit you want merged back into the main history. -- cgit v1.2.3 From 397fc5b2a3dff0ff3a105573f3b1fa5ea8169dfe Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Mon, 1 Mar 2010 13:16:54 +0000 Subject: ref new tip from softwaresite page --- doc/examples/softwaresite.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/examples/softwaresite.mdwn b/doc/examples/softwaresite.mdwn index e43a9d116..99f791177 100644 --- a/doc/examples/softwaresite.mdwn +++ b/doc/examples/softwaresite.mdwn @@ -14,3 +14,6 @@ Some additional configuration you might want to do: * Read the [[tips/integrated_issue_tracking_with_ikiwiki]] article for tips about how to use ikiwiki as a BTS. + +* Read [[tips/spam_and_softwaresites]] for information on how to keep spam + and spam-fighting commits out of your main version control history. -- cgit v1.2.3 From 0284ccf5eb6163d4fe49ac829a1f976336bc5908 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 1 Mar 2010 14:43:55 +0000 Subject: fixed typo --- doc/plugins/contrib/report.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/report.mdwn b/doc/plugins/contrib/report.mdwn index e8cbd0486..c364d4a3a 100644 --- a/doc/plugins/contrib/report.mdwn +++ b/doc/plugins/contrib/report.mdwn @@ -89,7 +89,7 @@ The "mood_summary" template might be like this: ## <TMPL_VAR NAME="HEADER1"> </TMPL_IF> ### <TMPL_VAR NAME="TITLE"> - (<TMPL_VAR NAME="DATE">) \[[<TMPL_VAR NAME="PAGE"]] + (<TMPL_VAR NAME="DATE">) \[[<TMPL_VAR NAME="PAGE">]] <TMPL_VAR NAME="DESCRIPTION"> ### Advanced Options -- cgit v1.2.3 From fe571e959007e7e4f895869c980b474f5ee6e995 Mon Sep 17 00:00:00 2001 From: "http://liw.fi/" <http://liw.fi/@web> Date: Mon, 1 Mar 2010 21:12:48 +0000 Subject: --- doc/plugins/rename.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/rename.mdwn b/doc/plugins/rename.mdwn index ddaede8b0..abb361329 100644 --- a/doc/plugins/rename.mdwn +++ b/doc/plugins/rename.mdwn @@ -2,7 +2,8 @@ [[!tag type/web]] This plugin allows pages or other files to be renamed using the web -interface. +interface. Following Unix tradition, renaming also allows moving to a +different directory. Users can only rename things that they are allowed to edit or upload. -- cgit v1.2.3 From 7495d30a6ab00d09ea142cfdc599c8abfb64340e Mon Sep 17 00:00:00 2001 From: Thiana <Thiana@web> Date: Mon, 1 Mar 2010 21:15:29 +0000 Subject: --- doc/ikiwiki/directive/inline/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index 998ba642b..6a186cd93 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -1,3 +1,10 @@ +## Combine inline and toggle + +Is it possible to combine the behaviour of toggle and inline? ie, have it present of list of 'headlines' which are created from seperate subpages which can be clicked to expand to the body of the inlined page. Thanks. + +-- Thiana + +--- ## How do you provide the per post discussion links in your own blog? > That's configured by the "actions" parameter to the inline directive. See -- cgit v1.2.3 From 837b04759c0895d6341a6a51fc05be1c3e5ef2ca Mon Sep 17 00:00:00 2001 From: Thiana <Thiana@web> Date: Mon, 1 Mar 2010 21:17:09 +0000 Subject: --- doc/plugins/creole/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/plugins/creole/discussion.mdwn b/doc/plugins/creole/discussion.mdwn index 38ee2bd78..eab41349a 100644 --- a/doc/plugins/creole/discussion.mdwn +++ b/doc/plugins/creole/discussion.mdwn @@ -12,4 +12,9 @@ I've installed Text::WikiCreole 0.05 and enabled the plugin, but I get an error >>> forgot, done now --[[Joey]] +--- +## External Links + I'm moving over a really stinkingly old UseMod and creole seems the nearest match. I've worked out that Bare /Subpage links need to become \[\[Subpage\]\], and Top/Sub links need to be \[\[Top/Sub\]\] (or \[\[Top/Sub|Top/Sub\]\], to display in exactly the same way), but I'm stuck on generic hyperlinks. The creole cheat sheet says I should be able to do \[\[http://url.path/foo|LinkText\]\], but that comes out as a link to create the "linktext" page, and Markdown-style \[Link Text\](http://url.path/foo) just gets rendered as is. Any suggestions? --[[schmonz]] + +> Was this problem ever solved? -- Thiana -- cgit v1.2.3 From 159471c92359c2da77bd0025f1718acbe7ff2a0c Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Mon, 1 Mar 2010 21:23:00 +0000 Subject: response --- doc/plugins/creole/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/creole/discussion.mdwn b/doc/plugins/creole/discussion.mdwn index eab41349a..7f47c2c97 100644 --- a/doc/plugins/creole/discussion.mdwn +++ b/doc/plugins/creole/discussion.mdwn @@ -18,3 +18,5 @@ I've installed Text::WikiCreole 0.05 and enabled the plugin, but I get an error I'm moving over a really stinkingly old UseMod and creole seems the nearest match. I've worked out that Bare /Subpage links need to become \[\[Subpage\]\], and Top/Sub links need to be \[\[Top/Sub\]\] (or \[\[Top/Sub|Top/Sub\]\], to display in exactly the same way), but I'm stuck on generic hyperlinks. The creole cheat sheet says I should be able to do \[\[http://url.path/foo|LinkText\]\], but that comes out as a link to create the "linktext" page, and Markdown-style \[Link Text\](http://url.path/foo) just gets rendered as is. Any suggestions? --[[schmonz]] > Was this problem ever solved? -- Thiana + +>> Not by me. If I were looking at the problem now, with fresh eyes, I'd probably bite the bullet and just convert everything to Markdown. --[[schmonz]] -- cgit v1.2.3 From b3df992552b2a608fd46740252b8fd76bf3c09bb Mon Sep 17 00:00:00 2001 From: "http://cdombroski.myopenid.com/" <http://cdombroski.myopenid.com/@web> Date: Tue, 2 Mar 2010 02:19:51 +0000 Subject: --- doc/bugs/External_links_with_Creole.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/bugs/External_links_with_Creole.mdwn (limited to 'doc') diff --git a/doc/bugs/External_links_with_Creole.mdwn b/doc/bugs/External_links_with_Creole.mdwn new file mode 100644 index 000000000..3d800b04e --- /dev/null +++ b/doc/bugs/External_links_with_Creole.mdwn @@ -0,0 +1,3 @@ +When using Creole for markup, creating an external link appears to be impossible. Neither \[[Outside URL|http://example.com]] nor <<http://example.com>> nor \[Outside URL]\(http://example.com) work. The first gets rendered as a broken WikiLink, the second get eaten and the last is not parsed in anyway so you end up with that exact text in your page. + +I'd have made this as a Creole page as a practical demonstration, but that doesn't seem possible here. Here's a page with an example: <https://www.icanttype.org//demo/CreoleExternalLinks> -- cgit v1.2.3 From d469a410eaad03553cb5ef41a69c772c6d50bf76 Mon Sep 17 00:00:00 2001 From: "http://cdombroski.myopenid.com/" <http://cdombroski.myopenid.com/@web> Date: Tue, 2 Mar 2010 15:47:23 +0000 Subject: Bug: 404 plugin & lighttpd --- doc/bugs/404_plugin_and_lighttpd.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/404_plugin_and_lighttpd.mdwn (limited to 'doc') diff --git a/doc/bugs/404_plugin_and_lighttpd.mdwn b/doc/bugs/404_plugin_and_lighttpd.mdwn new file mode 100644 index 000000000..e60fd209a --- /dev/null +++ b/doc/bugs/404_plugin_and_lighttpd.mdwn @@ -0,0 +1,5 @@ +Lighttpd apparently sets REDIRECT_STATUS=200 for the server.error-handler-404 page. This breaks the 404 plugin which checks this variable for 404 before processing the URI. It also doesn't seem to set REDIRECT_URL. + +I was able to fix my server to check the REQUEST_URI for ikiwiki.cgi and to continue processing if it was not found, passing $ENV{SEVER_NAME} . $ENV{REQUEST_URI} as the first parameter to cgi_page_from_404. However, my perl is terrible and I just made it work rather than figuring out exactly what to do to get it to work on both lighttpd and apache. + +This is with lighttpd 1.4.19 on Debian. -- cgit v1.2.3 From 8aae08aafda8be4d17dd45bd04318b40e276878a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 2 Mar 2010 19:56:53 +0000 Subject: --- doc/bugs/404_plugin_and_lighttpd.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/bugs/404_plugin_and_lighttpd.mdwn b/doc/bugs/404_plugin_and_lighttpd.mdwn index e60fd209a..29ca107dc 100644 --- a/doc/bugs/404_plugin_and_lighttpd.mdwn +++ b/doc/bugs/404_plugin_and_lighttpd.mdwn @@ -3,3 +3,11 @@ Lighttpd apparently sets REDIRECT_STATUS=200 for the server.error-handler-404 pa I was able to fix my server to check the REQUEST_URI for ikiwiki.cgi and to continue processing if it was not found, passing $ENV{SEVER_NAME} . $ENV{REQUEST_URI} as the first parameter to cgi_page_from_404. However, my perl is terrible and I just made it work rather than figuring out exactly what to do to get it to work on both lighttpd and apache. This is with lighttpd 1.4.19 on Debian. + +> /cgi-bin/ikiwiki.cgi?do=goto also provides redirection in the same way, +> if that's any help? You might need to set the lighttpd 404 handler to +> that, then compose REDIRECT_URL from other variables if necessary. +> +> I originally wrote the plugin for Apache; [[weakish]] contributed the +> lighttpd docs and might know more about how to make it work there. +> --[[smcv]] -- cgit v1.2.3 From 8b6fb02ab5482c46ea53ee08eff4f8b65ef99a0d Mon Sep 17 00:00:00 2001 From: "http://cdombroski.myopenid.com/" <http://cdombroski.myopenid.com/@web> Date: Tue, 2 Mar 2010 21:00:28 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 12d692979..345604c36 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -140,6 +140,7 @@ Personal sites and blogs * [Alex Ghitza homepage and blog](http://aghitza.org/) * [Mukund's homepage](http://www.mukund.org/) * [Andreas's homepage](http://0x7.ch/) - Ikiwiki, Subversion and CSS template +* [Chris Dombroski's boring bliki](https://www.icanttype.org/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 4a7fb67ee6c32b1d66e19f345998b98b169100f0 Mon Sep 17 00:00:00 2001 From: "http://cdombroski.myopenid.com/" <http://cdombroski.myopenid.com/@web> Date: Wed, 3 Mar 2010 00:14:47 +0000 Subject: Posting my change to the 404 module --- doc/bugs/404_plugin_and_lighttpd.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/bugs/404_plugin_and_lighttpd.mdwn b/doc/bugs/404_plugin_and_lighttpd.mdwn index 29ca107dc..ffbad8add 100644 --- a/doc/bugs/404_plugin_and_lighttpd.mdwn +++ b/doc/bugs/404_plugin_and_lighttpd.mdwn @@ -11,3 +11,25 @@ This is with lighttpd 1.4.19 on Debian. > I originally wrote the plugin for Apache; [[weakish]] contributed the > lighttpd docs and might know more about how to make it work there. > --[[smcv]] + +>> As I said, I got it working for me, but somebody who knows perl should probably look at it with the aim of making it work for everyone. +>> I considered having lighttpd construct a proper url for the 404 redirect itself, but I don't know if it can do something like that or not. +>> For what it's worth, here's the change I made to the module: + + sub cgi ($) { + my $cgi=shift; + if ($ENV{REQUEST_URI} !~ /ikiwiki\.cgi/) { + my $page = cgi_page_from_404( + Encode::decode_utf8($ENV{SERVER_NAME} . $ENV{REQUEST_URI}), + $config{url}, $config{usedirs}); + IkiWiki::Plugin::goto::cgi_goto($cgi, $page); + } + + # if (exists $ENV{REDIRECT_STATUS} && + # $ENV{REDIRECT_STATUS} eq '404') { + # my $page = cgi_page_from_404( + # Encode::decode_utf8($ENV{REDIRECT_URL}), + # $config{url}, $config{usedirs}); + # IkiWiki::Plugin::goto::cgi_goto($cgi, $page); + # } + } -- cgit v1.2.3 From 7265dbe4149642fff28ad296fc6a65d692f16be1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 2 Mar 2010 22:23:29 -0500 Subject: add news item for ikiwiki 3.20100302 --- doc/news/version_3.20091202.mdwn | 17 ----------------- doc/news/version_3.20100302.mdwn | 12 ++++++++++++ 2 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 doc/news/version_3.20091202.mdwn create mode 100644 doc/news/version_3.20100302.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091202.mdwn b/doc/news/version_3.20091202.mdwn deleted file mode 100644 index 60f17fe63..000000000 --- a/doc/news/version_3.20091202.mdwn +++ /dev/null @@ -1,17 +0,0 @@ -ikiwiki 3.20091202 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * meta: Generate meta description tags even when the html scrubber is - enabled. - * meta: Allow use of DESCRIPTION in templates to get at the meta description - value. (Thanks, NicolasLimare) - * inline: Use caching of inlined pages to speed up builds of inlines that - include feeds. Speedup of about 25% for small inlines; could be much - larger for inlines of many, or complex pages. - * Added (incomplete) Turkish po file. Closes: #[556744](http://bugs.debian.org/556744) - Thanks, Recai Oktaş - * date: New plugin that allows inserting date directives that expand to - pretty-printed dates, using the same formatting as used for page - modification date display, etc. - * htmllink: Allow a title attribute to be specified. - * calendar: Add title attributes for all links in the calendars. - * calendar: Fix month wraparound error that broke in December."""]] \ No newline at end of file diff --git a/doc/news/version_3.20100302.mdwn b/doc/news/version_3.20100302.mdwn new file mode 100644 index 000000000..f439b1b23 --- /dev/null +++ b/doc/news/version_3.20100302.mdwn @@ -0,0 +1,12 @@ +ikiwiki 3.20100302 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * comments: Display number of comments in comment action link. + * Rebuild wikis on upgrade to this version to get the comment counts + added to existing pages. + * Loosen regexp, to allow empty quoted parameters in directives. + * Add force\_overwrite setting to make setup automator overwrite existing + files/directories. + * Fix admin openid detection in setup automator, and avoid prompting + for a password. + * Add new --clean option; this makes ikiwiki remove all built + files in the destdir, as well as wrappers and the .ikiwiki directory."""]] \ No newline at end of file -- cgit v1.2.3 From b849c63ce337f988fcbb08b39d197583e6fa6012 Mon Sep 17 00:00:00 2001 From: "http://dmarti.myopenid.com/" <http://dmarti.myopenid.com/@web> Date: Thu, 4 Mar 2010 00:15:00 +0000 Subject: --- doc/todo/salmon_protocol_for_comment_sharing.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/todo/salmon_protocol_for_comment_sharing.mdwn (limited to 'doc') diff --git a/doc/todo/salmon_protocol_for_comment_sharing.mdwn b/doc/todo/salmon_protocol_for_comment_sharing.mdwn new file mode 100644 index 000000000..f4fa0c535 --- /dev/null +++ b/doc/todo/salmon_protocol_for_comment_sharing.mdwn @@ -0,0 +1,3 @@ +The <a href="http://www.salmon-protocol.org/home">Salmon protocol</a> provides for aggregating comments across sites. If a site that syndicates a feed receives a comment on an item in that feed, it can re-post the comment to the original source. + +[[!tag wishlist]] -- cgit v1.2.3 From d72603534e677a4fbc0547ca3e5c9273d0d502ca Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 3 Mar 2010 19:48:23 -0500 Subject: comments --- doc/todo/salmon_protocol_for_comment_sharing.mdwn | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/salmon_protocol_for_comment_sharing.mdwn b/doc/todo/salmon_protocol_for_comment_sharing.mdwn index f4fa0c535..1e56b0a8b 100644 --- a/doc/todo/salmon_protocol_for_comment_sharing.mdwn +++ b/doc/todo/salmon_protocol_for_comment_sharing.mdwn @@ -1,3 +1,21 @@ -The <a href="http://www.salmon-protocol.org/home">Salmon protocol</a> provides for aggregating comments across sites. If a site that syndicates a feed receives a comment on an item in that feed, it can re-post the comment to the original source. +The <a href="http://www.salmon-protocol.org/home">Salmon protocol</a> +provides for aggregating comments across sites. If a site that syndicates +a feed receives a comment on an item in that feed, it can re-post the +comment to the original source. + +> Ikiwiki does not allow comments to be posted on items it aggregates. +> So salmon protocol support would only need to handle the comment +> receiving side of the protocol. +> +> The current draft protocol document confuses me when it starts talking +> about using OAuth in the abuse prevention section, since their example +> does not show use of OAuth, and it's not at all clear to me where the +> OAuth relationship between aggregator and original source is supposed +> to come from. +> +> Their security model, which goes on to include Webfinger, +> thirdparty validation services, XRD, and Magic Signatures, looks sorta +> like they kept throwing technology, at it, hoping something will stick. :-P +> --[[Joey]] [[!tag wishlist]] -- cgit v1.2.3 From cb4833742739ebaa2e875b97ae0035285f5b27b6 Mon Sep 17 00:00:00 2001 From: testerer <testerer@web> Date: Thu, 4 Mar 2010 09:15:41 +0000 Subject: --- doc/index.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 732cf7a89..b1ef36b2e 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -19,6 +19,8 @@ ikiwiki [[!version ]]. ## developer resources +[jup](http://www.google.de) + The [[RoadMap]] describes where the project is going. The [[forum]] is open for discussions. [[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] @@ -26,3 +28,5 @@ can be submitted and tracked using this wiki. ikiwiki is developed by [[Joey]] and many contributors, and is [[FreeSoftware]]. + + -- cgit v1.2.3 From dd438d3a62615908adfe92868b95151b8c60506a Mon Sep 17 00:00:00 2001 From: testerer <testerer@web> Date: Thu, 4 Mar 2010 09:19:22 +0000 Subject: --- doc/index.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index b1ef36b2e..88eafa114 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -19,7 +19,6 @@ ikiwiki [[!version ]]. ## developer resources -[jup](http://www.google.de) The [[RoadMap]] describes where the project is going. The [[forum]] is open for discussions. -- cgit v1.2.3 From 54f03304b13aa961d433a2e590ae5108bd4e21b3 Mon Sep 17 00:00:00 2001 From: testerer <testerer@web> Date: Thu, 4 Mar 2010 09:21:26 +0000 Subject: --- doc/TourBusStop.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/TourBusStop.mdwn b/doc/TourBusStop.mdwn index 8e382bd77..5317c6718 100644 --- a/doc/TourBusStop.mdwn +++ b/doc/TourBusStop.mdwn @@ -9,7 +9,7 @@ This wiki serves as the home for the ikiwiki wiki engine, providing collaborativ * You can turn any set of pages into a [[blog]] or similar news feed, * complete with RSS and Atom support. You can run your weblog on ikiwiki (and [[many_people_do|ikiwikiusers]]), run a Planet-like [[aggregator|plugins/aggregate]] for external feeds, or keep a [[TODO]] and [[bug|bugs]] list with tags for completed items. -* ikiwiki provides a wiki compiler, designed to transform your wiki content into a set of static pages. You can then serve these pages as static content. ikiwiki will not fall over during a Slashdotting, because page views don't require the ikiwiki CGI; as long as your web server can keep up, your site will survive. Furthermore, you can choose whether you want to run the ikiwiki CGI for web edits or only handle commits to the underlying version control system; you can even run ikiwiki privately and just manually copy the content to another server. So if you want to put a wiki up on a server without installing any software on that server, try ikiwiki. +* ikiwiki provides a wiki compiler, designed to transform your wiki content into a set of static pages. You can then serve these pages as static content. ikiwiki will not fall over during a Slashdotting, because page views don't require the ikiwiki CGI; as long as your web server can keep up, your [site](http://dessouse.net) will survive. Furthermore, you can choose whether you want to run the ikiwiki CGI for web edits or only handle commits to the underlying version control system; you can even run ikiwiki privately and just manually copy the content to another server. So if you want to put a wiki up on a server without installing any software on that server, try ikiwiki. ![Picture of the TourBus](http://www.wikiservice.at/image/wikibus.gif) -- cgit v1.2.3 From 07253bb25049eaed06564021accaba1b8cab210c Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Thu, 4 Mar 2010 09:30:24 +0000 Subject: revert spam --- doc/TourBusStop.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/TourBusStop.mdwn b/doc/TourBusStop.mdwn index 5317c6718..8e382bd77 100644 --- a/doc/TourBusStop.mdwn +++ b/doc/TourBusStop.mdwn @@ -9,7 +9,7 @@ This wiki serves as the home for the ikiwiki wiki engine, providing collaborativ * You can turn any set of pages into a [[blog]] or similar news feed, * complete with RSS and Atom support. You can run your weblog on ikiwiki (and [[many_people_do|ikiwikiusers]]), run a Planet-like [[aggregator|plugins/aggregate]] for external feeds, or keep a [[TODO]] and [[bug|bugs]] list with tags for completed items. -* ikiwiki provides a wiki compiler, designed to transform your wiki content into a set of static pages. You can then serve these pages as static content. ikiwiki will not fall over during a Slashdotting, because page views don't require the ikiwiki CGI; as long as your web server can keep up, your [site](http://dessouse.net) will survive. Furthermore, you can choose whether you want to run the ikiwiki CGI for web edits or only handle commits to the underlying version control system; you can even run ikiwiki privately and just manually copy the content to another server. So if you want to put a wiki up on a server without installing any software on that server, try ikiwiki. +* ikiwiki provides a wiki compiler, designed to transform your wiki content into a set of static pages. You can then serve these pages as static content. ikiwiki will not fall over during a Slashdotting, because page views don't require the ikiwiki CGI; as long as your web server can keep up, your site will survive. Furthermore, you can choose whether you want to run the ikiwiki CGI for web edits or only handle commits to the underlying version control system; you can even run ikiwiki privately and just manually copy the content to another server. So if you want to put a wiki up on a server without installing any software on that server, try ikiwiki. ![Picture of the TourBus](http://www.wikiservice.at/image/wikibus.gif) -- cgit v1.2.3 From 070026f12a1e75d4f86ec224abf01fe566f739c9 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 4 Mar 2010 12:37:12 -0500 Subject: Revert spammer's whitespace changes (PS, you're banned.) --- doc/index.mdwn | 3 --- 1 file changed, 3 deletions(-) (limited to 'doc') diff --git a/doc/index.mdwn b/doc/index.mdwn index 88eafa114..732cf7a89 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -19,7 +19,6 @@ ikiwiki [[!version ]]. ## developer resources - The [[RoadMap]] describes where the project is going. The [[forum]] is open for discussions. [[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] @@ -27,5 +26,3 @@ can be submitted and tracked using this wiki. ikiwiki is developed by [[Joey]] and many contributors, and is [[FreeSoftware]]. - - -- cgit v1.2.3 From 48e64aa567fd5e1f997f9a6c201e4e6007057c04 Mon Sep 17 00:00:00 2001 From: bhobbit <bhobbit@web> Date: Sun, 7 Mar 2010 08:31:57 +0000 Subject: --- doc/forum/Exception:_Unknown_function___96__this__39___.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/forum/Exception:_Unknown_function___96__this__39___.mdwn (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn new file mode 100644 index 000000000..05d4e3a0a --- /dev/null +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -0,0 +1,3 @@ +I'm very excited to try out ikiwiki, since it should fit my purposes extremely well, but I'm having trouble with the search plugin. I'm pretty sure that right after I installed ikiwiki and needed dependencies, the search plugin was working fine. However, now when I try to use search, I get "Exception: Unknown function `this'" error on a blank page. I'm not sure how I should go about debugging this issue - my server's (I use Lighttpd 1.4.22) error log has no mention of the exception and there's nothing in /var/log/syslog either. + +What might be causing this exception and how I might go about debugging exceptions? -- cgit v1.2.3 From 8026c09b346c760b3f1ec4a5d1fedc71dc2843df Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 7 Mar 2010 11:40:53 -0500 Subject: response --- doc/forum/Exception:_Unknown_function___96__this__39___.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index 05d4e3a0a..628276b3c 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -1,3 +1,12 @@ I'm very excited to try out ikiwiki, since it should fit my purposes extremely well, but I'm having trouble with the search plugin. I'm pretty sure that right after I installed ikiwiki and needed dependencies, the search plugin was working fine. However, now when I try to use search, I get "Exception: Unknown function `this'" error on a blank page. I'm not sure how I should go about debugging this issue - my server's (I use Lighttpd 1.4.22) error log has no mention of the exception and there's nothing in /var/log/syslog either. What might be causing this exception and how I might go about debugging exceptions? + +> Appears to be coming from your xapian omega cgi binary. If you +> run `strings /usr/lib/cgi-bin/omega/omega` you can see it has +> "Exception: " in it. +> +> I don´t know what to suggest, other than upgrade/downgrade/reinstall +> xapian-omega. You could try rebuilding your wiki in case it is somehow +> caused by a problem with the xapian database. Failing everything, you +> could switch to [[google_search_plugin|plugins/google]]. --[[Joey]] -- cgit v1.2.3 From 9ba3035ebcbd17888009189131cb34033baf4c3b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 7 Mar 2010 11:44:07 -0500 Subject: update --- doc/forum/Exception:_Unknown_function___96__this__39___.mdwn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index 628276b3c..3cbcdc485 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -4,9 +4,11 @@ What might be causing this exception and how I might go about debugging exceptio > Appears to be coming from your xapian omega cgi binary. If you > run `strings /usr/lib/cgi-bin/omega/omega` you can see it has -> "Exception: " in it. +> "Exception: " in it, and I have found some similar (but not identical) +> error messages from xapian in a web search. > > I don´t know what to suggest, other than upgrade/downgrade/reinstall -> xapian-omega. You could try rebuilding your wiki in case it is somehow +> xapian-omega, and contacting the xapian developers for debugging. +> You could try rebuilding your wiki in case it is somehow > caused by a problem with the xapian database. Failing everything, you > could switch to [[google_search_plugin|plugins/google]]. --[[Joey]] -- cgit v1.2.3 From 904e2c2d1e3eace5f208073d424209bcd5826504 Mon Sep 17 00:00:00 2001 From: danc <danc@web> Date: Sun, 7 Mar 2010 22:21:35 +0000 Subject: --- doc/sandbox/danc.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/sandbox/danc.mdwn (limited to 'doc') diff --git a/doc/sandbox/danc.mdwn b/doc/sandbox/danc.mdwn new file mode 100644 index 000000000..9766475a4 --- /dev/null +++ b/doc/sandbox/danc.mdwn @@ -0,0 +1 @@ +ok -- cgit v1.2.3 From b44e42baf13a1798e723cdd5d19ffdfe2c751a4b Mon Sep 17 00:00:00 2001 From: danc <danc@web> Date: Sun, 7 Mar 2010 22:23:26 +0000 Subject: --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index afd7dbeab..1a1b128e6 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -77,3 +77,4 @@ bar Hmm, can I dig it? Test +pop -- cgit v1.2.3 From 7559c7b3ae382191e8d4acde8ddd9e2323edb9a2 Mon Sep 17 00:00:00 2001 From: bhobbit <bhobbit@web> Date: Mon, 8 Mar 2010 02:09:00 +0000 Subject: --- doc/forum/Exception:_Unknown_function___96__this__39___.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index 3cbcdc485..94de18ceb 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -12,3 +12,5 @@ What might be causing this exception and how I might go about debugging exceptio > You could try rebuilding your wiki in case it is somehow > caused by a problem with the xapian database. Failing everything, you > could switch to [[google_search_plugin|plugins/google]]. --[[Joey]] + +>> Thanks, Joey. With your help I was able to figure out what was wrong. It's a fun little bug (or feature): the title of my wiki had string `$this` in title and that's what was causing the omega binary to choke. My wiki's title was inserted without escaping into the query template used by omega. Omega treated `$this` in the title as a function name and threw an exception because no such function was defined. To avoid this behavior, I used an html entity in the title, so `$this` became `$this`. I don't think that the wiki title should be inserted into the template without escaping - it can produce an error that's not trivial to debug. If users want to modify the html in the title, they should be editing respective templates, not typing html in the wiki title input. What do you think? --[[dkobozev]] -- cgit v1.2.3 From 12b5aec2985ece32ee640f7d90feaaac464f795d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 7 Mar 2010 22:47:32 -0500 Subject: response --- doc/forum/Exception:_Unknown_function___96__this__39___.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index 94de18ceb..7db12c34a 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -14,3 +14,10 @@ What might be causing this exception and how I might go about debugging exceptio > could switch to [[google_search_plugin|plugins/google]]. --[[Joey]] >> Thanks, Joey. With your help I was able to figure out what was wrong. It's a fun little bug (or feature): the title of my wiki had string `$this` in title and that's what was causing the omega binary to choke. My wiki's title was inserted without escaping into the query template used by omega. Omega treated `$this` in the title as a function name and threw an exception because no such function was defined. To avoid this behavior, I used an html entity in the title, so `$this` became `$this`. I don't think that the wiki title should be inserted into the template without escaping - it can produce an error that's not trivial to debug. If users want to modify the html in the title, they should be editing respective templates, not typing html in the wiki title input. What do you think? --[[dkobozev]] + +>>> Sounds like a bug in omega, and one that probably would affect other +>>> users of omega too. Ikiwiki could work around it by pre-escaping +>>> data before passing it to xapian. I have not quite managed to reproduce it though; +>>> tried setting a page title to '$this' and 'foo $this'. +>>> That's with version 1.0.18 of omega. +>>> --[[Joey]] -- cgit v1.2.3 From e7755506d10dfd03cc615d74aeaa3cec156631ac Mon Sep 17 00:00:00 2001 From: bhobbit <bhobbit@web> Date: Mon, 8 Mar 2010 04:53:05 +0000 Subject: --- doc/forum/Exception:_Unknown_function___96__this__39___.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index 7db12c34a..cb75895c8 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -21,3 +21,5 @@ What might be causing this exception and how I might go about debugging exceptio >>> tried setting a page title to '$this' and 'foo $this'. >>> That's with version 1.0.18 of omega. >>> --[[Joey]] + +>>>> I tried it with both omega 1.0.13 and omega 1.0.18 and the issue is present in both. If I view the contents of {$srcdir}/.ikiwiki/xapian/templates/query, I can see that the wiki title is inserted verbatim and there are calls to `$setmap`, `$set` and `$def` etc in the template. --[[dkobozev]] -- cgit v1.2.3 From 84d41fb86707890ae3bebe5f82fd438715f88c44 Mon Sep 17 00:00:00 2001 From: Thiana <Thiana@web> Date: Tue, 9 Mar 2010 00:07:17 +0000 Subject: --- doc/ikiwiki/directive/map/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/map/discussion.mdwn b/doc/ikiwiki/directive/map/discussion.mdwn index 062b4267a..075b91b4d 100644 --- a/doc/ikiwiki/directive/map/discussion.mdwn +++ b/doc/ikiwiki/directive/map/discussion.mdwn @@ -1,3 +1,12 @@ +### Sorting + +Is there a way to have the generated maps sorted by *title* instead of *filename* when show=title is used? +Thanks + +-- Thiana + +---- + Question: Is there a way to generate a listing that shows *both* title and description meta information? Currently, a \[\[!map ...]] shows only one of the two, but I'd like to generate a navigation that looks like a description list. For example: * This is the title meta information. -- cgit v1.2.3 From b9e7064f70980b58b1bae754bee7fe3eff5fc84d Mon Sep 17 00:00:00 2001 From: Thiana <Thiana@web> Date: Tue, 9 Mar 2010 00:42:38 +0000 Subject: Added use of tag directive so I can play with tags in the sandbox. --- doc/templates/plugin.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/templates/plugin.mdwn b/doc/templates/plugin.mdwn index c1d1974d6..d62c87924 100644 --- a/doc/templates/plugin.mdwn +++ b/doc/templates/plugin.mdwn @@ -6,6 +6,7 @@ Enabled by default: <TMPL_IF core>yes<TMPL_ELSE>no</TMPL_IF><br /> Included in [[/plugins/goodstuff]]: [[!if test="backlink(plugins/goodstuff)" all=no then="""yes""" else="""no"""]]<br /> Currently enabled: [[!if test="enabled(<TMPL_VAR name>)" then="yes" else="no"]]<br /> </span> +[[!tag plugin <TMPL_VAR name>]] [[!if test="sourcepage(plugins/contrib/*)" then="""[[!meta title="<TMPL_VAR name> (third party plugin)"]]"""]] <TMPL_IF core>[[!tag plugins/type/core]]</TMPL_IF> <TMPL_UNLESS NAME="name"> -- cgit v1.2.3 From 9d6a755d3983d1d7cd1c67c923c8907e09108a70 Mon Sep 17 00:00:00 2001 From: Thiana <Thiana@web> Date: Tue, 9 Mar 2010 00:50:45 +0000 Subject: --- doc/plugins/conditional/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/plugins/conditional/discussion.mdwn b/doc/plugins/conditional/discussion.mdwn index 629d05940..e34df70a1 100644 --- a/doc/plugins/conditional/discussion.mdwn +++ b/doc/plugins/conditional/discussion.mdwn @@ -1,3 +1,11 @@ +## Conditional broken? + +Using \[\[!if test="tagged(plugin)" then="= Tagged as plugin =" else="*No plugins found*"]] on this wiki *should* present the 'Tagged as plugin' heading, instead it emits 'no plugins found'. Is the conditional plugin currently broken for tags or am I misusing it? Thanks. + +-- Thiana + +---- + Would there be a way for this plugin to emit fewer blank lines (i.e. *none at all*)? For example, having a look at [this page](http://www.bddebian.com/~wiki/Hurd/)'s sidebar. -- cgit v1.2.3 From 2af6a32aba4a7f96f63b3dfc176e1d4b40488a34 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 8 Mar 2010 20:24:02 -0500 Subject: add link --- doc/ikiwiki/directive/map/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/map/discussion.mdwn b/doc/ikiwiki/directive/map/discussion.mdwn index 075b91b4d..f6eaa6b80 100644 --- a/doc/ikiwiki/directive/map/discussion.mdwn +++ b/doc/ikiwiki/directive/map/discussion.mdwn @@ -5,6 +5,8 @@ Thanks -- Thiana +> [[bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used]] --[[Joey]] + ---- Question: Is there a way to generate a listing that shows *both* title and description meta information? Currently, a \[\[!map ...]] shows only one of the two, but I'd like to generate a navigation that looks like a description list. For example: -- cgit v1.2.3 From 8f13e52a0d9458470753d8fde13e1e19bb872384 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 8 Mar 2010 20:24:43 -0500 Subject: Revert "Added use of tag directive so I can play with tags in the sandbox." This reverts commit b9e7064f70980b58b1bae754bee7fe3eff5fc84d. Er, no, I don't want a broken tag link on every plugin page, really. --- doc/templates/plugin.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/templates/plugin.mdwn b/doc/templates/plugin.mdwn index d62c87924..c1d1974d6 100644 --- a/doc/templates/plugin.mdwn +++ b/doc/templates/plugin.mdwn @@ -6,7 +6,6 @@ Enabled by default: <TMPL_IF core>yes<TMPL_ELSE>no</TMPL_IF><br /> Included in [[/plugins/goodstuff]]: [[!if test="backlink(plugins/goodstuff)" all=no then="""yes""" else="""no"""]]<br /> Currently enabled: [[!if test="enabled(<TMPL_VAR name>)" then="yes" else="no"]]<br /> </span> -[[!tag plugin <TMPL_VAR name>]] [[!if test="sourcepage(plugins/contrib/*)" then="""[[!meta title="<TMPL_VAR name> (third party plugin)"]]"""]] <TMPL_IF core>[[!tag plugins/type/core]]</TMPL_IF> <TMPL_UNLESS NAME="name"> -- cgit v1.2.3 From 376d0dc9b76a384bc505b4ebc8c70dde4134c220 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 8 Mar 2010 20:27:30 -0500 Subject: response --- doc/plugins/conditional/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/conditional/discussion.mdwn b/doc/plugins/conditional/discussion.mdwn index e34df70a1..09e3df923 100644 --- a/doc/plugins/conditional/discussion.mdwn +++ b/doc/plugins/conditional/discussion.mdwn @@ -4,6 +4,10 @@ Using \[\[!if test="tagged(plugin)" then="= Tagged as plugin =" else="*No plugin -- Thiana +> This wiki has no page named "plugin", so nothing links to it; tags are a species of link +> so tagging a large number of pages with a tag that doesn't exist (which change has +> been reverted) doesn't make the pagespec match. It would if the tag's page existed. --[[Joey]] + ---- Would there be a way for this plugin to emit fewer blank lines (i.e. *none at all*)? -- cgit v1.2.3 From 857bcb33eeaa2bc503630646e5a01376f0e8b5b5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 8 Mar 2010 20:30:29 -0500 Subject: response --- doc/forum/Exception:_Unknown_function___96__this__39___.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index cb75895c8..ac4d7ed12 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -23,3 +23,7 @@ What might be causing this exception and how I might go about debugging exceptio >>> --[[Joey]] >>>> I tried it with both omega 1.0.13 and omega 1.0.18 and the issue is present in both. If I view the contents of {$srcdir}/.ikiwiki/xapian/templates/query, I can see that the wiki title is inserted verbatim and there are calls to `$setmap`, `$set` and `$def` etc in the template. --[[dkobozev]] + +>>>>> I don't see how that's relevant. It would help if you showed me +>>>>> exactly something that could be inserted into a page to cause the +>>>>> problem. --[[Joey]] -- cgit v1.2.3 From 20635d3610619814e3c36bec913d53cb83d41640 Mon Sep 17 00:00:00 2001 From: Thiana <Thiana@web> Date: Tue, 9 Mar 2010 03:55:28 +0000 Subject: Clarification request --- doc/plugins/conditional/discussion.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/plugins/conditional/discussion.mdwn b/doc/plugins/conditional/discussion.mdwn index 09e3df923..6e84fdfc1 100644 --- a/doc/plugins/conditional/discussion.mdwn +++ b/doc/plugins/conditional/discussion.mdwn @@ -8,6 +8,19 @@ Using \[\[!if test="tagged(plugin)" then="= Tagged as plugin =" else="*No plugin > so tagging a large number of pages with a tag that doesn't exist (which change has > been reverted) doesn't make the pagespec match. It would if the tag's page existed. --[[Joey]] +>> So if I understand this correctly... Assuming the tags Tag_A and Tag_B, the existence of +>> @wiki-home@/tags/Tag_A.creole, and a number of files with a \[\[!tag Tag_A Tag_B]] the +>> following is correct? +>> +>> * \[\[!if test="tagged(Tag_A)" then="OK" else="Fail"]] => OK +>> * \[\[!if test="tagged(Tag_B)" then="OK" else="Fail"]] => Fail +>> * \[\[!if test="tagged(Tag_A) and tagged(Tag_B)" then="OK" else="Fail"]] => Fail +>> +>> Is that the expected behaviour? If so, that's not what I'm seeing here since they all result +>> in a Fail. If not, what exactly is wrong with those conditionals? Thanks. +>> +>> -- Thiana + ---- Would there be a way for this plugin to emit fewer blank lines (i.e. *none at all*)? -- cgit v1.2.3 From 9e603d2640758d8b4c0420f2984ffe21bd78c7d6 Mon Sep 17 00:00:00 2001 From: capitaine <capitaine@web> Date: Tue, 9 Mar 2010 05:30:53 +0000 Subject: --- doc/bugs/bestlink_returns_deleted_pages.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/bugs/bestlink_returns_deleted_pages.mdwn b/doc/bugs/bestlink_returns_deleted_pages.mdwn index 874f18ead..d3c5c8012 100644 --- a/doc/bugs/bestlink_returns_deleted_pages.mdwn +++ b/doc/bugs/bestlink_returns_deleted_pages.mdwn @@ -28,7 +28,7 @@ won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] > maybe by keeping a copy of the old backlinks info, then that fix could be > applied here too. --[[Joey]] ->> Cool that was fast! Well at least half the bug is solved :) For now I'll +>> Cool that was fast! Well at least half the <a href="http://www.college-paper.org/custom-essay.html college essay">college essay</a> bug is solved :) For now I'll >> probably try using a workaround if using bestlink within the needsbuild >> or scan hooks. Maybe by testing if pagemtime equals zero. --[[harishcm]] @@ -48,8 +48,8 @@ won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] use IkiWiki 3.00; sub import { - hook(type => "getsetup", id => "bestlinkbug", call => \&getsetup); - hook(type => "needsbuild", id => "bestlinkbug", call => \&needsbuild); + hook(type => "getsetup", id => "bestlinkbug", call => &getsetup); + hook(type => "needsbuild", id => "bestlinkbug", call => &needsbuild); } sub getsetup () { -- cgit v1.2.3 From 9ac58f4b88654846e2ffdba5190a1785c3ae6c88 Mon Sep 17 00:00:00 2001 From: capitaine <capitaine@web> Date: Tue, 9 Mar 2010 05:34:52 +0000 Subject: --- doc/bugs.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs.mdwn b/doc/bugs.mdwn index f634b6e78..f44cfdca2 100644 --- a/doc/bugs.mdwn +++ b/doc/bugs.mdwn @@ -1,5 +1,5 @@ If you've found a bug in ikiwiki, post about it here. [[TODO]] items go -elsewhere. Link items to [[bugs/done]] when done. +elsewhere. Link <a href="http://www.college-paper.org/custom-essay.html">college essay</a> items to [[bugs/done]] when done. Also see the [Debian bugs](http://bugs.debian.org/ikiwiki). -- cgit v1.2.3 From 312b7d05f82045f400931c8e110efb7d76b69eed Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 9 Mar 2010 00:40:51 -0500 Subject: Revert spam --- doc/bugs.mdwn | 2 +- doc/bugs/bestlink_returns_deleted_pages.mdwn | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/bugs.mdwn b/doc/bugs.mdwn index f44cfdca2..f634b6e78 100644 --- a/doc/bugs.mdwn +++ b/doc/bugs.mdwn @@ -1,5 +1,5 @@ If you've found a bug in ikiwiki, post about it here. [[TODO]] items go -elsewhere. Link <a href="http://www.college-paper.org/custom-essay.html">college essay</a> items to [[bugs/done]] when done. +elsewhere. Link items to [[bugs/done]] when done. Also see the [Debian bugs](http://bugs.debian.org/ikiwiki). diff --git a/doc/bugs/bestlink_returns_deleted_pages.mdwn b/doc/bugs/bestlink_returns_deleted_pages.mdwn index d3c5c8012..874f18ead 100644 --- a/doc/bugs/bestlink_returns_deleted_pages.mdwn +++ b/doc/bugs/bestlink_returns_deleted_pages.mdwn @@ -28,7 +28,7 @@ won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] > maybe by keeping a copy of the old backlinks info, then that fix could be > applied here too. --[[Joey]] ->> Cool that was fast! Well at least half the <a href="http://www.college-paper.org/custom-essay.html college essay">college essay</a> bug is solved :) For now I'll +>> Cool that was fast! Well at least half the bug is solved :) For now I'll >> probably try using a workaround if using bestlink within the needsbuild >> or scan hooks. Maybe by testing if pagemtime equals zero. --[[harishcm]] @@ -48,8 +48,8 @@ won't it make sense for bestlink() to check %pagesources first? --[[harishcm]] use IkiWiki 3.00; sub import { - hook(type => "getsetup", id => "bestlinkbug", call => &getsetup); - hook(type => "needsbuild", id => "bestlinkbug", call => &needsbuild); + hook(type => "getsetup", id => "bestlinkbug", call => \&getsetup); + hook(type => "needsbuild", id => "bestlinkbug", call => \&needsbuild); } sub getsetup () { -- cgit v1.2.3 From fa6d082955dbc75de62839e285c0d441cd83acb1 Mon Sep 17 00:00:00 2001 From: bhobbit <bhobbit@web> Date: Tue, 9 Mar 2010 10:50:03 +0000 Subject: --- ...eption:_Unknown_function___96__this__39___.mdwn | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index ac4d7ed12..4f94b77bd 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -27,3 +27,26 @@ What might be causing this exception and how I might go about debugging exceptio >>>>> I don't see how that's relevant. It would help if you showed me >>>>> exactly something that could be inserted into a page to cause the >>>>> problem. --[[Joey]] + +>>>>>> Correct me if I'm wrong: ikiwiki generates an Omega template from its own templates, such as searchquery.tmpl and puts it into {$srcdir}/.ikiwiki/xapian/templates/query. Omega has its own template syntax, where function names are prefixed with dollar signs (`$`). So, when I call my wiki `$foobar`, ikiwiki generates an Omega template that looks like this snippet: + + <div id="container"> + <div class="pageheader"> + <div class="header"> + <span> + <a href="http://example.com">$foobar</ a>/search + </span> + </div> + </div> <!-- .pageheader --> + + <div id="content"> + $setmap{prefix,title,S} + $setmap{prefix,link,XLINK} + $set{thousand,$.}$set{decimal,.}$setmap{BN,,Any Country,uk,England,fr,France} + ${ + $def{PREV, + $if{$ne{$topdoc,0},<INPUT TYPE=image NAME="<" ALT="<" + SRC="/images/xapian-omega/prev.png" BORDER=0 HEIGHT=30 WIDTH=30>, + <IMG ALT="" SRC="/images/xapian-omega/prevoff.png" HEIGHT=30 WIDTH=30>} + +>>>>>> So `$foobar` clashes with Omega's template tags. Does this help? -- cgit v1.2.3 From f64c04040717baf89f0583b59ded4819c5be29c6 Mon Sep 17 00:00:00 2001 From: jwalzer <jwalzer@web> Date: Wed, 10 Mar 2010 15:26:27 +0000 Subject: suggesting List of tags when editing content (wishlist) --- ...shlist-discussion:_Editformular_showing_existing_tags.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn (limited to 'doc') diff --git a/doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn b/doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn new file mode 100644 index 000000000..98e4280cd --- /dev/null +++ b/doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn @@ -0,0 +1,11 @@ +# How about: + +having a list of all existing tags in the Edit-Formular as a selectionbox? + +Assume I have tagbase=/tags/ and for every tag I have given to articles an existing page there. + +Would it be possible to list all these tags together with the Formular, as selectionbox. +Maybe even with parsing of the content and preselecting the tags, that are given in the article and vice-versa when selecting the fields then also generating the \[\[\!tag\]\]-sourcecode ? + +this would need a bit JS-work and somehow on compiletime we need to put the list of tags somewhere, where the cgi could read them from. +This way, even a pagespec would suffice to determine the usable list of tags and not only the tagbase-variable. -- cgit v1.2.3 From 2f2fbdf3a32ae7c7132441ad90c67553f80c306d Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Wed, 10 Mar 2010 16:07:55 +0000 Subject: tag2 --- .../wishlist-discussion:_Editformular_showing_existing_tags.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn b/doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn index 98e4280cd..49c55e20e 100644 --- a/doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn +++ b/doc/forum/wishlist-discussion:_Editformular_showing_existing_tags.mdwn @@ -9,3 +9,7 @@ Maybe even with parsing of the content and preselecting the tags, that are given this would need a bit JS-work and somehow on compiletime we need to put the list of tags somewhere, where the cgi could read them from. This way, even a pagespec would suffice to determine the usable list of tags and not only the tagbase-variable. + +> I think this would be very hard to achieve with the current tag plugin, due to the nature of its implementation. +> +> I've had a "tag2" plugin on the go for a while which supports this. It's in a very rough stage but I'll try to find it and upload it somewhere. -- [[Jon]] -- cgit v1.2.3 From 9f82e93fca0da9c325ebf907d7dab00bd5baa3b1 Mon Sep 17 00:00:00 2001 From: dkowis <dkowis@web> Date: Wed, 10 Mar 2010 19:13:50 +0000 Subject: --- doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn (limited to 'doc') diff --git a/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn new file mode 100644 index 000000000..4c819816e --- /dev/null +++ b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn @@ -0,0 +1,16 @@ +In the template for ikiwiki's recent changes page + + /usr/share/ikiwiki/templates/change.tmpl + +there is a missing </span> tag after the + + <span class="changedate"><TMPL_VAR COMMITDATE> + +This results in the recentchanges/ page being invalid and rendering quite horrifyingly in Internet Exploder. + +[I'm running](http://wiki.shlrm.org) (linked so you can see the one I'm running if you need to) the latest version of ikiwiki, and I note that it's broken on [ikiwiki.info](http://validator.w3.org/check?uri=http%3A%2F%2Fikiwiki.info%2Frecentchanges%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.767) too :) + +[This one on debian](https://www.icanttype.org/recentchanges/) is somehow [valid](http://validator.w3.org/check?uri=https%3A%2F%2Fwww.icanttype.org%2F%2Frecentchanges%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.767), although it's using the same template. Perhaps there's an additional scrubbing going on his end. + +Thanks, +David -- cgit v1.2.3 From 1c03cf9ba2aaa4ac6d28eb1d13c0015809fad2c1 Mon Sep 17 00:00:00 2001 From: dkowis <dkowis@web> Date: Wed, 10 Mar 2010 19:27:26 +0000 Subject: noted that I fixed the template on my box --- doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn index 4c819816e..007d763b5 100644 --- a/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn +++ b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn @@ -14,3 +14,5 @@ This results in the recentchanges/ page being invalid and rendering quite horrif Thanks, David + +PS: I have fixed the template by hand on my server, so it will validate, however ikiwiki.info will not. -- cgit v1.2.3 From 03c2cf94e28ac8b90e92dbd18181d52f2338385c Mon Sep 17 00:00:00 2001 From: "http://adam.shand.net/" <http://adam.shand.net/@web> Date: Thu, 11 Mar 2010 05:32:00 +0000 Subject: --- doc/plugins/getsource/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/plugins/getsource/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/getsource/discussion.mdwn b/doc/plugins/getsource/discussion.mdwn new file mode 100644 index 000000000..45a1d62b5 --- /dev/null +++ b/doc/plugins/getsource/discussion.mdwn @@ -0,0 +1 @@ +It would be very cool if this plugin was enabled by default. One of the best ways to learn how to do various advanced things is to be able to "view source" on other wiki's which do things you like. -- [[AdamShand]] -- cgit v1.2.3 From 9b656e27ea4045d72698949f19fae120c51b7e3c Mon Sep 17 00:00:00 2001 From: JoshTriplett <JoshTriplett@web> Date: Thu, 11 Mar 2010 07:42:07 +0000 Subject: Add my homepage. --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 345604c36..bd9bee3ab 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -141,6 +141,7 @@ Personal sites and blogs * [Mukund's homepage](http://www.mukund.org/) * [Andreas's homepage](http://0x7.ch/) - Ikiwiki, Subversion and CSS template * [Chris Dombroski's boring bliki](https://www.icanttype.org/) +* [Josh Triplett's homepage](http://joshtriplett.org/) - Git backend with the CGI disabled, to publish a static site with the convenience of ikiwiki. Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From d021a1ddbc1890dbeb904711a581ac4fc084545b Mon Sep 17 00:00:00 2001 From: JoshTriplett <JoshTriplett@web> Date: Thu, 11 Mar 2010 07:44:56 +0000 Subject: Add Serialist, and the amusing/frightening way it uses ikiwiki. --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index bd9bee3ab..8e567ec0d 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -53,6 +53,7 @@ Projects & Organizations * [IPOL Image Processing On Line](http://www.ipol.im) * [Debian Costa Rica](http://cr.debian.net/) * [Fvwm Wiki](http://fvwmwiki.xteddy.org) +* [Serialist](http://serialist.net/)'s static pages (documentation, blog). We actually have ikiwiki generate its static content as HTML fragments using a modified page.tmpl template, and then the FastCGI powering our site grabs those fragments and embeds them in the standard dynamic site template. Personal sites and blogs ======================== -- cgit v1.2.3 From e4ed8a51c1eb7bd80f416dcc59231a13e3d1255e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 11 Mar 2010 18:20:10 +0000 Subject: fix in a branch --- doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn index 007d763b5..536af3473 100644 --- a/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn +++ b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn @@ -16,3 +16,9 @@ Thanks, David PS: I have fixed the template by hand on my server, so it will validate, however ikiwiki.info will not. + +> [[!template id="gitbranch" branch=smcv/trivia author="[[smcv]]"]] [[!tag patch]] +> Enabling either [[plugins/htmltidy]] or [[plugins/htmlbalance]] will automatically fix unbalanced +> markup like this; using [[plugins/comments]] without having one or other of those is a bad idea +> from the point of view of avoiding comment forgery, which is probably why icanttype.org works +> correctly. Anyway, I've fixed this in a branch: Joey, care to review smcv/trivia? --[[smcv]] -- cgit v1.2.3 From ac3aac560f74457ded48ba3b5a14d0bbbf9b6d92 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Mar 2010 15:44:10 -0500 Subject: moderatedcomments: Added moderate_pagespec * moderatedcomments: Added moderate_pagespec that can be used to control which users or comment locations are moderated. This can be used, just for example, to moderate http://myopenid.com/* if you're getting a lot of spammers from one particular openid provider (who should perhaps answer your emails about them), while not moderating other users. * moderatedcomments: The moderate_users setting is deprecated. Instead, set moderate_pagespec to "!admin()" or "user(*)" instead. --- IkiWiki/Plugin/moderatedcomments.pm | 37 ++++++++++++++++++++++++++++--------- debian/changelog | 8 ++++++++ doc/plugins/moderatedcomments.mdwn | 8 +++++--- 3 files changed, 41 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/moderatedcomments.pm b/IkiWiki/Plugin/moderatedcomments.pm index afe1ceedf..b0a328a06 100644 --- a/IkiWiki/Plugin/moderatedcomments.pm +++ b/IkiWiki/Plugin/moderatedcomments.pm @@ -17,10 +17,11 @@ sub getsetup () { rebuild => 0, section => "auth", }, - moderate_users => { - type => 'boolean', - example => 1, - description => 'Moderate comments of logged-in users?', + moderate_pagespec => { + type => 'pagespec', + example => 'user(http://*)', + description => 'PageSpec matching users or comment locations to moderate', + link => 'ikiwiki/PageSpec', safe => 1, rebuild => 0, }, @@ -32,14 +33,32 @@ sub checkcontent (@) { # only handle comments return undef unless pagespec_match($params{page}, "postcomment(*)", location => $params{page}); + + # backwards compatability + if (exists $config{moderate_users} && + ! exists $config{moderate_pagespec}) { + $config{moderate_pagespec} = $config{moderate_users} + ? "!admin()" + : "!user(*)"; + } + + # default is to moderate all except admins + if (! exists $config{moderate_pagespec}) { + $config{moderate_pagespec}="!admin()"; + } - # admins and maybe users can comment w/o moderation my $session=$params{session}; my $user=$session->param("name") if $session; - return undef if defined $user && (IkiWiki::is_admin($user) || - (exists $config{moderate_users} && ! $config{moderate_users})); - - return gettext("comment needs moderation"); + if (pagespec_match($params{page}, $config{moderate_pagespec}, + location => $params{page}, + (defined $user ? (user => $user) : ()), + (defined $ENV{REMOTE_ADDR} ? (ip => $ENV{REMOTE_ADDR}) : ()), + )) { + return gettext("comment needs moderation"); + } + else { + return undef; + } } 1 diff --git a/debian/changelog b/debian/changelog index d1253c079..c58e612db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,14 @@ ikiwiki (3.20100303) UNRELEASED; urgency=low * Fix utf8 issues in calls to md5_hex. + * moderatedcomments: Added moderate_pagespec that can be used + to control which users or comment locations are moderated. + This can be used, just for example, to moderate http://myopenid.com/* + if you're getting a lot of spammers from one particular openid + provider (who should perhaps answer your emails about them), + while not moderating other users. + * moderatedcomments: The moderate_users setting is deprecated. Instead, + set moderate_pagespec to "!admin()" or "user(*)" instead. -- Joey Hess <joeyh@debian.org> Tue, 09 Mar 2010 19:46:35 -0500 diff --git a/doc/plugins/moderatedcomments.mdwn b/doc/plugins/moderatedcomments.mdwn index 97924d742..c29b0b052 100644 --- a/doc/plugins/moderatedcomments.mdwn +++ b/doc/plugins/moderatedcomments.mdwn @@ -5,6 +5,8 @@ This plugin causes [[comments]] to be held for manual moderation. Admins can access the comment moderation queue via their preferences page. By default, all comments made by anyone who is not an admin will be held -for moderation. The `moderate_users` setting can be set to false to avoid -moderating comments of logged-in users, while still moderating anonymous -comments. +for moderation. The `moderate_pagespec` setting can be used to specify a +[[ikiwiki/PageSpec]] to match comments and users who should be moderated. +For example, to avoid moderating comments from logged-in users, set +`moderate_pagespec` to "!user(*)". Or to moderate everyone except for +admins, set it to "!admin(*)". -- cgit v1.2.3 From f259f33a0ad4858ce33f458148f1733351b91d92 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Mar 2010 15:49:48 -0500 Subject: Fix missing span on recentchanges page template. --- debian/changelog | 1 + doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn | 2 ++ 2 files changed, 3 insertions(+) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index c58e612db..6b5671e3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ ikiwiki (3.20100303) UNRELEASED; urgency=low while not moderating other users. * moderatedcomments: The moderate_users setting is deprecated. Instead, set moderate_pagespec to "!admin()" or "user(*)" instead. + * Fix missing span on recentchanges page template. -- Joey Hess <joeyh@debian.org> Tue, 09 Mar 2010 19:46:35 -0500 diff --git a/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn index 536af3473..5c322991a 100644 --- a/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn +++ b/doc/bugs/templateForRecentChangesMissingCloseSpan.mdwn @@ -22,3 +22,5 @@ PS: I have fixed the template by hand on my server, so it will validate, however > markup like this; using [[plugins/comments]] without having one or other of those is a bad idea > from the point of view of avoiding comment forgery, which is probably why icanttype.org works > correctly. Anyway, I've fixed this in a branch: Joey, care to review smcv/trivia? --[[smcv]] + +[[done]], thanks guys --[[Joey]] -- cgit v1.2.3 From 45dfdcb2571953be6815342510b9bb2a73ce59e7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 11 Mar 2010 16:10:04 -0500 Subject: search: Avoid '$' in the wikiname appearing unescaped on omega's query template, where it might crash omega. Really, a more general fix, this deals with any $ that might appear on the misctemplate. --- IkiWiki/Plugin/search.pm | 15 +++++++++++++-- debian/changelog | 2 ++ .../Exception:_Unknown_function___96__this__39___.mdwn | 6 ++++++ 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index fb68396a1..c0e8703d8 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -110,6 +110,7 @@ sub index (@) { # data used by omega # Decode html entities in it, since omega re-encodes them. eval q{use HTML::Entities}; + error $@ if $@; $doc->set_data( "url=".urlto($params{page}, "")."\n". "sample=".decode_entities($sample)."\n". @@ -214,9 +215,19 @@ sub setupfiles () { writefile("omega.conf", $config{wikistatedir}."/xapian", "database_dir .\n". "template_dir ./templates\n"); + + # Avoid omega interpreting anything in the misctemplate + # as an omegascript command. + my $misctemplate=IkiWiki::misctemplate(gettext("search"), "\0"); + eval q{use HTML::Entities}; + error $@ if $@; + $misctemplate=encode_entities($misctemplate, '\$'); + + my $querytemplate=readfile(IkiWiki::template_file("searchquery.tmpl")); + $misctemplate=~s/\0/$querytemplate/; + writefile("query", $config{wikistatedir}."/xapian/templates", - IkiWiki::misctemplate(gettext("search"), - readfile(IkiWiki::template_file("searchquery.tmpl")))); + $misctemplate); $setup=1; } } diff --git a/debian/changelog b/debian/changelog index 6b5671e3e..6828e6b3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ ikiwiki (3.20100303) UNRELEASED; urgency=low * moderatedcomments: The moderate_users setting is deprecated. Instead, set moderate_pagespec to "!admin()" or "user(*)" instead. * Fix missing span on recentchanges page template. + * search: Avoid '$' in the wikiname appearing unescaped on omega's + query template, where it might crash omega. -- Joey Hess <joeyh@debian.org> Tue, 09 Mar 2010 19:46:35 -0500 diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn index 4f94b77bd..035247100 100644 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn @@ -50,3 +50,9 @@ What might be causing this exception and how I might go about debugging exceptio <IMG ALT="" SRC="/images/xapian-omega/prevoff.png" HEIGHT=30 WIDTH=30>} >>>>>> So `$foobar` clashes with Omega's template tags. Does this help? + +>>>>>>> Ahh. I had somehow gotten it into my head that you were talking +>>>>>>> about the title of a single page, not of the whole wiki. But +>>>>>>> you were clear all along it was the wiki title. Sorry for +>>>>>>> misunderstanding. I've put in a complete fix for this problem. +>>>>>>> if this was in [[bugs]], I'd close it. :) --[[Joey]] -- cgit v1.2.3 From 98facfc958fedf459c838269cd2b6cdf67bbac80 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Fri, 12 Mar 2010 17:50:16 +0000 Subject: Added a page for myself. --- doc/users/ivan_shmakov.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/users/ivan_shmakov.mdwn (limited to 'doc') diff --git a/doc/users/ivan_shmakov.mdwn b/doc/users/ivan_shmakov.mdwn new file mode 100644 index 000000000..41bf9b09a --- /dev/null +++ b/doc/users/ivan_shmakov.mdwn @@ -0,0 +1,3 @@ +… To put it short: an Ikiwiki newbie. + +I run an Ikiwiki instance at <http://gray.am-1.org/~ivan/lhc/> (though the DNS servers seem to be temporarily out of smoke as of 2010-03-12Z.) -- cgit v1.2.3 From 58a6847cfb445dbb87716e4064f8151cc44a233a Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Fri, 12 Mar 2010 17:51:17 +0000 Subject: Note that, actually, SVG could be embedded into an Ikiwiki page, albeit in a somewhat crude manner. --- doc/todo/svg.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/todo/svg.mdwn b/doc/todo/svg.mdwn index 89b183db6..2099751e3 100644 --- a/doc/todo/svg.mdwn +++ b/doc/todo/svg.mdwn @@ -57,3 +57,11 @@ in the trunk if other people think it's useful. [htmlscrubber.pm]:http://xbeta.org/gitweb/?p=xbeta/ikiwiki.git;a=blob;f=IkiWiki/Plugin/htmlscrubber.pm;h=3c0ddc8f25bd8cb863634a9d54b40e299e60f7df;hb=fe333c8e5b4a5f374a059596ee698dacd755182d [diff]: http://xbeta.org/gitweb/?p=xbeta/ikiwiki.git;a=blobdiff;f=IkiWiki/Plugin/htmlscrubber.pm;h=3c0ddc8f25bd8cb863634a9d54b40e299e60f7df;hp=3bdaccea119ec0e1b289a0da2f6d90e2219b8d66;hb=fe333c8e5b4a5f374a059596ee698dacd755182d;hpb=be0b4f603f918444b906e42825908ddac78b7073 + +* * * + +Actually, there's a way to embed SVG into MarkDown sources using the [data: URI scheme][rfc2397], [like this](data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8c3ZnIHdpZHRoPSIxOTIiIGhlaWdodD0iMTkyIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIDwhLS0gQ3JlYXRlZCB3aXRoIFNWRy1lZGl0IC0gaHR0cDovL3N2Zy1lZGl0Lmdvb2dsZWNvZGUuY29tLyAtLT4KIDx0aXRsZT5IZWxsbywgd29ybGQhPC90aXRsZT4KIDxnPgogIDx0aXRsZT5MYXllciAxPC90aXRsZT4KICA8ZyB0cmFuc2Zvcm09InJvdGF0ZSgtNDUsIDk3LjY3MTksIDk3LjY2OCkiIGlkPSJzdmdfNyI+CiAgIDxyZWN0IHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlPSIjMDAwMDAwIiBmaWxsPSIjRkYwMDAwIiBpZD0ic3ZnXzUiIGhlaWdodD0iNTYuMDAwMDAzIiB3aWR0aD0iMTc1IiB5PSI2OS42Njc5NjkiIHg9IjEwLjE3MTg3NSIvPgogICA8dGV4dCB4bWw6c3BhY2U9InByZXNlcnZlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LWZhbWlseT0ic2VyaWYiIGZvbnQtc2l6ZT0iMjQiIHN0cm9rZS13aWR0aD0iMCIgc3Ryb2tlPSIjMDAwMDAwIiBmaWxsPSIjZmZmZjAwIiBpZD0ic3ZnXzYiIHk9IjEwNS42NjgiIHg9Ijk5LjY3MTkiPkhlbGxvLCB3b3JsZCE8L3RleHQ+CiAgPC9nPgogPC9nPgo8L3N2Zz4=). +Of course, this way to display an image one needs to click a link, but it may be considered a feature. +— [[Ivan_Shmakov]], 2010-03-12Z. + +[rfc2397]: http://tools.ietf.org/html/rfc2397 -- cgit v1.2.3 From 844bb8134b5ff6e3d73dc3c8b91ed516fa618c41 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Fri, 12 Mar 2010 18:33:10 +0000 Subject: Added an <object /> wishlist item. --- ...er_control_over___60__object___47____62__s.mdwn | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/todo/finer_control_over___60__object___47____62__s.mdwn (limited to 'doc') diff --git a/doc/todo/finer_control_over___60__object___47____62__s.mdwn b/doc/todo/finer_control_over___60__object___47____62__s.mdwn new file mode 100644 index 000000000..714f5ae50 --- /dev/null +++ b/doc/todo/finer_control_over___60__object___47____62__s.mdwn @@ -0,0 +1,41 @@ +IIUC, the current version of [HTML::Scrubber][] allows for the `object` tags to be either enabled or disabled entirely. However, while `object` can be used to add *code* (which is indeed a potential security hole) to a document, reading [Objects, Images, and Applets in HTML documents][objects-html] reveals that the “dangerous” are not all the `object`s, but rather those having the following attributes: + + classid %URI; #IMPLIED -- identifies an implementation -- + codebase %URI; #IMPLIED -- base URI for classid, data, archive-- + codetype %ContentType; #IMPLIED -- content type for code -- + archive CDATA #IMPLIED -- space-separated list of URIs -- + +It seems that the following attributes are, OTOH, safe: + + declare (declare) #IMPLIED -- declare but don't instantiate flag -- + data %URI; #IMPLIED -- reference to object's data -- + type %ContentType; #IMPLIED -- content type for data -- + standby %Text; #IMPLIED -- message to show while loading -- + height %Length; #IMPLIED -- override height -- + width %Length; #IMPLIED -- override width -- + usemap %URI; #IMPLIED -- use client-side image map -- + name CDATA #IMPLIED -- submit as part of form -- + tabindex NUMBER #IMPLIED -- position in tabbing order -- + +Should the former attributes be *scrubbed* while the latter left intact, the use of the `object` tag would seemingly become safe. + +Note also that allowing `object` (either restricted in such a way or not) automatically solves the [[/todo/svg]] issue. + +For Ikiwiki, it may be nice to be able to restrict [URI's][URI] (as required by the `data` and `usemap` attributes) to, say, relative and `data:` (as per [RFC 2397][]) ones as well, though it requires some more consideration. + +— [[Ivan_Shmakov]], 2010-03-12Z. + +[[wishlist]] + +## See also + +* [Objects, Images, and Applets in HTML documents][objects-html] +* [[plugins/htmlscrubber|/plugins/htmlscrubber]] +* [[todo/svg|/todo/svg]] +* [RFC 2397: The “data” URL scheme. L. Masinter. August 1998.][RFC 2397] +* [Uniform Resource Identifier — the free encyclopedia][URI] + +[HTML::Scrubber]: http://search.cpan.org/~podmaster/HTML-Scrubber-0.08/Scrubber.pm +[objects-html]: http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html +[RFC 2397]: http://tools.ietf.org/html/rfc2397 +[URI]: http://en.wikipedia.org/wiki/Uniform_Resource_Identifier -- cgit v1.2.3 From 556181d417e3461de56c43445ec9b2b0aefc7141 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Mar 2010 14:29:54 -0500 Subject: data:image/svg is a security hole as javascript can presumably be inserted --- doc/todo/svg.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/todo/svg.mdwn b/doc/todo/svg.mdwn index 2099751e3..274ebf3e3 100644 --- a/doc/todo/svg.mdwn +++ b/doc/todo/svg.mdwn @@ -58,6 +58,8 @@ in the trunk if other people think it's useful. [htmlscrubber.pm]:http://xbeta.org/gitweb/?p=xbeta/ikiwiki.git;a=blob;f=IkiWiki/Plugin/htmlscrubber.pm;h=3c0ddc8f25bd8cb863634a9d54b40e299e60f7df;hb=fe333c8e5b4a5f374a059596ee698dacd755182d [diff]: http://xbeta.org/gitweb/?p=xbeta/ikiwiki.git;a=blobdiff;f=IkiWiki/Plugin/htmlscrubber.pm;h=3c0ddc8f25bd8cb863634a9d54b40e299e60f7df;hp=3bdaccea119ec0e1b289a0da2f6d90e2219b8d66;hb=fe333c8e5b4a5f374a059596ee698dacd755182d;hpb=be0b4f603f918444b906e42825908ddac78b7073 +> Unfortuantly these links are broken. --[[Joey]] + * * * Actually, there's a way to embed SVG into MarkDown sources using the [data: URI scheme][rfc2397], [like this](data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8c3ZnIHdpZHRoPSIxOTIiIGhlaWdodD0iMTkyIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIDwhLS0gQ3JlYXRlZCB3aXRoIFNWRy1lZGl0IC0gaHR0cDovL3N2Zy1lZGl0Lmdvb2dsZWNvZGUuY29tLyAtLT4KIDx0aXRsZT5IZWxsbywgd29ybGQhPC90aXRsZT4KIDxnPgogIDx0aXRsZT5MYXllciAxPC90aXRsZT4KICA8ZyB0cmFuc2Zvcm09InJvdGF0ZSgtNDUsIDk3LjY3MTksIDk3LjY2OCkiIGlkPSJzdmdfNyI+CiAgIDxyZWN0IHN0cm9rZS13aWR0aD0iNSIgc3Ryb2tlPSIjMDAwMDAwIiBmaWxsPSIjRkYwMDAwIiBpZD0ic3ZnXzUiIGhlaWdodD0iNTYuMDAwMDAzIiB3aWR0aD0iMTc1IiB5PSI2OS42Njc5NjkiIHg9IjEwLjE3MTg3NSIvPgogICA8dGV4dCB4bWw6c3BhY2U9InByZXNlcnZlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmb250LWZhbWlseT0ic2VyaWYiIGZvbnQtc2l6ZT0iMjQiIHN0cm9rZS13aWR0aD0iMCIgc3Ryb2tlPSIjMDAwMDAwIiBmaWxsPSIjZmZmZjAwIiBpZD0ic3ZnXzYiIHk9IjEwNS42NjgiIHg9Ijk5LjY3MTkiPkhlbGxvLCB3b3JsZCE8L3RleHQ+CiAgPC9nPgogPC9nPgo8L3N2Zz4=). @@ -65,3 +67,11 @@ Of course, this way to display an image one needs to click a link, but it may be — [[Ivan_Shmakov]], 2010-03-12Z. [rfc2397]: http://tools.ietf.org/html/rfc2397 + +> You can do the same with img src actually. +> +> If svg markup allows unsafe elements (ie, javascript), +> which it appears to, +> then this is a security hole, and the htmlscrubber +> needs to lock it down more. Darn, now I have to spend my afternoon making +> security releases! --[[Joey]] -- cgit v1.2.3 From 2ad3e60ee8272b7cccfd83ae02d5b45e2cec003d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Mar 2010 14:49:13 -0500 Subject: htmlscrubber: Security fix: In data:image/* uris, only allow a few whitelisted image types. No svg. --- IkiWiki/Plugin/htmlscrubber.pm | 6 +++--- debian/changelog | 4 +++- doc/security.mdwn | 12 ++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index ee284a45c..26e18ffc7 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -30,9 +30,9 @@ sub import { "msnim", "notes", "rsync", "secondlife", "skype", "ssh", "sftp", "smb", "sms", "snews", "webcal", "ymsgr", ); - # data is a special case. Allow data:image/*, but - # disallow data:text/javascript and everything else. - $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/|[^:]+(?:$|\/))/i; + # data is a special case. Allow a few data:image/ types, + # but disallow data:text/javascript and everything else. + $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/(?:png|jpeg|gif)|[^:]+(?:$|\/))/i; } sub getsetup () { diff --git a/debian/changelog b/debian/changelog index bae0e7ee0..7fdbbcb63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100303) UNRELEASED; urgency=low +ikiwiki (3.20100312) unstable; urgency=HIGH * Fix utf8 issues in calls to md5_hex. * moderatedcomments: Added moderate_pagespec that can be used @@ -12,6 +12,8 @@ ikiwiki (3.20100303) UNRELEASED; urgency=low * Fix missing span on recentchanges page template. * search: Avoid '$' in the wikiname appearing unescaped on omega's query template, where it might crash omega. + * htmlscrubber: Security fix: In data:image/* uris, only allow a few + whitelisted image types. No svg. -- Joey Hess <joeyh@debian.org> Tue, 09 Mar 2010 19:46:35 -0500 diff --git a/doc/security.mdwn b/doc/security.mdwn index 3924186c2..21aef316b 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -427,3 +427,15 @@ enabling TeX configuration options that disallow unsafe TeX commands. The fix was released on 30 Aug 2009 in version 3.1415926, and was backported to stable in version 2.53.4. If you use the teximg plugin, I recommend upgrading. ([[!cve CVE-2009-2944]]) + +## javascript insertion via svg uris + +Ivan Shmakov pointed out that the htmlscrubber allowed `data:image/*` urls, +including `data:image/svg+xml`. But svg can contain javascript, so that is +unsafe. + +This hole was discovered on 12 March 2010 and fixed the same day +with the release of ikiwiki 3.20100312. +A fix was also backported to Debian etch, as version 2.53.5. I recommend +upgrading to one of these versions if your wiki can be edited by third +parties. -- cgit v1.2.3 From 4711076fad54ff8152f03a7e4bdd4b5c2df1916c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Mar 2010 15:00:39 -0500 Subject: clarify --- doc/todo/mercurial.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/todo/mercurial.mdwn b/doc/todo/mercurial.mdwn index e71c8106a..de1f148e5 100644 --- a/doc/todo/mercurial.mdwn +++ b/doc/todo/mercurial.mdwn @@ -119,3 +119,11 @@ I have a few notes on mercurial usage after trying it out for a while: >> I think the ideal solution would be to build `$destdir/recentchanges/*` directly from the output of `hg log`. --[[buo]] >>>> That would be 100 times as slow, so I chose not to do that. --[[Joey]] + +>>>> Since this is confusing people, allow me to clarify: Ikiwiki's +>>>> recentchanges generation pulls log information directly out of the VCS as +>>>> needed. It caches it in recentchanges/* in the `scrdir`. These cache +>>>> files need not be preserved, should never be checked into VCS, and if +>>>> you want to you can configure your VCSignore file to ignore them, +>>>> just as you can configure it to ignore the `.ikiwiki` directory in the +>>>> `scrdir`. --[[Joey]] -- cgit v1.2.3 From afa930a9c4ada59ea840d626f583f8b4fb3c3f20 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Mar 2010 15:22:32 -0500 Subject: add news item for ikiwiki 3.20100312 --- doc/news/version_3.20091218.mdwn | 11 ----------- doc/news/version_3.20100312.mdwn | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 doc/news/version_3.20091218.mdwn create mode 100644 doc/news/version_3.20100312.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20091218.mdwn b/doc/news/version_3.20091218.mdwn deleted file mode 100644 index 224e81c4e..000000000 --- a/doc/news/version_3.20091218.mdwn +++ /dev/null @@ -1,11 +0,0 @@ -ikiwiki 3.20091218 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Add complete Spanish basewiki translation done by Fernando Gonzalez de - Requena. - * Improve javascript onload handling. - * monotone: Deal with format change in version 0.45. - (Thanks, Richard Levitte) - * cvs: Add missing bit to Automator. - * attachment: Fix reversion in attachment sorting by age. - * Fix utf-8 problems in rename, remove, attachment, 404, sourcepage, and - goto."""]] \ No newline at end of file diff --git a/doc/news/version_3.20100312.mdwn b/doc/news/version_3.20100312.mdwn new file mode 100644 index 000000000..10c34425d --- /dev/null +++ b/doc/news/version_3.20100312.mdwn @@ -0,0 +1,16 @@ +ikiwiki 3.20100312 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * Fix utf8 issues in calls to md5\_hex. + * moderatedcomments: Added moderate\_pagespec that can be used + to control which users or comment locations are moderated. + This can be used, just for example, to moderate "user(http://myopenid.com/*)" + if you're getting a lot of spammers from one particular openid + provider (who should perhaps answer your emails about them), + while not moderating other users. + * moderatedcomments: The moderate\_users setting is deprecated. Instead, + set moderate\_pagespec to "!admin()" or "user(*)". + * Fix missing span on recentchanges page template. + * search: Avoid '$' in the wikiname appearing unescaped on omega's + query template, where it might crash omega. + * htmlscrubber: Security fix: In data:image/* uris, only allow a few + whitelisted image types. No svg."""]] \ No newline at end of file -- cgit v1.2.3 From 08485ec444cf81015e39c52e6ce8e7b933a036f6 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Mar 2010 15:40:47 -0500 Subject: response --- doc/todo/finer_control_over___60__object___47____62__s.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/todo/finer_control_over___60__object___47____62__s.mdwn b/doc/todo/finer_control_over___60__object___47____62__s.mdwn index 714f5ae50..ac4b55568 100644 --- a/doc/todo/finer_control_over___60__object___47____62__s.mdwn +++ b/doc/todo/finer_control_over___60__object___47____62__s.mdwn @@ -27,6 +27,13 @@ For Ikiwiki, it may be nice to be able to restrict [URI's][URI] (as required by [[wishlist]] +> SVG can contain embedded javascript. The spec that you link to contains +> examples of objects that contain python scripts, Microsoft OLE +> objects, and Java. And then there's flash. I don't think ikiwiki can +> assume all the possibilities are handled securely, particularly WRT XSS +> attacks. +> --[[Joey]] + ## See also * [Objects, Images, and Applets in HTML documents][objects-html] -- cgit v1.2.3 From 0c3f59d33aa6af6c327d863a4110337ac9cae898 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Mar 2010 16:16:47 -0500 Subject: move bug report to bugs and close --- ...eption:_Unknown_function___96__this__39___.mdwn | 60 ++++++++++++++++++++++ ...eption:_Unknown_function___96__this__39___.mdwn | 58 --------------------- 2 files changed, 60 insertions(+), 58 deletions(-) create mode 100644 doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn delete mode 100644 doc/forum/Exception:_Unknown_function___96__this__39___.mdwn (limited to 'doc') diff --git a/doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn b/doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn new file mode 100644 index 000000000..9eac8eae5 --- /dev/null +++ b/doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn @@ -0,0 +1,60 @@ +I'm very excited to try out ikiwiki, since it should fit my purposes extremely well, but I'm having trouble with the search plugin. I'm pretty sure that right after I installed ikiwiki and needed dependencies, the search plugin was working fine. However, now when I try to use search, I get "Exception: Unknown function `this'" error on a blank page. I'm not sure how I should go about debugging this issue - my server's (I use Lighttpd 1.4.22) error log has no mention of the exception and there's nothing in /var/log/syslog either. + +What might be causing this exception and how I might go about debugging exceptions? + +> Appears to be coming from your xapian omega cgi binary. If you +> run `strings /usr/lib/cgi-bin/omega/omega` you can see it has +> "Exception: " in it, and I have found some similar (but not identical) +> error messages from xapian in a web search. +> +> I don´t know what to suggest, other than upgrade/downgrade/reinstall +> xapian-omega, and contacting the xapian developers for debugging. +> You could try rebuilding your wiki in case it is somehow +> caused by a problem with the xapian database. Failing everything, you +> could switch to [[google_search_plugin|plugins/google]]. --[[Joey]] + +>> Thanks, Joey. With your help I was able to figure out what was wrong. It's a fun little bug (or feature): the title of my wiki had string `$this` in title and that's what was causing the omega binary to choke. My wiki's title was inserted without escaping into the query template used by omega. Omega treated `$this` in the title as a function name and threw an exception because no such function was defined. To avoid this behavior, I used an html entity in the title, so `$this` became `$this`. I don't think that the wiki title should be inserted into the template without escaping - it can produce an error that's not trivial to debug. If users want to modify the html in the title, they should be editing respective templates, not typing html in the wiki title input. What do you think? --[[dkobozev]] + +>>> Sounds like a bug in omega, and one that probably would affect other +>>> users of omega too. Ikiwiki could work around it by pre-escaping +>>> data before passing it to xapian. I have not quite managed to reproduce it though; +>>> tried setting a page title to '$this' and 'foo $this'. +>>> That's with version 1.0.18 of omega. +>>> --[[Joey]] + +>>>> I tried it with both omega 1.0.13 and omega 1.0.18 and the issue is present in both. If I view the contents of {$srcdir}/.ikiwiki/xapian/templates/query, I can see that the wiki title is inserted verbatim and there are calls to `$setmap`, `$set` and `$def` etc in the template. --[[dkobozev]] + +>>>>> I don't see how that's relevant. It would help if you showed me +>>>>> exactly something that could be inserted into a page to cause the +>>>>> problem. --[[Joey]] + +>>>>>> Correct me if I'm wrong: ikiwiki generates an Omega template from its own templates, such as searchquery.tmpl and puts it into {$srcdir}/.ikiwiki/xapian/templates/query. Omega has its own template syntax, where function names are prefixed with dollar signs (`$`). So, when I call my wiki `$foobar`, ikiwiki generates an Omega template that looks like this snippet: + + <div id="container"> + <div class="pageheader"> + <div class="header"> + <span> + <a href="http://example.com">$foobar</ a>/search + </span> + </div> + </div> <!-- .pageheader --> + + <div id="content"> + $setmap{prefix,title,S} + $setmap{prefix,link,XLINK} + $set{thousand,$.}$set{decimal,.}$setmap{BN,,Any Country,uk,England,fr,France} + ${ + $def{PREV, + $if{$ne{$topdoc,0},<INPUT TYPE=image NAME="<" ALT="<" + SRC="/images/xapian-omega/prev.png" BORDER=0 HEIGHT=30 WIDTH=30>, + <IMG ALT="" SRC="/images/xapian-omega/prevoff.png" HEIGHT=30 WIDTH=30>} + +>>>>>> So `$foobar` clashes with Omega's template tags. Does this help? + +>>>>>>> Ahh. I had somehow gotten it into my head that you were talking +>>>>>>> about the title of a single page, not of the whole wiki. But +>>>>>>> you were clear all along it was the wiki title. Sorry for +>>>>>>> misunderstanding. I've put in a complete fix for this problem. +>>>>>>> if this was in [[bugs]], I'd close it. :) --[[Joey]] + +[[done]] diff --git a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn b/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn deleted file mode 100644 index 035247100..000000000 --- a/doc/forum/Exception:_Unknown_function___96__this__39___.mdwn +++ /dev/null @@ -1,58 +0,0 @@ -I'm very excited to try out ikiwiki, since it should fit my purposes extremely well, but I'm having trouble with the search plugin. I'm pretty sure that right after I installed ikiwiki and needed dependencies, the search plugin was working fine. However, now when I try to use search, I get "Exception: Unknown function `this'" error on a blank page. I'm not sure how I should go about debugging this issue - my server's (I use Lighttpd 1.4.22) error log has no mention of the exception and there's nothing in /var/log/syslog either. - -What might be causing this exception and how I might go about debugging exceptions? - -> Appears to be coming from your xapian omega cgi binary. If you -> run `strings /usr/lib/cgi-bin/omega/omega` you can see it has -> "Exception: " in it, and I have found some similar (but not identical) -> error messages from xapian in a web search. -> -> I don´t know what to suggest, other than upgrade/downgrade/reinstall -> xapian-omega, and contacting the xapian developers for debugging. -> You could try rebuilding your wiki in case it is somehow -> caused by a problem with the xapian database. Failing everything, you -> could switch to [[google_search_plugin|plugins/google]]. --[[Joey]] - ->> Thanks, Joey. With your help I was able to figure out what was wrong. It's a fun little bug (or feature): the title of my wiki had string `$this` in title and that's what was causing the omega binary to choke. My wiki's title was inserted without escaping into the query template used by omega. Omega treated `$this` in the title as a function name and threw an exception because no such function was defined. To avoid this behavior, I used an html entity in the title, so `$this` became `$this`. I don't think that the wiki title should be inserted into the template without escaping - it can produce an error that's not trivial to debug. If users want to modify the html in the title, they should be editing respective templates, not typing html in the wiki title input. What do you think? --[[dkobozev]] - ->>> Sounds like a bug in omega, and one that probably would affect other ->>> users of omega too. Ikiwiki could work around it by pre-escaping ->>> data before passing it to xapian. I have not quite managed to reproduce it though; ->>> tried setting a page title to '$this' and 'foo $this'. ->>> That's with version 1.0.18 of omega. ->>> --[[Joey]] - ->>>> I tried it with both omega 1.0.13 and omega 1.0.18 and the issue is present in both. If I view the contents of {$srcdir}/.ikiwiki/xapian/templates/query, I can see that the wiki title is inserted verbatim and there are calls to `$setmap`, `$set` and `$def` etc in the template. --[[dkobozev]] - ->>>>> I don't see how that's relevant. It would help if you showed me ->>>>> exactly something that could be inserted into a page to cause the ->>>>> problem. --[[Joey]] - ->>>>>> Correct me if I'm wrong: ikiwiki generates an Omega template from its own templates, such as searchquery.tmpl and puts it into {$srcdir}/.ikiwiki/xapian/templates/query. Omega has its own template syntax, where function names are prefixed with dollar signs (`$`). So, when I call my wiki `$foobar`, ikiwiki generates an Omega template that looks like this snippet: - - <div id="container"> - <div class="pageheader"> - <div class="header"> - <span> - <a href="http://example.com">$foobar</ a>/search - </span> - </div> - </div> <!-- .pageheader --> - - <div id="content"> - $setmap{prefix,title,S} - $setmap{prefix,link,XLINK} - $set{thousand,$.}$set{decimal,.}$setmap{BN,,Any Country,uk,England,fr,France} - ${ - $def{PREV, - $if{$ne{$topdoc,0},<INPUT TYPE=image NAME="<" ALT="<" - SRC="/images/xapian-omega/prev.png" BORDER=0 HEIGHT=30 WIDTH=30>, - <IMG ALT="" SRC="/images/xapian-omega/prevoff.png" HEIGHT=30 WIDTH=30>} - ->>>>>> So `$foobar` clashes with Omega's template tags. Does this help? - ->>>>>>> Ahh. I had somehow gotten it into my head that you were talking ->>>>>>> about the title of a single page, not of the whole wiki. But ->>>>>>> you were clear all along it was the wiki title. Sorry for ->>>>>>> misunderstanding. I've put in a complete fix for this problem. ->>>>>>> if this was in [[bugs]], I'd close it. :) --[[Joey]] -- cgit v1.2.3 From b5e27e60ba38365f3e252df80c2a22503f00eb06 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Fri, 12 Mar 2010 21:24:53 +0000 Subject: Note that <object /> still may be allowed, although in a form not suitable for, say, SVG inclusion. --- ...er_control_over___60__object___47____62__s.mdwn | 34 +++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/finer_control_over___60__object___47____62__s.mdwn b/doc/todo/finer_control_over___60__object___47____62__s.mdwn index ac4b55568..c37d052db 100644 --- a/doc/todo/finer_control_over___60__object___47____62__s.mdwn +++ b/doc/todo/finer_control_over___60__object___47____62__s.mdwn @@ -27,13 +27,43 @@ For Ikiwiki, it may be nice to be able to restrict [URI's][URI] (as required by [[wishlist]] -> SVG can contain embedded javascript. The spec that you link to contains +> SVG can contain embedded javascript. + +>> Indeed. + +>> So, a more general tool (`XML::Scrubber`?) will be necessary to +>> refine both [XHTML][] and SVG. + +>> … And to leave [MathML][] as is (?.) + +>> — [[Ivan_Shmakov]], 2010-03-12Z. + +> The spec that you link to contains > examples of objects that contain python scripts, Microsoft OLE > objects, and Java. And then there's flash. I don't think ikiwiki can > assume all the possibilities are handled securely, particularly WRT XSS > attacks. > --[[Joey]] +>> I've scanned over all the `object` examples in the specification and +>> all of those that hold references to code (as opposed to data) have a +>> distinguishing `classid` attribute. + +>> While I won't assert that it's impossible to reference code with +>> `data` (and, thanks to `text/xhtml+xml` and `image/svg+xml`, it is +>> *not* impossible), throwing away any of the “insecure” +>> attributes listed above together with limiting the possible URI's +>> (i. e., only *local* and certain `data:` ones for `data` and +>> `usemap`) should make `object` almost as harmless as, say, `img`. + +>> (Though it certainly won't solve the [[SVG_problem|/todo/SVG]] being +>> restricted in such a way.) + +>> Of the remaining issues I could only think of recursive +>> `object` — the one that references its container document. + +>> — [[Ivan_Shmakov]], 2010-03-12Z. + ## See also * [Objects, Images, and Applets in HTML documents][objects-html] @@ -43,6 +73,8 @@ For Ikiwiki, it may be nice to be able to restrict [URI's][URI] (as required by * [Uniform Resource Identifier — the free encyclopedia][URI] [HTML::Scrubber]: http://search.cpan.org/~podmaster/HTML-Scrubber-0.08/Scrubber.pm +[MathML]: http://en.wikipedia.org/wiki/MathML [objects-html]: http://www.w3.org/TR/1999/REC-html401-19991224/struct/objects.html [RFC 2397]: http://tools.ietf.org/html/rfc2397 [URI]: http://en.wikipedia.org/wiki/Uniform_Resource_Identifier +[XHTML]: http://en.wikipedia.org/wiki/XHTML -- cgit v1.2.3 From 29ca20b87c565412fa603127425ccdaf4ca58b79 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 12 Mar 2010 16:50:04 -0500 Subject: response --- doc/todo/finer_control_over___60__object___47____62__s.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/finer_control_over___60__object___47____62__s.mdwn b/doc/todo/finer_control_over___60__object___47____62__s.mdwn index c37d052db..0ca949954 100644 --- a/doc/todo/finer_control_over___60__object___47____62__s.mdwn +++ b/doc/todo/finer_control_over___60__object___47____62__s.mdwn @@ -56,6 +56,11 @@ For Ikiwiki, it may be nice to be able to restrict [URI's][URI] (as required by >> (i. e., only *local* and certain `data:` ones for `data` and >> `usemap`) should make `object` almost as harmless as, say, `img`. +>>> But with local data, one could not embed youtube videos, which surely +>>> is the most obvious use case? Note that youtube embedding uses an +>>> object element with no classid. The swf file is provided via an +>>> enclosed param element. --[[Joey]] + >> (Though it certainly won't solve the [[SVG_problem|/todo/SVG]] being >> restricted in such a way.) -- cgit v1.2.3 From c26b6c3be864aaf49fe0b0fc15c0af59323b7dde Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Fri, 12 Mar 2010 22:12:41 +0000 Subject: Note the use of <embed /> on YouTube. --- .../finer_control_over___60__object___47____62__s.mdwn | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/finer_control_over___60__object___47____62__s.mdwn b/doc/todo/finer_control_over___60__object___47____62__s.mdwn index 0ca949954..50c4d43bf 100644 --- a/doc/todo/finer_control_over___60__object___47____62__s.mdwn +++ b/doc/todo/finer_control_over___60__object___47____62__s.mdwn @@ -57,10 +57,23 @@ For Ikiwiki, it may be nice to be able to restrict [URI's][URI] (as required by >> `usemap`) should make `object` almost as harmless as, say, `img`. >>> But with local data, one could not embed youtube videos, which surely ->>> is the most obvious use case? Note that youtube embedding uses an +>>> is the most obvious use case? + +>>>> Allowing a “remote” object to render on one's page is a + security issue by itself. + Though, of course, having an explicit whitelist of URI's may make + this issue more tolerable. + — [[Ivan_Shmakov]], 2010-03-12Z. + +>>> Note that youtube embedding uses an >>> object element with no classid. The swf file is provided via an >>> enclosed param element. --[[Joey]] +>>>> I've just checked a random video on YouTube and I see that the + `.swf` file is provided via an enclosed `embed` element. Whether + to allow those or not is a different issue. + — [[Ivan_Shmakov]], 2010-03-12Z. + >> (Though it certainly won't solve the [[SVG_problem|/todo/SVG]] being >> restricted in such a way.) -- cgit v1.2.3 From e56ec7a96c3a2064941a82619bf6cb0d2e8392e0 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 15:08:00 -0500 Subject: websetup: Add websetup_unsafe to allow marking other settings as unsafe. --- IkiWiki/Plugin/websetup.pm | 22 ++++++++++++++++++---- debian/changelog | 7 +++++++ doc/plugins/websetup.mdwn | 3 ++- 3 files changed, 27 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 5c19c9b63..d444c0a3d 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -27,6 +27,13 @@ sub getsetup () { safe => 0, rebuild => 0, }, + websetup_unsafe => { + type => "string", + example => [], + description => "list of additional setup field keys to treat as unsafe", + safe => 0, + rebuild => 0, + }, websetup_show_unsafe => { type => "boolean", example => 1, @@ -57,6 +64,12 @@ sub formatexample ($$) { } } +sub issafe ($) { + my $key=shift; + + return ! grep { $_ eq $key } @{$config{websetup_unsafe}}; +} + sub showfields ($$$@) { my $form=shift; my $plugin=shift; @@ -78,7 +91,8 @@ sub showfields ($$$@) { # XXX hashes not handled yet next if ref $config{$key} && ref $config{$key} eq 'HASH' || ref $info{example} eq 'HASH'; # maybe skip unsafe settings - next if ! $info{safe} && ! ($config{websetup_show_unsafe} && $config{websetup_advanced}); + next if ! ($config{websetup_show_unsafe} && $config{websetup_advanced}) && + (! $info{safe} || ! issafe($key)); # maybe skip advanced settings next if $info{advanced} && ! $config{websetup_advanced}; # these are handled specially, so don't show @@ -156,7 +170,7 @@ sub showfields ($$$@) { if (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY') { $value=[(ref $value eq 'ARRAY' ? map { Encode::encode_utf8($_) } @{$value} : "")]; - push @$value, "", "" if $info{safe}; # blank items for expansion + push @$value, "", "" if $info{safe} && issafe($key); # blank items for expansion } else { $value=Encode::encode_utf8($value); @@ -210,7 +224,7 @@ sub showfields ($$$@) { } } - if (! $info{safe}) { + if (! $info{safe} || ! issafe($key)) { $form->field(name => $name, disabled => 1); } else { @@ -346,7 +360,7 @@ sub showform ($$) { @value=0; } - if (! $info{safe}) { + if (! $info{safe} || ! issafe($key)) { error("unsafe field $key"); # should never happen } diff --git a/debian/changelog b/debian/changelog index 7fdbbcb63..9e779bb18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20100313) UNRELEASED; urgency=low + + * websetup: Add websetup_unsafe to allow marking other settings + as unsafe. + + -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 + ikiwiki (3.20100312) unstable; urgency=HIGH * Fix utf8 issues in calls to md5_hex. diff --git a/doc/plugins/websetup.mdwn b/doc/plugins/websetup.mdwn index f1756ba8f..b4d23ba9c 100644 --- a/doc/plugins/websetup.mdwn +++ b/doc/plugins/websetup.mdwn @@ -16,7 +16,8 @@ enabled and disabled using it too. Some settings are not considered safe enough to be manipulated over the web; these are still shown, by default, but cannot be modified. To hide them, set `websetup_show_unsafe` to false in the setup file. A few settings have too complex a data type to be -configured via the web. +configured via the web. To mark additional settings as unsafe, you can +list them in `websetup_unsafe`. Plugins that should not be enabled/disabled via the web interface can be listed in `websetup_force_plugins` in the setup file. -- cgit v1.2.3 From 4da6e94305c2c7f4adab057b362d9e58a7494439 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawm-ebiIfxbKD3KNa-Cu9LvvD9edMLW7BAo" <https://www.google.com/accounts/o8/id?id=AItOawm-ebiIfxbKD3KNa-Cu9LvvD9edMLW7BAo@web> Date: Sat, 13 Mar 2010 21:14:35 +0000 Subject: Google's OpenID and discovery protocol --- doc/forum/google_openid_broken__63__.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 68b44f2c1..0e41d4ced 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -50,3 +50,11 @@ The openid is <https://www.google.com/accounts/o8/id?id=AItOawltlTwUCL_Fr1siQn94GV65-XwQH5XSku4> (what a mouthfull!), and I don't know who that is or how to use it since it points to a fairly useless xml document, rather than a web page. --[[Joey]] + +> That string is what's received via the discovery protocol. The user logging in with a Google account is not supposed to write that when logging in, but rather <https://www.google.com/accounts/o8/id>. The OpenID client library will accept that and redirect the user to a sign in page, which will return that string as the OpenID. It's not really usable as an identifier for edits and whatnots, but an alternative would be to use the attribute exchange extension to get the email address and display that. See <http://code.google.com/apis/accounts/docs/OpenID.html#Parameters>. + +> Yahoo's OpenID implementation works alike, but I haven't looked at it as much. It uses <https://me.yahoo.com/> to receive the endpoint. + +> I've added buttons that submit the two above URLs for logging in with a Google and Yahoo OpenID, respectively, to my locally changed OpenID login plugin. + +> Using the Google profile page as the OpenID is really orthogonal to the above. --[[kaol]] -- cgit v1.2.3 From e8f6c06ca81e4ebd8d244e3863d21517d87b6620 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 17:29:06 -0500 Subject: update; openid email addresses now available so this is unblocked --- doc/todo/avatar.mdwn | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/doc/todo/avatar.mdwn b/doc/todo/avatar.mdwn index b8aa2327f..4409e7b14 100644 --- a/doc/todo/avatar.mdwn +++ b/doc/todo/avatar.mdwn @@ -1,35 +1,24 @@ [[!tag wishlist]] It would be nice if ikiwiki, particularly [[plugins/comments]] -supported user avatar icons. I was considering adding a directive for this, -as designed below. +supported user avatar icons. -However, there is no *good* service for mapping openids to avatars -- -openavatar has many issues, including not supporting delegated openids, and -after trying it, I don't trust it to push users toward. -Perhaps instead ikiwiki could get the email address from the openid -provider, though I think the perl openid modules don't support the openid -2.x feature that allows that. - -At the moment, working on this doesn't feel like a good use of my time. ---[[Joey]] - -Hmm.. unless is just always used a single provider (gravatar) and hashed -the openid. Then wavatars could be used to get a unique avatar per openid -at least. --[[Joey]] - ----- - -The directive displays a small avatar image for a user. Pass it the -email address, openid, or wiki username of the user. +Idea is to add a directive that displays a small avatar image for a user. +Pass it the email address, openid, or wiki username of the user. \[[!avatar user@example.com]] \[[!avatar http://joey.kitenet.net/]] \[[!avatar user]] +These directives can then be hand-inserted onto pages, or more likely, +included in eg, a comment post via a template. Possibly included in a +recentchanges page item via that template too? + The avatars are provided by various sites. For email addresses, it uses a [gravatar](http://gravatar.com/). For openid, -[openavatar](http://www.openvatar.com/) is used. For a wiki username, the +[openavatar](http://www.openvatar.com/) could used, but I am not very happy +with it; probably better to just get the email via SREG (as is done now for +openid), and use that. For a wiki username, the user's email address is looked up and the gravatar for that user is displayed. (Of course, the user has to have filled in their email address on their Preferences page for that to work.) -- cgit v1.2.3 From e2c9b425415a00012b2c579c40c369da4ac7c98b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 17:46:28 -0500 Subject: thoughts --- doc/todo/Separate_OpenIDs_and_usernames.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc') diff --git a/doc/todo/Separate_OpenIDs_and_usernames.mdwn b/doc/todo/Separate_OpenIDs_and_usernames.mdwn index 2cd52e8c4..ae427d540 100644 --- a/doc/todo/Separate_OpenIDs_and_usernames.mdwn +++ b/doc/todo/Separate_OpenIDs_and_usernames.mdwn @@ -6,6 +6,25 @@ I see this being implemented in one of two possible ways. The easiest seems like A slightly more complex next step would be to request sreg from the provider and, if provided, automatically set the identity's username and email address from the provided persona. If username login to accounts with blank passwords is disabled, then you have the best of both worlds. Passwordless signin, human-friendly attribution, automatic setting of preferences. +> Given that openids are a global user identifier, that can look as pretty +> as the user cares to make it look via delegation, I am not a fan of +> having a site-local identifier that layered on top of that. Perhaps +> partly because every site that I have seen that does that has openid +> implemented as a badly-done wart on the side of their regular login +> system. +> +> Openid Simple Registration is now used to populate the userdb with the +> email address for openid users. +> +> I am considering displaying the userid or fullname, if available, +> instead of the munged openid url in recentchanges. It would be nice +> for those nasty [[google_openids|forum/google_openid_broken?]]. But, +> I first have to find a way to encode the name in the VCS commit log, +> while still keeping the openid of the committer in there too. +> Perhaps something like this (for git): --[[Joey]] +> +> Author: Joey Hess <http://joey.kitenet.net/@web> + Unfortunately I don't speak Perl, so hopefully someone thinks these suggestions are good enough to code up. I've hacked on openid code in Ruby before, so hopefully these changes aren't all that difficult to implement. Even if you don't get any data via sreg, you're no worse off than where you are now, so I don't think there'd need to be much in the way of error/sanity-checking of returned data. If it's null or not available then no big deal, typing in a username is no sweat. [[!tag wishlist]] -- cgit v1.2.3 From 4f6c544fa8e7dd21450952f0a9fc3918ee600705 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 19:12:52 -0500 Subject: munge to avoid markdown eating email addresses --- doc/todo/git_attribution/discussion.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/git_attribution/discussion.mdwn b/doc/todo/git_attribution/discussion.mdwn index dfb490bc2..6905d9b4b 100644 --- a/doc/todo/git_attribution/discussion.mdwn +++ b/doc/todo/git_attribution/discussion.mdwn @@ -72,7 +72,7 @@ no determination of uniqueness) > GIT_AUTHOR_EMAIL can also be set. > > There is one thing yet to be solved, and that is how to tell the -> difference between a web commit by 'Joey Hess <joey@kitenet.net>', +> difference between a web commit by 'Joey Hess <joey\@kitenet.net>', > and a git commit by the same. I think we do want to differentiate these, > and the best way to do it seems to be to add a line to the end of the > commit message. Something like: "\n\nWeb-commit: true" @@ -94,5 +94,5 @@ no determination of uniqueness) > * github pushes to twitter ;-) > > So while I tried that way at first, I'm now leaning toward encoding the -> username in the email address. Like "user <user@web>", or -> "joey <http://joey.kitenet.net/@web>". +> username in the email address. Like "user <user\@web>", or +> "joey <http://joey.kitenet.net/\@web>". -- cgit v1.2.3 From 8f4f81cdfdcb68be5efb385dc07e4a0a04352a9d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 19:24:51 -0500 Subject: wrinkles --- doc/todo/Separate_OpenIDs_and_usernames.mdwn | 9 ++++++--- doc/todo/avatar.mdwn | 14 ++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/todo/Separate_OpenIDs_and_usernames.mdwn b/doc/todo/Separate_OpenIDs_and_usernames.mdwn index ae427d540..3fb952f96 100644 --- a/doc/todo/Separate_OpenIDs_and_usernames.mdwn +++ b/doc/todo/Separate_OpenIDs_and_usernames.mdwn @@ -13,8 +13,9 @@ A slightly more complex next step would be to request sreg from the provider and > implemented as a badly-done wart on the side of their regular login > system. > -> Openid Simple Registration is now used to populate the userdb with the -> email address for openid users. +> The openid plugin now attempts to get an email and a username, and stores +> them in the session database for later use (ie, when the user edits a +> page). > > I am considering displaying the userid or fullname, if available, > instead of the munged openid url in recentchanges. It would be nice @@ -23,7 +24,9 @@ A slightly more complex next step would be to request sreg from the provider and > while still keeping the openid of the committer in there too. > Perhaps something like this (for git): --[[Joey]] > -> Author: Joey Hess <http://joey.kitenet.net/@web> +> Author: Joey Hess <http://joey.kitenet.net/@web> +> +> Unfortunately I don't speak Perl, so hopefully someone thinks these suggestions are good enough to code up. I've hacked on openid code in Ruby before, so hopefully these changes aren't all that difficult to implement. Even if you don't get any data via sreg, you're no worse off than where you are now, so I don't think there'd need to be much in the way of error/sanity-checking of returned data. If it's null or not available then no big deal, typing in a username is no sweat. diff --git a/doc/todo/avatar.mdwn b/doc/todo/avatar.mdwn index 4409e7b14..3a4e64b95 100644 --- a/doc/todo/avatar.mdwn +++ b/doc/todo/avatar.mdwn @@ -15,14 +15,20 @@ included in eg, a comment post via a template. Possibly included in a recentchanges page item via that template too? The avatars are provided by various sites. For email addresses, it uses a -[gravatar](http://gravatar.com/). For openid, -[openavatar](http://www.openvatar.com/) could used, but I am not very happy -with it; probably better to just get the email via SREG (as is done now for -openid), and use that. For a wiki username, the +[gravatar](http://gravatar.com/). For a wiki username, the user's email address is looked up and the gravatar for that user is displayed. (Of course, the user has to have filled in their email address on their Preferences page for that to work.) +For openid, openavatar sucked and is now dead. So we need to use an email +address instead, I guess. Problem is that the email address of a given +openid is only known when that user is logged in and making a change. +And we don't want to leak an openid user's email into a page either. +Hmm. Suppose the gravatar hash could be calculated from the email address +and embedded instead of the openid? + +Or, for openid, could use <http://paulisageek.com/openidavatar>. + An optional second parameter can be included, containing additional options to pass in the [gravatar url](http://en.gravatar.com/site/implement/url). -- cgit v1.2.3 From 702c097ac29f1b208158936a99317ebad3e4116f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 19:40:20 -0500 Subject: update --- doc/todo/Separate_OpenIDs_and_usernames.mdwn | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/Separate_OpenIDs_and_usernames.mdwn b/doc/todo/Separate_OpenIDs_and_usernames.mdwn index 3fb952f96..7cfe49a5a 100644 --- a/doc/todo/Separate_OpenIDs_and_usernames.mdwn +++ b/doc/todo/Separate_OpenIDs_and_usernames.mdwn @@ -18,15 +18,25 @@ A slightly more complex next step would be to request sreg from the provider and > page). > > I am considering displaying the userid or fullname, if available, -> instead of the munged openid url in recentchanges. It would be nice -> for those nasty [[google_openids|forum/google_openid_broken?]]. But, -> I first have to find a way to encode the name in the VCS commit log, +> instead of the munged openid url in recentchanges and comments. +> It would be nice for those nasty [[google_openids|forum/google_openid_broken?]]. +> But, I first have to find a way to encode the name in the VCS commit log, > while still keeping the openid of the committer in there too. > Perhaps something like this (for git): --[[Joey]] > > Author: Joey Hess <http://joey.kitenet.net/@web> > +> So, what needs to be done: > +> * Change `rcs_commit` and `rcs_commit_staged` to take a session object, +> instead of just a userid. (For back-compat, if the parameter is +> not an object, it's a userid.) Bump ikiwiki plugin interface version. +> * Modify all RCS plugins to include the session username somewhere +> in the commit, and parse it back out in `rcs_recentchanges`. +> * Modify recentchanges plugin to display the username instead of the +> `openiduser`. +> * Modify comment plugin to put the session username in the comment +> template instead of the `openiduser`. Unfortunately I don't speak Perl, so hopefully someone thinks these suggestions are good enough to code up. I've hacked on openid code in Ruby before, so hopefully these changes aren't all that difficult to implement. Even if you don't get any data via sreg, you're no worse off than where you are now, so I don't think there'd need to be much in the way of error/sanity-checking of returned data. If it's null or not available then no big deal, typing in a username is no sweat. -- cgit v1.2.3 From fd43e83fcf7bf24493ecfff54111c1c5f1cab573 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 19:56:54 -0500 Subject: update --- doc/forum/google_openid_broken__63__.mdwn | 13 +++++++++++++ doc/todo/Separate_OpenIDs_and_usernames.mdwn | 7 +++++++ 2 files changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 0e41d4ced..4ca5cac93 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -58,3 +58,16 @@ points to a fairly useless xml document, rather than a web page. --[[Joey]] > I've added buttons that submit the two above URLs for logging in with a Google and Yahoo OpenID, respectively, to my locally changed OpenID login plugin. > Using the Google profile page as the OpenID is really orthogonal to the above. --[[kaol]] + +>> Displaying email addresses is not really an option, because ikiwiki +>> can't leak user email addresses like that. Displaying nicknames or +>> usernames is, see [[todo/Separate_OpenIDs_and_usernames]]. +>> +>> It would probably be good if the openid plugin could be configured with +>> a list of generic openid urls, so it can add quick login buttons using +>> those urls. +>> +>> The ugly google url will still be exposed here and there where +>> a unique user id is needed. That can be avoided by not using the generic +>> <https://www.google.com/accounts/o8/id>, but instead your own profile +>> like <http://www.google.com/profiles/joeyhess>. --[[Joey]] diff --git a/doc/todo/Separate_OpenIDs_and_usernames.mdwn b/doc/todo/Separate_OpenIDs_and_usernames.mdwn index 7cfe49a5a..fcdb49f6d 100644 --- a/doc/todo/Separate_OpenIDs_and_usernames.mdwn +++ b/doc/todo/Separate_OpenIDs_and_usernames.mdwn @@ -26,6 +26,13 @@ A slightly more complex next step would be to request sreg from the provider and > > Author: Joey Hess <http://joey.kitenet.net/@web> > +> Only problem with the above is that the openid will still be displayed +> by CIA. Other option is this, which solves that, but at the expense of +> having to munge the username to fit inside the email address, +> and generally seems backwards: --[[Joey]] +> +> Author: http://joey.kitenet.net/ <Joey_Hess@web> +> > So, what needs to be done: > > * Change `rcs_commit` and `rcs_commit_staged` to take a session object, -- cgit v1.2.3 From c0ad4929deb455804ddfc6451820c6c67a298ea1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 20:10:50 -0500 Subject: Improve openid url munging; do not display anchors and cgi parameters, as used by yahoo and google urls. --- IkiWiki.pm | 2 +- debian/changelog | 2 ++ doc/forum/google_openid_broken__63__.mdwn | 6 ++++++ t/openiduser.t | 7 ++++++- 4 files changed, 15 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 00eadfd98..251ed8cc8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1131,7 +1131,7 @@ sub openiduser ($) { # Convert "http://somehost.com/user" to "user [somehost.com]". # (also "https://somehost.com/user/") if ($display !~ /\[/) { - $display=~s/^https?:\/\/(.+)\/([^\/]+)\/?$/$2 [$1]/; + $display=~s/^https?:\/\/(.+)\/([^\/#?]+)\/?(?:[#?].*)?$/$2 [$1]/; } $display=~s!^https?://!!; # make sure this is removed eval q{use CGI 'escapeHTML'}; diff --git a/debian/changelog b/debian/changelog index 854d83130..0a9679618 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ikiwiki (3.20100313) UNRELEASED; urgency=low as unsafe. * openid: Use Openid Simple Registration or OpenID Attribute Exchange to get the user's email address and username. + * Improve openid url munging; do not display anchors and cgi parameters, + as used by yahoo and google urls. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 4ca5cac93..96ba2d791 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -59,6 +59,12 @@ points to a fairly useless xml document, rather than a web page. --[[Joey]] > Using the Google profile page as the OpenID is really orthogonal to the above. --[[kaol]] +>> First, I don't accept that the openid google returns from their +>> generic signin url *has* to be so freaking ugly. For contrast, +>> look at the openid you log in as if you use the yahoo url. +>> <https://me.yahoo.com/joeyhess#35f22>. Nice and clean, now +>> munged by ikiwiki to "joeyhess [me.yahoo.com]". +>> >> Displaying email addresses is not really an option, because ikiwiki >> can't leak user email addresses like that. Displaying nicknames or >> usernames is, see [[todo/Separate_OpenIDs_and_usernames]]. diff --git a/t/openiduser.t b/t/openiduser.t index 52d879484..caabbcefc 100755 --- a/t/openiduser.t +++ b/t/openiduser.t @@ -10,7 +10,7 @@ BEGIN { eval q{use Test::More skip_all => "Net::OpenID::VerifiedIdentity not available"}; } else { - eval q{use Test::More tests => 9}; + eval q{use Test::More tests => 11}; } use_ok("IkiWiki::Plugin::openid"); } @@ -28,6 +28,11 @@ $^W=1; is(IkiWiki::openiduser('http://yam655.livejournal.com/'), 'yam655 [livejournal.com]'); is(IkiWiki::openiduser('http://id.mayfirst.org/jamie/'), 'jamie [id.mayfirst.org]'); +# yahoo has an anchor in the url +is(IkiWiki::openiduser('https://me.yahoo.com/joeyhess#35f22'), 'joeyhess [me.yahoo.com]'); +# google urls are horrendous, but the worst bit is after a ?, so can be dropped +is(IkiWiki::openiduser('https://www.google.com/accounts/o8/id?id=AItOawm-ebiIfxbKD3KNa-Cu9LvvD9edMLW7BAo'), 'id [www.google.com/accounts/o8]'); + # and some less typical ones taken from the ikiwiki commit history is(IkiWiki::openiduser('http://thm.id.fedoraproject.org/'), 'thm [id.fedoraproject.org]'); -- cgit v1.2.3 From 725a1cf0e8d1fbdb7f449b632ee1fa3cb84835c7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 13 Mar 2010 20:45:44 -0500 Subject: update; bleargh --- doc/todo/avatar.mdwn | 50 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/todo/avatar.mdwn b/doc/todo/avatar.mdwn index 3a4e64b95..f0599e4ed 100644 --- a/doc/todo/avatar.mdwn +++ b/doc/todo/avatar.mdwn @@ -1,42 +1,60 @@ [[!tag wishlist]] It would be nice if ikiwiki, particularly [[plugins/comments]] -supported user avatar icons. +(but also, ideally, recentchanges) supported user avatar icons. Idea is to add a directive that displays a small avatar image for a user. -Pass it the email address, openid, or wiki username of the user. +Pass it a user's the email address, openid, username, or the md5 hash +of their email address: \[[!avatar user@example.com]] \[[!avatar http://joey.kitenet.net/]] \[[!avatar user]] + \[[!avatar hash]] These directives can then be hand-inserted onto pages, or more likely, -included in eg, a comment post via a template. Possibly included in a -recentchanges page item via that template too? +included in eg, a comment post via a template. + +An optional second parameter can be included, containing additional +options to pass in the +[gravatar url](http://en.gravatar.com/site/implement/url). +For example, this asks for a smaller gravatar, and if a user does +not have a gravatar, uses a cute auto-generated "wavatar" avatar. + + \[[!gravatar user@example.com "size=40&default=wavatar"]] + +The `gravitar_options` setting in the setup file can be used to +specify additional options to pass. So for example if you want +to use wavatars everywhere, set it to "default=wavatar". The avatars are provided by various sites. For email addresses, it uses a [gravatar](http://gravatar.com/). For a wiki username, the user's email address is looked up and the gravatar for that user is displayed. (Of course, the user has to have filled in their email address -on their Preferences page for that to work.) +on their Preferences page for that to work. Also, when the user changes +their email address in Preferences, the gravatar won't change until the +wiki is rebuilt.) For openid, openavatar sucked and is now dead. So we need to use an email address instead, I guess. Problem is that the email address of a given openid is only known when that user is logged in and making a change. And we don't want to leak an openid user's email into a page either. Hmm. Suppose the gravatar hash could be calculated from the email address -and embedded instead of the openid? +and embedded instead of the openid? That would work for comments, +but not if the directive were used elsewhere. -Or, for openid, could use <http://paulisageek.com/openidavatar>. +Or, for openid, could use <http://paulisageek.com/openidavatar>. Which +works fine, but users are not likely to figure out what they need to do to +get an avatar associated with their openid. -An optional second parameter can be included, containing additional -options to pass in the -[gravatar url](http://en.gravatar.com/site/implement/url). -For example, this asks for a smaller gravatar, and if a user does -not have a gravatar, uses a cute auto-generated "wavatar" avatar. +--- - \[[!gravatar user@example.com "size=40&default=wavatar"]] +Alternative, not overdesigned approach: -The `gravitar_options` setting in the setup file can be used to -specify additional options to pass. So for example if you want -to use wavatars everywhere, set it to "default=wavatar". +Modify comments plugin to have an option to display avatars. + +When posting a comment, fill in the avatarhash field in the template. +The hash is calculated from the user's email address. If the user's email +is not known, skip it. + +End. :P -- cgit v1.2.3 From 7bca48f5ce8233cada3a4d87a4c93c1fed8aae80 Mon Sep 17 00:00:00 2001 From: "https://launchpad.net/~ojwb" <https://launchpad.net/~ojwb@web> Date: Sun, 14 Mar 2010 04:56:13 +0000 Subject: --- doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn b/doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn index 9eac8eae5..189ba740f 100644 --- a/doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn +++ b/doc/bugs/Exception:_Unknown_function___96__this__39___.mdwn @@ -57,4 +57,14 @@ What might be causing this exception and how I might go about debugging exceptio >>>>>>> misunderstanding. I've put in a complete fix for this problem. >>>>>>> if this was in [[bugs]], I'd close it. :) --[[Joey]] +>>>>>>>> Rather than escaping `$` as an HTML entity, it would be more natural +>>>>>>>> to escape it as `$$` (since you are escaping it for Omega, not for +>>>>>>>> the web browser. +>>>>>>>> +>>>>>>>> Also if ikiwiki can put arbitrary text inside the parameters of an +>>>>>>>> OmegaScript command, you should also escape `{`, `}` and `,` as +>>>>>>>> `$(`, `$)` and `$.`. It's only necessary to do so inside the +>>>>>>>> parameters of a command, but it will work and be easier to escape +>>>>>>>> them in any substituted text. --OllyBetts + [[done]] -- cgit v1.2.3 From 7c5bfbe2b614b1cadc13fcab2a427abc711579b0 Mon Sep 17 00:00:00 2001 From: "http://pmate.myopenid.com/" <http://pmate.myopenid.com/@web> Date: Sun, 14 Mar 2010 12:19:34 +0000 Subject: --- doc/sandbox/prova_blog.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/sandbox/prova_blog.html (limited to 'doc') diff --git a/doc/sandbox/prova_blog.html b/doc/sandbox/prova_blog.html new file mode 100644 index 000000000..d69937ea8 --- /dev/null +++ b/doc/sandbox/prova_blog.html @@ -0,0 +1,8 @@ +Questa è una prova. +Vediamo se funziona + +<pre> +#!/bin/bash + +echo "ciao" +</pre> -- cgit v1.2.3 From 823ec815d4fc9625d6fa3553ad03e9f2ff737659 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 14 Mar 2010 14:58:13 -0400 Subject: Add a include setting, which can be used to make ikiwiki process wiki source files, such as .htaccess, that would normally be skipped for security or other reasons. Closes: #447267 (Thanks to Aaron Wilson for the original patch.) --- IkiWiki.pm | 13 +++++++++++++ debian/changelog | 4 ++++ doc/tips/htaccess_file.mdwn | 30 ++++++++++++++++++++++++++++++ doc/todo/enable-htaccess-files.mdwn | 5 +++++ doc/usage.mdwn | 6 ++++++ ikiwiki.in | 3 +++ 6 files changed, 61 insertions(+) create mode 100644 doc/tips/htaccess_file.mdwn (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 251ed8cc8..ee94ce659 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -334,6 +334,15 @@ sub getsetup () { safe => 0, # paranoia rebuild => 0, }, + include => { + type => "string", + default => undef, + example => '^\.htaccess$', + description => "regexp of normally ignored source files to include", + advanced => 1, + safe => 0, # regexp + rebuild => 1, + }, exclude => { type => "string", default => undef, @@ -1820,6 +1829,10 @@ sub file_pruned ($;$) { $file =~ s#^\Q$base\E/+##; } + if (defined $config{include} && length $config{include}) { + return 0 if $file =~ m/$config{include}/; + } + my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')'; return $file =~ m/$regexp/; } diff --git a/debian/changelog b/debian/changelog index 92afe661f..e5347e2a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ ikiwiki (3.20100313) UNRELEASED; urgency=low as used by yahoo and google urls. * Add complete German basewiki and directives translation done by Sebastian Kuhnert. + * Add a include setting, which can be used to make ikiwiki process + wiki source files, such as .htaccess, that would normally be skipped + for security or other reasons. Closes: #447267 + (Thanks to Aaron Wilson for the original patch.) -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn new file mode 100644 index 000000000..5266eba41 --- /dev/null +++ b/doc/tips/htaccess_file.mdwn @@ -0,0 +1,30 @@ +If you try to include a `.htaccess` file in your wiki's source, in order to +configure the web server, you'll find that ikiwiki excludes it from +processing. In fact, ikiwiki excludes any file starting with a dot, as well +as a lot of other files, for good security reasons. + +You can tell ikiwiki not to exclude the .htaccess file by adding this to +your setup file: + + include => '^\.htaccess$', + +Caution! Before you do that, please think for a minute about who can edit +your wiki. Are attachment uploads enabled? Can users commit changes +directly to the version control system? Do you trust everyone who can +make a change to not do Bad Things with the htaccess file? Do you trust +everyone who *might* be able to make a change in the future? Note that a +determined attacker who can write to the htaccess file can probably get a +shell on your web server. + +If any of these questions have given you pause, I suggest you find a +different way to configure the web server. One way is to not put the +`.htaccess` file under ikiwiki's control, and just manually install it +in the destdir. + +[Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) +says +> In general, you should never use .htaccess files unless you don't have +> access to the main server configuration file. +This is good advice -- if you can edit apache's main configuration files, +then you should not use a htaccess file. +--[[Joey]] diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn index 412cb5eba..c895db75d 100644 --- a/doc/todo/enable-htaccess-files.mdwn +++ b/doc/todo/enable-htaccess-files.mdwn @@ -61,3 +61,8 @@ It should be off by default of course. --Max +1 for various purposes (but sometimes the filename isn't `.htaccess`, so please make it configurable) --[[schmonz]] > I've described a workaround for one use case at the [[plugins/rsync]] [[plugins/rsync/discussion]] page. --[[schmonz]] + +--- + +[[done]], you can use the `include` setting to override the default +excludes now. Please use extreme caution when doing so. --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index a105d7e59..f735170f0 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -234,6 +234,12 @@ also be configured using a setup file. Specifies a rexexp of source files to exclude from processing. May be specified multiple times to add to exclude list. +* --include regexp + + Specifies a rexexp of source files, that would normally be excluded, + but that you wish to include in processing. + May be specified multiple times to add to include list. + * --adminuser name Specifies a username of a user (or, if openid is enabled, an openid) diff --git a/ikiwiki.in b/ikiwiki.in index ae1251ff6..da5555629 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -65,6 +65,9 @@ sub getconfig () { "exclude=s@" => sub { push @{$config{wiki_file_prune_regexps}}, $_[1]; }, + "include=s@" => sub { + $config{include}=defined $config{include} && length $config{include} ? "$config{include}|$_[1]" : $_[1]; + }, "adminuser=s@" => sub { push @{$config{adminuser}}, $_[1] }, -- cgit v1.2.3 From a5ee40104481ba06eaaf277ed2f6c363dd326608 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 14 Mar 2010 15:08:41 -0400 Subject: note that the patch on this page is complely broken, and allows any file starting with a dot to be included If you applied that patch to your site, you should remove it right away! --- doc/todo/enable-htaccess-files.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn index c895db75d..c08502bdd 100644 --- a/doc/todo/enable-htaccess-files.mdwn +++ b/doc/todo/enable-htaccess-files.mdwn @@ -12,6 +12,13 @@ qr/(^|\/).svn\//, qr/.arch-ids\//, qr/{arch}\//], wiki_link_regexp => qr/\[\[(?:([^\]\|]+)\|)?([^\s\]#]+)(?:#([^\s\]]+))?\]\]/, +> Note that the above patch is **completely broken**. +> It removes the crucial excludes of all files starting with a dot. +> The negative regexps for htaccess have no effect, so the whole +> thing only "works" because it allows *any* file starting with a dot. +> If you applied this patch to your ikiwiki, you opened a huge security +> hole. --[[Joey]] + [[!tag patch patch/core]] This lets the site administrator have a `.htaccess` file in their underlay -- cgit v1.2.3 From 223b8efab0a55075bd53d03fe3cb2df07f13d9c1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 14 Mar 2010 15:12:59 -0400 Subject: update --- doc/todo/enable-htaccess-files.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn index c08502bdd..3b9721d50 100644 --- a/doc/todo/enable-htaccess-files.mdwn +++ b/doc/todo/enable-htaccess-files.mdwn @@ -64,6 +64,11 @@ It should be off by default of course. --Max --- +1 I want `.htaccess` so I can rewrite some old Wordpress URLs to make feeds work again. --[[hendry]] +> Unless you cannot modify apache's configuration, you do not need htaccess +> to do that. Apache's documentation recommends against using htaccess +> unless you're a user who cannot modify the main server configuration. +> --[[Joey]] + --- +1 for various purposes (but sometimes the filename isn't `.htaccess`, so please make it configurable) --[[schmonz]] -- cgit v1.2.3 From ceadd862930411fed21eab16c428227fdcdc10ba Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 14 Mar 2010 15:26:24 -0400 Subject: update --- doc/tips/htaccess_file.mdwn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn index 5266eba41..7b4b0901a 100644 --- a/doc/tips/htaccess_file.mdwn +++ b/doc/tips/htaccess_file.mdwn @@ -22,9 +22,7 @@ different way to configure the web server. One way is to not put the in the destdir. [Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) -says +says: > In general, you should never use .htaccess files unless you don't have > access to the main server configuration file. -This is good advice -- if you can edit apache's main configuration files, -then you should not use a htaccess file. --[[Joey]] -- cgit v1.2.3 From d958e96b01ca459055b2c34f140f7c6ec7168f92 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 14 Mar 2010 15:28:50 -0400 Subject: update --- doc/tips/htaccess_file.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn index 7b4b0901a..0c1b0f2f7 100644 --- a/doc/tips/htaccess_file.mdwn +++ b/doc/tips/htaccess_file.mdwn @@ -19,10 +19,9 @@ shell on your web server. If any of these questions have given you pause, I suggest you find a different way to configure the web server. One way is to not put the `.htaccess` file under ikiwiki's control, and just manually install it -in the destdir. +in the destdir. --[[Joey]] [Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) says: > In general, you should never use .htaccess files unless you don't have > access to the main server configuration file. ---[[Joey]] -- cgit v1.2.3 From aa36cd66baeca85ca4bca1c35c43b7a01c8a5cf7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 14 Mar 2010 15:30:18 -0400 Subject: update --- doc/tips/htaccess_file.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn index 0c1b0f2f7..6964cf24e 100644 --- a/doc/tips/htaccess_file.mdwn +++ b/doc/tips/htaccess_file.mdwn @@ -21,7 +21,7 @@ different way to configure the web server. One way is to not put the `.htaccess` file under ikiwiki's control, and just manually install it in the destdir. --[[Joey]] -[Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) +[Apache's documentation](http://httpd.apache.org/docs/2.2/howto/htaccess.html) says: > In general, you should never use .htaccess files unless you don't have > access to the main server configuration file. -- cgit v1.2.3 From 4cff2b62332fc4e62ae64937567f84658055bce3 Mon Sep 17 00:00:00 2001 From: tschwinge <tschwinge@web> Date: Mon, 15 Mar 2010 08:55:37 +0000 Subject: No more Discussion Pages of Discussion Pages of... --- doc/users/tschwinge.mdwn | 6 ------ 1 file changed, 6 deletions(-) (limited to 'doc') diff --git a/doc/users/tschwinge.mdwn b/doc/users/tschwinge.mdwn index 20d8d16a8..414612aff 100644 --- a/doc/users/tschwinge.mdwn +++ b/doc/users/tschwinge.mdwn @@ -99,12 +99,6 @@ page that uses \[[!meta redir]]. ## [[bugs/Broken Parentlinks]] -## Discussion Pages of Discussion Pages of... - -Is it useful to have Discussion pages of Discussion pages (etc.)? -- On -<http://www.gnu.org/software/hurd/hurd/building/cross-compiling/discussion.html>, -this possibility is offered. - ## Modifying [[plugins/inline]] for showing only an *appetizer* Currently ikiwiki's inline plugin will either show the full page or nothing of -- cgit v1.2.3 From c4e46dfeba11aee2feec7475970cfdb7591c1943 Mon Sep 17 00:00:00 2001 From: moy <moy@web> Date: Tue, 16 Mar 2010 08:57:27 +0000 Subject: Removed pop --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 1a1b128e6..aef928d8e 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -77,4 +77,4 @@ bar Hmm, can I dig it? Test -pop + -- cgit v1.2.3 From 0f433ed01c58978ba6d7845d5aaebb1ec8cefc9e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 17 Mar 2010 00:42:38 +0000 Subject: link to highlight --- doc/plugins/contrib/highlightcode.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/highlightcode.mdwn b/doc/plugins/contrib/highlightcode.mdwn index 8abb76583..f1df204bb 100644 --- a/doc/plugins/contrib/highlightcode.mdwn +++ b/doc/plugins/contrib/highlightcode.mdwn @@ -1,6 +1,8 @@ [[!template id=plugin name=highlightcode author="[[sabr]]"]] [[!tag type/format]] +(An alternative to this plugin, [[plugins/highlight]], is now provided with IkiWiki. --[[smcv]]) + A small plugin to allow Ikiwiki to display source files complete with syntax highlighting. Files with recognized extensions (i.e. my-file.cpp) are be rendered just like any other Ikiwiki page. You can even edit your source files with Ikiwiki's editor. It uses the Syntax::Highlight::Engine::Kate Perl module to do the highlighting. -- cgit v1.2.3 From 4054f8d8ce0802b43e1c2c6f9cb71badbbcaf919 Mon Sep 17 00:00:00 2001 From: kierun <kierun@web> Date: Wed, 17 Mar 2010 09:14:46 +0000 Subject: --- doc/todo/ACL.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/ACL.mdwn b/doc/todo/ACL.mdwn index d40701d60..57979385d 100644 --- a/doc/todo/ACL.mdwn +++ b/doc/todo/ACL.mdwn @@ -76,3 +76,12 @@ Any idea when this is going to be finished? If you want, I am happy to beta tes > Example of use to only allow two users to edit the tipjar page: > locked_pages => 'tipjar and !(user(joey) or user(bob))', > --[[Joey]] + +> > Thank you for the hint but I am being still confused (read: dense)... What I am trying to do is this: + +> > * No anonymous access. +> > * Logged in users can edit and create pages. +> > * Users can set who can edit their pages. +> > * Some pages are only viewable by admins. + +> > Is it possible? If so how?... -- cgit v1.2.3 From a78212be3364887b5ff9f9902cfb65eb211b269b Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Thu, 18 Mar 2010 07:21:09 +0000 Subject: --- .../post-update_hook_can__39__t_be_compiled_with_tcc.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn (limited to 'doc') diff --git a/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn b/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn new file mode 100644 index 000000000..1594036dc --- /dev/null +++ b/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn @@ -0,0 +1,14 @@ +Thinking that any c compiler would do the job, I tried to use tcc with ikiwiki, as explicitely allowed by the Debian package dependencies. + +I installed `tcc` and `libc6-dev` (for `libcrt1`). The wrapper compilation was OK, but the wrapper fails to run correctly and dies with + + usage: ikiwiki [options] source dest + ikiwiki --setup configfile + +Everything works fine with gcc. + +versions: Debian etch+backports + + + + -- cgit v1.2.3 From 7b7d1cfcb75451bf9f8fc7efb3814c47deef0059 Mon Sep 17 00:00:00 2001 From: nil <nil@web> Date: Thu, 18 Mar 2010 07:56:15 +0000 Subject: distro confusion --- doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn b/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn index 1594036dc..4226c026a 100644 --- a/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn +++ b/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn @@ -7,7 +7,7 @@ I installed `tcc` and `libc6-dev` (for `libcrt1`). The wrapper compilation was O Everything works fine with gcc. -versions: Debian etch+backports +versions: Debian lenny + backports -- cgit v1.2.3 From 73c2551dd482b29e65b697376708a25ad8e85fbb Mon Sep 17 00:00:00 2001 From: p4f <p4f@web> Date: Thu, 18 Mar 2010 12:03:34 +0000 Subject: --- doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn (limited to 'doc') diff --git a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn new file mode 100644 index 000000000..9f3f0cddd --- /dev/null +++ b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn @@ -0,0 +1,9 @@ +Hi all! +I really like ikiwiki and i tested it on my local machine but i have one question that i can't answer reading documentation (my fault of course)... +I have an account and some space on a free hosting service. +Now, i want to put my ikiwiki on this remote web space so that i can browse it from wherever i want. +I have my source dir and my git dir on my local machine. +How can i upload my ikiwiki on the remote host and manage it via git as i can do when i test it locally? +Where is specified? Where can i find documentation about it? + +Thanks in advance! -- cgit v1.2.3 From a02a06cb9dc0a82dd4028c9f4b506dcf899c9a41 Mon Sep 17 00:00:00 2001 From: p4f <p4f@web> Date: Thu, 18 Mar 2010 12:05:33 +0000 Subject: --- doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn index 9f3f0cddd..862694d4b 100644 --- a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn +++ b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn @@ -6,4 +6,6 @@ I have my source dir and my git dir on my local machine. How can i upload my ikiwiki on the remote host and manage it via git as i can do when i test it locally? Where is specified? Where can i find documentation about it? -Thanks in advance! +Thanks in advance! + +Pab -- cgit v1.2.3 From ea07442e7ac6ef80cd98625b32f66bafc6af26b5 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Thu, 18 Mar 2010 15:21:38 +0000 Subject: comment --- doc/todo/ACL.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/ACL.mdwn b/doc/todo/ACL.mdwn index 57979385d..c1f5d86f0 100644 --- a/doc/todo/ACL.mdwn +++ b/doc/todo/ACL.mdwn @@ -21,6 +21,11 @@ something, that I think is very valuable. >>>> Which would rule out openid, or other fun forms of auth. And routing all access >>>> through the CGI sort of defeats the purpose of ikiwiki. --[[Ethan]] +>>>>> I think what Joey is suggesting is to use apache ACLs in conjunction +>>>>> with basic HTTP auth to control read access, and ikiwiki can use the +>>>>> information via the httpauth plugin for other ACLs (write, admin). But +>>>>> yes, that would rule out non-httpauth mechanisms. -- [[Jon]] + Also see [[!debbug 443346]]. > Just a few quick thoughts about this: -- cgit v1.2.3 From 760c315589dc0e3fa0ba5380113f4e86a989a7d9 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Thu, 18 Mar 2010 15:23:18 +0000 Subject: comment --- doc/todo/ACL.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/ACL.mdwn b/doc/todo/ACL.mdwn index c1f5d86f0..cac6c9f18 100644 --- a/doc/todo/ACL.mdwn +++ b/doc/todo/ACL.mdwn @@ -90,3 +90,6 @@ Any idea when this is going to be finished? If you want, I am happy to beta tes > > * Some pages are only viewable by admins. > > Is it possible? If so how?... + +>>> I don't believe this is currently possible. What is missing is the concept +>>> of page 'ownership'. -- [[Jon]] -- cgit v1.2.3 From fed7383903c402d68ff2fc2d3734c55b35d520a4 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 18 Mar 2010 13:37:35 -0400 Subject: update --- doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn index 862694d4b..0b370473e 100644 --- a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn +++ b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn @@ -9,3 +9,18 @@ Where is specified? Where can i find documentation about it? Thanks in advance! Pab + +> There are several ways to accomplish this, depending on what you really +> want to do. +> +> If your goal is to continue generating the site locally, but then +> transfer it to the remote host for serving, you could use the +> [[plugins/rsync]] plugin. +> +> If your goal is to install and run the ikiwiki software on the remote host, +> then you would follow a similar path to the ones described in these tips: +> [[tips/nearlyfreespeech]] [[tips/DreamHost]]. Or even [[install]] ikiwiki +> from a regular package if you have that kind of access. Then you could +> push changes from your local git to git on the remote host to update the +> wiki. [[tips/Laptop_wiki_with_git]] explains one way to do that. +> --[[Joey]] -- cgit v1.2.3 From dddd6aa99055d8505f73e39b12f049633d9cb4c3 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 18 Mar 2010 17:44:46 -0400 Subject: Allow wrappers to be built using tcc. --- IkiWiki/Wrapper.pm | 10 +++++++--- debian/changelog | 1 + .../post-update_hook_can__39__t_be_compiled_with_tcc.mdwn | 11 ++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 830b04877..f175b4a0b 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -101,7 +101,6 @@ EOF #include <string.h> #include <sys/file.h> -extern char **environ; char *newenviron[$#envsave+6]; int i=0; @@ -121,8 +120,13 @@ $check_commit_hook $envsave newenviron[i++]="HOME=$ENV{HOME}"; newenviron[i++]="WRAPPED_OPTIONS=$configstring"; - newenviron[i]=NULL; - environ=newenviron; + + if (clearenv() != 0) { + perror("clearenv"); + exit(1); + } + for (; i>0; i--) + putenv(newenviron[i-1]); if (setregid(getegid(), -1) != 0 && setregid(getegid(), -1) != 0) { diff --git a/debian/changelog b/debian/changelog index e5347e2a1..73f6fcff8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ ikiwiki (3.20100313) UNRELEASED; urgency=low wiki source files, such as .htaccess, that would normally be skipped for security or other reasons. Closes: #447267 (Thanks to Aaron Wilson for the original patch.) + * Allow wrappers to be built using tcc. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn b/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn index 4226c026a..a8fb19888 100644 --- a/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn +++ b/doc/bugs/post-update_hook_can__39__t_be_compiled_with_tcc.mdwn @@ -9,6 +9,11 @@ Everything works fine with gcc. versions: Debian lenny + backports - - - +> Seems that tcc does not respect changing where `environ` points as a way +> to change the environment seen after `exec` +> +> Given that the man page for `clearenv` suggests using `environ=NULL` +> if `clearenv` is not available, I would be lerry or using tcc to compile +> stuff, since that could easily lead to a security compromise of code that +> expects that to work. However, I have fixed ikiwiki to use `clearenv`. +> --[[Joey]] [[done]] -- cgit v1.2.3 From 9a6a28512025c91b7518d8c9b69678e124c44128 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 18 Mar 2010 22:33:18 +0000 Subject: corrected the update-the-laptop-from-the-server section --- doc/tips/laptop_wiki_with_git.mdwn | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 85e26c729..857083325 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -68,5 +68,12 @@ used by the ikiwiki CGI, and another which you can use for updating via git). When you want to update the server from the laptop, do a `git push` from -within the laptop's bare repository, and likewise do a `git pull` to update -the laptop from the server. +within the laptop's bare repository. + +To update the laptop from the server, add a section for the laptop to the config file of the server's bare repository: + + [remote "laptop"] + fetch = +refs/*:refs/* + url = me@laptop:/path/to/bare/repository + +Then do a `git push laptop` from within the server's bare repository. -- cgit v1.2.3 From deb3cd8c490f1a6b615366beaa1b5d736f825c59 Mon Sep 17 00:00:00 2001 From: haho <haho@web> Date: Thu, 18 Mar 2010 23:39:42 +0000 Subject: --- doc/sandbox.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index aef928d8e..8a6780741 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -77,4 +77,5 @@ bar Hmm, can I dig it? Test +test2 -- cgit v1.2.3 From fe86a91ffe4e26d59e1e64ae8a00285d1bf09d4a Mon Sep 17 00:00:00 2001 From: haho <haho@web> Date: Thu, 18 Mar 2010 23:43:04 +0000 Subject: --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 8a6780741..8cba8973f 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -3,7 +3,7 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!v # Header -## Subheader +## Subheader2 > This is a blockquote. > -- cgit v1.2.3 From 4f4e09f925344940876c2e62de1e89e55ea1650e Mon Sep 17 00:00:00 2001 From: p4f <p4f@web> Date: Fri, 19 Mar 2010 00:56:27 +0000 Subject: --- doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn index 0b370473e..036fe0d44 100644 --- a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn +++ b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn @@ -24,3 +24,9 @@ Pab > push changes from your local git to git on the remote host to update the > wiki. [[tips/Laptop_wiki_with_git]] explains one way to do that. > --[[Joey]] + +Thanks a lot for your answer. +rsync plugin would be perfect but... how would i manage blog post? +I mean... is it possible to manage ikiwiki blog too with rsync plugin in the way you told me? + +Pab -- cgit v1.2.3 From f54b5f583dfcb1f908b33d1687782ce8a2bfb30d Mon Sep 17 00:00:00 2001 From: p4f <p4f@web> Date: Fri, 19 Mar 2010 00:57:03 +0000 Subject: --- doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn index 036fe0d44..5dcd01619 100644 --- a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn +++ b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn @@ -27,6 +27,4 @@ Pab Thanks a lot for your answer. rsync plugin would be perfect but... how would i manage blog post? -I mean... is it possible to manage ikiwiki blog too with rsync plugin in the way you told me? - -Pab +I mean... is it possible to manage ikiwiki blog too with rsync plugin in the way you told me? --Pab -- cgit v1.2.3 From 2c310f8349182ca155a8cad1d8454f9937e87527 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 19 Mar 2010 01:09:44 +0000 Subject: comment about comments --- doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn index 5dcd01619..473b06b39 100644 --- a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn +++ b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn @@ -28,3 +28,5 @@ Pab Thanks a lot for your answer. rsync plugin would be perfect but... how would i manage blog post? I mean... is it possible to manage ikiwiki blog too with rsync plugin in the way you told me? --Pab + +> If you want to allow people to make comments on your blog, no, the rsync plugin will not help, since it will upload a completely static site where nobody can make comments. Comments require a full IkiWiki setup with CGI enabled, so that people add content (comments) from the web. --[[KathrynAndersen]] -- cgit v1.2.3 From eef4768d2d277925b42de8efda576b00cf64bee8 Mon Sep 17 00:00:00 2001 From: p4f <p4f@web> Date: Fri, 19 Mar 2010 07:57:40 +0000 Subject: --- doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn index 473b06b39..1c0f8f561 100644 --- a/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn +++ b/doc/forum/how_to_setup_ikiwiki_on_a_remote_host.mdwn @@ -30,3 +30,6 @@ rsync plugin would be perfect but... how would i manage blog post? I mean... is it possible to manage ikiwiki blog too with rsync plugin in the way you told me? --Pab > If you want to allow people to make comments on your blog, no, the rsync plugin will not help, since it will upload a completely static site where nobody can make comments. Comments require a full IkiWiki setup with CGI enabled, so that people add content (comments) from the web. --[[KathrynAndersen]] + +Ok, i understand, thanks. +Is there any hosting service that permits to have a full installation of iwkiwiki or i am forced to get a vps or to mantain a personal server for that? --Pab -- cgit v1.2.3 From 96a54b35fe2cdcdc1450b5d38c80e7b27b428c14 Mon Sep 17 00:00:00 2001 From: kierun <kierun@web> Date: Fri, 19 Mar 2010 15:45:26 +0000 Subject: --- doc/todo/ACL.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/ACL.mdwn b/doc/todo/ACL.mdwn index cac6c9f18..dd9793233 100644 --- a/doc/todo/ACL.mdwn +++ b/doc/todo/ACL.mdwn @@ -93,3 +93,6 @@ Any idea when this is going to be finished? If you want, I am happy to beta tes >>> I don't believe this is currently possible. What is missing is the concept >>> of page 'ownership'. -- [[Jon]] + +>>>> GAH! That is really a shame... Any chance of adding that? No, I do not really expect it to be added, after all my requirements are pushing the boundary of what a wikiwiki + should be. Nonetheless, thanks for your help! -- cgit v1.2.3 From af83b4c5f576633c03c157a67994af6bfaff617a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 19 Mar 2010 13:40:02 -0400 Subject: Revert "corrected the update-the-laptop-from-the-server section" No, we don't normally push from servers to laptops. Because most laptops do not have publicly accessible IP addresses, for one thing. Also because there's really no reason to ssh to the server from your laptop in order to update the laptop when you can just pull. --- doc/tips/laptop_wiki_with_git.mdwn | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 857083325..85e26c729 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -68,12 +68,5 @@ used by the ikiwiki CGI, and another which you can use for updating via git). When you want to update the server from the laptop, do a `git push` from -within the laptop's bare repository. - -To update the laptop from the server, add a section for the laptop to the config file of the server's bare repository: - - [remote "laptop"] - fetch = +refs/*:refs/* - url = me@laptop:/path/to/bare/repository - -Then do a `git push laptop` from within the server's bare repository. +within the laptop's bare repository, and likewise do a `git pull` to update +the laptop from the server. -- cgit v1.2.3 From 6dc6fe2f9bc6bcd532291c703a637d24dfe58956 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 19 Mar 2010 13:45:43 -0400 Subject: fix apparently confusing wording --- doc/tips/laptop_wiki_with_git.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/tips/laptop_wiki_with_git.mdwn b/doc/tips/laptop_wiki_with_git.mdwn index 85e26c729..cfa565d1a 100644 --- a/doc/tips/laptop_wiki_with_git.mdwn +++ b/doc/tips/laptop_wiki_with_git.mdwn @@ -67,6 +67,5 @@ as many times as you want (thus being able to have a repository which is used by the ikiwiki CGI, and another which you can use for updating via git). -When you want to update the server from the laptop, do a `git push` from -within the laptop's bare repository, and likewise do a `git pull` to update -the laptop from the server. +Use standard git commands, run in the laptop's bare git repository +to handle pulling from and pushing to the server. -- cgit v1.2.3 From 9fb3409613d32e447ababb99bc963867b80340e9 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 19 Mar 2010 17:58:40 -0400 Subject: new tip --- doc/tips/yaml_setup_files.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/tips/yaml_setup_files.mdwn (limited to 'doc') diff --git a/doc/tips/yaml_setup_files.mdwn b/doc/tips/yaml_setup_files.mdwn new file mode 100644 index 000000000..4ae0de4aa --- /dev/null +++ b/doc/tips/yaml_setup_files.mdwn @@ -0,0 +1,10 @@ +Here's how to convert your existing standard format ikiwiki setup file into +the new YAML format recently added to ikiwiki. + +1. First, make sure you have the [[!cpan YAML]] perl module installed. + (Run: `apt-get install libyaml-perl`) +2. Run: `ikiwiki -setup my.setup -dumpsetup my.setup --set setuptype=Yaml` + +The format of the YAML setup file should be fairly self-explanatory. + +--[[Joey]] -- cgit v1.2.3 From cc9621a6811dde5e1d28eb152133bcd448a125d8 Mon Sep 17 00:00:00 2001 From: "http://jcftang.myopenid.com/" <http://jcftang.myopenid.com/@web> Date: Mon, 22 Mar 2010 20:57:27 +0000 Subject: sadly we moved to using drupal for most of our site --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 8e567ec0d..b40fd461d 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -40,7 +40,6 @@ Projects & Organizations * [Chaos Computer Club Düsseldorf](https://www.chaosdorf.de) * [monkeysphere](http://web.monkeysphere.info/) * [The Walden Effect](http://www.waldeneffect.org/) -* The support pages for [Trinity Centre for High Performance Computing](http://www.tchpc.tcd.ie/support/) * [St Hugh of Lincoln Catholic Primary School in Surrey](http://www.sthugh-of-lincoln.surrey.sch.uk/) * [Cosin Homepage](http://cosin.ch) uses an Ikiwiki with a subversion repository. * [Bosco Free Orienteering Software](http://bosco.durcheinandertal.ch) -- cgit v1.2.3 From e74a85c671cf9fe1e445ad183d66e059beaec2f9 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 22 Mar 2010 23:01:00 +0000 Subject: rename forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn to forum/utf8_warnings_for___34____92__xAB__34__.mdwn --- ...__44_____60____36__in__62___chunk_1.__39__.mdwn | 47 ---------------------- .../utf8_warnings_for___34____92__xAB__34__.mdwn | 47 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 47 deletions(-) delete mode 100644 doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn create mode 100644 doc/forum/utf8_warnings_for___34____92__xAB__34__.mdwn (limited to 'doc') diff --git a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn b/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn deleted file mode 100644 index 72f2d38e0..000000000 --- a/doc/forum/Warnings:___39__utf8___34____92__xAB__34___does_not_map_to_Unicode_at___47__usr__47__share__47__perl5__47__IkiWiki.pm_line_774__44_____60____36__in__62___chunk_1.__39__.mdwn +++ /dev/null @@ -1,47 +0,0 @@ -# getting Warnings about UTF8-Chars. - -I'm getting multiple warnings: - - utf8 "\xAB" does not map to Unicode at /usr/share/perl5/IkiWiki.pm line 774, <$in> chunk 1. - - -I'm assuming this is once per File, but even in verbose mode, it doesn't tell me which file is a problem. -It first reads all the files, and afterwards when parsing/compiling them, it outputs the warning, so I can't -deduce the offending files. - -Is there a way to have ikiwiki output the position, where it encounters the character? - -Probably all this has to do with locale-settings, and usage of mixed locales in a distributed setup ... -I'd rather cleanup some of the file(name)s of unexpected characters. --[[jwalzer]] - --------- - -**Update** : So I took the chance to insert debug into ikiwiki.pm: - - root@novalis:/usr/share/perl5# diff -p /tmp/IkiWiki.orig.pm IkiWiki.pm - *** /tmp/IkiWiki.orig.pm Sun Feb 14 15:16:08 2010 - --- IkiWiki.pm Sun Feb 14 15:16:28 2010 - *************** sub readfile ($;$$) { - *** 768,773 **** - --- 768,774 ---- - } - - local $/=undef; - + debug("opening File: $file:"); - open (my $in, "<", $file) || error("failed to read $file: $!"); - binmode($in) if ($binary); - return \*$in if $wantfd; - - -But what I see now is not quite helpful, as it seems, STDERR and DEBUG are asyncronous, so they mix up in a way, that I can't really see, whats the problem ... Maybe I'm better off for troubleshooting, to insert an printf to strerr to have it in the same stream.. --[[jwalzer]] - - ----- - -**Update:** The "print STDERR $file;"-Trick did it .. I was able to find a mdwn-file, that (was generated by a script of me) had \0xAB in it. - -Nevertheless I still wonder if this should be a problem. This character happend to be in an *\[\[meta title='$CHAR'\]\]-tag* and an *\[$CHAR\]http://foo)-Link* - -Should this throw an warning? Maybe this warning could be catched an reported inclusively the containing filename? maybe even with an override, if one knows that it is correct that way? --[[jwalzer]] - -[[!tag solved]] diff --git a/doc/forum/utf8_warnings_for___34____92__xAB__34__.mdwn b/doc/forum/utf8_warnings_for___34____92__xAB__34__.mdwn new file mode 100644 index 000000000..72f2d38e0 --- /dev/null +++ b/doc/forum/utf8_warnings_for___34____92__xAB__34__.mdwn @@ -0,0 +1,47 @@ +# getting Warnings about UTF8-Chars. + +I'm getting multiple warnings: + + utf8 "\xAB" does not map to Unicode at /usr/share/perl5/IkiWiki.pm line 774, <$in> chunk 1. + + +I'm assuming this is once per File, but even in verbose mode, it doesn't tell me which file is a problem. +It first reads all the files, and afterwards when parsing/compiling them, it outputs the warning, so I can't +deduce the offending files. + +Is there a way to have ikiwiki output the position, where it encounters the character? + +Probably all this has to do with locale-settings, and usage of mixed locales in a distributed setup ... +I'd rather cleanup some of the file(name)s of unexpected characters. --[[jwalzer]] + +-------- + +**Update** : So I took the chance to insert debug into ikiwiki.pm: + + root@novalis:/usr/share/perl5# diff -p /tmp/IkiWiki.orig.pm IkiWiki.pm + *** /tmp/IkiWiki.orig.pm Sun Feb 14 15:16:08 2010 + --- IkiWiki.pm Sun Feb 14 15:16:28 2010 + *************** sub readfile ($;$$) { + *** 768,773 **** + --- 768,774 ---- + } + + local $/=undef; + + debug("opening File: $file:"); + open (my $in, "<", $file) || error("failed to read $file: $!"); + binmode($in) if ($binary); + return \*$in if $wantfd; + + +But what I see now is not quite helpful, as it seems, STDERR and DEBUG are asyncronous, so they mix up in a way, that I can't really see, whats the problem ... Maybe I'm better off for troubleshooting, to insert an printf to strerr to have it in the same stream.. --[[jwalzer]] + + +---- + +**Update:** The "print STDERR $file;"-Trick did it .. I was able to find a mdwn-file, that (was generated by a script of me) had \0xAB in it. + +Nevertheless I still wonder if this should be a problem. This character happend to be in an *\[\[meta title='$CHAR'\]\]-tag* and an *\[$CHAR\]http://foo)-Link* + +Should this throw an warning? Maybe this warning could be catched an reported inclusively the containing filename? maybe even with an override, if one knows that it is correct that way? --[[jwalzer]] + +[[!tag solved]] -- cgit v1.2.3 From e67a9382f67e745af3be7d367fe7a0d36c1777e6 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Wed, 24 Mar 2010 00:29:10 +0000 Subject: Allow hooks to add sorting functions to pagespec_match_list --- IkiWiki.pm | 6 +++++- doc/ikiwiki/pagespec/sorting.mdwn | 2 ++ doc/plugins/write.mdwn | 15 +++++++++++++++ t/pagespec_match_list.t | 6 +++++- 4 files changed, 27 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 022bfe3bd..1a4dc47dd 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2035,7 +2035,11 @@ sub pagespec_match_list ($$;@) { if (defined $params{sort}) { my $f; - if ($params{sort} eq 'title') { + + if (exists $hooks{sort}{$params{sort}}{call}) { + $f = sub { $hooks{sort}{$params{sort}}{call}($a, $b) }; + } + elsif ($params{sort} eq 'title') { $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; } elsif ($params{sort} eq 'title_natural') { diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 697818a2a..9007c23bf 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -10,4 +10,6 @@ orders can be specified. installed. Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +Plugins can add additional sort orders. + [[!meta robots="noindex, follow"]] diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 96a2aa16d..bfa6617bd 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -588,6 +588,21 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. +### sort + + hook(type => "sort", id => "foo", call => \&sort_by_foo); + +This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides +an existing one. The callback is given two page names as arguments, and +returns negative, zero or positive if the first page should come before, +close to (i.e. undefined order), or after the second page. + +For instance, the built-in `title` sort order could be reimplemented as + + sub sort_by_title { + pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); + } + ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index dd5dcc5b0..b34ee769f 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 88; +use Test::More tests => 89; BEGIN { use_ok("IkiWiki"); } @@ -9,6 +9,8 @@ BEGIN { use_ok("IkiWiki"); } $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); +hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); + %pagesources=( foo => "foo.mdwn", foo2 => "foo2.mdwn", @@ -34,6 +36,8 @@ is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50)], is_deeply([pagespec_match_list("foo", "post/*", sort => "title", filter => sub { $_[0] =~ /3/}) ], ["post/1", "post/2"]); +is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], + ["bar", "foo"]); my $r=eval { pagespec_match_list("foo", "beep") }; ok(eval { pagespec_match_list("foo", "beep") } == 0); ok(! $@, "does not fail with error when unable to match anything"); -- cgit v1.2.3 From 4fd05df4d4cd64905c13ceb4c9d8821f4f26d0bc Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 24 Mar 2010 03:04:16 +0000 Subject: cross-reference --- ...ap_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn index de178d415..d12414d55 100644 --- a/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn +++ b/doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn @@ -16,3 +16,5 @@ The [[ikiwiki/directive/map]] directive sort by pagename. That looks kind of odd >> 2. I cannot get inline to create a list when the htmltidy plugin is switched on. I have a template which is enclosed in an li tag, and i put the ul tag around the inline manually, but htmltidy breaks this. --martin >>>> You might want to check if the [[plugins/contrib/report]] plugin solves your problem. It can sort by title, among other things. --[[KathrynAndersen]] + +>> See also: [[todo/sort_parameter_for_map_plugin_and_directive]] --[[smcv]] -- cgit v1.2.3 From 0618f099dab8bd4f7f47e2695db01eabe49e3316 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Wed, 24 Mar 2010 00:59:01 +0000 Subject: Have the meta plugin add a meta_title sort order --- IkiWiki/Plugin/meta.pm | 15 +++++++++++++++ doc/ikiwiki/pagespec/sorting.mdwn | 7 ++++++- 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 5f046cb2a..bf8159814 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -13,6 +13,7 @@ sub import { hook(type => "needsbuild", id => "meta", call => \&needsbuild); hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); + hook(type => "sort", id => "meta_title", call => \&sort_meta_title); } sub getsetup () { @@ -282,6 +283,20 @@ sub pagetemplate (@) { } } +sub title { + my $title = $pagestate{$_[0]}{meta}{title}; + + if (defined $title) { + return $title; + } + + return pagetitle(IkiWiki::basename($_[0])); +} + +sub sort_meta_title { + return title($_[0]) cmp title($_[1]); +} + sub match { my $field=shift; my $page=shift; diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 9007c23bf..3a9fef9b6 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -9,7 +9,12 @@ orders can be specified. * `title_natural` - Only available if [[!cpan Sort::Naturally]] is installed. Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +[[!if test="enabled(meta)" then=""" +* `meta_title` - Order by the full title set by the `\[[!meta title="foo"]]` + [[ikiwiki/directive]]. +"""]] -Plugins can add additional sort orders. +Plugins can add additional sort orders, so more might be available on this +wiki. [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From b0ae19872d443860aeaab7069255e3a68a520887 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Wed, 24 Mar 2010 03:18:24 +0000 Subject: Add an optional "sort" argument to meta titles, defaulting to the title This allows correct sorting of titles, names, etc., with: [[!meta title="David Bowie" sort="Bowie, David"]] [[!meta title="The Beatles" sort="Beatles, The"]] --- IkiWiki/Plugin/meta.pm | 16 +++++++++++----- doc/ikiwiki/directive/meta.mdwn | 7 +++++++ doc/ikiwiki/pagespec/sorting.mdwn | 7 ++++--- 3 files changed, 22 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index bf8159814..a470041c9 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -90,6 +90,12 @@ sub preprocess (@) { # Metadata collection that needs to happen during the scan pass. if ($key eq 'title') { $pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value); + if (exists $params{sort}) { + $pagestate{$page}{meta}{titlesort}=$params{sort}; + } + else { + $pagestate{$page}{meta}{titlesort}=$value; + } return ""; } elsif ($key eq 'description') { @@ -283,18 +289,18 @@ sub pagetemplate (@) { } } -sub title { - my $title = $pagestate{$_[0]}{meta}{title}; +sub titlesort { + my $key = $pagestate{$_[0]}{meta}{titlesort}; - if (defined $title) { - return $title; + if (defined $key) { + return $key; } return pagetitle(IkiWiki::basename($_[0])); } sub sort_meta_title { - return title($_[0]) cmp title($_[1]); + return titlesort($_[0]) cmp titlesort($_[1]); } sub match { diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index 557441c0b..8d2a5b1ad 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -23,6 +23,13 @@ Supported fields: be set to a true value in the template; this can be used to format things differently in this case. + An optional `sort` parameter will be used preferentially when + [[ikiwiki/pagespec/sorting]] by `meta_title`: + + \[[!meta title="The Beatles" sort="Beatles, The"]] + + \[[!meta title="David Bowie" sort="Bowie, David"]] + * license Specifies a license for the page, for example, "GPL". Can contain diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 3a9fef9b6..61516bec5 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -5,13 +5,14 @@ orders can be specified. * `age` - List pages from the most recently created to the oldest. * `mtime` - List pages with the most recently modified first. -* `title` - Order by title. +* `title` - Order by title (page name). * `title_natural` - Only available if [[!cpan Sort::Naturally]] is installed. Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") [[!if test="enabled(meta)" then=""" -* `meta_title` - Order by the full title set by the `\[[!meta title="foo"]]` - [[ikiwiki/directive]]. +* `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` + or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no + full title was set. """]] Plugins can add additional sort orders, so more might be available on this -- cgit v1.2.3 From 1c7d5eabd7c9e94498af7f89a005311a850d742c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 24 Mar 2010 03:24:15 +0000 Subject: propsed branch --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 doc/todo/allow_plugins_to_add_sorting_methods.mdwn (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn new file mode 100644 index 000000000..3aa1d94a6 --- /dev/null +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -0,0 +1,47 @@ +[[!template id=gitbranch branch=smcv/sort-hooks author="[[Simon_McVittie|smcv]]"]] +[[!tag patch]] + +The available [[ikiwiki/pagespec/sorting]] methods are currently hard-coded in +IkiWiki.pm, making it difficult to add any extra sorting mechanisms. I've +prepared a branch which adds 'sort' as a hook type and uses it to implement a +new `meta_title` sort type. + +Someone could use this hook to make `\[[!inline sort=title]]` prefer the meta +title over the page name, but for compatibility, I'm not going to (I do wonder +whether it would be worth making sort=name an alias for the current sort=title, +and changing the meaning of sort=title in 4.0, though). + +Gitweb: +<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-hooks> + +## Documentation extracted from the branch + +### sort hook (added to [[plugins/write]]) + + hook(type => "sort", id => "foo", call => \&sort_by_foo); + +This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides +an existing one. The callback is given two page names as arguments, and +returns negative, zero or positive if the first page should come before, +close to (i.e. undefined order), or after the second page. + +For instance, the built-in `title` sort order could be reimplemented as + + sub sort_by_title { + pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); + } + +### meta_title sort order (conditionally added to [[ikiwiki/pagespec/sorting]]) + +* `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` + or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no + full title was set. + +### meta title sort parameter (added to [[ikiwiki/directive/meta]]) + +An optional `sort` parameter will be used preferentially when +[[ikiwiki/pagespec/sorting]] by `meta_title`: + + \[[!meta title="The Beatles" sort="Beatles, The"]] + + \[[!meta title="David Bowie" sort="Bowie, David"]] -- cgit v1.2.3 From 7fbddb032ee952c6d0b1ee290568ea4f42ef181f Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 24 Mar 2010 03:27:11 +0000 Subject: link to an alternative approach that I decided against --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 3aa1d94a6..1533b6c44 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -14,6 +14,12 @@ and changing the meaning of sort=title in 4.0, though). Gitweb: <http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-hooks> +I briefly tried to turn *all* the current sort types into hook functions, and +have some of them pre-registered, but decided that probably wasn't a good idea. +That earlier version of the branch is also available for comparison: + +<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-hooks-excessive> + ## Documentation extracted from the branch ### sort hook (added to [[plugins/write]]) -- cgit v1.2.3 From 48c09d44637dd724d084b1d06e2277f11e80d489 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 24 Mar 2010 03:30:06 +0000 Subject: note: old version untested --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 1533b6c44..99f256fbe 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -20,6 +20,11 @@ That earlier version of the branch is also available for comparison: <http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-hooks-excessive> +(The older version is untested, and probably doesn't really work as-is - I +misunderstood the details of how the built-in function `sort` works when using +`$a` and `$b`. The newer version has been tested, and has a regression test for +its core functionality.) + ## Documentation extracted from the branch ### sort hook (added to [[plugins/write]]) -- cgit v1.2.3 From 8108a7f4ba315bf93fd2f5acb233ae9cc6a33393 Mon Sep 17 00:00:00 2001 From: cian <cian@web> Date: Wed, 24 Mar 2010 13:36:59 +0000 Subject: --- doc/sandbox.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 8cba8973f..c323153c8 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,6 +1,6 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). - +[[Testing 1 2 3| test]] # Header ## Subheader2 -- cgit v1.2.3 From 9d4bedf760fbbbdba28986c01c3e429f67386217 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 24 Mar 2010 17:11:17 +0000 Subject: relationship with [[plugins/contrib/report]] --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 99f256fbe..21800f4de 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -25,6 +25,21 @@ misunderstood the details of how the built-in function `sort` works when using `$a` and `$b`. The newer version has been tested, and has a regression test for its core functionality.) +This hook *isn't* (yet) sufficient to implement [[plugins/contrib/report]]'s +NIH'd sorting mechanisms: + +* `report` can sort by any [[plugins/contrib/field]], whereas this one has a + finite number of hooks: if the `field` plugin's functionality is desirable, + perhaps parameterized sort mechanisms similar to pagespec match functions + would be useful? Then the `field` plugin could register + `hook(type => "sort", id => "field")` and you could have + `\[[!inline ... sort="field(Mood)"]]` or something? + +* `report` can sort by multiple criteria, with independent direction-changing: + if this is desirable, perhaps `pagespec_match_list` could be enhanced to + interpret `sort="x -y z(w)"` as sorting by (pseudocode) + `{ $cmp_x->($a, $b) || (-$cmp_y->($a, $b)) || $cmp_z->($a, $b, "w") }`? + ## Documentation extracted from the branch ### sort hook (added to [[plugins/write]]) -- cgit v1.2.3 From 27f1e77bc6ff74f1760a4fdb9e174c77ea4698ea Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 24 Mar 2010 17:26:46 +0000 Subject: thoughts --- ...an_alternative_approach_to_structured_data.mdwn | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'doc') diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn index eb6ee4445..188e627f0 100644 --- a/doc/forum/an_alternative_approach_to_structured_data.mdwn +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -27,3 +27,27 @@ I have written additional plugins which integrate with the [[plugins/contrib/fie * [[plugins/contrib/ymlfront]] - looks for YAML-format data at the front of a page; this is just one possible back-end for the structured data --[[KathrynAndersen]] + +> I'm not an IkiWiki committer ([[Joey]] is the only one I think) +> but I really like the look of this scheme. In particular, +> having `getfield` interop with `field` without being *part of* +> `field` makes me happy, since I'm not very keen on `getfield`'s +> syntax (i.e. "ugh, yet another mini-markup-language without a +> proper escaping mechanism"), but this way people can experiment +> with different syntaxes while keeping `field` for the +> behind-the-scenes bits. +> +> My [[plugins/contrib/album]] plugin could benefit from +> integration with [[field]] for photos' captions and so on, +> probably... I'll try to work on that at some point. +> +> [[plugins/contrib/report]] may be doing too much, though: +> it seems to be an variation on `\[[inline archive="yes"]]`, +> with an enhanced version of sorting, a mini version of +> [[todo/wikitrails]], and some other misc. I suspect it could +> usefully be divided up into discrete features? One good way +> to do that might be to shuffle bits of its functionality into +> the IkiWiki distribution and/or separate plugins, until there's +> nothing left in `report` itself and it can just go away. +> +> --[[smcv]] -- cgit v1.2.3 From c64c4b99626286ee08f67999a18c43c769e21e6a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 24 Mar 2010 14:39:50 -0400 Subject: Add --set-yaml switch for setting more complex config file options. --- debian/changelog | 1 + doc/usage.mdwn | 10 +++++++--- ikiwiki.in | 9 +++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index 4d0639a58..e7499b6f2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ ikiwiki (3.20100320) UNRELEASED; urgency=low (Thanks to Aaron Wilson for the original patch.) * Allow wrappers to be built using tcc. * Add support for setup files written in YAML. + * Add --set-yaml switch for setting more complex config file options. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/usage.mdwn b/doc/usage.mdwn index f735170f0..db1e36a10 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -331,9 +331,13 @@ also be configured using a setup file. * --set var=value This allows setting an arbitrary configuration variable, the same as if it - were set via a setup file. Since most options can be configured - using command-line switches, you will rarely need to use this, but it can be - useful for the odd option that lacks a command-line switch. + were set via a setup file. Since most options commonly used options can be + configured using command-line switches, you will rarely need to use this. + +* --set-yaml var=value + + This is like --set, but it allows setting configuration variables that + use complex data structures, by passing in a YAML document. # EXAMPLES diff --git a/ikiwiki.in b/ikiwiki.in index da5555629..7028bdb7d 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -96,6 +96,15 @@ sub getconfig () { } $config{$var}=$val; }, + "set-yaml=s" => sub { + my ($var, $val)=split('=', $_[1], 2); + if (! defined $var || ! defined $val) { + die gettext("usage: --set-yaml var=value"), "\n"; + } + eval q{use YAML::Any}; + die $@ if $@; + $config{$var}=Load($val); + }, "version" => sub { print "ikiwiki version $IkiWiki::version\n"; exit; -- cgit v1.2.3 From 3b08b19b4e36f82864c73ca035cfdec83b3a43aa Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 24 Mar 2010 21:33:03 +0000 Subject: use `` to avoid markdown eating example pagespecs --- doc/plugins/moderatedcomments.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/moderatedcomments.mdwn b/doc/plugins/moderatedcomments.mdwn index c29b0b052..f9466e833 100644 --- a/doc/plugins/moderatedcomments.mdwn +++ b/doc/plugins/moderatedcomments.mdwn @@ -8,5 +8,5 @@ By default, all comments made by anyone who is not an admin will be held for moderation. The `moderate_pagespec` setting can be used to specify a [[ikiwiki/PageSpec]] to match comments and users who should be moderated. For example, to avoid moderating comments from logged-in users, set -`moderate_pagespec` to "!user(*)". Or to moderate everyone except for -admins, set it to "!admin(*)". +`moderate_pagespec` to "`!user(*)`". Or to moderate everyone except for +admins, set it to "`!admin(*)`". -- cgit v1.2.3 From 1a587504e949bf0584acdf7737597c8332467332 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 24 Mar 2010 22:48:47 +0000 Subject: what about a SortSpec rather than a sort-hook? --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 21800f4de..5bfe102ac 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -40,6 +40,8 @@ NIH'd sorting mechanisms: interpret `sort="x -y z(w)"` as sorting by (pseudocode) `{ $cmp_x->($a, $b) || (-$cmp_y->($a, $b)) || $cmp_z->($a, $b, "w") }`? +>> I wonder if IkiWiki would benefit from the concept of a "sortspec", like a [[ikiwiki/PageSpec]] but dedicated to sorting lists of pages rather than defining lists of pages? Rather than defining a sort-hook, define a SortSpec class, and enable people to add their own sort methods as functions defined inside that class, similarly to the way they can add their own pagespec definitions. --[[KathrynAndersen]] + ## Documentation extracted from the branch ### sort hook (added to [[plugins/write]]) -- cgit v1.2.3 From 60edd2dc3157f756f4f7a213ee15836fe7bbb769 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Wed, 24 Mar 2010 23:51:48 +0000 Subject: Allow sorting to be combined and/or reversed --- IkiWiki.pm | 84 ++++++++++++++++++++++++++++----------- doc/ikiwiki/pagespec/sorting.mdwn | 4 ++ doc/plugins/write.mdwn | 17 +++++++- t/pagespec_match_list.t | 12 +++++- 4 files changed, 91 insertions(+), 26 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1a4dc47dd..ce8fdd454 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2005,6 +2005,64 @@ sub pagespec_match ($$;@) { return $sub->($page, @params); } +sub get_sort_function { + my $method = $_[0]; + + if ($method =~ m/\s/) { + my @methods = map { get_sort_function($_) } split(' ', $method); + + return sub { + foreach my $method (@methods) { + my $answer = $method->($_[0], $_[1]); + return $answer if $answer; + } + + return 0; + }; + } + + my $sense = 1; + + if ($method =~ s/^-//) { + $sense = -1; + } + + my $token = $method; + my $parameter = undef; + + if ($method =~ m/^(\w+)\((.*)\)$/) { + $token = $1; + $parameter = $2; + } + + if (exists $hooks{sort}{$token}{call}) { + my $callback = $hooks{sort}{$token}{call}; + return sub { $sense * $callback->($_[0], $_[1], $parameter) }; + } + + if ($method eq 'title') { + return sub { $sense * (pagetitle(basename($_[0])) cmp pagetitle(basename($_[1]))) }; + } + + if ($method eq 'title_natural') { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } + return sub { $sense * Sort::Naturally::ncmp(pagetitle(basename($_[0])), pagetitle(basename($_[1]))) }; + } + + if ($method eq 'mtime') { + return sub { $sense * ($pagemtime{$_[1]} <=> $pagemtime{$_[0]}) }; + } + + if ($method eq 'age') { + return sub { $sense * ($pagectime{$_[1]} <=> $pagectime{$_[0]}) }; + } + + error sprintf(gettext("unknown sort type %s"), $method); +} + sub pagespec_match_list ($$;@) { my $page=shift; my $pagespec=shift; @@ -2034,31 +2092,9 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f; + my $f = get_sort_function($params{sort}); - if (exists $hooks{sort}{$params{sort}}{call}) { - $f = sub { $hooks{sort}{$params{sort}}{call}($a, $b) }; - } - elsif ($params{sort} eq 'title') { - $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; - } - elsif ($params{sort} eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - $f=sub { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) }; - } - elsif ($params{sort} eq 'mtime') { - $f=sub { $pagemtime{$b} <=> $pagemtime{$a} }; - } - elsif ($params{sort} eq 'age') { - $f=sub { $pagectime{$b} <=> $pagectime{$a} }; - } - else { - error sprintf(gettext("unknown sort type %s"), $params{sort}); - } - @candidates = sort { &$f } @candidates; + @candidates = sort { $f->($a, $b) } @candidates; } @candidates=reverse(@candidates) if $params{reverse}; diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 61516bec5..f27972d4e 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -15,6 +15,10 @@ orders can be specified. full title was set. """]] +In addition, you can combine several sort orders and/or reverse the order of +sorting, with a string like `age -title` (which would sort by age, then by +title in reverse order if two pages have the same age). + Plugins can add additional sort orders, so more might be available on this wiki. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index bfa6617bd..1010e76e4 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -593,7 +593,9 @@ function of the ikiwiki wrapper when it is being generated. hook(type => "sort", id => "foo", call => \&sort_by_foo); This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. The callback is given two page names as arguments, and +an existing one. + +The callback is given two page names followed by the parameter as arguments, and returns negative, zero or positive if the first page should come before, close to (i.e. undefined order), or after the second page. @@ -603,6 +605,19 @@ For instance, the built-in `title` sort order could be reimplemented as pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); } +and to sort by an arbitrary `meta` value, you could use: + + # usage: sort="meta(description)" + sub sort_by_meta { + my $param = $_[2]; + error "sort=meta requires a parameter" unless defined $param; + my $left = $pagestate{$_[0]}{meta}{$param}; + $left = "" unless defined $left; + my $right = $pagestate{$_[1]}{meta}{$param}; + $right = "" unless defined $right; + return $left cmp $right; + } + ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index b34ee769f..309961f1c 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 89; +use Test::More tests => 90; BEGIN { use_ok("IkiWiki"); } @@ -20,6 +20,13 @@ hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); "post/2" => "post/2.mdwn", "post/3" => "post/3.mdwn", ); +$IkiWiki::pagectime{foo} = 2; +$IkiWiki::pagectime{foo2} = 2; +$IkiWiki::pagectime{foo3} = 1; +$IkiWiki::pagectime{bar} = 3; +$IkiWiki::pagectime{"post/1"} = 6; +$IkiWiki::pagectime{"post/2"} = 6; +$IkiWiki::pagectime{"post/3"} = 6; $links{foo}=[qw{post/1 post/2}]; $links{foo2}=[qw{bar}]; $links{foo3}=[qw{bar}]; @@ -38,6 +45,9 @@ is_deeply([pagespec_match_list("foo", "post/*", sort => "title", ["post/1", "post/2"]); is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], ["bar", "foo"]); +is_deeply([pagespec_match_list("foo", "foo* or bar*", + sort => "-age title")], # oldest first, break ties by title + ["foo3", "foo", "foo2", "bar"]); my $r=eval { pagespec_match_list("foo", "beep") }; ok(eval { pagespec_match_list("foo", "beep") } == 0); ok(! $@, "does not fail with error when unable to match anything"); -- cgit v1.2.3 From 81cd30690024db1fc0b300e3a09504f1c613be21 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Thu, 25 Mar 2010 00:05:58 +0000 Subject: an updated branch --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 5bfe102ac..419a73419 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -40,8 +40,13 @@ NIH'd sorting mechanisms: interpret `sort="x -y z(w)"` as sorting by (pseudocode) `{ $cmp_x->($a, $b) || (-$cmp_y->($a, $b)) || $cmp_z->($a, $b, "w") }`? +> I've now added both of these features to the sort-hooks branch. --[[smcv]] + >> I wonder if IkiWiki would benefit from the concept of a "sortspec", like a [[ikiwiki/PageSpec]] but dedicated to sorting lists of pages rather than defining lists of pages? Rather than defining a sort-hook, define a SortSpec class, and enable people to add their own sort methods as functions defined inside that class, similarly to the way they can add their own pagespec definitions. --[[KathrynAndersen]] +>>> I'd be inclined to think that's overkill, but it probably wouldn't be +>>> all that hard to implement... Joey? Any thoughts? --s + ## Documentation extracted from the branch ### sort hook (added to [[plugins/write]]) @@ -49,7 +54,9 @@ NIH'd sorting mechanisms: hook(type => "sort", id => "foo", call => \&sort_by_foo); This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. The callback is given two page names as arguments, and +an existing one. + +The callback is given two page names followed by the parameter as arguments, and returns negative, zero or positive if the first page should come before, close to (i.e. undefined order), or after the second page. @@ -59,12 +66,32 @@ For instance, the built-in `title` sort order could be reimplemented as pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); } +and to sort by an arbitrary `meta` value, you could use: + + # usage: sort="meta(description)" + sub sort_by_meta { + my $param = $_[2]; + error "sort=meta requires a parameter" unless defined $param; + my $left = $pagestate{$_[0]}{meta}{$param}; + $left = "" unless defined $left; + my $right = $pagestate{$_[1]}{meta}{$param}; + $right = "" unless defined $right; + return $left cmp $right; + } + + ### meta_title sort order (conditionally added to [[ikiwiki/pagespec/sorting]]) * `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no full title was set. +### Multiple sort orders (added to [[ikiwiki/pagespec/sorting]]) + +In addition, you can combine several sort orders and/or reverse the order of +sorting, with a string like `age -title` (which would sort by age, then by +title in reverse order if two pages have the same age). + ### meta title sort parameter (added to [[ikiwiki/directive/meta]]) An optional `sort` parameter will be used preferentially when -- cgit v1.2.3 From dc966032129e07b9a6002a97bc9e6b86c712b4d2 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 25 Mar 2010 03:35:14 +0000 Subject: bug and fix --- doc/bugs/filecheck_failing_to_find_files.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/bugs/filecheck_failing_to_find_files.mdwn (limited to 'doc') diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn new file mode 100644 index 000000000..95ea5c763 --- /dev/null +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -0,0 +1,23 @@ +Using the attachment plugin, when filecheck was checking the mime-type of the attachment before allowing the attachment to be removed, it was returning with an error saying that the mime-type of the file was "unknown" (when the mime-type definitely was known!) + +It turns out that the filecheck plugin couldn't find the file, because it was merely using the $pagesources hash, rather than finding the absolute path of the file in question. + +The following patch fixes the problem: + + diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm + index 01d4909..1cec0cf 100644 + --- a/IkiWiki/Plugin/filecheck.pm + +++ b/IkiWiki/Plugin/filecheck.pm + @@ -118,6 +118,10 @@ sub match_mimetype ($$;@) { + if (! defined $file) { + return IkiWiki::ErrorReason->new("no file specified"); + } + + if (! -e $file) { + + # get the absolute path of the file if you can't find it + + $file = IkiWiki::srcfile($file); + + } + + # Use ::magic to get the mime type, the idea is to only trust + # data obtained by examining the actual file contents. + +[[!tag patch]] -- cgit v1.2.3 From c757cfa64f56fc17b2c3e4b2c36279f3fcf0f812 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 25 Mar 2010 03:38:14 +0000 Subject: I'm not sure if I'm supposed to tag this as patch, so I removed the tag. --- doc/bugs/filecheck_failing_to_find_files.mdwn | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc') diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index 95ea5c763..49de3d435 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -19,5 +19,3 @@ The following patch fixes the problem: # Use ::magic to get the mime type, the idea is to only trust # data obtained by examining the actual file contents. - -[[!tag patch]] -- cgit v1.2.3 From 1030d23a2ca1be2680a6fac8366f880a1d1760c6 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 25 Mar 2010 00:11:39 -0400 Subject: response --- doc/bugs/filecheck_failing_to_find_files.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index 49de3d435..e41793ee8 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -2,6 +2,9 @@ Using the attachment plugin, when filecheck was checking the mime-type of the at It turns out that the filecheck plugin couldn't find the file, because it was merely using the $pagesources hash, rather than finding the absolute path of the file in question. +> I don't understand why the file was not in `%pagesources`. Do you? +> --[[Joey]] + The following patch fixes the problem: diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm -- cgit v1.2.3 From 46f8f72793e23b56d3deb1ed0ed6b1a0fbd56ad6 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 25 Mar 2010 04:43:16 +0000 Subject: response --- doc/bugs/filecheck_failing_to_find_files.mdwn | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index e41793ee8..be6cdbb20 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -3,7 +3,12 @@ Using the attachment plugin, when filecheck was checking the mime-type of the at It turns out that the filecheck plugin couldn't find the file, because it was merely using the $pagesources hash, rather than finding the absolute path of the file in question. > I don't understand why the file was not in `%pagesources`. Do you? -> --[[Joey]] +> --[[Joey]] + +>> The file *was* in `%pagesources`, but what returns from that is the filename relative to the `srcdir` directory; for example, `foo/bar.gif`. +>> When File::MimeInfo::Magic::magic is given that, it can't find the file. +>> But if it is given `/path/to/srcdir/foo/bar.gif` instead, then it *can* find the file, and returns the mime-type correctly. +>> --[[KathrynAndersen]] The following patch fixes the problem: -- cgit v1.2.3 From 3d671ea8c1df4534d8ffa59b235dd6ded99bb13f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 25 Mar 2010 14:39:09 -0400 Subject: filecheck: Fix bug that prevented the pagespecs from matching when not called by attachment plugin. --- IkiWiki/Plugin/filecheck.pm | 16 ++++++++-------- debian/changelog | 2 ++ doc/bugs/filecheck_failing_to_find_files.mdwn | 5 +++++ 3 files changed, 15 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm index 0501ba99c..1549b82db 100644 --- a/IkiWiki/Plugin/filecheck.pm +++ b/IkiWiki/Plugin/filecheck.pm @@ -75,9 +75,9 @@ sub match_maxsize ($$;@) { } my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } if (-s $file > $maxsize) { @@ -96,9 +96,9 @@ sub match_minsize ($$;@) { } my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } if (-s $file < $minsize) { @@ -114,9 +114,9 @@ sub match_mimetype ($$;@) { my $wanted=shift; my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } # Use ::magic to get the mime type, the idea is to only trust @@ -147,9 +147,9 @@ sub match_virusfree ($$;@) { my $wanted=shift; my %params=@_; - my $file=exists $params{file} ? $params{file} : $IkiWiki::pagesources{$page}; + my $file=exists $params{file} ? $params{file} : IkiWiki::srcfile($IkiWiki::pagesources{$page}); if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); + return IkiWiki::ErrorReason->new("file does not exist"); } if (! exists $IkiWiki::config{virus_checker} || diff --git a/debian/changelog b/debian/changelog index 12dd0dc02..7249cdfa4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low * Allow wrappers to be built using tcc. * Add support for setup files written in YAML. * Add --set-yaml switch for setting more complex config file options. + * filecheck: Fix bug that prevented the pagespecs from matching when + not called by attachment plugin. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index be6cdbb20..e896f2129 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -10,6 +10,11 @@ It turns out that the filecheck plugin couldn't find the file, because it was me >> But if it is given `/path/to/srcdir/foo/bar.gif` instead, then it *can* find the file, and returns the mime-type correctly. >> --[[KathrynAndersen]] +>>> Ok, so it's not removal specific, can in fact be triggered by using +>>> testpagespec (or really anything besides attachment, which passes +>>> the filename parameter). Nor is it limited to mimetype, all the tests in +>>> filecheck have the problem. [[Fixed|done]] --[[Joey]] + The following patch fixes the problem: diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm -- cgit v1.2.3 From b86276ffed7ee001b35cd610e5d56e5afb4088cf Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Thu, 25 Mar 2010 23:31:53 +0000 Subject: Reimplement extensible sorting mechanisms, in the same way as pagespecs --- IkiWiki.pm | 145 ++++++++++++++++++++++++++++-------------------- IkiWiki/Plugin/meta.pm | 11 ++-- doc/plugins/write.mdwn | 53 ++++++++---------- t/pagespec_match_list.t | 6 +- 4 files changed, 120 insertions(+), 95 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index ce8fdd454..a89c14058 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -37,6 +37,7 @@ our $DEPEND_LINKS=4; # Optimisation. use Memoize; memoize("abs2rel"); +memoize("cmpspec_translate"); memoize("pagespec_translate"); memoize("template_file"); @@ -1934,6 +1935,70 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } +sub cmpspec_translate ($) { + my $spec = shift; + + my $code = ""; + my @data; + while ($spec =~ m{ + \s* + (-?) # group 1: perhaps negated + \s* + ( # group 2: a word + \w+\([^\)]*\) # command(params) + | + [^\s]+ # or anything else + ) + \s* + }gx) { + my $negated = $1; + my $word = $2; + my $params = undef; + + if ($word =~ m/^(\w+)\((.*)\)$/) { + # command with parameters + $params = $2; + $word = $1; + } + elsif ($word !~ m/^\w+$/) { + error(sprintf(gettext("invalid sort type %s"), $word)); + } + + if (length $code) { + $code .= " || "; + } + + if ($negated) { + $code .= "-"; + } + + if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { + if (exists $IkiWiki::PageSpec::{"check_cmp_$word"}) { + $IkiWiki::PageSpec::{"check_cmp_$word"}->($params); + } + + if (defined $params) { + push @data, $params; + $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; + } + else { + $code .= "IkiWiki::PageSpec::cmp_$word(\@_, undef)"; + } + } + else { + error(sprintf(gettext("unknown sort type %s"), $word)); + } + } + + if (! length $code) { + # undefined sorting method... sort arbitrarily + return sub { 0 }; + } + + no warnings; + return eval 'sub { '.$code.' }'; +} + sub pagespec_translate ($) { my $spec=shift; @@ -2005,64 +2070,6 @@ sub pagespec_match ($$;@) { return $sub->($page, @params); } -sub get_sort_function { - my $method = $_[0]; - - if ($method =~ m/\s/) { - my @methods = map { get_sort_function($_) } split(' ', $method); - - return sub { - foreach my $method (@methods) { - my $answer = $method->($_[0], $_[1]); - return $answer if $answer; - } - - return 0; - }; - } - - my $sense = 1; - - if ($method =~ s/^-//) { - $sense = -1; - } - - my $token = $method; - my $parameter = undef; - - if ($method =~ m/^(\w+)\((.*)\)$/) { - $token = $1; - $parameter = $2; - } - - if (exists $hooks{sort}{$token}{call}) { - my $callback = $hooks{sort}{$token}{call}; - return sub { $sense * $callback->($_[0], $_[1], $parameter) }; - } - - if ($method eq 'title') { - return sub { $sense * (pagetitle(basename($_[0])) cmp pagetitle(basename($_[1]))) }; - } - - if ($method eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - return sub { $sense * Sort::Naturally::ncmp(pagetitle(basename($_[0])), pagetitle(basename($_[1]))) }; - } - - if ($method eq 'mtime') { - return sub { $sense * ($pagemtime{$_[1]} <=> $pagemtime{$_[0]}) }; - } - - if ($method eq 'age') { - return sub { $sense * ($pagectime{$_[1]} <=> $pagectime{$_[0]}) }; - } - - error sprintf(gettext("unknown sort type %s"), $method); -} - sub pagespec_match_list ($$;@) { my $page=shift; my $pagespec=shift; @@ -2092,7 +2099,7 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = get_sort_function($params{sort}); + my $f = cmpspec_translate($params{sort}); @candidates = sort { $f->($a, $b) } @candidates; } @@ -2407,4 +2414,24 @@ sub match_ip ($$;@) { } } +sub cmp_title { + IkiWiki::pagetitle(IkiWiki::basename($_[0])) + cmp + IkiWiki::pagetitle(IkiWiki::basename($_[1])) +} + +sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } +sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } + +sub check_cmp_title_natural { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } +} +sub cmp_title_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), + IkiWiki::pagetitle(IkiWiki::basename($_[1]))) +} + 1 diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index a470041c9..e8cc1e392 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -13,7 +13,6 @@ sub import { hook(type => "needsbuild", id => "meta", call => \&needsbuild); hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); - hook(type => "sort", id => "meta_title", call => \&sort_meta_title); } sub getsetup () { @@ -299,10 +298,6 @@ sub titlesort { return pagetitle(IkiWiki::basename($_[0])); } -sub sort_meta_title { - return titlesort($_[0]) cmp titlesort($_[1]); -} - sub match { my $field=shift; my $page=shift; @@ -353,4 +348,10 @@ sub match_copyright ($$;@) { IkiWiki::Plugin::meta::match("copyright", @_); } +sub cmp_meta_title { + IkiWiki::Plugin::meta::titlesort($_[0]) + cmp + IkiWiki::Plugin::meta::titlesort($_[1]) +} + 1 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 1010e76e4..de2b47015 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -588,36 +588,6 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. -### sort - - hook(type => "sort", id => "foo", call => \&sort_by_foo); - -This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. - -The callback is given two page names followed by the parameter as arguments, and -returns negative, zero or positive if the first page should come before, -close to (i.e. undefined order), or after the second page. - -For instance, the built-in `title` sort order could be reimplemented as - - sub sort_by_title { - pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); - } - -and to sort by an arbitrary `meta` value, you could use: - - # usage: sort="meta(description)" - sub sort_by_meta { - my $param = $_[2]; - error "sort=meta requires a parameter" unless defined $param; - my $left = $pagestate{$_[0]}{meta}{$param}; - $left = "" unless defined $left; - my $right = $pagestate{$_[1]}{meta}{$param}; - $right = "" unless defined $right; - return $left cmp $right; - } - ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` @@ -1140,6 +1110,29 @@ For example, "backlink(foo)" is influenced by the contents of page foo; they match; "created_before(foo)" is influenced by the metadata of foo; while "glob(*)" is not influenced by the contents of any page. +### Sorting plugins + +Similarly, it's possible to write plugins that add new functions as +[[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to +the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +by `foo` or `foo(...)` is requested. + +The function will be passed three or more parameters. The first two are +page names, and the third is `undef` if invoked as `foo`, or the parameter +`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named +parameters. + +It should return the same thing as Perl's `cmp` and `<=>` operators: negative +if the first argument is less than the second, positive if the first argument +is greater, or zero if they are considered equal. It may also raise an +error using `error`, for instance if it needs a parameter but one isn't +provided. + +You can also define a function called `check_cmp_foo` in the same package. +If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, +with argument `undef` or `"bar"` respectively; it may raise an error using +`error`, if sorting like that isn't going to work. + ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 309961f1c..743ae4637 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -9,7 +9,11 @@ BEGIN { use_ok("IkiWiki"); } $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); -hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); +{ + package IkiWiki::PageSpec; + + sub cmp_path { $_[0] cmp $_[1] } +} %pagesources=( foo => "foo.mdwn", -- cgit v1.2.3 From 959d5b197d842e494076034f89d7bca84e531a45 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 25 Mar 2010 23:39:45 +0000 Subject: an alternative way to do plugins, as rubykat suggested --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 37 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 419a73419..f37a0758e 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -44,10 +44,13 @@ NIH'd sorting mechanisms: >> I wonder if IkiWiki would benefit from the concept of a "sortspec", like a [[ikiwiki/PageSpec]] but dedicated to sorting lists of pages rather than defining lists of pages? Rather than defining a sort-hook, define a SortSpec class, and enable people to add their own sort methods as functions defined inside that class, similarly to the way they can add their own pagespec definitions. --[[KathrynAndersen]] ->>> I'd be inclined to think that's overkill, but it probably wouldn't be ->>> all that hard to implement... Joey? Any thoughts? --s +>>> [[!template id=gitbranch branch=smcv/sort-package author="[[Simon_McVittie|smcv]]"]] +>>> I'd be inclined to think that's overkill, but it wasn't very hard to +>>> implement, and in a way is more elegant. I set it up so sort mechanisms +>>> share the `IkiWiki::PageSpec` package, but with a `cmp_` prefix. Gitweb: +>>> <http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-package> -## Documentation extracted from the branch +## Documentation from sort-hooks branch ### sort hook (added to [[plugins/write]]) @@ -100,3 +103,31 @@ An optional `sort` parameter will be used preferentially when \[[!meta title="The Beatles" sort="Beatles, The"]] \[[!meta title="David Bowie" sort="Bowie, David"]] + +## Documentation from sort-hooks branch + +The changes to [[ikiwiki/pagespec/sorting]] are the same. +The changes to [[plugins/write]] are replaced by: + +### Sorting plugins + +Similarly, it's possible to write plugins that add new functions as +[[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to +the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +by `foo` or `foo(...)` is requested. + +The function will be passed three or more parameters. The first two are +page names, and the third is `undef` if invoked as `foo`, or the parameter +`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named +parameters. + +It should return the same thing as Perl's `cmp` and `<=>` operators: negative +if the first argument is less than the second, positive if the first argument +is greater, or zero if they are considered equal. It may also raise an +error using `error`, for instance if it needs a parameter but one isn't +provided. + +You can also define a function called `check_cmp_foo` in the same package. +If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, +with argument `undef` or `"bar"` respectively; it may raise an error using +`error`, if sorting like that isn't going to work. -- cgit v1.2.3 From b68aa11732a1782886793e426f06652656c155cb Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 26 Mar 2010 01:40:32 +0000 Subject: oh dear not fixed after all --- doc/bugs/filecheck_failing_to_find_files.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index e896f2129..33975f05c 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -13,7 +13,13 @@ It turns out that the filecheck plugin couldn't find the file, because it was me >>> Ok, so it's not removal specific, can in fact be triggered by using >>> testpagespec (or really anything besides attachment, which passes >>> the filename parameter). Nor is it limited to mimetype, all the tests in ->>> filecheck have the problem. [[Fixed|done]] --[[Joey]] +>>> filecheck have the problem. --[[Joey]] + +>>>> Alas, not fixed. It seems I was mistaken in some of my assumptions. +>>>> It still happens when attempting to remove attachments. +>>>> With your fix, the `IkiWiki::srcfile` function is only called when the filename is not passed in, but it appears that in the case of removing attachments, the filename IS passed in, but it is the relative filename as mentioned above. Thus, the file is still not found, and the mime-type comes back as unknown. +>>>> The reason my patch worked is because, rather than checking whether a filename was passed in before applying IkiWiki::srcfile to the filename, it checks whether the file can be found, and if it cannot be found, then it applies IkiWiki::srcfile to the filename. +>>>> --[[KathrynAndersen]] The following patch fixes the problem: -- cgit v1.2.3 From 5dd8c9e99911b112ddffc163d5cca9d7257adc6a Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 26 Mar 2010 01:44:52 +0000 Subject: now my main site uses IkiWiki fully --- doc/users/KathrynAndersen.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/users/KathrynAndersen.mdwn b/doc/users/KathrynAndersen.mdwn index 16cb390c4..8e827b0da 100644 --- a/doc/users/KathrynAndersen.mdwn +++ b/doc/users/KathrynAndersen.mdwn @@ -1,8 +1,8 @@ * aka [[rubykat]] -* Currently an active [PmWiki](http://www.pmwiki.org) user, but investigating changing over to ikiwiki (if I can write the plugins I need). * <http://kerravonsen.dreamwidth.org> -* <http://www.katspace.org> +* <http://www.katspace.org> (uses IkiWiki!) * <http://github.com/rubykat> +* Also an active [PmWiki](http://www.pmwiki.org) user, interested in having the best of both worlds. Has written the following plugins: [[!map pages="!*/Discussion and ((link(users/KathrynAndersen) or link(users/rubykat)) and plugins/*) "]] -- cgit v1.2.3 From fb39dc5f5f3e0dc4b5006b2cf7c85ce0e895ebfa Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 25 Mar 2010 23:40:38 -0400 Subject: patch --- doc/bugs/filecheck_failing_to_find_files.mdwn | 53 +++++++++++++++++++-------- 1 file changed, 37 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index 33975f05c..3209c8f53 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -21,20 +21,41 @@ It turns out that the filecheck plugin couldn't find the file, because it was me >>>> The reason my patch worked is because, rather than checking whether a filename was passed in before applying IkiWiki::srcfile to the filename, it checks whether the file can be found, and if it cannot be found, then it applies IkiWiki::srcfile to the filename. >>>> --[[KathrynAndersen]] -The following patch fixes the problem: +>>>>> Can you test if this patch fixes that? --[[Joey]] - diff --git a/IkiWiki/Plugin/filecheck.pm b/IkiWiki/Plugin/filecheck.pm - index 01d4909..1cec0cf 100644 - --- a/IkiWiki/Plugin/filecheck.pm - +++ b/IkiWiki/Plugin/filecheck.pm - @@ -118,6 +118,10 @@ sub match_mimetype ($$;@) { - if (! defined $file) { - return IkiWiki::ErrorReason->new("no file specified"); - } - + if (! -e $file) { - + # get the absolute path of the file if you can't find it - + $file = IkiWiki::srcfile($file); - + } - - # Use ::magic to get the mime type, the idea is to only trust - # data obtained by examining the actual file contents. +<pre> +diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm +index f59d026..0fc180f 100644 +--- a/IkiWiki/Plugin/remove.pm ++++ b/IkiWiki/Plugin/remove.pm +@@ -49,7 +49,7 @@ sub check_canremove ($$$) { + # This is sorta overkill, but better safe than sorry. + if (! defined pagetype($pagesources{$page})) { + if (IkiWiki::Plugin::attachment->can("check_canattach")) { +- IkiWiki::Plugin::attachment::check_canattach($session, $page, $file); ++ IkiWiki::Plugin::attachment::check_canattach($session, $page, "$config{srcdir}/$file"); + } + else { + error("removal of attachments is not allowed"); +diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm +index 3908443..1a9da63 100644 +--- a/IkiWiki/Plugin/rename.pm ++++ b/IkiWiki/Plugin/rename.pm +@@ -50,7 +50,7 @@ sub check_canrename ($$$$$$) { + IkiWiki::check_canedit($src, $q, $session); + if ($attachment) { + if (IkiWiki::Plugin::attachment->can("check_canattach")) { +- IkiWiki::Plugin::attachment::check_canattach($session, $src, $srcfile); ++ IkiWiki::Plugin::attachment::check_canattach($session, $src, "$config{srcdir}/$srcfile"); + } + else { + error("renaming of attachments is not allowed"); +@@ -85,7 +85,7 @@ sub check_canrename ($$$$$$) { + if ($attachment) { + # Note that $srcfile is used here, not $destfile, + # because it wants the current file, to check it. +- IkiWiki::Plugin::attachment::check_canattach($session, $dest, $srcfile); ++ IkiWiki::Plugin::attachment::check_canattach($session, $dest, "$config{srcdir}/$srcfile"); + } + } +</pre> -- cgit v1.2.3 From 62306d85f998b5bbd64d213e8c591809dbc07cb8 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 26 Mar 2010 04:06:31 +0000 Subject: It works! --- doc/bugs/filecheck_failing_to_find_files.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index 3209c8f53..f8d8e83e6 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -21,7 +21,9 @@ It turns out that the filecheck plugin couldn't find the file, because it was me >>>> The reason my patch worked is because, rather than checking whether a filename was passed in before applying IkiWiki::srcfile to the filename, it checks whether the file can be found, and if it cannot be found, then it applies IkiWiki::srcfile to the filename. >>>> --[[KathrynAndersen]] ->>>>> Can you test if this patch fixes that? --[[Joey]] +>>>>> Can you test if this patch fixes that? --[[Joey]] + +>>>>>> Yes, it works! --[[KathrynAndersen]] <pre> diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm -- cgit v1.2.3 From 0f28f310472a333134af63a18b73372f044b8278 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 00:12:22 -0400 Subject: security? --- doc/plugins/contrib/pod/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/plugins/contrib/pod/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn new file mode 100644 index 000000000..8f4b625ee --- /dev/null +++ b/doc/plugins/contrib/pod/discussion.mdwn @@ -0,0 +1,8 @@ +My one concern about this plugin is the `=for` markup in POD. + +> Some format names that formatters currently are known to +> accept include "roff", "man", "latex", "tex", "text", and "html". + +I don't know which of these [[!cpan Pod::Xml]] supports. If it currently +supports, or later support latex, that could be problimatic since that +could maybe be used to include files or run code. --[[Joey]] -- cgit v1.2.3 From 6693b3eafed5edb061ac31e046a441189660cd77 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 00:15:15 -0400 Subject: on plugins and stuff --- doc/users/KathrynAndersen/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/users/KathrynAndersen/discussion.mdwn (limited to 'doc') diff --git a/doc/users/KathrynAndersen/discussion.mdwn b/doc/users/KathrynAndersen/discussion.mdwn new file mode 100644 index 000000000..c44b28a93 --- /dev/null +++ b/doc/users/KathrynAndersen/discussion.mdwn @@ -0,0 +1,6 @@ +Had a look at your site. Sprawling, individualistic, using ikiwiki in lots of +ways. Makes me happy. :) I see that I have let a lot of contrib plugins +pile up. I will try to get to these. I'm particularly interested in +your use of yaml+fields. Encourage you to go ahead with any others you +have not submitted here, like pmap. (Unless it makes more sense to submit +that as a patch to the existing map plugin.) --[[Joey]] -- cgit v1.2.3 From 243b0dd082cf4b66dfef55b2c9b459109bee7398 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 00:16:21 -0400 Subject: fix the other half of the filecheck filename bug --- IkiWiki/Plugin/remove.pm | 2 +- IkiWiki/Plugin/rename.pm | 4 ++-- debian/changelog | 2 +- doc/bugs/filecheck_failing_to_find_files.mdwn | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index f59d0269e..0fc180f69 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -49,7 +49,7 @@ sub check_canremove ($$$) { # This is sorta overkill, but better safe than sorry. if (! defined pagetype($pagesources{$page})) { if (IkiWiki::Plugin::attachment->can("check_canattach")) { - IkiWiki::Plugin::attachment::check_canattach($session, $page, $file); + IkiWiki::Plugin::attachment::check_canattach($session, $page, "$config{srcdir}/$file"); } else { error("removal of attachments is not allowed"); diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 3908443ca..1a9da6363 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -50,7 +50,7 @@ sub check_canrename ($$$$$$) { IkiWiki::check_canedit($src, $q, $session); if ($attachment) { if (IkiWiki::Plugin::attachment->can("check_canattach")) { - IkiWiki::Plugin::attachment::check_canattach($session, $src, $srcfile); + IkiWiki::Plugin::attachment::check_canattach($session, $src, "$config{srcdir}/$srcfile"); } else { error("renaming of attachments is not allowed"); @@ -85,7 +85,7 @@ sub check_canrename ($$$$$$) { if ($attachment) { # Note that $srcfile is used here, not $destfile, # because it wants the current file, to check it. - IkiWiki::Plugin::attachment::check_canattach($session, $dest, $srcfile); + IkiWiki::Plugin::attachment::check_canattach($session, $dest, "$config{srcdir}/$srcfile"); } } diff --git a/debian/changelog b/debian/changelog index 7249cdfa4..da1ab890e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,7 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low * Allow wrappers to be built using tcc. * Add support for setup files written in YAML. * Add --set-yaml switch for setting more complex config file options. - * filecheck: Fix bug that prevented the pagespecs from matching when + * filecheck: Fix bugs that prevented the pagespecs from matching when not called by attachment plugin. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/bugs/filecheck_failing_to_find_files.mdwn b/doc/bugs/filecheck_failing_to_find_files.mdwn index f8d8e83e6..6501508e4 100644 --- a/doc/bugs/filecheck_failing_to_find_files.mdwn +++ b/doc/bugs/filecheck_failing_to_find_files.mdwn @@ -25,6 +25,8 @@ It turns out that the filecheck plugin couldn't find the file, because it was me >>>>>> Yes, it works! --[[KathrynAndersen]] +applied && [[done]] + <pre> diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index f59d026..0fc180f 100644 -- cgit v1.2.3 From 3cea3eb5da0a8f09a495deea9f2a2c73dc76deab Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 26 Mar 2010 04:30:43 +0000 Subject: response --- doc/plugins/contrib/pod/discussion.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn index 8f4b625ee..76e858680 100644 --- a/doc/plugins/contrib/pod/discussion.mdwn +++ b/doc/plugins/contrib/pod/discussion.mdwn @@ -3,6 +3,8 @@ My one concern about this plugin is the `=for` markup in POD. > Some format names that formatters currently are known to > accept include "roff", "man", "latex", "tex", "text", and "html". -I don't know which of these [[!cpan Pod::Xml]] supports. If it currently +I don't know which of these [[!cpan Pod::Xhtml]] supports. If it currently supports, or later support latex, that could be problimatic since that could maybe be used to include files or run code. --[[Joey]] + +> I don't know, either; the documentation for [[!cpan Pod:Xhtml]] is silent on this subject. --[[KathrynAndersen]] -- cgit v1.2.3 From 8b09b29735b1dbbfe0ef33ad347ecb9bbdf45b75 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 26 Mar 2010 04:41:37 +0000 Subject: response --- doc/users/KathrynAndersen/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/users/KathrynAndersen/discussion.mdwn b/doc/users/KathrynAndersen/discussion.mdwn index c44b28a93..288ea8c51 100644 --- a/doc/users/KathrynAndersen/discussion.mdwn +++ b/doc/users/KathrynAndersen/discussion.mdwn @@ -4,3 +4,11 @@ pile up. I will try to get to these. I'm particularly interested in your use of yaml+fields. Encourage you to go ahead with any others you have not submitted here, like pmap. (Unless it makes more sense to submit that as a patch to the existing map plugin.) --[[Joey]] + +> Thanks. I would have put more up, but I didn't want to until they were properly documented, and other things have taken a higher priority. + +> I think pmap is probably better as a separate plugin, because it has additional dependencies (HTML::LinkList) which people might not want to have to install. + +> The "includepage" plugin I'm not sure whether it is worth releasing or not; it's basically a cut-down version of "inline", because the inline plugin is so complicated and has so many options, I felt more at ease to have something simpler. + +> --[[KathrynAndersen]] -- cgit v1.2.3 From 1093c7e4b2ec5f3b4052ed5c1b5530560864a920 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 00:57:46 -0400 Subject: new bug --- doc/bugs/depends_simple_mixup.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/bugs/depends_simple_mixup.mdwn (limited to 'doc') diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn new file mode 100644 index 000000000..506bef904 --- /dev/null +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -0,0 +1,18 @@ +The [[bugs]] page, at least before I commit this, has a bug at the top that +has been modified to link to done, and ikiwiki's dependency calculations +failed to notice and update the bugs page. Looking at the indexdb, I saw +that the page was not included in the `depends_simple` of the bugs page. + +I was able to replicate the problem locally by starting off with the page +not marked done (when it did appear in the bugs page `depends_simple` +(appropriatly as a link dependency, since a change to the page removing the +link would make it match)), then removing the done link. + +At that point, it vanished from `depends_simple`. Presumably because +the main (pagespec) depends for the bugs page now matched it, as a content +dependency. But, it seems to me it should still be listed in +`depends_simple` here. This, I think, is the cause of the bug. + +Then re-add the done link, and the dependency calc code breaks down, +not noticing that bugs dependeded on the page and needs to be updated. +--[[Joey]] -- cgit v1.2.3 From 4cb464d6e52344b8a0dfd29e82ede78aef1385d3 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 01:05:22 -0400 Subject: typo --- doc/bugs/depends_simple_mixup.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 506bef904..c2845240d 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -4,7 +4,7 @@ failed to notice and update the bugs page. Looking at the indexdb, I saw that the page was not included in the `depends_simple` of the bugs page. I was able to replicate the problem locally by starting off with the page -not marked done (when it did appear in the bugs page `depends_simple` +marked done (when it did appear in the bugs page `depends_simple` (appropriatly as a link dependency, since a change to the page removing the link would make it match)), then removing the done link. -- cgit v1.2.3 From 0d524ad672333fd0bafa64e81e261fd297c25580 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 01:38:53 -0400 Subject: Fix incorrect influence info returned by a failing link() pagespec, that could lead to bad dependency handling in certian situations. --- IkiWiki.pm | 4 ++-- debian/changelog | 2 ++ doc/bugs/depends_simple_mixup.mdwn | 5 +++++ t/pagespec_match.t | 8 +++++++- 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 022bfe3bd..927d62940 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2215,7 +2215,7 @@ sub match_link ($$;@) { my $from=exists $params{location} ? $params{location} : ''; my $links = $IkiWiki::links{$page}; - return IkiWiki::FailReason->new("$page has no links", "" => 1) + return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS, "" => 1) unless $links && @{$links}; my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { @@ -2232,7 +2232,7 @@ sub match_link ($$;@) { if match_glob($p_rel, $link, %params); } } - return IkiWiki::FailReason->new("$page does not link to $link", "" => 1); + return IkiWiki::FailReason->new("$page does not link to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1); } sub match_backlink ($$;@) { diff --git a/debian/changelog b/debian/changelog index da1ab890e..b9a105552 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low * Add --set-yaml switch for setting more complex config file options. * filecheck: Fix bugs that prevented the pagespecs from matching when not called by attachment plugin. + * Fix incorrect influence info returned by a failing link() pagespec, + that could lead to bad dependency handling in certian situations. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index c2845240d..2603ff04c 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -15,4 +15,9 @@ dependency. But, it seems to me it should still be listed in Then re-add the done link, and the dependency calc code breaks down, not noticing that bugs dependeded on the page and needs to be updated. + +Ok.. Turns out this was not a problem with the actual influences +calculation or dependency calculation code. Whew! `match_link` +just didn't set the influence correctly when failing. [[fixed|done]] + --[[Joey]] diff --git a/t/pagespec_match.t b/t/pagespec_match.t index 8b0be4e8a..ade9bca5a 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 72; +use Test::More tests => 75; BEGIN { use_ok("IkiWiki"); } @@ -54,6 +54,7 @@ $config{userdir}=""; $links{foo}=[qw{bar baz}]; $links{bar}=[]; $links{baz}=[]; +$links{meh}=[]; $links{"bugs/foo"}=[qw{bugs/done}]; $links{"bugs/done"}=[]; $links{"bugs/bar"}=[qw{done}]; @@ -82,6 +83,7 @@ ok(! pagespec_match("bar", ""), "empty pagespec should match nothing"); ok(! pagespec_match("bar", " "), "blank pagespec should match nothing"); ok(pagespec_match("ook", "link(blog/tags/foo)"), "link internal absolute success"); ok(pagespec_match("ook", "link(/blog/tags/foo)"), "link explicit absolute success"); +ok(pagespec_match("meh", "!link(done)"), "negated failing match is a success"); $IkiWiki::pagectime{foo}=1154532692; # Wed Aug 2 11:26 EDT 2006 $IkiWiki::pagectime{bar}=1154532695; # after @@ -122,3 +124,7 @@ $i=pagespec_match("foo", "link(baz) and created_after(bar)")->influences; is(join(",", sort keys %$i), 'bar,foo', "influences add up over OR"); $i=pagespec_match("foo", "!link(baz) and !created_after(bar)")->influences; is(join(",", sort keys %$i), 'bar,foo', "influences unaffected by negation"); +$i=pagespec_match("foo", "!link(baz) and !created_after(bar)")->influences; +is(join(",", sort keys %$i), 'bar,foo', "influences unaffected by negation"); +$i=pagespec_match("meh", "!link(done)")->influences; +is(join(",", sort keys %$i), 'meh', "a negated, failing link test is successful, so the page is a link influence"); -- cgit v1.2.3 From 0dec80ee0cb9a2ac9dd4287645d02e5a216f2d0b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 01:48:37 -0400 Subject: close, unreproducible --- ...n_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn b/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn index 42e6b9e27..c3cbff43e 100644 --- a/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn +++ b/doc/bugs/barfs_on_recentchange_entry_for_a_change_removing_an_invalid_pagespec.mdwn @@ -39,3 +39,6 @@ a year ago in September 2007. > ikiwiki. (Doesn't quite seem to be version 2.53.x either) Try with a current > version, and see if you can send me a source tree that can reproduce the > problem? --[[Joey]] + +Did not hear back, so calling this [[done]], unless I hear differently. +--[[Joey]] -- cgit v1.2.3 From 22b9582cddfcb0ee073c99f8867537f67d79fc38 Mon Sep 17 00:00:00 2001 From: "http://users.itk.ppke.hu/~cstamas/openid/" <http://users.itk.ppke.hu/~cstamas/openid/@web> Date: Fri, 26 Mar 2010 08:57:20 +0000 Subject: init page bugreport --- ...-transition_does_not_set_perl_moduels_path_properly.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn (limited to 'doc') diff --git a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn new file mode 100644 index 000000000..7f8045164 --- /dev/null +++ b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn @@ -0,0 +1,13 @@ +When installing ikiwiki the perl module path is setup correctly + + use lib '/usr/local/ikiwiki-3.20100312/share/perl/5.10.0'; + +This is not true for ikiwiki-transition: + + $ PATH=/usr/local/ikiwiki-3.20100312/bin ikiwiki-transition prefix_directives ikiwiki.setup + Can't locate IkiWiki.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/ikiwiki-3.20100312/bin/ikiwiki-transition line 4. + BEGIN failed--compilation aborted at /usr/local/ikiwiki-3.20100312/bin/ikiwiki-transition line 4. + +The missing line should be added. + +Thanks! -- cgit v1.2.3 From 99b402cd622d38cb8337498d8fdb4f135e8be03c Mon Sep 17 00:00:00 2001 From: "http://users.itk.ppke.hu/~cstamas/openid/" <http://users.itk.ppke.hu/~cstamas/openid/@web> Date: Fri, 26 Mar 2010 08:58:41 +0000 Subject: line break for better view --- .../ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn index 7f8045164..5dd4bc780 100644 --- a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn +++ b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn @@ -5,7 +5,9 @@ When installing ikiwiki the perl module path is setup correctly This is not true for ikiwiki-transition: $ PATH=/usr/local/ikiwiki-3.20100312/bin ikiwiki-transition prefix_directives ikiwiki.setup - Can't locate IkiWiki.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/ikiwiki-3.20100312/bin/ikiwiki-transition line 4. + Can't locate IkiWiki.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 + /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) + at /usr/local/ikiwiki-3.20100312/bin/ikiwiki-transition line 4. BEGIN failed--compilation aborted at /usr/local/ikiwiki-3.20100312/bin/ikiwiki-transition line 4. The missing line should be added. -- cgit v1.2.3 From d29419ab0bd181beda6971bf622c3ba8bdd2fd8c Mon Sep 17 00:00:00 2001 From: "http://users.itk.ppke.hu/~cstamas/openid/" <http://users.itk.ppke.hu/~cstamas/openid/@web> Date: Fri, 26 Mar 2010 09:43:50 +0000 Subject: me too - thanks --- doc/bugs/Error:_Your_login_session_has_expired._.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Error:_Your_login_session_has_expired._.mdwn b/doc/bugs/Error:_Your_login_session_has_expired._.mdwn index 046d6e10d..b993cd8e7 100644 --- a/doc/bugs/Error:_Your_login_session_has_expired._.mdwn +++ b/doc/bugs/Error:_Your_login_session_has_expired._.mdwn @@ -41,4 +41,6 @@ Whilst trying to edit http://hugh.vm.bytemark.co.uk/ikiwiki.cgi via OpenID. Any Thanks for you excellent analysis. The bug was due to old pre-3.0 **templates** laying about. After deleting them, ikiwiki defaults to its own templates. Clever. :-) +Great, this saved me big time! It is a google 1st hit. I had the same with accidentally using old templates. Thanks! --[[cstamas]] + [[bugs/done]] -- cgit v1.2.3 From 087085899f7049434ac19761f27826cec9e458d5 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 26 Mar 2010 13:03:37 +0000 Subject: --- doc/forum/an_alternative_approach_to_structured_data.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn index 188e627f0..045bfd7aa 100644 --- a/doc/forum/an_alternative_approach_to_structured_data.mdwn +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -37,8 +37,12 @@ I have written additional plugins which integrate with the [[plugins/contrib/fie > with different syntaxes while keeping `field` for the > behind-the-scenes bits. > +>> I've started using `field` on a private site and it's working +>> well for me; I'll try to do some code review on its +>> [[plugins/contrib/field/discussion]] page. --s +> > My [[plugins/contrib/album]] plugin could benefit from -> integration with [[field]] for photos' captions and so on, +> integration with `field` for photos' captions and so on, > probably... I'll try to work on that at some point. > > [[plugins/contrib/report]] may be doing too much, though: -- cgit v1.2.3 From d88af43011193bb0eef79b749ae9a93eda5d266e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 26 Mar 2010 13:20:33 +0000 Subject: brief review of field; fieldsort plugin --- doc/plugins/contrib/field/discussion.mdwn | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/plugins/contrib/field/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn new file mode 100644 index 000000000..fc1759fab --- /dev/null +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -0,0 +1,62 @@ +Having tried out `field`, some comments (from [[smcv]]): + +The general concept looks great. + +The `pagetemplate` hook seems quite namespace-polluting: on a site containing +a list of books, I'd like to have an `author` field, but that would collide +with IkiWiki's use of `<TMPL_VAR AUTHOR>` for the author of the *page* +(i.e. me). Perhaps it'd be better if the pagetemplate hook was only active for +`<TMPL_VAR FIELD_AUTHOR>` or something? (For those who want the current +behaviour, an auxiliary plugin would be easy.) + +From a coding style point of view, the `$CamelCase` variable names aren't +IkiWiki style, and the `match_foo` functions look as though they could benefit +from being thin wrappers around a common `&IkiWiki::Plugin::field::match` +function (see `meta` for a similar approach). + +I think the documentation would probably be clearer in a less manpage-like +and more ikiwiki-like style? + +If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is +accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can +stop reimplementing sorting. Here's the implementation I'm using, with +your "sortspec" concept (a sort-hook would be very similar): if merged, +I think it should just be part of `field` rather than a separate plugin. + + # Copyright © 2010 Simon McVittie, released under GNU LGPL >= 2.1 + package IkiWiki::Plugin::fieldsort; + use warnings; + use strict; + use IkiWiki 3.00; + use IkiWiki::Plugin::field; + + sub import { + hook(type => "getsetup", id => "fieldsort", call => \&getsetup); + } + + sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + }, + } + + package IkiWiki::PageSpec; + + sub check_cmp_field { + if (!length $_[0]) { + error("sort=field requires a parameter"); + } + } + + sub cmp_field { + my $left = IkiWiki::Plugin::field::field_get_value($_[2], $_[0]); + my $right = IkiWiki::Plugin::field::field_get_value($_[2], $_[1]); + + $left = "" unless defined $left; + $right = "" unless defined $right; + return $left cmp $right; + } + + 1; -- cgit v1.2.3 From bea828a2f6b455c46f2b5d6c16805958a2e3412a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 26 Mar 2010 13:30:52 +0000 Subject: doesn't field+template already cover this? --- doc/plugins/contrib/ftemplate/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/plugins/contrib/ftemplate/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn new file mode 100644 index 000000000..851ccf960 --- /dev/null +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -0,0 +1,6 @@ +Is this actually necessary? Doesn't the combination of [[plugins/template]] +with [[plugins/contrib/field]]'s `pagetemplate` hook provide the same +functionality? I suppose one missing thing is that `ftemplate` looks in +the "system" templates directories, not just in the wiki, but that +seems orthogonal (and might even be a good enhancement to `template`). +--[[smcv]] -- cgit v1.2.3 From fffd7e7e026f61e03b2fa052acdf7130889f6343 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 26 Mar 2010 13:43:37 +0000 Subject: oh, my mistake... this *is* necessary, but could perhaps be done better? --- doc/plugins/contrib/ftemplate/discussion.mdwn | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index 851ccf960..eb2ec6f13 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -1,6 +1,13 @@ -Is this actually necessary? Doesn't the combination of [[plugins/template]] -with [[plugins/contrib/field]]'s `pagetemplate` hook provide the same -functionality? I suppose one missing thing is that `ftemplate` looks in +I initially thought this wasn't actually necessary - the combination +of [[plugins/template]] with [[plugins/contrib/field]]'s `pagetemplate` +hook ought to provide the same functionality. However, `template` +doesn't run `pagetemplate` hooks; a more general version of this +plugin would be to have a variant of `template` that runs `pagetemplate` +hooks (probably easiest to just patch `template` to implement a +second directive, or have a special parameter `run_hooks="yes"`, +or something). + +Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that -seems orthogonal (and might even be a good enhancement to `template`). +seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] -- cgit v1.2.3 From b9958fe3cf1a27b58d3e2bd59c76553eb0046782 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 26 Mar 2010 14:09:04 +0000 Subject: brief review of report --- doc/plugins/contrib/report/discussion.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/plugins/contrib/report/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn new file mode 100644 index 000000000..6b1e28f6a --- /dev/null +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -0,0 +1,23 @@ +Wow, this plugin does a lot... it seems to be `inline` (but without the feeds +or the ability to not have `archive="yes"`), plus part of +[[plugins/contrib/trail]], plus some sorting, plus an ingenious workaround +for template evaluation being relatively stateless. + +A large part of this plugin would just fall off if one of the versions of +[[todo/allow_add_plugins_to_add_sorting_methods]] was merged, which was a +large part of the idea of that feature request :-) To make use of that +you'd have to use `pagespec_match_list` in the trail case too, but that's +easy enough - just add `list => [@the_trail_pages]` to the arguments. + +Another large part would fall off if this plugin required, and internally +invoked, `inline` (like my `comments` plugin does) - `inline` runs +`pagetemplate` hooks, and in particular, it'll run the `field` hook. +Alternatively, this plugin could invoke `pagetemplate` hooks itself, +removing the special case for `field`. + +Perhaps the `headers` thing could migrate into inline somehow? That might +lead to making inline too big, though. + +Is the intention that the `trail` part is a performance hack, or a way +to select pages? How does it relate to [[todo/wikitrails]] or +[[plugins/contrib/trail]]? --[[smcv]] -- cgit v1.2.3 From 3c98cf653f6d6950a425620acf0279df902d004b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 26 Mar 2010 15:09:11 +0000 Subject: fix link --- doc/plugins/contrib/report/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 6b1e28f6a..918d0779b 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -4,7 +4,7 @@ or the ability to not have `archive="yes"`), plus part of for template evaluation being relatively stateless. A large part of this plugin would just fall off if one of the versions of -[[todo/allow_add_plugins_to_add_sorting_methods]] was merged, which was a +"[[todo/allow_plugins_to_add_sorting_methods]]" was merged, which was a large part of the idea of that feature request :-) To make use of that you'd have to use `pagespec_match_list` in the trail case too, but that's easy enough - just add `list => [@the_trail_pages]` to the arguments. -- cgit v1.2.3 From 1273f1de52998cf54afb3445fd8c616bce53e698 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 26 Mar 2010 13:11:02 -0400 Subject: Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar if necessary for unusual install. --- .gitignore | 3 +- Makefile.PL | 16 +- debian/changelog | 2 + ...on_does_not_set_perl_moduels_path_properly.mdwn | 2 + ikiwiki-calendar | 57 ---- ikiwiki-calendar.in | 58 ++++ ikiwiki-transition | 348 -------------------- ikiwiki-transition.in | 349 +++++++++++++++++++++ ikiwiki.spec | 2 +- 9 files changed, 423 insertions(+), 414 deletions(-) delete mode 100755 ikiwiki-calendar create mode 100755 ikiwiki-calendar.in delete mode 100755 ikiwiki-transition create mode 100755 ikiwiki-transition.in (limited to 'doc') diff --git a/.gitignore b/.gitignore index 8de36e2c8..e9ab152b6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,10 @@ blib/* doc/.ikiwiki/* html/* ikiwiki.out +ikiwiki-transition.out +ikiwiki-calendar.out pm_to_blib *.man -build-stamp po/po2wiki_stamp po/underlays/*/*.mdwn po/underlays/basewiki/*/*.mdwn diff --git a/Makefile.PL b/Makefile.PL index 52421a711..5a9028b51 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,15 +28,16 @@ W3M_CGI_BIN?=$(PREFIX)/lib/w3m/cgi-bin tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi) extramodules=$(shell if [ "$$PROFILE" = 1 ]; then printf -- "-d:NYTProf"; fi) +outprogs=ikiwiki.out ikiwiki-transition.out ikiwiki-calendar.out -ikiwiki.out: ikiwiki.in - ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < ikiwiki.in > ikiwiki.out - chmod +x ikiwiki.out +%.out: %.in + ./pm_filter $(PREFIX) $(VER) $(PROBABLE_INST_LIB) < $< > $@ + chmod +x $@ ikiwiki.setup: ikiwiki.out HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -dumpsetup ikiwiki.setup -extra_build: ikiwiki.out ikiwiki.setup docwiki +extra_build: $(outprogs) ikiwiki.setup docwiki ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man ./mdwn2man ikiwiki-mass-rebuild 8 doc/ikiwiki-mass-rebuild.mdwn > ikiwiki-mass-rebuild.man ./mdwn2man ikiwiki-makerepo 1 doc/ikiwiki-makerepo.mdwn > ikiwiki-makerepo.man @@ -52,7 +53,7 @@ docwiki: ikiwiki.out extra_clean: $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean - rm -f *.man ikiwiki.out ikiwiki.setup plugins/*.pyc + rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean underlay_install: @@ -115,8 +116,9 @@ extra_install: underlay_install install ikiwiki-w3m.cgi $(DESTDIR)$(W3M_CGI_BIN) install -d $(DESTDIR)$(PREFIX)/bin - install ikiwiki.out $(DESTDIR)$(PREFIX)/bin/ikiwiki - install ikiwiki-makerepo ikiwiki-transition ikiwiki-update-wikilist ikiwiki-calendar $(DESTDIR)$(PREFIX)/bin/ + for prog in $(outprogs); do \ + install $$prog $(DESTDIR)$(PREFIX)/bin/$$(shell echo $$prog | sed 's/\.out//'); \ + done $(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) diff --git a/debian/changelog b/debian/changelog index b9a105552..57406c6d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low not called by attachment plugin. * Fix incorrect influence info returned by a failing link() pagespec, that could lead to bad dependency handling in certian situations. + * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar + if necessary for unusual install. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn index 5dd4bc780..b3e87b529 100644 --- a/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn +++ b/doc/bugs/ikiwiki-transition_does_not_set_perl_moduels_path_properly.mdwn @@ -13,3 +13,5 @@ This is not true for ikiwiki-transition: The missing line should be added. Thanks! + +[[done]] --[[Joey]] diff --git a/ikiwiki-calendar b/ikiwiki-calendar deleted file mode 100755 index a9548d6ec..000000000 --- a/ikiwiki-calendar +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl -use warnings; -use strict; -use IkiWiki; -use IkiWiki::Setup; -use Getopt::Long; - -sub usage () { - die gettext("usage: ikiwiki-calendar [-f] your.setup [pagespec] [year]"), "\n"; -} - -my $force=0; -GetOptions( - "force" => \$force, -) || usage(); -my $setup=shift || usage(); -my $pagespec=shift || "*"; -my $startyear=shift || 1900+(localtime(time))[5]; -my $endyear=shift || $startyear; - -%config=IkiWiki::defaultconfig(); -IkiWiki::Setup::load($setup); -IkiWiki::loadplugins(); -IkiWiki::checkconfig(); - -my $archivebase = 'archives'; -$archivebase = $config{archivebase} if defined $config{archivebase}; - -sub writearchive ($$;$) { - my $template=template(shift); - my $year=shift; - my $month=shift; - - my $page=defined $month ? "$year/$month" : $year; - - my $pagefile=newpagefile("$archivebase/$page", $config{default_pageext}); - $template->param(pagespec => $pagespec); - $template->param(year => $year); - $template->param(month => $month) if defined $month; - - if ($force || ! -e "$config{srcdir}/$pagefile") { - writefile($pagefile, $config{srcdir}, $template->output); - IkiWiki::rcs_add($pagefile) if $config{rcs}; - } -} - -foreach my $y ($startyear..$endyear) { - writearchive("calendaryear.tmpl", $y); - foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) { - writearchive("calendarmonth.tmpl", $y, $m); - } -} - -IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) - if $config{rcs}; - -system("ikiwiki", "-setup", $setup, "-refresh"); diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in new file mode 100755 index 000000000..9738ea5f7 --- /dev/null +++ b/ikiwiki-calendar.in @@ -0,0 +1,58 @@ +#!/usr/bin/perl +use warnings; +use strict; +use lib '.'; # For use in nonstandard directory, munged by Makefile. +use IkiWiki; +use IkiWiki::Setup; +use Getopt::Long; + +sub usage () { + die gettext("usage: ikiwiki-calendar [-f] your.setup [pagespec] [year]"), "\n"; +} + +my $force=0; +GetOptions( + "force" => \$force, +) || usage(); +my $setup=shift || usage(); +my $pagespec=shift || "*"; +my $startyear=shift || 1900+(localtime(time))[5]; +my $endyear=shift || $startyear; + +%config=IkiWiki::defaultconfig(); +IkiWiki::Setup::load($setup); +IkiWiki::loadplugins(); +IkiWiki::checkconfig(); + +my $archivebase = 'archives'; +$archivebase = $config{archivebase} if defined $config{archivebase}; + +sub writearchive ($$;$) { + my $template=template(shift); + my $year=shift; + my $month=shift; + + my $page=defined $month ? "$year/$month" : $year; + + my $pagefile=newpagefile("$archivebase/$page", $config{default_pageext}); + $template->param(pagespec => $pagespec); + $template->param(year => $year); + $template->param(month => $month) if defined $month; + + if ($force || ! -e "$config{srcdir}/$pagefile") { + writefile($pagefile, $config{srcdir}, $template->output); + IkiWiki::rcs_add($pagefile) if $config{rcs}; + } +} + +foreach my $y ($startyear..$endyear) { + writearchive("calendaryear.tmpl", $y); + foreach my $m (qw{01 02 03 04 05 06 07 08 09 10 11 12}) { + writearchive("calendarmonth.tmpl", $y, $m); + } +} + +IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef) + if $config{rcs}; + +system("ikiwiki", "-setup", $setup, "-refresh"); diff --git a/ikiwiki-transition b/ikiwiki-transition deleted file mode 100755 index 1bebb1176..000000000 --- a/ikiwiki-transition +++ /dev/null @@ -1,348 +0,0 @@ -#!/usr/bin/perl -use warnings; -use strict; -use IkiWiki; -use HTML::Entities; - -my $regex = qr{ - (\\?) # 1: escape? - \[\[(!?) # directive open; 2: optional prefix - ([-\w]+) # 3: command - ( # 4: the parameters (including initial whitespace) - \s+ - (?: - (?:[-\w]+=)? # named parameter key? - (?: - """.*?""" # triple-quoted value - | - "[^"]+" # single-quoted value - | - [^\s\]]+ # unquoted value - ) - \s* # whitespace or end - # of directive - ) - *) # 0 or more parameters - \]\] # directive closed -}sx; - -sub handle_directive { - my $escape = shift; - my $prefix = shift; - my $directive = shift; - my $args = shift; - - if (length $escape) { - return "${escape}[[${prefix}${directive}${args}]]" - } - if ($directive =~ m/^(if|more|table|template|toggleable)$/) { - $args =~ s{$regex}{handle_directive($1, $2, $3, $4)}eg; - } - return "[[!${directive}${args}]]" -} - -sub prefix_directives { - loadsetup(shift); - - IkiWiki::loadplugins(); - IkiWiki::checkconfig(); - IkiWiki::loadindex(); - - if (! %pagesources) { - error "ikiwiki has not built this wiki yet, cannot transition"; - } - - foreach my $page (values %pagesources) { - next unless defined pagetype($page) && - -f $config{srcdir}."/".$page; - my $content=readfile($config{srcdir}."/".$page); - my $oldcontent=$content; - $content=~s{$regex}{handle_directive($1, $2, $3, $4)}eg; - if ($oldcontent ne $content) { - writefile($page, $config{srcdir}, $content); - } - } -} - -sub indexdb { - setstatedir(shift); - - # Note: No lockwiki here because ikiwiki already locks it - # before calling this. - if (! IkiWiki::oldloadindex()) { - die "failed to load index\n"; - } - if (! IkiWiki::saveindex()) { - die "failed to save indexdb\n" - } - if (! IkiWiki::loadindex()) { - die "transition failed, cannot load new indexdb\n"; - } - if (! unlink("$config{wikistatedir}/index")) { - die "unlink failed: $!\n"; - } -} - -sub hashpassword { - setstatedir(shift); - - eval q{use IkiWiki::UserInfo}; - eval q{use Authen::Passphrase::BlowfishCrypt}; - if ($@) { - error("ikiwiki-transition hashpassword: failed to load Authen::Passphrase, passwords not hashed"); - } - - IkiWiki::lockwiki(); - IkiWiki::loadplugin("passwordauth"); - my $userinfo = IkiWiki::userinfo_retrieve(); - foreach my $user (keys %{$userinfo}) { - if (ref $userinfo->{$user} && - exists $userinfo->{$user}->{password} && - length $userinfo->{$user}->{password} && - ! exists $userinfo->{$user}->{cryptpassword}) { - IkiWiki::Plugin::passwordauth::setpassword($user, $userinfo->{$user}->{password}); - } - } -} - -sub aggregateinternal { - loadsetup(shift); - require IkiWiki::Plugin::aggregate; - IkiWiki::checkconfig(); - IkiWiki::Plugin::aggregate::migrate_to_internal(); -} - -sub setupformat { - my $setup=shift; - - loadsetup($setup); - IkiWiki::checkconfig(); - - # unpack old-format wrappers setting into new fields - my $cgi_seen=0; - my $rcs_seen=0; - foreach my $wrapper (@{$config{wrappers}}) { - if ($wrapper->{cgi}) { - if ($cgi_seen) { - die "don't know what to do with second cgi wrapper ".$wrapper->{wrapper}."\n"; - } - $cgi_seen++; - print "setting cgi_wrapper to ".$wrapper->{wrapper}."\n"; - $config{cgi_wrapper}=$wrapper->{wrapper}; - $config{cgi_wrappermode}=$wrapper->{wrappermode} - if exists $wrapper->{wrappermode}; - } - elsif ($config{rcs}) { - if ($rcs_seen) { - die "don't know what to do with second rcs wrapper ".$wrapper->{wrapper}."\n"; - } - $rcs_seen++; - print "setting $config{rcs}_wrapper to ".$wrapper->{wrapper}."\n"; - $config{$config{rcs}."_wrapper"}=$wrapper->{wrapper}; - $config{$config{rcs}."_wrappermode"}=$wrapper->{wrappermode} - if exists $wrapper->{wrappermode}; - } - else { - die "don't know what to do with wrapper ".$wrapper->{wrapper}."\n"; - } - } - - IkiWiki::Setup::dump($setup); -} - -sub moveprefs { - my $setup=shift; - - loadsetup($setup); - IkiWiki::checkconfig(); - - eval q{use IkiWiki::UserInfo}; - error $@ if $@; - - foreach my $field (qw{allowed_attachments locked_pages}) { - my $orig=$config{$field}; - foreach my $admin (@{$config{adminuser}}) { - my $a=IkiWiki::userinfo_get($admin, $field); - if (defined $a && length $a && - # might already have been moved - (! defined $orig || $a ne $orig)) { - if (defined $config{$field} && - length $config{$field}) { - $config{$field}=IkiWiki::pagespec_merge($config{$field}, $a); - } - else { - $config{$field}=$a; - } - } - } - } - - my %banned=map { $_ => 1 } @{$config{banned_users}}, IkiWiki::get_banned_users(); - $config{banned_users}=[sort keys %banned]; - - IkiWiki::Setup::dump($setup); -} - -sub deduplinks { - loadsetup(shift); - IkiWiki::loadplugins(); - IkiWiki::checkconfig(); - IkiWiki::loadindex(); - foreach my $page (keys %links) { - my %l; - $l{$_}=1 foreach @{$links{$page}}; - $links{$page}=[keys %l] - } - IkiWiki::saveindex(); -} - -sub setstatedir { - my $dirorsetup=shift; - - if (! defined $dirorsetup) { - usage(); - } - - if (-d $dirorsetup) { - $config{wikistatedir}=$dirorsetup."/.ikiwiki"; - } - elsif (-f $dirorsetup) { - loadsetup($dirorsetup); - } - else { - error("ikiwiki-transition: $dirorsetup does not exist"); - } - - if (! -d $config{wikistatedir}) { - error("ikiwiki-transition: $config{wikistatedir} does not exist"); - } -} - -sub loadsetup { - my $setup=shift; - if (! defined $setup) { - usage(); - } - - require IkiWiki::Setup; - - %config = IkiWiki::defaultconfig(); - IkiWiki::Setup::load($setup); -} - -sub usage { - print STDERR "Usage: ikiwiki-transition type ...\n"; - print STDERR "Currently supported transition subcommands:\n"; - print STDERR "\tprefix_directives setupfile ...\n"; - print STDERR "\taggregateinternal setupfile\n"; - print STDERR "\tsetupformat setupfile\n"; - print STDERR "\tmoveprefs setupfile\n"; - print STDERR "\thashpassword setupfile|srcdir\n"; - print STDERR "\tindexdb setupfile|srcdir\n"; - print STDERR "\tdeduplinks setupfile\n"; - exit 1; -} - -usage() unless @ARGV; - -my $mode=shift; -if ($mode eq 'prefix_directives') { - prefix_directives(@ARGV); -} -elsif ($mode eq 'hashpassword') { - hashpassword(@ARGV); -} -elsif ($mode eq 'indexdb') { - indexdb(@ARGV); -} -elsif ($mode eq 'aggregateinternal') { - aggregateinternal(@ARGV); -} -elsif ($mode eq 'setupformat') { - setupformat(@ARGV); -} -elsif ($mode eq 'moveprefs') { - moveprefs(@ARGV); -} -elsif ($mode eq 'deduplinks') { - deduplinks(@ARGV); -} -else { - usage(); -} - -package IkiWiki; - -# A slightly modified version of the old loadindex function. -sub oldloadindex { - %oldrenderedfiles=%pagectime=(); - if (! $config{rebuild}) { - %pagesources=%pagemtime=%oldlinks=%links=%depends= - %destsources=%renderedfiles=%pagecase=%pagestate=(); - } - open (my $in, "<", "$config{wikistatedir}/index") || return; - while (<$in>) { - chomp; - my %items; - $items{link}=[]; - $items{dest}=[]; - foreach my $i (split(/ /, $_)) { - my ($item, $val)=split(/=/, $i, 2); - push @{$items{$item}}, decode_entities($val); - } - - next unless exists $items{src}; # skip bad lines for now - - my $page=pagename($items{src}[0]); - if (! $config{rebuild}) { - $pagesources{$page}=$items{src}[0]; - $pagemtime{$page}=$items{mtime}[0]; - $oldlinks{$page}=[@{$items{link}}]; - $links{$page}=[@{$items{link}}]; - $depends{$page}={ $items{depends}[0] => $IkiWiki::DEPEND_CONTENT } if exists $items{depends}; - $destsources{$_}=$page foreach @{$items{dest}}; - $renderedfiles{$page}=[@{$items{dest}}]; - $pagecase{lc $page}=$page; - foreach my $k (grep /_/, keys %items) { - my ($id, $key)=split(/_/, $k, 2); - $pagestate{$page}{decode_entities($id)}{decode_entities($key)}=$items{$k}[0]; - } - } - $oldrenderedfiles{$page}=[@{$items{dest}}]; - $pagectime{$page}=$items{ctime}[0]; - } - - # saveindex relies on %hooks being populated, else it won't save - # the page state owned by a given hook. But no plugins are loaded - # by this program, so populate %hooks with all hook ids that - # currently have page state. - foreach my $page (keys %pagemtime) { - foreach my $id (keys %{$pagestate{$page}}) { - $hooks{_dummy}{$id}=1; - } - } - - return close($in); -} - -# Used to be in IkiWiki/UserInfo, but only used here now. -sub get_banned_users () { - my @ret; - my $userinfo=userinfo_retrieve(); - foreach my $user (keys %{$userinfo}) { - push @ret, $user if $userinfo->{$user}->{banned}; - } - return @ret; -} - -# Used to be in IkiWiki, but only used here (to migrate admin prefs into the -# setup file) now. -sub pagespec_merge ($$) { - my $a=shift; - my $b=shift; - - return $a if $a eq $b; - return "($a) or ($b)"; -} - -1 diff --git a/ikiwiki-transition.in b/ikiwiki-transition.in new file mode 100755 index 000000000..e3be645cc --- /dev/null +++ b/ikiwiki-transition.in @@ -0,0 +1,349 @@ +#!/usr/bin/perl +use warnings; +use strict; +use lib '.'; # For use in nonstandard directory, munged by Makefile. +use IkiWiki; +use HTML::Entities; + +my $regex = qr{ + (\\?) # 1: escape? + \[\[(!?) # directive open; 2: optional prefix + ([-\w]+) # 3: command + ( # 4: the parameters (including initial whitespace) + \s+ + (?: + (?:[-\w]+=)? # named parameter key? + (?: + """.*?""" # triple-quoted value + | + "[^"]+" # single-quoted value + | + [^\s\]]+ # unquoted value + ) + \s* # whitespace or end + # of directive + ) + *) # 0 or more parameters + \]\] # directive closed +}sx; + +sub handle_directive { + my $escape = shift; + my $prefix = shift; + my $directive = shift; + my $args = shift; + + if (length $escape) { + return "${escape}[[${prefix}${directive}${args}]]" + } + if ($directive =~ m/^(if|more|table|template|toggleable)$/) { + $args =~ s{$regex}{handle_directive($1, $2, $3, $4)}eg; + } + return "[[!${directive}${args}]]" +} + +sub prefix_directives { + loadsetup(shift); + + IkiWiki::loadplugins(); + IkiWiki::checkconfig(); + IkiWiki::loadindex(); + + if (! %pagesources) { + error "ikiwiki has not built this wiki yet, cannot transition"; + } + + foreach my $page (values %pagesources) { + next unless defined pagetype($page) && + -f $config{srcdir}."/".$page; + my $content=readfile($config{srcdir}."/".$page); + my $oldcontent=$content; + $content=~s{$regex}{handle_directive($1, $2, $3, $4)}eg; + if ($oldcontent ne $content) { + writefile($page, $config{srcdir}, $content); + } + } +} + +sub indexdb { + setstatedir(shift); + + # Note: No lockwiki here because ikiwiki already locks it + # before calling this. + if (! IkiWiki::oldloadindex()) { + die "failed to load index\n"; + } + if (! IkiWiki::saveindex()) { + die "failed to save indexdb\n" + } + if (! IkiWiki::loadindex()) { + die "transition failed, cannot load new indexdb\n"; + } + if (! unlink("$config{wikistatedir}/index")) { + die "unlink failed: $!\n"; + } +} + +sub hashpassword { + setstatedir(shift); + + eval q{use IkiWiki::UserInfo}; + eval q{use Authen::Passphrase::BlowfishCrypt}; + if ($@) { + error("ikiwiki-transition hashpassword: failed to load Authen::Passphrase, passwords not hashed"); + } + + IkiWiki::lockwiki(); + IkiWiki::loadplugin("passwordauth"); + my $userinfo = IkiWiki::userinfo_retrieve(); + foreach my $user (keys %{$userinfo}) { + if (ref $userinfo->{$user} && + exists $userinfo->{$user}->{password} && + length $userinfo->{$user}->{password} && + ! exists $userinfo->{$user}->{cryptpassword}) { + IkiWiki::Plugin::passwordauth::setpassword($user, $userinfo->{$user}->{password}); + } + } +} + +sub aggregateinternal { + loadsetup(shift); + require IkiWiki::Plugin::aggregate; + IkiWiki::checkconfig(); + IkiWiki::Plugin::aggregate::migrate_to_internal(); +} + +sub setupformat { + my $setup=shift; + + loadsetup($setup); + IkiWiki::checkconfig(); + + # unpack old-format wrappers setting into new fields + my $cgi_seen=0; + my $rcs_seen=0; + foreach my $wrapper (@{$config{wrappers}}) { + if ($wrapper->{cgi}) { + if ($cgi_seen) { + die "don't know what to do with second cgi wrapper ".$wrapper->{wrapper}."\n"; + } + $cgi_seen++; + print "setting cgi_wrapper to ".$wrapper->{wrapper}."\n"; + $config{cgi_wrapper}=$wrapper->{wrapper}; + $config{cgi_wrappermode}=$wrapper->{wrappermode} + if exists $wrapper->{wrappermode}; + } + elsif ($config{rcs}) { + if ($rcs_seen) { + die "don't know what to do with second rcs wrapper ".$wrapper->{wrapper}."\n"; + } + $rcs_seen++; + print "setting $config{rcs}_wrapper to ".$wrapper->{wrapper}."\n"; + $config{$config{rcs}."_wrapper"}=$wrapper->{wrapper}; + $config{$config{rcs}."_wrappermode"}=$wrapper->{wrappermode} + if exists $wrapper->{wrappermode}; + } + else { + die "don't know what to do with wrapper ".$wrapper->{wrapper}."\n"; + } + } + + IkiWiki::Setup::dump($setup); +} + +sub moveprefs { + my $setup=shift; + + loadsetup($setup); + IkiWiki::checkconfig(); + + eval q{use IkiWiki::UserInfo}; + error $@ if $@; + + foreach my $field (qw{allowed_attachments locked_pages}) { + my $orig=$config{$field}; + foreach my $admin (@{$config{adminuser}}) { + my $a=IkiWiki::userinfo_get($admin, $field); + if (defined $a && length $a && + # might already have been moved + (! defined $orig || $a ne $orig)) { + if (defined $config{$field} && + length $config{$field}) { + $config{$field}=IkiWiki::pagespec_merge($config{$field}, $a); + } + else { + $config{$field}=$a; + } + } + } + } + + my %banned=map { $_ => 1 } @{$config{banned_users}}, IkiWiki::get_banned_users(); + $config{banned_users}=[sort keys %banned]; + + IkiWiki::Setup::dump($setup); +} + +sub deduplinks { + loadsetup(shift); + IkiWiki::loadplugins(); + IkiWiki::checkconfig(); + IkiWiki::loadindex(); + foreach my $page (keys %links) { + my %l; + $l{$_}=1 foreach @{$links{$page}}; + $links{$page}=[keys %l] + } + IkiWiki::saveindex(); +} + +sub setstatedir { + my $dirorsetup=shift; + + if (! defined $dirorsetup) { + usage(); + } + + if (-d $dirorsetup) { + $config{wikistatedir}=$dirorsetup."/.ikiwiki"; + } + elsif (-f $dirorsetup) { + loadsetup($dirorsetup); + } + else { + error("ikiwiki-transition: $dirorsetup does not exist"); + } + + if (! -d $config{wikistatedir}) { + error("ikiwiki-transition: $config{wikistatedir} does not exist"); + } +} + +sub loadsetup { + my $setup=shift; + if (! defined $setup) { + usage(); + } + + require IkiWiki::Setup; + + %config = IkiWiki::defaultconfig(); + IkiWiki::Setup::load($setup); +} + +sub usage { + print STDERR "Usage: ikiwiki-transition type ...\n"; + print STDERR "Currently supported transition subcommands:\n"; + print STDERR "\tprefix_directives setupfile ...\n"; + print STDERR "\taggregateinternal setupfile\n"; + print STDERR "\tsetupformat setupfile\n"; + print STDERR "\tmoveprefs setupfile\n"; + print STDERR "\thashpassword setupfile|srcdir\n"; + print STDERR "\tindexdb setupfile|srcdir\n"; + print STDERR "\tdeduplinks setupfile\n"; + exit 1; +} + +usage() unless @ARGV; + +my $mode=shift; +if ($mode eq 'prefix_directives') { + prefix_directives(@ARGV); +} +elsif ($mode eq 'hashpassword') { + hashpassword(@ARGV); +} +elsif ($mode eq 'indexdb') { + indexdb(@ARGV); +} +elsif ($mode eq 'aggregateinternal') { + aggregateinternal(@ARGV); +} +elsif ($mode eq 'setupformat') { + setupformat(@ARGV); +} +elsif ($mode eq 'moveprefs') { + moveprefs(@ARGV); +} +elsif ($mode eq 'deduplinks') { + deduplinks(@ARGV); +} +else { + usage(); +} + +package IkiWiki; + +# A slightly modified version of the old loadindex function. +sub oldloadindex { + %oldrenderedfiles=%pagectime=(); + if (! $config{rebuild}) { + %pagesources=%pagemtime=%oldlinks=%links=%depends= + %destsources=%renderedfiles=%pagecase=%pagestate=(); + } + open (my $in, "<", "$config{wikistatedir}/index") || return; + while (<$in>) { + chomp; + my %items; + $items{link}=[]; + $items{dest}=[]; + foreach my $i (split(/ /, $_)) { + my ($item, $val)=split(/=/, $i, 2); + push @{$items{$item}}, decode_entities($val); + } + + next unless exists $items{src}; # skip bad lines for now + + my $page=pagename($items{src}[0]); + if (! $config{rebuild}) { + $pagesources{$page}=$items{src}[0]; + $pagemtime{$page}=$items{mtime}[0]; + $oldlinks{$page}=[@{$items{link}}]; + $links{$page}=[@{$items{link}}]; + $depends{$page}={ $items{depends}[0] => $IkiWiki::DEPEND_CONTENT } if exists $items{depends}; + $destsources{$_}=$page foreach @{$items{dest}}; + $renderedfiles{$page}=[@{$items{dest}}]; + $pagecase{lc $page}=$page; + foreach my $k (grep /_/, keys %items) { + my ($id, $key)=split(/_/, $k, 2); + $pagestate{$page}{decode_entities($id)}{decode_entities($key)}=$items{$k}[0]; + } + } + $oldrenderedfiles{$page}=[@{$items{dest}}]; + $pagectime{$page}=$items{ctime}[0]; + } + + # saveindex relies on %hooks being populated, else it won't save + # the page state owned by a given hook. But no plugins are loaded + # by this program, so populate %hooks with all hook ids that + # currently have page state. + foreach my $page (keys %pagemtime) { + foreach my $id (keys %{$pagestate{$page}}) { + $hooks{_dummy}{$id}=1; + } + } + + return close($in); +} + +# Used to be in IkiWiki/UserInfo, but only used here now. +sub get_banned_users () { + my @ret; + my $userinfo=userinfo_retrieve(); + foreach my $user (keys %{$userinfo}) { + push @ret, $user if $userinfo->{$user}->{banned}; + } + return @ret; +} + +# Used to be in IkiWiki, but only used here (to migrate admin prefs into the +# setup file) now. +sub pagespec_merge ($$) { + my $a=shift; + my $b=shift; + + return $a if $a eq $b; + return "($a) or ($b)"; +} + +1 diff --git a/ikiwiki.spec b/ikiwiki.spec index 2bb87724d..532a91885 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20100312 +Version: 3.20100324 Release: 1%{?dist} Summary: A wiki compiler -- cgit v1.2.3 From c4108d58dcef2805deeb1370367d718d9b8f3184 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Sun, 28 Mar 2010 05:06:52 +0000 Subject: Better URL for my Ikiwiki instance; changed the note about DNS. --- doc/users/ivan_shmakov.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/ivan_shmakov.mdwn b/doc/users/ivan_shmakov.mdwn index 41bf9b09a..de58cb207 100644 --- a/doc/users/ivan_shmakov.mdwn +++ b/doc/users/ivan_shmakov.mdwn @@ -1,3 +1,4 @@ … To put it short: an Ikiwiki newbie. -I run an Ikiwiki instance at <http://gray.am-1.org/~ivan/lhc/> (though the DNS servers seem to be temporarily out of smoke as of 2010-03-12Z.) +I run an Ikiwiki instance at <http://gray.siamics.net/~ivan/lhc/> +(though the DNS servers may be flacky due to transition to Dyn Inc.) -- cgit v1.2.3 From ec110abc6d412db5f65ea5b9311596bbe7799fd4 Mon Sep 17 00:00:00 2001 From: Redtexture <Redtexture@web> Date: Sun, 28 Mar 2010 12:21:51 +0000 Subject: add "wait" (best to wait to tackle...) --- doc/tips/spam_and_softwaresites.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn index fe73518ef..78a35ff05 100644 --- a/doc/tips/spam_and_softwaresites.mdwn +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -82,5 +82,5 @@ Caveat: if there are no commits you want to keep (i.e. all the commits since the last merge into master are either spam or spam reverts) then `git rebase` will abort. Therefore, this approach only works if you have at least one non-spam commit to the documentation since the last merge into `master`. For -this reason, it's best to tackle spam with reverts until you have at least one +this reason, it's best wait to tackle spam with reverts until you have at least one commit you want merged back into the main history. -- cgit v1.2.3 From 9c6b12fe3de453869be7fa2ae5c1d07e9751a69c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sun, 28 Mar 2010 14:52:03 +0000 Subject: revert misleading clarification, and try to clarify better --- doc/tips/spam_and_softwaresites.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn index 78a35ff05..507858c0c 100644 --- a/doc/tips/spam_and_softwaresites.mdwn +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -82,5 +82,6 @@ Caveat: if there are no commits you want to keep (i.e. all the commits since the last merge into master are either spam or spam reverts) then `git rebase` will abort. Therefore, this approach only works if you have at least one non-spam commit to the documentation since the last merge into `master`. For -this reason, it's best wait to tackle spam with reverts until you have at least one -commit you want merged back into the main history. +this reason, it's best to wait until you have at least one +commit you want merged back into the main history before doing a rebase, +and until then, tackle spam with reverts. -- cgit v1.2.3 From ba05b907e3563f9aa25a4322abd9ab2d5b56b36b Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Sun, 28 Mar 2010 15:58:37 +0000 Subject: More wishlist items for the `xslt` plugin. --- doc/plugins/contrib/xslt/discussion.mdwn | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/xslt/discussion.mdwn b/doc/plugins/contrib/xslt/discussion.mdwn index 9cda02f88..72cce083c 100644 --- a/doc/plugins/contrib/xslt/discussion.mdwn +++ b/doc/plugins/contrib/xslt/discussion.mdwn @@ -20,3 +20,30 @@ possible. Can it also read other arbitrary files, run other programs, etc? > For the second point, I think the main concern would be resource usage. XSLT is a pretty limited language; it can read other XML files, but it can't run other programs so far as I know. > -- [[KathrynAndersen]] + +>> XSLT is, indeed, a Turing-complete programming language. + However, [XML::LibXSLT][] provides a set of functions to help + to minimize the damage that may be caused by running a random + program. + +>> In particular, `max_depth ()` allows for the maximum + recursion depth to be set, while + `read_file ()`, `write_file ()`, `create_dir ()`, + `read_net ()` and `write_net ()` + are the callbacks that allow any of the possible file + operations to be denied. + +>> To be honest, I'd prefer for the `read_file ()` callback to + only grant access to the files below the Ikiwiki source + directory, and for all the `write_`… and + …`_net` callbacks to deny the access unconditionally. + +>> One more wishlist item: allow the set of locations to take + `.xsl` files from to be preconfigured, so that, e. g., + one could allow (preasumably trusted) system stylesheets, + while disallowing any stylesheets that are placed on the Wiki + itself. + +>> — Ivan Shmakov, 2010-03-28Z. + +[XML::LibXSLT]: http://search.cpan.org/~PAJAS/XML-LibXSLT/LibXSLT.pm -- cgit v1.2.3 From e1eee27fc59dd6126e80ef21e4cc44191119902c Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" <http://hendry.iki.fi/@web> Date: Sun, 28 Mar 2010 20:01:41 +0000 Subject: --- doc/bugs/Comments_dissapeared.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/bugs/Comments_dissapeared.mdwn (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn new file mode 100644 index 000000000..f71a442b8 --- /dev/null +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -0,0 +1,9 @@ +Although I have comments enabled and I have been using them successfully for ages now, I've come to notice that they have stopped working in the last week or two. + +I am running version 3.20100312 with the following configuration: + +<http://static.natalian.org/2010-03-27/natalian.txt> + +In my (HTML5 modified page.tmpl) it doesn't seem to enter the "TMPL_IF COMMENTS" block anymore. I tried the stock page.tmpl and they didn't seem to work either, so the variable name hasn't changed has it? + +Any other ideas? With thanks, -- cgit v1.2.3 From a1f50f6a31d4e9f7acd6f8d445e5fb39edba5138 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Mar 2010 17:37:42 -0400 Subject: response --- doc/bugs/Comments_dissapeared.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index f71a442b8..b737d9bef 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -7,3 +7,9 @@ I am running version 3.20100312 with the following configuration: In my (HTML5 modified page.tmpl) it doesn't seem to enter the "TMPL_IF COMMENTS" block anymore. I tried the stock page.tmpl and they didn't seem to work either, so the variable name hasn't changed has it? Any other ideas? With thanks, + + comments_pagespec => 'archives/* and !*/Discussion', + +> Your setup file only allows comments to pages under archives. That +> seems unlikely to be right, so I guess it is causing your problem. +> --[[Joey]] -- cgit v1.2.3 From 7e9d1932a2b90d5092315c18603cf495da28d6da Mon Sep 17 00:00:00 2001 From: "http://schors.livejournal.com/" <http://schors.livejournal.com/@web> Date: Sun, 28 Mar 2010 22:01:53 +0000 Subject: --- doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn (limited to 'doc') diff --git a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn new file mode 100644 index 000000000..6ad7975eb --- /dev/null +++ b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn @@ -0,0 +1,2 @@ +When build wrapper on FreeBSD system, is error occured with clearenv reference. clearenv() das not exists at FreeBSD system, use workaround environ[0]=NULL; +P.S. new git instalation, FreeBSD 7.x -- cgit v1.2.3 From 0c6e467aa6931ec6bd7720ecaea5e33aeca4d1be Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Mar 2010 18:27:23 -0400 Subject: use __TINYC__ define to avoid tinyc compat fixes breaking FreeBSD To review, tcc does not really use environ, so you have to use clearenv there. But POSIX, in their wisdom, didn't standardise clearenv yet, so on FreeBSD, one still needs to manipulate environ on their own. (If you use tcc on FreeBSD, this may leave you unsatisfied.) --- IkiWiki/Wrapper.pm | 6 ++++++ doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn | 3 +++ 2 files changed, 9 insertions(+) (limited to 'doc') diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index f175b4a0b..3f3e63ca6 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -101,6 +101,7 @@ EOF #include <string.h> #include <sys/file.h> +extern char **environ; char *newenviron[$#envsave+6]; int i=0; @@ -121,12 +122,17 @@ $envsave newenviron[i++]="HOME=$ENV{HOME}"; newenviron[i++]="WRAPPED_OPTIONS=$configstring"; +#ifdef __TINYC__ if (clearenv() != 0) { perror("clearenv"); exit(1); } for (; i>0; i--) putenv(newenviron[i-1]); +#else + newenviron[i]=NULL; + environ=newenviron; +#endif if (setregid(getegid(), -1) != 0 && setregid(getegid(), -1) != 0) { diff --git a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn index 6ad7975eb..c2355d6aa 100644 --- a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn +++ b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn @@ -1,2 +1,5 @@ When build wrapper on FreeBSD system, is error occured with clearenv reference. clearenv() das not exists at FreeBSD system, use workaround environ[0]=NULL; P.S. new git instalation, FreeBSD 7.x + +> #include <stupid-standards.h> fixed with nasty ifdefs to handle tcc w/o +> breaking everything else. ||done]] --[[Joey]] -- cgit v1.2.3 From 6d04e182c4f4f44da37725444a540851fd36ba13 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Mar 2010 18:36:37 -0400 Subject: formatting --- doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn index c2355d6aa..ac82541a3 100644 --- a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn +++ b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn @@ -1,5 +1,5 @@ When build wrapper on FreeBSD system, is error occured with clearenv reference. clearenv() das not exists at FreeBSD system, use workaround environ[0]=NULL; P.S. new git instalation, FreeBSD 7.x -> #include <stupid-standards.h> fixed with nasty ifdefs to handle tcc w/o +> `#include <stupid-standards.h>` fixed with nasty ifdefs to handle tcc w/o > breaking everything else. ||done]] --[[Joey]] -- cgit v1.2.3 From 15164671ceeed70f25cbfe53d81143eb5b13c863 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Mar 2010 18:37:00 -0400 Subject: formatting --- doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn index ac82541a3..f38c86e03 100644 --- a/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn +++ b/doc/bugs/clearenv_not_present_at_FreeBSD_.mdwn @@ -2,4 +2,4 @@ When build wrapper on FreeBSD system, is error occured with clearenv reference. P.S. new git instalation, FreeBSD 7.x > `#include <stupid-standards.h>` fixed with nasty ifdefs to handle tcc w/o -> breaking everything else. ||done]] --[[Joey]] +> breaking everything else. [[done]] --[[Joey]] -- cgit v1.2.3 From 1de069338de86dd6e785d9771140b2b687100451 Mon Sep 17 00:00:00 2001 From: "http://schors.livejournal.com/" <http://schors.livejournal.com/@web> Date: Sun, 28 Mar 2010 22:43:24 +0000 Subject: --- doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn (limited to 'doc') diff --git a/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn b/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn new file mode 100644 index 000000000..61964539d --- /dev/null +++ b/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn @@ -0,0 +1,5 @@ +If i intsall perl modules in my custom directory, cgi wrapper can't find them. I found clearing enviroment variables in code of wrapper. But information about custom directories put to perl with PERL5LIB variable. + +Workaround: add newenviron variable PERL5LIB + +My additional question - what wrapper do? I'am russian hosting provider. I am interesting with ikiwiki. -- cgit v1.2.3 From 02e6ec9dd2c5e1e260a1f18406942059fe3d2064 Mon Sep 17 00:00:00 2001 From: "http://schors.livejournal.com/" <http://schors.livejournal.com/@web> Date: Sun, 28 Mar 2010 22:47:17 +0000 Subject: --- doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn (limited to 'doc') diff --git a/doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn b/doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn new file mode 100644 index 000000000..713198b61 --- /dev/null +++ b/doc/bugs/clearenv_not_present_at_FreeBSD_/discussion.mdwn @@ -0,0 +1 @@ +Mmmm... i see. But it not setup under FreeBSD without magic manual passes. -- cgit v1.2.3 From 911533655186f7c43ac229a4cdbc5be3e7f80d49 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Mar 2010 18:49:15 -0400 Subject: response --- README | 2 +- doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/README b/README index a4dc0d641..7efc59a51 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ All other documentation is in the ikiwiki documentation wiki, which is also available online at <http://ikiwiki.info/> -A few special variables you can set while using the Makefile: +A few special variables you can set while using the Makefile.PL: PROFILE=1 turns on profiling for the build of the doc wiki. (Uses Devel::NYTProf) diff --git a/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn b/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn index 61964539d..9804d86c5 100644 --- a/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn +++ b/doc/bugs/wrapper_can__39__t_find_the_perl_modules.mdwn @@ -3,3 +3,14 @@ If i intsall perl modules in my custom directory, cgi wrapper can't find them. I Workaround: add newenviron variable PERL5LIB My additional question - what wrapper do? I'am russian hosting provider. I am interesting with ikiwiki. + +> The wrapper allows ikiwiki to run as the user who owns the wiki, which +> is generally not the same as the user that runs the web server. +> (It also handles some other things, like some locking.) +> +> As a suid program, the wrapper cannot safely let environment variables +> pass through. +> +> If you want to install ikiwiki's perl modules in a nonstandard location, +> you can set `INSTALL_BASE` when running `Makefile.PL`. ikiwiki will then +> be built to look in that location. --[[Joey]] [[!tag done]] -- cgit v1.2.3 From 6e7bfbe7bb8ba4b94d0e8c203b2117477b217384 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Mar 2010 19:23:34 -0400 Subject: auto-blog.setup: Set tagbase by default, since most bloggers will want it. Also modified first_post page to use a tag format that will work whether or not tagbase is set. --- auto-blog.setup | 1 + debian/changelog | 1 + doc/examples/blog/posts/first_post.mdwn | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/auto-blog.setup b/auto-blog.setup index 7ff413187..95347167f 100644 --- a/auto-blog.setup +++ b/auto-blog.setup @@ -48,4 +48,5 @@ IkiWiki::Setup::Automator->import( blogspam_pagespec => "postcomment(*)", discussion => 0, locked_pages => "*", + tagbase => "tags", ) diff --git a/debian/changelog b/debian/changelog index 57406c6d3..2d82c4dba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low that could lead to bad dependency handling in certian situations. * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar if necessary for unusual install. + * auto-blog.setup: Set tagbase by default, since most bloggers will want it. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/examples/blog/posts/first_post.mdwn b/doc/examples/blog/posts/first_post.mdwn index d49432341..7f814fbb1 100644 --- a/doc/examples/blog/posts/first_post.mdwn +++ b/doc/examples/blog/posts/first_post.mdwn @@ -1,4 +1,4 @@ This is the first post to this example blog. To add new posts, just add files to the posts/ subdirectory, or use the web form. -[[!tag tags/tech]] +[[!tag ./tags/tech]] -- cgit v1.2.3 From b6666f5ac81ef4c8646a6290cf5c885adf0e385f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 28 Mar 2010 19:28:48 -0400 Subject: fix tag Actually, tags can't be made to work with and w/o tagbase, so just make it assume tagbase is set. Better example anyway. (It'll be a broken link on ikiwiki.info though.) --- doc/examples/blog/posts/first_post.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/examples/blog/posts/first_post.mdwn b/doc/examples/blog/posts/first_post.mdwn index 7f814fbb1..f2729fcef 100644 --- a/doc/examples/blog/posts/first_post.mdwn +++ b/doc/examples/blog/posts/first_post.mdwn @@ -1,4 +1,4 @@ This is the first post to this example blog. To add new posts, just add files to the posts/ subdirectory, or use the web form. -[[!tag ./tags/tech]] +[[!tag tech]] -- cgit v1.2.3 From ae4e9b25b714b02ed7003a21da781fccf9475f38 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" <http://hendry.iki.fi/@web> Date: Mon, 29 Mar 2010 08:15:43 +0000 Subject: --- doc/bugs/Comments_dissapeared.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index b737d9bef..ad1638236 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -13,3 +13,8 @@ Any other ideas? With thanks, > Your setup file only allows comments to pages under archives. That > seems unlikely to be right, so I guess it is causing your problem. > --[[Joey]] + +That's the only place where I want comments. <http://natalian.org/archives/> +Has the pagespec changed? Is it `archives/*/*` or something like that? + +It worked just fine with this configuration. I swear I have not modified it. :) -- [[Kai Hendry]] -- cgit v1.2.3 From 263d9548969dcdf9a6add96f46fe03ba7701a1ca Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Mon, 29 Mar 2010 14:58:21 +0100 Subject: ping joey: consider patch for next release? --- doc/todo/allow_site-wide_meta_definitions.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 99a9cf1e2..be66db99d 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -183,3 +183,5 @@ definitions essentially. >>> ikiwiki for the break, and now I've returned to watching recentchanges. >>> Hopefully I'll be back in the mix soon, too. In the meantime, Joey, have >>> you had a chance to look at this yet? -- [[Jon]] +>>>> Ping :) Hi. [[Joey]], would you consider this patch for the next +>>>> ikiwiki release? -- [[Jon]] -- cgit v1.2.3 From 97898ce585b36dbcb0a83356ef3e54c41d369437 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 29 Mar 2010 12:16:53 -0400 Subject: review, multiple concerns --- doc/todo/allow_site-wide_meta_definitions.mdwn | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 99a9cf1e2..e4638f94b 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -36,6 +36,30 @@ definitions essentially. >> I've made may not be acceptable, though -- I'd appreciate someone providing >> some feedback on that hunk! +>>> Well, re that hunk, taint checking is currently disabled, but +>>> if the perl bug that disallows it is fixed and it is turned back on, +>>> the hash values will remain tainted, which will probably lead to +>>> problems. +>>> +>>> I'm also leery of using such a complex data structure in config. +>>> The websetup plugin would be hard pressed to provide a UI for such a +>>> data structure. (It lacks even UI for a single hash ref yet, let alone +>>> a list.) +>>> +>>> Also, it seems sorta wrong to have two so very different syntaxes to +>>> represent the same meta data. A user without a lot of experience will +>>> be hard pressed to map from a directive to this in the setup file. +>>> +>>> All of which leads me to think the setup file could just contain +>>> a text that could hold meta directives. Which generalizes really to +>>> a text that contains any directives, and is, perhaps appended to the +>>> top of every page. Which nearly generalizes to the sidebar plugin, +>>> or perhaps something more general than that... +>>> +>>> However, excessive generalization is the root of all evil, so +>>> I'm not necessarily saying that's a good idea. Indeed, my memory +>>> concerns below invalidate this idea pretty well. --[[Joey]] + diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 6fe9cda..2f8c098 100644 --- a/IkiWiki/Plugin/meta.pm @@ -125,6 +149,10 @@ definitions essentially. >> are only relevant to defined fields that you wouldn't want to specify a >> global default for anyway. >> +>>> I generally agree with this. It is *possible* that meta would have a new +>>> field added, that takes parameters and make sense to use globally. +>>> --[[Joey]] +>> >> Due to this, and the added complexity of the second patch (having to adjust >> `IkiWiki/Setup.pm`), I think the first patch makes more sense. I've thus >> reverted to it here. @@ -183,3 +211,21 @@ definitions essentially. >>> ikiwiki for the break, and now I've returned to watching recentchanges. >>> Hopefully I'll be back in the mix soon, too. In the meantime, Joey, have >>> you had a chance to look at this yet? -- [[Jon]] + +>>> For this to work with websetup and --dumpsetup, it needs to define the +>>> `meta_*` settings in the getsetup function. +>>> +>>> I also have some concerns about both these patches, since both throw +>>> a lot of redundant data at meta, which then stores it in a very redundant +>>> way. Specifically, meta populates a per-page `%metaheaders` hash +>>> as well as storing per-page metadata in `%pagestate`. So, if you have +>>> a wiki with a thousand pages, and you add a 1k site-wide license text, +>>> that will bloat the memory usage of ikiwiki by in excess of 2 +>>> megabytes. It will also cause ikiwiki to write a similar amount more data +>>> to its state file which has to be loaded back in each +>>> run. +>>> +>>> Seems that this could be managed much more efficiently by having +>>> meta special-case the site-wide settings, not store them in these +>>> per-page data structures, and just make them be used if no per-page +>>> metadata of the given type is present. --[[Joey]] -- cgit v1.2.3 From 7a8bcf2a6745d570bf9055df7b0390f9a9ca8a0d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 29 Mar 2010 12:19:22 -0400 Subject: fix bogus math --- doc/todo/allow_site-wide_meta_definitions.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 704cb2c64..01cf12c1a 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -222,7 +222,7 @@ definitions essentially. >>> a lot of redundant data at meta, which then stores it in a very redundant >>> way. Specifically, meta populates a per-page `%metaheaders` hash >>> as well as storing per-page metadata in `%pagestate`. So, if you have ->>> a wiki with a thousand pages, and you add a 1k site-wide license text, +>>> a wiki with 10 thousand pages, and you add a 1k site-wide license text, >>> that will bloat the memory usage of ikiwiki by in excess of 2 >>> megabytes. It will also cause ikiwiki to write a similar amount more data >>> to its state file which has to be loaded back in each -- cgit v1.2.3 From 3e192a4c4a2e80ce35ce35d5edc9afd6b2373f83 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 29 Mar 2010 13:17:49 -0400 Subject: add a table summarizing state of each rcs plugin --- doc/rcs.mdwn | 23 ++++++++++++++++++++--- docwiki.setup | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index f66b85495..cd41e7f49 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -7,10 +7,27 @@ Ikiwiki started out supporting only [[Subversion|svn]], but the interface ikiwiki uses to a revision control system is sufficiently simple and generic that it can be adapted to work with many systems by writing a [[plugin|plugins/write]]. [[Subversion|svn]] is still a recommended choice; -[[git]] is another well-tested option. +[[git]] is another well-tested option. -These are all the supported revision control systems: -[[!inline pages="rcs/* and !*/Discussion and !rcs/details" archive=yes]] +While all supported revision control systems work well enough for basic use, +some advanced or special features are not supported in all of them. +Lack of support in [[ikiwiki-makerepo]] or auto.setup can make it harder to +set up a wiki using that revision control system. The `rcs_commit_staged` +hook is needed to use [[plugins/attachments]] or [[plugins/comments]]. And so +on. The table below summarises this for each revision control system and links +to more information about each. + +[[!table data=""" +feature |[[git]]|[[svn]]|[[bzr]] |[[monotone]]|[[mercurial]]|[[darcs]]|[[tla]] |[[cvs]] +[[ikiwiki-makerepo]]|yes |yes |yes |yes |yes |yes |no |yes +auto.setup |yes |yes |incomplete|yes |incomplete |yes |incomplete|yes +`rcs_commit_staged` |yes |yes |yes |yes |no |yes |no |yes +`rcs_rename` |yes |yes |yes |yes |no |yes |no |yes +`rcs_remove` |yes |yes |yes |yes |no |yes |no |yes +`rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes +anonymous push |yes |no |no |no |no |no |no |no +conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes +"""]] There is a page with [[details]] about how the different systems work with ikiwiki, for the curious. diff --git a/docwiki.setup b/docwiki.setup index 86f012c50..8278b73ea 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -16,5 +16,5 @@ use IkiWiki::Setup::Standard { userdir => "users", usedirs => 0, prefix_directives => 1, - add_plugins => [qw{goodstuff version haiku polygen fortune}], + add_plugins => [qw{goodstuff version haiku polygen fortune table}], } -- cgit v1.2.3 From 6798a80acab43ce9b6869dea7236887faebc19e1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 29 Mar 2010 13:18:49 -0400 Subject: fix link --- doc/rcs.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index cd41e7f49..4e7a8d2a6 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -9,13 +9,13 @@ generic that it can be adapted to work with many systems by writing a [[plugin|plugins/write]]. [[Subversion|svn]] is still a recommended choice; [[git]] is another well-tested option. -While all supported revision control systems work well enough for basic use, -some advanced or special features are not supported in all of them. +While all supported revision control systems work well enough for basic +use, some advanced or special features are not supported in all of them. Lack of support in [[ikiwiki-makerepo]] or auto.setup can make it harder to set up a wiki using that revision control system. The `rcs_commit_staged` -hook is needed to use [[plugins/attachments]] or [[plugins/comments]]. And so -on. The table below summarises this for each revision control system and links -to more information about each. +hook is needed to use [[attachments|plugins/attachment]] or +[[plugins/comments]]. And so on. The table below summarises this for each +revision control system and links to more information about each. [[!table data=""" feature |[[git]]|[[svn]]|[[bzr]] |[[monotone]]|[[mercurial]]|[[darcs]]|[[tla]] |[[cvs]] -- cgit v1.2.3 From 68c67efeffd0f51e01cd557722632367f0dc3849 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 29 Mar 2010 13:27:50 -0400 Subject: clarify example with whitespace --- doc/ikiwiki/directive/table.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/table.mdwn b/doc/ikiwiki/directive/table.mdwn index e27a94b7c..2dac97724 100644 --- a/doc/ikiwiki/directive/table.mdwn +++ b/doc/ikiwiki/directive/table.mdwn @@ -6,8 +6,8 @@ or DSV (delimiter-separated values) format. ## examples \[[!table data=""" - Customer|Amount - Fulanito|134,34 + Customer |Amount + Fulanito |134,34 Menganito|234,56 Menganito|234,56 """]] -- cgit v1.2.3 From 675e34527f56021ce39e56e4288e8f0e32b36cfa Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Mon, 29 Mar 2010 19:59:40 +0100 Subject: thanks for the review, patch to be revised --- doc/todo/allow_site-wide_meta_definitions.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 01cf12c1a..7129a44ac 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -232,3 +232,6 @@ definitions essentially. >>> meta special-case the site-wide settings, not store them in these >>> per-page data structures, and just make them be used if no per-page >>> metadata of the given type is present. --[[Joey]] + +>>>> Thanks for the review - these are all valid points. I'll get working +>>>> on a revised patch. -- [[Jon]] -- cgit v1.2.3 From 0b63800df32fd6e5287a253ca01a099f79b77e6e Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Mon, 29 Mar 2010 20:00:56 +0100 Subject: this sounds like the correct approach --- doc/todo/more_flexible_inline_postform.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/more_flexible_inline_postform.mdwn b/doc/todo/more_flexible_inline_postform.mdwn index bc8bc0809..414476bd7 100644 --- a/doc/todo/more_flexible_inline_postform.mdwn +++ b/doc/todo/more_flexible_inline_postform.mdwn @@ -16,3 +16,8 @@ logical first step towards doing comment-like things with inlined pages). > Perhaps what we need is a `postform` plugin/directive that inline depends > on (automatically enables); its preprocess method could automatically be > invoked from preprocess_inline when needed. --[[smcv]] + +>> I've been looking at this stuff again. I think you are right, this would +>> be the right approach. The comments plugin could use it similarly, allowing +>> sites which desire it to have an inline comment submission form on all +>> pages with comments enabled. I'm going to take a look. -- [[Jon]] -- cgit v1.2.3 From b2890b4e8ff0dc0e0fbaed1ffd9848c48dedf611 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 29 Mar 2010 15:25:34 -0400 Subject: response --- doc/bugs/Comments_dissapeared.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index ad1638236..ac297028c 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -18,3 +18,13 @@ That's the only place where I want comments. <http://natalian.org/archives/> Has the pagespec changed? Is it `archives/*/*` or something like that? It worked just fine with this configuration. I swear I have not modified it. :) -- [[Kai Hendry]] + +> No changes that I can think of. 'archives/*' will match *all* pages under +> archives. Anyway, I can see in your site's rss feed that comments are +> enabled for posts, since they have comments tags there. And +> in fact I see comments on eg +> <http://natalian.org/archives/2010/03/25/BBC_News_complaints/>. +> +> So I suspect you have simply not rebuilt your wiki after making some +> change that fixed the comments, and so only newer pages are getting them. +> --[[Joey]] -- cgit v1.2.3 From 1c751e882ef2fe68bc4601dc5e927c4813f09706 Mon Sep 17 00:00:00 2001 From: "http://gustaf.thorslund.org/" <http://gustaf.thorslund.org/@web> Date: Mon, 29 Mar 2010 21:54:30 +0000 Subject: --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 289937121..379285a49 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -59,6 +59,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[roktas]] `git://github.com/roktas/ikiwiki.git` * [[davrieb|David_Riebenbauer]] `git://git.liegesta.at/git/ikiwiki` ([browse](http://git.liegesta.at/?p=ikiwiki.git;a=summary)) +* [[GustafThorslund]] `http://gustaf.thorslund.org/src/ikiwiki.git` ## branches -- cgit v1.2.3 From 8de983dd07a462eeb997b730c5729c6f598ae452 Mon Sep 17 00:00:00 2001 From: "http://gustaf.thorslund.org/" <http://gustaf.thorslund.org/@web> Date: Mon, 29 Mar 2010 22:07:27 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index b40fd461d..633400f21 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -142,6 +142,7 @@ Personal sites and blogs * [Andreas's homepage](http://0x7.ch/) - Ikiwiki, Subversion and CSS template * [Chris Dombroski's boring bliki](https://www.icanttype.org/) * [Josh Triplett's homepage](http://joshtriplett.org/) - Git backend with the CGI disabled, to publish a static site with the convenience of ikiwiki. +* [Gustaf Thorslund's blog](http://blog.thorslund.org) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 386e464188d817f90e1cb6535da2db6bcfaa3fa0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 30 Mar 2010 05:31:10 +0000 Subject: quick response --- doc/plugins/contrib/field/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index fc1759fab..4bb285a50 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -9,6 +9,10 @@ with IkiWiki's use of `<TMPL_VAR AUTHOR>` for the author of the *page* `<TMPL_VAR FIELD_AUTHOR>` or something? (For those who want the current behaviour, an auxiliary plugin would be easy.) +> No, please. The idea is to be *able* to override field names if one wishes to, and choose, for yourself, non-colliding field names if one wishes not to. I don't wish to lose the power of being able to, say, define a page title with YAML format if I want to, or to write a site-specific plugin which calculates a page title, or other nifty things. +>It's not like one is going to lose the fields defined by the meta plugin; if "author" is defined by \[[!meta author=...]] then that's what will be found by "field" (provided the "meta" plugin is registered; that's what the "field_register" option is for). +>--[[KathrynAndersen]] + From a coding style point of view, the `$CamelCase` variable names aren't IkiWiki style, and the `match_foo` functions look as though they could benefit from being thin wrappers around a common `&IkiWiki::Plugin::field::match` @@ -17,6 +21,8 @@ function (see `meta` for a similar approach). I think the documentation would probably be clearer in a less manpage-like and more ikiwiki-like style? +> I don't think ikiwiki *has* a "style" for docs, does it? So I followed the Perl Module style. And I'm rather baffled as to why having the docs laid out in clear sections... make them less clear. --[[KathrynAndersen]] + If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can stop reimplementing sorting. Here's the implementation I'm using, with -- cgit v1.2.3 From 2d1e4cce45024f6b2c384eaf7b5276c448cb3a05 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 30 Mar 2010 05:38:31 +0000 Subject: response --- doc/plugins/contrib/ftemplate/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index eb2ec6f13..adb66ee6a 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -7,7 +7,11 @@ hooks (probably easiest to just patch `template` to implement a second directive, or have a special parameter `run_hooks="yes"`, or something). +> I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] + +> Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] -- cgit v1.2.3 From a284d5fa0aed7778130f95c9883fe8815ecf37b6 Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" <http://www.google.com/profiles/schmonz@web> Date: Tue, 30 Mar 2010 05:48:51 +0000 Subject: update home page URL --- doc/users/schmonz.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/schmonz.mdwn b/doc/users/schmonz.mdwn index 7ebd8311c..03c52b6aa 100644 --- a/doc/users/schmonz.mdwn +++ b/doc/users/schmonz.mdwn @@ -1,3 +1,3 @@ -[Amitai Schlair](http://www.columbia.edu/~ays2105/) recently discovered ikiwiki and finds himself using it for all sorts of things. His attempts at contributing: +[Amitai Schlair](http://www.netbsd.org/~schmonz/) recently discovered ikiwiki and finds himself using it for all sorts of things. His attempts at contributing: [[!map pages="!*/Discussion and ((link(users/schmonz) and plugins/*) or rcs/cvs)"]] -- cgit v1.2.3 From 90c444d9f197a5a9b87d3e70248279ac68e351a6 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 30 Mar 2010 06:44:04 +0000 Subject: response --- doc/plugins/contrib/report/discussion.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 918d0779b..42a1009cb 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -18,6 +18,17 @@ removing the special case for `field`. Perhaps the `headers` thing could migrate into inline somehow? That might lead to making inline too big, though. +> I think inline is *already* too big, honestly. --[[KathrynAndersen]] + Is the intention that the `trail` part is a performance hack, or a way to select pages? How does it relate to [[todo/wikitrails]] or [[plugins/contrib/trail]]? --[[smcv]] + +> The `trail` part is *both* a performance hack, and a way to select pages. I have over 5000 pages on my site, I need all the performance hacks I can get. +> For the performance hack, it is a way of reducing the need to iterate through every single page in the wiki in order to find matching pages. +> For the way-to-select-pages, yes, it is intended to be similar to [[todo/wikitrails]] and [[plugins/contrib/trail]] (and will be more similar with the new release which will be happening soon; it will add prev_* and next_* variables). +> The idea is that, rather than having to add special "trail" links on PageA to indicate that a page is part of the trail, +> it takes advantage of the `%links` hash, which already contains, for each page, an array of the links from that page to other pages. No need for special markup, just use what's there; a trail is defined as "all the pages linked to from page X", and since it's an array, it has an order already. +> But to avoid that being too limiting, one can use a `pages=...` pagespec to filter that list to a subset; only the pages one is interested in. +> And one can also sort it, if one so desires. +> --[[KathrynAndersen]] -- cgit v1.2.3 From f673ce266c8dadb263c6850cc5f7d3e6e7a68e70 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 30 Mar 2010 12:01:35 +0000 Subject: feature request (part of ftemplate) --- doc/todo/user-defined_templates_outside_the_wiki.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/todo/user-defined_templates_outside_the_wiki.mdwn (limited to 'doc') diff --git a/doc/todo/user-defined_templates_outside_the_wiki.mdwn b/doc/todo/user-defined_templates_outside_the_wiki.mdwn new file mode 100644 index 000000000..880ad6493 --- /dev/null +++ b/doc/todo/user-defined_templates_outside_the_wiki.mdwn @@ -0,0 +1,8 @@ +[[!tag wishlist]] + +The [[plugins/contrib/ftemplate]] plugin looks for templates inside the wiki +source, but also looks in the system templates directory (the one with +`page.tmpl`). This means the wiki admin can provide templates that can be +invoked via `\[[!template]]`, but don't have to "work" as wiki pages in their +own right. I think the normal [[plugins/template]] plugin could benefit from +this functionality. -- cgit v1.2.3 From 026355cfa24dc911a247dcafca10c6ea74ae515b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 30 Mar 2010 12:09:59 +0000 Subject: respond and attempt to invoke Joey :-) --- doc/plugins/contrib/ftemplate/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index adb66ee6a..de4b35ef0 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -9,9 +9,24 @@ or something). > I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]] +>> `Render`, `inline`, `comments` and `recentchanges` run `pagetemplate` +>> hooks, as does anything that uses `IkiWiki::misctemplate`. From that +>> quick survey, it seems as though `template` is the only thing that +>> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks? +>> +>> It just seems strange to me that `field` needs to have its own +>> of `template` (this), its own variant of `inline` (`report`), +>> and so on - I'd tend to lean more towards having `field` +>> enhance the existing plugins. I'm not an ikiwiki committer, +>> mind... Joey, your opinion would be appreciated! --[[smcv]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] > Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] + +>> Yeah, that's something that annoys me about `template` too. I've +>> opened a todo: [[todo/user-defined_templates_outside_the_wiki]]. +>> --s -- cgit v1.2.3 From 0503bf7c8824d941b26da4c91b4ee1f721fcf54c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 30 Mar 2010 12:10:40 +0000 Subject: --- doc/plugins/contrib/ftemplate/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index de4b35ef0..6a1d9f685 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -15,7 +15,7 @@ or something). >> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks? >> >> It just seems strange to me that `field` needs to have its own ->> of `template` (this), its own variant of `inline` (`report`), +>> variant of `template` (this), its own variant of `inline` (`report`), >> and so on - I'd tend to lean more towards having `field` >> enhance the existing plugins. I'm not an ikiwiki committer, >> mind... Joey, your opinion would be appreciated! --[[smcv]] -- cgit v1.2.3 From edcea2b98100aa1ff18b91038a33e2ea55f13850 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 30 Mar 2010 12:27:18 +0000 Subject: respond --- doc/plugins/contrib/report/discussion.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 42a1009cb..a6cb6f8bd 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -20,6 +20,13 @@ lead to making inline too big, though. > I think inline is *already* too big, honestly. --[[KathrynAndersen]] +>> A fair point; perhaps my complaint should be that *inline* does +>> too many orthogonal things. I suppose the headers feature wouldn't +>> really make sense in an inline that didn't have `archive="yes"`, +>> so it'd make sense to recommend this plugin as a replacement +>> for inlining with archive=yes (for which I now realise "inline" +>> is the wrong verb anyway :-) ) --s + Is the intention that the `trail` part is a performance hack, or a way to select pages? How does it relate to [[todo/wikitrails]] or [[plugins/contrib/trail]]? --[[smcv]] @@ -32,3 +39,18 @@ to select pages? How does it relate to [[todo/wikitrails]] or > But to avoid that being too limiting, one can use a `pages=...` pagespec to filter that list to a subset; only the pages one is interested in. > And one can also sort it, if one so desires. > --[[KathrynAndersen]] + +>> That's an interesting approach to trails; I'd missed the fact that +>> links are already ordered. +>> +>> This does have the same problems as tags, though: see +>> [[bugs/tagged()_matching_wikilinks]] and +>> [[todo/matching_different_kinds_of_links]]. I suppose the question +>> now is whether new code should be consistent with `tag` (and +>> potentially be fixed at the same time as tag itself), or try to +>> avoid those problems? +>> +>> The combination of `trail` with another pagespec in this plugin +>> does provide a neat way for it to work around having unwanted +>> pages in the report, by limiting by a suitable tag or subdirectory +>> or something. --s -- cgit v1.2.3 From bb8b941bfc3d3564324a23bba14dc8112d8ea6c7 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 30 Mar 2010 12:48:03 +0000 Subject: respond; correct license of fieldsort plugin to match IkiWiki --- doc/plugins/contrib/field/discussion.mdwn | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 4bb285a50..7e94a4029 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -13,6 +13,19 @@ behaviour, an auxiliary plugin would be easy.) >It's not like one is going to lose the fields defined by the meta plugin; if "author" is defined by \[[!meta author=...]] then that's what will be found by "field" (provided the "meta" plugin is registered; that's what the "field_register" option is for). >--[[KathrynAndersen]] +>> Hmm. I suppose if you put the title (or whatever) in the YAML, then +>> "almost" all the places in IkiWiki that respect titles will do the +>> right thing due to the pagetemplate hook, with the exception being +>> anything that has special side-effects inside `meta` (like `date`), +>> or anything that looks in `$pagestate{foo}{meta}` directly +>> (like `map`). Is your plan that `meta` should register itself by +>> default, and `map` and friends should be adapted to +>> work based on `getfield()` instead of `$pagestate{foo}{meta}`, then? +>> +>> (On the site I mentioned, I'm using an unmodified version of `field`, +>> and currently working around the collision by tagging books' pages +>> with `bookauthor` instead of `author` in the YAML.) --s + From a coding style point of view, the `$CamelCase` variable names aren't IkiWiki style, and the `match_foo` functions look as though they could benefit from being thin wrappers around a common `&IkiWiki::Plugin::field::match` @@ -23,13 +36,20 @@ and more ikiwiki-like style? > I don't think ikiwiki *has* a "style" for docs, does it? So I followed the Perl Module style. And I'm rather baffled as to why having the docs laid out in clear sections... make them less clear. --[[KathrynAndersen]] +>> I keep getting distracted by the big shouty headings :-) +>> I suppose what I was really getting at was that when this plugin +>> is merged, its docs will end up split between its plugin +>> page, [[plugins/write]] and [[ikiwiki/PageSpec]]; on some of the +>> contrib plugins I've added I've tried to separate the docs +>> according to how they'll hopefully be laid out after merge. --s + If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can stop reimplementing sorting. Here's the implementation I'm using, with your "sortspec" concept (a sort-hook would be very similar): if merged, I think it should just be part of `field` rather than a separate plugin. - # Copyright © 2010 Simon McVittie, released under GNU LGPL >= 2.1 + # Copyright © 2010 Simon McVittie, released under GNU GPL >= 2 package IkiWiki::Plugin::fieldsort; use warnings; use strict; -- cgit v1.2.3 From 35fcc2ec8f1d3a3048d99a568df645607a99fbf1 Mon Sep 17 00:00:00 2001 From: "http://edrex.myopenid.com/" <http://edrex.myopenid.com/@web> Date: Wed, 31 Mar 2010 00:21:58 +0000 Subject: --- doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn (limited to 'doc') diff --git a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn new file mode 100644 index 000000000..6f742ff70 --- /dev/null +++ b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn @@ -0,0 +1,4 @@ +[[!table format=dsv delimiter="\t" data=""" +1 2 +2 4 +"""]] -- cgit v1.2.3 From 66ecf1dba5d0aca59affd30029fe14ad5e3efc94 Mon Sep 17 00:00:00 2001 From: "http://edrex.myopenid.com/" <http://edrex.myopenid.com/@web> Date: Wed, 31 Mar 2010 00:24:22 +0000 Subject: --- doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn index 6f742ff70..b407255aa 100644 --- a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn +++ b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn @@ -1,3 +1,5 @@ +Table directive should support tab-delimited data, especially important since this is the format you will get if copy/pasting from an HTML table or spreadsheet (Gnumeric, OO Calc, Excel). Test case which fails: + [[!table format=dsv delimiter="\t" data=""" 1 2 2 4 -- cgit v1.2.3 From 7f63763a30e774e9a10bd1416f157dd2b3e2e69b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 31 Mar 2010 02:07:52 +0000 Subject: they do work, with the right syntax (C backslash escapes aren't interpreted) --- doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn index b407255aa..278826ea0 100644 --- a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn +++ b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn @@ -4,3 +4,17 @@ Table directive should support tab-delimited data, especially important since th 1 2 2 4 """]] + +> They do work, but C-style backslash escapes aren't recognised, +> so the syntax `delimiter="\t"` (as in your test case) looks +> for the literal string `\t`. Replacing `\t` with a literal +> tab character makes it work - here's a test (I changed the data +> to make the table layout more obvious): +> +> [[!table format=dsv delimiter=" " data=""" +left 2 +2 right +alpha beta +"""]] +> +> So, I think this can be considered [[not_a_bug|done]]? --[[smcv]] -- cgit v1.2.3 From fc5445b90677489642e4ae8d5b2f6c54cdd847c5 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 31 Mar 2010 03:01:41 +0000 Subject: response --- doc/plugins/contrib/ftemplate/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index 6a1d9f685..eb84dd09b 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -20,6 +20,8 @@ or something). >> enhance the existing plugins. I'm not an ikiwiki committer, >> mind... Joey, your opinion would be appreciated! --[[smcv]] +>>> I did it that way basically because I needed the functionality ASAP, and I didn't want to step on anyone's toes, so I made them as separate plugins. If Joey wants to integrate the functionality into IkiWiki proper, I would be very happy, but I don't want to put pressure on him. --[[KathrynAndersen]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). -- cgit v1.2.3 From 4eed0abc8c181a027fa802d209fd95d8c10ee9f0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 1 Apr 2010 00:23:31 +0000 Subject: response; thoughts about inline and tags --- doc/plugins/contrib/report/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index a6cb6f8bd..953509297 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -27,6 +27,8 @@ lead to making inline too big, though. >> for inlining with archive=yes (for which I now realise "inline" >> is the wrong verb anyway :-) ) --s +>>> I think *inline* would be a bit less unwieldy if there was some way of factoring out the feed stuff into a separate plugin, but I don't know if that's possible. --K.A. + Is the intention that the `trail` part is a performance hack, or a way to select pages? How does it relate to [[todo/wikitrails]] or [[plugins/contrib/trail]]? --[[smcv]] @@ -54,3 +56,7 @@ to select pages? How does it relate to [[todo/wikitrails]] or >> does provide a neat way for it to work around having unwanted >> pages in the report, by limiting by a suitable tag or subdirectory >> or something. --s + +>>> Either that, or somehow combine tagging with fields, such that one could declare a tag, and it would create both a link and a field with a given value. (I've been working on something like that, but it still has bugs). +>>> That way, the test for whether something is tagged would be something like "link(tag/foo) and field(tag foo)". +>>> --K.A. -- cgit v1.2.3 From 63bc057690d388a81e643d4556c6a001d886b59c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 1 Apr 2010 01:35:35 +0000 Subject: --- doc/plugins/contrib/report/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 953509297..a257198c0 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -60,3 +60,10 @@ to select pages? How does it relate to [[todo/wikitrails]] or >>> Either that, or somehow combine tagging with fields, such that one could declare a tag, and it would create both a link and a field with a given value. (I've been working on something like that, but it still has bugs). >>> That way, the test for whether something is tagged would be something like "link(tag/foo) and field(tag foo)". >>> --K.A. + +>>>> I can see that this'd work well for 1:1 relationships like next +>>>> and previous, but I don't think that'd work for pages with more than +>>>> one tag - as far as I can see, `field`'s data model is that each +>>>> page has no more than one value for each field? +>>>> [[todo/Matching_different_kinds_of_links]] has some thoughts about +>>>> how it could be implemented, though. --s -- cgit v1.2.3 From a682df9a1f14ea873c7103f80108330840a15cd0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 1 Apr 2010 07:22:37 +0000 Subject: considering tags and fields --- doc/plugins/contrib/report/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index a257198c0..e23a4ced4 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -67,3 +67,9 @@ to select pages? How does it relate to [[todo/wikitrails]] or >>>> page has no more than one value for each field? >>>> [[todo/Matching_different_kinds_of_links]] has some thoughts about >>>> how it could be implemented, though. --s + +>>>>> You have a point there. I'm not sure what would be better: to add the concept of arrays/sets to `field`, or to think of tags as a special case. Problem is, I find tags as they currently exist to be too limiting. I prefer something that can be used for Faceted Tagging <http://en.wikipedia.org/wiki/Faceted_classification>; that is, things like Author:Fred Nurk, Genre:Historical, Rating:Good, and so on. Of course, that doesn't mean that each tag is limited to only one value, either; just to take the above examples, something might have more than one author, or have multiple genres (such as Historical + Romance). + +>>>>> It might be that adding arrays to the `field` plugin is a good way to go: after all, even though field=value is the most common, with the flexibility of things like YAML, one could define all sorts of things. What I'm not so sure about is how to return the values when queried, since some things would be expecting scalars all the time. Ah, perhaps I could use wantarray? +>>>>> Is there a way of checking a HTML::Template template to see if it expecting an array for a particular value? +>>>>> --[[KathrynAndersen]] -- cgit v1.2.3 From 3c9cd4f156018aea3d10dbf02be529e85c05eb66 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Thu, 1 Apr 2010 18:13:38 +0100 Subject: Explain tab-delimited tables a bit better --- doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn | 2 ++ doc/ikiwiki/directive/table.mdwn | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn index 278826ea0..39d57a4fe 100644 --- a/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn +++ b/doc/bugs/Tab_delimited_tables_don__39__t_work.mdwn @@ -18,3 +18,5 @@ alpha beta """]] > > So, I think this can be considered [[not_a_bug|done]]? --[[smcv]] + +>> I've clarified the documentation. --[[smcv]] diff --git a/doc/ikiwiki/directive/table.mdwn b/doc/ikiwiki/directive/table.mdwn index 2dac97724..a6692f92c 100644 --- a/doc/ikiwiki/directive/table.mdwn +++ b/doc/ikiwiki/directive/table.mdwn @@ -42,4 +42,9 @@ cells. For example: as the table header. Set it to "no" to make a table without a header, or "column" to make the first column be the header. +For tab-delimited tables (often obtained by copying and pasting from HTML +or a spreadsheet), `delimiter` must be set to a literal tab character. These +are difficult to type in most web browsers - copying and pasting one from +the table data is likely to be the easiest way. + [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From a7ef2204dc36777f847e282f57299d93342a8ad6 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 1 Apr 2010 23:40:37 +0000 Subject: implemented! --- doc/todo/matching_different_kinds_of_links.mdwn | 51 +++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 26c5a072b..0049281fe 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -36,6 +36,11 @@ Besides pagespecs, the `rel=` attribute could be used for styles. --Ivan Z. > normal links.) Might be better to go ahead and add the variable to > core though. --[[Joey]] +>> I've implemented this with the data structure you suggested, except that +>> I called it `%typedlinks` instead of `%linktype` (it seemed to make more +>> sense that way). I also ported `tag` to it, and added a `tagged_is_strict` +>> config option. See below! --[[smcv]] + I saw somewhere else here some suggestions for the wiki-syntax for specifying the relation name of a link. One more suggestion---[the syntax used in Semantic MediaWiki](http://en.wikipedia.org/wiki/Semantic_MediaWiki#Basic_usage), like this: <pre> @@ -45,3 +50,49 @@ I saw somewhere else here some suggestions for the wiki-syntax for specifying th So a part of the effect of [[`\[[!taglink TAG\]\]`|plugins/tag]] could be represented as something like `\[[tag::TAG]]` or (more understandable relation name in what concerns the direction) `\[[tagged::TAG]]`. I don't have any opinion on this syntax (whether it's good or not)...--Ivan Z. + +------- + +>> [[!template id=gitbranch author="[[Simon_McVittie|smcv]]" branch=smcv/link-types]] +>> [[!tag patch]] + +## Documentation for smcv's branch + +### added to [[ikiwiki/pagespec]] + +* "`typedlink(type glob)`" - matches pages that link to a given page (or glob) + with a given link type. Plugins can create links with a specific type: + for instance, the tag plugin creates links of type `tag`. + +### added to [[plugins/tag]] + +If the `tagged_is_strict` config option is set, `tagged()` will only match +tags explicitly set with [[ikiwiki/directive/tag]] or +[[ikiwiki/directive/taglink]]; if not (the default), it will also match +any other [[WikiLinks|ikiwiki/WikiLink]] to the tag page. + +### added to [[plugins/write]] + +#### `%typedlinks` + +The `%typedlinks` hash records links of specific types. Do not modify this +hash directly; call `add_link()`. The keys are page names, and the values +are hash references. In each page's hash reference, the keys are link types +defined by plugins, and the values are hash references with link targets +as keys, and 1 as a dummy value, something like this: + + $typedlinks{"foo"} = { + tag => { short_word => 1, metasyntactic_variable => 1 }, + next_page => { bar => 1 }, + }; + +Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in +`%typedlinks`. + +#### `add_link($$;$)` + + This adds a link to `%links`, ensuring that duplicate links are not + added. Pass it the page that contains the link, and the link text. + +An optional third parameter sets the link type (`undef` produces an ordinary +[[ikiwiki/WikiLink]]). -- cgit v1.2.3 From 93024e5193e01904b9e9688a4553d24cee23c490 Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:00:46 +0000 Subject: --- doc/forum.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum.mdwn b/doc/forum.mdwn index 19ca9ed0b..f4c8bbee4 100644 --- a/doc/forum.mdwn +++ b/doc/forum.mdwn @@ -1,8 +1,8 @@ This is a place for questions and discussions that don't have a Discussion page fitting enough. Users of ikiwiki can ask questions here. -Note that for more formal bug reports or todo items, you can also edit the -[[bugs]] and [[todo]] pages. +Note that for more formal bug reports or todo items, you can also edit [http://custom-paper-writing.com/editing-services service essays] the +[[bugs]] and [[todo]] [http://essaywritingservices.org/book-report.php book report help] pages. ## Current topics ## -- cgit v1.2.3 From c7bccf3a2a23486fc4a2d0923d95c34554e0b087 Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:01:24 +0000 Subject: --- doc/forum.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum.mdwn b/doc/forum.mdwn index f4c8bbee4..958238f8a 100644 --- a/doc/forum.mdwn +++ b/doc/forum.mdwn @@ -1,8 +1,8 @@ This is a place for questions and discussions that don't have a Discussion page fitting enough. Users of ikiwiki can ask questions here. -Note that for more formal bug reports or todo items, you can also edit [http://custom-paper-writing.com/editing-services service essays] the -[[bugs]] and [[todo]] [http://essaywritingservices.org/book-report.php book report help] pages. +Note that for more formal bug reports or todo items, you can also edit [[http://custom-paper-writing.com/editing-services service essays]] the +[[bugs]] and [[todo]] [[http://essaywritingservices.org/book-report.php book report help]] pages. ## Current topics ## -- cgit v1.2.3 From 1587e38fd4c4083a3d25e2c613c74c07530a344c Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:03:58 +0000 Subject: --- doc/forum.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum.mdwn b/doc/forum.mdwn index 958238f8a..6febfa374 100644 --- a/doc/forum.mdwn +++ b/doc/forum.mdwn @@ -1,8 +1,8 @@ This is a place for questions and discussions that don't have a Discussion page fitting enough. Users of ikiwiki can ask questions here. -Note that for more formal bug reports or todo items, you can also edit [[http://custom-paper-writing.com/editing-services service essays]] the -[[bugs]] and [[todo]] [[http://essaywritingservices.org/book-report.php book report help]] pages. +Note that for more formal bug reports or todo items, you can also edit [[service essays http://custom-paper-writing.com/editing-services]] the +[[bugs]] and [[todo]] [[ book report help http://essaywritingservices.org/book-report.php]] pages. ## Current topics ## -- cgit v1.2.3 From cad194a2eeeaa2226fb9bd60c3f38861b1d6663e Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:05:18 +0000 Subject: --- doc/forum.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum.mdwn b/doc/forum.mdwn index 6febfa374..2e766c4e4 100644 --- a/doc/forum.mdwn +++ b/doc/forum.mdwn @@ -1,8 +1,8 @@ This is a place for questions and discussions that don't have a Discussion page fitting enough. Users of ikiwiki can ask questions here. -Note that for more formal bug reports or todo items, you can also edit [[service essays http://custom-paper-writing.com/editing-services]] the -[[bugs]] and [[todo]] [[ book report help http://essaywritingservices.org/book-report.php]] pages. +Note that for more formal bug reports or todo items, you can also edit [service essays](http://custom-paper-writing.com/editing-services) the +[[bugs]] and [[todo]] [book report help](http://essaywritingservices.org/book-report.php) pages. ## Current topics ## -- cgit v1.2.3 From 7f488c70123890aa7f9ca86184c177f6c037eae1 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Fri, 2 Apr 2010 13:07:22 +0100 Subject: Despam --- doc/forum.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/forum.mdwn b/doc/forum.mdwn index 2e766c4e4..19ca9ed0b 100644 --- a/doc/forum.mdwn +++ b/doc/forum.mdwn @@ -1,8 +1,8 @@ This is a place for questions and discussions that don't have a Discussion page fitting enough. Users of ikiwiki can ask questions here. -Note that for more formal bug reports or todo items, you can also edit [service essays](http://custom-paper-writing.com/editing-services) the -[[bugs]] and [[todo]] [book report help](http://essaywritingservices.org/book-report.php) pages. +Note that for more formal bug reports or todo items, you can also edit the +[[bugs]] and [[todo]] pages. ## Current topics ## -- cgit v1.2.3 From e71a912f0c64b1eb6ead8242868da6f5a9606c8b Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:07:42 +0000 Subject: --- doc/shortcuts.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index 54dd0fdb1..179cb89e6 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -49,7 +49,9 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=emacswiki url="http://www.emacswiki.org/cgi-bin/wiki/%s"]] * [[!shortcut name=haskellwiki url="http://haskell.org/haskellwiki/%s"]] * [[!shortcut name=dict url="http://www.dict.org/bin/Dict?Form=Dict1&Strategy=*&Database=*&Query=%s"]] -* [[!shortcut name=imdb url="http://imdb.com/find?q=%s"]] +* [[!shortcut name=imdb url="http://imdb.com/find?q=%s"]] +* [custom writing company](http://essaywritingservices.org/custom-essay-writing.php) +* [certified resume writer](http://cvresumewriters.com/onlineresume.php) * [[!shortcut name=gpg url="http://pgpkeys.mit.edu:11371/pks/lookup?op=vindex&exact=on&search=0x%s"]] * [[!shortcut name=perldoc url="http://perldoc.perl.org/search.html?q=%s"]] * [[!shortcut name=whois url="http://reports.internic.net/cgi/whois?whois_nic=%s&type=domain"]] -- cgit v1.2.3 From e0074b91c7d1a44c468bdbf554cbef07434b7dfe Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:18:36 +0000 Subject: --- doc/shortcuts.mdwn | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index 179cb89e6..f33dfb6b6 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -49,9 +49,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=emacswiki url="http://www.emacswiki.org/cgi-bin/wiki/%s"]] * [[!shortcut name=haskellwiki url="http://haskell.org/haskellwiki/%s"]] * [[!shortcut name=dict url="http://www.dict.org/bin/Dict?Form=Dict1&Strategy=*&Database=*&Query=%s"]] -* [[!shortcut name=imdb url="http://imdb.com/find?q=%s"]] -* [custom writing company](http://essaywritingservices.org/custom-essay-writing.php) -* [certified resume writer](http://cvresumewriters.com/onlineresume.php) +* [[!shortcut name=imdb url="http://imdb.com/find?q=%s"]] * [[!shortcut name=gpg url="http://pgpkeys.mit.edu:11371/pks/lookup?op=vindex&exact=on&search=0x%s"]] * [[!shortcut name=perldoc url="http://perldoc.perl.org/search.html?q=%s"]] * [[!shortcut name=whois url="http://reports.internic.net/cgi/whois?whois_nic=%s&type=domain"]] @@ -67,13 +65,13 @@ 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 +it, and '%S' is replaced with the raw, non-encoded text [custom writing company](http://essaywritingservices.org/custom-essay-writing.php). 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 with an existing directive. These directives also accept a `desc` -parameter that will override the one provided at definition time. +parameter that will override [certified resume writer](http://cvresumewriters.com/onlineresume.php) the one provided at definition time. If you come up with a shortcut that you think others might find useful, consider contributing it to the [shortcuts page on the ikiwiki -- cgit v1.2.3 From caa397b768c1fa4fda800ae0e86c10ac07b316a3 Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:24:14 +0000 Subject: --- doc/security.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/security.mdwn b/doc/security.mdwn index 21aef316b..a06f3a37f 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -376,7 +376,7 @@ parties. Cross Site Request Forging could be used to constuct a link that would change a logged-in user's password or other preferences if they clicked on the link. It could also be used to construct a link that would cause a wiki -page to be modified by a logged-in user. ([[!cve CVE-2008-0165]]) +page [order essay](http://custom-paper-writing.com/order) to be modified by a logged-in user. ([[!cve CVE-2008-0165]]) These holes were discovered on 10 April 2008 and fixed the same day with the release of ikiwiki 2.42. A fix was also backported to Debian etch, as @@ -415,7 +415,7 @@ can cause it to crash. This can potentially be used for a denial of service attack. intrigeri discovered this problem on 12 Nov 2008 and a patch put in place -later that day, in version 2.70. The fix was backported to testing as version +later that day, in version 2.70. The fix was backported [write my essay](http://custom-essay-writing-service.org/faq.php) to testing as version 2.53.3, and to stable as version 1.33.7. ## Insufficient blacklisting in teximg plugin -- cgit v1.2.3 From bb99202474de4cb655d50a4f82b77b67e8445e5c Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:26:46 +0000 Subject: --- doc/features.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/features.mdwn b/doc/features.mdwn index 3925d78ef..c119dae97 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -125,7 +125,7 @@ yours when you commit. In the rare cases where automatic merging fails due to the same part of a page being concurrently edited, regular commit conflict markers are shown in the file to resolve the conflict, so if you're already familiar -with that there's no new commit marker syntax to learn. +with that there's no new commit [order essays](http://custom-paper-writing.com/order) marker syntax to learn. ### [[RecentChanges]], editing pages in a web browser @@ -158,7 +158,7 @@ since page edit controls can be changed via plugins. ### [[PageHistory]] -Well, sorta. Rather than implementing YA history browser, it can link to +Well, sorta. Rather than implementing YA history browser [essay writing companies](http://essaywritingservices.org/custom-essay-writing.php), it can link to [[ViewVC]] or the like to browse the history of a wiki page. ### Full text search -- cgit v1.2.3 From 0c1a1185c1957c161adda779d719d7ddca2d5021 Mon Sep 17 00:00:00 2001 From: adrianna <adrianna@web> Date: Fri, 2 Apr 2010 12:29:22 +0000 Subject: --- doc/setup.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/setup.mdwn b/doc/setup.mdwn index 2d4da5536..4ad64d73b 100644 --- a/doc/setup.mdwn +++ b/doc/setup.mdwn @@ -105,7 +105,7 @@ After making changes to this file, you need to tell ikiwiki to use it: ## Customizing file locations As a wiki compiler, ikiwiki builds a wiki from files in a source directory, -and outputs the files to a destination directory. The source directory is +and outputs the files to a destination directory [write my essay](http://custom-essay-writing-service.org/faq.php). The source directory is a working copy checked out from the version control system repository. When you used `auto.setup`, ikiwiki put the source directory, destination @@ -118,7 +118,7 @@ First, move the destination directory and repository around. % mv public_html/foo /srv/web/foo.com % mv foo.git /srv/git/foo.git -If you moved the repository to a new location, checkouts pointing at the +If you moved the repository to a new location [buy reports](http://essaywritingservices.org/book-report.php), checkouts pointing at the old location won't work, and the easiest way to deal with this is to delete them and re-checkout from the new repository location. -- cgit v1.2.3 From 05b6e8ceee2bec4442727e2475abf8a8861d5e0a Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Fri, 2 Apr 2010 18:28:34 +0100 Subject: Despam, again. Someone ban adrianna please? --- doc/features.mdwn | 4 ++-- doc/security.mdwn | 4 ++-- doc/setup.mdwn | 4 ++-- doc/shortcuts.mdwn | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/features.mdwn b/doc/features.mdwn index c119dae97..3925d78ef 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -125,7 +125,7 @@ yours when you commit. In the rare cases where automatic merging fails due to the same part of a page being concurrently edited, regular commit conflict markers are shown in the file to resolve the conflict, so if you're already familiar -with that there's no new commit [order essays](http://custom-paper-writing.com/order) marker syntax to learn. +with that there's no new commit marker syntax to learn. ### [[RecentChanges]], editing pages in a web browser @@ -158,7 +158,7 @@ since page edit controls can be changed via plugins. ### [[PageHistory]] -Well, sorta. Rather than implementing YA history browser [essay writing companies](http://essaywritingservices.org/custom-essay-writing.php), it can link to +Well, sorta. Rather than implementing YA history browser, it can link to [[ViewVC]] or the like to browse the history of a wiki page. ### Full text search diff --git a/doc/security.mdwn b/doc/security.mdwn index a06f3a37f..21aef316b 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -376,7 +376,7 @@ parties. Cross Site Request Forging could be used to constuct a link that would change a logged-in user's password or other preferences if they clicked on the link. It could also be used to construct a link that would cause a wiki -page [order essay](http://custom-paper-writing.com/order) to be modified by a logged-in user. ([[!cve CVE-2008-0165]]) +page to be modified by a logged-in user. ([[!cve CVE-2008-0165]]) These holes were discovered on 10 April 2008 and fixed the same day with the release of ikiwiki 2.42. A fix was also backported to Debian etch, as @@ -415,7 +415,7 @@ can cause it to crash. This can potentially be used for a denial of service attack. intrigeri discovered this problem on 12 Nov 2008 and a patch put in place -later that day, in version 2.70. The fix was backported [write my essay](http://custom-essay-writing-service.org/faq.php) to testing as version +later that day, in version 2.70. The fix was backported to testing as version 2.53.3, and to stable as version 1.33.7. ## Insufficient blacklisting in teximg plugin diff --git a/doc/setup.mdwn b/doc/setup.mdwn index 4ad64d73b..2d4da5536 100644 --- a/doc/setup.mdwn +++ b/doc/setup.mdwn @@ -105,7 +105,7 @@ After making changes to this file, you need to tell ikiwiki to use it: ## Customizing file locations As a wiki compiler, ikiwiki builds a wiki from files in a source directory, -and outputs the files to a destination directory [write my essay](http://custom-essay-writing-service.org/faq.php). The source directory is +and outputs the files to a destination directory. The source directory is a working copy checked out from the version control system repository. When you used `auto.setup`, ikiwiki put the source directory, destination @@ -118,7 +118,7 @@ First, move the destination directory and repository around. % mv public_html/foo /srv/web/foo.com % mv foo.git /srv/git/foo.git -If you moved the repository to a new location [buy reports](http://essaywritingservices.org/book-report.php), checkouts pointing at the +If you moved the repository to a new location, checkouts pointing at the old location won't work, and the easiest way to deal with this is to delete them and re-checkout from the new repository location. diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index f33dfb6b6..54dd0fdb1 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -49,7 +49,7 @@ This page controls what shortcut links the wiki supports. * [[!shortcut name=emacswiki url="http://www.emacswiki.org/cgi-bin/wiki/%s"]] * [[!shortcut name=haskellwiki url="http://haskell.org/haskellwiki/%s"]] * [[!shortcut name=dict url="http://www.dict.org/bin/Dict?Form=Dict1&Strategy=*&Database=*&Query=%s"]] -* [[!shortcut name=imdb url="http://imdb.com/find?q=%s"]] +* [[!shortcut name=imdb url="http://imdb.com/find?q=%s"]] * [[!shortcut name=gpg url="http://pgpkeys.mit.edu:11371/pks/lookup?op=vindex&exact=on&search=0x%s"]] * [[!shortcut name=perldoc url="http://perldoc.perl.org/search.html?q=%s"]] * [[!shortcut name=whois url="http://reports.internic.net/cgi/whois?whois_nic=%s&type=domain"]] @@ -65,13 +65,13 @@ 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 [custom writing company](http://essaywritingservices.org/custom-essay-writing.php). The optional +it, and '%S' is replaced with the raw, non-encoded text. 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 with an existing directive. These directives also accept a `desc` -parameter that will override [certified resume writer](http://cvresumewriters.com/onlineresume.php) the one provided at definition time. +parameter that will override the one provided at definition time. If you come up with a shortcut that you think others might find useful, consider contributing it to the [shortcuts page on the ikiwiki -- cgit v1.2.3 From 1c8ac7d88c5a3d2c63892737e54be8a1b535936c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 16:41:04 -0400 Subject: review from the woods --- doc/todo/matching_different_kinds_of_links.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 0049281fe..20acdde49 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -96,3 +96,22 @@ Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in An optional third parameter sets the link type (`undef` produces an ordinary [[ikiwiki/WikiLink]]). + +> Some code refers to `oldtypedlinks`, and other to `oldlinktypes`. +> +> I'm curious what your reasoning was for adding a new variable +> rather than using `pagestate`. Was it only because you needed +> the `old` version to detect change, or was there other complexity? +> +> I have not convinced myself this is a real problem, but.. +> If a page has a typed link, there seems to be no way to tell +> if it also has a separate, regular link. `add_link` will add +> to `@links` when adding a typed, or untyped link. If only untyped +> links were recorded there, one could tell the difference. But then +> typed links would not show up at all in eg, a linkmap, +> unless it was changed to check for typed links too. +> (Or, regular links could be recorded in typedlinks too, +> with a empty type. (Bloaty.)) +> +> I suspect we could get away without having `tagged_is_strict` +> without too much transitional trouble. --[[Joey]] -- cgit v1.2.3 From 59ba938822ba0752e8d97e769c0d14f2eb0bbeb3 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 16:54:06 -0400 Subject: template: Search for templates in the templatedir, if they are not found as pages in the wiki. --- IkiWiki/Plugin/template.pm | 10 ++++++++-- debian/changelog | 2 ++ doc/templates.mdwn | 6 ++++++ doc/todo/user-defined_templates_outside_the_wiki.mdwn | 2 ++ doc/wikitemplates.mdwn | 6 ++++-- 5 files changed, 22 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index 3e024c5f8..36282055a 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -37,7 +37,13 @@ sub preprocess (@) { my $template_page="templates/$params{id}"; add_depends($params{page}, $template_page); - my $template_file=$pagesources{$template_page}; + my $template_file; + if (exists $pagesources{$template_page}) { + $template_file=srcfile($pagesources{$template_page}); + } + else { + $template_file=template_file("$params{id}.tmpl") + } return sprintf(gettext("template %s not found"), htmllink($params{page}, $params{destpage}, "/".$template_page)) unless defined $template_file; @@ -50,7 +56,7 @@ sub preprocess (@) { $$text_ref=&Encode::decode_utf8($$text_ref); chomp $$text_ref; }, - filename => srcfile($template_file), + filename => $template_file, die_on_bad_params => 0, no_includes => 1, blind_cache => 1, diff --git a/debian/changelog b/debian/changelog index adf0dfed6..362ba54ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low * page.tmpl: Add Cache-Control must-revalidate to ensure that users (especially of Firefox) see fresh page content. * htmlscrubber: Allow colons in urls after '?' + * template: Search for templates in the templatedir, if they are not + found as pages in the wiki. -- Joey Hess <joeyh@debian.org> Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/templates.mdwn b/doc/templates.mdwn index eff0e15e9..07531ae98 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -43,6 +43,12 @@ page will provide a link that can be used to create the template. The template is a regular wiki page, located in the `templates/` subdirectory inside the source directory of the wiki. +(Alternatively, templates can be stored in a directory outside the wiki, +as files with the extension ".tmpl". +By default, these are searched for in `/usr/share/ikiwiki/templates`; +the `templatedir` setting can be used to make another directory be searched +first.) + The template uses the syntax used by the [[!cpan HTML::Template]] perl module, which allows for some fairly complex things to be done. Consult its documentation for the full syntax, but all you really need to know are a diff --git a/doc/todo/user-defined_templates_outside_the_wiki.mdwn b/doc/todo/user-defined_templates_outside_the_wiki.mdwn index 880ad6493..1d72aa6a7 100644 --- a/doc/todo/user-defined_templates_outside_the_wiki.mdwn +++ b/doc/todo/user-defined_templates_outside_the_wiki.mdwn @@ -6,3 +6,5 @@ source, but also looks in the system templates directory (the one with invoked via `\[[!template]]`, but don't have to "work" as wiki pages in their own right. I think the normal [[plugins/template]] plugin could benefit from this functionality. + +[[done]] --[[Joey]] diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn index 6c0480cea..6e5a7261d 100644 --- a/doc/wikitemplates.mdwn +++ b/doc/wikitemplates.mdwn @@ -5,7 +5,8 @@ to learn. The aim is to keep almost all html out of ikiwiki and in the templates. It ships with some basic templates which can be customised. These are -located in /usr/share/ikiwiki/templates by default. +located in `/usr/share/ikiwiki/templates` by default; the `templatedir` +setting can be used to make another directory be searched first. * `page.tmpl` - Used for displaying all regular wiki pages. * `misc.tmpl` - Generic template used for any page that doesn't @@ -43,7 +44,8 @@ The [[plugins/pagetemplate]] plugin can allow individual pages to use a different template than `page.tmpl`. The [[plugins/template]] plugin also uses templates, though those -[[templates]] are stored in the wiki and inserted into pages. +[[templates]] are typically stored as pages in the wiki, and are inserted +into pages. The [[plugins/edittemplate]] plugin is used to make new pages default to containing text from a template, which can be filled as out the page is -- cgit v1.2.3 From de62ea1cc8111dd96bc84b9c839be99c921168e3 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 17:03:33 -0400 Subject: fix branch name --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index f37a0758e..8edc95fb9 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -104,7 +104,7 @@ An optional `sort` parameter will be used preferentially when \[[!meta title="David Bowie" sort="Bowie, David"]] -## Documentation from sort-hooks branch +## Documentation from sort-package branch The changes to [[ikiwiki/pagespec/sorting]] are the same. The changes to [[plugins/write]] are replaced by: -- cgit v1.2.3 From 1b0d4e8d885ded59ca0ad1b4d1ca1315585cce06 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 17:16:12 -0400 Subject: minor comment --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 8edc95fb9..e4e1829dc 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -89,6 +89,9 @@ and to sort by an arbitrary `meta` value, you could use: or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no full title was set. + > I feel it sould be clearer to call that "sortas", since "sort=" is used + > to specify a sort method in other directives. --[[Joey]] + ### Multiple sort orders (added to [[ikiwiki/pagespec/sorting]]) In addition, you can combine several sort orders and/or reverse the order of -- cgit v1.2.3 From 9e7dcefd7ed9424de20706f63c7bab5182c5df78 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 17:26:32 -0400 Subject: comments --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index e4e1829dc..67d85f6f8 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -50,6 +50,21 @@ NIH'd sorting mechanisms: >>> share the `IkiWiki::PageSpec` package, but with a `cmp_` prefix. Gitweb: >>> <http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-package> +>>>> I agree it seems more elegant, so I have focused on it. +>>>> +>>>> I don't know about reusing `IkiWiki::PageSpec` for this. +>>>> +>>>> I would be inclined to drop the `check_` stuff. +>>>> +>>>> Wouldn't it make sense to have `meta(title)` instead +>>>> of `meta_title`? +>>>> +>>>> As I read the regexp in `cmpspec_translate`, the "command" +>>>> is required to have params. They should be optional, +>>>> to match the documentation and because most sort methods +>>>> do not need parameters. +>>>> --[[Joey]] + ## Documentation from sort-hooks branch ### sort hook (added to [[plugins/write]]) -- cgit v1.2.3 From 1faf9b08e16bde9b4b0d72620fcef79c715e64de Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 17:37:38 -0400 Subject: idea --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 67d85f6f8..e1e05e81c 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -63,6 +63,14 @@ NIH'd sorting mechanisms: >>>> is required to have params. They should be optional, >>>> to match the documentation and because most sort methods >>>> do not need parameters. +>>>> +>>>> I wonder if it would make sense to add some combining keywords, so +>>>> a sortspec reads like `sort="age then ascending title"` +>>>> In a way, this reduces the amount of syntax that needs to be learned. +>>>> I like the "then" (and it could allow other operations than +>>>> simple combination, if any others make sense). Not so sure about the +>>>> "ascending", which could be "reverse" instead, but "descending age" and +>>>> "ascending age" both seem useful to be able to explicitly specify. >>>> --[[Joey]] ## Documentation from sort-hooks branch -- cgit v1.2.3 From 2c7fe7ae2cf73141eba817d4275d9a6a897df8a8 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 2 Apr 2010 22:25:16 +0000 Subject: respond (also unindent Joey's review to avoid very deep indentation) --- doc/todo/matching_different_kinds_of_links.mdwn | 61 +++++++++++++++++-------- 1 file changed, 43 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 20acdde49..f8796652e 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -97,21 +97,46 @@ Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in An optional third parameter sets the link type (`undef` produces an ordinary [[ikiwiki/WikiLink]]). -> Some code refers to `oldtypedlinks`, and other to `oldlinktypes`. -> -> I'm curious what your reasoning was for adding a new variable -> rather than using `pagestate`. Was it only because you needed -> the `old` version to detect change, or was there other complexity? -> -> I have not convinced myself this is a real problem, but.. -> If a page has a typed link, there seems to be no way to tell -> if it also has a separate, regular link. `add_link` will add -> to `@links` when adding a typed, or untyped link. If only untyped -> links were recorded there, one could tell the difference. But then -> typed links would not show up at all in eg, a linkmap, -> unless it was changed to check for typed links too. -> (Or, regular links could be recorded in typedlinks too, -> with a empty type. (Bloaty.)) -> -> I suspect we could get away without having `tagged_is_strict` -> without too much transitional trouble. --[[Joey]] +## Review + +Some code refers to `oldtypedlinks`, and other to `oldlinktypes`. --[[Joey]] + +> Oops, I'll fix that. That must mean missing test coverage, too :-( +> --s + +I'm curious what your reasoning was for adding a new variable +rather than using `pagestate`. Was it only because you needed +the `old` version to detect change, or was there other complexity? +--J + +> You seemed to be more in favour of adding it to the core in +> your proposal above, so I assumed that'd be more likely to be +> accepted :-) I don't mind one way or the other - `%typedlinks` +> costs one core variable, but saves one level of hash nesting. If +> you're not sure either, then I think the decision should come down +> to which one is easier to document clearly - I'm still unhappy with +> my docs for `%typedlinks`, so I'll try to write docs for it as +> `pagestate` and see if they work any better. --s + +I have not convinced myself this is a real problem, but.. +If a page has a typed link, there seems to be no way to tell +if it also has a separate, regular link. `add_link` will add +to `@links` when adding a typed, or untyped link. If only untyped +links were recorded there, one could tell the difference. But then +typed links would not show up at all in eg, a linkmap, +unless it was changed to check for typed links too. +(Or, regular links could be recorded in typedlinks too, +with a empty type. (Bloaty.)) --J + +> I think I like the semantics as-is - I can't think of any +> reason why you'd want to ask the question "does A link to B, +> not counting tags and other typed links?". A typed link is +> still a link, in my mind at least. --s + +I suspect we could get away without having `tagged_is_strict` +without too much transitional trouble. --[[Joey]] + +> If you think so, I can delete about 5 LoC. I don't particularly +> care either way; [[Jon]] expressed concern about people relying +> on the current semantics, on one of the pages requesting this +> change. --s -- cgit v1.2.3 From 011fe920d162924876170d167be11dc64cf8be2f Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 00:00:53 +0000 Subject: respond at some length --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 163 ++++++++++++--------- 1 file changed, 94 insertions(+), 69 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index e1e05e81c..156678da7 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -1,4 +1,3 @@ -[[!template id=gitbranch branch=smcv/sort-hooks author="[[Simon_McVittie|smcv]]"]] [[!tag patch]] The available [[ikiwiki/pagespec/sorting]] methods are currently hard-coded in @@ -11,36 +10,13 @@ title over the page name, but for compatibility, I'm not going to (I do wonder whether it would be worth making sort=name an alias for the current sort=title, and changing the meaning of sort=title in 4.0, though). -Gitweb: -<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-hooks> +*[sort-hooks branch now withdrawn in favour of sort-package --s]* I briefly tried to turn *all* the current sort types into hook functions, and have some of them pre-registered, but decided that probably wasn't a good idea. That earlier version of the branch is also available for comparison: -<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/sort-hooks-excessive> - -(The older version is untested, and probably doesn't really work as-is - I -misunderstood the details of how the built-in function `sort` works when using -`$a` and `$b`. The newer version has been tested, and has a regression test for -its core functionality.) - -This hook *isn't* (yet) sufficient to implement [[plugins/contrib/report]]'s -NIH'd sorting mechanisms: - -* `report` can sort by any [[plugins/contrib/field]], whereas this one has a - finite number of hooks: if the `field` plugin's functionality is desirable, - perhaps parameterized sort mechanisms similar to pagespec match functions - would be useful? Then the `field` plugin could register - `hook(type => "sort", id => "field")` and you could have - `\[[!inline ... sort="field(Mood)"]]` or something? - -* `report` can sort by multiple criteria, with independent direction-changing: - if this is desirable, perhaps `pagespec_match_list` could be enhanced to - interpret `sort="x -y z(w)"` as sorting by (pseudocode) - `{ $cmp_x->($a, $b) || (-$cmp_y->($a, $b)) || $cmp_z->($a, $b, "w") }`? - -> I've now added both of these features to the sort-hooks branch. --[[smcv]] +*[also withdrawn in favour of sort-package --s]* >> I wonder if IkiWiki would benefit from the concept of a "sortspec", like a [[ikiwiki/PageSpec]] but dedicated to sorting lists of pages rather than defining lists of pages? Rather than defining a sort-hook, define a SortSpec class, and enable people to add their own sort methods as functions defined inside that class, similarly to the way they can add their own pagespec definitions. --[[KathrynAndersen]] @@ -53,17 +29,65 @@ NIH'd sorting mechanisms: >>>> I agree it seems more elegant, so I have focused on it. >>>> >>>> I don't know about reusing `IkiWiki::PageSpec` for this. ->>>> +>>>> --[[Joey]] + +>>>>> Fair enough, `IkiWiki::SortSpec::cmp_foo` would be just +>>>>> as easy, or `IkiWiki::Sorting::cmp_foo` if you don't like +>>>>> introducing "sort spec" in the API. I took a cue from +>>>>> [[ikiwiki/pagespec/sorting]] being a subpage of +>>>>> [[ikiwiki/pagespec]], and decided that yes, sorting is +>>>>> a bit like a pagespec :-) --s + >>>> I would be inclined to drop the `check_` stuff. ->>>> + +>>>>> It basically exists to support `title_natural`, to avoid +>>>>> firing up the whole import mechanism on every `cmp` +>>>>> (although I suppose that could just be a call to a +>>>>> memoized helper function). It also lets sort specs that +>>>>> *must* have a parameter, like +>>>>> [[field|plugins/contrib/field/discussion]], fail early +>>>>> (again, not so valuable). +>>>>> +>>>>> The former function could be achieved at a small +>>>>> compatibility cost by putting `title_natural` in a new +>>>>> sortnatural plugin (that fails to load if you don't +>>>>> have `title_natural`), if you'd prefer - that's what would +>>>>> have happened if `title_natural` was written after this +>>>>> code had been merged, I suspect. --s + >>>> Wouldn't it make sense to have `meta(title)` instead ->>>> of `meta_title`? ->>>> +>>>> of `meta_title`? --J + +>>>>> Yes, you're right. I added parameters to support `field`, +>>>>> and didn't think about making `meta` use them too. +>>>>> However, `title` does need a special case to make it +>>>>> default to the basename instead of the empty string. +>>>>> +>>>>> Another special case for `title` is to use `titlesort` +>>>>> first (the name `titlesort` is derived from Ogg/FLAC +>>>>> tags, which can have `titlesort` and `artistsort`). +>>>>> I could easily extend that to other metas, though; +>>>>> in fact, for e.g. book lists it would be nice for +>>>>> `field(bookauthor)` to behave similarly, so you can +>>>>> display "Douglas Adams" but sort by "Adams, Douglas". +>>>>> +>>>>> `meta_title` is also meant to be a prototype of how +>>>>> `sort=title` could behave in 4.0 or something - sorting +>>>>> by page name (which usually sorts in approximately the +>>>>> same place as the meta-title, but occasionally not), while +>>>>> displaying meta-titles, does look quite odd. --s + >>>> As I read the regexp in `cmpspec_translate`, the "command" >>>> is required to have params. They should be optional, >>>> to match the documentation and because most sort methods ->>>> do not need parameters. ->>>> +>>>> do not need parameters. --J + +>>>>> No, `$2` is either `\w+\([^\)]*\)` or `[^\s]+` (with the +>>>>> latter causing an error later if it doesn't also match `\w+`). +>>>>> This branch doesn't add any parameterized sort methods, +>>>>> in fact, although I did provide one on +>>>>> [[field's_discussion_page|plugins/contrib/report/discussion]]. --s + >>>> I wonder if it would make sense to add some combining keywords, so >>>> a sortspec reads like `sort="age then ascending title"` >>>> In a way, this reduces the amount of syntax that needs to be learned. @@ -73,38 +97,42 @@ NIH'd sorting mechanisms: >>>> "ascending age" both seem useful to be able to explicitly specify. >>>> --[[Joey]] -## Documentation from sort-hooks branch - -### sort hook (added to [[plugins/write]]) - - hook(type => "sort", id => "foo", call => \&sort_by_foo); - -This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. - -The callback is given two page names followed by the parameter as arguments, and -returns negative, zero or positive if the first page should come before, -close to (i.e. undefined order), or after the second page. - -For instance, the built-in `title` sort order could be reimplemented as - - sub sort_by_title { - pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); - } - -and to sort by an arbitrary `meta` value, you could use: - - # usage: sort="meta(description)" - sub sort_by_meta { - my $param = $_[2]; - error "sort=meta requires a parameter" unless defined $param; - my $left = $pagestate{$_[0]}{meta}{$param}; - $left = "" unless defined $left; - my $right = $pagestate{$_[1]}{meta}{$param}; - $right = "" unless defined $right; - return $left cmp $right; - } +>>>>> Perhaps. I do like the simplicity of [[KathyrnAndersen]]'s syntax +>>>>> from [[plugins/contrib/report]] (which I copied verbatim, except for +>>>>> turning sort-by-`field` into a parameterized spec), and I can't really +>>>>> think of any sensible way to combine sort specs other than "sort by a, +>>>>> break ties by b, ...", possibly with some reversals thrown in. +>>>>> +>>>>> If no other combinations do make sense, is your proposal that "then" +>>>>> is entirely redundant (easy, just make it a predefined sort spec that +>>>>> returns 0!), or that it's mandatory "punctuation" (add an explicit +>>>>> check, or make "then" expand to "||" and let Perl fail to compile +>>>>> the generated code if it's omitted)? +>>>>> +>>>>> It is a little unfortunate that reversal has to move into the sort +>>>>> spec - I prefer `reverse=yes` - but that's necessary for multi-level +>>>>> sorting. I can see your point about ascending/descending being more +>>>>> obvious to look at, but they're also considerably more verbose. +>>>>> +>>>>> Unfortunately, `sort="ascending mtime"` actually sorts by *descending* +>>>>> timestamp (but`sort=age` is fine, because `age` could be defined as +>>>>> now minus `ctime`). `sort=freshness` isn't right either, because +>>>>> "sort by freshness" seems as though it ought to mean freshest first, +>>>>> but "sort by ascending freshness" means put the least fresh first. If +>>>>> we have ascending and descending keywords which are optional, I don't +>>>>> think we really want different sort types to have different default +>>>>> directions - it seems clearer to have `ascending` always be a no-op, +>>>>> and `descending` always negate. +>>>>> +>>>>> Perhaps we could borrow from `meta updated` and use `update_age`? +>>>>> `updateage` would perhaps be a more normal IkiWiki style - but that +>>>>> makes me think that updateage is a quantity analagous to tonnage or +>>>>> voltage, with more or less recently updated pages being said to have +>>>>> more or less updateage. I don't know whether that's good or bad :-) +>>>>> +>>>>> I'm sure there's a much better word, but I can't see it. --s +## Documentation from sort-package branch ### meta_title sort order (conditionally added to [[ikiwiki/pagespec/sorting]]) @@ -115,6 +143,8 @@ and to sort by an arbitrary `meta` value, you could use: > I feel it sould be clearer to call that "sortas", since "sort=" is used > to specify a sort method in other directives. --[[Joey]] + >> Fair enough, that's easy to do. --[[smcv]] + ### Multiple sort orders (added to [[ikiwiki/pagespec/sorting]]) In addition, you can combine several sort orders and/or reverse the order of @@ -130,12 +160,7 @@ An optional `sort` parameter will be used preferentially when \[[!meta title="David Bowie" sort="Bowie, David"]] -## Documentation from sort-package branch - -The changes to [[ikiwiki/pagespec/sorting]] are the same. -The changes to [[plugins/write]] are replaced by: - -### Sorting plugins +### Sorting plugins (added to [[plugins/write]]) Similarly, it's possible to write plugins that add new functions as [[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to -- cgit v1.2.3 From aec7dec2795aedfe1f13cff9a888bed83ee760df Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 00:12:59 +0000 Subject: make questions to Joey more explicit --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 156678da7..36c134a59 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -36,9 +36,9 @@ That earlier version of the branch is also available for comparison: >>>>> introducing "sort spec" in the API. I took a cue from >>>>> [[ikiwiki/pagespec/sorting]] being a subpage of >>>>> [[ikiwiki/pagespec]], and decided that yes, sorting is ->>>>> a bit like a pagespec :-) --s +>>>>> a bit like a pagespec :-) Which name would you prefer? --s ->>>> I would be inclined to drop the `check_` stuff. +>>>> I would be inclined to drop the `check_` stuff. --J >>>>> It basically exists to support `title_natural`, to avoid >>>>> firing up the whole import mechanism on every `cmp` @@ -50,10 +50,10 @@ That earlier version of the branch is also available for comparison: >>>>> >>>>> The former function could be achieved at a small >>>>> compatibility cost by putting `title_natural` in a new ->>>>> sortnatural plugin (that fails to load if you don't +>>>>> `sortnatural` plugin (that fails to load if you don't >>>>> have `title_natural`), if you'd prefer - that's what would >>>>> have happened if `title_natural` was written after this ->>>>> code had been merged, I suspect. --s +>>>>> code had been merged, I suspect. Would you prefer this? --s >>>> Wouldn't it make sense to have `meta(title)` instead >>>> of `meta_title`? --J @@ -97,7 +97,7 @@ That earlier version of the branch is also available for comparison: >>>> "ascending age" both seem useful to be able to explicitly specify. >>>> --[[Joey]] ->>>>> Perhaps. I do like the simplicity of [[KathyrnAndersen]]'s syntax +>>>>> Perhaps. I do like the simplicity of [[KathrynAndersen]]'s syntax >>>>> from [[plugins/contrib/report]] (which I copied verbatim, except for >>>>> turning sort-by-`field` into a parameterized spec), and I can't really >>>>> think of any sensible way to combine sort specs other than "sort by a, @@ -130,7 +130,8 @@ That earlier version of the branch is also available for comparison: >>>>> voltage, with more or less recently updated pages being said to have >>>>> more or less updateage. I don't know whether that's good or bad :-) >>>>> ->>>>> I'm sure there's a much better word, but I can't see it. --s +>>>>> I'm sure there's a much better word, but I can't see it. Do you have +>>>>> a better idea? --s ## Documentation from sort-package branch -- cgit v1.2.3 From 5f87d5d242b87ce5cfbd7ac5fcb1efcc62fc5582 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 00:25:28 +0000 Subject: actually I can see a second use for "nonlinear" syntax - but I don't think it's worth it --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 36c134a59..1657ca8e9 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -99,20 +99,28 @@ That earlier version of the branch is also available for comparison: >>>>> Perhaps. I do like the simplicity of [[KathrynAndersen]]'s syntax >>>>> from [[plugins/contrib/report]] (which I copied verbatim, except for ->>>>> turning sort-by-`field` into a parameterized spec), and I can't really ->>>>> think of any sensible way to combine sort specs other than "sort by a, ->>>>> break ties by b, ...", possibly with some reversals thrown in. +>>>>> turning sort-by-`field` into a parameterized spec). >>>>> ->>>>> If no other combinations do make sense, is your proposal that "then" ->>>>> is entirely redundant (easy, just make it a predefined sort spec that ->>>>> returns 0!), or that it's mandatory "punctuation" (add an explicit ->>>>> check, or make "then" expand to "||" and let Perl fail to compile ->>>>> the generated code if it's omitted)? +>>>>> If we're getting into English-like (or at least SQL-like) queries, +>>>>> it might make sense to change the signature of the hook function +>>>>> so it's a function to return a key, e.g. +>>>>> `sub key_age { return -%pagemtime{$_[0]) }`. Then we could sort like +>>>>> this: >>>>> ->>>>> It is a little unfortunate that reversal has to move into the sort ->>>>> spec - I prefer `reverse=yes` - but that's necessary for multi-level ->>>>> sorting. I can see your point about ascending/descending being more ->>>>> obvious to look at, but they're also considerably more verbose. +>>>>> field(artistsort) or field(artist) or constant(Various Artists) then meta(titlesort) or meta(title) or title +>>>>> +>>>>> with "or" binding more closely than "then". Does this seem valuable? +>>>>> I think the implementation would be somewhat more difficult. and +>>>>> it's probably getting too complicated to be worthwhile, though? +>>>>> (The keys that actually benefit from this could just +>>>>> have smarter cmp functions, I think.) +>>>>> +>>>>> If the hooks return keys rather than cmp results, then we could even +>>>>> have "lowercase" as an adjective used like "ascending"... maybe. +>>>>> However, there are two types of adjective here: "lowercase" +>>>>> really applies to the keys, whereas "ascending" applies to the "cmp" +>>>>> result. Again, I think this is getting too complex, and could just +>>>>> be solved with smarter cmp functions. >>>>> >>>>> Unfortunately, `sort="ascending mtime"` actually sorts by *descending* >>>>> timestamp (but`sort=age` is fine, because `age` could be defined as -- cgit v1.2.3 From c2f54ccfb7b401b59f7eda13095e2ba2af69ed7a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 00:41:31 +0000 Subject: sort-order could usefully be overridden for meta author, too --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 1657ca8e9..e79e52f39 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -169,6 +169,9 @@ An optional `sort` parameter will be used preferentially when \[[!meta title="David Bowie" sort="Bowie, David"]] +> I now realise that `author` should also have this, again for use +> with (Western) names. --s + ### Sorting plugins (added to [[plugins/write]]) Similarly, it's possible to write plugins that add new functions as -- cgit v1.2.3 From 0dad28b3530d70830456a3f8d57b0e3f3d52ee2d Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 00:45:16 +0000 Subject: reduced difference --- doc/plugins/contrib/ftemplate/discussion.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index eb84dd09b..1e0bca5d8 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -29,6 +29,5 @@ seems orthogonal (and might be a good enhancement to `template` anyway). > Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] ->> Yeah, that's something that annoys me about `template` too. I've ->> opened a todo: [[todo/user-defined_templates_outside_the_wiki]]. ->> --s +>> Joey has added support for +>> [[todo/user-defined_templates_outside_the_wiki]] now. --s -- cgit v1.2.3 From c4a838b33a34ff61a1dd5c6f65e40df3609e727f Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 00:53:59 +0000 Subject: perhaps the typedlink(tag foo) pagespec isn't so useful --- doc/todo/matching_different_kinds_of_links.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index f8796652e..4f52ade52 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -140,3 +140,12 @@ without too much transitional trouble. --[[Joey]] > care either way; [[Jon]] expressed concern about people relying > on the current semantics, on one of the pages requesting this > change. --s + +I might have been wrong to introduce `typedlink(tag foo)`. It's not +very user-friendly, and is more useful as a backend for other plugins +that as a feature in its own right - any plugin introducing a link +type will probably also want to have its own preprocessor directive +to set that link type, and its own pagespec function to match it. +I wonder whether to make a `typedlink` plugin that has the typedlink +pagespec match function and a new `\[[!typedlink to="foo" type="bar"]]` +though... --[[smcv]] -- cgit v1.2.3 From 3934759592c35ab475e06501e2e4613d5c1f2e08 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 01:13:08 +0000 Subject: vague musings about wikilinks --- .../link_plugin_perhaps_too_general__63__.mdwn | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 doc/todo/link_plugin_perhaps_too_general__63__.mdwn (limited to 'doc') diff --git a/doc/todo/link_plugin_perhaps_too_general__63__.mdwn b/doc/todo/link_plugin_perhaps_too_general__63__.mdwn new file mode 100644 index 000000000..8a5fd50eb --- /dev/null +++ b/doc/todo/link_plugin_perhaps_too_general__63__.mdwn @@ -0,0 +1,25 @@ +[[!tag wishlist blue-sky]] +(This isn't important to me - I don't use MediaWiki or Creole syntax myself - +but just thinking out loud...) + +The [[ikiwiki/wikilink]] syntax IkiWiki uses sometimes conflicts with page +languages' syntax (notably, [[plugins/contrib/MediaWiki]] and [[plugins/Creole]] +want their wikilinks the other way round, like +`\[[plugins/write|how to write a plugin]]`). It would be nice if there was +some way for page language plugins to opt in/out of the normal wiki link +processing - then MediaWiki and Creole could have their own `linkify` hook +that was only active for *their* page types, and used the appropriate +syntax. + +In [[todo/matching_different_kinds_of_links]] I wondered about adding a +`\[[!typedlink to="foo" type="bar"]]` directive. This made me wonder whether +a core `\[[!link]]` directive would be useful; this could be a fallback for +page types where a normal wikilink can't be done for whatever reason, and +could also provide extension points more easily than WikiLinks' special +syntax with extra punctuation, which doesn't really scale? + +Straw-man: + + \[[!link to="ikiwiki/wikilink" desc="WikiLinks"]] + +--[[smcv]] -- cgit v1.2.3 From 5445fe765777dc6254c7e0e13d4fa5e07810751a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 01:15:28 +0000 Subject: cross-reference --- doc/todo/rewrite_ikiwiki_in_haskell.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/todo/rewrite_ikiwiki_in_haskell.mdwn b/doc/todo/rewrite_ikiwiki_in_haskell.mdwn index 204c48cd7..48ed744b1 100644 --- a/doc/todo/rewrite_ikiwiki_in_haskell.mdwn +++ b/doc/todo/rewrite_ikiwiki_in_haskell.mdwn @@ -29,6 +29,7 @@ It's appealing for a lot of reasons, including: edit in html editors currently. - This would be a chance to make WikiLinks with link texts read "the right way round" (ie, vaguely wiki creole compatably). + *[See also [[todo/link_plugin_perhaps_too_general?]] --[[smcv]]]* - The data structures would probably be quite different. - I might want to drop a lot of the command-line flags, either requiring a setup file be used for those things, or leaving the -- cgit v1.2.3 From e4e53d7a18ec18d1ba72b1a4f124e211148e0f12 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 22:23:36 -0400 Subject: response --- doc/todo/matching_different_kinds_of_links.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 4f52ade52..2cd484852 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -104,6 +104,8 @@ Some code refers to `oldtypedlinks`, and other to `oldlinktypes`. --[[Joey]] > Oops, I'll fix that. That must mean missing test coverage, too :-( > --s +>> A test suite for the dependency resolver *would* be nice. --[[Joey]] + I'm curious what your reasoning was for adding a new variable rather than using `pagestate`. Was it only because you needed the `old` version to detect change, or was there other complexity? @@ -133,6 +135,8 @@ with a empty type. (Bloaty.)) --J > not counting tags and other typed links?". A typed link is > still a link, in my mind at least. --s +>> Me neither, let's not worry about it. --[[Joey]] + I suspect we could get away without having `tagged_is_strict` without too much transitional trouble. --[[Joey]] @@ -149,3 +153,6 @@ to set that link type, and its own pagespec function to match it. I wonder whether to make a `typedlink` plugin that has the typedlink pagespec match function and a new `\[[!typedlink to="foo" type="bar"]]` though... --[[smcv]] + +> I agree, per-type matchers are more friendly and I'm not enamored of the +> multi-parameter pagespec syntax. --[[Joey]] -- cgit v1.2.3 From 931c7b00ccb47371ee6e1d56baf5c52d725a321f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 2 Apr 2010 22:46:31 -0400 Subject: response --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index e79e52f39..c6e18505e 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -38,7 +38,9 @@ That earlier version of the branch is also available for comparison: >>>>> [[ikiwiki/pagespec]], and decided that yes, sorting is >>>>> a bit like a pagespec :-) Which name would you prefer? --s ->>>> I would be inclined to drop the `check_` stuff. --J +>>>>>> `SortSpec` --[[Joey]] + +>>>> I would be inclined to drop the `check_` stuff. --[[Joey]] >>>>> It basically exists to support `title_natural`, to avoid >>>>> firing up the whole import mechanism on every `cmp` @@ -48,6 +50,11 @@ That earlier version of the branch is also available for comparison: >>>>> [[field|plugins/contrib/field/discussion]], fail early >>>>> (again, not so valuable). >>>>> +>>>>>> AFAIK, `use foo` has very low overhead when the module is already +>>>>>> loaded. There could be some evalation overhead in `eval q{use foo}`, +>>>>>> if so it would be worth addressing across the whole codebase. +>>>>>> --[[Joey]] +>>>>> >>>>> The former function could be achieved at a small >>>>> compatibility cost by putting `title_natural` in a new >>>>> `sortnatural` plugin (that fails to load if you don't @@ -55,8 +62,12 @@ That earlier version of the branch is also available for comparison: >>>>> have happened if `title_natural` was written after this >>>>> code had been merged, I suspect. Would you prefer this? --s +>>>>>> Yes! (Assuming it does not make sense to support +>>>>>> natural order sort of other keys than the title, at least..) +>>>>>> --[[Joey]] + >>>> Wouldn't it make sense to have `meta(title)` instead ->>>> of `meta_title`? --J +>>>> of `meta_title`? --[[Joey]] >>>>> Yes, you're right. I added parameters to support `field`, >>>>> and didn't think about making `meta` use them too. @@ -77,10 +88,12 @@ That earlier version of the branch is also available for comparison: >>>>> same place as the meta-title, but occasionally not), while >>>>> displaying meta-titles, does look quite odd. --s +>>>>>> Agreed. --[[Joey]] + >>>> As I read the regexp in `cmpspec_translate`, the "command" >>>> is required to have params. They should be optional, >>>> to match the documentation and because most sort methods ->>>> do not need parameters. --J +>>>> do not need parameters. --[[Joey]] >>>>> No, `$2` is either `\w+\([^\)]*\)` or `[^\s]+` (with the >>>>> latter causing an error later if it doesn't also match `\w+`). @@ -122,6 +135,9 @@ That earlier version of the branch is also available for comparison: >>>>> result. Again, I think this is getting too complex, and could just >>>>> be solved with smarter cmp functions. >>>>> +>>>>>> I agree. (Also, I think returning keys may make it harder to write +>>>>>> smarter cmp functions.) --[[Joey]] +>>>>> >>>>> Unfortunately, `sort="ascending mtime"` actually sorts by *descending* >>>>> timestamp (but`sort=age` is fine, because `age` could be defined as >>>>> now minus `ctime`). `sort=freshness` isn't right either, because @@ -132,6 +148,9 @@ That earlier version of the branch is also available for comparison: >>>>> directions - it seems clearer to have `ascending` always be a no-op, >>>>> and `descending` always negate. >>>>> +>>>>>> I think you've convinced me that ascending/descending impose too +>>>>>> much semantics on it, so "-" is better. --[[Joey]] +>>>>> >>>>> Perhaps we could borrow from `meta updated` and use `update_age`? >>>>> `updateage` would perhaps be a more normal IkiWiki style - but that >>>>> makes me think that updateage is a quantity analagous to tonnage or -- cgit v1.2.3 From a875ee8be702bd4575e009dc652015c1157c7c2e Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Sat, 3 Apr 2010 13:48:30 +0100 Subject: Split out sortnaturally into a plugin --- IkiWiki.pm | 11 ----------- IkiWiki/Plugin/sortnaturally.pm | 32 ++++++++++++++++++++++++++++++++ debian/NEWS | 8 ++++++++ doc/ikiwiki/pagespec/sorting.mdwn | 5 +++-- doc/plugins/sortnaturally.mdwn | 5 +++++ 5 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 IkiWiki/Plugin/sortnaturally.pm create mode 100644 doc/plugins/sortnaturally.mdwn (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index a89c14058..8f36f5818 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2423,15 +2423,4 @@ sub cmp_title { sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } -sub check_cmp_title_natural { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } -} -sub cmp_title_natural { - Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), - IkiWiki::pagetitle(IkiWiki::basename($_[1]))) -} - 1 diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm new file mode 100644 index 000000000..0023f31f9 --- /dev/null +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# Sort::Naturally-powered title_natural sort order for IkiWiki +package IkiWiki::Plugin::sortnaturally; + +use IkiWiki 3.00; +no warnings; + +sub import { + hook(type => "getsetup", id => "sortnaturally", call => \&getsetup); +} + +sub getsetup { + return + plugin => { + safe => 1, + rebuild => 1, + }, +} + +sub checkconfig () { + eval q{use Sort::Naturally}; + error $@ if $@; +} + +package IkiWiki::PageSpec; + +sub cmp_title_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), + IkiWiki::pagetitle(IkiWiki::basename($_[1]))) +} + +1; diff --git a/debian/NEWS b/debian/NEWS index 50332670f..614eb11f8 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,11 @@ +ikiwiki (3.20100320) UNRELEASED; urgency=low + + The sort="title_natural" option on [[!inline]] etc. now requires the + new sortnaturally plugin. This is not enabled by default, because it requires + the Sort::Naturally module. + + -- Simon McVittie <smcv@debian.org> Sat, 03 Apr 2010 13:46:08 +0100 + ikiwiki (3.20091017) unstable; urgency=low To take advantage of significant performance improvements, all diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index f27972d4e..ba995a521 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -6,9 +6,10 @@ orders can be specified. * `age` - List pages from the most recently created to the oldest. * `mtime` - List pages with the most recently modified first. * `title` - Order by title (page name). -* `title_natural` - Only available if [[!cpan Sort::Naturally]] is - installed. Orders by title, but numbers in the title are treated +[[!if test="enabled(sortnaturally)" then=""" +* `title_natural` - Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +"""]] [[!if test="enabled(meta)" then=""" * `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no diff --git a/doc/plugins/sortnaturally.mdwn b/doc/plugins/sortnaturally.mdwn new file mode 100644 index 000000000..91f373f6b --- /dev/null +++ b/doc/plugins/sortnaturally.mdwn @@ -0,0 +1,5 @@ +[[!template id=plugin name=sortnaturally core=1 author="[[chrysn]], [[smcv]]"]] +[[!tag type/meta]] + +This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] order, +which uses Sort::Naturally to sort numbered pages in a more natural order. -- cgit v1.2.3 From 75fd08046548940c443c46bcdf9a5b0b6968b175 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Sat, 3 Apr 2010 13:49:20 +0100 Subject: Remove support for check_cmp_foo (pre-sort checks) --- IkiWiki.pm | 4 ---- doc/plugins/write.mdwn | 5 ----- 2 files changed, 9 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8f36f5818..7547f1751 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1973,10 +1973,6 @@ sub cmpspec_translate ($) { } if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { - if (exists $IkiWiki::PageSpec::{"check_cmp_$word"}) { - $IkiWiki::PageSpec::{"check_cmp_$word"}->($params); - } - if (defined $params) { push @data, $params; $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index de2b47015..06c8f8e44 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1128,11 +1128,6 @@ is greater, or zero if they are considered equal. It may also raise an error using `error`, for instance if it needs a parameter but one isn't provided. -You can also define a function called `check_cmp_foo` in the same package. -If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, -with argument `undef` or `"bar"` respectively; it may raise an error using -`error`, if sorting like that isn't going to work. - ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look -- cgit v1.2.3 From 04a59b3c65e8e60805b6ed6d11d448b1d5babe64 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Sat, 3 Apr 2010 13:57:38 +0100 Subject: Move sort hooks to the IkiWiki::SortSpec namespace Also rename cmpspec_translate (internal function) to sortspec_translate for consistency. --- IkiWiki.pm | 14 ++++++++------ IkiWiki/Plugin/meta.pm | 2 ++ IkiWiki/Plugin/sortnaturally.pm | 2 +- doc/plugins/write.mdwn | 2 +- t/pagespec_match_list.t | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7547f1751..d716e8b39 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -37,7 +37,7 @@ our $DEPEND_LINKS=4; # Optimisation. use Memoize; memoize("abs2rel"); -memoize("cmpspec_translate"); +memoize("sortspec_translate"); memoize("pagespec_translate"); memoize("template_file"); @@ -1935,7 +1935,7 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } -sub cmpspec_translate ($) { +sub sortspec_translate ($) { my $spec = shift; my $code = ""; @@ -1972,13 +1972,13 @@ sub cmpspec_translate ($) { $code .= "-"; } - if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { + if (exists $IkiWiki::SortSpec::{"cmp_$word"}) { if (defined $params) { push @data, $params; - $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; + $code .= "IkiWiki::SortSpec::cmp_$word(\@_, \$data[$#data])"; } else { - $code .= "IkiWiki::PageSpec::cmp_$word(\@_, undef)"; + $code .= "IkiWiki::SortSpec::cmp_$word(\@_, undef)"; } } else { @@ -2095,7 +2095,7 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = cmpspec_translate($params{sort}); + my $f = sortspec_translate($params{sort}); @candidates = sort { $f->($a, $b) } @candidates; } @@ -2410,6 +2410,8 @@ sub match_ip ($$;@) { } } +package IkiWiki::SortSpec; + sub cmp_title { IkiWiki::pagetitle(IkiWiki::basename($_[0])) cmp diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index e8cc1e392..cd7d0d127 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -348,6 +348,8 @@ sub match_copyright ($$;@) { IkiWiki::Plugin::meta::match("copyright", @_); } +package IkiWiki::SortSpec; + sub cmp_meta_title { IkiWiki::Plugin::meta::titlesort($_[0]) cmp diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index 0023f31f9..f498820a5 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -22,7 +22,7 @@ sub checkconfig () { error $@ if $@; } -package IkiWiki::PageSpec; +package IkiWiki::SortSpec; sub cmp_title_natural { Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 06c8f8e44..b67142230 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1114,7 +1114,7 @@ while "glob(*)" is not influenced by the contents of any page. Similarly, it's possible to write plugins that add new functions as [[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to -the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. The function will be passed three or more parameters. The first two are diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 743ae4637..68112f5c0 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -10,7 +10,7 @@ $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); { - package IkiWiki::PageSpec; + package IkiWiki::SortSpec; sub cmp_path { $_[0] cmp $_[1] } } -- cgit v1.2.3 From 56c64ff1963b33da74677f08a0b8c6579bc2d68b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sat, 3 Apr 2010 13:39:44 +0000 Subject: updated branch --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 56 +++++++++++++++------- 1 file changed, 38 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index c6e18505e..8c6e1df3b 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -40,6 +40,8 @@ That earlier version of the branch is also available for comparison: >>>>>> `SortSpec` --[[Joey]] +>>>>>>> Done. --s + >>>> I would be inclined to drop the `check_` stuff. --[[Joey]] >>>>> It basically exists to support `title_natural`, to avoid @@ -54,6 +56,8 @@ That earlier version of the branch is also available for comparison: >>>>>> loaded. There could be some evalation overhead in `eval q{use foo}`, >>>>>> if so it would be worth addressing across the whole codebase. >>>>>> --[[Joey]] +>>>>>> +>>>>>>> check_cmp_foo now dropped. --s >>>>> >>>>> The former function could be achieved at a small >>>>> compatibility cost by putting `title_natural` in a new @@ -66,6 +70,8 @@ That earlier version of the branch is also available for comparison: >>>>>> natural order sort of other keys than the title, at least..) >>>>>> --[[Joey]] +>>>>>>> Done. I added some NEWS.Debian for it, too. --s + >>>> Wouldn't it make sense to have `meta(title)` instead >>>> of `meta_title`? --[[Joey]] @@ -90,6 +96,11 @@ That earlier version of the branch is also available for comparison: >>>>>> Agreed. --[[Joey]] +>>>>>>> I've implemented meta(title). meta(author) also has the +>>>>>>> `sortas` special case; meta(updated) and meta(date) +>>>>>>> should also work how you'd expect them to (but they're +>>>>>>> earliest-first, unlike age). --s + >>>> As I read the regexp in `cmpspec_translate`, the "command" >>>> is required to have params. They should be optional, >>>> to match the documentation and because most sort methods @@ -150,6 +161,10 @@ That earlier version of the branch is also available for comparison: >>>>> >>>>>> I think you've convinced me that ascending/descending impose too >>>>>> much semantics on it, so "-" is better. --[[Joey]] + +>>>>>>> I've kept the semantics from `report` as-is, then: +>>>>>>> e.g. `sort="age -title"`. --s + >>>>> >>>>> Perhaps we could borrow from `meta updated` and use `update_age`? >>>>> `updateage` would perhaps be a more normal IkiWiki style - but that @@ -160,18 +175,22 @@ That earlier version of the branch is also available for comparison: >>>>> I'm sure there's a much better word, but I can't see it. Do you have >>>>> a better idea? --s -## Documentation from sort-package branch +[Regarding the `meta title=foo sort=bar` special case] -### meta_title sort order (conditionally added to [[ikiwiki/pagespec/sorting]]) +> I feel it sould be clearer to call that "sortas", since "sort=" is used +> to specify a sort method in other directives. --[[Joey]] +>> Done. --[[smcv]] -* `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` - or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no - full title was set. +## Documentation from sort-package branch - > I feel it sould be clearer to call that "sortas", since "sort=" is used - > to specify a sort method in other directives. --[[Joey]] +### advanced sort orders (conditionally added to [[ikiwiki/pagespec/sorting]]) - >> Fair enough, that's easy to do. --[[smcv]] +* `title_natural` - Orders by title, but numbers in the title are treated + as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +* `meta(title)` - Order according to the `\[[!meta title="foo" sortas="bar"]]` + or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no + full title was set. `meta(author)`, `meta(date)`, `meta(updated)`, etc. + also work. ### Multiple sort orders (added to [[ikiwiki/pagespec/sorting]]) @@ -179,23 +198,29 @@ In addition, you can combine several sort orders and/or reverse the order of sorting, with a string like `age -title` (which would sort by age, then by title in reverse order if two pages have the same age). -### meta title sort parameter (added to [[ikiwiki/directive/meta]]) +### meta sortas parameter (added to [[ikiwiki/directive/meta]]) + +[in title] An optional `sort` parameter will be used preferentially when -[[ikiwiki/pagespec/sorting]] by `meta_title`: +[[ikiwiki/pagespec/sorting]] by `meta(title)`: \[[!meta title="The Beatles" sort="Beatles, The"]] \[[!meta title="David Bowie" sort="Bowie, David"]] -> I now realise that `author` should also have this, again for use -> with (Western) names. --s +[in author] + + An optional `sortas` parameter will be used preferentially when + [[ikiwiki/pagespec/sorting]] by `meta(author)`: + + \[[!meta author="Joey Hess" sortas="Hess, Joey"]] ### Sorting plugins (added to [[plugins/write]]) Similarly, it's possible to write plugins that add new functions as [[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to -the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. The function will be passed three or more parameters. The first two are @@ -208,8 +233,3 @@ if the first argument is less than the second, positive if the first argument is greater, or zero if they are considered equal. It may also raise an error using `error`, for instance if it needs a parameter but one isn't provided. - -You can also define a function called `check_cmp_foo` in the same package. -If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, -with argument `undef` or `"bar"` respectively; it may raise an error using -`error`, if sorting like that isn't going to work. -- cgit v1.2.3 From af2bf285155ea4fc92932ba0b8e9becef57c69e8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 3 Apr 2010 15:15:25 -0400 Subject: add news item for ikiwiki 3.20100403 --- doc/news/version_3.20100102.3.mdwn | 21 --------------------- doc/news/version_3.20100403.mdwn | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 21 deletions(-) delete mode 100644 doc/news/version_3.20100102.3.mdwn create mode 100644 doc/news/version_3.20100403.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20100102.3.mdwn b/doc/news/version_3.20100102.3.mdwn deleted file mode 100644 index b8f61978c..000000000 --- a/doc/news/version_3.20100102.3.mdwn +++ /dev/null @@ -1,21 +0,0 @@ -ikiwiki 3.20100102.3 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - Happy palindrome day! - - * pagestats: Add show parameter. Closes: #[562129](http://bugs.debian.org/562129) (David Paleino) - * toc: Add startlevel parameter. (kerravonsen) - * Remove example ikiwiki setup file from the Debian package. This - re-enables linking to /usr/share/ikiwiki/examples which has the - example sites also used by auto-blog.setup. The example setup file - can be generated at any time using ikiwiki --dumpsetup so I do - not see a reason to ship it. Closes: #[562183](http://bugs.debian.org/562183) - * Use env hack in python scripts. - * comments: Add a checksum to the name of comment pages, to - avoid merge conflicts when comments are posted to two branches of a - site. - * linkmap: Add option to omit disconnected pages from the map. - * inline: Fix bug that limited displayed pages when feedshow was - specified w/o show. - * Fix several places that did not properly handle capitalization of - the discussionpage setting. Specifically, fixes discussion actions - on discussion pages, and unbreaks the opendiscussion plugin."""]] diff --git a/doc/news/version_3.20100403.mdwn b/doc/news/version_3.20100403.mdwn new file mode 100644 index 000000000..86d6a0f37 --- /dev/null +++ b/doc/news/version_3.20100403.mdwn @@ -0,0 +1,30 @@ +ikiwiki 3.20100403 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * websetup: Add websetup\_unsafe to allow marking other settings + as unsafe. + * Improve openid url munging; do not display anchors and cgi parameters, + as used by yahoo and google urls. + * Add complete German basewiki and directives translation done by + Sebastian Kuhnert. + * Add a include setting, which can be used to make ikiwiki process + wiki source files, such as .htaccess, that would normally be skipped + for security or other reasons. Closes: #[447267](http://bugs.debian.org/447267) + (Thanks to Aaron Wilson for the original patch.) + * Add support for setup files written in YAML. + * Add --set-yaml switch for setting more complex config file options. + * filecheck: Fix bugs that prevented the pagespecs from matching when + not called by attachment plugin. + * Fix incorrect influence info returned by a failing link() pagespec, + that could lead to bad dependency handling in certian situations. + * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar + if necessary for unusual install. + * auto-blog.setup: Set tagbase by default, since most bloggers will want it. + * Allow wrappers to be built using tcc. (Workaround #452876) + * openid: Use Openid Simple Registration or OpenID Attribute Exchange + to get the user's email address and username. (Neither is yet + used, but they are available in the session object now.) + * page.tmpl: Add Cache-Control must-revalidate to ensure that users + (especially of Firefox) see fresh page content. + * htmlscrubber: Allow colons in urls after '?' + * template: Search for templates in the templatedir, if they are not + found as pages in the wiki."""]] \ No newline at end of file -- cgit v1.2.3 From 195943e588b8c7b6a3a43d10404d2d40a503c1d5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 3 Apr 2010 16:07:32 -0400 Subject: slightly more consistent capitalisation of ikiwiki For a while, I was avoiding capitalizing ikiwiki at the beginning of a sentence. I now think that's a bad idea (unless explicitly referring to the `ikiwiki` command). Still, I don't go all the way and always cap it, as a proper noun. That would make the logo look bad. ;) I also tend to avoid capping it as IkiWiki, except when referring to the perl internals, which do use that capitalization. (Too late to change that.) However, it's also reasonable to do so in a WikiLink, as a nod to historical camelcase wikis. --- debian/control | 6 +++--- doc/download.mdwn | 2 +- doc/features.mdwn | 12 ++++++------ doc/forum/speeding_up_ikiwiki.mdwn | 2 +- doc/index.mdwn | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/debian/control b/debian/control index 24c2c96a5..d7ce9a178 100644 --- a/debian/control +++ b/debian/control @@ -42,17 +42,17 @@ Conflicts: ikiwiki-plugin-table Replaces: ikiwiki-plugin-table Provides: ikiwiki-plugin-table Description: a wiki compiler - ikiwiki converts a directory full of wiki pages into HTML pages suitable + Ikiwiki converts a directory full of wiki pages into HTML pages suitable for publishing on a website. Unlike many wikis, ikiwiki does not have its own ad-hoc means of storing page history, and instead uses a revision control system such as Subversion or Git. . - ikiwiki implements all of the other standard features of a wiki, including + Ikiwiki implements all of the other standard features of a wiki, including web-based page editing, user registration and logins, a RecentChanges page, BackLinks, search, Discussion pages, tags, smart merging and conflict resolution, and page locking. . - ikiwiki also supports generating news feeds (RSS and Atom) and blogging. + Ikiwiki also supports generating news feeds (RSS and Atom) and blogging. ikiwiki provides a plugin system which allows many other features to be added. Some of the plugins have additional dependencies, found among the Recommends and Suggests of this package. diff --git a/doc/download.mdwn b/doc/download.mdwn index 45d0d7870..92c8a4f75 100644 --- a/doc/download.mdwn +++ b/doc/download.mdwn @@ -35,7 +35,7 @@ own RPM. ## BSD ports -IkiWiki can be installed [from macports](http://www.macports.org/ports.php?by=name&substr=ikiwiki) +Ikiwiki can be installed [from macports](http://www.macports.org/ports.php?by=name&substr=ikiwiki) by running `sudo port install ikiwiki`. NetBSD and many other platforms: pkgsrc has an [ikiwiki package](ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/www/ikiwiki/README.html). diff --git a/doc/features.mdwn b/doc/features.mdwn index 3925d78ef..ab521213d 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -13,7 +13,7 @@ Instead of editing pages in a stupid web form, you can use vim and commit changes via [[Subversion|rcs/svn]], [[rcs/git]], or any of a number of other [[Revision_Control_Systems|rcs]]. -ikiwiki can be run from a [[post-commit]] hook to update your wiki +Ikiwiki can be run from a [[post-commit]] hook to update your wiki immediately whenever you commit a change using the RCS. It's even possible to securely let @@ -25,7 +25,7 @@ run a simple wiki without page history, it can do that too. ## A wiki compiler -ikiwiki is a wiki compiler; it builds a static website for your wiki, and +Ikiwiki is a wiki compiler; it builds a static website for your wiki, and updates it as pages are edited. It is fast and smart about updating a wiki, it only builds pages that have changed (and tracks things like creation of new pages and links that can indirectly cause a page to need a rebuild) @@ -45,7 +45,7 @@ easily be added by [[plugins]]. For example it also supports traditional [[plugins/HTML]], or pages written in [[reStructuredText|plugins/rst]] or [[Textile|plugins/textile]]. -ikiwiki also supports files of any other type, including plain text, +Ikiwiki also supports files of any other type, including plain text, images, etc. These are not converted to wiki pages, they are just copied unchanged by ikiwiki as it builds your wiki. So you can check in an image, program, or other special file and link to it from your wiki pages. @@ -70,8 +70,8 @@ you would care to syndicate. ## Valid html and [[css]] -ikiwiki aims to produce -[valid XHTML 1.0](http://validator.w3.org/check?url=referer). ikiwiki +Ikiwiki aims to produce +[valid XHTML 1.0](http://validator.w3.org/check?url=referer). Ikiwiki generates html using [[templates|wikitemplates]], and uses [[css]], so you can change the look and layout of all pages in any way you would like. @@ -163,7 +163,7 @@ Well, sorta. Rather than implementing YA history browser, it can link to ### Full text search -ikiwiki can use the xapian search engine to add powerful +Ikiwiki can use the xapian search engine to add powerful full text [[plugins/search]] capabilities to your wiki. ### Translation via po files diff --git a/doc/forum/speeding_up_ikiwiki.mdwn b/doc/forum/speeding_up_ikiwiki.mdwn index 2c2ac240e..799186cf8 100644 --- a/doc/forum/speeding_up_ikiwiki.mdwn +++ b/doc/forum/speeding_up_ikiwiki.mdwn @@ -56,7 +56,7 @@ number is still too large to really visualize: the graphviz PNG and PDF output engines segfault for me, the PS one works but I can't get any PS software to render it without exploding. -Now, the relations in the links hash are not the same thing as IkiWiki's notion of dependencies. Can anyone point me at that data structure / where I might be able to add some debugging foo to generate a graph of it? +Now, the relations in the links hash are not the same thing as Ikiwiki's notion of dependencies. Can anyone point me at that data structure / where I might be able to add some debugging foo to generate a graph of it? Once I've figured out that I might be able to optimize some pagespecs. I understand pagespecs are essentially translated into sequential perl code. I diff --git a/doc/index.mdwn b/doc/index.mdwn index 732cf7a89..06acc9cec 100644 --- a/doc/index.mdwn +++ b/doc/index.mdwn @@ -24,5 +24,5 @@ The [[forum]] is open for discussions. [[Bugs]], [[TODO]] items, [[wishlist]] items, and [[patches|patch]] can be submitted and tracked using this wiki. -ikiwiki is developed by [[Joey]] and many contributors, +Ikiwiki is developed by [[Joey]] and many contributors, and is [[FreeSoftware]]. -- cgit v1.2.3 From 36202d461f86bb3869444cf161d9bfe62298b8f8 Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Fri, 5 Feb 2010 12:54:07 +0100 Subject: link to commits --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index a0e76fd48..c4a92824b 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -165,7 +165,7 @@ wrong direction. > optimised, and security-sensitive ground, so I have to look at them very > carefully. --[[Joey]] > -> * In the refactoring in f3abeac919c4736429bd3362af6edf51ede8e7fe, +> * In the refactoring in [f3abeac919c4736429bd3362af6edf51ede8e7fe][], > you introduced at least 2 bugs, one a possible security hole. > Now one part of the code tests `if ($file)` and the other > caller tests `if ($f)`. These two tests both tested `if (! defined $f)` @@ -181,14 +181,18 @@ wrong direction. > I'd like to cherry-pick the above commit, once it's in shape, before > looking at the rest in detail. So just a few other things that stood out. > -> * Commit 4af4d26582f0c2b915d7102fb4a604b176385748 seems unnecessary. +> * Commit [4af4d26582f0c2b915d7102fb4a604b176385748][] seems unnecessary. > `srcfile($file, 1)` already is documented to return undef if the > file does not exist. (But without the second parameter, it throws > an error.) > -> * Commit f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 adds a line +> * Commit [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1][] adds a line > that is intented by a space, not a tab. > -> * Commit f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 says that auto-added +> * Commit [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1][] says that auto-added > files will be recreated if the user deletes them. That seems bad. > `autoindex` goes to some trouble to not recreate deleted files. + +[f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) +[4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) +[f58f3e1bec41ccf9316f37b014ce0b373c8e49e1]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 (commitdiff for f58f3e1bec41ccf9316f37b014ce0b373c8e49e1) -- cgit v1.2.3 From 129bea3177b59be8ed4cc303720c8747f59a11ba Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Sat, 3 Apr 2010 23:38:05 +0200 Subject: answer about autofiles for tags --- ...o-create_tag_pages_according_to_a_template.mdwn | 29 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index c4a92824b..07b570b1b 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -164,7 +164,11 @@ wrong direction. > Starting review of this. Some of your commits are to very delicate, > optimised, and security-sensitive ground, so I have to look at them very > carefully. --[[Joey]] -> + +>> First of, sorry that it took me so damn long to answer. I didn't lose +>> interest but it took a while for me to find the time and motivation +>> to address you suggestions. --[[David_Riebenbauer]] + > * In the refactoring in [f3abeac919c4736429bd3362af6edf51ede8e7fe][], > you introduced at least 2 bugs, one a possible security hole. > Now one part of the code tests `if ($file)` and the other @@ -177,7 +181,11 @@ wrong direction. > bare `_` in the first to make perl reuse the stat buffer. > * (As a matter of style, could you put a space after the commas in your > perl?) -> + +>> The first two points should be addressed in +>> [da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0][]. And sure, I can add the +>> spaces. --[[David_Riebenbauer]] + > I'd like to cherry-pick the above commit, once it's in shape, before > looking at the rest in detail. So just a few other things that stood out. > @@ -185,14 +193,27 @@ wrong direction. > `srcfile($file, 1)` already is documented to return undef if the > file does not exist. (But without the second parameter, it throws > an error.) -> + +>> You're right. I must have been some confused by some other promplem I +>> introduced then. Reverted. --[[David_Riebenbauer]] + > * Commit [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1][] adds a line > that is intented by a space, not a tab. -> + +>> Sorry, That one was reverted anyway. --[[David_Riebenbauer]] + > * Commit [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1][] says that auto-added > files will be recreated if the user deletes them. That seems bad. > `autoindex` goes to some trouble to not recreate deleted files. +>> I reverted the commit and addressed the issue in +>> [a358d74bef51dae31332ff27e897fe04834571e6][] and +>> [981400177d68a279f485727be3f013e68f0bf691][]. + --[[David_Riebenbauer]] + [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 (commitdiff for f58f3e1bec41ccf9316f37b014ce0b373c8e49e1) +[da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0 (commitdiff for da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0) +[a358d74bef51dae31332ff27e897fe04834571e6]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=a358d74bef51dae31332ff27e897fe04834571e6 (commitdiff for a358d74bef51dae31332ff27e897fe04834571e6) +[981400177d68a279f485727be3f013e68f0bf691]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=981400177d68a279f485727be3f013e68f0bf691 (commitdiff for 981400177d68a279f485727be3f013e68f0bf691) -- cgit v1.2.3 From c1a42e76bc6667bfb2882a12d53c25d9f952ca82 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Fri, 2 Apr 2010 00:28:02 +0100 Subject: implement typed links; add tagged_is_strict config option --- IkiWiki.pm | 58 ++++++++++++++++++---- IkiWiki/Plugin/tag.pm | 36 +++++++++----- IkiWiki/Render.pm | 33 ++++++++++++ .../tagged__40____41___matching_wikilinks.mdwn | 3 ++ doc/ikiwiki/pagespec.mdwn | 3 ++ doc/plugins/tag.mdwn | 5 ++ doc/plugins/write.mdwn | 21 +++++++- t/index.t | 17 +++++-- t/tag.t | 45 +++++++++++++++++ 9 files changed, 193 insertions(+), 28 deletions(-) create mode 100755 t/tag.t (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6739ba56c..25e9247b2 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,7 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins}; + %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype @@ -24,7 +24,7 @@ our @EXPORT = qw(hook debug error template htmlpage deptype add_underlay pagetitle titlepage linkpage newpagefile inject add_link %config %links %pagestate %wikistate %renderedfiles - %pagesources %destsources); + %pagesources %destsources %typedlinks); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE @@ -1503,7 +1503,7 @@ sub loadindex () { if (! $config{rebuild}) { %pagesources=%pagemtime=%oldlinks=%links=%depends= %destsources=%renderedfiles=%pagecase=%pagestate= - %depends_simple=(); + %depends_simple=%typedlinks=%oldtypedlinks=(); } my $in; if (! open ($in, "<", "$config{wikistatedir}/indexdb")) { @@ -1569,6 +1569,14 @@ sub loadindex () { if (exists $d->{state}) { $pagestate{$page}=$d->{state}; } + if (exists $d->{typedlinks}) { + $typedlinks{$page}=$d->{typedlinks}; + + while (my ($type, $links) = each %{$typedlinks{$page}}) { + next unless %$links; + $oldtypedlinks{$page}{$type} = {%$links}; + } + } } $oldrenderedfiles{$page}=[@{$d->{dest}}]; } @@ -1617,6 +1625,10 @@ sub saveindex () { $index{page}{$src}{depends_simple} = $depends_simple{$page}; } + if (exists $typedlinks{$page} && %{$typedlinks{$page}}) { + $index{page}{$src}{typedlinks} = $typedlinks{$page}; + } + if (exists $pagestate{$page}) { foreach my $id (@hookids) { foreach my $key (keys %{$pagestate{$page}{$id}}) { @@ -1926,12 +1938,17 @@ sub inject { use warnings; } -sub add_link ($$) { +sub add_link ($$;$) { my $page=shift; my $link=shift; + my $type=shift; push @{$links{$page}}, $link unless grep { $_ eq $link } @{$links{$page}}; + + if (defined $type) { + $typedlinks{$page}{$type}{$link} = 1; + } } sub pagespec_translate ($) { @@ -2212,6 +2229,11 @@ sub match_link ($$;@) { $link=derel($link, $params{location}); my $from=exists $params{location} ? $params{location} : ''; + my $linktype=$params{linktype}; + my $qualifier=''; + if (defined $linktype) { + $qualifier=" with type $linktype"; + } my $links = $IkiWiki::links{$page}; return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS, "" => 1) @@ -2219,19 +2241,33 @@ sub match_link ($$;@) { my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { if (length $bestlink) { - return IkiWiki::SuccessReason->new("$page links to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if $bestlink eq IkiWiki::bestlink($page, $p); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && $bestlink eq IkiWiki::bestlink($page, $p)) { + return IkiWiki::SuccessReason->new("$page links to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } else { - return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && match_glob($p, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p_rel, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p_rel}) && match_glob($p_rel, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p_rel$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } } - return IkiWiki::FailReason->new("$page does not link to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1); + return IkiWiki::FailReason->new("$page does not link to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1); +} + +sub match_typedlink($$;@) { + my $page = shift; + my $args = shift; + + if ($args =~ /^(\w+)\s+(.*)$/) { + return match_link($page, $2, @_, linktype => $1); + } + + return IkiWiki::ErrorReason->new("typedlink expects e.g. 'tag *' but got: $args"); } sub match_backlink ($$;@) { diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index cdcfaf536..af4bff1bc 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -6,8 +6,6 @@ use warnings; use strict; use IkiWiki 3.00; -my %tags; - sub import { hook(type => "getopt", id => "tag", call => \&getopt); hook(type => "getsetup", id => "tag", call => \&getsetup); @@ -36,6 +34,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + tagged_is_strict => { + type => "boolean", + default => 0, + description => "if 1, tagged() doesn't match normal WikiLinks to tag pages", + safe => 1, + rebuild => 1, + }, } sub tagpage ($) { @@ -71,9 +76,8 @@ sub preprocess_tag (@) { foreach my $tag (keys %params) { $tag=linkpage($tag); - $tags{$page}{$tag}=1; # hidden WikiLink - add_link($page, tagpage($tag)); + add_link($page, tagpage($tag), 'tag'); } return ""; @@ -87,15 +91,13 @@ sub preprocess_taglink (@) { return join(" ", map { if (/(.*)\|(.*)/) { my $tag=linkpage($2); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag, linktext => pagetitle($1)); } else { my $tag=linkpage($_); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag); } } @@ -110,17 +112,19 @@ sub pagetemplate (@) { my $destpage=$params{destpage}; my $template=$params{template}; + my $tags = $typedlinks{$page}{tag}; + $template->param(tags => [ map { link => taglink($page, $destpage, $_, rel => "tag") - }, sort keys %{$tags{$page}} - ]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags"); + }, sort keys %$tags + ]) if defined $tags && %$tags && $template->query(name => "tags"); if ($template->query(name => "categories")) { # It's an rss/atom template. Add any categories. - if (exists $tags{$page} && %{$tags{$page}}) { + if (defined $tags && %$tags) { $template->param(categories => [map { category => $_ }, - sort keys %{$tags{$page}}]); + sort keys %$tags]); } } } @@ -130,7 +134,13 @@ package IkiWiki::PageSpec; sub match_tagged ($$;@) { my $page = shift; my $glob = shift; - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); + + if ($IkiWiki::config{tagged_is_strict}) { + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob), linktype => 'tag'); + } + else { + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); + } } 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index abafb0887..5810fc974 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -167,6 +167,7 @@ sub scan ($) { else { $links{$page}=[]; } + delete $typedlinks{$page}; run_hooks(scan => sub { shift->( @@ -398,6 +399,7 @@ sub find_del_files ($) { push @del, $pagesources{$page}; } $links{$page}=[]; + delete $typedlinks{$page}; $renderedfiles{$page}=[]; $pagemtime{$page}=0; } @@ -499,6 +501,29 @@ sub remove_unrendered () { } } +sub link_types_changed ($$) { + # each is of the form { type => { link => 1 } } + my $new = shift; + my $old = shift; + + return 0 if !defined $new && !defined $old; + return 1 if !defined $new || !defined $old; + + while (my ($type, $links) = each %$new) { + foreach my $link (keys %$links) { + return 1 unless exists $old{$type}{$link}; + } + } + + while (my ($type, $links) = each %$old) { + foreach my $link (keys %$links) { + return 1 unless exists $new{$type}{$link}; + } + } + + return 0; +} + sub calculate_changed_links ($$$) { my ($changed, $del, $oldlink_targets)=@_; @@ -525,6 +550,14 @@ sub calculate_changed_links ($$$) { } $linkchangers{lc($page)}=1; } + + # we currently assume that changing the type of a link doesn't + # change backlinks + if (!exists $linkchangers{lc($page)}) { + if (link_types_changed($typedlinks{$page}, $oldlinktypes{$page})) { + $linkchangers{lc($page)}=1; + } + } } return \%backlinkchanged, \%linkchangers; diff --git a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn index e7e4af7c3..9037d6c02 100644 --- a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn +++ b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn @@ -28,6 +28,9 @@ rationale on this, or what am I doing wrong, and how to achieve what I want? >> is valid. [[todo/matching_different_kinds_of_links]] is probably >> how it will eventually be solved. --[[Joey]] +>>> [[Done]]: you can now set the `tagged_is_strict` config option to `1` +>>> if you don't want `tagged` to match other wikilinks. --[[smcv]] + > And this is an illustration why a clean work-around (without changing the software) is not possible: while thinking about [[todo/matching_different_kinds_of_links]], I thought one could work around the problem by simply explicitly including the kind of the relation into the link target (like the tagbase in tags), and by having a separate page without the "tagbase" to link to when one wants simply to refer to the tag without tagging. But this won't work: one has to at least once refer to the real tag page if one wants to talk about it, and this reference will count as tagging (unwanted). --Ivan Z. > But well, perhaps there is a workaround without introducing different kinds of links. One could modify the [[tag plugin|plugins/tag]] so that it adds 2 links to a page: for tagging -- `tagbase/TAG`, and for navigation -- `tagdescription/TAG` (displayed at the bottom). Then the `tagdescription/TAG` page would hold whatever list one wishes (with `tagged(TAG)` in the pagespec), and whenever one wants to merely refer to the tag, one should link to `tagdescription/TAG`--this link won't count as tagging. So, `tagbase/TAG` would become completely auxiliary (internal) link targets for ikiwiki, the users would edit or link to only `tagdescription/TAG`. --Ivan Z. diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 5c191f23f..ca6693024 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -52,6 +52,9 @@ Some more elaborate limits can be added to what matches using these functions: specified IP address. * "`postcomment(glob)`" - matches only when comments are being posted to a page matching the specified glob +* "`typedlink(type glob)`" - matches pages that link to a given page (or glob) + with a given link type. Plugins can create links with a specific type: + for instance, the tag plugin creates links of type `tag`. For example, to match all pages in a blog that link to the page about music and were written in 2005: diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 8ff70a069..8cd79da41 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,6 +8,11 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. +If the `tagged_is_strict` config option is set, `tagged()` will only match +tags explicitly set with [[ikiwiki/directive/tag]] or +[[ikiwiki/directive/taglink]]; if not (the default), it will also match +any other [[WikiLinks|ikiwiki/WikiLink]] to the tag page. + [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this page is tagged with the "tags" tag. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 96a2aa16d..fe7cf0183 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -633,6 +633,22 @@ reference. Do not modify this hash directly; call `add_link()`. $links{"foo"} = ["bar", "baz"]; +### `%typedlinks` + +The `%typedlinks` hash records links of specific types. Do not modify this +hash directly; call `add_link()`. The keys are page names, and the values +are hash references. In each page's hash reference, the keys are link types +defined by plugins, and the values are hash references with link targets +as keys, and 1 as a dummy value, something like this: + + $typedlinks{"foo"} = { + tag => { short_word => 1, metasyntactic_variable => 1 }, + next_page => { bar => 1 }, + }; + +Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in +`%typedlinks`. + ### `%pagesources` The `%pagesources` has can be used to look up the source filename @@ -939,11 +955,14 @@ Optionally, a third parameter can be passed, to specify the preferred filename of the page. For example, `targetpage("foo", "rss", "feed")` will yield something like `foo/feed.rss`. -### `add_link($$)` +### `add_link($$;$)` This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. +An optional third parameter sets the link type (`undef` produces an ordinary +[[ikiwiki/WikiLink]]). + ## Miscellaneous ### Internal use pages diff --git a/t/index.t b/t/index.t index 2f23524a7..44273059d 100755 --- a/t/index.t +++ b/t/index.t @@ -4,7 +4,7 @@ use strict; use IkiWiki; package IkiWiki; # use internal variables -use Test::More tests => 27; +use Test::More tests => 31; $config{wikistatedir}="/tmp/ikiwiki-test.$$"; system "rm -rf $config{wikistatedir}"; @@ -31,6 +31,7 @@ $renderedfiles{"bar"}=["bar.html", "bar.rss", "sparkline-foo.gif"]; $renderedfiles{"bar.png"}=["bar.png"]; $links{"Foo"}=["bar.png"]; $links{"bar"}=["Foo", "new-page"]; +$typedlinks{"bar"}={tag => {"Foo" => 1}}; $links{"bar.png"}=[]; $depends{"Foo"}={}; $depends{"bar"}={"foo*" => 1}; @@ -45,7 +46,7 @@ ok(-s "$config{wikistatedir}/indexdb", "index file created"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); ok(loadindex(), "load index"); @@ -104,10 +105,16 @@ is_deeply(\%destsources, { "sparkline-foo.gif" => "bar", "bar.png" => "bar.png", }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%typedlinks loaded correctly"); +is_deeply(\%oldtypedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%oldtypedlinks loaded correctly"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); # When state is loaded for a wiki rebuild, only ctime and oldrenderedfiles @@ -140,5 +147,9 @@ is_deeply(\%pagecase, { }, "%pagecase generated correctly"); is_deeply(\%destsources, { }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { +}, "%typedlinks cleared correctly"); +is_deeply(\%oldtypedlinks, { +}, "%oldtypedlinks cleared correctly"); system "rm -rf $config{wikistatedir}"; diff --git a/t/tag.t b/t/tag.t new file mode 100755 index 000000000..3383fd475 --- /dev/null +++ b/t/tag.t @@ -0,0 +1,45 @@ +#!/usr/bin/perl +package IkiWiki; + +use warnings; +use strict; +use Test::More tests => 10; + +BEGIN { use_ok("IkiWiki"); } +BEGIN { use_ok("IkiWiki::Plugin::tag"); } + +ok(! system("rm -rf t/tmp; mkdir t/tmp")); + +$config{userdir} = "users"; +$config{tagbase} = "tags"; +$config{tagged_is_strict} = 1; + +%oldrenderedfiles=%pagectime=(); +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= +%destsources=%renderedfiles=%pagecase=%pagestate=(); + +foreach my $page (qw(tags/numbers tags/letters one two alpha beta)) { + $pagesources{$page} = "$page.mdwn"; + $pagemtime{$page} = $pagectime{$page} = 1000000; +} + +$links{one}=[qw(tags/numbers alpha tags/letters)]; +$links{two}=[qw(tags/numbers)]; +$links{alpha}=[qw(tags/letters one)]; +$links{beta}=[qw(tags/letters)]; +$typedlinks{one}={tag => {"tags/numbers" => 1 }}; +$typedlinks{two}={tag => {"tags/numbers" => 1 }}; +$typedlinks{alpha}={tag => {"tags/letters" => 1 }}; +$typedlinks{beta}={tag => {"tags/letters" => 1 }}; + +ok(pagespec_match("one", "tagged(numbers)")); +ok(!pagespec_match("two", "tagged(alpha)")); +ok(pagespec_match("one", "link(tags/numbers)")); +ok(pagespec_match("one", "link(alpha)")); + +ok(pagespec_match("one", "typedlink(tag tags/numbers)")); +ok(!pagespec_match("one", "typedlink(tag tags/letters)")); +# invalid syntax +ok(pagespec_match("one", "typedlink(tag)")->isa("IkiWiki::ErrorReason")); + +1; -- cgit v1.2.3 From ef6344144051ed70649ccbff01bcc4fce927ee2f Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Sun, 4 Apr 2010 00:24:27 +0100 Subject: Remove tagged_is_strict option, and just behave as though it was enabled Jon was worried about the backwards-compatibility break involved in making tagged() not match non-tag links, but Joey seems less concerned about it. --- IkiWiki/Plugin/tag.pm | 17 +---------------- doc/bugs/tagged__40____41___matching_wikilinks.mdwn | 3 +-- doc/plugins/tag.mdwn | 5 ----- t/tag.t | 1 - 4 files changed, 2 insertions(+), 24 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index af4bff1bc..7a85874f6 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -34,13 +34,6 @@ sub getsetup () { safe => 1, rebuild => 1, }, - tagged_is_strict => { - type => "boolean", - default => 0, - description => "if 1, tagged() doesn't match normal WikiLinks to tag pages", - safe => 1, - rebuild => 1, - }, } sub tagpage ($) { @@ -132,15 +125,7 @@ sub pagetemplate (@) { package IkiWiki::PageSpec; sub match_tagged ($$;@) { - my $page = shift; - my $glob = shift; - - if ($IkiWiki::config{tagged_is_strict}) { - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob), linktype => 'tag'); - } - else { - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); - } + return match_link($_[0], IkiWiki::Plugin::tag::tagpage($_[1]), linktype => 'tag'); } 1 diff --git a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn index 9037d6c02..a211654f1 100644 --- a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn +++ b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn @@ -28,8 +28,7 @@ rationale on this, or what am I doing wrong, and how to achieve what I want? >> is valid. [[todo/matching_different_kinds_of_links]] is probably >> how it will eventually be solved. --[[Joey]] ->>> [[Done]]: you can now set the `tagged_is_strict` config option to `1` ->>> if you don't want `tagged` to match other wikilinks. --[[smcv]] +>>> [[Done]]: `tagged` no longer matches other wikilinks. --[[smcv]] > And this is an illustration why a clean work-around (without changing the software) is not possible: while thinking about [[todo/matching_different_kinds_of_links]], I thought one could work around the problem by simply explicitly including the kind of the relation into the link target (like the tagbase in tags), and by having a separate page without the "tagbase" to link to when one wants simply to refer to the tag without tagging. But this won't work: one has to at least once refer to the real tag page if one wants to talk about it, and this reference will count as tagging (unwanted). --Ivan Z. diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 8cd79da41..8ff70a069 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,11 +8,6 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. -If the `tagged_is_strict` config option is set, `tagged()` will only match -tags explicitly set with [[ikiwiki/directive/tag]] or -[[ikiwiki/directive/taglink]]; if not (the default), it will also match -any other [[WikiLinks|ikiwiki/WikiLink]] to the tag page. - [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this page is tagged with the "tags" tag. diff --git a/t/tag.t b/t/tag.t index 3383fd475..cf3bbdf01 100755 --- a/t/tag.t +++ b/t/tag.t @@ -12,7 +12,6 @@ ok(! system("rm -rf t/tmp; mkdir t/tmp")); $config{userdir} = "users"; $config{tagbase} = "tags"; -$config{tagged_is_strict} = 1; %oldrenderedfiles=%pagectime=(); %pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= -- cgit v1.2.3 From 20040772cecbddf07ab6369a22ab2fe1ad794b48 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sun, 4 Apr 2010 00:27:20 +0000 Subject: update fieldsort plugin to be compatible with the latest version of my branch --- doc/plugins/contrib/field/discussion.mdwn | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 7e94a4029..ad17f87e6 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -68,15 +68,13 @@ I think it should just be part of `field` rather than a separate plugin. }, } - package IkiWiki::PageSpec; + package IkiWiki::SortSpec; - sub check_cmp_field { + sub cmp_field { if (!length $_[0]) { error("sort=field requires a parameter"); } - } - sub cmp_field { my $left = IkiWiki::Plugin::field::field_get_value($_[2], $_[0]); my $right = IkiWiki::Plugin::field::field_get_value($_[2], $_[1]); -- cgit v1.2.3 From 61a31a3d63a19f75e3362c7e5ac2067f572c9dca Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sun, 4 Apr 2010 00:34:36 +0000 Subject: updated branch --- doc/todo/matching_different_kinds_of_links.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 2cd484852..c4383c0b7 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -106,6 +106,10 @@ Some code refers to `oldtypedlinks`, and other to `oldlinktypes`. --[[Joey]] >> A test suite for the dependency resolver *would* be nice. --[[Joey]] +>>> Bug fixed, I think. A test suite for the dependency resolver seems +>>> more ambitious than I want to get into right now, but I added a +>>> unit test for this part of it... --s + I'm curious what your reasoning was for adding a new variable rather than using `pagestate`. Was it only because you needed the `old` version to detect change, or was there other complexity? @@ -120,6 +124,17 @@ the `old` version to detect change, or was there other complexity? > my docs for `%typedlinks`, so I'll try to write docs for it as > `pagestate` and see if they work any better. --s +>> On reflection, I don't think it's any better as a pagestate, and +>> the contents of pagestates (so far) aren't documented for other +>> plugins' consumption, so I'm inclined to leave it as-is, unless +>> you want to veto that. Loose rationale: it needs special handling +>> in the core to be a dependency type (I re-used the existing link +>> type), it's API beyond a single plugin, and it's really part of +>> the core parallel to pagestate rather than being tied to a +>> specific plugin. Also, I'd need to special-case it to have +>> ikiwiki not delete it from the index, unless I introduced a +>> dummy typedlinks plugin (or just hook) that did nothing... --s + I have not convinced myself this is a real problem, but.. If a page has a typed link, there seems to be no way to tell if it also has a separate, regular link. `add_link` will add @@ -145,6 +160,8 @@ without too much transitional trouble. --[[Joey]] > on the current semantics, on one of the pages requesting this > change. --s +>> Removed in a newer version of the branch. --s + I might have been wrong to introduce `typedlink(tag foo)`. It's not very user-friendly, and is more useful as a backend for other plugins that as a feature in its own right - any plugin introducing a link @@ -156,3 +173,6 @@ though... --[[smcv]] > I agree, per-type matchers are more friendly and I'm not enamored of the > multi-parameter pagespec syntax. --[[Joey]] + +>> Removed in a newer version of the branch. I re-introduced it as a +>> plugin in `smcv/typedlink`, but I don't think we really need it. --s -- cgit v1.2.3 From 618bbaee3815daffe329fc1e2d77f04fcd8392b8 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Sat, 3 Apr 2010 14:17:48 +0100 Subject: meta: generalize meta_title into meta(title); support author, updated, date I've left meta_title in, undocumented, as a possible replacement for sort=title in IkiWiki 4.0 or something. --- IkiWiki/Plugin/meta.pm | 58 +++++++++++++++++++++++++++++++++------ doc/ikiwiki/directive/meta.mdwn | 7 ++++- doc/ikiwiki/pagespec/sorting.mdwn | 5 ++-- 3 files changed, 58 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index cd7d0d127..c9fdbc934 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -122,6 +122,12 @@ sub preprocess (@) { } elsif ($key eq 'author') { $pagestate{$page}{meta}{author}=$value; + if (exists $params{sort}) { + $pagestate{$page}{meta}{authorsort}=$params{sort}; + } + else { + $pagestate{$page}{meta}{authorsort}=$value; + } # fallthorough } elsif ($key eq 'authorurl') { @@ -288,14 +294,31 @@ sub pagetemplate (@) { } } -sub titlesort { - my $key = $pagestate{$_[0]}{meta}{titlesort}; +sub get_sort_key { + my $page = $_[0]; + my $meta = $_[1]; - if (defined $key) { - return $key; - } + # e.g. titlesort (also makes sense for author) + my $key = $pagestate{$page}{meta}{$meta . "sort"}; + return $key if defined $key; + + # e.g. title + $key = $pagestate{$page}{meta}{$meta}; + return $key if defined $key; - return pagetitle(IkiWiki::basename($_[0])); + # fall back to closer-to-core things + if ($meta eq 'title') { + return pagetitle(IkiWiki::basename($page)); + } + elsif ($meta eq 'date') { + return $IkiWiki::pagectime{$page}; + } + elsif ($meta eq 'updated') { + return $IkiWiki::pagemtime{$page}; + } + else { + return ''; + } } sub match { @@ -350,10 +373,27 @@ sub match_copyright ($$;@) { package IkiWiki::SortSpec; +sub cmp_meta { + my $left = $_[0]; + my $right = $_[1]; + my $meta = $_[2]; + error(gettext("sort=meta requires a parameter")) unless defined $meta; + + if ($meta eq 'updated' || $meta eq 'date') { + return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + <=> + IkiWiki::Plugin::meta::get_sort_key($right, $meta); + } + + return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + cmp + IkiWiki::Plugin::meta::get_sort_key($right, $meta); +} + +# A prototype of how sort=title could behave in 4.0 or something sub cmp_meta_title { - IkiWiki::Plugin::meta::titlesort($_[0]) - cmp - IkiWiki::Plugin::meta::titlesort($_[1]) + $_[2] = 'title'; + return cmp_meta(@_); } 1 diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index 8d2a5b1ad..c5f74fac5 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -24,7 +24,7 @@ Supported fields: differently in this case. An optional `sort` parameter will be used preferentially when - [[ikiwiki/pagespec/sorting]] by `meta_title`: + [[ikiwiki/pagespec/sorting]] by `meta(title)`: \[[!meta title="The Beatles" sort="Beatles, The"]] @@ -44,6 +44,11 @@ Supported fields: Specifies the author of a page. + An optional `sort` parameter will be used preferentially when + [[ikiwiki/pagespec/sorting]] by `meta(author)`: + + \[[!meta author="Joey Hess" sort="Hess, Joey"]] + * authorurl Specifies an url for the author of a page. diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index ba995a521..fbf598340 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -11,9 +11,10 @@ orders can be specified. as such, ("1 2 9 10 20" instead of "1 10 2 20 9") """]] [[!if test="enabled(meta)" then=""" -* `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` +* `meta(title)` - Order according to the `\[[!meta title="foo" sort="bar"]]` or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no - full title was set. + full title was set. `meta(author)`, `meta(date)`, `meta(updated)`, etc. + also work. """]] In addition, you can combine several sort orders and/or reverse the order of -- cgit v1.2.3 From 490f95616a8a49f2120655d07c282eefd067e640 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Sat, 3 Apr 2010 14:19:18 +0100 Subject: Rename sort parameter to meta title/author to sortas=bar Joey pointed out that sort=x usually takes a sort order. --- IkiWiki/Plugin/meta.pm | 8 ++++---- doc/ikiwiki/directive/meta.mdwn | 10 +++++----- doc/ikiwiki/pagespec/sorting.mdwn | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index c9fdbc934..4992617d0 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -89,8 +89,8 @@ sub preprocess (@) { # Metadata collection that needs to happen during the scan pass. if ($key eq 'title') { $pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value); - if (exists $params{sort}) { - $pagestate{$page}{meta}{titlesort}=$params{sort}; + if (exists $params{sortas}) { + $pagestate{$page}{meta}{titlesort}=$params{sortas}; } else { $pagestate{$page}{meta}{titlesort}=$value; @@ -122,8 +122,8 @@ sub preprocess (@) { } elsif ($key eq 'author') { $pagestate{$page}{meta}{author}=$value; - if (exists $params{sort}) { - $pagestate{$page}{meta}{authorsort}=$params{sort}; + if (exists $params{sortas}) { + $pagestate{$page}{meta}{authorsort}=$params{sortas}; } else { $pagestate{$page}{meta}{authorsort}=$value; diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index c5f74fac5..5a3919dea 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -23,12 +23,12 @@ Supported fields: be set to a true value in the template; this can be used to format things differently in this case. - An optional `sort` parameter will be used preferentially when + An optional `sortas` parameter will be used preferentially when [[ikiwiki/pagespec/sorting]] by `meta(title)`: - \[[!meta title="The Beatles" sort="Beatles, The"]] + \[[!meta title="The Beatles" sortas="Beatles, The"]] - \[[!meta title="David Bowie" sort="Bowie, David"]] + \[[!meta title="David Bowie" sortas="Bowie, David"]] * license @@ -44,10 +44,10 @@ Supported fields: Specifies the author of a page. - An optional `sort` parameter will be used preferentially when + An optional `sortas` parameter will be used preferentially when [[ikiwiki/pagespec/sorting]] by `meta(author)`: - \[[!meta author="Joey Hess" sort="Hess, Joey"]] + \[[!meta author="Joey Hess" sortas="Hess, Joey"]] * authorurl diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index fbf598340..5c6cfcc2b 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -11,7 +11,7 @@ orders can be specified. as such, ("1 2 9 10 20" instead of "1 10 2 20 9") """]] [[!if test="enabled(meta)" then=""" -* `meta(title)` - Order according to the `\[[!meta title="foo" sort="bar"]]` +* `meta(title)` - Order according to the `\[[!meta title="foo" sortas="bar"]]` or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no full title was set. `meta(author)`, `meta(date)`, `meta(updated)`, etc. also work. -- cgit v1.2.3 From ed26f287b207573cc2c2593809b3811f3f832c8c Mon Sep 17 00:00:00 2001 From: "https://mukund.startssl.com/" <https://mukund.startssl.com/@web> Date: Sun, 4 Apr 2010 07:13:51 +0000 Subject: Remove my homepage --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 633400f21..3b67eb74f 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -138,7 +138,6 @@ Personal sites and blogs * [Cosmic Cookout](http://www.cosmiccookout.com/) * [Backyard Deer](http://www.backyarddeer.com/) * [Alex Ghitza homepage and blog](http://aghitza.org/) -* [Mukund's homepage](http://www.mukund.org/) * [Andreas's homepage](http://0x7.ch/) - Ikiwiki, Subversion and CSS template * [Chris Dombroski's boring bliki](https://www.icanttype.org/) * [Josh Triplett's homepage](http://joshtriplett.org/) - Git backend with the CGI disabled, to publish a static site with the convenience of ikiwiki. -- cgit v1.2.3 From 17cc857378c518114989c41dfb1411c9ab8419ea Mon Sep 17 00:00:00 2001 From: "https://mukund.startssl.com/" <https://mukund.startssl.com/@web> Date: Sun, 4 Apr 2010 07:16:41 +0000 Subject: Add the Banu website --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 3b67eb74f..4a3e41e83 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -53,6 +53,7 @@ Projects & Organizations * [Debian Costa Rica](http://cr.debian.net/) * [Fvwm Wiki](http://fvwmwiki.xteddy.org) * [Serialist](http://serialist.net/)'s static pages (documentation, blog). We actually have ikiwiki generate its static content as HTML fragments using a modified page.tmpl template, and then the FastCGI powering our site grabs those fragments and embeds them in the standard dynamic site template. +* [Banu](https://www.banu.com/) Personal sites and blogs ======================== -- cgit v1.2.3 From 3e2a78840a22c376e40dccd358e94533313596e8 Mon Sep 17 00:00:00 2001 From: "http://liw.fi/" <http://liw.fi/@web> Date: Sun, 4 Apr 2010 09:12:23 +0000 Subject: --- doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn (limited to 'doc') diff --git a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn new file mode 100644 index 000000000..bd0900670 --- /dev/null +++ b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn @@ -0,0 +1,3 @@ +Version 2.0 of bzr seems to break the bzr plugin. + +I traced this to the bzr_log method in the plugin, and patching that seems to fix it. The plugin just needs to parse the input little bit differently. -- cgit v1.2.3 From 3190e3be93a97ccf0f1c2a4a2d4a27cd1326263b Mon Sep 17 00:00:00 2001 From: "http://liw.fi/" <http://liw.fi/@web> Date: Sun, 4 Apr 2010 09:13:01 +0000 Subject: --- doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn index bd0900670..2fd25df9c 100644 --- a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn +++ b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn @@ -1,3 +1,4 @@ Version 2.0 of bzr seems to break the bzr plugin. I traced this to the bzr_log method in the plugin, and patching that seems to fix it. The plugin just needs to parse the input little bit differently. +--liw -- cgit v1.2.3 From 6b746ed72ba5fc49451f832f6ced9a7c26cce8f7 Mon Sep 17 00:00:00 2001 From: "http://liw.fi/" <http://liw.fi/@web> Date: Sun, 4 Apr 2010 09:23:05 +0000 Subject: --- doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn | 79 +++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) (limited to 'doc') diff --git a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn index 2fd25df9c..bda07d15b 100644 --- a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn +++ b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn @@ -2,3 +2,82 @@ Version 2.0 of bzr seems to break the bzr plugin. I traced this to the bzr_log method in the plugin, and patching that seems to fix it. The plugin just needs to parse the input little bit differently. --liw + + From fb897114124e627fd3acf5af8e784c9a77419a81 Mon Sep 17 00:00:00 2001 + From: Lars Wirzenius <liw@liw.fi> + Date: Sun, 4 Apr 2010 21:05:07 +1200 + Subject: [PATCH] Fix bzr plugin to work with bzr 2.0. + + The output of "bzr log" seems to have changed a bit, so we change the + parsing accordingly. This has not been tested with earlier versions of + bzr. + + Several problems seemed to occur, all in the bzr_log subroutine: + + 1. The @infos list would contain an empty hash, which would confuse the + rest of the program. + 2. This was because bzr_log would push an empty anonymous hash to the + list whenever it thought a new record would start. + 3. However, a new record marker (now?) also happens at th end of bzr log + output. + 4. Now we collect the record to a hash that gets pushed to the list only + if it is not empty. + 5. Also, sometimes bzr log outputs "revno: 1234 [merge]", so we catch only + the revision number. + 6. Finally, there may be non-headers at the of the output, so we ignore + those. + --- + IkiWiki/Plugin/bzr.pm | 23 ++++++++++++++++------- + 1 files changed, 16 insertions(+), 7 deletions(-) + + diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm + index 1ffdc23..e813331 100644 + --- a/IkiWiki/Plugin/bzr.pm + +++ b/IkiWiki/Plugin/bzr.pm + @@ -73,28 +73,37 @@ sub bzr_log ($) { + my @infos = (); + my $key = undef; + + + my $hash = {}; + while (<$out>) { + my $line = $_; + my ($value); + if ($line =~ /^message:/) { + $key = "message"; + - $infos[$#infos]{$key} = ""; + + $$hash{$key} = ""; + } + elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) { + $key = "files"; + - unless (defined($infos[$#infos]{$key})) { $infos[$#infos]{$key} = ""; } + + unless (defined($$hash{$key})) { $$hash{$key} = ""; } + } + elsif (defined($key) and $line =~ /^ (.*)/) { + - $infos[$#infos]{$key} .= "$1\n"; + + $$hash{$key} .= "$1\n"; + } + elsif ($line eq "------------------------------------------------------------\n") { + + if (keys %$hash) { + + push (@infos, $hash); + + } + + $hash = {}; + $key = undef; + - push (@infos, {}); + } + - else { + + elsif ($line =~ /: /) { + chomp $line; + - ($key, $value) = split /: +/, $line, 2; + - $infos[$#infos]{$key} = $value; + + if ($line =~ /^revno: (\d+)/) { + + $key = "revno"; + + $value = $1; + + } else { + + ($key, $value) = split /: +/, $line, 2; + + } + + $$hash{$key} = $value; + } + } + close $out; + -- + 1.7.0 -- cgit v1.2.3 From 7060b774e45e237727601f500da40aa6b1a19d7f Mon Sep 17 00:00:00 2001 From: PaulePanter <PaulePanter@web> Date: Sun, 4 Apr 2010 12:03:41 +0000 Subject: Typo. --- doc/news/version_3.20100403.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/news/version_3.20100403.mdwn b/doc/news/version_3.20100403.mdwn index 86d6a0f37..3e9063028 100644 --- a/doc/news/version_3.20100403.mdwn +++ b/doc/news/version_3.20100403.mdwn @@ -15,7 +15,7 @@ ikiwiki 3.20100403 released with [[!toggle text="these changes"]] * filecheck: Fix bugs that prevented the pagespecs from matching when not called by attachment plugin. * Fix incorrect influence info returned by a failing link() pagespec, - that could lead to bad dependency handling in certian situations. + that could lead to bad dependency handling in certain situations. * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar if necessary for unusual install. * auto-blog.setup: Set tagbase by default, since most bloggers will want it. @@ -27,4 +27,4 @@ ikiwiki 3.20100403 released with [[!toggle text="these changes"]] (especially of Firefox) see fresh page content. * htmlscrubber: Allow colons in urls after '?' * template: Search for templates in the templatedir, if they are not - found as pages in the wiki."""]] \ No newline at end of file + found as pages in the wiki."""]] -- cgit v1.2.3 From 3a02cfca99922e8e15b55962d534629b777e463f Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" <http://hendry.iki.fi/@web> Date: Sun, 4 Apr 2010 13:00:52 +0000 Subject: --- doc/bugs/Comments_dissapeared.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index ac297028c..7ff1a012f 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -28,3 +28,8 @@ It worked just fine with this configuration. I swear I have not modified it. :) > So I suspect you have simply not rebuilt your wiki after making some > change that fixed the comments, and so only newer pages are getting them. > --[[Joey]] + +I have tried rebuilding on my squeeze system and still comments don't appear. Any clues how to debug this? +<http://natalian.org/comments/> + +I was worried is was due to a time skew problem I was experiencing on my VPS in the last month, though the time is right now and still comments do not appear on blog posts like <http://natalian.org/archives/2010/03/25/BBC_News_complaints/> -- cgit v1.2.3 From 834936a408d0d9f481071fbcaefc67273eabb60c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sun, 4 Apr 2010 14:03:51 +0000 Subject: bug report + patch: unnecessary YAML::Any dependency --- doc/plugins/contrib/field/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index ad17f87e6..c2b75a76d 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -84,3 +84,11 @@ I think it should just be part of `field` rather than a separate plugin. } 1; + +------- + +Bug report: `field` has an unnecessary `use YAML::Any`, presumably from before +you separated out `ymlfront`. Trivial patch available from +field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: +<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>) +--[[smcv]] -- cgit v1.2.3 From f6dde92957f8b21d8823f2e51d9e3c48bbad7146 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Sun, 4 Apr 2010 14:05:42 +0000 Subject: advertise some bugfixes --- doc/plugins/contrib/ymlfront/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/plugins/contrib/ymlfront/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn new file mode 100644 index 000000000..f437624b6 --- /dev/null +++ b/doc/plugins/contrib/ymlfront/discussion.mdwn @@ -0,0 +1,4 @@ +My field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: +<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>) +has some fixes for compatibility with old YAML modules, mostly done by imitating +Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]] -- cgit v1.2.3 From 6876c5a588a55df212cde24d7eabaa76b67ac292 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 4 Apr 2010 12:28:12 -0400 Subject: close bug, comment --- doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn index bda07d15b..39500af20 100644 --- a/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn +++ b/doc/bugs/bzr_2.0_breaks_bzr_plugin.mdwn @@ -3,6 +3,10 @@ Version 2.0 of bzr seems to break the bzr plugin. I traced this to the bzr_log method in the plugin, and patching that seems to fix it. The plugin just needs to parse the input little bit differently. --liw +> Patch applied, [[done]] (but, it would be good if it could be tested with +> an older bzr, and it's a pity bzr's human-targeted log has to be parsed, +> I assume there is no machine-targeted version?) --[[Joey]] + From fb897114124e627fd3acf5af8e784c9a77419a81 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius <liw@liw.fi> Date: Sun, 4 Apr 2010 21:05:07 +1200 -- cgit v1.2.3 From b51703569d35790f31dccc3dc2921e8bcccd5b49 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 5 Apr 2010 14:59:29 -0400 Subject: speed --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 8c6e1df3b..739a3d6b0 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -181,6 +181,20 @@ That earlier version of the branch is also available for comparison: > to specify a sort method in other directives. --[[Joey]] >> Done. --[[smcv]] +## speed + +I notice the implementation does not use the magic `$a` and `$b` globals. +That nasty perl optimisation is still worthwhile: + + perl -e 'use warnings; use strict; use Benchmark; sub a { $a <=> $b } sub b ($$) { $_[0] <=> $_[1] }; my @list=reverse(1..9999); timethese(10000, {a => sub {my @f=sort a @list}, b => sub {my @f=sort b @list}, c => => sub {my @f=sort { b($a,$b) } @list}})' + Benchmark: timing 10000 iterations of a, b, c... + a: 80 wallclock secs (76.74 usr + 0.05 sys = 76.79 CPU) @ 130.23/s (n=10000) + b: 112 wallclock secs (106.14 usr + 0.20 sys = 106.34 CPU) @ 94.04/s (n=10000) + c: 330 wallclock secs (320.25 usr + 0.17 sys = 320.42 CPU) @ 31.21/s (n=10000) + +Unfortunatly, I think that c is closest to the new implementation. +--[[Joey]] + ## Documentation from sort-package branch ### advanced sort orders (conditionally added to [[ikiwiki/pagespec/sorting]]) -- cgit v1.2.3 From 861080b918ef71d82f4a4b9a22093f4a379b5ef8 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Mon, 5 Apr 2010 19:19:00 +0000 Subject: potential performance improvements --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 739a3d6b0..2ce1de6a4 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -195,6 +195,28 @@ That nasty perl optimisation is still worthwhile: Unfortunatly, I think that c is closest to the new implementation. --[[Joey]] +> Unfortunately, `$a` isn't always `$main::a` - it's `$Package::a` where +> `Package` is the call site of the sort call. This was a showstopper when +> `sort` was a hook implemented in many packages, but now that it's a +> `SortSpec`, I may be able to fix this by putting a `sort` wrapper in the +> `SortSpec` namespace, so it's like this: +> +> sub sort ($@) +> { +> my $cmp = shift; +> return sort $cmp @_; +> } +> +> which would mean that the comparison used `$IkiWiki::SortSpec::a`. +> +> I do notice that `pagespec_match_list` performs the sort before the +> filter by pagespec. Is this a deliberate design choice, or +> coincidence? I can see that when `limit` is used, this could be +> used to only run the pagespec match function until `limit` pages +> have been selected, but the cost is that every page in the wiki +> is sorted. Or, it might be useful to do the filtering first, then +> sort the sub-list thus produced, then finally apply the limit? --s + ## Documentation from sort-package branch ### advanced sort orders (conditionally added to [[ikiwiki/pagespec/sorting]]) -- cgit v1.2.3 From 10f4695abd65db6c009864c5abb7cb5dfa1cf153 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 5 Apr 2010 15:28:54 -0400 Subject: response --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 2ce1de6a4..0aca74be2 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -165,7 +165,6 @@ That earlier version of the branch is also available for comparison: >>>>>>> I've kept the semantics from `report` as-is, then: >>>>>>> e.g. `sort="age -title"`. --s ->>>>> >>>>> Perhaps we could borrow from `meta updated` and use `update_age`? >>>>> `updateage` would perhaps be a more normal IkiWiki style - but that >>>>> makes me think that updateage is a quantity analagous to tonnage or @@ -190,7 +189,7 @@ That nasty perl optimisation is still worthwhile: Benchmark: timing 10000 iterations of a, b, c... a: 80 wallclock secs (76.74 usr + 0.05 sys = 76.79 CPU) @ 130.23/s (n=10000) b: 112 wallclock secs (106.14 usr + 0.20 sys = 106.34 CPU) @ 94.04/s (n=10000) - c: 330 wallclock secs (320.25 usr + 0.17 sys = 320.42 CPU) @ 31.21/s (n=10000) + c: 330 wallclock secs (320.25 usr + 0.17 sys = 320.42 CPU) @ 31.21/s (n=10000) Unfortunatly, I think that c is closest to the new implementation. --[[Joey]] @@ -217,6 +216,10 @@ Unfortunatly, I think that c is closest to the new implementation. > is sorted. Or, it might be useful to do the filtering first, then > sort the sub-list thus produced, then finally apply the limit? --s +>> Yes, it was deliberate, pagespec matching can be expensive enough that +>> needing to sort a lot of pages seems likely to be less work. (I don't +>> remember what benchmarking was done though.) --[[Joey]] + ## Documentation from sort-package branch ### advanced sort orders (conditionally added to [[ikiwiki/pagespec/sorting]]) -- cgit v1.2.3 From a01028ae8156679a108a40c62aa6b4cc3e2b3ae7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 5 Apr 2010 17:02:10 -0400 Subject: txt: Add a special case for robots.txt. --- IkiWiki/Plugin/txt.pm | 9 ++++++++- debian/changelog | 1 + doc/plugins/txt.mdwn | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index 1ed9f0856..0d9a0b35b 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -39,7 +39,14 @@ sub filter (@) { my %params = @_; my $content = $params{content}; - if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) { + if (defined $pagesources{$params{page}} && + $pagesources{$params{page}} =~ /\.txt$/) { + if ($pagesources{$params{page}} eq 'robots.txt' && + $params{page} eq $params{destpage}) { + will_render($params{page}, 'robots.txt'); + writefile('robots.txt', $config{destdir}, $content); + } + encode_entities($content, "<>&"); if ($findurl) { my $finder = URI::Find->new(sub { diff --git a/debian/changelog b/debian/changelog index be89d0918..77d17f566 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ikiwiki (3.20100404) UNRELEASED; urgency=low * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) * comments: Fix missing entity encoding in title. + * txt: Add a special case for robots.txt. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/plugins/txt.mdwn b/doc/plugins/txt.mdwn index 420898d09..a3087c9e0 100644 --- a/doc/plugins/txt.mdwn +++ b/doc/plugins/txt.mdwn @@ -12,3 +12,8 @@ The only exceptions are that [[WikiLinks|ikiwiki/WikiLink]] and [[directives|ikiwiki/directive]] are still expanded by ikiwiki, and that, if the [[!cpan URI::Find]] perl module is installed, URLs in the txt file are converted to hyperlinks. + +---- + +As a special case, a file `robots.txt` will be copied intact into the +`destdir`, as well as creating a wiki page named "robots". -- cgit v1.2.3 From f8457f9a902e880e0240ba7f5180c22999f0e713 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 5 Apr 2010 17:18:30 -0400 Subject: fix bug that left stray </p> tags Both markdown and tidy add paragraph tags around text, that needs to be stripped when the text is a short, one line fragment that is being inserted into a larger page. tidy also adds several newlines to the end, and this broke removal of the paragraph tags. --- IkiWiki.pm | 7 +++---- doc/bugs/stray___60____47__p__62___tags.mdwn | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6739ba56c..0cbc84788 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1164,7 +1164,7 @@ sub htmlize ($$$$) { my $content=shift; my $oneline = $content !~ /\n/; - + if (exists $hooks{htmlize}{$type}) { $content=$hooks{htmlize}{$type}{call}->( page => $page, @@ -1185,10 +1185,9 @@ sub htmlize ($$$$) { if ($oneline) { # hack to get rid of enclosing junk added by markdown - # and other htmlizers + # and other htmlizers/sanitizers $content=~s/^<p>//i; - $content=~s/<\/p>$//i; - chomp $content; + $content=~s/<\/p>\n*$//i; } return $content; diff --git a/doc/bugs/stray___60____47__p__62___tags.mdwn b/doc/bugs/stray___60____47__p__62___tags.mdwn index 6e508ffda..99d6fe09f 100644 --- a/doc/bugs/stray___60____47__p__62___tags.mdwn +++ b/doc/bugs/stray___60____47__p__62___tags.mdwn @@ -13,3 +13,5 @@ I believe that this snippet in `IkiWiki.pm` might be the reason for the imbalanc } The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved. + +> [[done]] --[[Joey]] -- cgit v1.2.3 From cb8b2f80b2f8c91eba3f3a6a5b9913ab80326df8 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Mon, 5 Apr 2010 22:50:51 +0100 Subject: Use $a and $b for SortSpec cmp callbacks --- IkiWiki.pm | 27 ++++++++++++++++++--------- IkiWiki/Plugin/meta.pm | 14 ++++++-------- IkiWiki/Plugin/sortnaturally.pm | 4 ++-- doc/plugins/write.mdwn | 20 ++++++++++---------- t/pagespec_match_list.t | 2 +- 5 files changed, 37 insertions(+), 30 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index d716e8b39..da36494fb 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1975,10 +1975,10 @@ sub sortspec_translate ($) { if (exists $IkiWiki::SortSpec::{"cmp_$word"}) { if (defined $params) { push @data, $params; - $code .= "IkiWiki::SortSpec::cmp_$word(\@_, \$data[$#data])"; + $code .= "IkiWiki::SortSpec::cmp_$word(\$data[$#data])"; } else { - $code .= "IkiWiki::SortSpec::cmp_$word(\@_, undef)"; + $code .= "IkiWiki::SortSpec::cmp_$word(undef)"; } } else { @@ -2095,9 +2095,8 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = sortspec_translate($params{sort}); - - @candidates = sort { $f->($a, $b) } @candidates; + @candidates = IkiWiki::SortSpec::sort_pages($params{sort}, + @candidates); } @candidates=reverse(@candidates) if $params{reverse}; @@ -2412,13 +2411,23 @@ sub match_ip ($$;@) { package IkiWiki::SortSpec; +# This is in the SortSpec namespace so that the $a and $b that sort() uses +# $IkiWiki::SortSpec::a and $IkiWiki::SortSpec::b, so that plugins' cmp +# functions can access them easily. +sub sort_pages +{ + my $f = IkiWiki::sortspec_translate(shift); + + return sort $f @_; +} + sub cmp_title { - IkiWiki::pagetitle(IkiWiki::basename($_[0])) + IkiWiki::pagetitle(IkiWiki::basename($a)) cmp - IkiWiki::pagetitle(IkiWiki::basename($_[1])) + IkiWiki::pagetitle(IkiWiki::basename($b)) } -sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } -sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } +sub cmp_mtime { $IkiWiki::pagemtime{$b} <=> $IkiWiki::pagemtime{$a} } +sub cmp_age { $IkiWiki::pagectime{$b} <=> $IkiWiki::pagectime{$a} } 1 diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 4992617d0..553f93455 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -374,25 +374,23 @@ sub match_copyright ($$;@) { package IkiWiki::SortSpec; sub cmp_meta { - my $left = $_[0]; - my $right = $_[1]; - my $meta = $_[2]; + my $meta = $_[0]; error(gettext("sort=meta requires a parameter")) unless defined $meta; if ($meta eq 'updated' || $meta eq 'date') { - return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) <=> - IkiWiki::Plugin::meta::get_sort_key($right, $meta); + IkiWiki::Plugin::meta::get_sort_key($b, $meta); } - return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) cmp - IkiWiki::Plugin::meta::get_sort_key($right, $meta); + IkiWiki::Plugin::meta::get_sort_key($b, $meta); } # A prototype of how sort=title could behave in 4.0 or something sub cmp_meta_title { - $_[2] = 'title'; + $_[0] = 'title'; return cmp_meta(@_); } diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index f498820a5..92453749d 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -25,8 +25,8 @@ sub checkconfig () { package IkiWiki::SortSpec; sub cmp_title_natural { - Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), - IkiWiki::pagetitle(IkiWiki::basename($_[1]))) + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($a)), + IkiWiki::pagetitle(IkiWiki::basename($b))) } 1; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index b67142230..f42cc86ae 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1117,16 +1117,16 @@ Similarly, it's possible to write plugins that add new functions as the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. -The function will be passed three or more parameters. The first two are -page names, and the third is `undef` if invoked as `foo`, or the parameter -`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named -parameters. - -It should return the same thing as Perl's `cmp` and `<=>` operators: negative -if the first argument is less than the second, positive if the first argument -is greater, or zero if they are considered equal. It may also raise an -error using `error`, for instance if it needs a parameter but one isn't -provided. +The names of pages to be compared are in the global variables `$a` and `$b` +in the IkiWiki::SortSpec package. The function should return the same thing +as Perl's `cmp` and `<=>` operators: negative if `$a` is less than `$b`, +positive if `$a` is greater, or zero if they are considered equal. It may +also raise an error using `error`, for instance if it needs a parameter but +one isn't provided. + +The function will also be passed one or more parameters. The first is +`undef` if invoked as `foo`, or the parameter `"bar"` if invoked as `foo(bar)`; +it may also be passed additional, named parameters. ### Setup plugins diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 68112f5c0..2ad7a9105 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -12,7 +12,7 @@ IkiWiki::checkconfig(); { package IkiWiki::SortSpec; - sub cmp_path { $_[0] cmp $_[1] } + sub cmp_path { $a cmp $b } } %pagesources=( -- cgit v1.2.3 From b186ec1b4cb8145d6a6cb68478e23d7fb0fa1476 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 00:02:18 +0000 Subject: ready for review, I think --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 51 +++++++++++++++++----- 1 file changed, 39 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index 0aca74be2..d4da13feb 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -20,7 +20,7 @@ That earlier version of the branch is also available for comparison: >> I wonder if IkiWiki would benefit from the concept of a "sortspec", like a [[ikiwiki/PageSpec]] but dedicated to sorting lists of pages rather than defining lists of pages? Rather than defining a sort-hook, define a SortSpec class, and enable people to add their own sort methods as functions defined inside that class, similarly to the way they can add their own pagespec definitions. --[[KathrynAndersen]] ->>> [[!template id=gitbranch branch=smcv/sort-package author="[[Simon_McVittie|smcv]]"]] +>>> [[!template id=gitbranch branch=smcv/ready/sort-package author="[[Simon_McVittie|smcv]]"]] >>> I'd be inclined to think that's overkill, but it wasn't very hard to >>> implement, and in a way is more elegant. I set it up so sort mechanisms >>> share the `IkiWiki::PageSpec` package, but with a `cmp_` prefix. Gitweb: @@ -207,7 +207,26 @@ Unfortunatly, I think that c is closest to the new implementation. > } > > which would mean that the comparison used `$IkiWiki::SortSpec::a`. -> +> --s + +>> I've now done this. On a wiki with many [[plugins/contrib/album]]s +>> (a full rebuild takes half an hour!), I tested a refresh after +>> `touch tags/*.mdwn` (my tag pages contain inlines of the form +>> `tagged(foo)` sorted by date, so they exercise sorting). +>> I also tried removing sorting from `pagespec_match_list` +>> altogether, as an upper bound for how fast we can possibly make it. +>> +>> * `master` at branch point: 63.72user 0.29system +>> * `master` at branch point: 63.91user 0.37system +>> * my branch, with `@_`: 65.28user 0.29system +>> * my branch, with `@_`: 65.21user 0.28system +>> * my branch, with `$a`: 64.09user 0.28system +>> * my branch, with `$a`: 63.83user 0.36system +>> * not sorted at all: 58.99user 0.29system +>> * not sorted at all: 58.92user 0.29system +>> +>> --s + > I do notice that `pagespec_match_list` performs the sort before the > filter by pagespec. Is this a deliberate design choice, or > coincidence? I can see that when `limit` is used, this could be @@ -218,7 +237,15 @@ Unfortunatly, I think that c is closest to the new implementation. >> Yes, it was deliberate, pagespec matching can be expensive enough that >> needing to sort a lot of pages seems likely to be less work. (I don't ->> remember what benchmarking was done though.) --[[Joey]] +>> remember what benchmarking was done though.) --[[Joey]] + +>>> We discussed this on IRC and Joey pointed out that this also affects +>>> dependency calculation, so I'm not going to get into this now... --s + +Joey pointed out on IRC that the `titlesort` feature duplicates all the +meta titles. I did that in order to sort by the unescaped version, but +I've now changed the branch to only store that if it makes a difference. +--s ## Documentation from sort-package branch @@ -262,13 +289,13 @@ Similarly, it's possible to write plugins that add new functions as the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. -The function will be passed three or more parameters. The first two are -page names, and the third is `undef` if invoked as `foo`, or the parameter -`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named -parameters. +The names of pages to be compared are in the global variables `$a` and `$b` +in the IkiWiki::SortSpec package. The function should return the same thing +as Perl's `cmp` and `<=>` operators: negative if `$a` is less than `$b`, +positive if `$a` is greater, or zero if they are considered equal. It may +also raise an error using `error`, for instance if it needs a parameter but +one isn't provided. -It should return the same thing as Perl's `cmp` and `<=>` operators: negative -if the first argument is less than the second, positive if the first argument -is greater, or zero if they are considered equal. It may also raise an -error using `error`, for instance if it needs a parameter but one isn't -provided. +The function will also be passed one or more parameters. The first is +`undef` if invoked as `foo`, or the parameter `"bar"` if invoked as `foo(bar)`; +it may also be passed additional, named parameters. -- cgit v1.2.3 From 1fb5b9f61c114a0151416d2de69b5ea420c6706b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 00:04:47 +0000 Subject: switch branch for review to use ready/foo convention --- doc/todo/matching_different_kinds_of_links.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index c4383c0b7..5678ee7e2 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -53,7 +53,7 @@ I don't have any opinion on this syntax (whether it's good or not)...--Ivan Z. ------- ->> [[!template id=gitbranch author="[[Simon_McVittie|smcv]]" branch=smcv/link-types]] +>> [[!template id=gitbranch author="[[Simon_McVittie|smcv]]" branch=smcv/ready/link-types]] >> [[!tag patch]] ## Documentation for smcv's branch -- cgit v1.2.3 From 26bf69d17aff4c74dd6c368712091d8c1fc977a6 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 00:49:38 +0000 Subject: as seen on IRC --- ...but_not_all_meta_fields_are_stored_escaped.mdwn | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn (limited to 'doc') diff --git a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn new file mode 100644 index 000000000..d79318dd8 --- /dev/null +++ b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn @@ -0,0 +1,32 @@ +[[!template id=gitbranch branch=smcv/unescaped-meta author="[[Simon_McVittie|smcv]]"]] +(Warning: this branch has not been tested thoroughly.) + +While discussing the [[plugins/meta]] plugin on IRC, Joey pointed out that +it stores most meta fields unescaped, but 'title', 'guid' and 'description' +are special-cased and stored escaped (with numeric XML/HTML entities). This +is to avoid emitting markup in the <title> of a HTML page, or in an RSS/Atom +feed, neither of which are subject to the [[plugins/htmlscrubber]]. + +However, having the meta fields "partially escaped" like this is somewhat +error-prone. Joey suggested that perhaps everything should be stored +unescaped, and the escaping should be done on output; this branch +implements that. + +Points of extra subtlety: + +* The title given to the [[plugins/search]] plugin was previously HTML; + now it's plain text, potentially containing markup characters. I suspect + that that's what Xapian wants anyway (which is why I didn't change it), + but I could be wrong... + +* Page descriptions in the HTML `<head>` were previously double-escaped: + the description was stored escaped with numeric entities, then that was + output with a second layer of escaping! In this branch, I just emit + the page description escaped once, as was presumably the intention. + +* It's safe to apply this change to a wiki and neglect to rebuild it + (assuming I implemented it correctly!), but until the wiki is rebuilt, + titles, descriptions and GUIDs for unchanged pages will appear + double-escaped on any page that inlines them in `quick=yes` mode, and + is rebuilt for some other reason. The failure mode is too much escaping + rather than too little, so it shouldn't be a security problem. -- cgit v1.2.3 From 0ed94696c0a449b425bc319297d39060ee24dcf2 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 00:50:51 +0000 Subject: pages talking about escaping should really be escaped correctly --- doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn index d79318dd8..cbfcfd6b7 100644 --- a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn +++ b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn @@ -4,7 +4,7 @@ While discussing the [[plugins/meta]] plugin on IRC, Joey pointed out that it stores most meta fields unescaped, but 'title', 'guid' and 'description' are special-cased and stored escaped (with numeric XML/HTML entities). This -is to avoid emitting markup in the <title> of a HTML page, or in an RSS/Atom +is to avoid emitting markup in the `<title>` of a HTML page, or in an RSS/Atom feed, neither of which are subject to the [[plugins/htmlscrubber]]. However, having the meta fields "partially escaped" like this is somewhat -- cgit v1.2.3 From 315bcf866c490ae2041cef59f960e8021d52e840 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 00:51:27 +0000 Subject: tag as patch --- doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn index cbfcfd6b7..6a934d4eb 100644 --- a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn +++ b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn @@ -1,4 +1,5 @@ [[!template id=gitbranch branch=smcv/unescaped-meta author="[[Simon_McVittie|smcv]]"]] +[[!tag patch]] (Warning: this branch has not been tested thoroughly.) While discussing the [[plugins/meta]] plugin on IRC, Joey pointed out that -- cgit v1.2.3 From 1f112d570ef235416c4001605e15980b2f628da4 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 00:55:54 +0000 Subject: if applied, reverting this would be problematic --- doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn index 6a934d4eb..8e1ca42e0 100644 --- a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn +++ b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn @@ -31,3 +31,9 @@ Points of extra subtlety: double-escaped on any page that inlines them in `quick=yes` mode, and is rebuilt for some other reason. The failure mode is too much escaping rather than too little, so it shouldn't be a security problem. + +* Reverting this change, if applied, is more dangerous; until the wiki is + rebuilt, any titles, descriptions and GUIDs on unchanged pages that + contained markup could appear unescaped on any page that inlines them + in `quick=yes` mode, and is rebuilt for some other reason. The failure + mode here would be too little escaping, i.e. cross-site scripting. -- cgit v1.2.3 From 5f8df5828834c0163d04ad3b949888d78e37ae73 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 6 Apr 2010 03:59:09 +0000 Subject: --- doc/plugins/contrib/ymlfront/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn index f437624b6..ce3b2b483 100644 --- a/doc/plugins/contrib/ymlfront/discussion.mdwn +++ b/doc/plugins/contrib/ymlfront/discussion.mdwn @@ -2,3 +2,6 @@ My field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb <http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>) has some fixes for compatibility with old YAML modules, mostly done by imitating Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]] + +> I would if I could *find* it. I checked out the "field-etc" branch, but I can't find the plugins in question under IkiWiki/Plugin; am I looking in the wrong place, or what? +> --[[KathrynAndersen]] -- cgit v1.2.3 From 06f58b1b888a6cea1a9a5cce9e098428f0adab75 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 6 Apr 2010 04:00:47 +0000 Subject: response --- doc/plugins/contrib/field/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index c2b75a76d..af5bfd6c9 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -92,3 +92,5 @@ you separated out `ymlfront`. Trivial patch available from field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: <http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>) --[[smcv]] + +> Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] -- cgit v1.2.3 From ee1e7079ebe0a1e9d3d6c79cb221a0fb86f423d5 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 6 Apr 2010 04:41:55 +0000 Subject: more flexible underlays, please? --- doc/todo/optional_underlaydir_prefix.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/todo/optional_underlaydir_prefix.mdwn (limited to 'doc') diff --git a/doc/todo/optional_underlaydir_prefix.mdwn b/doc/todo/optional_underlaydir_prefix.mdwn new file mode 100644 index 000000000..8fd6d76c5 --- /dev/null +++ b/doc/todo/optional_underlaydir_prefix.mdwn @@ -0,0 +1,20 @@ +For security reasons, symlinks are disabled in IkiWiki. That's fair enough, but that means that some problems, which one could otherwise solve by using a symlink, cannot be solved. The specfic problem in this case is that all underlays are placed at the root of the wiki, when it could be more convenient to place some underlays in specific sub-directories. + +Use-case 1 (to keep things tidy): + +Currently IkiWiki has some javascript files in `underlays/javascript`; that directory is given as one of the underlay directories. Thus, all the javascript files appear in the root of the generated site. But it would be tidier if one could say "put the contents of *this* underlaydir under the `js` directory". + +Use-case 2 (a read-only external dir): + +Suppose I want to include a subset of `/usr/local/share/docs` on my wiki, say the docs about `foo`. But I want them to be under the `docs/foo` sub-directory on the generated site. Currently I can't do that. If I give `/usr/local/share/docs/foo` as an underlaydir, then the contents of that will be in the root of the site, rather than under `docs/foo`. And if I give `/usr/local/share/docs` as an underlaydir, then the contents of the `foo` dir will be under `foo`, but it will also include every other thing in `/usr/local/share/docs`. + +Since we can't use symlinks in an underlay dir to link to these directories, then perhaps one could give a specific underlay dir a specific prefix, which defines the sub-directory that the underlay should appear in. + +I'm not sure how this would be implemented, but I guess it could be configured something like this: + + prefixed_underlay => { + 'js' => '/usr/local/share/ikiwiki/javascript', + 'docs/foo' => '/usr/local/share/docs/foo', + } + +[[!taglink wishlist]] -- cgit v1.2.3 From 2efec70c7e55f9426d7051ffebc6c1eb55afb16b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 10:47:28 +0000 Subject: oops, branch returned now --- doc/plugins/contrib/ymlfront/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn index ce3b2b483..3ad02af29 100644 --- a/doc/plugins/contrib/ymlfront/discussion.mdwn +++ b/doc/plugins/contrib/ymlfront/discussion.mdwn @@ -5,3 +5,7 @@ Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]] > I would if I could *find* it. I checked out the "field-etc" branch, but I can't find the plugins in question under IkiWiki/Plugin; am I looking in the wrong place, or what? > --[[KathrynAndersen]] + +>> Sorry, I accidentally removed `field-etc` by pushing with `--mirror` from a +>> different checkout. I've put it back; it's a branch from your `ikiplugins.git`, +>> so yes, the code should be in `IkiWiki/Plugin`. --[[smcv]] -- cgit v1.2.3 From 089a7faff8defe98ffc593702be93f8f35d2153a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 13:25:26 -0400 Subject: first question --- doc/plugins/contrib/field/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index af5bfd6c9..646a5f3f4 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -94,3 +94,18 @@ field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: --[[smcv]] > Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] + +---- + +Disclaimer: I've only looked at this plugin and ymlfront, not other related +stuff yet. (I quite like ymlfront, so I looked at this as its dependency. :) +I also don't want to annoy you with a lot of design discussion +if your main goal was to write a plugin that did exactly what you wanted. + +My first question is: Why we need another plugin storing metadata +about the page, when we already have the meta plugin? Much of the +complication around the field plugin has to do with it accessing info +belonging to the meta plugin, and generalizing that to be able to access +info stored by other plugins too. (But I don't see any other plugins that +currently store such info). Then too, it raises points of confusion like +smcv's discuission of field author vs meta author above. --[[Joey]] -- cgit v1.2.3 From c87ddb6908485fecff9c516223ca0b2973df88f6 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 13:58:55 -0400 Subject: idea --- doc/todo/optional_underlaydir_prefix.mdwn | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'doc') diff --git a/doc/todo/optional_underlaydir_prefix.mdwn b/doc/todo/optional_underlaydir_prefix.mdwn index 8fd6d76c5..dd11d062d 100644 --- a/doc/todo/optional_underlaydir_prefix.mdwn +++ b/doc/todo/optional_underlaydir_prefix.mdwn @@ -4,6 +4,9 @@ Use-case 1 (to keep things tidy): Currently IkiWiki has some javascript files in `underlays/javascript`; that directory is given as one of the underlay directories. Thus, all the javascript files appear in the root of the generated site. But it would be tidier if one could say "put the contents of *this* underlaydir under the `js` directory". +> Of course, this could be accomplished, if we wanted to, by moving the +> files to `underlays/javascript/js`. --[[Joey]] + Use-case 2 (a read-only external dir): Suppose I want to include a subset of `/usr/local/share/docs` on my wiki, say the docs about `foo`. But I want them to be under the `docs/foo` sub-directory on the generated site. Currently I can't do that. If I give `/usr/local/share/docs/foo` as an underlaydir, then the contents of that will be in the root of the site, rather than under `docs/foo`. And if I give `/usr/local/share/docs` as an underlaydir, then the contents of the `foo` dir will be under `foo`, but it will also include every other thing in `/usr/local/share/docs`. @@ -17,4 +20,25 @@ I'm not sure how this would be implemented, but I guess it could be configured s 'docs/foo' => '/usr/local/share/docs/foo', } +> So, let me review why symlinks are an issue. For normal, non-underlay +> pages, users who do not have filesystem access to the server may have +> commit access, and so could commit eg, a symlink to `/etc/passwd` (or +> to `/` !). The guards are there to prevent ikiwiki either exposing the +> symlink target's contents, or potentially overwriting it. +> +> Is this a concern for underlays? Most of the time, certianly not; +> the underlay tends to be something only the site admin controls. +> Not all the security checks that are done on the srcdir are done +> on the underlays, either. Most checks done on files in the underlay +> are only done because the same code handles srcdir files. The one +> exception is the test that skips processing symlinks in the underlay dir. +> (But note that the underlay directory can be a symlinkt to elsewhere +> which the srcdir, by default, cannot.) +> +> So, one way to approach this is to make ikiwiki follow directory symlinks +> inside the underlay directory. Just a matter of passing `follow => 1` to +> find. (This would still not allow individual files to be symlinks, because +> `readfile` does not allow reading symlinks. But I don't see much need +> for that.) --[[Joey]] + [[!taglink wishlist]] -- cgit v1.2.3 From 33d934b5ca1666bfe3f9fa3004ad7d31c38c69c1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 14:05:00 -0400 Subject: comment --- doc/forum/an_alternative_approach_to_structured_data.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn index 045bfd7aa..06c82337a 100644 --- a/doc/forum/an_alternative_approach_to_structured_data.mdwn +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -18,6 +18,10 @@ I think it could be really powerful and useful, especially if it becomes part of > It looks like an interesting idea. I don't have time right now to look at it in depth, but it looks interesting. -- [[Will]] +> I agree such a separation makes some sense. But note that the discussion on [[todo/structured_page_data]] +> talks about associating data types with fields for a good reason: It's hard to later develop a good UI for +> querying or modifying a page's data if all the data has an implicit type "string". --[[Joey]] + ## Second Pass I have written additional plugins which integrate with the [[plugins/contrib/field]] plugin to both set and get structured page data. -- cgit v1.2.3 From 6fd59908ba8f6999f63c94c918f8c309ed108f74 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 14:06:29 -0400 Subject: comment --- doc/plugins/contrib/pod/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn index 76e858680..9187b1350 100644 --- a/doc/plugins/contrib/pod/discussion.mdwn +++ b/doc/plugins/contrib/pod/discussion.mdwn @@ -8,3 +8,7 @@ supports, or later support latex, that could be problimatic since that could maybe be used to include files or run code. --[[Joey]] > I don't know, either; the documentation for [[!cpan Pod:Xhtml]] is silent on this subject. --[[KathrynAndersen]] + +>> I'm afraid the only approach is to audit the existing code in the perl +>> module(s), and then hope nothing is added to them later that opens a +>> security hole. --[[Joey]] -- cgit v1.2.3 From ff267e7ac33226cfbdf30ae8e9b9f7688c485dc7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 14:09:02 -0400 Subject: comment --- doc/users/KathrynAndersen/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/users/KathrynAndersen/discussion.mdwn b/doc/users/KathrynAndersen/discussion.mdwn index 288ea8c51..35340b22f 100644 --- a/doc/users/KathrynAndersen/discussion.mdwn +++ b/doc/users/KathrynAndersen/discussion.mdwn @@ -9,6 +9,10 @@ that as a patch to the existing map plugin.) --[[Joey]] > I think pmap is probably better as a separate plugin, because it has additional dependencies (HTML::LinkList) which people might not want to have to install. +>> One approach commonly used in ikiwiki is to make such optional features +>> be enabled by a switch somewhere, and 'eval q{use Foo}` so the module +>> does not have to be loaded unless the feature is used. --[[Joey]] + > The "includepage" plugin I'm not sure whether it is worth releasing or not; it's basically a cut-down version of "inline", because the inline plugin is so complicated and has so many options, I felt more at ease to have something simpler. > --[[KathrynAndersen]] -- cgit v1.2.3 From 407a3493599afbb2f16a0ace49ff1924997895d2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 14:20:44 -0400 Subject: nearly there! --- doc/todo/matching_different_kinds_of_links.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 5678ee7e2..76a99f6a5 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -176,3 +176,15 @@ though... --[[smcv]] >> Removed in a newer version of the branch. I re-introduced it as a >> plugin in `smcv/typedlink`, but I don't think we really need it. --s + +---- + +I am ready to merge this, but I noticed one problem -- since `match_tagged` +now only matches pages with the tag linktype, a wiki will need to be +rebuilt on upgrade in order to get the linktype of existing tags in it +recorded. So there needs to be a NEWS item about this and +the postinst modified to force the rebuild. + +Also, the ready branch adds `typedlink()` to [[ikiwiki/pagespec]], +but you removed that feature as documented above. +--[[Joey]] -- cgit v1.2.3 From b29c50c731d17c83fef21ef606654ce3bde84310 Mon Sep 17 00:00:00 2001 From: webkatalog <webkatalog@web> Date: Tue, 6 Apr 2010 18:38:17 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 4a3e41e83..ef9c3da59 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -96,6 +96,7 @@ Personal sites and blogs * [Embedded Moose](http://embeddedmoose.com), Andrew Greenberg's personal and consulting page. * [Chez Fred](http://fred.ccheznous.org) * [Cameron Dale](http://www.camrdale.org/) +* [webkatalog ohne backlinkpflicht](http://www.1a-verzeichnis.de/) * [[KarlMW]]'s [homepage](http://mowson.org/karl/), generated with an ikiwiki [asciidoc plugin](http://mowson.org/karl/colophon/). * [Carl Worth's Boring Web Pages](http://www.cworth.org) -- cgit v1.2.3 From 4568ba8a6228cb80cea4b3c4520ae8a066e6f04a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 14:39:51 -0400 Subject: Revert spam This reverts commit b29c50c731d17c83fef21ef606654ce3bde84310. Nice try, no cigar. --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index ef9c3da59..4a3e41e83 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -96,7 +96,6 @@ Personal sites and blogs * [Embedded Moose](http://embeddedmoose.com), Andrew Greenberg's personal and consulting page. * [Chez Fred](http://fred.ccheznous.org) * [Cameron Dale](http://www.camrdale.org/) -* [webkatalog ohne backlinkpflicht](http://www.1a-verzeichnis.de/) * [[KarlMW]]'s [homepage](http://mowson.org/karl/), generated with an ikiwiki [asciidoc plugin](http://mowson.org/karl/colophon/). * [Carl Worth's Boring Web Pages](http://www.cworth.org) -- cgit v1.2.3 From e496920e51ae9f0ecfbad5799634a5064193dcdb Mon Sep 17 00:00:00 2001 From: webkatalog <webkatalog@web> Date: Tue, 6 Apr 2010 18:43:08 +0000 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 4a3e41e83..472bd5728 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -143,6 +143,7 @@ Personal sites and blogs * [Chris Dombroski's boring bliki](https://www.icanttype.org/) * [Josh Triplett's homepage](http://joshtriplett.org/) - Git backend with the CGI disabled, to publish a static site with the convenience of ikiwiki. * [Gustaf Thorslund's blog](http://blog.thorslund.org) +* [Webkatalog ohne Backlinkpflicht](http://www.1a-verzeichnis.de/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 1a646f7e77e94128c3ef6938fbd727b302c9ef07 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 15:12:54 -0400 Subject: Revert spam This reverts commit e496920e51ae9f0ecfbad5799634a5064193dcdb. "Twice is enemy action"; enjoy your ban! --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 472bd5728..4a3e41e83 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -143,7 +143,6 @@ Personal sites and blogs * [Chris Dombroski's boring bliki](https://www.icanttype.org/) * [Josh Triplett's homepage](http://joshtriplett.org/) - Git backend with the CGI disabled, to publish a static site with the convenience of ikiwiki. * [Gustaf Thorslund's blog](http://blog.thorslund.org) -* [Webkatalog ohne Backlinkpflicht](http://www.1a-verzeichnis.de/) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From b8f4ffdc5d381da04000502f20f0d4e4c13704b3 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Tue, 6 Apr 2010 21:00:48 +0100 Subject: Remove typedlink from [[ikiwiki/pagespec]] It's not supported in this branch any more. --- doc/ikiwiki/pagespec.mdwn | 3 --- 1 file changed, 3 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index ca6693024..5c191f23f 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -52,9 +52,6 @@ Some more elaborate limits can be added to what matches using these functions: specified IP address. * "`postcomment(glob)`" - matches only when comments are being posted to a page matching the specified glob -* "`typedlink(type glob)`" - matches pages that link to a given page (or glob) - with a given link type. Plugins can create links with a specific type: - for instance, the tag plugin creates links of type `tag`. For example, to match all pages in a blog that link to the page about music and were written in 2005: -- cgit v1.2.3 From 899639f10d49cff410059c3af2e1d5717c25b738 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 6 Apr 2010 20:03:26 +0000 Subject: fixed --- doc/todo/matching_different_kinds_of_links.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 76a99f6a5..8e81860a1 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -185,6 +185,12 @@ rebuilt on upgrade in order to get the linktype of existing tags in it recorded. So there needs to be a NEWS item about this and the postinst modified to force the rebuild. +> Done, although you'll need to plug in an appropriate version number when +> you release it. Is there a distinctive reminder string you grep for +> during releases? I've used `UNRELEASED` for now. --[[smcv]] + Also, the ready branch adds `typedlink()` to [[ikiwiki/pagespec]], but you removed that feature as documented above. --[[Joey]] + +> Done. --s -- cgit v1.2.3 From af99d4cb10b06292e8a0acd472ae905e072e3e84 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 6 Apr 2010 22:24:24 +0000 Subject: reply --- doc/users/KathrynAndersen/discussion.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/KathrynAndersen/discussion.mdwn b/doc/users/KathrynAndersen/discussion.mdwn index 35340b22f..4f2790c39 100644 --- a/doc/users/KathrynAndersen/discussion.mdwn +++ b/doc/users/KathrynAndersen/discussion.mdwn @@ -11,7 +11,9 @@ that as a patch to the existing map plugin.) --[[Joey]] >> One approach commonly used in ikiwiki is to make such optional features >> be enabled by a switch somewhere, and 'eval q{use Foo}` so the module ->> does not have to be loaded unless the feature is used. --[[Joey]] +>> does not have to be loaded unless the feature is used. --[[Joey]] + +>>> Unfortunately, HTML::LinkList isn't an optional feature for pmap; that's what it uses to create the HTML for the map. --[[KathrynAndersen]] > The "includepage" plugin I'm not sure whether it is worth releasing or not; it's basically a cut-down version of "inline", because the inline plugin is so complicated and has so many options, I felt more at ease to have something simpler. -- cgit v1.2.3 From 121405e8aa80e7ceb5283b0ff8c9865458a6dd52 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 6 Apr 2010 23:09:59 +0000 Subject: response to Joey and smcv --- doc/plugins/contrib/field/discussion.mdwn | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 646a5f3f4..b243e2dfe 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -21,7 +21,9 @@ behaviour, an auxiliary plugin would be easy.) >> (like `map`). Is your plan that `meta` should register itself by >> default, and `map` and friends should be adapted to >> work based on `getfield()` instead of `$pagestate{foo}{meta}`, then? ->> + +>>> Based on `field_get_value()`, yes. That would be my ideal. Do you think I should implement that as an ikiwiki branch? --[[KathrynAndersen]] + >> (On the site I mentioned, I'm using an unmodified version of `field`, >> and currently working around the collision by tagging books' pages >> with `bookauthor` instead of `author` in the YAML.) --s @@ -94,6 +96,7 @@ field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: --[[smcv]] > Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] +>> Done! -K.A. ---- @@ -109,3 +112,16 @@ belonging to the meta plugin, and generalizing that to be able to access info stored by other plugins too. (But I don't see any other plugins that currently store such info). Then too, it raises points of confusion like smcv's discuission of field author vs meta author above. --[[Joey]] + +> The point is exactly in the generalization, to provide a uniform interface for accessing structured data, no matter what the source of it, whether that be the meta plugin or some other plugin. + +> There were a few reasons for this: + +>1. In converting my site over from PmWiki, I needed something that was equivalent to PmWiki's Page-Text-Variables (which is how PmWiki implements structured data). +>2. I also wanted an equivalent of PmWiki's Page-Variables, which, rather than being simple variables, are the return-value of a function. This gives one a lot of power, because one can do calculations, derive one thing from another. Heck, just being able to have a "basename" variable is useful. +>3. I noticed that in the discussion about structured data, it was mired down in disagreements about what form the structured data should take; I wanted to overcome that hurdle by decoupling the form from the content. +>4. I actually use this to solve (1), because, while I do use ymlfront, initially my pages were in PmWiki format (I wrote (another) unreleased plugin which parses PmWiki format) including PmWiki's Page-Text-Variables for structured data. So I needed something that could deal with multiple formats. + +> So, yes, it does cater to mostly my personal needs, but I think it is more generally useful, also. +> --[[KathrynAndersen]] + -- cgit v1.2.3 From c7eaf3c262f322290f6e15959369c14d190bbe09 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 6 Apr 2010 23:19:18 +0000 Subject: response --- doc/forum/an_alternative_approach_to_structured_data.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/an_alternative_approach_to_structured_data.mdwn b/doc/forum/an_alternative_approach_to_structured_data.mdwn index 06c82337a..6e6af8adb 100644 --- a/doc/forum/an_alternative_approach_to_structured_data.mdwn +++ b/doc/forum/an_alternative_approach_to_structured_data.mdwn @@ -20,7 +20,9 @@ I think it could be really powerful and useful, especially if it becomes part of > I agree such a separation makes some sense. But note that the discussion on [[todo/structured_page_data]] > talks about associating data types with fields for a good reason: It's hard to later develop a good UI for -> querying or modifying a page's data if all the data has an implicit type "string". --[[Joey]] +> querying or modifying a page's data if all the data has an implicit type "string". --[[Joey]] + +>> I'm not sure that having an implicit type of "string" is really such a bad thing. After all, Perl itself manages with just string and number, and easily converts from one to the other. Strong typing is generally used to (a) restrict what can be done with the data and/or (b) restrict how the data is input. The latter could be done with some sort of validated form, but that, too, could be decoupled from looking up and returning the value of a field. --[[KathrynAndersen]] ## Second Pass -- cgit v1.2.3 From 811d398646337717f8f2ad92897c6410faa42777 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 6 Apr 2010 23:20:49 +0000 Subject: response --- doc/todo/optional_underlaydir_prefix.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/optional_underlaydir_prefix.mdwn b/doc/todo/optional_underlaydir_prefix.mdwn index dd11d062d..06900a904 100644 --- a/doc/todo/optional_underlaydir_prefix.mdwn +++ b/doc/todo/optional_underlaydir_prefix.mdwn @@ -41,4 +41,6 @@ I'm not sure how this would be implemented, but I guess it could be configured s > `readfile` does not allow reading symlinks. But I don't see much need > for that.) --[[Joey]] +>> If you think that enabling symlinks in underlay directories wouldn't be a security issue, then I'm all for it! That would be much simpler to implement, I'm sure. --[[KathrynAndersen]] + [[!taglink wishlist]] -- cgit v1.2.3 From 1158fe8f4400943d7a24350c6ac8fee6a95c2bed Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 7 Apr 2010 02:55:50 +0000 Subject: further discussion, point out potential XSS --- doc/plugins/contrib/field/discussion.mdwn | 110 ++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index b243e2dfe..16b40cf06 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -24,10 +24,64 @@ behaviour, an auxiliary plugin would be easy.) >>> Based on `field_get_value()`, yes. That would be my ideal. Do you think I should implement that as an ikiwiki branch? --[[KathrynAndersen]] +>>>> This doesn't solve cases where certain fields are treated specially; for +>>>> instance, putting a `\[[!meta permalink]]` on a page is not the same as +>>>> putting it in `ymlfront` (in the latter case you won't get your +>>>> `<link>` header), and putting `\[[!meta date]]` is not the same as putting +>>>> `date` in `ymlfront` (in the latter case, `%pagectime` won't be changed). +>>>> +>>>> One way to resolve that would be to have `ymlfront`, or similar, be a +>>>> front-end for `meta` rather than for `field`, and call +>>>> `IkiWiki::Plugin::meta::preprocess` (or a refactored-out function that's +>>>> similar). +>>>> +>>>> There are also some cross-site scripting issues (see below)... --[[smcv]] + >> (On the site I mentioned, I'm using an unmodified version of `field`, >> and currently working around the collision by tagging books' pages >> with `bookauthor` instead of `author` in the YAML.) --s +>> Revisiting this after more thought, the problem here is similar to the +>> possibility that a wiki user adds a `meta` shortcut +>> to [[shortcuts]], or conversely, that a plugin adds a `cpan` directive +>> that conflicts with the `cpan` shortcut that pages already use. (In the +>> case of shortcuts, this is resolved by having plugin-defined directives +>> always win.) For plugin-defined meta keywords this is the plugin +>> author's/wiki admin's problem - just don't enable conflicting plugins! - +>> but it gets scary when you start introducing things like `ymlfront`, which +>> allow arbitrary, wiki-user-defined fields, even ones that subvert +>> other plugins' assumptions. +>> +>> The `pagetemplate` hook is particularly alarming because page templates are +>> evaluated in many contexts, not all of which are subject to the +>> htmlscrubber or escaping; because the output from `field` isn't filtered, +>> prefixed or delimited, when combined with an arbitrary-key-setting plugin +>> like `ymlfront` it can interfere with other plugins' expectations +>> and potentially cause cross-site scripting exploits. For instance, `inline` +>> has a `pagetemplate` hook which defines the `FEEDLINKS` template variable +>> to be a blob of HTML to put in the `<head>` of the page. As a result, this +>> YAML would be bad: +>> +>> --- +>> FEEDLINKS: <script>alert('code injection detected')</script> +>> --- +>> +>> (It might require a different case combination due to implementation +>> details, I'm not sure.) +>> +>> It's difficult for `field` to do anything about this, because it doesn't +>> know whether a field is meant to be plain text, HTML, a URL, or something +>> else. +>> +>> If `field`'s `pagetemplate` hook did something more limiting - like +>> only emitting template variables starting with `field_`, or from some +>> finite set, or something - then this would cease to be a problem, I think? +>> +>> `ftemplate` and `getfield` don't have this problem, as far as I can see, +>> because their output is in contexts where the user could equally well have +>> written raw HTML directly; the user can cause themselves confusion, but +>> can't cause harmful output. --[[smcv]] + From a coding style point of view, the `$CamelCase` variable names aren't IkiWiki style, and the `match_foo` functions look as though they could benefit from being thin wrappers around a common `&IkiWiki::Plugin::field::match` @@ -125,3 +179,59 @@ smcv's discuission of field author vs meta author above. --[[Joey]] > So, yes, it does cater to mostly my personal needs, but I think it is more generally useful, also. > --[[KathrynAndersen]] +>> Is it fair to say, then, that `field`'s purpose is to take other +>> plugins' arbitrary per-page data, and present it as a single +>> merged/flattened string => string map per page? From the plugins +>> here, things you then use that merged map for include: +>> +>> * sorting - stolen by [[todo/allow_plugins_to_add_sorting_methods]] +>> * substitution into pages with Perl-like syntax - `getfield` +>> * substitution into wiki-defined templates - the `pagetemplate` +>> hook +>> * substitution into user-defined templates - `ftemplate` +>> +>> As I mentioned above, the flattening can cause collisions (and in the +>> `pagetemplate` case, even security problems). +>> +>> I wonder whether conflating Page Text Variables with Page Variables +>> causes `field` to be more general than it needs to be? +>> To define a Page Variable (function-like field), you need to write +>> a plugin containing that Perl function; if we assume that `field` +>> or something resembling it gets merged into ikiwiki, then it's +>> reasonable to expect third-party plugins to integrate with whatever +>> scaffolding there is for these (either in an enabled-by-default +>> plugin that most people are expected to leave enabled, like `meta` +>> now, or in the core), and it doesn't seem onerous to expect each +>> plugin that wants to participate in this mechanism to have code to +>> do so. While it's still contrib, `field` could just have a special case +>> for the meta plugin, rather than the converse? +>> +>> If Page Text Variables are limited to being simple strings as you +>> suggest over in [[forum/an_alternative_approach_to_structured_data]], +>> then they're functionally similar to `meta` fields, so one way to +>> get their functionality would be to extend `meta` so that +>> +>> \[[!meta badger="mushroom"]] +>> +>> (for an unrecognised keyword `badger`) would store +>> `$pagestate{$page}{meta}{badger} = "mushroom"`? Getting this to +>> appear in templates might be problematic, because a naive +>> `pagetemplate` hook would have the same problem that `field` combined +>> with `ymlfront` currently does. +>> +>> One disadvantage that would appear if the function-like and +>> meta-like fields weren't in the same namespace would be that it +>> wouldn't be possible to switch a field from being meta-like to being +>> function-like without changing any wiki content that referenced it. +>> +>> Perhaps meta-like fields should just *be* `meta` (with the above +>> enhancement), as a trivial case of function-like fields? That would +>> turn `ymlfront` into an alternative syntax for `meta`, I think? +>> That, in turn, would hopefully solve the special-fields problem, +>> by just delegating it to meta. I've been glad of the ability to define +>> new ad-hoc fields with this plugin without having to write an extra plugin +>> to do so (listing books with a `bookauthor` and sorting them by +>> `"field(bookauthor) title"`), but that'd be just as easy if `meta` +>> accepted ad-hoc fields? +>> +>> --[[smcv]] -- cgit v1.2.3 From 3b1dd03c7e7f56eaf6da956779c885c2e9e7ef53 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 22:57:02 -0400 Subject: improve wording to not encourage explicitly passing undef --- doc/plugins/write.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index fe7cf0183..71ff1fd29 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -960,8 +960,8 @@ will yield something like `foo/feed.rss`. This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. -An optional third parameter sets the link type (`undef` produces an ordinary -[[ikiwiki/WikiLink]]). +An optional third parameter sets the link type. If not specified, +it is an ordinary [[ikiwiki/WikiLink]]. ## Miscellaneous -- cgit v1.2.3 From e12cd5f293fea9d85c7e4cdc86e2bf9381d5676a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 7 Apr 2010 03:03:40 +0000 Subject: update fieldsort plugin again; remove obsolete bug + fix note (thanks!) --- doc/plugins/contrib/field/discussion.mdwn | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 16b40cf06..2ea195e5b 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -131,8 +131,8 @@ I think it should just be part of `field` rather than a separate plugin. error("sort=field requires a parameter"); } - my $left = IkiWiki::Plugin::field::field_get_value($_[2], $_[0]); - my $right = IkiWiki::Plugin::field::field_get_value($_[2], $_[1]); + my $left = IkiWiki::Plugin::field::field_get_value($_[0], $a); + my $right = IkiWiki::Plugin::field::field_get_value($_[0], $b); $left = "" unless defined $left; $right = "" unless defined $right; @@ -141,17 +141,6 @@ I think it should just be part of `field` rather than a separate plugin. 1; -------- - -Bug report: `field` has an unnecessary `use YAML::Any`, presumably from before -you separated out `ymlfront`. Trivial patch available from -field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: -<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>) ---[[smcv]] - -> Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] ->> Done! -K.A. - ---- Disclaimer: I've only looked at this plugin and ymlfront, not other related -- cgit v1.2.3 From fcd810d236fdf779beb740082953a14feba07f0d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 23:04:54 -0400 Subject: close --- doc/todo/matching_different_kinds_of_links.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/matching_different_kinds_of_links.mdwn b/doc/todo/matching_different_kinds_of_links.mdwn index 8e81860a1..da3ea49f6 100644 --- a/doc/todo/matching_different_kinds_of_links.mdwn +++ b/doc/todo/matching_different_kinds_of_links.mdwn @@ -193,4 +193,4 @@ Also, the ready branch adds `typedlink()` to [[ikiwiki/pagespec]], but you removed that feature as documented above. --[[Joey]] -> Done. --s +> [[Done]]. --s -- cgit v1.2.3 From be2af2e5c1ddfe90802a67aa150cf17dbe903df0 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 23:19:00 -0400 Subject: add cpan link --- doc/plugins/sortnaturally.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/sortnaturally.mdwn b/doc/plugins/sortnaturally.mdwn index 91f373f6b..a16381946 100644 --- a/doc/plugins/sortnaturally.mdwn +++ b/doc/plugins/sortnaturally.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=sortnaturally core=1 author="[[chrysn]], [[smcv]]"]] [[!tag type/meta]] -This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] order, -which uses Sort::Naturally to sort numbered pages in a more natural order. +This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] +order, which uses [[!cpan Sort::Naturally]] to sort numbered pages in a +more natural order. -- cgit v1.2.3 From dad7ac5a21bc049b9f559c98f4e113c99edb4eb5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 23:24:22 -0400 Subject: question --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index d4da13feb..d7f10528a 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -10,6 +10,9 @@ title over the page name, but for compatibility, I'm not going to (I do wonder whether it would be worth making sort=name an alias for the current sort=title, and changing the meaning of sort=title in 4.0, though). +> What compatability concerns, exactly, are there that prevent making that +> change now? --[[Joey]] + *[sort-hooks branch now withdrawn in favour of sort-package --s]* I briefly tried to turn *all* the current sort types into hook functions, and -- cgit v1.2.3 From 04a9d8e867f1eef46e9c79dee055756bdbb6a039 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 23:26:59 -0400 Subject: remove note about more sort types possibly being available Good plugins should document them :) --- doc/ikiwiki/pagespec/sorting.mdwn | 3 --- 1 file changed, 3 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 5c6cfcc2b..37995f1e8 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -21,7 +21,4 @@ In addition, you can combine several sort orders and/or reverse the order of sorting, with a string like `age -title` (which would sort by age, then by title in reverse order if two pages have the same age). -Plugins can add additional sort orders, so more might be available on this -wiki. - [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From 32ce94f5a30e52da17f06b9b9dce7f3d3112da98 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Tue, 6 Apr 2010 23:30:10 -0400 Subject: close (but one question remains!) --- doc/todo/allow_plugins_to_add_sorting_methods.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn index d7f10528a..b523cd19f 100644 --- a/doc/todo/allow_plugins_to_add_sorting_methods.mdwn +++ b/doc/todo/allow_plugins_to_add_sorting_methods.mdwn @@ -43,7 +43,7 @@ That earlier version of the branch is also available for comparison: >>>>>> `SortSpec` --[[Joey]] ->>>>>>> Done. --s +>>>>>>> [[Done]]. --s >>>> I would be inclined to drop the `check_` stuff. --[[Joey]] -- cgit v1.2.3 From d58444a3e956e329cea4cbcdddcba99664ee585e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 7 Apr 2010 00:01:38 -0400 Subject: note about sort and dependency types There's a gotcha where pagespec_match_list is used with a dependency type that is not a full content dependency, and so ikiwiki does not know that a content change to a page that sorted too low to match needs to trigger a rebuild, since its sort order may have changed. Inline is mostly ok re this, as it does use content dependencies. Except for in the case of raw mode. But then, page metadata is documented to not be loaded, so it doesn't make sense to use sortspecs that depend on metadata. I hope. :) --- doc/plugins/write.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 05ddf2215..707622956 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -734,7 +734,10 @@ Additional named parameters can be specified: * `filter` is a reference to a function, that is called and passed a page, and returns true if the page should be filtered out of the list. * `sort` specifies a sort order for the list. See - [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. + [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. Note that + if a sort method is specified that depends on the + page content (such as 'meta(foo)'), the deptype needs to be set to + a content dependency. * `reverse` if true, sorts in reverse. * `num` if nonzero, specifies the maximum number of matching pages that will be returned. -- cgit v1.2.3 From ef1ebf6079bd2a91d1d799bafacf6a51d4633db3 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 7 Apr 2010 00:28:56 -0400 Subject: add peter's git repo --- doc/git.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 379285a49..55967e543 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -26,7 +26,8 @@ be browsed, subscribed to etc on its You are of course free to set up your own ikiwiki git repository with your own [[patches|patch]]. If you list it here, the `gitremotes` script will automatically add it to git remotes. Your repo will automatically be pulled -into [[Joey]]'s working tree. This is recommended. :-) +into [[Joey]]'s working repository where he can see your branches and +think about merging them. This is recommended. :-) <!-- Machine-parsed format: * wikilink <git:url> --> @@ -60,6 +61,7 @@ into [[Joey]]'s working tree. This is recommended. :-) * [[davrieb|David_Riebenbauer]] `git://git.liegesta.at/git/ikiwiki` ([browse](http://git.liegesta.at/?p=ikiwiki.git;a=summary)) * [[GustafThorslund]] `http://gustaf.thorslund.org/src/ikiwiki.git` +* [[peteg]] `git://git.hcoop.net/git/peteg/ikiwiki.git` ## branches -- cgit v1.2.3 From 2e9fae5c11d9fabf6270de18d0c26bc251750b09 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 7 Apr 2010 15:12:39 +0000 Subject: response about XSS, meta and pagetemplates --- doc/plugins/contrib/field/discussion.mdwn | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 2ea195e5b..dd9342224 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -224,3 +224,32 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >> accepted ad-hoc fields? >> >> --[[smcv]] + +>>> Your point above about cross-site scripting is a valid one, and something I +>>> hadn't thought of (oops). + +>>> I still want to be able to populate pagetemplate templates with field, because I +>>> use it for a number of things, such as setting which CSS files to use for a +>>> given page, and, as I said, for titles. But apart from the titles, I +>>> realize I've been setting them in places other than the page data itself. +>>> (Another unreleased plugin, `concon`, uses Config::Context to be able to +>>> set variables on a per-site, per-directory and a per-page basis). + +>>> The first possible solution is what you suggested above: for field to only +>>> set values in pagetemplate which are prefixed with *field_*. I don't think +>>> this is quite satisfactory, since that would still mean that people could +>>> put un-scrubbed values into a pagetemplate, albeit they would be values +>>> named field_foo, etc. + +>>> An alternative solution would be to classify field registration as "secure" +>>> and "insecure". Sources such as ymlfront would be insecure, sources such +>>> as concon (or the $config hash) would be secure, since they can't be edited +>>> as pages. Then, when doing pagetemplate substitution (but not ftemplate +>>> substitution) the insecure sources could be HTML-escaped. + +>>> Another problem, as you point out, is special-case fields, such as a number of +>>> those defined by `meta`, which have side-effects associated with them, more +>>> than just providing a value to pagetemplate. Perhaps `meta` should deal with +>>> the side-effects, but use `field` as an interface to get the values of those special fields. + +>>> --[[KathrynAndersen]] -- cgit v1.2.3 From e46a3b753463e71d8a24c35a5035cfbc47dd4816 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 7 Apr 2010 17:39:04 +0000 Subject: "safe" and "unsafe" too simplistic, I suspect --- doc/plugins/contrib/field/discussion.mdwn | 49 ++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index dd9342224..24c37cc4c 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -239,13 +239,60 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>> set values in pagetemplate which are prefixed with *field_*. I don't think >>> this is quite satisfactory, since that would still mean that people could >>> put un-scrubbed values into a pagetemplate, albeit they would be values ->>> named field_foo, etc. +>>> named field_foo, etc. --[[KathrynAndersen]] + +>>>> They can already do similar; `PERMALINK` is pre-sanitized to +>>>> ensure that it's a "safe" URL, but if an extremely confused wiki admin was +>>>> to put `COPYRIGHT` in their RSS/Atom feed's `<link>`, a malicious user +>>>> could put an unsafe (e.g. Javascript) URL in there (`COPYRIGHT` *is* +>>>> HTML-scrubbed, but "javascript:alert('pwned!')" is just text as far as a +>>>> HTML sanitizer is concerned, so it passes straight through). The solution +>>>> is to not use variables in situations where that variable would be +>>>> inappropriate. Because `field` is so generic, the definition of what's +>>>> appropriate is difficult. --[[smcv]] >>> An alternative solution would be to classify field registration as "secure" >>> and "insecure". Sources such as ymlfront would be insecure, sources such >>> as concon (or the $config hash) would be secure, since they can't be edited >>> as pages. Then, when doing pagetemplate substitution (but not ftemplate >>> substitution) the insecure sources could be HTML-escaped. +>>> --[[KathrynAndersen]] + +>>>> Whether you trust the supplier of data seems orthogonal to whether its value +>>>> is (meant to be) interpreted as plain text, HTML, a URL or what? +>>>> +>>>> Even in cases where you trust the supplier, you need to escape things +>>>> suitably for the context, not for security but for correctness. The +>>>> definition of the value, and the context it's being used in, changes the +>>>> processing you need to do. An incomplete list: +>>>> +>>>> * HTML used as HTML needs to be html-scrubbed if and only if untrusted +>>>> * URLs used as URLs need to be put through `safeurl()` if and only if +>>>> untrusted +>>>> * HTML used as plain text needs tags removed regardless +>>>> * URLs used as plain text are safe +>>>> * URLs or plain text used in HTML need HTML-escaping (and URLs also need +>>>> `safeurl()` if untrusted) +>>>> * HTML or plain text used in URLs need URL-escaping (and the resulting +>>>> URL might need sanitizing too?) +>>>> +>>>> I can't immediately think of other data types we'd be interested in beyond +>>>> text, HTML and URL, but I'm sure there are plenty. +>>>> +>>>> One reasonable option would be to declare that `field` takes text-valued +>>>> fields, in which case either consumers need to escape +>>>> it with `<TMPL_VAR FIELD_FOO ESCAPE=HTML>`, and not interpret it as a URL +>>>> without first checking `safeurl`), or the pagetemplate hook needs to +>>>> pre-escape. +>>>> +>>>> Another reasonable option would be to declare that `field` takes raw HTML, +>>>> in which case consumers need to only use it in contexts that will be +>>>> HTML-scrubbed (but it becomes unsuitable for using as text - problematic +>>>> for text-based things like sorting or URLs, and not ideal for searching). +>>>> +>>>> You could even let each consumer choose how it's going to use the field, +>>>> by having the `foo` field generate `TEXT_FOO` and `HTML_FOO` variables? +>>>> --[[smcv]] >>> Another problem, as you point out, is special-case fields, such as a number of >>> those defined by `meta`, which have side-effects associated with them, more -- cgit v1.2.3 From c127e964f1704a6704639350851afee722825529 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Wed, 7 Apr 2010 21:25:26 +0100 Subject: expand my response --- doc/todo/allow_site-wide_meta_definitions.mdwn | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/allow_site-wide_meta_definitions.mdwn b/doc/todo/allow_site-wide_meta_definitions.mdwn index 7129a44ac..82670250e 100644 --- a/doc/todo/allow_site-wide_meta_definitions.mdwn +++ b/doc/todo/allow_site-wide_meta_definitions.mdwn @@ -217,6 +217,16 @@ definitions essentially. >>> For this to work with websetup and --dumpsetup, it needs to define the >>> `meta_*` settings in the getsetup function. +>>>> +>>>> I think this will be problematic with the current implementation of this +>>>> patch. The datatype here is an array of hash references, with each hash +>>>> having a variable (and arbitrary) number of key/value pairs. I can't +>>>> think of an intuitive way of implementing a way of editing such a +>>>> datatype in the web interface, let alone registering the option in +>>>> getsetup. +>>>> +>>>> Perhaps a limited set of defined meta values could be exposed via +>>>> websetup (the obvious ones: author, copyright, license, etc.) -- [[Jon]] >>> >>> I also have some concerns about both these patches, since both throw >>> a lot of redundant data at meta, which then stores it in a very redundant @@ -232,6 +242,5 @@ definitions essentially. >>> meta special-case the site-wide settings, not store them in these >>> per-page data structures, and just make them be used if no per-page >>> metadata of the given type is present. --[[Joey]] - ->>>> Thanks for the review - these are all valid points. I'll get working ->>>> on a revised patch. -- [[Jon]] +>>>> +>>>> that should be easy enough to do. I will work on a patch. -- [[Jon]] -- cgit v1.2.3 From 15a65ffae67b7eaf2702b3a42edee95daf8f4c89 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 7 Apr 2010 23:29:25 +0000 Subject: further response to smcv on pagetemplates --- doc/plugins/contrib/field/discussion.mdwn | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 24c37cc4c..36c2118e7 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -278,13 +278,34 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>>> >>>> I can't immediately think of other data types we'd be interested in beyond >>>> text, HTML and URL, but I'm sure there are plenty. ->>>> + +>>>>> But isn't this a problem with anything that uses pagetemplates? Or is +>>>>> the point that, with plugins other than `field`, they all know, +>>>>> beforehand, the names of all the fields that they are dealing with, and +>>>>> thus the writer of the plugin knows which treatment each particular field +>>>>> needs? For example, that `meta` knows that `title` needs to be +>>>>> HTML-escaped, and that `baseurl` doesn't. In that case, yes, I see the problem. +>>>>> It's a tricky one. It isn't as if there's only ever going to be a fixed set of fields that need different treatment, either. Because the site admin is free to add whatever fields they like to the page template (if they aren't using the default one, that is. I'm not using the default one myself). +>>>>> Mind you, for trusted sources, since the person writing the page template and the person providing the variable are the same, they themselves would know whether the value will be treated as HTML, plain text, or a URL, and thus could do the needed escaping themselves when writing down the value. + +>>>>> Looking at the content of the default `page.tmpl` let's see what variables fall into which categories: +>>>>> * Used as URL: BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL +>>>>> * Used as part of a URL: FAVICON, LOCAL_CSS +>>>>> * Needs to be HTML-escaped: TITLE +>>>>> * Used as-is (as HTML): FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER + +>>>>> This looks as if only TITLE needs HTML-escaping all the time, and that the URLS all end with "URL" in their name. Unfortunately the FAVICON and LOCAL_CSS which are part of URLS don't have "URL" in their name, though that's fair enough, since they aren't full URLs. + +>>>>> --K.A. + >>>> One reasonable option would be to declare that `field` takes text-valued >>>> fields, in which case either consumers need to escape >>>> it with `<TMPL_VAR FIELD_FOO ESCAPE=HTML>`, and not interpret it as a URL >>>> without first checking `safeurl`), or the pagetemplate hook needs to >>>> pre-escape. ->>>> + +>>>>> Since HTML::Template does have the ability to do ESCAPE=HTML/URL/JS, why not take advantage of that? Some things, like TITLE, probably should have ESCAPE=HTML all the time; that would solve the "to escape or not to escape" problem that `meta` has with titles. After all, when one *sorts* by title, one doesn't really want HTML-escaping in it; only when one uses it in a template. -- K.A. + >>>> Another reasonable option would be to declare that `field` takes raw HTML, >>>> in which case consumers need to only use it in contexts that will be >>>> HTML-scrubbed (but it becomes unsuitable for using as text - problematic @@ -294,6 +315,8 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>>> by having the `foo` field generate `TEXT_FOO` and `HTML_FOO` variables? >>>> --[[smcv]] +>>>>> Something similar is already done in `template` and `ftemplate` with the `raw_` prefix, which determines whether the variable should have `htmlize` run over it first before the value is applied to the template. Of course, that isn't scrubbing or escaping, because with those templates, the scrubbing is done afterwards as part of the normal processing. + >>> Another problem, as you point out, is special-case fields, such as a number of >>> those defined by `meta`, which have side-effects associated with them, more >>> than just providing a value to pagetemplate. Perhaps `meta` should deal with -- cgit v1.2.3 From ce9cf967d01eb8e112c19d9f7b1c9a727717ef30 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 7 Apr 2010 23:33:04 +0000 Subject: formatting --- doc/plugins/contrib/field/discussion.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 36c2118e7..103e061e5 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -289,10 +289,11 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>>>> Mind you, for trusted sources, since the person writing the page template and the person providing the variable are the same, they themselves would know whether the value will be treated as HTML, plain text, or a URL, and thus could do the needed escaping themselves when writing down the value. >>>>> Looking at the content of the default `page.tmpl` let's see what variables fall into which categories: ->>>>> * Used as URL: BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL ->>>>> * Used as part of a URL: FAVICON, LOCAL_CSS ->>>>> * Needs to be HTML-escaped: TITLE ->>>>> * Used as-is (as HTML): FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER + +>>>>> * **Used as URL:** BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL +>>>>> * **Used as part of a URL:** FAVICON, LOCAL_CSS +>>>>> * **Needs to be HTML-escaped:** TITLE +>>>>> * **Used as-is (as HTML):** FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER >>>>> This looks as if only TITLE needs HTML-escaping all the time, and that the URLS all end with "URL" in their name. Unfortunately the FAVICON and LOCAL_CSS which are part of URLS don't have "URL" in their name, though that's fair enough, since they aren't full URLs. -- cgit v1.2.3 From 1c1c76c53e1d0e713e470bb6542c5cc3cef20ad2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 9 Apr 2010 12:25:10 -0400 Subject: close bug, was fixed in 3.20100403 --- ...ox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn b/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn index 46e77a265..558eb90c8 100644 --- a/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn +++ b/doc/bugs/firefox_doesn__39__t_want_to_load_updated_pages_at_ikiwiki.info.mdwn @@ -5,3 +5,10 @@ Only explicitly pressing "reload" helps. Is it a bug? I haven't been noticing such problems usually on other sites. --Ivan Z. This remains to be true now, with Epiphany 2.26.3 (Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.1.4pre) Gecko/20080528 Epiphany/2.22 Firefox/3.5). --Ivan Z. + +> In the most recent ikiwiki release, I added a Cache-Control hack +> explicitly to work around firefox's broken over-caching. +> +> (When I tested epiphany and chromium, neither had firefox's problem.) +> +> [[!tag done]] -- cgit v1.2.3 From a8761a086ebf353192e4721090ff11d3f67707b6 Mon Sep 17 00:00:00 2001 From: Cord <Cord@web> Date: Sat, 10 Apr 2010 07:06:06 +0000 Subject: --- doc/todo/More_flexible_po-plugin_for_translation.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/todo/More_flexible_po-plugin_for_translation.mdwn (limited to 'doc') diff --git a/doc/todo/More_flexible_po-plugin_for_translation.mdwn b/doc/todo/More_flexible_po-plugin_for_translation.mdwn new file mode 100644 index 000000000..3399f7834 --- /dev/null +++ b/doc/todo/More_flexible_po-plugin_for_translation.mdwn @@ -0,0 +1,5 @@ +I have a website with multi-language content, where some content is only in English, some in German, and some is available in both languages. + +The po-module currently has only one master-language, with slave languages, and a PageSpec should be considered. + +It would be nice to flag the content which should have a translation on a file-by-file basis (with some inline directive?) which could contain the information of the master-language for that file and the desired target-languages. -- cgit v1.2.3 From d2c36a6f4b8b4bf30d59c430893a88352ac208fc Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 10 Apr 2010 15:29:31 -0400 Subject: close --- doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn index 8e1ca42e0..587771ba4 100644 --- a/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn +++ b/doc/bugs/some_but_not_all_meta_fields_are_stored_escaped.mdwn @@ -20,6 +20,9 @@ Points of extra subtlety: that that's what Xapian wants anyway (which is why I didn't change it), but I could be wrong... + > AFAICS, this if anything, fixes a bug, xapian definitely expects + > unescaped text here. --[[Joey]] + * Page descriptions in the HTML `<head>` were previously double-escaped: the description was stored escaped with numeric entities, then that was output with a second layer of escaping! In this branch, I just emit @@ -37,3 +40,5 @@ Points of extra subtlety: contained markup could appear unescaped on any page that inlines them in `quick=yes` mode, and is rebuilt for some other reason. The failure mode here would be too little escaping, i.e. cross-site scripting. + +[[!tag done]] -- cgit v1.2.3 From cecbd529389788c1f1cb647e2ff297cda7554456 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 11 Apr 2010 00:30:27 -0400 Subject: plan for more efficient pagespec_match_list sorting (smcv please note) --- doc/todo/smarter_sorting.mdwn | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 doc/todo/smarter_sorting.mdwn (limited to 'doc') diff --git a/doc/todo/smarter_sorting.mdwn b/doc/todo/smarter_sorting.mdwn new file mode 100644 index 000000000..5a6d63ef1 --- /dev/null +++ b/doc/todo/smarter_sorting.mdwn @@ -0,0 +1,33 @@ +I benchmarked a build of a large wiki (my home wiki), and it was spending +quite a lot of time sorting; `CORE::sort` was called only 1138 times, but +still flagged as the #1 time sink. (I'm not sure I trust NYTProf fully +about that FWIW, since it also said 27238263 calls to `cmp_age` were +the #3 timesink, and I suspect it may not entirely accurately measure +the overhead of so many short function calls.) + +`pagespec_match_list` currently always sorts *all* pages first, and then +finds the top M that match the pagespec. That's innefficient when M is +small (as for example in a typical blog, where only 20 posts are shown, +out of maybe thousands). + +As [[smcv]] noted, It could be flipped, so the pagespec is applied first, +and then sort the smaller matching set. But, checking pagespecs is likely +more expensive than sorting. (Also, influence calculation complicates +doing that, since only influences for the M returned pages should be tracked.) + +Another option, when there is a limit on M pages to return, might be to +cull the M top pages without sorting the rest. This could be done using +a variant of Ye Olde Bubble Sort. Take the first M pages, and (quick)sort. +Then for each of the rest, check if it is higher than the Mth page. +If it is, bubble it up so it's sorted. +If not, throw it out (that's the fast bit and why this is not O(N^2)). + +This would be bad when M is very large, and particularly, of course, when +there is no limit and all pages are being matched on. (For example, an +archive page shows all pages that match a pagespec specifying a creation +date range.) Well, in this case, it *does* make sense to flip it, limit by +pagespe first, and do a (quick)sort second. (No influence complications, +either.) + +Adding these special cases will be more complicated, but I think the best +of both worlds. --[[Joey]] -- cgit v1.2.3 From 0bfc364a7df124509855b8ed0b1b33ab5bc9ebbb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sun, 11 Apr 2010 01:30:03 -0400 Subject: optimization: pagespec_match_list with no num limit matches before sorting This can be a lot faster, since huge numbers of pages are not sorted only to mostly be thrown away. It sped up a build of my blog by at least 5 minutes. --- IkiWiki.pm | 38 ++++++++++++++++++++++++++------------ doc/todo/smarter_sorting.mdwn | 3 +++ t/pagespec_match_list.t | 6 +++++- 3 files changed, 34 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 2cad6a3ef..74d452c50 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1951,8 +1951,9 @@ sub add_link ($$;$) { } } -sub sortspec_translate ($) { +sub sortspec_translate ($$) { my $spec = shift; + my $reverse = shift; my $code = ""; my @data; @@ -2007,6 +2008,10 @@ sub sortspec_translate ($) { return sub { 0 }; } + if ($reverse) { + $code="-($code)"; + } + no warnings; return eval 'sub { '.$code.' }'; } @@ -2109,18 +2114,20 @@ sub pagespec_match_list ($$;@) { ? grep { ! $params{filter}->($_) } keys %pagesources : keys %pagesources; } - - if (defined $params{sort}) { - @candidates = IkiWiki::SortSpec::sort_pages($params{sort}, - @candidates); + + my $num=$params{num}; + my $sort=$params{sort}; + my $reverse=$params{reverse}; + # when only the top matches will be returned, it's efficient to + # sort before matching to pagespec, + if (defined $num && defined $sort) { + @candidates=IkiWiki::SortSpec::sort_pages( + $sort, $reverse, @candidates); } - - @candidates=reverse(@candidates) if $params{reverse}; $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); # clear params, remainder is passed to pagespec - my $num=$params{num}; delete @params{qw{num deptype reverse sort filter list}}; my @matches; @@ -2144,7 +2151,15 @@ sub pagespec_match_list ($$;@) { $depends_simple{$page}{lc $k} |= $i->{$k}; } - return @matches; + # when all matches will be returned, it's efficient to + # sort after matching + if (! defined $num && defined $sort) { + return IkiWiki::SortSpec::sort_pages( + $sort, $reverse, @matches); + } + else { + return @matches; + } } sub pagespec_valid ($) { @@ -2437,9 +2452,8 @@ package IkiWiki::SortSpec; # This is in the SortSpec namespace so that the $a and $b that sort() uses # are easily available in this namespace, for cmp functions to use them. sub sort_pages { - my $f = IkiWiki::sortspec_translate(shift); - - return sort $f @_; + my $f=IkiWiki::sortspec_translate(shift, shift); + sort $f @_ } sub cmp_title { diff --git a/doc/todo/smarter_sorting.mdwn b/doc/todo/smarter_sorting.mdwn index 5a6d63ef1..f8ac216dc 100644 --- a/doc/todo/smarter_sorting.mdwn +++ b/doc/todo/smarter_sorting.mdwn @@ -29,5 +29,8 @@ date range.) Well, in this case, it *does* make sense to flip it, limit by pagespe first, and do a (quick)sort second. (No influence complications, either.) +> Flipping when there's no limit implemented, and it knocked 1/3 off +> the rebuild time of my blog's archive pages. --[[Joey]] + Adding these special cases will be more complicated, but I think the best of both worlds. --[[Joey]] diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 2ad7a9105..c7688c6c0 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 90; +use Test::More tests => 92; BEGIN { use_ok("IkiWiki"); } @@ -38,12 +38,16 @@ $links{foo3}=[qw{bar}]; is_deeply([pagespec_match_list("foo", "bar")], ["bar"]); is_deeply([sort(pagespec_match_list("foo", "* and !post/*"))], ["bar", "foo", "foo2", "foo3"]); is_deeply([sort(pagespec_match_list("foo", "post/*"))], ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title")], + ["post/1", "post/2", "post/3"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", reverse => 1)], ["post/3", "post/2", "post/1"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 2)], ["post/1", "post/2"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50)], ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50, reverse => 1)], + ["post/3", "post/2", "post/1"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", filter => sub { $_[0] =~ /3/}) ], ["post/1", "post/2"]); -- cgit v1.2.3 From 9060cb0cf8f73fca276719dd92dfae9b48d64d38 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@debian.org> Date: Sun, 11 Apr 2010 14:32:18 +0100 Subject: Space sorting orders consistently Markdown interprets the empty lines resulting from [[!if]] as a request that each <li> contain a <p>. For consistent spacing in the HTML, either the unconditional items should have blank lines between (resulting in each <li> having a <p>), or the conditional items should not (resulting in messy source code, and no <li> having a <p>). I think the former looks nicer. --- doc/ikiwiki/pagespec/sorting.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 37995f1e8..ccd7f7eaa 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -4,7 +4,9 @@ specifying the order that matching pages are shown in. The following sort orders can be specified. * `age` - List pages from the most recently created to the oldest. + * `mtime` - List pages with the most recently modified first. + * `title` - Order by title (page name). [[!if test="enabled(sortnaturally)" then=""" * `title_natural` - Orders by title, but numbers in the title are treated -- cgit v1.2.3 From df022df35e3e3fd1d2916e762a2359f23a84a955 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 12 Apr 2010 14:57:40 -0400 Subject: implemented the other half of this Writing my own sort code actually was faster than the built in sort. Whee! (That's not supposed to happen, is it. ;) But, I need to make sure influences are calculated alright. --- doc/todo/smarter_sorting.mdwn | 107 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/smarter_sorting.mdwn b/doc/todo/smarter_sorting.mdwn index f8ac216dc..4a638213f 100644 --- a/doc/todo/smarter_sorting.mdwn +++ b/doc/todo/smarter_sorting.mdwn @@ -13,7 +13,7 @@ out of maybe thousands). As [[smcv]] noted, It could be flipped, so the pagespec is applied first, and then sort the smaller matching set. But, checking pagespecs is likely more expensive than sorting. (Also, influence calculation complicates -doing that, since only influences for the M returned pages should be tracked.) +doing that.) Another option, when there is a limit on M pages to return, might be to cull the M top pages without sorting the rest. This could be done using @@ -22,6 +22,111 @@ Then for each of the rest, check if it is higher than the Mth page. If it is, bubble it up so it's sorted. If not, throw it out (that's the fast bit and why this is not O(N^2)). +> The patch below implements this, perhaps not as efficiently as possible. +> It speeds up building just the top page of my blog by 1 second (out of +> 18). It's probably buggy. +> +> But, I have not thought enough about influence calculation. +> I need to figure out which pagespec matches influences need to be +> accumulated for in order to determine all possible influences of a +> pagespec are known. +> +> The old code accumulates influences from matching all successful pages +> up to the num cutoff, as well as influences from an arbitrary (sometimes +> zero) number of failed matches. New code does not accumulate influences +> from all the top successful matches, only an arbitrary group of +> successes and some failures. + +<pre> +diff --git a/IkiWiki.pm b/IkiWiki.pm +index 1730e47..6798799 100644 +--- a/IkiWiki.pm ++++ b/IkiWiki.pm +@@ -2122,36 +2122,53 @@ sub pagespec_match_list ($$;@) { + my $num=$params{num}; + delete @params{qw{num deptype reverse sort filter list}}; + +- # when only the top matches will be returned, it's efficient to +- # sort before matching to pagespec, +- if (defined $num && defined $sort) { +- @candidates=IkiWiki::SortSpec::sort_pages( +- $sort, @candidates); +- } +- ++ # Find the first num matches (or all), before sorting. + my @matches; +- my $firstfail; + my $count=0; + my $accum=IkiWiki::SuccessReason->new(); +- foreach my $p (@candidates) { +- my $r=$sub->($p, %params, location => $page); ++ my $i; ++ for ($i=0; $i < @candidates; $i++) { ++ my $r=$sub->($candidates[$i], %params, location => $page); + error(sprintf(gettext("cannot match pages: %s"), $r)) + if $r->isa("IkiWiki::ErrorReason"); + $accum |= $r; + if ($r) { +- push @matches, $p; ++ push @matches, $candidates[$i]; + last if defined $num && ++$count == $num; + } + } + ++ # We have num natches, but they may not be the best. ++ # Efficiently find and add the rest, without sorting the full list of ++ # candidates. ++ if (defined $num && defined $sort) { ++ @matches=IkiWiki::SortSpec::sort_pages($sort, @matches); ++ ++ for ($i++; $i < @candidates; $i++) { ++ # Comparing candidate with lowest match is cheaper, ++ # so it's done before testing against pagespec. ++ if (IkiWiki::SortSpec::cmptwo($candidates[$i], $matches[-1], $sort) < 0 && ++ $sub->($candidates[$i], %params, location => $page) ++ ) { ++ # this could be done less expensively ++ # using a binary search ++ for (my $j=0; $j < @matches; $j++) { ++ if (IkiWiki::SortSpec::cmptwo($candidates[$i], $matches[$j], $sort) < 0) { ++ $matches[$j]=$candidates[$i]; ++ last; ++ } ++ } ++ } ++ } ++ } ++ + # Add simple dependencies for accumulated influences. +- my $i=$accum->influences; +- foreach my $k (keys %$i) { +- $depends_simple{$page}{lc $k} |= $i->{$k}; ++ my $inf=$accum->influences; ++ foreach my $k (keys %$inf) { ++ $depends_simple{$page}{lc $k} |= $inf->{$k}; + } + +- # when all matches will be returned, it's efficient to +- # sort after matching ++ # Sort if we didn't already. + if (! defined $num && defined $sort) { + return IkiWiki::SortSpec::sort_pages( + $sort, @matches); +@@ -2455,6 +2472,12 @@ sub sort_pages { + sort $f @_ + } + ++sub cmptwo { ++ $a=$_[0]; ++ $b=$_[1]; ++ $_[2]->(); ++} ++ + sub cmp_title { + IkiWiki::pagetitle(IkiWiki::basename($a)) + cmp +</pre> + This would be bad when M is very large, and particularly, of course, when there is no limit and all pages are being matched on. (For example, an archive page shows all pages that match a pagespec specifying a creation -- cgit v1.2.3 From 24fb346938037b0d41988510bc6e19e81aa62190 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 12 Apr 2010 16:04:49 -0400 Subject: fix bug --- doc/todo/smarter_sorting.mdwn | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/todo/smarter_sorting.mdwn b/doc/todo/smarter_sorting.mdwn index 4a638213f..33c825641 100644 --- a/doc/todo/smarter_sorting.mdwn +++ b/doc/todo/smarter_sorting.mdwn @@ -24,7 +24,7 @@ If not, throw it out (that's the fast bit and why this is not O(N^2)). > The patch below implements this, perhaps not as efficiently as possible. > It speeds up building just the top page of my blog by 1 second (out of -> 18). It's probably buggy. +> 18). > > But, I have not thought enough about influence calculation. > I need to figure out which pagespec matches influences need to be @@ -39,10 +39,10 @@ If not, throw it out (that's the fast bit and why this is not O(N^2)). <pre> diff --git a/IkiWiki.pm b/IkiWiki.pm -index 1730e47..6798799 100644 +index 1730e47..bc8b23d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm -@@ -2122,36 +2122,53 @@ sub pagespec_match_list ($$;@) { +@@ -2122,36 +2122,54 @@ sub pagespec_match_list ($$;@) { my $num=$params{num}; delete @params{qw{num deptype reverse sort filter list}}; @@ -89,7 +89,8 @@ index 1730e47..6798799 100644 + # using a binary search + for (my $j=0; $j < @matches; $j++) { + if (IkiWiki::SortSpec::cmptwo($candidates[$i], $matches[$j], $sort) < 0) { -+ $matches[$j]=$candidates[$i]; ++ splice @matches, $j, $#matches-$j+1, $candidates[$i], ++ @matches[$j..$#matches-1]; + last; + } + } @@ -112,7 +113,7 @@ index 1730e47..6798799 100644 if (! defined $num && defined $sort) { return IkiWiki::SortSpec::sort_pages( $sort, @matches); -@@ -2455,6 +2472,12 @@ sub sort_pages { +@@ -2455,6 +2473,12 @@ sub sort_pages { sort $f @_ } -- cgit v1.2.3 From aaaef740107aacd8f6987711da6895c02e4473ad Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Mon, 12 Apr 2010 16:46:38 -0400 Subject: update --- doc/todo/smarter_sorting.mdwn | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/todo/smarter_sorting.mdwn b/doc/todo/smarter_sorting.mdwn index 33c825641..901e143a7 100644 --- a/doc/todo/smarter_sorting.mdwn +++ b/doc/todo/smarter_sorting.mdwn @@ -16,15 +16,9 @@ more expensive than sorting. (Also, influence calculation complicates doing that.) Another option, when there is a limit on M pages to return, might be to -cull the M top pages without sorting the rest. This could be done using -a variant of Ye Olde Bubble Sort. Take the first M pages, and (quick)sort. -Then for each of the rest, check if it is higher than the Mth page. -If it is, bubble it up so it's sorted. -If not, throw it out (that's the fast bit and why this is not O(N^2)). +cull the M top pages without sorting the rest. -> The patch below implements this, perhaps not as efficiently as possible. -> It speeds up building just the top page of my blog by 1 second (out of -> 18). +> The patch below implements this. > > But, I have not thought enough about influence calculation. > I need to figure out which pagespec matches influences need to be @@ -36,6 +30,11 @@ If not, throw it out (that's the fast bit and why this is not O(N^2)). > zero) number of failed matches. New code does not accumulate influences > from all the top successful matches, only an arbitrary group of > successes and some failures. +> +> Also, by the time I finished this, it was not measuarably faster than +> the old method. At least not with a few thousand pages; it +> might be worth revisiting this sometime for many more pages? [[done]] +> --[[Joey]] <pre> diff --git a/IkiWiki.pm b/IkiWiki.pm -- cgit v1.2.3 From 46551be9efcdecc41163750fabadebf4957358b3 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Wed, 14 Apr 2010 15:42:25 +0000 Subject: Give a bit more details about the Wikis (now one more) I run. --- doc/users/ivan_shmakov.mdwn | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/users/ivan_shmakov.mdwn b/doc/users/ivan_shmakov.mdwn index de58cb207..3d3951d71 100644 --- a/doc/users/ivan_shmakov.mdwn +++ b/doc/users/ivan_shmakov.mdwn @@ -1,4 +1,14 @@ … To put it short: an Ikiwiki newbie. -I run an Ikiwiki instance at <http://gray.siamics.net/~ivan/lhc/> -(though the DNS servers may be flacky due to transition to Dyn Inc.) +Currently, I run a couple of Ikiwiki instances. Namely: + +* <http://lhc.am-1.org/lhc/> + — to hold random stuff written by me, my colleagues, + students, etc. + +* <http://rsdesne.am-1.org/rsdesne-2010/> + — for some of the materials related to the + &ldaquo;Remote Sensing in Education, Science and National + Economy&rdaquo; (2010-03-29 … 2010-04-10, Altai State + University) program I've recently recently participated in as + an instructor. -- cgit v1.2.3 From 43ad6bf96171e88a165278078d61fd221f14b1b4 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Wed, 14 Apr 2010 15:54:49 +0000 Subject: More details on my personal preferences (as related to Ikiwiki.) --- doc/users/ivan_shmakov.mdwn | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'doc') diff --git a/doc/users/ivan_shmakov.mdwn b/doc/users/ivan_shmakov.mdwn index 3d3951d71..d21825c2f 100644 --- a/doc/users/ivan_shmakov.mdwn +++ b/doc/users/ivan_shmakov.mdwn @@ -1,5 +1,10 @@ … To put it short: an Ikiwiki newbie. +[Emacs]: http://www.gnu.org/software/emacs/ +[Lynx]: http://lynx.isc.org/ + +## Wikis + Currently, I run a couple of Ikiwiki instances. Namely: * <http://lhc.am-1.org/lhc/> @@ -12,3 +17,34 @@ Currently, I run a couple of Ikiwiki instances. Namely: Economy&rdaquo; (2010-03-29 … 2010-04-10, Altai State University) program I've recently recently participated in as an instructor. + +## Preferences + +I prefer to use [Lynx][] along with [Emacs][] (via +`emacsclient`) to work with the wikis. (Note the &ldaquo;Local +variables&rdaquo; section below.) + +The things I dislike in the wiki engines are: + +* the use of home-brew specialized version control systems + — while there're a lot of much more developed general + purpose ones; + +* oversimplified syntax + — which (to some extent) precludes more sophisticated + forms of automated processing; in particular, this forces one + to reformat the material, once complete, to, say, prepare a + book, or an article, or slides. + +Out of all the wiki engines I'm familiar with, only Ikiwiki is +free of the first of these. I hope that it will support more +elaborate syntaxes eventually. + +---- + + Local variables: + mode: markdown + coding: utf-8 + fill-column: 64 + ispell-dictionary: "american" + End: -- cgit v1.2.3 From 766ad1cb4c78a9cc3f745deb0f9325a139d363d9 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Wed, 14 Apr 2010 15:56:45 +0000 Subject: Fixed the double quotes. --- doc/users/ivan_shmakov.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/users/ivan_shmakov.mdwn b/doc/users/ivan_shmakov.mdwn index d21825c2f..69fc29d7f 100644 --- a/doc/users/ivan_shmakov.mdwn +++ b/doc/users/ivan_shmakov.mdwn @@ -13,16 +13,16 @@ Currently, I run a couple of Ikiwiki instances. Namely: * <http://rsdesne.am-1.org/rsdesne-2010/> — for some of the materials related to the - &ldaquo;Remote Sensing in Education, Science and National - Economy&rdaquo; (2010-03-29 … 2010-04-10, Altai State + “Remote Sensing in Education, Science and National + Economy” (2010-03-29 … 2010-04-10, Altai State University) program I've recently recently participated in as an instructor. ## Preferences I prefer to use [Lynx][] along with [Emacs][] (via -`emacsclient`) to work with the wikis. (Note the &ldaquo;Local -variables&rdaquo; section below.) +`emacsclient`) to work with the wikis. (Note the “Local +variables” section below.) The things I dislike in the wiki engines are: -- cgit v1.2.3 From e6e77d2311503627fb9ac8485f323535de059359 Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" <http://oneingray.myopenid.com/@web> Date: Wed, 14 Apr 2010 16:03:20 +0000 Subject: Fixed a typo. --- doc/users/ivan_shmakov.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/ivan_shmakov.mdwn b/doc/users/ivan_shmakov.mdwn index 69fc29d7f..4123e0fc6 100644 --- a/doc/users/ivan_shmakov.mdwn +++ b/doc/users/ivan_shmakov.mdwn @@ -15,7 +15,7 @@ Currently, I run a couple of Ikiwiki instances. Namely: — for some of the materials related to the “Remote Sensing in Education, Science and National Economy” (2010-03-29 … 2010-04-10, Altai State - University) program I've recently recently participated in as + University) program I've recently participated in as an instructor. ## Preferences -- cgit v1.2.3 From 53c8e674ace50d8733e913e8cfa5d40793e5019d Mon Sep 17 00:00:00 2001 From: PaulePanter <PaulePanter@web> Date: Wed, 14 Apr 2010 17:38:39 +0000 Subject: Correct comment. We want to merge the branch *doc* into branch *master* as the sample output suggests. --- doc/tips/spam_and_softwaresites.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/spam_and_softwaresites.mdwn b/doc/tips/spam_and_softwaresites.mdwn index 507858c0c..a07889e6b 100644 --- a/doc/tips/spam_and_softwaresites.mdwn +++ b/doc/tips/spam_and_softwaresites.mdwn @@ -34,7 +34,7 @@ branch. If there is, see 'erase spam from the commit history', below, first. Once you are confident it's clean: - # ensure you are on the doc branch + # ensure you are on the master branch $ git branch doc * master -- cgit v1.2.3 From 43ed0cd07ece2b5238d1c148552620a6a1c37436 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Wed, 14 Apr 2010 16:04:52 -0400 Subject: note link types are now available --- doc/todo/structured_page_data.mdwn | 3 +++ doc/todo/tracking_bugs_with_dependencies.mdwn | 3 +++ 2 files changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/structured_page_data.mdwn b/doc/todo/structured_page_data.mdwn index da9da9663..9f21fab7f 100644 --- a/doc/todo/structured_page_data.mdwn +++ b/doc/todo/structured_page_data.mdwn @@ -253,6 +253,9 @@ in a large number of other cases. > dependencies between bugs from arbitrary links. >> This issue (the need for distinguished kinds of links) has also been brought up in other discussions: [[tracking_bugs_with_dependencies#another_kind_of_links]] (deps vs. links) and [[tag_pagespec_function]] (tags vs. links). --Ivan Z. +>>> And multiple link types are now supported; plugins can set the link +>>> type when registering a link, and pagespec functions can match on them. --[[Joey]] + ---- #!/usr/bin/perl diff --git a/doc/todo/tracking_bugs_with_dependencies.mdwn b/doc/todo/tracking_bugs_with_dependencies.mdwn index 5f3ece290..456dadad0 100644 --- a/doc/todo/tracking_bugs_with_dependencies.mdwn +++ b/doc/todo/tracking_bugs_with_dependencies.mdwn @@ -81,6 +81,9 @@ I like the idea of [[tips/integrated_issue_tracking_with_ikiwiki]], and I do so >> I saw that this issue is targeted at by the work on [[structured page data#another_kind_of_links]]. --Ivan Z. +>>> It's fixed now; links can have a type, such as "tag", or "dependency", +>>> and pagespecs can match links of a given typo. --[[Joey]] + Okie - I've had a quick attempt at this. Initial patch attached. This one doesn't quite work. And there is still a lot of debugging stuff in there. -- cgit v1.2.3 From 2f6da5fd2b17541ff88072862d37c4d6f95a50b5 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Thu, 15 Apr 2010 07:19:47 +0000 Subject: Describe my tag type proposal --- doc/todo/Multiple_categorization_namespaces.mdwn | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/todo/Multiple_categorization_namespaces.mdwn (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn new file mode 100644 index 000000000..8a0866dc5 --- /dev/null +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -0,0 +1,24 @@ +I came across this when working on converting my old blog into an ikiwiki, but I think it could be of more general use. + +The background: I have a (currently suspended, waiting to be converted) blog on the [il Cannocchiale](http://www.ilcannocchiale.it) hosting platform. Aside from the usual metatadata (title, author), il Cannocchiale also provides tags and two additional categorization namespaces: a blog-specific user-defind "column" (Rubrica) and a platform-wide "category" (Categoria). The latter is used to group and label a couple of platform-wide lists of latest posts, the former may be used in many different ways (e.g. multi-author blogs could have one column per author or so, or as a form of 'macro-tagging'). Columns are also a little more sophisticated than classical tags because you can assign them a subtitle too. + +When I started working on the conversion, my first idea was to convert Rubriche to subdirectories of an ikiwiki blog. However, this left me with a few annoying things: when rebuilding links from the import, I had to (programmatically) dive into each subdirectory to see where each post was; this would also be problematic for future posting, too. It also meant that moving a post from a Robrica to the other would break all links (unless ikiwiki has a way to fix this automagically). And I wasn't too keen on the fact that the Rubrica would come up in the URL of the post. And finally, of course, I couldn't use this to preserve the Categoria metadata. + +Another solution I thought about was to use special deeper tags for the Rubrica and Categoria (like: `\[[!tag "Rubrica/Some name"]]`), but this is horrible, clumsy, and makes special treatment of these tags a PITN (for example you wouldn't want the Rubrica to be displayed together with the other tags, and you would want it displayed somewhere else like next to the title of the post). This solution however looks to me as the proper path, as long as tags could support totally separate namespaces. I have a tentative implementation of this `tagtype` feature at [my git clone of ikiwiki](http://git.oblomov.eu/ikiwiki). + +The feature is currently implemented as follows: a `tagtypes` config options takes an array of strings: the tag types to be defined _aside from the usual tags_. Each tag type automatically provides a new directive which sets up tags that different from standard tags by having a different tagbase (the same as the tagtype) and link type (again, the same as the tagtype) (a TODO item for this would to make the directive, tagbase and link type customizable). For example, for my imported blog I would define + + tagtypes => [qw{Categoria Rubrica}] + +and then in the blog posts I would have stuff like + + \[[!Categoria "LAVORO/Vita da impiegato"]] + \[[!Rubrica "Il mio mondo"]] + \[[!meta title="Blah blah"]] + \[[!meta author="oblomov"]] + + The body of the article + + \[[!tag a bunch of tags]] + +and the tags would appear at the bottom of the post, the Rubrica next to the title, etc. All of this information would end up as categories in the feeds (although I would like to rework that code to make use of namespaces, terms and labels in a different way). -- cgit v1.2.3 From 19700c70e54cd6d94cf02bf160d65f951dcb7d66 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 15 Apr 2010 07:39:32 +0000 Subject: response, alternative proposal --- doc/todo/Multiple_categorization_namespaces.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index 8a0866dc5..dc66a0245 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -22,3 +22,14 @@ and then in the blog posts I would have stuff like \[[!tag a bunch of tags]] and the tags would appear at the bottom of the post, the Rubrica next to the title, etc. All of this information would end up as categories in the feeds (although I would like to rework that code to make use of namespaces, terms and labels in a different way). + +> Note [[plugins/contrib/report/discussion]]. To quote myself from the latter page: +> *I find tags as they currently exist to be too limiting. I prefer something that can be used for Faceted Tagging http://en.wikipedia.org/wiki/Faceted_classification; that is, things like Author:Fred Nurk, Genre:Historical, Rating:Good, and so on. Of course, that doesn't mean that each tag is limited to only one value, either; just to take the above examples, something might have more than one author, or have multiple genres (such as Historical + Romance).* + +> So you aren't the only one who wants to do more with tags, but I don't think that adding a new directive for each tag type is the way to go; I think it would be simpler to just have one directive, and take advantage of the new [[matching different kinds of links]] functionality, and enhance the tag directive. +> Perhaps something like this: + + \[[!tag categorica="LAVORO/Vita da impiegato" rubrica="Il mio mondo"]] + +> Part of my thinking in this is to also combine tags with [[plugins/contrib/field]], so that the tags for a page could be queried and displayed; that way, one could put them wherever you wanted on the page, using any of [[plugins/contrib/getfield]], [[plugins/contrib/ftemplate]], or [[plugins/contrib/report]]. +> --[[KathrynAndersen]] -- cgit v1.2.3 From 55d4e6bdce5cf16c629765bf227125ea8899417b Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Thu, 15 Apr 2010 13:54:54 +0000 Subject: Reply to KA about collapsing metadata functionality --- doc/todo/Multiple_categorization_namespaces.mdwn | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index dc66a0245..15b97e480 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -2,7 +2,7 @@ I came across this when working on converting my old blog into an ikiwiki, but I The background: I have a (currently suspended, waiting to be converted) blog on the [il Cannocchiale](http://www.ilcannocchiale.it) hosting platform. Aside from the usual metatadata (title, author), il Cannocchiale also provides tags and two additional categorization namespaces: a blog-specific user-defind "column" (Rubrica) and a platform-wide "category" (Categoria). The latter is used to group and label a couple of platform-wide lists of latest posts, the former may be used in many different ways (e.g. multi-author blogs could have one column per author or so, or as a form of 'macro-tagging'). Columns are also a little more sophisticated than classical tags because you can assign them a subtitle too. -When I started working on the conversion, my first idea was to convert Rubriche to subdirectories of an ikiwiki blog. However, this left me with a few annoying things: when rebuilding links from the import, I had to (programmatically) dive into each subdirectory to see where each post was; this would also be problematic for future posting, too. It also meant that moving a post from a Robrica to the other would break all links (unless ikiwiki has a way to fix this automagically). And I wasn't too keen on the fact that the Rubrica would come up in the URL of the post. And finally, of course, I couldn't use this to preserve the Categoria metadata. +When I started working on the conversion, my first idea was to convert Rubriche to subdirectories of an ikiwiki blog. However, this left me with a few annoying things: when rebuilding links from the import, I had to (programmatically) dive into each subdirectory to see where each post was; this would also be problematic for future posting, too. It also meant that moving a post from a Rubrica to the other would break all links (unless ikiwiki has a way to fix this automagically). And I wasn't too keen on the fact that the Rubrica would come up in the URL of the post. And finally, of course, I couldn't use this to preserve the Categoria metadata. Another solution I thought about was to use special deeper tags for the Rubrica and Categoria (like: `\[[!tag "Rubrica/Some name"]]`), but this is horrible, clumsy, and makes special treatment of these tags a PITN (for example you wouldn't want the Rubrica to be displayed together with the other tags, and you would want it displayed somewhere else like next to the title of the post). This solution however looks to me as the proper path, as long as tags could support totally separate namespaces. I have a tentative implementation of this `tagtype` feature at [my git clone of ikiwiki](http://git.oblomov.eu/ikiwiki). @@ -33,3 +33,13 @@ and the tags would appear at the bottom of the post, the Rubrica next to the tit > Part of my thinking in this is to also combine tags with [[plugins/contrib/field]], so that the tags for a page could be queried and displayed; that way, one could put them wherever you wanted on the page, using any of [[plugins/contrib/getfield]], [[plugins/contrib/ftemplate]], or [[plugins/contrib/report]]. > --[[KathrynAndersen]] + +>> A very generic metadata framework could cover all possible usages of fields, tags, and related metadata, but keeping its _user interface_ generic would only make it hard to use. Note that this is not an objection to the idea of collapsing the fields and tags functionality (at quick glance, I cannot see a real difference between single-valued custom tagtypes and fields, but see below), but more about the syntax. + +>> I had thought about the `\[[!tag type1=value1 type2=value2]]` syntax myself, but ultimately decided against it for a number of reasons, most importantly the fact that (1) it's harder to type, (2) it's harder to spot errors in the tag types (so for example if one misspelled `categoria` as `categorica`, he might not notice it as quickly as seeing the un-parsed `\[[!categorica ]]` directive in the output html) and (3) it encourages collapsing possibly unrelated metadata together (for example, I would never consider putting the categoria information together with the rubrica one; of course with your syntax it's perfectly possible to keep them separate as well). + +>> Point (2) may be considered a downside as well as an upside, depending on perspective, of course. And it would be possible to have a set of predefined tag types to match against, like in my tagtype directive approach but with your syntax. Point (3) is of course entirely in the hands of the user, but that's exactly what syntax should be about. There is nothing functionally wrong with e.g. `\[[!meta tag=sometag author=someauthor title=sometitle rubrica=somecolumn]]`, but I honestly find it horrible. + +>> A solution could be to allow both syntaxes, getting to have for example `\[[!sometagtype "blah"]]` as a shortcut for `\[[!tag sometagtype="blah"]]` (or, in the more general case, `\[[!somefieldname "blah"]]` as a shortcut for `\[[!meta fieldname="blah"]]`). + +>> I would like to point out however that there are some functional differences between categorization metadata vs other metadata that might suggest to keep fields and (my extended) tags separate. For examples, in feeds you'd want all categorization metadata to fall in one place, with some appropriate manipulation (which I still have to implement, by the way), while things like author or title would go to the corresponding feed item properties. Although it all would be possible with appropriate report or template juggling, having such default metadata handled natively looks like a bonus to me. -- cgit v1.2.3 From 81ce1cf9daf113c88581407d5e68d8f6ee61d674 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 13:38:24 -0400 Subject: remove example comments_pagespec setting auto-blog.setup configures this automatically now --- doc/examples/blog.mdwn | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn index f542cad0c..b9b57b944 100644 --- a/doc/examples/blog.mdwn +++ b/doc/examples/blog.mdwn @@ -19,10 +19,8 @@ Some additional configuration you might want to do: * Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud to display on the [[index]]. -* Enable the [[comments|plugins/comments]] plugin and configure it to - enable comments to posts to the blog: - - comments_pagespec => 'blog/posts/* and !*/Discussion', +* Enable the [[comments|plugins/comments]] plugin to + enable comments to posts to the blog. * Enable the [[calendar|plugins/calendar]] plugin and run the [[ikiwiki-calendar]] command from cron daily to get an interlinked -- cgit v1.2.3 From 3131433f64235ad5425eb93d5773580b607876fb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 13:40:53 -0400 Subject: calendar: Add archive_pagespec, which is used by ikiwiki-calendar to specify which pages to include on the calendar archive pages. (The pagespec can still also be specified on the ikiwiki-calendar command line.) --- IkiWiki/Plugin/calendar.pm | 8 ++++++++ debian/changelog | 4 ++++ doc/ikiwiki-calendar.mdwn | 8 +++++--- doc/ikiwiki/directive/calendar.mdwn | 7 +++++-- ikiwiki-calendar.in | 6 +++++- 5 files changed, 27 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index ff84bc440..0f0e9518a 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -47,6 +47,14 @@ sub getsetup () { safe => 1, rebuild => 1, }, + archive_pagespec => { + type => "pagespec", + example => "posts/* and !*/Discussion", + description => "PageSpec of pages to include in the archives; used by ikiwiki-calendar command", + link => 'ikiwiki/PageSpec', + safe => 1, + rebuild => 0, + }, } sub is_leap_year (@) { diff --git a/debian/changelog b/debian/changelog index 26b00a07c..7c607b2a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,10 @@ ikiwiki (3.20100410) UNRELEASED; urgency=low for master language. * po: Configuring the same language as master and slave confuses processing; so filter out such a misconfiguration. + * calendar: Add archive_pagespec, which is used by ikiwiki-calendar to + specify which pages to include on the calendar archive pages. + (The pagespec can still also be specified on the ikiwiki-calendar command + line.) -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index 982892fca..c1f4d7267 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -16,9 +16,11 @@ You must specify the setup file for your wiki. The pages will be created inside its `srcdir`, beneath the `archivebase` directory used by the calendar plugin (default "archives"). -You will probably want to specify a [[ikiwiki/PageSpec]] -to control which pages are included on the calendars. The -default is all pages. To limit it to only posts in a blog, +To control which pages are included on the calendars, +a [[ikiwiki/PageSpec]] can be specified. The default is +all pages, or the pages specified by the `comments_pagespec` +setting in the config file. A pagespec can also be specified +on the command line. To limit it to only posts in a blog, use something like "posts/* and !*/Discussion". It defaults to creating calendar pages for the current diff --git a/doc/ikiwiki/directive/calendar.mdwn b/doc/ikiwiki/directive/calendar.mdwn index b2ac75b11..8a08081ee 100644 --- a/doc/ikiwiki/directive/calendar.mdwn +++ b/doc/ikiwiki/directive/calendar.mdwn @@ -40,9 +40,12 @@ An example crontab: "month" or "year". The default is a month view calendar. * `pages` - Specifies the [[ikiwiki/PageSpec]] of pages to link to from the month calendar. Defaults to "*". -* `archivebase` - Configures the base of the archives hierarchy. The - default is "archives". Note that this default can also be overridden +* `archivebase` - Configures the base of the archives hierarchy. + The default is "archives". Note that this default can also be overridden for the whole wiki by setting `archivebase` in ikiwiki's setup file. + Calendars link to pages under here, with names like "2010/04" and + "2010". These pages can be automatically created using the + [[ikiwiki-calendar]] tool. * `year` - The year for which the calendar is requested. Defaults to the current year. * `month` - The numeric month for which the calendar is requested, in the diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in index 9738ea5f7..6b6f693b3 100755 --- a/ikiwiki-calendar.in +++ b/ikiwiki-calendar.in @@ -15,7 +15,7 @@ GetOptions( "force" => \$force, ) || usage(); my $setup=shift || usage(); -my $pagespec=shift || "*"; +my $pagespec=shift; my $startyear=shift || 1900+(localtime(time))[5]; my $endyear=shift || $startyear; @@ -27,6 +27,10 @@ IkiWiki::checkconfig(); my $archivebase = 'archives'; $archivebase = $config{archivebase} if defined $config{archivebase}; +if (! defined $pagespec) { + $pagespec=$config{archive_pagespec} || "*"; +} + sub writearchive ($$;$) { my $template=template(shift); my $year=shift; -- cgit v1.2.3 From fe733e2a424f50227e4a501c3efbf1ce43e07352 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 14:29:14 -0400 Subject: enhance pagestats and rework example blog front page * pagestats: Class parameter can be used to override default class for custom styling. * pagestats: Use style=list to get a list of tags, scaled by use like in a tag cloud. This is useful to put in a sidebar. * Rework example blog front page. --- IkiWiki/Plugin/pagestats.pm | 21 ++++++++++++++++++--- debian/changelog | 5 +++++ doc/examples/blog/archives.mdwn | 7 +++++++ doc/examples/blog/comments.mdwn | 2 +- doc/examples/blog/index.mdwn | 12 ++++++++---- doc/ikiwiki/directive/pagestats.mdwn | 11 ++++++++++- 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 doc/examples/blog/archives.mdwn (limited to 'doc') diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 1c0b46830..48715bd3e 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -75,7 +75,7 @@ sub preprocess (@) { } if ($style eq 'table') { - return "<table class='pageStats'>\n". + return "<table class='".(exists $params{class} ? $params{class} : "pageStats")."'>\n". join("\n", map { "<tr><td>". htmllink($params{page}, $params{destpage}, $_, noimageinline => 1). @@ -87,16 +87,31 @@ sub preprocess (@) { else { # In case of misspelling, default to a page cloud - my $res = "<div class='pagecloud'>\n"; + my $res; + if ($style eq 'list') { + $res = "<ul class='".(exists $params{class} ? $params{class} : "list")."'>\n"; + } + else { + $res = "<div class='".(exists $params{class} ? $params{class} : "pagecloud")."'>\n"; + } foreach my $page (sort keys %counts) { next unless $counts{$page} > 0; my $class = $classes[$counts{$page} * scalar(@classes) / ($max + 1)]; + + $res.="<li>" if $style eq 'list'; $res .= "<span class=\"$class\">". htmllink($params{page}, $params{destpage}, $page). "</span>\n"; + $res.="</li>" if $style eq 'list'; + + } + if ($style eq 'list') { + $res = "</ul>\n"; + } + else { + $res .= "</div>\n"; } - $res .= "</div>\n"; return $res; } diff --git a/debian/changelog b/debian/changelog index 7c607b2a5..c2b0c3c23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,11 @@ ikiwiki (3.20100410) UNRELEASED; urgency=low specify which pages to include on the calendar archive pages. (The pagespec can still also be specified on the ikiwiki-calendar command line.) + * pagestats: Class parameter can be used to override default class for + custom styling. + * pagestats: Use style=list to get a list of tags, scaled by use like + in a tag cloud. This is useful to put in a sidebar. + * Rework example blog front page. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/examples/blog/archives.mdwn b/doc/examples/blog/archives.mdwn new file mode 100644 index 000000000..14686cdfe --- /dev/null +++ b/doc/examples/blog/archives.mdwn @@ -0,0 +1,7 @@ +[[!if test="enabled(calendar)" then=""" +Browse through blog archives by year: +[[!map pages="./archives/* and !./archives/*/* and !*/Discussion"]] +""" +else=""" +Calendar based archives are not enabled. See [[posts]] for a full list of posts. +"""]] diff --git a/doc/examples/blog/comments.mdwn b/doc/examples/blog/comments.mdwn index 4735dea08..0b503ba01 100644 --- a/doc/examples/blog/comments.mdwn +++ b/doc/examples/blog/comments.mdwn @@ -1,3 +1,3 @@ -This page will show all comments made to posts in my [[blog|index]]. +This page will show recent comments made to posts in the [[blog|index]]. [[!inline pages="./posts/*/Discussion or internal(./posts/*/comment_*)"]] diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index 01b714fcd..b273ba1a9 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -1,9 +1,13 @@ -[[!pagestats pages="./tags/*" among="./posts/*"]] +[[!template id=note text=""" -Welcome to my blog. +* [[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] +* [[Recent_Comments|comments]] +* [[Archives]] -Have a look at the most recent posts below, or browse the tag cloud on the -right. Archives of all [[posts]] and all [[comments]] are also available. +[[!if test="enabled(calendar)" then=""" +[[!calendar pages="./posts/* and !*/Discussion"]] + +"""]] [[!inline pages="./posts/* and !*/Discussion" show="10" actions=yes rootpage="posts"]] diff --git a/doc/ikiwiki/directive/pagestats.mdwn b/doc/ikiwiki/directive/pagestats.mdwn index 68f4d2734..d0e0e7be7 100644 --- a/doc/ikiwiki/directive/pagestats.mdwn +++ b/doc/ikiwiki/directive/pagestats.mdwn @@ -4,10 +4,16 @@ This directive can generate stats about how pages link to each other. It can produce either a tag cloud, or a table counting the number of links to each page. -Here's how to use it to create a [[tag]] cloud: +Here's how to use it to create a [[tag]] cloud, with tags sized based +on frequency of use: \[[!pagestats pages="tags/*"]] +Here's how to create a list of tags, sized by use as they would be in a +cloud. + + \[[!pagestats style="list" pages="tags/*"]] + And here's how to create a table of all the pages on the wiki: \[[!pagestats style="table"]] @@ -28,4 +34,7 @@ links: \[[!pagestats style="table" show="10"]] +The optional `class` parameter can be used to control the class +of the generated tag cloud `div` or page stats `table`. + [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From d6bfe2a25ec20ea33a0537143afdfbb847e4183f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 14:32:53 -0400 Subject: don't link to ikiwiki-calendar, broken link on basewiki --- doc/ikiwiki/directive/calendar.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/calendar.mdwn b/doc/ikiwiki/directive/calendar.mdwn index 8a08081ee..198da9d51 100644 --- a/doc/ikiwiki/directive/calendar.mdwn +++ b/doc/ikiwiki/directive/calendar.mdwn @@ -45,7 +45,7 @@ An example crontab: for the whole wiki by setting `archivebase` in ikiwiki's setup file. Calendars link to pages under here, with names like "2010/04" and "2010". These pages can be automatically created using the - [[ikiwiki-calendar]] tool. + `ikiwiki-calendar` program. * `year` - The year for which the calendar is requested. Defaults to the current year. * `month` - The numeric month for which the calendar is requested, in the -- cgit v1.2.3 From baaa848f6c06b0b3a59677d3551e130c65e5fde7 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 15:04:17 -0400 Subject: CSS and templates for sidebar changed to use a class, not an id. Multiple sidebars should be possible; also, I want to add a sidebar template. --- debian/changelog | 3 ++- doc/examples/blog.mdwn | 2 +- doc/examples/blog/index.mdwn | 1 - doc/examples/blog/sidebar.mdwn | 7 ------- doc/style.css | 2 +- templates/page.tmpl | 2 +- 6 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 doc/examples/blog/sidebar.mdwn (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index c2b0c3c23..03361e6a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100410) UNRELEASED; urgency=low +ikiwiki (3.20100415) UNRELEASED; urgency=low [ Joey Hess ] * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) @@ -36,6 +36,7 @@ ikiwiki (3.20100410) UNRELEASED; urgency=low * pagestats: Use style=list to get a list of tags, scaled by use like in a tag cloud. This is useful to put in a sidebar. * Rework example blog front page. + * CSS and templates for sidebar changed to use a class, not an id. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn index b9b57b944..33637e57d 100644 --- a/doc/examples/blog.mdwn +++ b/doc/examples/blog.mdwn @@ -14,7 +14,7 @@ Some additional configuration you might want to do: \[[!tag tags/life]] * Enable the [[sidebar|plugins/sidebar]] plugin to get a sidebar listing all - the categories you've tagged posts with. + the categories you've tagged posts with, and other navigation links. * Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud to display on the [[index]]. diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index b273ba1a9..da95e7660 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -4,7 +4,6 @@ * [[Recent_Comments|comments]] * [[Archives]] -[[!if test="enabled(calendar)" then=""" [[!calendar pages="./posts/* and !*/Discussion"]] """]] diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn deleted file mode 100644 index a9fac388e..000000000 --- a/doc/examples/blog/sidebar.mdwn +++ /dev/null @@ -1,7 +0,0 @@ -Example sidebar - -* [[Blog|index]] -* [[Archive|posts]] - -Categories: -[[!map pages="./tags/* and !*/Discussion"]] diff --git a/doc/style.css b/doc/style.css index 317d4c7aa..af0fc230c 100644 --- a/doc/style.css +++ b/doc/style.css @@ -228,7 +228,7 @@ div.recentchanges { .bigPC { font-size: 115%; } .biggestPC { font-size: 130%; } -#sidebar { +.sidebar { line-height: 3ex; width: 20ex; float: right; diff --git a/templates/page.tmpl b/templates/page.tmpl index c24f88823..7e850a56b 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -92,7 +92,7 @@ </div> <!-- .pageheader --> <TMPL_IF SIDEBAR> -<div id="sidebar"> +<div class="sidebar"> <TMPL_VAR SIDEBAR> </div> </TMPL_IF> -- cgit v1.2.3 From 3fbc9e411eec34361e711813e09a516e1fb62e03 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 15:38:23 -0400 Subject: increase sidebar width from 20 to 30 ex This makes it big enough to fit a month calendar. --- doc/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/style.css b/doc/style.css index af0fc230c..80b76b26c 100644 --- a/doc/style.css +++ b/doc/style.css @@ -230,7 +230,7 @@ div.recentchanges { .sidebar { line-height: 3ex; - width: 20ex; + width: 30ex; float: right; margin-left: 40px; margin-bottom: 40px; -- cgit v1.2.3 From 5143d790b023f7f04ebdf694225b2946af676503 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 16:08:33 -0400 Subject: sidebar styling improvements Added a visible border; tuned down the whitespace/borders. Note the use of the -1 pixel margin-top -- this makes the sidebar appear to hang down from the line under the actions at the top of the page. --- doc/style.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/style.css b/doc/style.css index 80b76b26c..bdd4bb466 100644 --- a/doc/style.css +++ b/doc/style.css @@ -229,13 +229,14 @@ div.recentchanges { .biggestPC { font-size: 130%; } .sidebar { - line-height: 3ex; width: 30ex; float: right; - margin-left: 40px; - margin-bottom: 40px; - padding: 2ex 2ex; + margin-left: 4px; + margin-bottom: 4px; + margin-top: -1px; + padding: 0ex 2ex; background: white; + border: 2px solid black; color: black !important; } -- cgit v1.2.3 From 843ce484fc9a65a814be62ab9617fc461640fbeb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 16:21:06 -0400 Subject: update --- doc/examples/blog.mdwn | 3 --- doc/examples/blog/index.mdwn | 18 ++++++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/examples/blog.mdwn b/doc/examples/blog.mdwn index 33637e57d..8775c01ab 100644 --- a/doc/examples/blog.mdwn +++ b/doc/examples/blog.mdwn @@ -13,9 +13,6 @@ Some additional configuration you might want to do: example of how to tag a post is: \[[!tag tags/life]] -* Enable the [[sidebar|plugins/sidebar]] plugin to get a sidebar listing all - the categories you've tagged posts with, and other navigation links. - * Enable the [[pagestats|plugins/pagestats]] plugin to get a tag cloud to display on the [[index]]. diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index da95e7660..062c71f2e 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -1,16 +1,14 @@ -[[!template id=note text=""" +[[!inline pages="./posts/* and !*/Discussion" show="10" +actions=yes rootpage="posts"]] -* [[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] -* [[Recent_Comments|comments]] -* [[Archives]] +[[!sidebar """ +[[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] -[[!calendar pages="./posts/* and !*/Discussion"]] +[[Recent Comments|comments]] -"""]] +[[Archives]] -[[!inline pages="./posts/* and !*/Discussion" show="10" -actions=yes rootpage="posts"]] - ----- +[[!calendar pages="./posts/* and !*/Discussion"]] +"""]] This blog is powered by [ikiwiki](http://ikiwiki.info). -- cgit v1.2.3 From 358fa953e189d6f8a7925be8533fe7b7c5699503 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 16:40:01 -0400 Subject: sidebar: Now a sidebar directive can be used to override the sidebar shown on a page. --- IkiWiki/Plugin/sidebar.pm | 42 +++++++++++++++++++++++++++++++++++++- debian/changelog | 2 ++ doc/ikiwiki/directive/sidebar.mdwn | 14 +++++++++++++ doc/plugins/sidebar.mdwn | 17 +++++++-------- 4 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 doc/ikiwiki/directive/sidebar.mdwn (limited to 'doc') diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index 41812e1c1..d63cb5246 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -10,6 +10,7 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "sidebar", call => \&getsetup); + hook(type => "preprocess", id => "sidebar", call => \&preprocess); hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate); } @@ -21,9 +22,39 @@ sub getsetup () { }, } +my %pagesidebar; + +sub preprocess (@) { + my %params=@_; + my $content=shift; + shift; + + if (! defined $content) { + error(gettext("sidebar content not specified")); + } + + my $page=$params{page}; + return "" unless $page eq $params{destpage}; + my $file = $pagesources{$page}; + my $type = pagetype($file); + + $pagesidebar{$page}= + IkiWiki::htmlize($page, $page, $type, + IkiWiki::linkify($page, $page, + IkiWiki::preprocess($page, $page, + IkiWiki::filter($page, $page, $content)))); + + return ""; +} + +my $oldfile; +my $oldcontent; + sub sidebar_content ($) { my $page=shift; + return $pagesidebar{$page} if exists $pagesidebar{$page}; + my $sidebar_page=bestlink($page, "sidebar") || return; my $sidebar_file=$pagesources{$sidebar_page} || return; my $sidebar_type=pagetype($sidebar_file); @@ -34,7 +65,16 @@ sub sidebar_content ($) { # currently requires a wiki rebuild. add_depends($page, $sidebar_page); - my $content=readfile(srcfile($sidebar_file)); + my $content; + if (defined $oldfile && $sidebar_file eq $oldfile) { + $content=$oldcontent; + } + else { + $content=readfile(srcfile($sidebar_file)); + $oldcontent=$content; + $oldfile=$sidebar_file; + } + return unless length $content; return IkiWiki::htmlize($sidebar_page, $page, $sidebar_type, IkiWiki::linkify($sidebar_page, $page, diff --git a/debian/changelog b/debian/changelog index 03361e6a0..267a2fd7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,8 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low in a tag cloud. This is useful to put in a sidebar. * Rework example blog front page. * CSS and templates for sidebar changed to use a class, not an id. + * sidebar: Now a sidebar directive can be used to override the sidebar + shown on a page. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn new file mode 100644 index 000000000..46f016747 --- /dev/null +++ b/doc/ikiwiki/directive/sidebar.mdwn @@ -0,0 +1,14 @@ +The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin. + +This directive specifies a custom sidebar to display on the page, instead +of any sidebar that is displayed globally. + +## examples + + \[[!sidebar """ + This is my custom sidebar for this page. + + \[[!calendar pages="posts/*"]] + """]] + +[[!meta robots="noindex, follow"]] diff --git a/doc/plugins/sidebar.mdwn b/doc/plugins/sidebar.mdwn index 4e356d65a..cd0f0ecf1 100644 --- a/doc/plugins/sidebar.mdwn +++ b/doc/plugins/sidebar.mdwn @@ -10,15 +10,16 @@ Typically this will be a page in the root of the wiki, but it can also be a [[plugins/sidebar|plugins/sidebar]], will be treated as a sidebar for the [[plugins]] page, and of all of its SubPages, if the plugin is enabled. -Note that to disable a sidebar for a [[ikiwiki/SubPage]] of a page that has -a sidebar, you can create a sidebar page that is completely empty. This -will turn off the sidebar altogether. +There is also a [[ikiwiki/directive/sidebar]] directive that can be used +to provide a custom sidebar content for a page. -Warning: Any change to the sidebar will cause a rebuild of the whole wiki, -since every page includes a copy that has to be updated. This can -especially be a problem if the sidebar includes an [[ikiwiki/directive/inline]] -directive, since any changes to pages inlined into the sidebar -will change the sidebar and cause a full wiki rebuild. +---- + +Warning: Any change to the sidebar page will cause a rebuild of the whole +wiki, since every page includes a copy that has to be updated. This can +especially be a problem if the sidebar includes an +[[ikiwiki/directive/inline]] directive, since any changes to pages inlined +into the sidebar will change the sidebar and cause a full wiki rebuild. Instead, if you include a [[ikiwiki/directive/map]] directive on the sidebar, and it does not use the `show` parameter, only adding or removing pages -- cgit v1.2.3 From 37a0c2d40beaba9ae050a4eddc925b910d739736 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 16:55:20 -0400 Subject: add note if ikiwiki-calendar needs to be run --- doc/examples/blog/archives.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/examples/blog/archives.mdwn b/doc/examples/blog/archives.mdwn index 14686cdfe..d07b73b74 100644 --- a/doc/examples/blog/archives.mdwn +++ b/doc/examples/blog/archives.mdwn @@ -1,7 +1,8 @@ -[[!if test="enabled(calendar)" then=""" +[[!if test="archives/*" then=""" Browse through blog archives by year: [[!map pages="./archives/* and !./archives/*/* and !*/Discussion"]] """ else=""" -Calendar based archives are not enabled. See [[posts]] for a full list of posts. +You need to use the `ikiwiki-calendar` program to generate calendar-based +archive pages. """]] -- cgit v1.2.3 From 1f7175e891f87c350decc1ec821bebb5adc22c2a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 17:31:50 -0400 Subject: sidebar: Add global_sidebars setting. --- IkiWiki/Plugin/sidebar.pm | 9 +++++++++ debian/changelog | 1 + doc/ikiwiki/directive/sidebar.mdwn | 4 ++-- doc/plugins/sidebar.mdwn | 8 +++++--- 4 files changed, 17 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index d63cb5246..1b302dcf9 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -20,6 +20,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + global_sidebars => { + type => "boolean", + examples => 1, + description => "show sidebar page on all pages?" + safe => 1, + rebuild => 1, + }, } my %pagesidebar; @@ -55,6 +62,8 @@ sub sidebar_content ($) { return $pagesidebar{$page} if exists $pagesidebar{$page}; + return if defined $config{global_sidebars} && !$config{global_sidebars}; + my $sidebar_page=bestlink($page, "sidebar") || return; my $sidebar_file=$pagesources{$sidebar_page} || return; my $sidebar_type=pagetype($sidebar_file); diff --git a/debian/changelog b/debian/changelog index af19f4a00..c379253d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -40,6 +40,7 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * sidebar: Now a sidebar directive can be used to override the sidebar shown on a page. * Enable calendar and sidebar in auto-blog.setup. + * sidebar: Add global_sidebars setting. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn index 46f016747..34f078672 100644 --- a/doc/ikiwiki/directive/sidebar.mdwn +++ b/doc/ikiwiki/directive/sidebar.mdwn @@ -1,7 +1,7 @@ The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin. -This directive specifies a custom sidebar to display on the page, instead -of any sidebar that is displayed globally. +This directive specifies a custom sidebar to display on the page, +overriding any sidebar that is displayed globally. ## examples diff --git a/doc/plugins/sidebar.mdwn b/doc/plugins/sidebar.mdwn index cd0f0ecf1..012733456 100644 --- a/doc/plugins/sidebar.mdwn +++ b/doc/plugins/sidebar.mdwn @@ -1,9 +1,11 @@ [[!template id=plugin name=sidebar author="Tuomo Valkonen"]] [[!tag type/chrome]] -If this plugin is enabled, then a sidebar is added to pages in the wiki. -The content of the sidebar is simply the content of a page named -"sidebar" (ie, create a "sidebar.mdwn"). +This plugin allows adding a sidebar to pages in the wiki. + +By default, and unless the `global_sidebars` setting is turned off, +a sidebar is added to all pages in the wiki. The content of the sidebar +is simply the content of a page named "sidebar" (ie, create a "sidebar.mdwn"). Typically this will be a page in the root of the wiki, but it can also be a [[ikiwiki/SubPage]]. In fact, this page, -- cgit v1.2.3 From d63e043f0abf642ff4048cc20c6caf03db3e55fb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 17:38:13 -0400 Subject: allow sidebar directive to enable use of sidebar page This way, the example blog always has a sidebar on the index page, but not the overhead of sidebars on all the other pages. And if a user wants to, they can enable global_sidebars to switch to sidebars on every page. --- IkiWiki/Plugin/sidebar.pm | 33 ++++++++++++++++++--------------- doc/examples/blog/index.mdwn | 10 +--------- doc/examples/blog/sidebar.mdwn | 9 +++++++++ doc/ikiwiki/directive/sidebar.mdwn | 8 +++++++- 4 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 doc/examples/blog/sidebar.mdwn (limited to 'doc') diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index 1b302dcf9..f706480ca 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -23,7 +23,7 @@ sub getsetup () { global_sidebars => { type => "boolean", examples => 1, - description => "show sidebar page on all pages?" + description => "show sidebar page on all pages?", safe => 1, rebuild => 1, }, @@ -36,20 +36,22 @@ sub preprocess (@) { my $content=shift; shift; - if (! defined $content) { - error(gettext("sidebar content not specified")); - } - my $page=$params{page}; return "" unless $page eq $params{destpage}; - my $file = $pagesources{$page}; - my $type = pagetype($file); - - $pagesidebar{$page}= - IkiWiki::htmlize($page, $page, $type, - IkiWiki::linkify($page, $page, - IkiWiki::preprocess($page, $page, - IkiWiki::filter($page, $page, $content)))); + + if (! defined $content) { + $pagesidebar{$page}=undef; + } + else { + my $file = $pagesources{$page}; + my $type = pagetype($file); + + $pagesidebar{$page}= + IkiWiki::htmlize($page, $page, $type, + IkiWiki::linkify($page, $page, + IkiWiki::preprocess($page, $page, + IkiWiki::filter($page, $page, $content)))); + } return ""; } @@ -60,9 +62,10 @@ my $oldcontent; sub sidebar_content ($) { my $page=shift; - return $pagesidebar{$page} if exists $pagesidebar{$page}; + return $pagesidebar{$page} if defined $pagesidebar{$page}; - return if defined $config{global_sidebars} && !$config{global_sidebars}; + return if ! exists $pagesidebar{$page} && + defined $config{global_sidebars} && ! $config{global_sidebars}; my $sidebar_page=bestlink($page, "sidebar") || return; my $sidebar_file=$pagesources{$sidebar_page} || return; diff --git a/doc/examples/blog/index.mdwn b/doc/examples/blog/index.mdwn index 062c71f2e..a22c40c72 100644 --- a/doc/examples/blog/index.mdwn +++ b/doc/examples/blog/index.mdwn @@ -1,14 +1,6 @@ [[!inline pages="./posts/* and !*/Discussion" show="10" actions=yes rootpage="posts"]] -[[!sidebar """ -[[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] - -[[Recent Comments|comments]] - -[[Archives]] - -[[!calendar pages="./posts/* and !*/Discussion"]] -"""]] +[[!sidebar]] This blog is powered by [ikiwiki](http://ikiwiki.info). diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn new file mode 100644 index 000000000..f24a8e57a --- /dev/null +++ b/doc/examples/blog/sidebar.mdwn @@ -0,0 +1,9 @@ +[[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] + +[[Recent Comments|comments]] + +[[Archives]] + +[[!if "enabled(calendar)" then=""" +[[!calendar pages="./posts/* and !*/Discussion"]] +"""]] diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn index 34f078672..401d7c786 100644 --- a/doc/ikiwiki/directive/sidebar.mdwn +++ b/doc/ikiwiki/directive/sidebar.mdwn @@ -1,8 +1,12 @@ The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin. -This directive specifies a custom sidebar to display on the page, +This directive can specify a custom sidebar to display on the page, overriding any sidebar that is displayed globally. +If no custom sidebar content is specified, it forces the sidebar page to +be used as the sidebar, even if the `global_sidebars` setting has been +used to disable use of the sidebar page by default. + ## examples \[[!sidebar """ @@ -11,4 +15,6 @@ overriding any sidebar that is displayed globally. \[[!calendar pages="posts/*"]] """]] + \[[!sidebar]] + [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From 4bbbd77a48f9c3188c97637d4d4b0d503fc1738e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 17:49:32 -0400 Subject: typo --- doc/examples/blog/sidebar.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn index f24a8e57a..1d01f0a6c 100644 --- a/doc/examples/blog/sidebar.mdwn +++ b/doc/examples/blog/sidebar.mdwn @@ -4,6 +4,6 @@ [[Archives]] -[[!if "enabled(calendar)" then=""" +[[!if test="enabled(calendar)" then=""" [[!calendar pages="./posts/* and !*/Discussion"]] """]] -- cgit v1.2.3 From 4c6f5a48bcfc2462a915387515bfa39b9239a7da Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 17:50:43 -0400 Subject: fix sidebar directive parameter handling --- IkiWiki/Plugin/sidebar.pm | 6 ++---- doc/ikiwiki/directive/sidebar.mdwn | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index f706480ca..808f0bed2 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -33,13 +33,11 @@ my %pagesidebar; sub preprocess (@) { my %params=@_; - my $content=shift; - shift; my $page=$params{page}; return "" unless $page eq $params{destpage}; - if (! defined $content) { + if (! defined $params{content}) { $pagesidebar{$page}=undef; } else { @@ -50,7 +48,7 @@ sub preprocess (@) { IkiWiki::htmlize($page, $page, $type, IkiWiki::linkify($page, $page, IkiWiki::preprocess($page, $page, - IkiWiki::filter($page, $page, $content)))); + IkiWiki::filter($page, $page, $params{content})))); } return ""; diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn index 401d7c786..599695d22 100644 --- a/doc/ikiwiki/directive/sidebar.mdwn +++ b/doc/ikiwiki/directive/sidebar.mdwn @@ -9,7 +9,7 @@ used to disable use of the sidebar page by default. ## examples - \[[!sidebar """ + \[[!sidebar content=""" This is my custom sidebar for this page. \[[!calendar pages="posts/*"]] -- cgit v1.2.3 From f41ebb8862b7602afea6f8ecfd074f11407165fc Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 17:56:36 -0400 Subject: reorg --- doc/examples/blog/sidebar.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn index 1d01f0a6c..de0feba9e 100644 --- a/doc/examples/blog/sidebar.mdwn +++ b/doc/examples/blog/sidebar.mdwn @@ -1,9 +1,9 @@ -[[Tags]]: [[!pagestats style="list" pages="./tags/*" among="./posts/*"]] +[[!if test="enabled(calendar)" then=""" +[[!calendar pages="./posts/* and !*/Discussion"]] +"""]] [[Recent Comments|comments]] [[Archives]] -[[!if test="enabled(calendar)" then=""" -[[!calendar pages="./posts/* and !*/Discussion"]] -"""]] +[[Tags]]: [[!pagestats style="list" pages="* and !smileys/*"]] -- cgit v1.2.3 From a0a472d57716466fba9d8f39e7586b3ca0d17578 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 17:57:35 -0400 Subject: fix tagspec --- doc/examples/blog/sidebar.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/examples/blog/sidebar.mdwn b/doc/examples/blog/sidebar.mdwn index de0feba9e..5c1f17723 100644 --- a/doc/examples/blog/sidebar.mdwn +++ b/doc/examples/blog/sidebar.mdwn @@ -6,4 +6,5 @@ [[Archives]] -[[Tags]]: [[!pagestats style="list" pages="* and !smileys/*"]] +[[Tags]]: +[[!pagestats style="list" pages="./tags/*" among="./posts/*"]] -- cgit v1.2.3 From 425f6a8de2ed66b934c16c102456b15da4ff5a14 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 19:21:01 -0400 Subject: reduce border --- doc/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/style.css b/doc/style.css index bdd4bb466..44e06ae4f 100644 --- a/doc/style.css +++ b/doc/style.css @@ -236,7 +236,7 @@ div.recentchanges { margin-top: -1px; padding: 0ex 2ex; background: white; - border: 2px solid black; + border: 1px solid black; color: black !important; } -- cgit v1.2.3 From f0ed76441d94c9bec9ebc1314b81301fe179a7fc Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 15 Apr 2010 23:36:42 +0000 Subject: some comments about this and autoindex --- ...auto-create_tag_pages_according_to_a_template.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 07b570b1b..7631e6fc8 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -211,6 +211,25 @@ wrong direction. >> [981400177d68a279f485727be3f013e68f0bf691][]. --[[David_Riebenbauer]] +>>> This doesn't seem to have all the refinements that autoindex has: +>>> +>>> * `autoindex` attaches the record of deletions off the `index` page, which +>>> is (nearly) guaranteed to exist; this one attaches the record of +>>> deletions to the deleted page's page state. +>>> +>>> * `autoindex` forgets that a page was deleted when that page is +>>> re-created +>>> +>>> * `autoindex` forgets that a page was deleted when it's no longer needed +>>> anyway (this may be harder for `autotag`?) +>>> +>>> It'd probably be an interesting test of the core change to port +>>> `autoindex` to use it? (Adding the file to the RCS would be +>>> necessary to get parity with `autoindex`.) --[[smcv]] + +> Regarding the call from `IkiWiki.pm` to `Render.pm`, wouldn't this be +> quite easy to solve by moving `verify_src_file` to IkiWiki.pm? --[[smcv]] + [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 (commitdiff for f58f3e1bec41ccf9316f37b014ce0b373c8e49e1) -- cgit v1.2.3 From b5e7f7a67f9893c7083afe3594c4a274c1b96062 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 15 Apr 2010 23:39:02 +0000 Subject: slight clarification --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 7631e6fc8..6118cb014 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -213,9 +213,10 @@ wrong direction. >>> This doesn't seem to have all the refinements that autoindex has: >>> ->>> * `autoindex` attaches the record of deletions off the `index` page, which +>>> * `autoindex` attaches the record of deletions to the `index` page, which >>> is (nearly) guaranteed to exist; this one attaches the record of ->>> deletions to the deleted page's page state. +>>> deletions to the deleted page's page state. Won't that tend to result +>>> in losing the record along with the deleted page? >>> >>> * `autoindex` forgets that a page was deleted when that page is >>> re-created -- cgit v1.2.3 From 142e025ae471c91e68a23476f700df0b8ad6b31d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Thu, 15 Apr 2010 20:12:03 -0400 Subject: calendar: Improved display of arrows. --- IkiWiki/Plugin/calendar.pm | 21 +++++++++++---------- debian/changelog | 1 + doc/plugins/calendar.mdwn | 2 ++ doc/style.css | 8 ++++++++ 4 files changed, 22 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index 0f0e9518a..aeb5f3d29 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -164,11 +164,11 @@ sub format_month (@) { # Start producing the month calendar $calendar=<<EOF; <table class="month-calendar"> - <caption class="month-calendar-head"> - $purl - $url - $nurl - </caption> + <tr> + <th class="month-calendar-arrow">$purl</th> + <th class="month-calendar-head" colspan="5">$url</th> + <th class="month-calendar-arrow">$nurl</th> + </tr> <tr> EOF @@ -312,13 +312,14 @@ sub format_year (@) { add_depends($params{page}, "$archivebase/$nyear", deptype("presence")); # Start producing the year calendar + my $m=$params{months_per_row}-2; $calendar=<<EOF; <table class="year-calendar"> - <caption class="year-calendar-head"> - $purl - $url - $nurl - </caption> + <tr> + <th class="year-calendar-arrow">$purl</th> + <th class="year-calendar-head" colspan="$m">$url</th> + <th class="year-calendar-arrow">$nurl</th> + </tr> <tr> <th class="year-calendar-subhead" colspan="$params{months_per_row}">Months</th> </tr> diff --git a/debian/changelog b/debian/changelog index e4056fdc6..737d73655 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,7 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * sidebar: Add global_sidebars setting. * conditional: Fix bug that forced "all" mode off by default. * calendarmonth.tmpl: The month calendar is now put in a sidebar. + * calendar: Improved display of arrows. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index 49fd90627..76e718a3b 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -14,6 +14,7 @@ customization. * `month-calendar` - The month calendar as a whole. * `month-calendar-head` - The head of the month calendar (ie,"March"). +* `month-calendar-arrow` - Arrow pointing to previous/next month. * `month-calendar-day-head` - A column head in the month calendar (ie, a day-of-week abbreviation). * `month-calendar-day-noday`, `month-calendar-day-link`, @@ -27,6 +28,7 @@ customization. weekends. * `year-calendar` - The year calendar as a whole. * `year-calendar-head` - The head of the year calendar (ie, "2007"). +* `year-calendar-arrow` - Arrow pointing to previous/next year. * `year-calendar-subhead` - For example, "Months". * `year-calendar-month-link`, `year-calendar-month-nolink`, `year-calendar-month-future`, `year-calendar-this-month` - The month diff --git a/doc/style.css b/doc/style.css index 44e06ae4f..7ffcf9fe2 100644 --- a/doc/style.css +++ b/doc/style.css @@ -431,3 +431,11 @@ pre.hl { color:#000000; background-color:#ffffff; } /* For the calendar plugin. */ .month-calendar-day-this-day { background-color: #eee; } .year-calendar-this-month { background-color: #eee; } +.month-calendar-arrow A:link, +.year-calendar-arrow A:link, +.month-calendar-arrow A:visited, +.year-calendar-arrow A:visited { + text-decoration: none; + font-weight: normal; + font-size: 150%; +} -- cgit v1.2.3 From 208a77a977615b3e285d08b33345daca7072432e Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Fri, 16 Apr 2010 03:41:25 +0000 Subject: response --- doc/todo/Multiple_categorization_namespaces.mdwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index 15b97e480..eb1f58cfa 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -38,8 +38,16 @@ and the tags would appear at the bottom of the post, the Rubrica next to the tit >> I had thought about the `\[[!tag type1=value1 type2=value2]]` syntax myself, but ultimately decided against it for a number of reasons, most importantly the fact that (1) it's harder to type, (2) it's harder to spot errors in the tag types (so for example if one misspelled `categoria` as `categorica`, he might not notice it as quickly as seeing the un-parsed `\[[!categorica ]]` directive in the output html) and (3) it encourages collapsing possibly unrelated metadata together (for example, I would never consider putting the categoria information together with the rubrica one; of course with your syntax it's perfectly possible to keep them separate as well). ->> Point (2) may be considered a downside as well as an upside, depending on perspective, of course. And it would be possible to have a set of predefined tag types to match against, like in my tagtype directive approach but with your syntax. Point (3) is of course entirely in the hands of the user, but that's exactly what syntax should be about. There is nothing functionally wrong with e.g. `\[[!meta tag=sometag author=someauthor title=sometitle rubrica=somecolumn]]`, but I honestly find it horrible. +>> Point (2) may be considered a downside as well as an upside, depending on perspective, of course. And it would be possible to have a set of predefined tag types to match against, like in my tagtype directive approach but with your syntax. + +>>> You seem to have answered your own objections already. -- K.A. + +>>Point (3) is of course entirely in the hands of the user, but that's exactly what syntax should be about. There is nothing functionally wrong with e.g. `\[[!meta tag=sometag author=someauthor title=sometitle rubrica=somecolumn]]`, but I honestly find it horrible. + +>>> So, really, point 3 comes down to differing aesthetics. -- K.A. >> A solution could be to allow both syntaxes, getting to have for example `\[[!sometagtype "blah"]]` as a shortcut for `\[[!tag sometagtype="blah"]]` (or, in the more general case, `\[[!somefieldname "blah"]]` as a shortcut for `\[[!meta fieldname="blah"]]`). >> I would like to point out however that there are some functional differences between categorization metadata vs other metadata that might suggest to keep fields and (my extended) tags separate. For examples, in feeds you'd want all categorization metadata to fall in one place, with some appropriate manipulation (which I still have to implement, by the way), while things like author or title would go to the corresponding feed item properties. Although it all would be possible with appropriate report or template juggling, having such default metadata handled natively looks like a bonus to me. + +>>> Whereas I prefer being able to control such things with templates, because it gives more flexibility AND control. - K.A. -- cgit v1.2.3 From 5c263623c2446191332088a29fda4e045cc06f1e Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Fri, 16 Apr 2010 17:19:44 +0200 Subject: answer about the `%pagestate` of autopages. --- ...o-create_tag_pages_according_to_a_template.mdwn | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 6118cb014..ca3475149 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -217,20 +217,40 @@ wrong direction. >>> is (nearly) guaranteed to exist; this one attaches the record of >>> deletions to the deleted page's page state. Won't that tend to result >>> in losing the record along with the deleted page? ->>> + +>>>> This is probably on of the harder things to do, 'cause there are (most of the +>>>> time) several pages that are responsible for the creation of a single tag page. +>>>> Of course I could attach the info to all of them. + +>>>> With current behaviour I think the information in `%pagestate` is kept around +>>>> regardless whether the corresponding page exists or not. +>>>> --[[David_Riebenbauer]] + >>> * `autoindex` forgets that a page was deleted when that page is >>> re-created ->>> + +>>>> Yes, I forgot about that and that is a bug. I'll fix that. +>>>> --[[David_Riebenbauer]] + >>> * `autoindex` forgets that a page was deleted when it's no longer needed >>> anyway (this may be harder for `autotag`?) ->>> + +>>>> I don't think so. AFAIK ikiwiki can detect whether there are taglinks to a page +>>>> anyway, so it should be quite easy. I'll try to implement that too. +>>>> --[[David_Riebenbauer]] + >>> It'd probably be an interesting test of the core change to port >>> `autoindex` to use it? (Adding the file to the RCS would be >>> necessary to get parity with `autoindex`.) --[[smcv]] +>>>> Good suggestion. Adding the files to RCS is on my todo list anyway. +>>>> --[[David_Riebenbauer]] + > Regarding the call from `IkiWiki.pm` to `Render.pm`, wouldn't this be > quite easy to solve by moving `verify_src_file` to IkiWiki.pm? --[[smcv]] +>> True. I'll do that. --[[David_Riebenbauer]] + [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 (commitdiff for f58f3e1bec41ccf9316f37b014ce0b373c8e49e1) -- cgit v1.2.3 From e26ac520bffe39e400a037aa35b68f617991da2b Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Fri, 16 Apr 2010 17:21:54 +0200 Subject: typo --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index ca3475149..c4d9538a1 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -126,7 +126,7 @@ is not satisfied for the newly created tag page. I shall put debug msgs into Ren --- -I've made another attempt at fixiing this +I've made another attempt at fixing this The current progress can be found at my [git repository][gitweb] on branch `autotag`: -- cgit v1.2.3 From 18b39ff9757a0e6bc8672a2453411676a09bffea Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 16 Apr 2010 15:31:31 +0000 Subject: try to clarify --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index c4d9538a1..b8b0186b4 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -226,6 +226,11 @@ wrong direction. >>>> regardless whether the corresponding page exists or not. >>>> --[[David_Riebenbauer]] +>>>>> Sorry, I'll try to be clearer: `autoindex` hard-codes that the [[index]] page +>>>>> of the entire wiki is the one responsible for storing the page state. That +>>>>> page isn't responsible for the creation of the tag page, it's just an +>>>>> arbitrary page that's (more or less) guaranteed to exist. --[[smcv]] + >>> * `autoindex` forgets that a page was deleted when that page is >>> re-created -- cgit v1.2.3 From 49be30eae88b4a027becc3e67bc321e0bf89840f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Apr 2010 12:08:12 -0400 Subject: clarify re %pagestate persistence --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index b8b0186b4..1259552bf 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -231,6 +231,11 @@ wrong direction. >>>>> page isn't responsible for the creation of the tag page, it's just an >>>>> arbitrary page that's (more or less) guaranteed to exist. --[[smcv]] +>>>>> I don't like that [[plugins/autoindex]] has to do that, +>>>>> but `%pagestate` values are only stored for pages that exist, +>>>>> so it was necessary. (Another way to look at this is that +>>>>> `%pagestate` is not the ideal data structure.) --[[Joey]] + >>> * `autoindex` forgets that a page was deleted when that page is >>> re-created -- cgit v1.2.3 From a70c2518af7f48036a21d04c5b4070f3ea96002c Mon Sep 17 00:00:00 2001 From: David Riebenbauer <davrieb@liegesta.at> Date: Fri, 16 Apr 2010 18:16:47 +0200 Subject: answer to clarification. --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 1259552bf..0ae025a13 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -236,6 +236,8 @@ wrong direction. >>>>> so it was necessary. (Another way to look at this is that >>>>> `%pagestate` is not the ideal data structure.) --[[Joey]] +>>>>> Ok, now I know what you mean. --[[David_Riebenbauer]] + >>> * `autoindex` forgets that a page was deleted when that page is >>> re-created -- cgit v1.2.3 From 720522859806d9cf50231ed6aa28085754713701 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Fri, 16 Apr 2010 17:51:51 +0000 Subject: ... and indeed there is a better way to store it --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 0ae025a13..8fc97578c 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -236,6 +236,9 @@ wrong direction. >>>>> so it was necessary. (Another way to look at this is that >>>>> `%pagestate` is not the ideal data structure.) --[[Joey]] +>>>>>> Aha! Having looked at [[plugins/write]] again, it turns out that what this +>>>>>> feature should really use is `%wikistate`, I think? :-) --[[smcv]] + >>>>> Ok, now I know what you mean. --[[David_Riebenbauer]] >>> * `autoindex` forgets that a page was deleted when that page is -- cgit v1.2.3 From ff5b73163f97110e83dd777cf7e14debebf85288 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Fri, 16 Apr 2010 18:20:29 +0000 Subject: Proposal for tags/meta/field coalescing --- doc/todo/Multiple_categorization_namespaces.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index eb1f58cfa..ee3bbd88d 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -51,3 +51,22 @@ and the tags would appear at the bottom of the post, the Rubrica next to the tit >> I would like to point out however that there are some functional differences between categorization metadata vs other metadata that might suggest to keep fields and (my extended) tags separate. For examples, in feeds you'd want all categorization metadata to fall in one place, with some appropriate manipulation (which I still have to implement, by the way), while things like author or title would go to the corresponding feed item properties. Although it all would be possible with appropriate report or template juggling, having such default metadata handled natively looks like a bonus to me. >>> Whereas I prefer being able to control such things with templates, because it gives more flexibility AND control. - K.A. + +>>>> Flexibility and control is good for tuning and power-usage, but sensible defaults are a must for a platform to be usable out of the box without much intervention. Moreover, there's a possible problem with what kind of data must be passed over to templates. + +Aside from the name of the plugin (and thus of the main directive), which could be `tag`, `meta`, `field` or whatever (maybe extending `meta` would be the most sensible choice), the features we want are + + 1. allow multiple values per type/attribute/field/whatever (fields currently only allows one) + 2. allow both hidden and visible references (à la tag vs taglink) + 3. allow each type/attribute/field to be exposed under multiple queries (e.g. tags and categories; this is mostly important for backwards compatibility, not sure if it might have other uses too) + 4. allow arbitrary types/attributes/fields/whatever (even 'undefined' ones) + +Each type/attribute/field/whatever (predefined, user-defined, arbitrary) would thus have the following parameters: + + * `directive` : the name of the directive that can be used to set the value as a hidden reference; we can discuss whether, for pre- or user-defined types, it being undef means no directive or a default directive matching the attribute name would be defined. + * `linkdirective` : the name of the directive that can be used for a visible reference; no such directive would be defined by default + * `linktype` : link type for (hidden and visible) references + * `linkbase` : akin to the tagbase parameter + * `queries` : list of template queries this type/attribute/field/whatever is exposed to + +Where this approach is limiting is on the kind of data that is passed to (template) queries. The value of the metadata fields might need some massaging (e.g. compare how tags are passed to tags queries vs cateogires queries). I have problems on picturing an easy way to make this possible user-side (i.e. via templates and not in Perl modules). Suggestions welcome. -- cgit v1.2.3 From b14f84c4acccbc8450a9102b3b647013989b27bb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Apr 2010 17:02:29 -0400 Subject: --gettime revamp * Rename --getctime to --gettime. (The old name still works for backwards compatability.) * --gettime now also looks up last modification time. * Add rcs_getmtime to plugin API; currently only implemented for git. --- IkiWiki.pm | 8 +++++-- IkiWiki/Plugin/bzr.pm | 5 +++++ IkiWiki/Plugin/cvs.pm | 5 +++++ IkiWiki/Plugin/darcs.pm | 5 +++++ IkiWiki/Plugin/git.pm | 5 +++++ IkiWiki/Plugin/mercurial.pm | 5 +++++ IkiWiki/Plugin/monotone.pm | 5 +++++ IkiWiki/Plugin/norcs.pm | 7 +++++- IkiWiki/Plugin/svn.pm | 5 +++++ IkiWiki/Plugin/tla.pm | 5 +++++ IkiWiki/Render.pm | 18 +++++++++++++--- debian/changelog | 5 +++++ .../How_does_ikiwiki_remember_times__63__.mdwn | 25 ++++++---------------- ...old_repository_to_new_ikiwiki_system__63__.mdwn | 4 ---- doc/plugins/write.mdwn | 7 ++++++ doc/rcs.mdwn | 8 +++++-- doc/tips/Importing_posts_from_Wordpress.mdwn | 2 +- doc/tips/inside_dot_ikiwiki/discussion.mdwn | 7 +++--- doc/todo/auto_getctime_on_fresh_build.mdwn | 8 +++++-- doc/usage.mdwn | 10 ++++----- ikiwiki.in | 3 ++- mtime-to-git | 14 ------------ 22 files changed, 109 insertions(+), 57 deletions(-) delete mode 100755 mtime-to-git (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1730e476a..7655dada5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -440,10 +440,10 @@ sub getsetup () { safe => 0, rebuild => 0, }, - getctime => { + gettime => { type => "internal", default => 0, - description => "running in getctime mode", + description => "running in gettime mode", safe => 0, rebuild => 0, }, @@ -1790,6 +1790,10 @@ sub rcs_getctime ($) { $hooks{rcs}{rcs_getctime}{call}->(@_); } +sub rcs_getmtime ($) { + $hooks{rcs}{rcs_getmtime}{call}->(@_); +} + sub rcs_receive () { $hooks{rcs}{rcs_receive}{call}->(); } diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 0efc26b49..f79ca7c8f 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -306,4 +307,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for bzr\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 26a3e9dd2..360d97249 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -49,6 +49,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub genwrapper () { @@ -485,4 +486,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for cvs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index bc8394b90..c1d6661d3 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub silentsystem (@) { @@ -427,4 +428,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for darcs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b02f4a5ed..86d80186f 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -25,6 +25,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); hook(type => "rcs", id => "rcs_receive", call => \&rcs_receive); } @@ -634,6 +635,10 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for git\n"; # TODO +} + sub rcs_receive () { # The wiki may not be the only thing in the git repo. # Determine if it is in a subdirectory by examining the srcdir, diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index ea00a3364..34e009c7a 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -254,4 +255,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for mercurial\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index c33cf7e3a..67d4abbaa 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -23,6 +23,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -693,4 +694,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for monotone\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm index e6a05a3c5..053652a5f 100644 --- a/IkiWiki/Plugin/norcs.pm +++ b/IkiWiki/Plugin/norcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub getsetup () { @@ -63,7 +64,11 @@ sub rcs_diff ($) { } sub rcs_getctime ($) { - error gettext("getctime not implemented"); + return 0; +} + +sub rcs_getmtime ($) { + return 0; } 1 diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 7d27ec842..85c205f09 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -19,6 +19,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -379,4 +380,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for svn\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index 764da9b98..f5ad0cc96 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -284,4 +285,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for tla\n"; # TODO +} + 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e98888d76..e1cb68462 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -365,14 +365,26 @@ sub find_new_files ($) { } else { push @new, $file; - if ($config{getctime} && -e "$config{srcdir}/$file") { + if ($config{gettime} && -e "$config{srcdir}/$file") { eval { - my $time=rcs_getctime("$config{srcdir}/$file"); - $pagectime{$page}=$time; + my $ctime=rcs_getctime("$config{srcdir}/$file"); + if ($ctime > 0) { + $pagectime{$page}=$ctime; + } }; if ($@) { print STDERR $@; } + my $mtime; + eval { + my $mtime=rcs_getmtime("$config{srcdir}/$file"); + }; + if ($@) { + print STDERR $@; + } + elsif ($mtime > 0) { + utime($mtime, $mtime, "$config{srcdir}/$file"); + } } } $pagecase{lc $page}=$page; diff --git a/debian/changelog b/debian/changelog index 737d73655..615d5916f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,6 +44,11 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * conditional: Fix bug that forced "all" mode off by default. * calendarmonth.tmpl: The month calendar is now put in a sidebar. * calendar: Improved display of arrows. + * Rename --getctime to --gettime. (The old name still works for + backwards compatability.) + * --gettime now also looks up last modification time. + * Add rcs_getmtime to plugin API; currently only implemented + for git. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index 6ce576db1..6b7739fd0 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -20,15 +20,17 @@ Do I have it right? > Some VCS, like git, set the file mtimes to the current time > when making a new checkout, so they will be lost if you do that. > The creation times can be retrived using the `--getctime` option. -> I suppose it might be nice if there were a `--getmtime` that pulled -> true modification times out of the VCS, but I haven't found it a big -> deal in practice for the last modification times to be updated to the -> current time when rebuilding a wiki like this. --[[Joey]] +> --[[Joey]] > > > Thanks for the clarification. I ran some tests of my own to make sure I understand it right, and I'm satisfied > > that the order of posts in my blog can be retrieved from the VCS using the `--getctime` option, at least if I > > choose to order my posts by creation time rather than modification time. But I now know that I can't rely on > > page modification times in ikiwiki as these can be lost permanently. +> +> > > Update: It's now renamed to `--gettime`, and pulls both the creation +> > > and modification times. Also, per [[todo/auto_getctime_on_fresh_build]], +> > > this is now done automatically the first time ikiwiki builds a +> > > srcdir. So, no need to worry about this any more! --[[Joey]] > > > > I would suggest that there should at least be a `--getmtime` option like you describe, and perhaps that > > `--getctime` and `--getmtime` be _on by default_. In my opinion the creation times and modification times of @@ -91,19 +93,6 @@ Do I have it right? > A quick workaround for me to get modification times right is the following > little zsh script, which unfortunately only works for git: - #!/usr/bin/env zsh - - set +x - - for FILE in **/*(.); do - TIMES="`git log --pretty=format:%ai $FILE`" - MTIME="`echo $TIMES | head -n1`" - - if [ ! -z $MTIME ]; then - echo touch -m -d "$MTIME" $FILE - touch -m -d "$MTIME" $FILE - fi - - done +>> Elided; no longer needed since --gettime does that, and much faster! --[[Joey]] > --[[David_Riebenbauer]] diff --git a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn index fe67e6aba..d7a33b526 100644 --- a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn +++ b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn @@ -20,10 +20,6 @@ How do I set up an ikiwiki system using a pre-existing repository (instead of cr > recreate the ikiwiki srcdir > 3. `git clone` from the bare git repository a second time, > to create a checkout you can manually edit (optional) -> 4. run `ikiwiki --getctime --setup your.setup` -> The getctime will ensure page creation times are accurate -> by putting the info out of the git history, -> and only needs to be done once. > > If you preserved your repository, but not the setup file, > the easiest way to make one is probably to run diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 707622956..cf7044b2c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1085,6 +1085,13 @@ it up in the history. It's ok if this is not implemented, and throws an error. +#### `rcs_getmtime($)` + +This is used to get the page modification time for a file from the RCS, by +looking it up in the history. + +It's ok if this is not implemented, and throws an error. + #### `rcs_receive()` This is called when ikiwiki is running as a pre-receive hook (or diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index 4e7a8d2a6..b5bfc2414 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -14,8 +14,10 @@ use, some advanced or special features are not supported in all of them. Lack of support in [[ikiwiki-makerepo]] or auto.setup can make it harder to set up a wiki using that revision control system. The `rcs_commit_staged` hook is needed to use [[attachments|plugins/attachment]] or -[[plugins/comments]]. And so on. The table below summarises this for each -revision control system and links to more information about each. +[[plugins/comments]]. `rcs_getctime` may be implemented in a fast way +(ie, one log lookup for all files), or very slowly (one lookup per file). +And so on. The table below summarises this for each revision control +system and links to more information about each. [[!table data=""" feature |[[git]]|[[svn]]|[[bzr]] |[[monotone]]|[[mercurial]]|[[darcs]]|[[tla]] |[[cvs]] @@ -25,6 +27,8 @@ auto.setup |yes |yes |incomplete|yes |incomplete |yes `rcs_rename` |yes |yes |yes |yes |no |yes |no |yes `rcs_remove` |yes |yes |yes |yes |no |yes |no |yes `rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes +`rcs_getctime` |fast |slow |slow |slow |slow |slow |slow |slow +`rcs_getmtime` |fast |no |no |no |no |no |no |no anonymous push |yes |no |no |no |no |no |no |no conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes """]] diff --git a/doc/tips/Importing_posts_from_Wordpress.mdwn b/doc/tips/Importing_posts_from_Wordpress.mdwn index 59330caa4..8774c9723 100644 --- a/doc/tips/Importing_posts_from_Wordpress.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress.mdwn @@ -1,6 +1,6 @@ Use case: You want to move away from Wordpress to Ikiwiki as your blogging/website platform, but you want to retain your old posts. -[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's <tt>--getctime</tt> to get the preserve creation times on checkout. +[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's <tt>--gettime</tt> to get the preserve creation times on checkout. WordPress categories are mapped onto Ikiwiki tags. The ability to import comments is planned. diff --git a/doc/tips/inside_dot_ikiwiki/discussion.mdwn b/doc/tips/inside_dot_ikiwiki/discussion.mdwn index 34d5b9252..69df369ec 100644 --- a/doc/tips/inside_dot_ikiwiki/discussion.mdwn +++ b/doc/tips/inside_dot_ikiwiki/discussion.mdwn @@ -6,14 +6,15 @@ My database appears corrupted: No idea how this happened. I've blown it away and recreated it but, for future reference, is there any less violent way to recover from this situation? I miss having the correct created and last edited times. --[[sabr]] > update: fixed ctimes and mtimes using [these instructions](http://u32.net/Mediawiki_Conversion/Git_Import/#Correct%20Creation%20and%20Last%20Edited%20time) --[[sabr]] -> That's overly complex. Just run `ikiwiki -setup your.setup -getctime`. +> That's overly complex. Just run `ikiwiki -setup your.setup -gettime`. > BTW, I'd be interested in examining such a corrupt storable file to try > to see what happened to it. --[[Joey]] ->> --getctime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. +>> --gettime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. >>> Pulling the page creation date out of the git history is exactly what ->>> --getctime does. --[[Joey]] +>>> --gettime does. (It used to be called --getctime, and only do that; now +>>> it also pulls out the last modified date). --[[Joey]] >> Alas, I seem to have lost the bad index file to periodic /tmp wiping; I'll send it to you if it happens again. --[[sabr]] diff --git a/doc/todo/auto_getctime_on_fresh_build.mdwn b/doc/todo/auto_getctime_on_fresh_build.mdwn index ea95fb8c9..760c56fa1 100644 --- a/doc/todo/auto_getctime_on_fresh_build.mdwn +++ b/doc/todo/auto_getctime_on_fresh_build.mdwn @@ -1,9 +1,13 @@ [[!tag wishlist]] -It might be a good idea to enable --getctime when `.ikiwiki` does not +It might be a good idea to enable --gettime when `.ikiwiki` does not exist. This way a new checkout of a `srcdir` would automatically get -ctimes right. (Running --getctime whenever a rebuild is done would be too +ctimes right. (Running --gettime whenever a rebuild is done would be too slow.) --[[Joey]] Could this be too annoying in some cases, eg, checking out a large wiki that needs to get set up right away? --[[Joey]] + +> Not for git with the new, optimised --getctime. For other VCS.. well, +> pity they're not as fast as git ;), but it is a one-time expense... +> [[done]] --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index db1e36a10..553fef01e 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -320,13 +320,11 @@ also be configured using a setup file. intercepted. If you enable this option then you must run at least the CGI portion of ikiwiki over SSL. -* --getctime +* --gettime - Pull creation time for each new page out of the revision control - system. This rarely used option provides a way to get the real creation - times of items in weblogs, such as when building a wiki from a new - VCS checkout. It is unoptimised and quite slow. It is best used - with --rebuild, to force ikiwiki to get the ctime for all pages. + Extract creation and modification times for each new page from the + the revision control's log. This is done automatically when building a + wiki for the first time, so you normally do not need to use this option. * --set var=value diff --git a/ikiwiki.in b/ikiwiki.in index 38e4d3201..801ff9a0b 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -44,7 +44,8 @@ sub getconfig () { "wrappergroup=s" => \$config{wrappergroup}, "usedirs!" => \$config{usedirs}, "prefix-directives!" => \$config{prefix_directives}, - "getctime" => \$config{getctime}, + "getctime" => \$config{gettime}, + "gettime" => \$config{gettime}, "numbacklinks=i" => \$config{numbacklinks}, "rcs=s" => \$config{rcs}, "no-rcs" => sub { $config{rcs}="" }, diff --git a/mtime-to-git b/mtime-to-git deleted file mode 100755 index 9875af5d7..000000000 --- a/mtime-to-git +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Sets mtimes of all files in the tree their last change date -# based on git's log. Useful to avoid too new dates after a -# fresh checkout, which lead to ikiwiki unnecessarily rebuilding -# basewiki files on upgrade. -if [ -d .git ]; then - for file in $(git ls-files); do - date="$(git log -1 --date=rfc "$file" | grep ^Date: | sed -e 's/Date://')" - if [ -n "$date" ]; then - echo "$date $file" - touch -d"$date" $file - fi - done -fi -- cgit v1.2.3 From e3e245956fe6dcbb884428d24bed4cb9eb7c8ba7 Mon Sep 17 00:00:00 2001 From: Cord <Cord@web> Date: Fri, 16 Apr 2010 21:48:35 +0000 Subject: typo --- doc/examples/softwaresite/news.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/examples/softwaresite/news.mdwn b/doc/examples/softwaresite/news.mdwn index 9b53c7d99..20efba6e0 100644 --- a/doc/examples/softwaresite/news.mdwn +++ b/doc/examples/softwaresite/news.mdwn @@ -1,4 +1,4 @@ -This is where annoucements of new releases, features, and other news is +This is where announcements of new releases, features, and other news is posted. FooBar users are recommended to subscribe to this page's RSS feed. -- cgit v1.2.3 From dee2940c0bc97080088c99f399cd0ff0df3bec23 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Apr 2010 18:29:45 -0400 Subject: automatically run --gettime, and optimise it for git * Automatically run --gettime the first time ikiwiki is run on a given srcdir. * Optimise --gettime for git, so it's appropriatly screamingly fast. (This could be done for other backends too.) * However, --gettime for git no longer follows renames. * Use above to fix up timestamps on docwiki, as well as ensure that timestamps on basewiki files shipped in the deb are sane. --- IkiWiki.pm | 2 +- IkiWiki/Plugin/git.pm | 48 ++++++++++++++++++++++++++++++++++++------------ IkiWiki/Render.pm | 11 +++++++++-- debian/changelog | 7 +++++++ debian/control | 2 +- doc/plugins/write.mdwn | 4 ++++ doc/usage.mdwn | 2 +- docwiki.setup | 17 ++++++++++++++++- ikiwiki.in | 2 +- 9 files changed, 76 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7655dada5..b37b1f344 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -442,7 +442,6 @@ sub getsetup () { }, gettime => { type => "internal", - default => 0, description => "running in gettime mode", safe => 0, rebuild => 0, @@ -1512,6 +1511,7 @@ sub loadindex () { open ($in, "<", "$config{wikistatedir}/indexdb") || return; } else { + $config{gettime}=1; # first build return; } } diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 86d80186f..aa402c04f 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -616,27 +616,51 @@ sub rcs_diff ($) { } } -sub rcs_getctime ($) { +{ +my %time_cache; + +sub findtimes ($$) { my $file=shift; + my $id=shift; # 0 = mtime ; 1 = ctime + # Remove srcdir prefix $file =~ s/^\Q$config{srcdir}\E\/?//; - my @raw_lines = run_or_die('git', 'log', - '--follow', '--no-merges', - '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c', - '-r', '--', $file); - my @ci; - while (my $parsed = parse_diff_tree("", \@raw_lines)) { - push @ci, $parsed; + if (! keys %time_cache) { + my $date; + foreach my $line (run_or_die('git', 'log', + '--pretty=format:%ct', + '--name-only', '--relative')) { + if (! defined $date && $line =~ /^(\d+)$/) { + $date=$line; + } + elsif (! length $line) { + $date=undef; + } + else { + if (! $time_cache{$line}) { + $time_cache{$line}[0]=$date; # mtime + } + $time_cache{$line}[1]=$date; # ctime + } + } } - my $ctime = $ci[$#ci]->{'author_epoch'}; - debug("ctime for '$file': ". localtime($ctime)); - return $ctime; + return exists $time_cache{$file} ? $time_cache{$file}[$id] : 0; +} + +} + +sub rcs_getctime ($) { + my $file=shift; + + return findtimes($file, 1); } sub rcs_getmtime ($) { - error "rcs_getmtime is not implemented for git\n"; # TODO + my $file=shift; + + return findtimes($file, 0); } sub rcs_receive () { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e1cb68462..a6b0f0617 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -352,6 +352,8 @@ sub find_new_files ($) { my @new; my @internal_new; + my $times_noted; + foreach my $file (@$files) { my $page=pagename($file); if (exists $pagesources{$page} && $pagesources{$page} ne $file) { @@ -363,7 +365,12 @@ sub find_new_files ($) { if (isinternal($page)) { push @internal_new, $file; } - else { + elsif ($config{rcs}) { + if (! $times_noted) { + debug(sprintf(gettext("querying %s for file creation and modification times.."), $config{rcs})); + $times_noted=1; + } + push @new, $file; if ($config{gettime} && -e "$config{srcdir}/$file") { eval { @@ -377,7 +384,7 @@ sub find_new_files ($) { } my $mtime; eval { - my $mtime=rcs_getmtime("$config{srcdir}/$file"); + $mtime=rcs_getmtime("$config{srcdir}/$file"); }; if ($@) { print STDERR $@; diff --git a/debian/changelog b/debian/changelog index 615d5916f..60a67cbe3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,8 +47,15 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * Rename --getctime to --gettime. (The old name still works for backwards compatability.) * --gettime now also looks up last modification time. + * Automatically run --gettime the first time ikiwiki is run on + a given srcdir. * Add rcs_getmtime to plugin API; currently only implemented for git. + * Optimise --gettime for git, so it's appropriatly screamingly + fast. (This could be done for other backends too.) + * However, --gettime for git no longer follows renames. + * Use above to fix up timestamps on docwiki, as well as ensure that + timestamps on basewiki files shipped in the deb are sane. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/debian/control b/debian/control index 87f7d8209..ae06f32b0 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl, perlmagick, po4a (>= 0.34), - libfile-chdir-perl + libfile-chdir-perl, Maintainer: Joey Hess <joeyh@debian.org> Uploaders: Josh Triplett <josh@freedesktop.org> Standards-Version: 3.8.4 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index cf7044b2c..0bf6fcf48 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1085,6 +1085,8 @@ it up in the history. It's ok if this is not implemented, and throws an error. +If the RCS cannot determine a ctime for the file, return 0. + #### `rcs_getmtime($)` This is used to get the page modification time for a file from the RCS, by @@ -1092,6 +1094,8 @@ looking it up in the history. It's ok if this is not implemented, and throws an error. +If the RCS cannot determine a mtime for the file, return 0. + #### `rcs_receive()` This is called when ikiwiki is running as a pre-receive hook (or diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 553fef01e..2e12517ea 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -320,7 +320,7 @@ also be configured using a setup file. intercepted. If you enable this option then you must run at least the CGI portion of ikiwiki over SSL. -* --gettime +* --gettime, --no-gettime Extract creation and modification times for each new page from the the revision control's log. This is done automatically when building a diff --git a/docwiki.setup b/docwiki.setup index 8278b73ea..6bc200066 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -1,6 +1,18 @@ #!/usr/bin/perl # Configuration file for ikiwiki to build its documentation wiki. +# Use git during the build, if it's available and if we're building +# from a git checkout. This ensures ikiwiki gets the right mtimes and +# ctimes for files in the doc wiki. +our $rcs="norcs"; +BEGIN { + my $git=`which git 2>&1`; + chomp $git; + if (-x $git && -d ".git") { + $rcs="git"; + } +} + use IkiWiki::Setup::Standard { wikiname => "ikiwiki", srcdir => "doc", @@ -9,7 +21,7 @@ use IkiWiki::Setup::Standard { underlaydirbase => "underlays", underlaydir => "underlays/basewiki", discussion => 0, - exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, + exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, # save space locale => '', verbose => 1, syslog => 0, @@ -17,4 +29,7 @@ use IkiWiki::Setup::Standard { usedirs => 0, prefix_directives => 1, add_plugins => [qw{goodstuff version haiku polygen fortune table}], + disable_plugins => [qw{recentchanges}], # not appropriate for doc dir + rcs => $rcs, + gitorigin_branch => '', # don't pull during build } diff --git a/ikiwiki.in b/ikiwiki.in index 801ff9a0b..acd37f802 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -45,7 +45,7 @@ sub getconfig () { "usedirs!" => \$config{usedirs}, "prefix-directives!" => \$config{prefix_directives}, "getctime" => \$config{gettime}, - "gettime" => \$config{gettime}, + "gettime!" => \$config{gettime}, "numbacklinks=i" => \$config{numbacklinks}, "rcs=s" => \$config{rcs}, "no-rcs" => sub { $config{rcs}="" }, -- cgit v1.2.3 From b13bb0c83c8f23bca97734882997fd3dc29f0553 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Apr 2010 18:43:51 -0400 Subject: implement rcs_getmtime for svn This is a slow implementation; it runs svn log once per file still, rather than running svn log once on the whole srcdir. I did it this way because in my experience, svn log, run on a directory, does not always list every change to files inside that directory. I don't know why, and I use svn as little as possible these days. --- IkiWiki/Plugin/svn.pm | 42 +++++++++++++++++++++++++++++++----------- debian/changelog | 2 +- doc/rcs.mdwn | 2 +- 3 files changed, 33 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 85c205f09..6e1d4a40f 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -350,9 +350,18 @@ sub rcs_diff ($) { return `svnlook diff $config{svnrepo} -r$rev --no-diff-deleted`; } -sub rcs_getctime ($) { +{ + +my ($lastfile, $lastmtime, $lastctime); + +sub findtimes ($) { my $file=shift; + if ($lastfile eq $file) { + return $lastmtime, $lastctime; + } + $lastfile=$file; + my $svn_log_infoline=qr/^r\d+\s+\|\s+[^\s]+\s+\|\s+(\d+-\d+-\d+\s+\d+:\d+:\d+\s+[-+]?\d+).*/; my $child = open(SVNLOG, "-|"); @@ -360,28 +369,39 @@ sub rcs_getctime ($) { exec("svn", "log", $file) || error("svn log $file failed to run"); } - my $date; + my ($cdate, $mdate); while (<SVNLOG>) { if (/$svn_log_infoline/) { - $date=$1; + $cdate=$1; + $mdate=$1 unless defined $mdate; } } - close SVNLOG || warn "svn log $file exited $?"; + close SVNLOG || error "svn log $file exited $?"; - if (! defined $date) { - warn "failed to parse svn log for $file\n"; - return 0; + if (! defined $cdate) { + error "failed to parse svn log for $file\n"; } eval q{use Date::Parse}; error($@) if $@; - $date=str2time($date); - debug("found ctime ".localtime($date)." for $file"); - return $date; + + $lastctime=str2time($cdate); + $lastmtime=str2time($mdate); + return $lastmtime, $lastctime; +} + +} + +sub rcs_getctime ($) { + my $file=shift; + + return (findtimes($file))[1]; } sub rcs_getmtime ($) { - error "rcs_getmtime is not implemented for svn\n"; # TODO + my $file=shift; + + return (findtimes($file))[0]; } 1 diff --git a/debian/changelog b/debian/changelog index 60a67cbe3..774aedc40 100644 --- a/debian/changelog +++ b/debian/changelog @@ -50,7 +50,7 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * Automatically run --gettime the first time ikiwiki is run on a given srcdir. * Add rcs_getmtime to plugin API; currently only implemented - for git. + for git and svn. * Optimise --gettime for git, so it's appropriatly screamingly fast. (This could be done for other backends too.) * However, --gettime for git no longer follows renames. diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index b5bfc2414..450d16800 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -28,7 +28,7 @@ auto.setup |yes |yes |incomplete|yes |incomplete |yes `rcs_remove` |yes |yes |yes |yes |no |yes |no |yes `rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes `rcs_getctime` |fast |slow |slow |slow |slow |slow |slow |slow -`rcs_getmtime` |fast |no |no |no |no |no |no |no +`rcs_getmtime` |fast |slow |no |no |no |no |no |no anonymous push |yes |no |no |no |no |no |no |no conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes """]] -- cgit v1.2.3 From e31b1b27f83f47da10b2775f192eb8eefcfc68a2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Apr 2010 19:25:25 -0400 Subject: remove note about needing --gettime; automatically run on first build now --- doc/tips/Importing_posts_from_Wordpress.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/Importing_posts_from_Wordpress.mdwn b/doc/tips/Importing_posts_from_Wordpress.mdwn index 8774c9723..ecc6ae505 100644 --- a/doc/tips/Importing_posts_from_Wordpress.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress.mdwn @@ -1,6 +1,6 @@ Use case: You want to move away from Wordpress to Ikiwiki as your blogging/website platform, but you want to retain your old posts. -[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's <tt>--gettime</tt> to get the preserve creation times on checkout. +[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. WordPress categories are mapped onto Ikiwiki tags. The ability to import comments is planned. -- cgit v1.2.3 From c6c03768da90df0d7474edce09c2abf2a7e32052 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Fri, 16 Apr 2010 19:42:18 -0400 Subject: add list of compatability breaking changes --- doc/roadmap.mdwn | 14 ++++++++++++++ doc/roadmap/discussion.mdwn | 1 + 2 files changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index a701a2685..0c7bf2fa8 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -69,6 +69,20 @@ backwards compatability. ---- +# compatability breaking changes + +Probably incomplete list: + +* Drop old `--getctime` option. +* Remove compatability code in `loadindex` to handle old index data layouts. +* Make pagespecs match relative by default? (see [[discussion]]) +* Flip wikilinks? (see [[todo/link_plugin_perhaps_too_general?]]) +* YADA format setup files per default? + +In general, we try to use [[ikiwiki-transition]] or forced rebuilds on +upgrade to deal with changes that break compatability. Some things that +can't help with. + # future goals * Conversion support for existing other wikis. diff --git a/doc/roadmap/discussion.mdwn b/doc/roadmap/discussion.mdwn index 0b69867bf..8233b1990 100644 --- a/doc/roadmap/discussion.mdwn +++ b/doc/roadmap/discussion.mdwn @@ -3,6 +3,7 @@ backwards compatibility problems. Should this be marked as a future plan, perhap major version number like 2.0? --Ethan Yes, I'm looking at making this kind of change at 2.0, added to the list. +(Update: Didn't make it in 2.0 or 3.0...) However, I have doubts that it makes good sense to go relative by default. While it's not consitent with links, it seems to work better overall to have pagespecs be absolute by default, IMHO. --[[Joey]] -- cgit v1.2.3 From c769a33392c4dedbabfb1fa1fda5c8bb30b84c78 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@gnu.kitenet.net> Date: Sat, 17 Apr 2010 12:20:50 -0400 Subject: autoindex: Switch to using %wikistate instead of abusing $pagestate{index}. --- IkiWiki/Plugin/autoindex.pm | 20 ++++++++++++++------ debian/changelog | 2 ++ ...uto-create_tag_pages_according_to_a_template.mdwn | 3 +++ 3 files changed, 19 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/autoindex.pm b/IkiWiki/Plugin/autoindex.pm index 555856b11..c71d73349 100644 --- a/IkiWiki/Plugin/autoindex.pm +++ b/IkiWiki/Plugin/autoindex.pm @@ -61,8 +61,16 @@ sub refresh () { } my %deleted; - if (ref $pagestate{index}{autoindex}{deleted}) { - %deleted=%{$pagestate{index}{autoindex}{deleted}}; + if (ref $wikistate{autoindex}{deleted}) { + %deleted=%{$wikistate{autoindex}{deleted}}; + } + elsif (ref $pagestate{index}{autoindex}{deleted}) { + # compatability code + %deleted=%{$pagestate{index}{autoindex}{deleted}}; + delete $pagestate{index}{autoindex}; + } + + if (keys %deleted) { foreach my $dir (keys %deleted) { # remove deleted page state if the deleted page is re-added, # or if all its subpages are deleted @@ -71,7 +79,7 @@ sub refresh () { delete $deleted{$dir}; } } - $pagestate{index}{autoindex}{deleted}=\%deleted; + $wikistate{autoindex}{deleted}=\%deleted; } my @needed; @@ -82,10 +90,10 @@ sub refresh () { # This page must have just been deleted, so # don't re-add it. And remember it was # deleted. - if (! ref $pagestate{index}{autoindex}{deleted}) { - $pagestate{index}{autoindex}{deleted}={}; + if (! ref $wikistate{autoindex}{deleted}) { + $wikistate{autoindex}{deleted}={}; } - ${$pagestate{index}{autoindex}{deleted}}{$dir}=1; + ${$wikistate{autoindex}{deleted}}{$dir}=1; } else { push @needed, $dir; diff --git a/debian/changelog b/debian/changelog index d65ffffd7..4721c5309 100644 --- a/debian/changelog +++ b/debian/changelog @@ -58,6 +58,8 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low an iffy thing. * Use above to fix up timestamps on docwiki, as well as ensure that timestamps on basewiki files shipped in the deb are sane. + * autoindex: Switch to using %wikistate instead of abusing + $pagestate{index}. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 8fc97578c..49da3c80c 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -239,6 +239,9 @@ wrong direction. >>>>>> Aha! Having looked at [[plugins/write]] again, it turns out that what this >>>>>> feature should really use is `%wikistate`, I think? :-) --[[smcv]] +>>>>>>> Ah, indeed, that came after I wrote autoindex. I've fixed autoindex to +>>>>>>> use it. --[[Joey]] + >>>>> Ok, now I know what you mean. --[[David_Riebenbauer]] >>> * `autoindex` forgets that a page was deleted when that page is -- cgit v1.2.3 From 7fcc0faf8367c5ae64a3ff06d0d74baa063c4dfc Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 12:45:20 -0400 Subject: few more suggestions --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 49da3c80c..def55f3ee 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -269,6 +269,15 @@ wrong direction. >> True. I'll do that. --[[David_Riebenbauer]] +> Seems that `%autofiles` stores plugin names as keys, but never +> really uses them. So it could just as easily be an array. +> +> I'd be happy if the `%del_hash` global were not needed. +> Looks like it could be avoided by moving the checks +> that `add_autofile` does into the autofile handling loop in +> `Render`. (Also, that loop should probably be in its own +> function anyway.) --[[Joey]] + [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) [f58f3e1bec41ccf9316f37b014ce0b373c8e49e1]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 (commitdiff for f58f3e1bec41ccf9316f37b014ce0b373c8e49e1) -- cgit v1.2.3 From c721a9ef872db85b26d430a2098234a4fca6ec51 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 13:41:06 -0400 Subject: my autotag branch --- .../auto-create_tag_pages_according_to_a_template.mdwn | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index def55f3ee..867306f0d 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -269,14 +269,12 @@ wrong direction. >> True. I'll do that. --[[David_Riebenbauer]] -> Seems that `%autofiles` stores plugin names as keys, but never -> really uses them. So it could just as easily be an array. -> -> I'd be happy if the `%del_hash` global were not needed. -> Looks like it could be avoided by moving the checks -> that `add_autofile` does into the autofile handling loop in -> `Render`. (Also, that loop should probably be in its own -> function anyway.) --[[Joey]] +>> I've pushed an autotag branch of my own, which refactors +>> things a bit. It is untested so far though. --[[Joey]] +>> +>> * `verify_src_file` only called from Render.pm +>> * Gets rid of `%del_files`. +>> * Uses `%wikistate`. [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) -- cgit v1.2.3 From 9fbef7e1d2c4e8bbaf3eaf89885f18b88edbe429 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 13:42:50 -0400 Subject: reformat --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 867306f0d..ed681ac4d 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -269,12 +269,13 @@ wrong direction. >> True. I'll do that. --[[David_Riebenbauer]] ->> I've pushed an autotag branch of my own, which refactors ->> things a bit. It is untested so far though. --[[Joey]] ->> ->> * `verify_src_file` only called from Render.pm ->> * Gets rid of `%del_files`. ->> * Uses `%wikistate`. +[[!template id=gitbranch branch=origin/autotag author="[[Joey]]"]] +I've pushed an autotag branch of my own, which refactors +things a bit. It is untested so far though. --[[Joey]] + +* `verify_src_file` only called from Render.pm +* Gets rid of `%del_files`. +* Uses `%wikistate`. [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) -- cgit v1.2.3 From a1aa71efc9d1db42b425f43afc1ff4a37c4c0f3a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 13:49:20 -0400 Subject: document the gitbranch template --- doc/git.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 55967e543..0f280fb35 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -65,6 +65,10 @@ think about merging them. This is recommended. :-) ## branches +In order to refer to a branch in one of the above git repositories, for +example when submitting a [[patch]], you can use the +[[templates/gitbranch]] template. + Some of the branches included in the main repository include: * `gallery` contains the [[todo/Gallery]] plugin. It's not yet merged -- cgit v1.2.3 From 6f485b8f459549521541af7bb087185dada112bf Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 13:57:59 -0400 Subject: note that tla plugin is not being maintained --- doc/rcs/tla.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/rcs/tla.mdwn b/doc/rcs/tla.mdwn index cad5d51f4..79eecd627 100644 --- a/doc/rcs/tla.mdwn +++ b/doc/rcs/tla.mdwn @@ -2,6 +2,9 @@ [GNU](http://www.gnu.org/) [Arch](http://www.gnuarch.org/) revision control system. Ikiwiki supports storing a wiki in tla. +Warning: Since tla is not being maintained, neither is this plugin, and +using ikiwiki with tla is not recommended. + Ikiwiki can run as a [[post-commit]] hook to update a wiki whenever commits come in. When running as a [[cgi]] with tla, ikiwiki automatically commits edited pages to the Arch repostory, and uses the Arch -- cgit v1.2.3 From cd8ec309d26cbc3f634328cb90e4c9d38b404632 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 13:58:31 -0400 Subject: bzr getmtime done --- doc/rcs.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index 450d16800..8b9929920 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -28,7 +28,7 @@ auto.setup |yes |yes |incomplete|yes |incomplete |yes `rcs_remove` |yes |yes |yes |yes |no |yes |no |yes `rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes `rcs_getctime` |fast |slow |slow |slow |slow |slow |slow |slow -`rcs_getmtime` |fast |slow |no |no |no |no |no |no +`rcs_getmtime` |fast |slow |slow |no |no |no |no |no anonymous push |yes |no |no |no |no |no |no |no conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes """]] -- cgit v1.2.3 From e289e0b4ba48d01e24586dbdcaeda367763edd67 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 14:00:25 -0400 Subject: recommend git --- doc/rcs.mdwn | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index 8b9929920..248d93024 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -6,8 +6,7 @@ histories. Ikiwiki started out supporting only [[Subversion|svn]], but the interface ikiwiki uses to a revision control system is sufficiently simple and generic that it can be adapted to work with many systems by writing a -[[plugin|plugins/write]]. [[Subversion|svn]] is still a recommended choice; -[[git]] is another well-tested option. +[[plugin|plugins/write]]. These days, most people use [[git]]. While all supported revision control systems work well enough for basic use, some advanced or special features are not supported in all of them. -- cgit v1.2.3 From ca02c57ee47d4c05946c0c34eee32a0ad4ec6b01 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 14:07:12 -0400 Subject: document add_autofile --- doc/plugins/write.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 0bf6fcf48..e33c99421 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -966,6 +966,22 @@ added. Pass it the page that contains the link, and the link text. An optional third parameter sets the link type. If not specified, it is an ordinary [[ikiwiki/WikiLink]]. +### `add_autofile($$$)` + +Sometimes you may want to add a file to the `srcdir`. For example, +[[plugins/tag]] pages can be automatically created as needed. This function +can be used to do that. + +The three parameters are the filename to add, the name of the plugin, +and a callback function. The callback will be called if it is appropriate +to automatically add the file, and should then take care of creating it, +and doing anything else it needs to (such as checking it into revision +control). Note that the callback may not always be called. For example, +if an automatically added file is deleted by the user, ikiwiki will avoid +re-adding it again. + +This function needs to be called during the scan hook, or earlier to work. + ## Miscellaneous ### Internal use pages -- cgit v1.2.3 From 59ceeb5621ae0ae2bcb7501c6ac0c7a06562a7cc Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 17 Apr 2010 17:15:07 -0400 Subject: improve docs --- doc/plugins/write.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index e33c99421..5190a26ed 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -968,9 +968,9 @@ it is an ordinary [[ikiwiki/WikiLink]]. ### `add_autofile($$$)` -Sometimes you may want to add a file to the `srcdir`. For example, -[[plugins/tag]] pages can be automatically created as needed. This function -can be used to do that. +Sometimes you may want to add a file to the `srcdir` as a result of content +of other pages. For example, [[plugins/tag]] pages can be automatically +created as needed. This function can be used to do that. The three parameters are the filename to add, the name of the plugin, and a callback function. The callback will be called if it is appropriate @@ -980,7 +980,8 @@ control). Note that the callback may not always be called. For example, if an automatically added file is deleted by the user, ikiwiki will avoid re-adding it again. -This function needs to be called during the scan hook, or earlier to work. +This function needs to be called during the scan hook, or earlier in the +build process, in order to add the file early enough for it to be built. ## Miscellaneous -- cgit v1.2.3 From 56bf9c04a290cfce6270f974c1d48be8a5d54942 Mon Sep 17 00:00:00 2001 From: PeteG <PeteG@web> Date: Sun, 18 Apr 2010 12:33:51 +0000 Subject: --- doc/peteg.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/peteg.mdwn (limited to 'doc') diff --git a/doc/peteg.mdwn b/doc/peteg.mdwn new file mode 100644 index 000000000..90593c16f --- /dev/null +++ b/doc/peteg.mdwn @@ -0,0 +1,7 @@ +I'm adding some plugins to Ikiwiki to support a bioacoustic wiki. See here: + +<http://bioacoustics.cse.unsw.edu.au/wiki/> + +Personal home page: + +http://peteg.org/ -- cgit v1.2.3 From 472694b8b420be128c1d9d0ba8393ea6efff8716 Mon Sep 17 00:00:00 2001 From: PeteG <PeteG@web> Date: Sun, 18 Apr 2010 12:34:20 +0000 Subject: --- doc/peteg.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/peteg.mdwn b/doc/peteg.mdwn index 90593c16f..4e2face0e 100644 --- a/doc/peteg.mdwn +++ b/doc/peteg.mdwn @@ -4,4 +4,4 @@ I'm adding some plugins to Ikiwiki to support a bioacoustic wiki. See here: Personal home page: -http://peteg.org/ +<http://peteg.org/> -- cgit v1.2.3 From 63e6c00890a11144f8d035f7052a6229227fce52 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Mon, 19 Apr 2010 02:23:12 +0000 Subject: response to the further thoughts --- doc/todo/Multiple_categorization_namespaces.mdwn | 26 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index ee3bbd88d..1861d860c 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -56,17 +56,25 @@ and the tags would appear at the bottom of the post, the Rubrica next to the tit Aside from the name of the plugin (and thus of the main directive), which could be `tag`, `meta`, `field` or whatever (maybe extending `meta` would be the most sensible choice), the features we want are - 1. allow multiple values per type/attribute/field/whatever (fields currently only allows one) - 2. allow both hidden and visible references (à la tag vs taglink) - 3. allow each type/attribute/field to be exposed under multiple queries (e.g. tags and categories; this is mostly important for backwards compatibility, not sure if it might have other uses too) - 4. allow arbitrary types/attributes/fields/whatever (even 'undefined' ones) +1. allow multiple values per type/attribute/field/whatever (fields currently only allows one) + * Agreed about multiple values; I've been considering whether I should add that to `field`. -- K.A. +2. allow both hidden and visible references (a la tag vs taglink) + * Hidden and visible references; that's fair enough too. My approach with `ymlfront` and `getfield` is that the YAML code is hidden, and the display is done with `getfield`, but there's no reason not to use additional approaches. -- K.A. +3. allow each type/attribute/field to be exposed under multiple queries (e.g. tags and categories; this is mostly important for backwards compatibility, not sure if it might have other uses too) + * I'm not sure what you mean here. -- K.A. +4. allow arbitrary types/attributes/fields/whatever (even 'undefined' ones) + * Are you saying that these must be typed, or are you saying that they can be user-defined? -- K.A. Each type/attribute/field/whatever (predefined, user-defined, arbitrary) would thus have the following parameters: - * `directive` : the name of the directive that can be used to set the value as a hidden reference; we can discuss whether, for pre- or user-defined types, it being undef means no directive or a default directive matching the attribute name would be defined. - * `linkdirective` : the name of the directive that can be used for a visible reference; no such directive would be defined by default - * `linktype` : link type for (hidden and visible) references - * `linkbase` : akin to the tagbase parameter - * `queries` : list of template queries this type/attribute/field/whatever is exposed to +* `directive` : the name of the directive that can be used to set the value as a hidden reference; we can discuss whether, for pre- or user-defined types, it being undef means no directive or a default directive matching the attribute name would be defined. + * I still want there to be able to be enough flexibility in the concept to enable plugins such as `yamlfront`, which sets the data using YAML format, rather than using directives. -- K.A. +* `linkdirective` : the name of the directive that can be used for a visible reference; no such directive would be defined by default +* `linktype` : link type for (hidden and visible) references + * Is this the equivalent to "field name"? -- K.A. +* `linkbase` : akin to the tagbase parameter + * Is this a field-name -> directory mapping? -- K.A. +* `queries` : list of template queries this type/attribute/field/whatever is exposed to + * I'm not sure what you mean here. -- K.A. Where this approach is limiting is on the kind of data that is passed to (template) queries. The value of the metadata fields might need some massaging (e.g. compare how tags are passed to tags queries vs cateogires queries). I have problems on picturing an easy way to make this possible user-side (i.e. via templates and not in Perl modules). Suggestions welcome. -- cgit v1.2.3 From 99cdd38dd54047d0e79dbf65d58ba11ee38f2c92 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Mon, 19 Apr 2010 08:36:38 +0000 Subject: Respond --- doc/todo/Multiple_categorization_namespaces.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index 1861d860c..ae35e8dfe 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -62,19 +62,25 @@ Aside from the name of the plugin (and thus of the main directive), which could * Hidden and visible references; that's fair enough too. My approach with `ymlfront` and `getfield` is that the YAML code is hidden, and the display is done with `getfield`, but there's no reason not to use additional approaches. -- K.A. 3. allow each type/attribute/field to be exposed under multiple queries (e.g. tags and categories; this is mostly important for backwards compatibility, not sure if it might have other uses too) * I'm not sure what you mean here. -- K.A. + * Typical example is tags: they are accessible both as `tags` and as `categories`, although the way they are presented changes a little -- G.B. 4. allow arbitrary types/attributes/fields/whatever (even 'undefined' ones) * Are you saying that these must be typed, or are you saying that they can be user-defined? -- K.A. + * I am saying that the user should be able to define (e.g. in the config) some set of types/fields/attributes/whatever, following the specification illustrated below, but also be able to use something like `\[[!meta somefield="somevalue"]]` where `somefield` was never defined before. In this case `somefield` will have some default values for the properties described in the spec below. -- G.B. Each type/attribute/field/whatever (predefined, user-defined, arbitrary) would thus have the following parameters: * `directive` : the name of the directive that can be used to set the value as a hidden reference; we can discuss whether, for pre- or user-defined types, it being undef means no directive or a default directive matching the attribute name would be defined. * I still want there to be able to be enough flexibility in the concept to enable plugins such as `yamlfront`, which sets the data using YAML format, rather than using directives. -- K.A. + * The possibility to use a directive does not preclude other ways of defining the field values. IOW, even if the directive `somefield` is defined, the user would still be able to use the syntax `\[[!meta somefield="somevalue"]]`, or any other syntax (such as YAML). -- G.B. * `linkdirective` : the name of the directive that can be used for a visible reference; no such directive would be defined by default * `linktype` : link type for (hidden and visible) references * Is this the equivalent to "field name"? -- K.A. + * This would be such by default, but it could be set to something different. [[Typed links|matching_different_kinds_of_links]] is a very recent ikiwiki feature. -- G.B. * `linkbase` : akin to the tagbase parameter * Is this a field-name -> directory mapping? -- K.A. + * yes, with each directory having one page per value. It might not make sense for all fields, of course -- G.B. * `queries` : list of template queries this type/attribute/field/whatever is exposed to * I'm not sure what you mean here. -- K.A. + * as mentioned before, some fields may be made accessible through different template queries, in different form. This is the case already for tags, that also come up in the `categories` query (used by Atom and RSS feeds). -- G.B. -Where this approach is limiting is on the kind of data that is passed to (template) queries. The value of the metadata fields might need some massaging (e.g. compare how tags are passed to tags queries vs cateogires queries). I have problems on picturing an easy way to make this possible user-side (i.e. via templates and not in Perl modules). Suggestions welcome. +Where this approach is limiting is on the kind of data that is passed to (template) queries. The value of the metadata fields might need some massaging (e.g. compare how tags are passed to tags queries vs cateogires queries, or also see what is done with the fields in the current `meta` plugin). I have problems on picturing an easy way to make this possible user-side (i.e. via templates and not in Perl modules). Suggestions welcome. -- cgit v1.2.3 From 1b7c455f4a4214bc9df766be4ec2b12adcf679e1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Mon, 19 Apr 2010 16:03:53 -0400 Subject: thinking about changing how templatedir works and allowing wikitemplate files into the srcdir --- doc/todo/auto_rebuild_on_template_change.mdwn | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 doc/todo/auto_rebuild_on_template_change.mdwn (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn new file mode 100644 index 000000000..c4ffae178 --- /dev/null +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -0,0 +1,33 @@ +If `page.tmpl` is changed, it would be nice if ikiwiki automatically +noticed, and rebuilt all pages. If `inlinepage.tmpl` is changed, a rebuild +of all pages using it in an inline would be stellar. + +This would allow setting: + + templatedir => "$srcdir/templates", + +.. and then the [[wikitemplates]] are managed like other wiki files; and +like other wiki files, a change to them automatically updates dependent +pages. + +Originally, it made good sense not to have the templatedir inside the wiki. +Those templates can be used to bypass the htmlscrubber, and you don't want +just anyone to edit them. But the same can be said of `style.css` and +`ikiwiki.js`, which *are* in the wiki. We rely on `allowed_attachments` +being set to secure those to prevent users uploading replacements. And we +assume that users who can directly (non-anon) commit *can* edit them, and +that's ok. + +So, perhaps the easiest way to solve this [[wishlist]] would be to +make templatedir *default* to "$srcdir/templates/, and make ikiwiki +register dependencies on `page.tmpl`, `inlinepage.tmpl`, etc, as they're +used. Although, having every page declare an explicit dep on `page.tmpl` +is perhaps a bit much; might be better to implement a special case for that +one. Also, having the templates be copied to `destdir` is not desirable. + +The risk is that a site might have `allowed_attachments` set to "templates/*" +or "*.tmpl" something like that. I think such a configuration is the *only* +risk, and it's unlikely enough that a NEWS warning should suffice. + +(This would also help to clear up the tricky disctinction between +wikitemplates and in-wiki templates.) -- cgit v1.2.3 From e1ebdda72bb14c70c9d35c29f5a6afe197623282 Mon Sep 17 00:00:00 2001 From: Svend Sorensen <svend@ciffer.net> Date: Mon, 19 Apr 2010 16:12:09 -0700 Subject: Remove www prefix from Svend's website URLs --- doc/ikiwikiusers.mdwn | 2 +- doc/users/svend.mdwn | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 4a3e41e83..cb4213405 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -120,7 +120,7 @@ Personal sites and blogs * [[Adam_Trickett|ajt]]'s home intranet/sanbox system ([Internet site & blog](http://www.iredale.net/) -- not ikiwiki yet) * [[Simon_McVittie|smcv]]'s [website](http://www.pseudorandom.co.uk/) and [blog](http://smcv.pseudorandom.co.uk/) -* Svend's [website](http://www.ciffer.net/~svend/) and [blog](http://www.ciffer.net/~svend/blog/) +* Svend's [website](http://ciffer.net/~svend/) and [blog](http://ciffer.net/~svend/blog/) * [muammar's site](http://muammar.me) * [Per Bothner's blog](http://per.bothner.com/blog/) * [Bernd Zeimetz (bzed)](http://bzed.de/) diff --git a/doc/users/svend.mdwn b/doc/users/svend.mdwn index 69d83584f..712a0d3e7 100644 --- a/doc/users/svend.mdwn +++ b/doc/users/svend.mdwn @@ -1,4 +1,4 @@ [[!meta title="Svend Sorensen"]] -* [website](http://www.ciffer.net/~svend/) -* [blog](http://www.ciffer.net/~svend/blog/) +* [website](http://ciffer.net/~svend/) +* [blog](http://ciffer.net/~svend/blog/) -- cgit v1.2.3 From 09c647c1773d5c8eafacea486082684909e47449 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 20 Apr 2010 02:31:00 +0000 Subject: response --- doc/todo/auto_rebuild_on_template_change.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index c4ffae178..2799842ed 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -31,3 +31,5 @@ risk, and it's unlikely enough that a NEWS warning should suffice. (This would also help to clear up the tricky disctinction between wikitemplates and in-wiki templates.) + +> But would this require that templates be parseable as wiki pages? Because that would be a nuisance. --[[KathrynAndersen]] -- cgit v1.2.3 From 9f00692a798888b9cc9edb30a961c6418efba39b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Mon, 19 Apr 2010 22:37:55 -0400 Subject: response --- doc/todo/auto_rebuild_on_template_change.mdwn | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index 2799842ed..cde19700c 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -25,11 +25,15 @@ used. Although, having every page declare an explicit dep on `page.tmpl` is perhaps a bit much; might be better to implement a special case for that one. Also, having the templates be copied to `destdir` is not desirable. -The risk is that a site might have `allowed_attachments` set to "templates/*" -or "*.tmpl" something like that. I think such a configuration is the *only* -risk, and it's unlikely enough that a NEWS warning should suffice. +The risk is that a site might have `allowed_attachments` set to +`templates/*` or `*.tmpl` something like that. I think such a configuration +is the *only* risk, and it's unlikely enough that a NEWS warning should +suffice. (This would also help to clear up the tricky disctinction between wikitemplates and in-wiki templates.) > But would this require that templates be parseable as wiki pages? Because that would be a nuisance. --[[KathrynAndersen]] + +>> It would be better for them not to be rendered separately at all. +>> --[[Joey]] -- cgit v1.2.3 From 16afa9e8446771fabe45ab45d8a36d09034d0319 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 20 Apr 2010 02:41:13 +0000 Subject: further clarification --- doc/todo/Multiple_categorization_namespaces.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index ae35e8dfe..190070816 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -79,8 +79,10 @@ Each type/attribute/field/whatever (predefined, user-defined, arbitrary) would t * `linkbase` : akin to the tagbase parameter * Is this a field-name -> directory mapping? -- K.A. * yes, with each directory having one page per value. It might not make sense for all fields, of course -- G.B. + * (nods) I've been working on something similar with my unreleased `tagger` module. In that, by default, the field-name maps to the closest wiki-page of the same name. Thus, if one had the field "genre=poetry" on the page fiction/stories/mary/lamb, then that would map to fiction/genre/poetry if fiction/genre existed. --K.A. * `queries` : list of template queries this type/attribute/field/whatever is exposed to * I'm not sure what you mean here. -- K.A. * as mentioned before, some fields may be made accessible through different template queries, in different form. This is the case already for tags, that also come up in the `categories` query (used by Atom and RSS feeds). -- G.B. + * Ah, do you mean that the input value is the same, but the output format is different? Like the difference between TMPL_VAR NAME="FOO" and TMPL_VAR NAME="raw_FOO"; one is htmlized, and the other is not. -- K.A. Where this approach is limiting is on the kind of data that is passed to (template) queries. The value of the metadata fields might need some massaging (e.g. compare how tags are passed to tags queries vs cateogires queries, or also see what is done with the fields in the current `meta` plugin). I have problems on picturing an easy way to make this possible user-side (i.e. via templates and not in Perl modules). Suggestions welcome. -- cgit v1.2.3 From fda191cbbbfa76114a27a53bfc5b90289f26f72b Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 20 Apr 2010 02:43:44 +0000 Subject: formatting --- doc/todo/Multiple_categorization_namespaces.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index 190070816..74e5bc812 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -79,10 +79,10 @@ Each type/attribute/field/whatever (predefined, user-defined, arbitrary) would t * `linkbase` : akin to the tagbase parameter * Is this a field-name -> directory mapping? -- K.A. * yes, with each directory having one page per value. It might not make sense for all fields, of course -- G.B. - * (nods) I've been working on something similar with my unreleased `tagger` module. In that, by default, the field-name maps to the closest wiki-page of the same name. Thus, if one had the field "genre=poetry" on the page fiction/stories/mary/lamb, then that would map to fiction/genre/poetry if fiction/genre existed. --K.A. + * (nods) I've been working on something similar with my unreleased `tagger` module. In that, by default, the field-name maps to the closest wiki-page of the same name. Thus, if one had the field "genre=poetry" on the page fiction/stories/mary/lamb, then that would map to fiction/genre/poetry if fiction/genre existed. --K.A. * `queries` : list of template queries this type/attribute/field/whatever is exposed to * I'm not sure what you mean here. -- K.A. * as mentioned before, some fields may be made accessible through different template queries, in different form. This is the case already for tags, that also come up in the `categories` query (used by Atom and RSS feeds). -- G.B. - * Ah, do you mean that the input value is the same, but the output format is different? Like the difference between TMPL_VAR NAME="FOO" and TMPL_VAR NAME="raw_FOO"; one is htmlized, and the other is not. -- K.A. + * Ah, do you mean that the input value is the same, but the output format is different? Like the difference between TMPL_VAR NAME="FOO" and TMPL_VAR NAME="raw_FOO"; one is htmlized, and the other is not. -- K.A. Where this approach is limiting is on the kind of data that is passed to (template) queries. The value of the metadata fields might need some massaging (e.g. compare how tags are passed to tags queries vs cateogires queries, or also see what is done with the fields in the current `meta` plugin). I have problems on picturing an easy way to make this possible user-side (i.e. via templates and not in Perl modules). Suggestions welcome. -- cgit v1.2.3 From 529929e732e1c6604d31b68e81898780de06e640 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Tue, 20 Apr 2010 02:45:14 +0000 Subject: non comprend --- doc/todo/auto_rebuild_on_template_change.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index cde19700c..6a1013f8d 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -37,3 +37,5 @@ wikitemplates and in-wiki templates.) >> It would be better for them not to be rendered separately at all. >> --[[Joey]] + +>>> I don't follow you. --[[KathrynAndersen]] -- cgit v1.2.3 From 563428ebd2a75cfabccf1974da0c1cbbe07eb369 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Mon, 19 Apr 2010 23:52:16 -0400 Subject: response --- doc/todo/auto_rebuild_on_template_change.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index 6a1013f8d..2558d5f3e 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -24,6 +24,7 @@ register dependencies on `page.tmpl`, `inlinepage.tmpl`, etc, as they're used. Although, having every page declare an explicit dep on `page.tmpl` is perhaps a bit much; might be better to implement a special case for that one. Also, having the templates be copied to `destdir` is not desirable. +(However, if they're not copied, wikilinks to them will be broken. Hmm.) The risk is that a site might have `allowed_attachments` set to `templates/*` or `*.tmpl` something like that. I think such a configuration @@ -39,3 +40,8 @@ wikitemplates and in-wiki templates.) >> --[[Joey]] >>> I don't follow you. --[[KathrynAndersen]] + +>>>> If they don't render to output files, they clearly don't +>>>> need to be treated as wiki pages. (They need to be treated +>>>> as raw files anyway, because you don't want random users editing them +>>>> in the online editor.) --[[Joey]] -- cgit v1.2.3 From 11718519348382892d5c6fdb21b8e721c2413eb0 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Tue, 20 Apr 2010 01:32:19 -0400 Subject: similarity to internal pages --- doc/todo/auto_rebuild_on_template_change.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index 2558d5f3e..2e4ba8e9a 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -24,7 +24,8 @@ register dependencies on `page.tmpl`, `inlinepage.tmpl`, etc, as they're used. Although, having every page declare an explicit dep on `page.tmpl` is perhaps a bit much; might be better to implement a special case for that one. Also, having the templates be copied to `destdir` is not desirable. -(However, if they're not copied, wikilinks to them will be broken. Hmm.) +In a sense, these template would be like internal pages, except not wiki +pages, but raw files. The risk is that a site might have `allowed_attachments` set to `templates/*` or `*.tmpl` something like that. I think such a configuration -- cgit v1.2.3 From 52ccc03d10c532b3cf6335b00a9b60057061596b Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Tue, 20 Apr 2010 15:40:10 +0100 Subject: clarify whether the raw files would be put in destdir --- doc/todo/auto_rebuild_on_template_change.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index 2e4ba8e9a..09a623427 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -46,3 +46,6 @@ wikitemplates and in-wiki templates.) >>>> need to be treated as wiki pages. (They need to be treated >>>> as raw files anyway, because you don't want random users editing them >>>> in the online editor.) --[[Joey]] + +>>>>> Just to be clear, the raw files would not be copied across to the output +>>>>> directory? -- [[Jon]] -- cgit v1.2.3 From 3b8f4f59d6720e5a77cae30eacc4c46582b1603b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Tue, 20 Apr 2010 15:01:39 +0000 Subject: internal pages: the revenge? --- doc/todo/auto_rebuild_on_template_change.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index 09a623427..b5c107915 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -49,3 +49,9 @@ wikitemplates and in-wiki templates.) >>>>> Just to be clear, the raw files would not be copied across to the output >>>>> directory? -- [[Jon]] + +>>>>>> Without modifying ikiwiki, they'd be copied to the output directory as +>>>>>> (e.g.) http://ikiwiki.info/templates/inlinepage.tmpl; to not copy them, +>>>>>> it'd either be necessary to make them be internal pages +>>>>>> (templates/inlinepage._tmpl) or special-case them in some other way. +>>>>>> --[[smcv]] -- cgit v1.2.3 From 4b4fdc85abba7200eed78eb473341e44fecc6087 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Tue, 20 Apr 2010 20:18:29 +0000 Subject: Clarifications --- doc/todo/Multiple_categorization_namespaces.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/todo/Multiple_categorization_namespaces.mdwn b/doc/todo/Multiple_categorization_namespaces.mdwn index 74e5bc812..a8ee6755c 100644 --- a/doc/todo/Multiple_categorization_namespaces.mdwn +++ b/doc/todo/Multiple_categorization_namespaces.mdwn @@ -80,9 +80,14 @@ Each type/attribute/field/whatever (predefined, user-defined, arbitrary) would t * Is this a field-name -> directory mapping? -- K.A. * yes, with each directory having one page per value. It might not make sense for all fields, of course -- G.B. * (nods) I've been working on something similar with my unreleased `tagger` module. In that, by default, the field-name maps to the closest wiki-page of the same name. Thus, if one had the field "genre=poetry" on the page fiction/stories/mary/lamb, then that would map to fiction/genre/poetry if fiction/genre existed. --K.A. + * that's the idea. In your case you could have the linkbase of genre be fiction/genre, and it would be created if it was missing. -- G.B. * `queries` : list of template queries this type/attribute/field/whatever is exposed to * I'm not sure what you mean here. -- K.A. * as mentioned before, some fields may be made accessible through different template queries, in different form. This is the case already for tags, that also come up in the `categories` query (used by Atom and RSS feeds). -- G.B. * Ah, do you mean that the input value is the same, but the output format is different? Like the difference between TMPL_VAR NAME="FOO" and TMPL_VAR NAME="raw_FOO"; one is htmlized, and the other is not. -- K.A. + * Actually this is about the same information appearing in different queries (e.g. NAME="FOO" and NAME="BAR"). Example: say that I defined a "Rubrica" field. I would want both tags and categories to appear in `categories` template query, but only tags would appear in the `tags` query, and only Rubrica values to appear in `rubrica` queries. The issue of different output formats was presented in the next paragraph instead. -- G.B. Where this approach is limiting is on the kind of data that is passed to (template) queries. The value of the metadata fields might need some massaging (e.g. compare how tags are passed to tags queries vs cateogires queries, or also see what is done with the fields in the current `meta` plugin). I have problems on picturing an easy way to make this possible user-side (i.e. via templates and not in Perl modules). Suggestions welcome. + +One possibility could be to have the `queries` configuration allow a hash mapping query names to functions that would transform the data. Lacking that possibility, we might have to leave some predefined fields to have custom Perl-side treatment and leave custom fields to be untransformable. + -- cgit v1.2.3 From 5d2df9651fee83cf17acde48ba12442104311492 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" <http://oblomov.myopenid.com/@web> Date: Wed, 21 Apr 2010 08:17:03 +0000 Subject: Missing links with no CGI --- doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn (limited to 'doc') diff --git a/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn b/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn new file mode 100644 index 000000000..d9f3d518f --- /dev/null +++ b/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn @@ -0,0 +1,5 @@ +When the CGI URL is not defined, links to missing pages appear as plain, unstyled text. I think the 'createlink' span should always wrap this text, even when the actual question mark linking to the CGI for the create action is missing. This ensures consistent styling regardless of whether the CGI is available or not (and is thus useful for example when the same wiki has clones with the CGI link and clones without). + +A proposed patch is available [on my ikiwiki clone](http://git.oblomov.eu/ikiwiki/patch/290d1b498f00f63e6d41218ddb76d87e68ed5081) + +[[!tag patch cgi]] -- cgit v1.2.3 From 5c855b2bcab82e4075d49713d53869857a4e9385 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 12:50:43 -0400 Subject: applied --- doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn b/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn index d9f3d518f..73213209a 100644 --- a/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn +++ b/doc/bugs/Links_to_missing_pages_should_always_be_styled.mdwn @@ -2,4 +2,4 @@ When the CGI URL is not defined, links to missing pages appear as plain, unstyle A proposed patch is available [on my ikiwiki clone](http://git.oblomov.eu/ikiwiki/patch/290d1b498f00f63e6d41218ddb76d87e68ed5081) -[[!tag patch cgi]] +[[!tag patch cgi done]] -- cgit v1.2.3 From 9c8761ba49b06a76a923eb91735f842f419d2916 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 14:27:12 -0400 Subject: add_autofile filename should be relative to srcdir --- doc/plugins/write.mdwn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 5190a26ed..404c3b44f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -972,13 +972,13 @@ Sometimes you may want to add a file to the `srcdir` as a result of content of other pages. For example, [[plugins/tag]] pages can be automatically created as needed. This function can be used to do that. -The three parameters are the filename to add, the name of the plugin, -and a callback function. The callback will be called if it is appropriate -to automatically add the file, and should then take care of creating it, -and doing anything else it needs to (such as checking it into revision -control). Note that the callback may not always be called. For example, -if an automatically added file is deleted by the user, ikiwiki will avoid -re-adding it again. +The three parameters are the filename to create (relative to the `srcdir`), +the name of the plugin, and a callback function. The callback will be +called if it is appropriate to automatically add the file, and should then +take care of creating it, and doing anything else it needs to (such as +checking it into revision control). Note that the callback may not always +be called. For example, if an automatically added file is deleted by the +user, ikiwiki will avoid re-adding it again. This function needs to be called during the scan hook, or earlier in the build process, in order to add the file early enough for it to be built. -- cgit v1.2.3 From e72973afdb3b08b1755295e348e223a7c51cf702 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" <http://hendry.iki.fi/@web> Date: Wed, 21 Apr 2010 19:07:32 +0000 Subject: debugging --- doc/bugs/Comments_dissapeared.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index 7ff1a012f..c7403f0f1 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -33,3 +33,15 @@ I have tried rebuilding on my squeeze system and still comments don't appear. An <http://natalian.org/comments/> I was worried is was due to a time skew problem I was experiencing on my VPS in the last month, though the time is right now and still comments do not appear on blog posts like <http://natalian.org/archives/2010/03/25/BBC_News_complaints/> + +# Getting closer + + hendry@webconverger templates$ for i in *.tmpl; do ./test-template.perl $i || echo $i has an error; done + HTML::Template->new() : At least one <TMPL_IF> or <TMPL_UNLESS> not terminated at end of file! at /usr/share/perl5/HTML/Template.pm line 2351. + page.tmpl has an error + hendry@webconverger templates$ cat test-template.perl + #!/usr/bin/perl + use HTML::Template; + my $htc = HTML::Template->new(filename => "$ARGV[0]"); + +I think the problem was before that it was `<TMPL_IF COMMENTS>` and now it is `<TMPL_IF NAME="COMMENTS">` ? -- cgit v1.2.3 From 9fa5f71034497043e2b5dbb2c40417aebd94e327 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 15:18:11 -0400 Subject: update; my branch is (partially) debugged now --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index ed681ac4d..63bcabaee 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -273,7 +273,7 @@ wrong direction. I've pushed an autotag branch of my own, which refactors things a bit. It is untested so far though. --[[Joey]] -* `verify_src_file` only called from Render.pm +* `verify_src_file` only called from Render.pm (actually, function removed) * Gets rid of `%del_files`. * Uses `%wikistate`. -- cgit v1.2.3 From 9ed523d762afd74c3004a07fc8ee12daa9354813 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" <http://hendry.iki.fi/@web> Date: Wed, 21 Apr 2010 19:21:38 +0000 Subject: --- doc/bugs/Comments_dissapeared.mdwn | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index c7403f0f1..830c3519f 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -34,14 +34,28 @@ I have tried rebuilding on my squeeze system and still comments don't appear. An I was worried is was due to a time skew problem I was experiencing on my VPS in the last month, though the time is right now and still comments do not appear on blog posts like <http://natalian.org/archives/2010/03/25/BBC_News_complaints/> -# Getting closer +# Debugging templates - hendry@webconverger templates$ for i in *.tmpl; do ./test-template.perl $i || echo $i has an error; done - HTML::Template->new() : At least one <TMPL_IF> or <TMPL_UNLESS> not terminated at end of file! at /usr/share/perl5/HTML/Template.pm line 2351. - page.tmpl has an error - hendry@webconverger templates$ cat test-template.perl +`sudo apt-get install libhtml-template-compiled-perl` + + hendry@webconverger templates$ cat test-template.perl #!/usr/bin/perl - use HTML::Template; - my $htc = HTML::Template->new(filename => "$ARGV[0]"); + use HTML::Template::Compiled; + local $HTML::Template::Compiled::DEBUG = 1; + my $htc = HTML::Template::Compiled->new( + filename => "$ARGV[0]", + ); + eval { + print $htc->output; + }; + if ($@) { + # reports as text + my $msg = $htc->debug_code; + # reports as a html table + my $msg_html = $htc->debug_code('html'); + } + hendry@webconverger templates$ ./test-template.perl page.tmpl + Missing closing tag for 'IF' atend of page.tmpl line 159 + I think the problem was before that it was `<TMPL_IF COMMENTS>` and now it is `<TMPL_IF NAME="COMMENTS">` ? -- cgit v1.2.3 From 204c0a63f3fd7673dac83da6aa5f9c9e3cc9a6c5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 15:22:05 -0400 Subject: document tag_autocreate --- debian/changelog | 2 ++ doc/plugins/tag.mdwn | 3 +++ doc/roadmap.mdwn | 1 + 3 files changed, 6 insertions(+) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index b7ec99463..d66b5e4d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low [ Joey Hess ] + * tag: Automatic creation of tag pages can now be enabled using + the tag_autocreate setting. (David Riebenbauer) * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) * comments: Fix missing entity encoding in title. * txt: Add a special case for robots.txt. diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 8ff70a069..bdf39d7e8 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,6 +8,9 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. +If the `tag_autocreate` setting is enabled, tag pages will automatically be +created as needed. + [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this page is tagged with the "tags" tag. diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 0c7bf2fa8..8e2a01827 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -78,6 +78,7 @@ Probably incomplete list: * Make pagespecs match relative by default? (see [[discussion]]) * Flip wikilinks? (see [[todo/link_plugin_perhaps_too_general?]]) * YADA format setup files per default? +* Enable `tag_autocreate` by default. In general, we try to use [[ikiwiki-transition]] or forced rebuilds on upgrade to deal with changes that break compatability. Some things that -- cgit v1.2.3 From 86e73e42e835821984fdf6dc5671dae06cec5f90 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" <http://hendry.iki.fi/@web> Date: Wed, 21 Apr 2010 19:48:31 +0000 Subject: --- doc/bugs/Comments_dissapeared.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/bugs/Comments_dissapeared.mdwn b/doc/bugs/Comments_dissapeared.mdwn index 830c3519f..787f18c98 100644 --- a/doc/bugs/Comments_dissapeared.mdwn +++ b/doc/bugs/Comments_dissapeared.mdwn @@ -59,3 +59,11 @@ I was worried is was due to a time skew problem I was experiencing on my VPS in I think the problem was before that it was `<TMPL_IF COMMENTS>` and now it is `<TMPL_IF NAME="COMMENTS">` ? + + + +# Solved + +A merge with the templates in master with my [html5](http://git.webconverger.org/?p=ikiwiki;a=shortlog;h=refs/heads/html5) branch looks like it has solved the problem. Also see [[bugs/html5_support]]. + +[[bugs/done]] -- cgit v1.2.3 From e3ea28f8c7fb9682d9e5bea32de835cee7605846 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 15:53:44 -0400 Subject: update, tag deletion bug --- ...uto-create_tag_pages_according_to_a_template.mdwn | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 63bcabaee..d7637ef1b 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -152,12 +152,12 @@ consider this a feature, not a bug) Todo/Bugs: * Will still create a page even if there's a page other than `$tag` under -`tagbase` satisfying the tag link. +`tagbase` satisfying the tag link. (details? --[[Joey]]) * Call from `IkiWiki.pm` to `Render.pm`, which adds a module dependency in the -wrong direction. +wrong direction. (fixed --[[Joey]] ) * Add files to RCS. * Unit tests. -* Proper documentation. +* Proper documentation. (fixed (mostly) --[[Joey]]) --[[David_Riebenbauer]] @@ -273,9 +273,17 @@ wrong direction. I've pushed an autotag branch of my own, which refactors things a bit. It is untested so far though. --[[Joey]] -* `verify_src_file` only called from Render.pm (actually, function removed) -* Gets rid of `%del_files`. -* Uses `%wikistate`. +--- + +Known bugs in my branch (probably also in David's): + +* Does not remember that a tag was deleted. + + The code to do that only works if, at the same time the tag + is deleted, one of the pages that has the tag is modified. + That's because `add_autofile` needs to be called before it's + aware the autofile exists, and if it's not aware, it does not + record it as a deleted autofile. [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) -- cgit v1.2.3 From 6a30b45e7521f98a3e94b04ff46eeeb7f80774ca Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 16:07:23 -0400 Subject: update --- ...o-create_tag_pages_according_to_a_template.mdwn | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index d7637ef1b..f10c2cdee 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -250,6 +250,12 @@ wrong direction. (fixed --[[Joey]] ) >>>> Yes, I forgot about that and that is a bug. I'll fix that. >>>> --[[David_Riebenbauer]] +>>>>> In my branch, it keeps a list of autofiles that were created, +>>>>> not deleted. And I think that turns out to be necessary, really. +>>>>> However, I see no way to clean out that list on deletion and +>>>>> manual recreation -- it still needs to remember it was once an autofile, +>>>>> in order to avoid recreating it if it's deleted yet again. --[[Joey]] + >>> * `autoindex` forgets that a page was deleted when it's no longer needed >>> anyway (this may be harder for `autotag`?) @@ -264,6 +270,13 @@ wrong direction. (fixed --[[Joey]] ) >>>> Good suggestion. Adding the files to RCS is on my todo list anyway. >>>> --[[David_Riebenbauer]] +>>>>> I think it may be better to allow the `add_autofile` caller +>>>>> to specify if it is added to RCS. In my branch, it can do +>>>>> so by just making the callback it registers call `rcs_add`; +>>>>> and I have tag do this. Other plugins might want autofiles +>>>>> that do not get checked in, conceivably. +>>>>> --[[Joey]] + > Regarding the call from `IkiWiki.pm` to `Render.pm`, wouldn't this be > quite easy to solve by moving `verify_src_file` to IkiWiki.pm? --[[smcv]] @@ -271,19 +284,8 @@ wrong direction. (fixed --[[Joey]] ) [[!template id=gitbranch branch=origin/autotag author="[[Joey]]"]] I've pushed an autotag branch of my own, which refactors -things a bit. It is untested so far though. --[[Joey]] - ---- - -Known bugs in my branch (probably also in David's): - -* Does not remember that a tag was deleted. - - The code to do that only works if, at the same time the tag - is deleted, one of the pages that has the tag is modified. - That's because `add_autofile` needs to be called before it's - aware the autofile exists, and if it's not aware, it does not - record it as a deleted autofile. +things a bit and fixes bugs around deletion/recreation. +I've tested it somewhat. --[[Joey]] [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) -- cgit v1.2.3 From 760b840e8f5af9e8ea0197bda783fd9b54a8ab7c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 16:19:16 -0400 Subject: update --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index f10c2cdee..724a52ec9 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -281,6 +281,7 @@ wrong direction. (fixed --[[Joey]] ) > quite easy to solve by moving `verify_src_file` to IkiWiki.pm? --[[smcv]] >> True. I'll do that. --[[David_Riebenbauer]] +>> Fixed in my branch --[[Joey]] [[!template id=gitbranch branch=origin/autotag author="[[Joey]]"]] I've pushed an autotag branch of my own, which refactors -- cgit v1.2.3 From b21db4197802ebd4d268b81b3df9448aa8108742 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 21 Apr 2010 20:23:19 +0000 Subject: elide an older patch that's no longer under discussion --- ...o-create_tag_pages_according_to_a_template.mdwn | 81 +--------------------- 1 file changed, 1 insertion(+), 80 deletions(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index f10c2cdee..e993a9aa4 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -15,86 +15,7 @@ A new setting is used to enable or disable auto-create tag pages, `tag_autocreat The new tag file is created during the preprocess phase. The new tag file is then complied during the change phase. -_tag.pm from version 3.01_ - - - --- tag.pm 2009-02-06 10:26:03.000000000 -0700 - +++ tag_new.pm 2009-02-06 12:17:19.000000000 -0700 - @@ -14,6 +14,7 @@ - hook(type => "preprocess", id => "tag", call => \&preprocess_tag, scan => 1); - hook(type => "preprocess", id => "taglink", call => \&preprocess_taglink, scan => 1); - hook(type => "pagetemplate", id => "tag", call => \&pagetemplate); - + hook(type => "change", id => "tag", call => \&change); - } - - sub getopt () { - @@ -36,6 +37,36 @@ - safe => 1, - rebuild => 1, - }, - + tag_autocreate => { - + type => "boolean", - + example => 0, - + description => "Auto-create the new tag pages, uses autotagpage.tmpl ", - + safe => 1, - + rebulid => 1, - + }, - +} - + - +my $autocreated_page = 0; - + - +sub gen_tag_page($) { - + my $tag=shift; - + - + my $tag_file=$tag.'.'.$config{default_pageext}; - + return if (-f $config{srcdir}.$tag_file); - + - + my $template=template("autotagpage.tmpl"); - + $template->param(tag => $tag); - + writefile($tag_file, $config{srcdir}, $template->output); - + $autocreated_page = 1; - + - + if ($config{rcs}) { - + IkiWiki::disable_commit_hook(); - + IkiWiki::rcs_add($tag_file); - + IkiWiki::rcs_commit_staged( - + gettext("Automatic tag page generation"), - + undef, undef); - + IkiWiki::enable_commit_hook(); - + } - } - - sub tagpage ($) { - @@ -47,6 +78,10 @@ - $tag=~y#/#/#s; # squash dups - } - - + if (defined $config{tag_autocreate} && $config{tag_autocreate} ) { - + gen_tag_page($tag); - + } - + - return $tag; - } - - @@ -125,4 +160,18 @@ - } - } - - +sub change(@) { - + return unless($autocreated_page); - + $autocreated_page = 0; - + - + # This refresh/saveindex is to complie the autocreated tag pages - + IkiWiki::refresh(); - + IkiWiki::saveindex(); - + - + # This refresh/saveindex is to fix the Tags link - + # With out this additional refresh/saveindex the tag link displays ?tag - + IkiWiki::refresh(); - + IkiWiki::saveindex(); - +} - + - +*see git history of this page if you want the patch --[[smcv]]* This uses a [[template|wikitemplates]] called `autotagpage.tmpl`, here is my template file: -- cgit v1.2.3 From ffe9fd8eb14cedaf31477dbce72c28dd38cc78ae Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Wed, 21 Apr 2010 20:30:14 +0000 Subject: suppressing auto-creation can be quite counter-intuitive --- ...o-create_tag_pages_according_to_a_template.mdwn | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index e993a9aa4..5a1aff928 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -177,6 +177,32 @@ wrong direction. (fixed --[[Joey]] ) >>>>> manual recreation -- it still needs to remember it was once an autofile, >>>>> in order to avoid recreating it if it's deleted yet again. --[[Joey]] +>>>>>> Are these really the semantics we want? It seems strange to me +>>>>>> that this: +>>>>>> +>>>>>> * tag a page as foo +>>>>>> * tags/foo automatically appears +>>>>>> * delete tags/foo +>>>>>> * create tags/foo manually +>>>>>> * delete tags/foo again +>>>>>> * tags/foo isn't automatically created +>>>>>> +>>>>>> isn't the same as this: +>>>>>> +>>>>>> * create tags/foo +>>>>>> * delete tags/foo +>>>>>> * tag a page as foo +>>>>>> * tags/foo automatically appears +>>>>>> +>>>>>> or even this: +>>>>>> +>>>>>> * create tags/foo +>>>>>> * tag a page as foo +>>>>>> * delete tags/foo +>>>>>> * tags/foo automatically appears (?) +>>>>>> +>>>>>> --[[smcv]] + >>> * `autoindex` forgets that a page was deleted when it's no longer needed >>> anyway (this may be harder for `autotag`?) -- cgit v1.2.3 From 463ba55dce0d07e97fa44500146e850f72d7ea24 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 16:33:03 -0400 Subject: note re includes --- doc/todo/auto_rebuild_on_template_change.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index b5c107915..a112cb9da 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -35,6 +35,10 @@ suffice. (This would also help to clear up the tricky disctinction between wikitemplates and in-wiki templates.) +Note also that when using templates from "$srcdir/templates/", `no_includes` +needs to be set. Currently this is done by the two plugins that use +such templates, while includes are allowed in `templatedir`. + > But would this require that templates be parseable as wiki pages? Because that would be a nuisance. --[[KathrynAndersen]] >> It would be better for them not to be rendered separately at all. -- cgit v1.2.3 From 1336a3270b664dbd548c6ad66ec981d5fa24a953 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 16:36:58 -0400 Subject: response --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 254ec42b5..32870dd3d 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -203,6 +203,12 @@ wrong direction. (fixed --[[Joey]] ) >>>>>> >>>>>> --[[smcv]] +>>>>>>> I agree that the last of these is not desired. It could be avoided +>>>>>>> by extending the list of autofiles to include those that were not +>>>>>>> created due to the file/page already existing. +>>>>>>> +>>>>>>> Hmm, that would fix the previous scenario too. --[[Joey]] + >>> * `autoindex` forgets that a page was deleted when it's no longer needed >>> anyway (this may be harder for `autotag`?) -- cgit v1.2.3 From 129cd00bdb03e32df8645b12138cb4c79952775e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 20:15:11 -0400 Subject: remove broken ./tag support The commit that added the (working) support for using /tag to override tagbase also tried to make ./tag work. Problem is, tags are links, and ./foo is not a valid link (though I think there's a wishlist about it). So, using ./tag really resulted in tag creation links that led to a "bad page name" error. And even if the tag were created in the right place, the link didn't go to it. --- IkiWiki/Plugin/tag.pm | 2 +- doc/ikiwiki/directive/tag.mdwn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 62e0cc3b8..8ec08e936 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -39,7 +39,7 @@ sub getsetup () { sub tagpage ($) { my $tag=shift; - if ($tag !~ m{^\.?/} && + if ($tag !~ m{^/} && defined $config{tagbase}) { $tag="/".$config{tagbase}."/".$tag; $tag=~y#/#/#s; # squash dups diff --git a/doc/ikiwiki/directive/tag.mdwn b/doc/ikiwiki/directive/tag.mdwn index 64736f8cd..807a96f25 100644 --- a/doc/ikiwiki/directive/tag.mdwn +++ b/doc/ikiwiki/directive/tag.mdwn @@ -28,7 +28,7 @@ into the `link()` [[ikiwiki/PageSpec]] you use: e.g., if your tagbase is If you want to override the tagbase for a particular tag, you can use something like this: - \[[!tag ./foo]] + \[[!tag /foo]] \[[!taglink /foo]] [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From d048e9c64aca24b8e064aaf1608862b50c427de2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 20:39:20 -0400 Subject: turn on tag_autocreate by default if tagbase is set --- IkiWiki/Plugin/tag.pm | 5 +++-- debian/NEWS | 4 ++++ doc/ikiwiki/directive/tag.mdwn | 3 ++- doc/plugins/tag.mdwn | 8 ++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index cd7ecc212..62f030f4e 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -36,7 +36,7 @@ sub getsetup () { }, tag_autocreate => { type => "boolean", - example => 0, + example => 1, description => "autocreate new tag pages?", safe => 1, rebuild => undef, @@ -67,7 +67,8 @@ sub htmllink_tag ($$$;@) { sub gentag ($) { my $tag=shift; - if ($config{tag_autocreate}) { + if ($config{tag_autocreate} || + ($config{tagbase} && ! defined $config{tag_autocreate})) { my $tagpage=taglink($tag); if ($tagpage=~/^\.\/(.*)/) { $tagpage=$1; diff --git a/debian/NEWS b/debian/NEWS index 9fd882ad2..8b87bc601 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -11,6 +11,10 @@ ikiwiki (3.20100406) unstable; urgency=low not regular wikilinks. If your wiki accidentially relied on the old, buggy behavior, you might need to change pagespecs to use `link()`. + Tag pages can automatically be created as new tags are used. This + feature is enabled by default if you have configured a tagbase. It + can be turned on or off using the `tag_autocreate` setting. + The title_natural sort method (as used by the inline directive, etc) have been moved to the new sortnaturally plugin, which is not enabled by default since it requires the Sort::Naturally perl module. diff --git a/doc/ikiwiki/directive/tag.mdwn b/doc/ikiwiki/directive/tag.mdwn index 807a96f25..c8d9b9816 100644 --- a/doc/ikiwiki/directive/tag.mdwn +++ b/doc/ikiwiki/directive/tag.mdwn @@ -19,7 +19,8 @@ instead: Note that if the wiki is configured to use a tagbase, then the tags will be located under a base directory, such as "tags/". This is a useful way to avoid having to write the full path to tags, if you want to keep them -grouped together out of the way. +grouped together out of the way. Also, since ikiwiki then knows where to put +tags, it will automatically create tag pages when new tags are used. Bear in mind that specifying a tagbase means you will need to incorporate it into the `link()` [[ikiwiki/PageSpec]] you use: e.g., if your tagbase is diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index bdf39d7e8..8e1286e62 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,8 +8,12 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. -If the `tag_autocreate` setting is enabled, tag pages will automatically be -created as needed. +The `tagbase` setting can be used to make tags default to being put in a +particular subdirectory. + +The `tag_autocreate` setting can be used to control whether new tag pages +are created as needed. It defaults to being done only if a `tagbase` is +set. [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this -- cgit v1.2.3 From 557912c723a6e8df320a3c6dae461956cf893f10 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 20:47:18 -0400 Subject: my autotag branch seems ready --- doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 32870dd3d..b05e1db3d 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -239,7 +239,7 @@ wrong direction. (fixed --[[Joey]] ) [[!template id=gitbranch branch=origin/autotag author="[[Joey]]"]] I've pushed an autotag branch of my own, which refactors things a bit and fixes bugs around deletion/recreation. -I've tested it somewhat. --[[Joey]] +I've tested it fairly thouroughly. --[[Joey]] [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe) [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748) -- cgit v1.2.3 From 6c5f315970b0e7a8473e9a1151229459781192a8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 21:38:58 -0400 Subject: argh. head exploding. --- doc/bugs/depends_simple_mixup.mdwn | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 2603ff04c..2ebd53e85 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -18,6 +18,42 @@ not noticing that bugs dependeded on the page and needs to be updated. Ok.. Turns out this was not a problem with the actual influences calculation or dependency calculation code. Whew! `match_link` -just didn't set the influence correctly when failing. [[fixed|done]] +just didn't set the influence correctly when failing. fixed --[[Joey]] + +--- + +Update: Reopening this because the fix for it rather sucks. + +I made `match_link` return on failure an influence of +type DEPEND_LINKS. So, a tag page that inlines `tagged(foo)` +gets a `depends_simple` built up that contains link dependencies for +*every* page in the wiki. A very bloaty way to represent the dependency! + +Per [[dependency_types]], `link(done)` only needs to list in +`depends_simple` the pages that currently match. If a page is modified +to add the link, the regular dependency calculation code notices that +a new page matches. If a page that had the link is modified to remove it, +the `depends_simple` lets ikiwiki remember that the now non-matching page +matched before. + +Where that fell down was `!link(done)`. A page matching that was not added +to `depends_simple`, because the `link(done)` did not match it. If the page +is modified to add the link, the regular dependency calculation code +didn't notice, since the pagespec no longer matched. + +In this case, `depends_simple` needs to contain all pages +that do *not* match `link_done)`, but before my change, it contained +all pages that *do* match. After my change, it contained all pages. + +So, seems what is needed is a way for influence info to be manipulated by +the boolean operations that are applied. One way would be to have two +sets of influences be returned, one for successful matches, and one for +failed matches. Normally, these would be the same. For successful +`match_link`, the successful influence would be the page. +For failed `match_link`, the failed influence would be the page. + +Then, when NOTting a `*Reason`, swap the two sets of influences. +When ANDing/ORing, combine the individual sets. Querying the object for +influences should return only the successful influences. -- cgit v1.2.3 From 8cf6b7abf87818f9063b6ef672f20125de75249c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 21:42:18 -0400 Subject: link fix --- doc/bugs/depends_simple_mixup.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 2ebd53e85..4fe69a90a 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -31,7 +31,7 @@ type DEPEND_LINKS. So, a tag page that inlines `tagged(foo)` gets a `depends_simple` built up that contains link dependencies for *every* page in the wiki. A very bloaty way to represent the dependency! -Per [[dependency_types]], `link(done)` only needs to list in +Per [[todo/dependency_types]], `link(done)` only needs to list in `depends_simple` the pages that currently match. If a page is modified to add the link, the regular dependency calculation code notices that a new page matches. If a page that had the link is modified to remove it, -- cgit v1.2.3 From 09ff797682fd89380a4a71564ec02649af99851e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 21:55:12 -0400 Subject: more wrongness --- doc/bugs/depends_simple_mixup.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 4fe69a90a..472de6349 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -57,3 +57,8 @@ For failed `match_link`, the failed influence would be the page. Then, when NOTting a `*Reason`, swap the two sets of influences. When ANDing/ORing, combine the individual sets. Querying the object for influences should return only the successful influences. + +In light of this, commit f2b3d1341447cbf29189ab490daae418fbe5d02d seems +thuroughly wrong. So, what about influence info for other matches +like `!author(foo)` etc? Currently, none is returned, but it should +be a content influence. What about backlink influence data? -- cgit v1.2.3 From 17a89d3d19f3a04ca2686ff18df127e5afaf9577 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 21:57:12 -0400 Subject: update --- doc/plugins/tag/discussion.mdwn | 1 + doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 2 ++ 2 files changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/tag/discussion.mdwn b/doc/plugins/tag/discussion.mdwn index 03dcb7b2f..dfd749252 100644 --- a/doc/plugins/tag/discussion.mdwn +++ b/doc/plugins/tag/discussion.mdwn @@ -28,3 +28,4 @@ See [[todo/auto-create tag pages according to a template]] -- Jeremy Schultz <jeremy.schultz@uleth.ca> +`tag_autocreate` can now enable this. --[[Joey]] diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 32870dd3d..1e0a910f4 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -247,3 +247,5 @@ I've tested it somewhat. --[[Joey]] [da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0 (commitdiff for da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0) [a358d74bef51dae31332ff27e897fe04834571e6]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=a358d74bef51dae31332ff27e897fe04834571e6 (commitdiff for a358d74bef51dae31332ff27e897fe04834571e6) [981400177d68a279f485727be3f013e68f0bf691]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=981400177d68a279f485727be3f013e68f0bf691 (commitdiff for 981400177d68a279f485727be3f013e68f0bf691) + +[[!tag done]] -- cgit v1.2.3 From 13325317a32529e02769baa5e61e6c401c675b27 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 22:04:03 -0400 Subject: backlink influence data seems ok --- doc/bugs/depends_simple_mixup.mdwn | 2 +- t/pagespec_match_list.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 472de6349..e7b48f802 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -61,4 +61,4 @@ influences should return only the successful influences. In light of this, commit f2b3d1341447cbf29189ab490daae418fbe5d02d seems thuroughly wrong. So, what about influence info for other matches like `!author(foo)` etc? Currently, none is returned, but it should -be a content influence. What about backlink influence data? +be a content influence. (Backlink influence data is ok.) diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 05dc012fe..ee5d60f88 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 94; +use Test::More tests => 107; BEGIN { use_ok("IkiWiki"); } @@ -80,7 +80,7 @@ foreach my $spec ("* and link(bar)", "* or link(bar)") { } # a pagespec with backlinks() will add as an influence the page with the links -foreach my $spec ("bar or (backlink(foo) and !*.png)", "backlink(foo)") { +foreach my $spec ("bar or (backlink(foo) and !*.png)", "backlink(foo)", "!backlink(foo)") { pagespec_match_list("foo2", $spec, deptype => deptype("presence")); ok($IkiWiki::depends{foo2}{$spec} & $IkiWiki::DEPEND_PRESENCE); ok(! ($IkiWiki::depends{foo2}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_LINKS))); -- cgit v1.2.3 From c98414e192285b2607ee9fcb27f0e8e00db5fb26 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 21 Apr 2010 23:08:54 -0400 Subject: added a test case for this bug Further analysis suggests fixing this might not be as dreadful as I first thought! --- doc/bugs/depends_simple_mixup.mdwn | 24 ++++++++++++++++++++++-- t/pagespec_match_list.t | 20 +++++++++++++++++++- 2 files changed, 41 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index e7b48f802..79bfa8bdc 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -44,9 +44,11 @@ is modified to add the link, the regular dependency calculation code didn't notice, since the pagespec no longer matched. In this case, `depends_simple` needs to contain all pages -that do *not* match `link_done)`, but before my change, it contained +that do *not* match `link(done)`, but before my change, it contained all pages that *do* match. After my change, it contained all pages. +---- + So, seems what is needed is a way for influence info to be manipulated by the boolean operations that are applied. One way would be to have two sets of influences be returned, one for successful matches, and one for @@ -58,7 +60,25 @@ Then, when NOTting a `*Reason`, swap the two sets of influences. When ANDing/ORing, combine the individual sets. Querying the object for influences should return only the successful influences. -In light of this, commit f2b3d1341447cbf29189ab490daae418fbe5d02d seems +---- + +Would it be possible to avoid the complication of maintianing two sets of +influence info? + +Well, notice that the influence of `pagespec_match($page, "link(done)")` +is $page. Iff the match succeeds. + +Also, the influence of `pagespec_match($page, "!link(done)")` is +$page. Iff the (overall) match succeeds. + +Does that hold for all cases? If so, the code that populates +`depends_simple` could just test if the pagespec was successful, and +if not, avoid adding $page influences, while still adding any other, +non-$page influences. + +---- + +Hmm, commit f2b3d1341447cbf29189ab490daae418fbe5d02d seems thuroughly wrong. So, what about influence info for other matches like `!author(foo)` etc? Currently, none is returned, but it should be a content influence. (Backlink influence data is ok.) diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index ee5d60f88..27546e6ca 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 107; +use Test::More tests => 115; BEGIN { use_ok("IkiWiki"); } @@ -27,6 +27,8 @@ IkiWiki::checkconfig(); $IkiWiki::pagectime{foo} = 2; $IkiWiki::pagectime{foo2} = 2; $IkiWiki::pagectime{foo3} = 1; +$IkiWiki::pagectime{foo4} = 1; +$IkiWiki::pagectime{foo5} = 1; $IkiWiki::pagectime{bar} = 3; $IkiWiki::pagectime{"post/1"} = 6; $IkiWiki::pagectime{"post/2"} = 6; @@ -69,12 +71,28 @@ foreach my $spec ("* and link(bar)", "* or link(bar)") { ok($IkiWiki::depends{foo2}{$spec} & $IkiWiki::DEPEND_PRESENCE); ok(! ($IkiWiki::depends{foo2}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_LINKS))); ok($IkiWiki::depends_simple{foo2}{foo2} == $IkiWiki::DEPEND_LINKS); + ok($IkiWiki::depends_simple{foo2}{foo} != $IkiWiki::DEPEND_LINKS); %IkiWiki::depends_simple=(); %IkiWiki::depends=(); pagespec_match_list("foo3", $spec, deptype => deptype("links")); ok($IkiWiki::depends{foo3}{$spec} & $IkiWiki::DEPEND_LINKS); ok(! ($IkiWiki::depends{foo3}{$spec} & ($IkiWiki::DEPEND_CONTENT | $IkiWiki::DEPEND_PRESENCE))); ok($IkiWiki::depends_simple{foo3}{foo3} == $IkiWiki::DEPEND_LINKS); + ok($IkiWiki::depends_simple{foo3}{foo} != $IkiWiki::DEPEND_LINKS); + %IkiWiki::depends_simple=(); + %IkiWiki::depends=(); +} +# Above we tested that a link pagespec is influenced +# by the pages that currently contain the link. + +# Oppositely, a pagespec that tests for pages that do not have a link +# is not influenced by pages that currently contain the link, but +# is instead influenced by pages that currently do not (but that +# could be changed to have it). +foreach my $spec ("* and !link(bar)", "* and !(!(!link(bar)))") { + pagespec_match_list("foo2", $spec); + ok($IkiWiki::depends_simple{foo2}{foo2} != $IkiWiki::DEPEND_LINKS); + ok($IkiWiki::depends_simple{foo2}{foo} == $IkiWiki::DEPEND_LINKS); %IkiWiki::depends_simple=(); %IkiWiki::depends=(); } -- cgit v1.2.3 From 2b175d7c1fe997277800c0d501332e96de475c6d Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 00:12:15 -0400 Subject: improved fix for depends_simple_mixup Avoid adding the page matched against as an influence for currently failing pagespec matches, while still adding any other influences. This avoids bloating depends_simple with lots of bogus influences when matching eg, "!link(done)". It's only necessary for the page being tested to be an influence of that if the page matches. --- IkiWiki.pm | 14 +++++++++++++- doc/bugs/depends_simple_mixup.mdwn | 6 +++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0791e1e75..509f9ba2e 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1818,10 +1818,12 @@ sub add_depends ($$;$) { foreach my $p (keys %pagesources) { my $r=$sub->($p, location => $page); my $i=$r->influences; + my $static=$r->influences_static; foreach my $k (keys %$i) { + next unless $r || $static || $k eq $page; $depends_simple{$page}{lc $k} |= $i->{$k}; } - last if $r->influences_static; + last if $static; } $depends{$page}{$pagespec} |= $deptype; @@ -2136,6 +2138,9 @@ sub pagespec_match_list ($$;@) { my $r=$sub->($p, %params, location => $page); error(sprintf(gettext("cannot match pages: %s"), $r)) if $r->isa("IkiWiki::ErrorReason"); + unless ($r) { + $r->remove_influence($p); + } $accum |= $r; if ($r) { push @matches, $p; @@ -2232,6 +2237,13 @@ sub merge_influences { } } +sub remove_influence { + my $this=shift; + my $torm=shift; + + delete $this->[1]{$torm}; +} + package IkiWiki::ErrorReason; our @ISA = 'IkiWiki::FailReason'; diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 79bfa8bdc..a5910d02e 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -81,4 +81,8 @@ non-$page influences. Hmm, commit f2b3d1341447cbf29189ab490daae418fbe5d02d seems thuroughly wrong. So, what about influence info for other matches like `!author(foo)` etc? Currently, none is returned, but it should -be a content influence. (Backlink influence data is ok.) +be a content influence. (Backlink influence data seems ok.) + +---- + +[[done]] again! -- cgit v1.2.3 From 170725dc3e6dd99397959c50d8f33bb0c7926f3a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 00:40:05 -0400 Subject: update --- doc/ikiwiki/directive/pagestats/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/pagestats/discussion.mdwn b/doc/ikiwiki/directive/pagestats/discussion.mdwn index d72b4058d..99029e88e 100644 --- a/doc/ikiwiki/directive/pagestats/discussion.mdwn +++ b/doc/ikiwiki/directive/pagestats/discussion.mdwn @@ -13,3 +13,6 @@ Thanks > The approach that [PmWiki](http://www.pmwiki.org) takes is that it enables the optional auto-creation of (empty) pages which match a particular "group" (set of sub-pages); thus one could set all the "tags/*" pages to be auto-created, creating a new tags/foo page the first time the \[[!tag foo]] directive is used. See [[todo/auto-create_tag_pages_according_to_a_template]] for more discussion on this idea. > -- [[KathrynAndersen]] + +> Update: Ikiwiki can auto-create tags now, though it only defaults to +> doing so when tagbase is set. --[[Joey]] -- cgit v1.2.3 From 1f5d1dff615b8741a2104dad1d42c13b5b4f6d02 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 00:42:53 -0400 Subject: update --- doc/roadmap.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 8e2a01827..c126fd585 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -78,7 +78,8 @@ Probably incomplete list: * Make pagespecs match relative by default? (see [[discussion]]) * Flip wikilinks? (see [[todo/link_plugin_perhaps_too_general?]]) * YADA format setup files per default? -* Enable `tag_autocreate` by default. +* Enable tagbase by default (so that tag autocreation will work by default). + Note that this is already done for wikis created by `auto-blog.setup`. In general, we try to use [[ikiwiki-transition]] or forced rebuilds on upgrade to deal with changes that break compatability. Some things that -- cgit v1.2.3 From ad296f90c3b99bb5e033f769c44e5653f518f264 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 13:45:25 -0400 Subject: add --- ...dittemplate_should_look_in_templates_directory_by_default.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/todo/edittemplate_should_look_in_templates_directory_by_default.mdwn (limited to 'doc') diff --git a/doc/todo/edittemplate_should_look_in_templates_directory_by_default.mdwn b/doc/todo/edittemplate_should_look_in_templates_directory_by_default.mdwn new file mode 100644 index 000000000..4bc10e432 --- /dev/null +++ b/doc/todo/edittemplate_should_look_in_templates_directory_by_default.mdwn @@ -0,0 +1,8 @@ +[[plugins/edittemplate]] looks for the specified template relative to the +page the directive appears on. Which can be handy, eg, make a +blog/mytemplate and put the directive on blog, and it will find +"mytemplate". However, it can also be confusing, since other templates +always are looked for in `templates/`. + +I think it should probably fall back to looking for `templates/$foo`. +--[[Joey]] -- cgit v1.2.3 From 584391aedd2f5392db7e9d3d46cf202d6cb8e951 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 14:07:45 -0400 Subject: clarify --- doc/plugins/write.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 404c3b44f..9e8c59f63 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -315,9 +315,9 @@ a new custom parameter to the template. This hook allows plugins to change the [[template|wikitemplates]] that is used for a page in the wiki. The hook is passed a "page" parameter, and -should return the name of the template file to use, or undef if it doesn't -want to change the default ("page.tmpl"). Template files are looked for in -/usr/share/ikiwiki/templates by default. +should return the name of the template file to use (relative to the +template directory), or undef if it doesn't want to change the default +("page.tmpl"). ### sanitize -- cgit v1.2.3 From 23d62f42bd8fe18087cd293962a79d937cf5a3bc Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 14:35:00 -0400 Subject: remove add_templates option Templates are moving into the srcdir, and will also be searched for in configured underlays, so this is redundant. --- IkiWiki.pm | 9 +-------- IkiWiki/Plugin/underlay.pm | 11 ----------- doc/plugins/underlay.mdwn | 6 ------ 3 files changed, 1 insertion(+), 25 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index ec8b32a63..c2c2337b4 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -157,13 +157,6 @@ sub getsetup () { safe => 0, # path rebuild => 1, }, - templatedirs => { - type => "internal", - default => [], - description => "additional directories containing template files", - safe => 0, - rebuild => 0, - }, underlaydir => { type => "string", default => "$installdir/share/ikiwiki/basewiki", @@ -1661,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $template=shift; - foreach my $dir ($config{templatedir}, @{$config{templatedirs}}, + foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { return "$dir/$template" if -e "$dir/$template"; } diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 116fe7324..3ea19c635 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -27,14 +27,6 @@ sub getsetup () { safe => 0, rebuild => 1, }, - add_templates => { - type => "string", - example => ["$ENV{HOME}/.ikiwiki/templates"], - description => "extra template directories to add", - advanced => 1, - safe => 0, - rebuild => 1, - }, } sub checkconfig () { @@ -43,9 +35,6 @@ sub checkconfig () { add_underlay($dir); } } - if ($config{add_templates}) { - push @{$config{templatedirs}}, @{$config{add_templates}}; - } } 1; diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn index 8836a394c..0cf819472 100644 --- a/doc/plugins/underlay.mdwn +++ b/doc/plugins/underlay.mdwn @@ -12,9 +12,3 @@ revision control, like photos or software releases. Directories in `add_underlays` should usually be absolute. If relative, they're interpreted as relative to the parent directory of the basewiki underlay, which is probably not particularly useful in this context. - --- - -This plugin also adds an `add_templates` option to the setup file. -Its value is a list of template directories to look for template files in, -if they are not present in the `templatedir`. -- cgit v1.2.3 From 8eac7c2ad4966bdf2a1ea003df9e356da4c4e6bd Mon Sep 17 00:00:00 2001 From: "http://seph.myopenid.com/" <http://seph.myopenid.com/@web> Date: Thu, 22 Apr 2010 19:15:42 +0000 Subject: --- doc/ikiwiki/directive/map/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/map/discussion.mdwn b/doc/ikiwiki/directive/map/discussion.mdwn index f6eaa6b80..a39862347 100644 --- a/doc/ikiwiki/directive/map/discussion.mdwn +++ b/doc/ikiwiki/directive/map/discussion.mdwn @@ -83,3 +83,9 @@ Is there any way to do that? I don't mind mucking around with `\[[!meta]]` on e >>> I think that the ideas and code in >>> [[todo/tracking_bugs_with_dependencies]] might also handle this case. >>> --[[Joey]] + +---- + +I feel like this should be obvious, but I can't figure out how to sort numerically. + +I have `map pages="./* and !*/Discussion and !*/sidebar"` and a bunch of pages with names like 1, 2, 3, 11, 12, 1/1.1, 12/12.3 etc. I want to sort them numerically. I see lots of conversation implying there's a simple way to do it, but not how. -- cgit v1.2.3 From 418670c7e85ca32252b82b505ba6bb907229306e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" <http://smcv.pseudorandom.co.uk/@web> Date: Thu, 22 Apr 2010 19:28:31 +0000 Subject: map can't currently change sort ordering --- doc/ikiwiki/directive/map/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/ikiwiki/directive/map/discussion.mdwn b/doc/ikiwiki/directive/map/discussion.mdwn index a39862347..b7ac17b1a 100644 --- a/doc/ikiwiki/directive/map/discussion.mdwn +++ b/doc/ikiwiki/directive/map/discussion.mdwn @@ -89,3 +89,9 @@ Is there any way to do that? I don't mind mucking around with `\[[!meta]]` on e I feel like this should be obvious, but I can't figure out how to sort numerically. I have `map pages="./* and !*/Discussion and !*/sidebar"` and a bunch of pages with names like 1, 2, 3, 11, 12, 1/1.1, 12/12.3 etc. I want to sort them numerically. I see lots of conversation implying there's a simple way to do it, but not how. + +> No, you can't: map can't currently use a non-default sort order. If it +> could, then you could use [[plugins/sortnaturally]]. There's a +> [[feature_request|todo/sort_parameter_for_map_plugin_and_directive]]; +> [[a_bug_references_it|bugs/map_sorts_by_pagename_and_not_title_when_show=title_is_used]]. +> --[[smcv]] -- cgit v1.2.3 From abd233931247ef38f1b084afd5906619f02c13b6 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 15:34:32 -0400 Subject: look for templates in srcdir and underlays, first This entailed changing template_params; it no longer takes the template filename as its first parameter. Add template_depends to api and replace calls to template() with template_depends() in appropriate places, where a dependency should be added on the template. Other plugins don't use template(), so will need further work. Also, includes are disabled for security. Enabling includes only when using templates from the templatedir would be nice, but would add a lot of complexity to the implementation. --- IkiWiki.pm | 59 +++++++++++++++++++++++++++------------------- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 2 +- IkiWiki/Plugin/google.pm | 2 +- IkiWiki/Plugin/inline.pm | 22 ++++++++++------- IkiWiki/Plugin/search.pm | 2 +- IkiWiki/Render.pm | 4 +++- doc/plugins/write.mdwn | 8 +++++++ 8 files changed, 63 insertions(+), 38 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index c2c2337b4..1327e4db5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -18,8 +18,8 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %autofiles}; use Exporter q{import}; -our @EXPORT = qw(hook debug error template htmlpage deptype - add_depends pagespec_match pagespec_match_list bestlink +our @EXPORT = qw(hook debug error htmlpage template template_depends + deptype add_depends pagespec_match pagespec_match_list bestlink htmllink readfile writefile pagetype srcfile pagename displaytime will_render gettext ngettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile @@ -1652,47 +1652,58 @@ sub saveindex () { } sub template_file ($) { - my $template=shift; + my $name=shift; + my $template=srcfile("templates/$name", 1); + return $template if defined $template; + foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { - return "$dir/$template" if -e "$dir/$template"; + return "$dir/$name" if -e "$dir/$name"; } return; } sub template_params (@) { - my $filename=template_file(shift); - - if (! defined $filename) { - return if wantarray; - return ""; - } + filter => sub { + my $text_ref = shift; + ${$text_ref} = decode_utf8(${$text_ref}); + }, + loop_context_vars => 1, + die_on_bad_params => 0, + @_, + no_includes => 1, +} - my @ret=( - filter => sub { - my $text_ref = shift; - ${$text_ref} = decode_utf8(${$text_ref}); - }, - filename => $filename, - loop_context_vars => 1, - die_on_bad_params => 0, +sub template ($;@) { + require HTML::Template; + return HTML::Template->new(template_params( + filename => template_file(shift), @_ - ); - return wantarray ? @ret : {@ret}; + )); } -sub template ($;@) { +sub template_depends ($$;@) { + my $name=shift; + my $page=shift; + + if (defined $page) { + add_depends($page, "templates/$name"); + } + my $filename=template_file($name); + require HTML::Template; - return HTML::Template->new(template_params(@_)); + return HTML::Template->new(template_params( + filename => $filename, + @_ + )); } sub misctemplate ($$;@) { my $title=shift; my $pagebody=shift; - my $template=template("misc.tmpl"); - $template->param( + my $template=template("misc.tmpl", title => $title, indexlink => indexlink(), wikiname => $config{wikiname}, diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 58bd4b851..ed75a6e46 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -274,7 +274,7 @@ sub editcomment ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => scalar IkiWiki::template_params('editcomment.tmpl'), + template => template('editcomment.tmpl'), ); IkiWiki::decode_form_utf8($form); diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 26e38abc1..5c94ecbca 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -78,7 +78,7 @@ sub cgi_editpage ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => scalar template_params("editpage.tmpl"), + template => template("editpage.tmpl"), ); decode_form_utf8($form); diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 48ad4c8ce..68cb16513 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -36,7 +36,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template("googleform.tmpl", blind_cache => 1); + my $searchform = template_depends("googleform.tmpl", $page, blind_cache => 1); $searchform->param(url => $config{url}); $form=$searchform->output; } diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 3359af314..043649742 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -299,7 +299,7 @@ sub preprocess_inline (@) { (exists $params{postform} && yesno($params{postform}))) && IkiWiki->can("cgi_editpage")) { # Add a blog post form, with feed buttons. - my $formtemplate=template("blogpost.tmpl", blind_cache => 1); + my $formtemplate=template_depends("blogpost.tmpl", $params{page}, blind_cache => 1); $formtemplate->param(cgiurl => $config{cgiurl}); $formtemplate->param(rootpage => rootpage(%params)); $formtemplate->param(rssurl => $rssurl) if $feeds && $rss; @@ -320,19 +320,23 @@ sub preprocess_inline (@) { } elsif ($feeds && !$params{preview} && ($emptyfeeds || @feedlist)) { # Add feed buttons. - my $linktemplate=template("feedlink.tmpl", blind_cache => 1); + my $linktemplate=template_depends("feedlink.tmpl", $params{page}, blind_cache => 1); $linktemplate->param(rssurl => $rssurl) if $rss; $linktemplate->param(atomurl => $atomurl) if $atom; $ret.=$linktemplate->output; } if (! $feedonly) { - require HTML::Template; - my @params=IkiWiki::template_params($params{template}.".tmpl", blind_cache => 1); - if (! @params) { - error sprintf(gettext("nonexistant template %s"), $params{template}); + my $template; + if (! $raw) { + eval { + $template=template_depends($params{template}.".tmpl", $params{page}, + blind_cache => 1); + }; + if (! $@ || ! $template) { + error sprintf(gettext("nonexistant template %s"), $params{template}); + } } - my $template=HTML::Template->new(@params) unless $raw; my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content')); foreach my $page (@list) { @@ -534,7 +538,7 @@ sub genfeed ($$$$$@) { my $url=URI->new(encode_utf8(urlto($page,"",1))); - my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1); + my $itemtemplate=template_depends($feedtype."item.tmpl", $page, blind_cache => 1); my $content=""; my $lasttime = 0; foreach my $p (@pages) { @@ -598,7 +602,7 @@ sub genfeed ($$$$$@) { $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime; } - my $template=template($feedtype."page.tmpl", blind_cache => 1); + my $template=template_depends($feedtype."page.tmpl", $page, blind_cache => 1); $template->param( title => $page ne "index" ? pagetitle($page) : $config{wikiname}, wikiname => $config{wikiname}, diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index a1e7026ca..55edf8752 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -52,7 +52,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template("searchform.tmpl", blind_cache => 1); + my $searchform = template_depends("searchform.tmpl", $page, blind_cache => 1); $searchform->param(searchaction => $config{cgiurl}); $form=$searchform->output; } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 49d080c16..7cf19645e 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -74,7 +74,9 @@ sub genpage ($$) { $templatefile=$file; } }); - my $template=template(defined $templatefile ? $templatefile : 'page.tmpl', blind_cache => 1); + my $template=template_depends( + defined $templatefile ? $templatefile : 'page.tmpl', $page, + blind_cache => 1); my $actions=0; if (length $config{cgiurl}) { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9e8c59f63..eaa008131 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -705,6 +705,14 @@ Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the file in the template directory. The optional remaining parameters are passed to `HTML::Template->new`. +### `template_depends($$;@)` + +Use this instead of `template()` if the content of a template is being +included into a page. This causes the page to depend on the template, +so it will be updated if the template is modified. + +Like `template()`, except the second parameter is the page. + ### `htmlpage($)` Passed a page name, returns the base name that will be used for a the html -- cgit v1.2.3 From 4c99904af30c9213060809937962c1a4ab9c5ad2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 16:29:49 -0400 Subject: reference my branch for this --- doc/todo/auto_rebuild_on_template_change.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index a112cb9da..66aa07193 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -39,6 +39,9 @@ Note also that when using templates from "$srcdir/templates/", `no_includes` needs to be set. Currently this is done by the two plugins that use such templates, while includes are allowed in `templatedir`. +Have started working on this. +[[!template id=gitbranch branch=origin/templatemove author="[[Joey]]"]] + > But would this require that templates be parseable as wiki pages? Because that would be a nuisance. --[[KathrynAndersen]] >> It would be better for them not to be rendered separately at all. -- cgit v1.2.3 From 898fc1095563412400484d5378ad82b334414b36 Mon Sep 17 00:00:00 2001 From: blipvert <blipvert@web> Date: Fri, 23 Apr 2010 02:36:27 +0000 Subject: --- ...ails_oddly_when_older_ikiwiki_is_installed.mdwn | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn (limited to 'doc') diff --git a/doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn b/doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn new file mode 100644 index 000000000..b11972165 --- /dev/null +++ b/doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn @@ -0,0 +1,26 @@ +I got this failure when trying to build ikiwiki version 3.20100403: + + $ perl Makefile.PL INSTALL_BASE=/opt/ikiwiki PREFIX= + Writing Makefile for IkiWiki + $ make + +*...snip...* + + ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki.in > ikiwiki.out + chmod +x ikiwiki.out + ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki-transition.in > ikiwiki-transition.out + chmod +x ikiwiki-transition.out + ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki-calendar.in > ikiwiki-calendar.out + chmod +x ikiwiki-calendar.out + HOME=/home/me /usr/bin/perl -Iblib/lib ikiwiki.out -libdir . -dumpsetup ikiwiki.setup + Use of uninitialized value $IkiWiki::Setup::config{"setuptype"} in concatenation (.) or string at IkiWiki/Setup.pm line 53. + Can't locate IkiWiki/Setup/.pm in @INC (@INC contains: . /opt/ikiwiki/lib/perl5/i486-linux-gnu-thread-multi /opt/ikiwiki/lib/perl5 blib/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 35) line 3. + + make: *** [ikiwiki.setup] Error 2 + +Note that I had been trying to upgrade with an installed ikiwiki 3.20091114 +already in place under /opt/ikiwiki. The build does not fail for me +if I first remove the old ikiwiki installation, nor does it fail with +3.20100403 or newer installed at /opt/ikiwiki. Hence this is not +really a critical bug, although it's somewhat perplexing to me why it +ought to make a difference. -- cgit v1.2.3 From a2feb7d477a57a4e7feb1334e7ff4abc4067b1d3 Mon Sep 17 00:00:00 2001 From: blipvert <blipvert@web> Date: Fri, 23 Apr 2010 02:40:36 +0000 Subject: rename bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn to bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn --- ...ails_oddly_when_older_ikiwiki_is_installed.mdwn | 26 ++++++++++++++++++++++ ...ails_oddly_when_older_ikiwiki_is_installed.mdwn | 26 ---------------------- 2 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn delete mode 100644 doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn (limited to 'doc') diff --git a/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn b/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn new file mode 100644 index 000000000..b11972165 --- /dev/null +++ b/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn @@ -0,0 +1,26 @@ +I got this failure when trying to build ikiwiki version 3.20100403: + + $ perl Makefile.PL INSTALL_BASE=/opt/ikiwiki PREFIX= + Writing Makefile for IkiWiki + $ make + +*...snip...* + + ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki.in > ikiwiki.out + chmod +x ikiwiki.out + ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki-transition.in > ikiwiki-transition.out + chmod +x ikiwiki-transition.out + ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki-calendar.in > ikiwiki-calendar.out + chmod +x ikiwiki-calendar.out + HOME=/home/me /usr/bin/perl -Iblib/lib ikiwiki.out -libdir . -dumpsetup ikiwiki.setup + Use of uninitialized value $IkiWiki::Setup::config{"setuptype"} in concatenation (.) or string at IkiWiki/Setup.pm line 53. + Can't locate IkiWiki/Setup/.pm in @INC (@INC contains: . /opt/ikiwiki/lib/perl5/i486-linux-gnu-thread-multi /opt/ikiwiki/lib/perl5 blib/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 35) line 3. + + make: *** [ikiwiki.setup] Error 2 + +Note that I had been trying to upgrade with an installed ikiwiki 3.20091114 +already in place under /opt/ikiwiki. The build does not fail for me +if I first remove the old ikiwiki installation, nor does it fail with +3.20100403 or newer installed at /opt/ikiwiki. Hence this is not +really a critical bug, although it's somewhat perplexing to me why it +ought to make a difference. diff --git a/doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn b/doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn deleted file mode 100644 index b11972165..000000000 --- a/doc/bugs/creating_build_fails_oddly_when_older_ikiwiki_is_installed.mdwn +++ /dev/null @@ -1,26 +0,0 @@ -I got this failure when trying to build ikiwiki version 3.20100403: - - $ perl Makefile.PL INSTALL_BASE=/opt/ikiwiki PREFIX= - Writing Makefile for IkiWiki - $ make - -*...snip...* - - ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki.in > ikiwiki.out - chmod +x ikiwiki.out - ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki-transition.in > ikiwiki-transition.out - chmod +x ikiwiki-transition.out - ./pm_filter /opt/ikiwiki 3.20100403 /opt/ikiwiki/lib/perl5 < ikiwiki-calendar.in > ikiwiki-calendar.out - chmod +x ikiwiki-calendar.out - HOME=/home/me /usr/bin/perl -Iblib/lib ikiwiki.out -libdir . -dumpsetup ikiwiki.setup - Use of uninitialized value $IkiWiki::Setup::config{"setuptype"} in concatenation (.) or string at IkiWiki/Setup.pm line 53. - Can't locate IkiWiki/Setup/.pm in @INC (@INC contains: . /opt/ikiwiki/lib/perl5/i486-linux-gnu-thread-multi /opt/ikiwiki/lib/perl5 blib/lib /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 35) line 3. - - make: *** [ikiwiki.setup] Error 2 - -Note that I had been trying to upgrade with an installed ikiwiki 3.20091114 -already in place under /opt/ikiwiki. The build does not fail for me -if I first remove the old ikiwiki installation, nor does it fail with -3.20100403 or newer installed at /opt/ikiwiki. Hence this is not -really a critical bug, although it's somewhat perplexing to me why it -ought to make a difference. -- cgit v1.2.3 From 5bc7efab7cc7a437d3d593a3ff62595ed0ab7f81 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Thu, 22 Apr 2010 23:00:33 -0400 Subject: switch to PERL5LIB so that use lib inserted for INSTALL_BASE is overridden during build --- Makefile.PL | 6 +++--- doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/Makefile.PL b/Makefile.PL index 38db20d44..794a2ed47 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -36,7 +36,7 @@ scripts=ikiwiki-update-wikilist ikiwiki-makerepo chmod +x $@ ikiwiki.setup: ikiwiki.out - HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -dumpsetup ikiwiki.setup + PERL5LIB=. HOME=/home/me $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -dumpsetup ikiwiki.setup extra_build: $(outprogs) ikiwiki.setup docwiki ./mdwn2man ikiwiki 1 doc/usage.mdwn > ikiwiki.man @@ -50,10 +50,10 @@ extra_build: $(outprogs) ikiwiki.setup docwiki rm -f ikiwiki.spec.bkp docwiki: ikiwiki.out - $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup docwiki.setup -refresh + PERL5LIB=. $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -setup docwiki.setup -refresh extra_clean: - $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean + PERL5LIB=. $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -setup docwiki.setup -clean rm -f *.man $(outprogs) ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean diff --git a/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn b/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn index b11972165..7b252031b 100644 --- a/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn +++ b/doc/bugs/build_fails_oddly_when_older_ikiwiki_is_installed.mdwn @@ -24,3 +24,8 @@ if I first remove the old ikiwiki installation, nor does it fail with 3.20100403 or newer installed at /opt/ikiwiki. Hence this is not really a critical bug, although it's somewhat perplexing to me why it ought to make a difference. + +> So, using INSTALL_BASE causes a 'use lib' to be hardcoded into the `.out` +> files; which overrides the -libdir and the -I, and so the old version +> of IkiWiki.pm is used. +> [[fixed|done]] --[[Joey]] -- cgit v1.2.3 From f5466ad7173459bc9481781d8f54ba969f56a516 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Fri, 23 Apr 2010 16:29:05 +0100 Subject: how important is perl 5.10? --- doc/setup/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/setup/discussion.mdwn b/doc/setup/discussion.mdwn index b71263dae..2000c5dfb 100644 --- a/doc/setup/discussion.mdwn +++ b/doc/setup/discussion.mdwn @@ -245,3 +245,12 @@ Thank you! I'm not a Perl programmer, so what's your opinion: is this behavior a I am experiencing the same problem "/etc/ikiwiki/custom: failed to set up the repository with ikiwiki-makerepo " on Debian squeeze with perl5.10.0. Upgrading to ikiwiki 3.10 fixes it. -- [Albert](http://www.docunext.com/) + +---- + +Just a note, perl 5.10 isn't packaged as part of RHEL or thus CentOS nor EPEL, +so it's not especially trivial to satisfy that requirement for ikiwiki on +those platforms, without backporting it from Fedora or building from source. +However, I have an ikiwiki 3.20100403 running on RHEL-4 supplied 5.8.8 without +(seemingly too much) complaint. How strong is the 5.10 requirement? what +precicely breaks without it? -- [[Jon]] -- cgit v1.2.3 From 4afe2d1170e85a09d43460045b5825fce081c469 Mon Sep 17 00:00:00 2001 From: privat <privat@web> Date: Fri, 23 Apr 2010 17:20:51 +0000 Subject: add my repository in the list --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index 0f280fb35..a5fd742ca 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -62,6 +62,7 @@ think about merging them. This is recommended. :-) ([browse](http://git.liegesta.at/?p=ikiwiki.git;a=summary)) * [[GustafThorslund]] `http://gustaf.thorslund.org/src/ikiwiki.git` * [[peteg]] `git://git.hcoop.net/git/peteg/ikiwiki.git` +* [[privat]] `git://github.com/privat/ikiwiki.git` ## branches -- cgit v1.2.3 From 92c927cb9285fb2b6e185f24d93ced3729bda04e Mon Sep 17 00:00:00 2001 From: Jon Dowland <jon@alcopop.org> Date: Fri, 23 Apr 2010 18:28:20 +0100 Subject: half-formed thought about accessible profiling --- doc/users/jon.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/users/jon.mdwn b/doc/users/jon.mdwn index d5593dcbf..eb01821ff 100644 --- a/doc/users/jon.mdwn +++ b/doc/users/jon.mdwn @@ -51,6 +51,8 @@ Penultimately, the following are merely half-formed thoughts: unticking checkboxes next to a tag name (rather than entering the directive into the text of the page directly) * perhaps the same for meta + * I'd like to make profiling ikiwiki in action very easy for newcomers. + Perhaps even a plugin that created a file /profile or similar on build. Finally, backlinks (since I have issues with the current backlinks implementation, see [[bugs/backlinks onhover thing can go weird]]): -- cgit v1.2.3 From 53c8bf9ed98f263163768daeb1d4e0fdbf6e7ef3 Mon Sep 17 00:00:00 2001 From: privat <privat@web> Date: Fri, 23 Apr 2010 17:28:38 +0000 Subject: multiple_sidebars in a gitbranch --- doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn index 02b83244e..bb4339f88 100644 --- a/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn +++ b/doc/todo/beef_up_sidebar_to_allow_for_multiple_sidebars.mdwn @@ -15,6 +15,8 @@ those contents instead. >> Here a simple [[patch]] for multiple sidebars. Not too fancy but better than having multiple copies of the sidebar plugin. --[[jeanprivat]] +>>> I made a [[git]] branch for it [[!template id=gitbranch branch="privat/multiple_sidebars" author="[[jeanprivat]]"]] --[[jeanprivat]] + <pre> --- /usr/share/perl5/IkiWiki/Plugin/sidebar.pm 2010-02-11 22:53:17.000000000 -0500 +++ plugins/IkiWiki/Plugin/sidebar.pm 2010-02-27 09:54:12.524412391 -0500 -- cgit v1.2.3 From 796ece2a8a482f219a5d4c568af271286511574e Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 13:30:52 -0400 Subject: response --- doc/setup/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/setup/discussion.mdwn b/doc/setup/discussion.mdwn index 2000c5dfb..74f7740db 100644 --- a/doc/setup/discussion.mdwn +++ b/doc/setup/discussion.mdwn @@ -254,3 +254,7 @@ those platforms, without backporting it from Fedora or building from source. However, I have an ikiwiki 3.20100403 running on RHEL-4 supplied 5.8.8 without (seemingly too much) complaint. How strong is the 5.10 requirement? what precicely breaks without it? -- [[Jon]] + +> I don't remember what was the specific problem with perl 5.8.8. All I can +> find is some taint checking bugs, which are currently worked around by +> taint checking being disabled. --[[Joey]] -- cgit v1.2.3 From 54898d16d4c86fddcb1b5588eac67a729c14deeb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 14:44:37 -0400 Subject: allow a bare page name to be specified as a template --- IkiWiki.pm | 31 +++++++++++++++++++++---------- doc/plugins/write.mdwn | 11 +++++++++-- template-transition-notes | 1 + 3 files changed, 31 insertions(+), 12 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0aaf60569..03441b594 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1653,9 +1653,18 @@ sub saveindex () { sub template_file ($) { my $name=shift; + + my $tpage="templates/$name"; + if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { + $tpage=$pagesources{$tpage}; + $name.=".tmpl"; + } - my $template=srcfile("templates/$name", 1); - return $template if defined $template; + my $template=srcfile($tpage, 1); + if (defined $template) { + return $template, $tpage if wantarray; + return $template; + } foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { @@ -1664,18 +1673,16 @@ sub template_file ($) { return; } -sub template ($;@) { - template_depends(shift, undef, @_); -} - sub template_depends ($$;@) { my $name=shift; my $page=shift; - - if (defined $page) { - add_depends($page, "templates/$name"); + + my ($filename, $tpage)=template_file($name); + if (defined $page && defined $tpage) { + add_depends($page, $tpage); } - my $filename=template_file($name); + + return unless defined $filename; require HTML::Template; return HTML::Template->new( @@ -1691,6 +1698,10 @@ sub template_depends ($$;@) { ); } +sub template ($;@) { + template_depends(shift, undef, @_); +} + sub misctemplate ($$;@) { my $title=shift; my $pagebody=shift; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index eaa008131..1407b5a12 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -702,8 +702,15 @@ the entire wiki build and make the wiki unusable. ### `template($;@)` Creates and returns a [[!cpan HTML::Template]] object. The first parameter -is the name of the file in the template directory. The optional remaining -parameters are passed to `HTML::Template->new`. +is the name of the template file. The optional remaining parameters are +passed to `HTML::Template->new`. + +The template file is first looked for in the templates/ subdirectory of the +srcdir. Failing that, it is looked for in the templatedir. Typically +the filename will have a ".tmpl" extension. If a filename with no extension +is passed, a wiki page in templates/ with its name is used as the template. +That should only be done for templates which it is safe to let wiki users +edit. ### `template_depends($$;@)` diff --git a/template-transition-notes b/template-transition-notes index 193dd79d4..ccff3e78f 100644 --- a/template-transition-notes +++ b/template-transition-notes @@ -3,3 +3,4 @@ * includes no longer allowed in templates * template directive no longer uses $foo.tmpl , only page $foo. +* template_params removed (not exported API) -- cgit v1.2.3 From 78fd3b35a2805489185a14e00b53b450eec961f1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 15:02:07 -0400 Subject: allow template pages to not be under templates/ --- IkiWiki.pm | 4 +++- doc/plugins/write.mdwn | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 03441b594..78612cd08 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1654,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $name=shift; - my $tpage="templates/$name"; + my $tpage=($name =~ /^\//) ? $name : "templates/$name"; if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { $tpage=$pagesources{$tpage}; $name.=".tmpl"; @@ -1665,6 +1665,8 @@ sub template_file ($) { return $template, $tpage if wantarray; return $template; } + + $name=~s:/::; # avoid path traversal foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 1407b5a12..00b54bdd3 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -705,12 +705,14 @@ Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the template file. The optional remaining parameters are passed to `HTML::Template->new`. -The template file is first looked for in the templates/ subdirectory of the -srcdir. Failing that, it is looked for in the templatedir. Typically -the filename will have a ".tmpl" extension. If a filename with no extension -is passed, a wiki page in templates/ with its name is used as the template. -That should only be done for templates which it is safe to let wiki users -edit. +Normally, the template file is first looked for in the templates/ subdirectory +of the srcdir. Failing that, it is looked for in the templatedir. + +Wiki pages can be used as templates. This should be done only for templates +which it is safe to let wiki users edit. Enable it by passing a filename +with no ".tmpl" extension. Template pages are normally looked for in +the templates/ directory. If the page name starts with "/", a page +elsewhere in the wiki can be used. ### `template_depends($$;@)` -- cgit v1.2.3 From 83703d2f4a8832155e3c111792489062ccc4793b Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 15:32:39 -0400 Subject: move template documentation to the template directive allow new templates to be created via the inline that lists them --- doc/ikiwiki/directive/template.mdwn | 71 ++++++++++++++++++++++++++++++-- doc/templates.mdwn | 82 ++----------------------------------- 2 files changed, 71 insertions(+), 82 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index d538b69b1..ae71ba5b5 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -5,14 +5,79 @@ wiki, by using the template directive. The directive has an `id` parameter that identifies the template to use. The remaining parameters are used to fill out the template. -Example: +## Example \[[!template id=note text="""Here is the text to insert into my note."""]] This fills out the `note` template, filling in the `text` field with the specified value, and inserts the result into the page. -For a list of available templates, and details about how to create more, -see the [[templates]] page. +## Using a template + +Generally, a value can include any markup that would be allowed in the wiki +page outside the template. Triple-quoting the value even allows quotes to +be included in it. Combined with multi-line quoted values, this allows for +large chunks of marked up text to be embedded into a template: + + \[[!template id=foo name="Sally" color="green" age=8 notes=""" + * \[[Charley]]'s sister. + * "I want to be an astronaut when I grow up." + * Really 8 and a half. + """]] + +## Creating a template + +The template is a regular wiki page, located in the `templates/` +subdirectory inside the source directory of the wiki. + +(Alternatively, templates can be stored in a directory outside the wiki, +as files with the extension ".tmpl". +By default, these are searched for in `/usr/share/ikiwiki/templates`; +the `templatedir` setting can be used to make another directory be searched +first.) + +The template uses the syntax used by the [[!cpan HTML::Template]] perl +module, which allows for some fairly complex things to be done. Consult its +documentation for the full syntax, but all you really need to know are a +few things: + +* Each parameter you pass to the template directive will generate a + template variable. There are also some pre-defined variables like PAGE + and BASENAME. +* To insert the value of a variable, use `<TMPL_VAR variable>`. Wiki markup + in the value will first be converted to html. +* To insert the raw value of a variable, with wiki markup not yet converted + to html, use `<TMPL_VAR raw_variable>`. +* To make a block of text conditional on a variable being set use + `<TMPL_IF NAME="variable">text</TMPL_IF>`. +* To use one block of text if a variable is set and a second if it's not, + use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` + +Here's a sample template: + + <span class="infobox"> + Name: \[[<TMPL_VAR raw_name>]]<br /> + Age: <TMPL_VAR age><br /> + <TMPL_IF NAME="color"> + Favorite color: <TMPL_VAR color><br /> + <TMPL_ELSE> + No favorite color.<br /> + </TMPL_IF> + <TMPL_IF NAME="notes"> + <hr /> + <TMPL_VAR notes> + </TMPL_IF> + </span> + +The filled out template will be formatted the same as the rest of the page +that contains it, so you can include WikiLinks and all other forms of wiki +markup in the template. Note though that such WikiLinks will not show up as +backlinks to the page that uses the template. + +Note the use of "raw_name" inside the [[ikiwiki/WikiLink]] generator in the +example above. This ensures that if the name contains something that might +be mistaken for wiki markup, it's not converted to html before being +processed as a [[ikiwiki/WikiLink]]. + [[!meta robots="noindex, follow"]] diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 07531ae98..f2b581d2f 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -9,85 +9,9 @@ wiki. [[!if test="enabled(template) and enabled(inline)" then=""" -These templates are available for inclusion onto other pages in this -wiki: +These templates are available for use with the template directive. [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes -sort=title template=titlepage]] +sort=title template=titlepage +rootpage=templates postformtext="Add a new template named:"]] """]] - -## Using a template - -Using a template works like this: - - \[[!template id=note text="""Here is the text to insert into my note."""]] - -This fills out the [[note]] template, filling in the `text` field with -the specified value, and inserts the result into the page. - -Generally, a value can include any markup that would be allowed in the wiki -page outside the template. Triple-quoting the value even allows quotes to -be included in it. Combined with multi-line quoted values, this allows for -large chunks of marked up text to be embedded into a template: - - \[[!template id=foo name="Sally" color="green" age=8 notes=""" - * \[[Charley]]'s sister. - * "I want to be an astronaut when I grow up." - * Really 8 and a half. - """]] - -## Creating a template - -To create a template, simply add a template directive to a page, and the -page will provide a link that can be used to create the template. The template -is a regular wiki page, located in the `templates/` subdirectory inside -the source directory of the wiki. - -(Alternatively, templates can be stored in a directory outside the wiki, -as files with the extension ".tmpl". -By default, these are searched for in `/usr/share/ikiwiki/templates`; -the `templatedir` setting can be used to make another directory be searched -first.) - -The template uses the syntax used by the [[!cpan HTML::Template]] perl -module, which allows for some fairly complex things to be done. Consult its -documentation for the full syntax, but all you really need to know are a -few things: - -* Each parameter you pass to the template directive will generate a - template variable. There are also some pre-defined variables like PAGE - and BASENAME. -* To insert the value of a variable, use `<TMPL_VAR variable>`. Wiki markup - in the value will first be converted to html. -* To insert the raw value of a variable, with wiki markup not yet converted - to html, use `<TMPL_VAR raw_variable>`. -* To make a block of text conditional on a variable being set use - `<TMPL_IF NAME="variable">text</TMPL_IF>`. -* To use one block of text if a variable is set and a second if it's not, - use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` - -Here's a sample template: - - <span class="infobox"> - Name: \[[<TMPL_VAR raw_name>]]<br /> - Age: <TMPL_VAR age><br /> - <TMPL_IF NAME="color"> - Favorite color: <TMPL_VAR color><br /> - <TMPL_ELSE> - No favorite color.<br /> - </TMPL_IF> - <TMPL_IF NAME="notes"> - <hr /> - <TMPL_VAR notes> - </TMPL_IF> - </span> - -The filled out template will be formatted the same as the rest of the page -that contains it, so you can include WikiLinks and all other forms of wiki -markup in the template. Note though that such WikiLinks will not show up as -backlinks to the page that uses the template. - -Note the use of "raw_name" inside the [[ikiwiki/WikiLink]] generator. This -ensures that if the name contains something that might be mistaken for wiki -markup, it's not converted to html before being processed as a -[[ikiwiki/WikiLink]]. -- cgit v1.2.3 From d822e37d0efc34f2267f275030de11cd3c7ff7bb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 15:32:39 -0400 Subject: move template documentation to the template directive allow new templates to be created via the inline that lists them (cherry picked from commit 83703d2f4a8832155e3c111792489062ccc4793b) --- doc/ikiwiki/directive/template.mdwn | 71 ++++++++++++++++++++++++++++++-- doc/templates.mdwn | 82 ++----------------------------------- 2 files changed, 71 insertions(+), 82 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index d538b69b1..ae71ba5b5 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -5,14 +5,79 @@ wiki, by using the template directive. The directive has an `id` parameter that identifies the template to use. The remaining parameters are used to fill out the template. -Example: +## Example \[[!template id=note text="""Here is the text to insert into my note."""]] This fills out the `note` template, filling in the `text` field with the specified value, and inserts the result into the page. -For a list of available templates, and details about how to create more, -see the [[templates]] page. +## Using a template + +Generally, a value can include any markup that would be allowed in the wiki +page outside the template. Triple-quoting the value even allows quotes to +be included in it. Combined with multi-line quoted values, this allows for +large chunks of marked up text to be embedded into a template: + + \[[!template id=foo name="Sally" color="green" age=8 notes=""" + * \[[Charley]]'s sister. + * "I want to be an astronaut when I grow up." + * Really 8 and a half. + """]] + +## Creating a template + +The template is a regular wiki page, located in the `templates/` +subdirectory inside the source directory of the wiki. + +(Alternatively, templates can be stored in a directory outside the wiki, +as files with the extension ".tmpl". +By default, these are searched for in `/usr/share/ikiwiki/templates`; +the `templatedir` setting can be used to make another directory be searched +first.) + +The template uses the syntax used by the [[!cpan HTML::Template]] perl +module, which allows for some fairly complex things to be done. Consult its +documentation for the full syntax, but all you really need to know are a +few things: + +* Each parameter you pass to the template directive will generate a + template variable. There are also some pre-defined variables like PAGE + and BASENAME. +* To insert the value of a variable, use `<TMPL_VAR variable>`. Wiki markup + in the value will first be converted to html. +* To insert the raw value of a variable, with wiki markup not yet converted + to html, use `<TMPL_VAR raw_variable>`. +* To make a block of text conditional on a variable being set use + `<TMPL_IF NAME="variable">text</TMPL_IF>`. +* To use one block of text if a variable is set and a second if it's not, + use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` + +Here's a sample template: + + <span class="infobox"> + Name: \[[<TMPL_VAR raw_name>]]<br /> + Age: <TMPL_VAR age><br /> + <TMPL_IF NAME="color"> + Favorite color: <TMPL_VAR color><br /> + <TMPL_ELSE> + No favorite color.<br /> + </TMPL_IF> + <TMPL_IF NAME="notes"> + <hr /> + <TMPL_VAR notes> + </TMPL_IF> + </span> + +The filled out template will be formatted the same as the rest of the page +that contains it, so you can include WikiLinks and all other forms of wiki +markup in the template. Note though that such WikiLinks will not show up as +backlinks to the page that uses the template. + +Note the use of "raw_name" inside the [[ikiwiki/WikiLink]] generator in the +example above. This ensures that if the name contains something that might +be mistaken for wiki markup, it's not converted to html before being +processed as a [[ikiwiki/WikiLink]]. + [[!meta robots="noindex, follow"]] diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 07531ae98..f2b581d2f 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -9,85 +9,9 @@ wiki. [[!if test="enabled(template) and enabled(inline)" then=""" -These templates are available for inclusion onto other pages in this -wiki: +These templates are available for use with the template directive. [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes -sort=title template=titlepage]] +sort=title template=titlepage +rootpage=templates postformtext="Add a new template named:"]] """]] - -## Using a template - -Using a template works like this: - - \[[!template id=note text="""Here is the text to insert into my note."""]] - -This fills out the [[note]] template, filling in the `text` field with -the specified value, and inserts the result into the page. - -Generally, a value can include any markup that would be allowed in the wiki -page outside the template. Triple-quoting the value even allows quotes to -be included in it. Combined with multi-line quoted values, this allows for -large chunks of marked up text to be embedded into a template: - - \[[!template id=foo name="Sally" color="green" age=8 notes=""" - * \[[Charley]]'s sister. - * "I want to be an astronaut when I grow up." - * Really 8 and a half. - """]] - -## Creating a template - -To create a template, simply add a template directive to a page, and the -page will provide a link that can be used to create the template. The template -is a regular wiki page, located in the `templates/` subdirectory inside -the source directory of the wiki. - -(Alternatively, templates can be stored in a directory outside the wiki, -as files with the extension ".tmpl". -By default, these are searched for in `/usr/share/ikiwiki/templates`; -the `templatedir` setting can be used to make another directory be searched -first.) - -The template uses the syntax used by the [[!cpan HTML::Template]] perl -module, which allows for some fairly complex things to be done. Consult its -documentation for the full syntax, but all you really need to know are a -few things: - -* Each parameter you pass to the template directive will generate a - template variable. There are also some pre-defined variables like PAGE - and BASENAME. -* To insert the value of a variable, use `<TMPL_VAR variable>`. Wiki markup - in the value will first be converted to html. -* To insert the raw value of a variable, with wiki markup not yet converted - to html, use `<TMPL_VAR raw_variable>`. -* To make a block of text conditional on a variable being set use - `<TMPL_IF NAME="variable">text</TMPL_IF>`. -* To use one block of text if a variable is set and a second if it's not, - use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` - -Here's a sample template: - - <span class="infobox"> - Name: \[[<TMPL_VAR raw_name>]]<br /> - Age: <TMPL_VAR age><br /> - <TMPL_IF NAME="color"> - Favorite color: <TMPL_VAR color><br /> - <TMPL_ELSE> - No favorite color.<br /> - </TMPL_IF> - <TMPL_IF NAME="notes"> - <hr /> - <TMPL_VAR notes> - </TMPL_IF> - </span> - -The filled out template will be formatted the same as the rest of the page -that contains it, so you can include WikiLinks and all other forms of wiki -markup in the template. Note though that such WikiLinks will not show up as -backlinks to the page that uses the template. - -Note the use of "raw_name" inside the [[ikiwiki/WikiLink]] generator. This -ensures that if the name contains something that might be mistaken for wiki -markup, it's not converted to html before being processed as a -[[ikiwiki/WikiLink]]. -- cgit v1.2.3 From 7e79da76332b93214a7d9a5c91bc046db4219ee2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 16:10:46 -0400 Subject: template docu reorg Remove wikitemplates page; fold its contents into templates page. Update all backlinks. Document new ability to put templates inside srcdir. --- doc/bugs/SSI_include_stripped_from_mdwn.mdwn | 2 +- doc/bugs/login_page_non-obvious_with_openid.mdwn | 4 +- doc/features.mdwn | 2 +- doc/freesoftware.mdwn | 2 +- doc/ikiwiki-calendar.mdwn | 2 +- doc/ikiwiki/directive/edittemplate.mdwn | 2 +- doc/ikiwiki/directive/pagetemplate.mdwn | 8 +- doc/ikiwiki/directive/template.mdwn | 8 +- doc/plugins/autoindex.mdwn | 2 +- doc/plugins/map/discussion.mdwn | 2 +- doc/plugins/pagetemplate.mdwn | 6 +- doc/plugins/template.mdwn | 4 +- doc/plugins/write.mdwn | 4 +- doc/templates.mdwn | 91 +++++++++++++++++++--- doc/tips/comments_feed.mdwn | 2 +- ...o-create_tag_pages_according_to_a_template.mdwn | 2 +- doc/todo/auto_rebuild_on_template_change.mdwn | 2 +- doc/todo/html.mdwn | 2 +- doc/todo/multiple_templates.mdwn | 2 +- doc/usage.mdwn | 5 +- doc/wikitemplates.mdwn | 52 ------------- doc/wikitemplates/discussion.mdwn | 46 ----------- 22 files changed, 111 insertions(+), 141 deletions(-) delete mode 100644 doc/wikitemplates.mdwn delete mode 100644 doc/wikitemplates/discussion.mdwn (limited to 'doc') diff --git a/doc/bugs/SSI_include_stripped_from_mdwn.mdwn b/doc/bugs/SSI_include_stripped_from_mdwn.mdwn index 5519e45c6..270da86d3 100644 --- a/doc/bugs/SSI_include_stripped_from_mdwn.mdwn +++ b/doc/bugs/SSI_include_stripped_from_mdwn.mdwn @@ -10,7 +10,7 @@ If I have a <--#include virtual="foo" --> in some file, it gets stripped, > Anyway, it makes sense for the htmlscrubber to strip server-side > includes because otherwise your wiki could be attacked > by them being added to it. If you want to use both the htmlscrubber and -> SSI together, I'd suggest you modify the [[wikitemplates]] +> SSI together, I'd suggest you modify the [[templates]] > and put the SSI on there. > > Ie, `page.tmpl` has a diff --git a/doc/bugs/login_page_non-obvious_with_openid.mdwn b/doc/bugs/login_page_non-obvious_with_openid.mdwn index 1d087985a..9aa702037 100644 --- a/doc/bugs/login_page_non-obvious_with_openid.mdwn +++ b/doc/bugs/login_page_non-obvious_with_openid.mdwn @@ -36,7 +36,7 @@ If you want to keep it as one form, then perhaps using some javascript to disabl > that allows modifying that form, but does not allow creating a separate > form. The best way to make it obvious how to use it currently is to just > disable password auth, then it's nice and simple. :-) Javascript is an -> interesting idea. It's also possible to write a custom [[signin.tmpl wikitemplates]] that +> interesting idea. It's also possible to write a custom [[templates]] that > is displayed instead of the regular signin form, and it should be > possible to use that to manually lay it out better than FormBuilder > manages with its automatic layout. --[[Joey]] @@ -44,4 +44,4 @@ If you want to keep it as one form, then perhaps using some javascript to disabl > I've improved the form, I think it's more obvious now that the openid > stuff is separate. Good enough to call this [[done]]. I think. --[[Joey]] ->> Looks good, thanks! :-) -- [[AdamShand]] \ No newline at end of file +>> Looks good, thanks! :-) -- [[AdamShand]] diff --git a/doc/features.mdwn b/doc/features.mdwn index ab521213d..07ce648ea 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -72,7 +72,7 @@ you would care to syndicate. Ikiwiki aims to produce [valid XHTML 1.0](http://validator.w3.org/check?url=referer). Ikiwiki -generates html using [[templates|wikitemplates]], and uses [[css]], so you +generates html using [[templates]], and uses [[css]], so you can change the look and layout of all pages in any way you would like. ## [[Plugins]] diff --git a/doc/freesoftware.mdwn b/doc/freesoftware.mdwn index 7ac1ac6b4..2243d9b1f 100644 --- a/doc/freesoftware.mdwn +++ b/doc/freesoftware.mdwn @@ -4,7 +4,7 @@ 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 +pages (but not the smilies) and the [[templates]]) are licensed as follows: > Redistribution and use in source and compiled forms, with or without diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index c1f4d7267..03cbdd86c 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -43,7 +43,7 @@ An example crontab: # TEMPLATES -This command uses two [[template|wikitemplates]] to generate +This command uses two [[templates]] to generate the pages, `calendarmonth.tmpl` and `calendaryear.tmpl`. # AUTHOR diff --git a/doc/ikiwiki/directive/edittemplate.mdwn b/doc/ikiwiki/directive/edittemplate.mdwn index d731bdb47..c486e821b 100644 --- a/doc/ikiwiki/directive/edittemplate.mdwn +++ b/doc/ikiwiki/directive/edittemplate.mdwn @@ -21,7 +21,7 @@ something like: Details: The template page can also contain [[!cpan HTML::Template]] directives, -similar to other ikiwiki [[templates]]. Currently only one variable is +like other ikiwiki [[templates]]. Currently only one variable is set: `<TMPL_VAR name>` is replaced with the name of the page being created. diff --git a/doc/ikiwiki/directive/pagetemplate.mdwn b/doc/ikiwiki/directive/pagetemplate.mdwn index 8ad901c1a..401b38099 100644 --- a/doc/ikiwiki/directive/pagetemplate.mdwn +++ b/doc/ikiwiki/directive/pagetemplate.mdwn @@ -1,17 +1,13 @@ The `pagetemplate` directive is supplied by the [[!iki plugins/pagetemplate desc=pagetemplate]] plugin. -This directive allows a page to be displayed using a different template than -the default `page.tmpl` template. +This directive allows a page to be displayed using a different +[[template|templates]] than the default `page.tmpl` template. The page text is inserted into the template, so the template controls the overall look and feel of the wiki page. This is in contrast to the [[ikiwiki/directive/template]] directive, which allows inserting templates _into_ the body of a page. -This directive can only reference templates that are already installed -by the system administrator, typically into the -`/usr/share/ikiwiki/templates` directory. Example: - \[[!pagetemplate template="my_fancy.tmpl"]] [[!meta robots="noindex, follow"]] diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index ae71ba5b5..052ca7873 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -1,7 +1,11 @@ The `template` directive is supplied by the [[!iki plugins/template desc=template]] plugin. -[[Templates]] are files that can be filled out and inserted into pages in the -wiki, by using the template directive. The directive has an `id` parameter +The template directive allows wiki pages to be used as templates. +These templates can be filled out and inserted into other pages in the +wiki using the directive. The [[templates]] page lists templates +that can be used with this directive. + +The directive has an `id` parameter that identifies the template to use. The remaining parameters are used to fill out the template. diff --git a/doc/plugins/autoindex.mdwn b/doc/plugins/autoindex.mdwn index d1133e4f5..7c4e40419 100644 --- a/doc/plugins/autoindex.mdwn +++ b/doc/plugins/autoindex.mdwn @@ -3,5 +3,5 @@ This plugin searches for [[SubPages|ikiwiki/subpage]] with a missing parent page, and generates the parent pages. The generated page content is -controlled by the `autoindex.tmpl` [[template|wikitemplates]], which by +controlled by the `autoindex.tmpl` [[template|templates]], which by default, uses a [[map]] to list the SubPages. diff --git a/doc/plugins/map/discussion.mdwn b/doc/plugins/map/discussion.mdwn index 2f7b140d6..54c921b0f 100644 --- a/doc/plugins/map/discussion.mdwn +++ b/doc/plugins/map/discussion.mdwn @@ -1,7 +1,7 @@ I'm wanting a [[map]] (with indentation levels) showing page _titles_ instead of page 'names'. As far as I can see, this is not an option with existing plugins - I can get a list of pages using [[inline]] and -appropriate [[wikitemplates]], but that has no indentation and therefore +appropriate [[templates]], but that has no indentation and therefore doesn't show structure well. The quick way is to modify the map plugin to have a 'titles' option. The diff --git a/doc/plugins/pagetemplate.mdwn b/doc/plugins/pagetemplate.mdwn index 53f069d0d..8254e14c5 100644 --- a/doc/plugins/pagetemplate.mdwn +++ b/doc/plugins/pagetemplate.mdwn @@ -3,8 +3,4 @@ This plugin provides the [[ikiwiki/directive/pagetemplate]] [[ikiwiki/directive]], which allows a page to be displayed -using a different [[template|wikitemplates]] than the default. - -This plugin can only use templates that are already installed in -`/usr/share/ikiwiki/templates` (or wherever ikiwiki is configured to look for -them). You can choose to use any .tmpl files in that directory. +using a different [[template|templates]] than the default. diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn index da775f232..8d17e2825 100644 --- a/doc/plugins/template.mdwn +++ b/doc/plugins/template.mdwn @@ -3,5 +3,5 @@ This plugin provides the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. With this plugin, you can set up templates, and cause them to be filled out -and inserted into pages in the wiki. It's documented and existing templates -are listed in the [[templates]] page. +and inserted into pages in the wiki. Existing templates are listed in the +[[templates]] page. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 00b54bdd3..9128c7f54 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -297,7 +297,7 @@ value is ignored. hook(type => "pagetemplate", id => "foo", call => \&pagetemplate); -[[Templates|wikitemplates]] are filled out for many different things in +[[Templates]] are filled out for many different things in ikiwiki, like generating a page, or part of a blog page, or an rss feed, or a cgi. This hook allows modifying the variables available on those templates. The function is passed named parameters. The "page" and @@ -313,7 +313,7 @@ a new custom parameter to the template. hook(type => "templatefile", id => "foo", call => \&templatefile); -This hook allows plugins to change the [[template|wikitemplates]] that is +This hook allows plugins to change the [[template|templates]] that is used for a page in the wiki. The hook is passed a "page" parameter, and should return the name of the template file to use (relative to the template directory), or undef if it doesn't want to change the default diff --git a/doc/templates.mdwn b/doc/templates.mdwn index f2b581d2f..f7b3adae5 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -1,17 +1,88 @@ -[[!meta robots="noindex, follow"]] -[[!if test="enabled(template)" -then="This wiki has templates **enabled**." -else="This wiki has templates **disabled**." -]] +[[Ikiwiki]] uses many templates for many purposes. By editing its templates, +you can fully customise this site. -Templates are files that can be filled out and inserted into pages in the -wiki. +[[!if test="enabled(template)" then=""" +## The template directive +The template directive allows wiki pages to be used as templates. +These templates can be filled out and inserted into other pages in the +wiki using the directive. +"""]] [[!if test="enabled(template) and enabled(inline)" then=""" - -These templates are available for use with the template directive. - [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes sort=title template=titlepage rootpage=templates postformtext="Add a new template named:"]] """]] + +[[!if test="enabled(edittemplate)" then=""" +## The edittemplate directive + +The edittemplate directive can be used to make new pages default to +containing text from a template, which can be filled as out the page is +edited. +"""]] + +## Wiki templates + +These templates are used to build the wiki. The aim is to keep almost all +html out of ikiwiki and in the templates. + +* `page.tmpl` - Used for displaying all regular wiki pages. +* `misc.tmpl` - Generic template used for any page that doesn't + have a custom template. +* `editpage.tmpl` - Create/edit page. +* `change.tmpl` - Used to create a page describing a change made to the wiki. +* `passwordmail.tmpl` - Not a html template, this is used to + generate a mail with an url the user can use to reset their password. +* `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]]. +* `rssitem.tmpl` - Used for generating individual items on rss feeds. +* `atompage.tmpl` - Used for generating atom feeds for blogs. +* `atomitem.tmpl` - Used for generating individual items on atom feeds. +* `inlinepage.tmpl` - Used for adding a page inline in a blog + page. +* `archivepage.tmpl` - Used for listing a page in a blog archive page. +* `microblog.tmpl` - Used for showing a microblogging post inline. +* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) +* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. +* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create + a page for a post. +* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search + form to wiki pages. +* `searchquery.tmpl` - This is an omega template, used by the + [[plugins/search]] plugin. +* `comment.tmpl` - This template is used to display a comment + by the [[plugins/comments]] plugin. +* `editcomment.tmpl` - This template is the comment post form for the + [[plugins/comments]] plugin. +* `commentmoderation.tmpl` - This template is used to produce the comment + moderation form. +* `recentchanges.tmpl` - This template is used for listing a change + on the RecentChanges page. + +[[!if test="enabled(pagetemplate)" then=""" +## The pagetemplate directive + +The pagetemplate directive can allow individual pages to use a +different template than `page.tmpl`. +"""]] + +## Template locations + +Templates are located in `/usr/share/ikiwiki/templates` by default; +the `templatedir` setting can be used to make another directory be +searched first. Customized templates can also be placed inside the +"templates/" directory in your wiki's source. + +## Template syntax + +Ikiwiki uses the HTML::Template module as its template engine. This +supports things like conditionals and loops in templates and is pretty easy +to learn. All you really need to know are a few things: + +* To insert the value of a template variable, use `<TMPL_VAR variable>`. +* To make a block of text conditional on a variable being set use + `<TMPL_IF NAME="variable">text</TMPL_IF>`. +* To use one block of text if a variable is set and a second if it's not, + use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` + +[[!meta robots="noindex, follow"]] diff --git a/doc/tips/comments_feed.mdwn b/doc/tips/comments_feed.mdwn index 6f8137256..6d4dbb803 100644 --- a/doc/tips/comments_feed.mdwn +++ b/doc/tips/comments_feed.mdwn @@ -6,5 +6,5 @@ add a feed that contains all the comments posted to any page. Here's how: \[[!inline pages="internal(*/comment_*)" template=comment]] The special [[ikiwiki/PageSpec]] matches all comments. The -[[template|wikitemplates]] causes the comments to be displayed formatted +[[template|templates]] causes the comments to be displayed formatted nicely. diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index f6d444890..7eb404910 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -17,7 +17,7 @@ The new tag file is then complied during the change phase. *see git history of this page if you want the patch --[[smcv]]* -This uses a [[template|wikitemplates]] called `autotagpage.tmpl`, here is my template file: +This uses a [[template|templates]] called `autotagpage.tmpl`, here is my template file: \[[!inline pages="link(<TMPL_VAR TAG>)" archive="yes"]] diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index a112cb9da..838d15c1a 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -6,7 +6,7 @@ This would allow setting: templatedir => "$srcdir/templates", -.. and then the [[wikitemplates]] are managed like other wiki files; and +.. and then the [[templates]] are managed like other wiki files; and like other wiki files, a change to them automatically updates dependent pages. diff --git a/doc/todo/html.mdwn b/doc/todo/html.mdwn index 44f20c876..4f4542be2 100644 --- a/doc/todo/html.mdwn +++ b/doc/todo/html.mdwn @@ -1,6 +1,6 @@ Create some nice(r) stylesheets. Should be doable w/o touching a single line of code, just -editing the [[wikitemplates]] and/or editing [[style.css]]. +editing the [[templates]] and/or editing [[style.css]]. [[done]] ([[css_market]] ..) diff --git a/doc/todo/multiple_templates.mdwn b/doc/todo/multiple_templates.mdwn index 72783c556..30fb8d6ee 100644 --- a/doc/todo/multiple_templates.mdwn +++ b/doc/todo/multiple_templates.mdwn @@ -1,4 +1,4 @@ -> Another useful feature might be to be able to choose a different [[template|wikitemplates]] +> Another useful feature might be to be able to choose a different [[template|templates]] > file for some pages; [[blog]] pages would use a template different from the > home page, even if both are managed in the same repository, etc. diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 2e12517ea..9cf61cc6c 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -120,10 +120,11 @@ also be configured using a setup file. * --templatedir dir - Specify the directory that the page [[templates|wikitemplates]] are stored in. + Specify the directory that [[templates|templates]] are stored in. Default is `/usr/share/ikiwiki/templates`, or another location as configured at build time. If the templatedir is changed, missing templates will still - be searched for in the default location as a fallback. + be searched for in the default location as a fallback. Templates can also be + placed in the "templates/" subdirectory of the srcdir. Note that if you choose to copy and modify ikiwiki's templates, you will need to be careful to keep them up to date when upgrading to new versions of diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn deleted file mode 100644 index 6e5a7261d..000000000 --- a/doc/wikitemplates.mdwn +++ /dev/null @@ -1,52 +0,0 @@ -ikiwiki uses the HTML::Template module as its template engine. This -supports things like conditionals and loops in templates and is pretty easy -to learn. - -The aim is to keep almost all html out of ikiwiki and in the templates. - -It ships with some basic templates which can be customised. These are -located in `/usr/share/ikiwiki/templates` by default; the `templatedir` -setting can be used to make another directory be searched first. - -* `page.tmpl` - Used for displaying all regular wiki pages. -* `misc.tmpl` - Generic template used for any page that doesn't - have a custom template. -* `editpage.tmpl` - Create/edit page. -* `change.tmpl` - Used to create a page describing a change made to the wiki. -* `passwordmail.tmpl` - Not a html template, this is used to - generate a mail with an url the user can use to reset their password. -* `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]]. -* `rssitem.tmpl` - Used for generating individual items on rss feeds. -* `atompage.tmpl` - Used for generating atom feeds for blogs. -* `atomitem.tmpl` - Used for generating individual items on atom feeds. -* `inlinepage.tmpl` - Used for adding a page inline in a blog - page. -* `archivepage.tmpl` - Used for listing a page in a blog archive page. -* `microblog.tmpl` - Used for showing a microblogging post inline. -* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) -* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. -* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create - a page for a post. -* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search - form to wiki pages. -* `searchquery.tmpl` - This is an omega template, used by the - [[plugins/search]] plugin. -* `comment.tmpl` - This template is used to display a comment - by the [[plugins/comments]] plugin. -* `editcomment.tmpl` - This template is the comment post form for the - [[plugins/comments]] plugin. -* `commentmoderation.tmpl` - This template is used to produce the comment - moderation form. -* `recentchanges.tmpl` - This template is used for listing a change - on the RecentChanges page. - -The [[plugins/pagetemplate]] plugin can allow individual pages to use a -different template than `page.tmpl`. - -The [[plugins/template]] plugin also uses templates, though those -[[templates]] are typically stored as pages in the wiki, and are inserted -into pages. - -The [[plugins/edittemplate]] plugin is used to make new pages default to -containing text from a template, which can be filled as out the page is -edited. diff --git a/doc/wikitemplates/discussion.mdwn b/doc/wikitemplates/discussion.mdwn deleted file mode 100644 index f97444e5f..000000000 --- a/doc/wikitemplates/discussion.mdwn +++ /dev/null @@ -1,46 +0,0 @@ -## Place for local templates -Where does one put any locally modified templates for an individual ikiwiki? --Ivan Z. - -> You can put them whereever you like; the `templatedir` controls -> where ikiwiki looks for them. --[[Joey]] - -Thank you for your response! My question arose out of my intention to make -custom templates for a wiki--specifically suited for the kind of content -it will have--so, that would mean I would want to distribute them through -git together with other content of the wiki. So, for this case the -separation of conceptually ONE thing (the content, the templates, and the -config option which orders to use these templates) into THREE separate -files/repos (the main content repo, the repo with templates, and the config -file) is not convenient: instead of distributing a single repo, I have to -tell people to take three things if they want to replicate this wiki. How -would you solve this inconvenience? Perhaps, a default location of the -templates *inside* the source repo would do?--Ivan Z. - -> I would avoid putting the templates in a subdirectory of the ikiwiki srcdir. -> (I'd also avoid putting the ikiwiki setup file there.) -> While it's safe to do either in some cases, there are configurations where -> it's unsafe. For example, a malicious user could use attachment handling to -> replace those files with their own, bad versions. -> -> So, two ideas for where to put the templatedir and ikiwiki setup. - -> * The easiest option is to put your wiki content in a subdirectory -> ("wiki", say) and point `srcdir` at that. -> then you can have another subdirectory for the wikitemplates, -> and put the setup file at the top. -> * Another option if using git would be to have a separate branch, -> in the same git repository, that holds wikitemplates and the setup file. -> Then you check out the repository once to make the `srcdir` available, -> and have a second checkout, of the other branch, to make the other stuff -> available. -> -> Note that with either of these methods, you have to watch out if -> giving other direct commit access to the repository. They could -> still edit the setup file and templates, so only trusted users should -> be given access. (It is, however, perfectly safe to let people edit -> the wiki via the web, and is even safe to configure -> [[tips/untrusted_git_push]] to such a repository.) --[[Joey]] - -Thanks, that's a nice and simple idea: to have a subdirectory! I'll try it. --Ivan Z. - -A [[!taglink wish|wishlist]]: the ikiwiki program could be improved so that it follows the same logic as git in looking for its config: it could ascend directories until it finds an `.ikiwiki/` directory with `.ikiwiki/setup` and then uses that configuration. Now I'm tired to always type `ikiwiki --setup path/to/the/setup --refresh` when working in my working clone of the sources; I'd like to simply type `ikiwiki` instead, and let it find the setup file. The default location to look for templates could also be made to be a sibling of the setup file: `.ikiwiki/templates/`. --Ivan Z. -- cgit v1.2.3 From d5c5fef363564261ccba236f1d64eaa60567d514 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 16:48:37 -0400 Subject: update --- doc/todo/auto_rebuild_on_template_change.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index 66aa07193..037d0d1db 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -62,3 +62,15 @@ Have started working on this. >>>>>> it'd either be necessary to make them be internal pages >>>>>> (templates/inlinepage._tmpl) or special-case them in some other way. >>>>>> --[[smcv]] + +>>>>>>> In my branch, I left in support for the templatedir, and also +>>>>>>> /usr/share/ikiwiki/templates. So, users do not have to put their +>>>>>>> custom templates in templates/ in the wiki. If they do, +>>>>>>> the templates are copied to the destdir like other non-wiki page files +>>>>>>> are. The templates are not wiki pages, except those used by a few +>>>>>>> things like the [[plugins/template]] plugin. +>>>>>>> +>>>>>>> That seems acceptable, since users probably don't need to modify +>>>>>>> many templates, so the clutter is small. (Especially when +>>>>>>> compared to the other clutter the basewiki always puts in destdir.) +>>>>>>> This could be revisted later. --[[Joey]] -- cgit v1.2.3 From 6c64ce0336240be16eeae81313e53c630cb196bc Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 17:01:22 -0400 Subject: update news for template change --- debian/NEWS | 32 +++++++++++++++++++-------- doc/todo/auto_rebuild_on_template_change.mdwn | 2 ++ template-transition-notes | 4 ---- 3 files changed, 25 insertions(+), 13 deletions(-) delete mode 100644 template-transition-notes (limited to 'doc') diff --git a/debian/NEWS b/debian/NEWS index 3a8705680..69967c84c 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -2,22 +2,36 @@ ikiwiki (3.20100422) unstable; urgency=low This version of ikiwiki has a lot of changes that you need to know about. + Now you can include customised versions of templates in the source + of your wiki. (For example, templates/page.tmpl.) When these templates + are changed, ikiwiki will automatically rebuild pages that use them. + The --getctime switch is renamed to --gettimes, and it also gets the file modification time. And it's a lot faster (when using git). But the really important change is, you don't have to remember to use this switch. Now ikiwiki will do it when it needs to. - Starting from this version, the "tagged()" pagespec only matches tags, - not regular wikilinks. If your wiki accidentially relied on the old, - buggy behavior, you might need to change its pagespecs to use "link()". + At last, the "tagged()" pagespec only matches tags, not regular wikilinks. + If your wiki accidentially relied on the old, buggy behavior, you might + need to change its pagespecs to use "link()". + + Many of your wishes have been answered: Now tag pages can automatically be + created when new tags are used. This feature is enabled by default if you + have configured a tagbase. It can be turned on or off using the + tag_autocreate setting. + + These changes may also affect some users: + + * The title_natural sort method (as used by the inline directive, etc) + have been moved to the new sortnaturally plugin, which is not enabled + by default since it requires the Sort::Naturally perl module. - Now tag pages can automatically be created as new tags are used. This - feature is enabled by default if you have configured a tagbase. It - can be turned on or off using the tag_autocreate setting. + * TMPL_INCLUDE is no longer supported in any template used by ikiwiki. + It used to be allowed in certian templates, but not in others. - The title_natural sort method (as used by the inline directive, etc) - have been moved to the new sortnaturally plugin, which is not enabled - by default since it requires the Sort::Naturally perl module. + * The add_templates option has been removed from the underlay plugin. + If you used this option, you can instead use templates/ subdirectories + inside underlay directories added by the add_underlays option. Due to the above and other changes, all wikis need to be rebuilt on upgrade to this version. If you listed your wiki in /etc/ikiwiki/wikilist diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index 192b22f70..ea990b877 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -74,3 +74,5 @@ Have started working on this. >>>>>>> many templates, so the clutter is small. (Especially when >>>>>>> compared to the other clutter the basewiki always puts in destdir.) >>>>>>> This could be revisted later. --[[Joey]] + +[[done]] diff --git a/template-transition-notes b/template-transition-notes deleted file mode 100644 index a319616f4..000000000 --- a/template-transition-notes +++ /dev/null @@ -1,4 +0,0 @@ -* add_templates option removed from underlay plugin - (can use add_underlays instead) -* includes no longer allowed in templates -* template_params removed (not exported API) -- cgit v1.2.3 From 9b112cc986023e3a9ec5a4b5e9824af05e80c4d8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 17:23:31 -0400 Subject: add test case to ensure all templates are documented --- doc/templates.mdwn | 42 +++++++++++++++++++++--------------------- t/templates_documented.t | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 21 deletions(-) create mode 100755 t/templates_documented.t (limited to 'doc') diff --git a/doc/templates.mdwn b/doc/templates.mdwn index f7b3adae5..7b56600d1 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -30,34 +30,34 @@ html out of ikiwiki and in the templates. * `page.tmpl` - Used for displaying all regular wiki pages. * `misc.tmpl` - Generic template used for any page that doesn't have a custom template. -* `editpage.tmpl` - Create/edit page. -* `change.tmpl` - Used to create a page describing a change made to the wiki. -* `passwordmail.tmpl` - Not a html template, this is used to - generate a mail with an url the user can use to reset their password. -* `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]]. +* `rsspage.tmpl` - Used for generating rss feeds for blogs. * `rssitem.tmpl` - Used for generating individual items on rss feeds. * `atompage.tmpl` - Used for generating atom feeds for blogs. * `atomitem.tmpl` - Used for generating individual items on atom feeds. -* `inlinepage.tmpl` - Used for adding a page inline in a blog - page. +* `inlinepage.tmpl` - Used for displaying a post in a blog. * `archivepage.tmpl` - Used for listing a page in a blog archive page. +* `titlepage.tmpl` - Used for listing a page by title in a blog archive page. * `microblog.tmpl` - Used for showing a microblogging post inline. * `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) -* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. -* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create +* `feedlink.tmpl` - Used to add rss/atom links if `blogpost.tmpl` is not used. +* `aggregatepost.tmpl` - Used by the aggregate plugin to create a page for a post. -* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search - form to wiki pages. -* `searchquery.tmpl` - This is an omega template, used by the - [[plugins/search]] plugin. -* `comment.tmpl` - This template is used to display a comment - by the [[plugins/comments]] plugin. -* `editcomment.tmpl` - This template is the comment post form for the - [[plugins/comments]] plugin. -* `commentmoderation.tmpl` - This template is used to produce the comment - moderation form. -* `recentchanges.tmpl` - This template is used for listing a change - on the RecentChanges page. +* `searchform.tmpl`, `googleform.tmpl` - Used by the search plugin + and google plugin to add search forms to wiki pages. +* `searchquery.tmpl` - This is a Omega template, used by the + search plugin. +* `comment.tmpl` - Used by the comments plugin to display a comment. +* `change.tmpl` - Used to create a page describing a change made to the wiki. +* `recentchanges.tmpl` - Used for listing a change on the RecentChanges page. +* `autoindex.tmpl` - Filled in by the autoindex plugin to make index pages. +* `autotag.tmpl` - Filled in by the tag plugin to make tag pages. +* `calendarmonth.tmpl`, `calendaryear.tmpl` - Used by ikiwiki-calendar to + make calendar archive pages. +* `editpage.tmpl`, `editconflict.tmpl`, `editcreationconflict.tmpl`, + `editfailedsave.tmpl`, `editpagegone.tmpl`, `pocreatepage.tmpl`, + `editcomment.tmpl` `commentmoderation.tmpl`, `renamesummary.tmpl`, + `passwordmail.tmpl` - Parts of ikiwiki's user interface; do not + normally need to be customised. [[!if test="enabled(pagetemplate)" then=""" ## The pagetemplate directive diff --git a/t/templates_documented.t b/t/templates_documented.t new file mode 100755 index 000000000..826c51d36 --- /dev/null +++ b/t/templates_documented.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More 'no_plan'; + +$/=undef; +open(IN, "doc/templates.mdwn") || die "doc/templates.mdwn: $!"; +my $page=<IN>; +close IN; + +foreach my $file (glob("templates/*.tmpl")) { + $file=~s/templates\///; + ok($page =~ /\Q$file\E/, "$file documented on doc/templates.mdwn"); +} -- cgit v1.2.3 From 33b0a69e90f4c2e22fe0e0c812836a2eb661c6d2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 17:36:07 -0400 Subject: improve attachment example --- doc/ikiwiki/pagespec/attachment.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec/attachment.mdwn b/doc/ikiwiki/pagespec/attachment.mdwn index 419f00ee4..fa2bc5867 100644 --- a/doc/ikiwiki/pagespec/attachment.mdwn +++ b/doc/ikiwiki/pagespec/attachment.mdwn @@ -7,11 +7,12 @@ If attachments are enabled, the wiki admin can control what types of attachments will be accepted, via the `allowed_attachments` configuration setting. -For example, to limit arbitrary files to 50 kilobytes, but allow -larger mp3 files to be uploaded by joey into a specific directory, and -check all attachments for viruses, something like this could be used: +For example, to limit most users to uploading small images, and nothing else, +while allowing larger mp3 files to be uploaded by joey into a specific +directory, and check all attachments for viruses, something like this could be +used: - virusfree() and ((user(joey) and podcast/*.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (!ispage() and maxsize(50kb))) + virusfree() and ((user(joey) and podcast/*.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (mimetype(image/*) and maxsize(50kb))) The regular [[ikiwiki/PageSpec]] syntax is expanded with the following additional tests: -- cgit v1.2.3 From 1473bf84c525d18f933fa2dcae86628af9dfff76 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 23 Apr 2010 17:38:37 -0400 Subject: update re template change --- doc/security.mdwn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/security.mdwn b/doc/security.mdwn index 21aef316b..34a005239 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -162,10 +162,11 @@ closed though. ## HTML::Template security -If the [[plugins/template]] plugin is enabled, users can modify templates -like any other part of the wiki. This assumes that HTML::Template is secure +If the [[plugins/template]] plugin is enabled, all users can modify templates +like any other part of the wiki. Some trusted users can modify templates +without it too. This assumes that HTML::Template is secure when used with untrusted/malicious templates. (Note that includes are not -allowed, so that's not a problem.) +allowed.) ---- -- cgit v1.2.3 From 05517a5426fb585fdd56b21ce13cb4b80d2bc709 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 00:41:52 -0400 Subject: wording --- doc/templates.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 7b56600d1..c91037670 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -4,9 +4,8 @@ you can fully customise this site. [[!if test="enabled(template)" then=""" ## The template directive -The template directive allows wiki pages to be used as templates. -These templates can be filled out and inserted into other pages in the -wiki using the directive. +The template directive allows wiki pages to be used as templates, +filled out and inserted into other pages in the wiki. """]] [[!if test="enabled(template) and enabled(inline)" then=""" [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes -- cgit v1.2.3 From a46e17893204142c4cb3400057e814aa7856d350 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 00:43:45 -0400 Subject: add link to templates page --- doc/ikiwiki.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwiki.mdwn b/doc/ikiwiki.mdwn index e0a971d96..4d840696c 100644 --- a/doc/ikiwiki.mdwn +++ b/doc/ikiwiki.mdwn @@ -14,3 +14,4 @@ Some documentation on using ikiwiki: * [[ikiwiki/markdown]] * [[ikiwiki/openid]] * [[ikiwiki/searching]] +* [[templates]] -- cgit v1.2.3 From be3d754320088ecbb0d60a1675d71078611ef62c Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 00:45:54 -0400 Subject: remove paragraph about old style directives, it's been long enough --- doc/ikiwiki/wikilink.mdwn | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/wikilink.mdwn b/doc/ikiwiki/wikilink.mdwn index f561d5850..0c30aafa2 100644 --- a/doc/ikiwiki/wikilink.mdwn +++ b/doc/ikiwiki/wikilink.mdwn @@ -22,15 +22,3 @@ page, but the link will appear like this: [[foo_bar|SandBox]]. To link to an anchor inside a page, you can use something like `\[[WikiLink#foo]]` . - -## Directives and WikiLinks - -ikiwiki has two syntaxes for -[[directives|directive]]. The older syntax -used spaces to distinguish between directives and -wikilinks; as a result, with that syntax in use, you cannot use spaces -in WikiLinks, and must replace spaces with underscores. The newer -syntax, enabled with the `prefix_directives` option in an ikiwiki -setup file, prefixes directives with `!`, and thus does not prevent -links with spaces. Future versions of ikiwiki will turn this option -on by default. -- cgit v1.2.3 From b28323e76a98d56fa4af813338a134dea0106626 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 00:47:46 -0400 Subject: fix caps --- doc/ikiwiki/subpage.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/subpage.mdwn b/doc/ikiwiki/subpage.mdwn index e047b860c..862f45ec1 100644 --- a/doc/ikiwiki/subpage.mdwn +++ b/doc/ikiwiki/subpage.mdwn @@ -5,8 +5,8 @@ this page, [[SubPage]] has some related pages placed under it, like wiki rather than just having a great big directory full of pages. To add a SubPage, just make a subdirectory and put pages in it. For -example, this page is SubPage.mdwn in this wiki's source, and there is also -a SubPage subdirectory, which contains SubPage/LinkingRules.mdwn. Subpages +example, this page is subpage.mdwn in this wiki's source, and there is also +a subpage subdirectory, which contains subpage/linkingrules.mdwn. Subpages can be nested as deeply as you'd like. Linking to and from a SubPage is explained in [[LinkingRules]]. -- cgit v1.2.3 From c0b2334815303d4dc2fdf0b22dff12085671c8d8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 01:13:37 -0400 Subject: reword, reorg, add example --- doc/templates.mdwn | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/templates.mdwn b/doc/templates.mdwn index c91037670..0e54ae8a0 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -2,7 +2,7 @@ you can fully customise this site. [[!if test="enabled(template)" then=""" -## The template directive +## template pages The template directive allows wiki pages to be used as templates, filled out and inserted into other pages in the wiki. @@ -12,21 +12,32 @@ filled out and inserted into other pages in the wiki. sort=title template=titlepage rootpage=templates postformtext="Add a new template named:"]] """]] +[[!if test="enabled(template)" then=""" +[[!template id=note text="This note box is built using the +[[note]] template!"]] +[[!template id=popup mouseover="popup example" popup="This popup is built using +the [[popup]] template!"]] +"""]] [[!if test="enabled(edittemplate)" then=""" -## The edittemplate directive +## edit templates The edittemplate directive can be used to make new pages default to containing text from a template, which can be filled as out the page is edited. """]] -## Wiki templates +## wiki templates These templates are used to build the wiki. The aim is to keep almost all html out of ikiwiki and in the templates. -* `page.tmpl` - Used for displaying all regular wiki pages. +* `page.tmpl` - Used for displaying all regular wiki pages. This is the + key template customize. +[[!if test="enabled(pagetemplate)" then=""" + (The pagetemplate directive can be used to make a page use a + different template than `page.tmpl`.) +"""]] * `misc.tmpl` - Generic template used for any page that doesn't have a custom template. * `rsspage.tmpl` - Used for generating rss feeds for blogs. @@ -58,13 +69,6 @@ html out of ikiwiki and in the templates. `passwordmail.tmpl` - Parts of ikiwiki's user interface; do not normally need to be customised. -[[!if test="enabled(pagetemplate)" then=""" -## The pagetemplate directive - -The pagetemplate directive can allow individual pages to use a -different template than `page.tmpl`. -"""]] - ## Template locations Templates are located in `/usr/share/ikiwiki/templates` by default; -- cgit v1.2.3 From a95d824cb43b9ffadb802f0804818b329f57d69a Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 01:36:01 -0400 Subject: update --- doc/templates.mdwn | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) (limited to 'doc') diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 0e54ae8a0..67e5517e4 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -1,6 +1,21 @@ [[Ikiwiki]] uses many templates for many purposes. By editing its templates, you can fully customise this site. +Templates are located in `/usr/share/ikiwiki/templates` by default; +the `templatedir` setting can be used to make another directory be +searched first. Customized templates can also be placed inside the +"templates/" directory in your wiki's source. + +Ikiwiki uses the HTML::Template module as its template engine. This +supports things like conditionals and loops in templates and is pretty +easy to learn. All you really need to know are a few things: + +* To insert the value of a template variable, use `<TMPL_VAR variable>`. +* To make a block of text conditional on a variable being set use + `<TMPL_IF NAME="variable">text</TMPL_IF>`. +* To use one block of text if a variable is set and a second if it's not, + use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` + [[!if test="enabled(template)" then=""" ## template pages @@ -12,12 +27,6 @@ filled out and inserted into other pages in the wiki. sort=title template=titlepage rootpage=templates postformtext="Add a new template named:"]] """]] -[[!if test="enabled(template)" then=""" -[[!template id=note text="This note box is built using the -[[note]] template!"]] -[[!template id=popup mouseover="popup example" popup="This popup is built using -the [[popup]] template!"]] -"""]] [[!if test="enabled(edittemplate)" then=""" ## edit templates @@ -33,11 +42,9 @@ These templates are used to build the wiki. The aim is to keep almost all html out of ikiwiki and in the templates. * `page.tmpl` - Used for displaying all regular wiki pages. This is the - key template customize. -[[!if test="enabled(pagetemplate)" then=""" + key template to customize. [[!if test="enabled(pagetemplate)" then=""" (The pagetemplate directive can be used to make a page use a - different template than `page.tmpl`.) -"""]] + different template than `page.tmpl`.)"""]] * `misc.tmpl` - Generic template used for any page that doesn't have a custom template. * `rsspage.tmpl` - Used for generating rss feeds for blogs. @@ -69,23 +76,4 @@ html out of ikiwiki and in the templates. `passwordmail.tmpl` - Parts of ikiwiki's user interface; do not normally need to be customised. -## Template locations - -Templates are located in `/usr/share/ikiwiki/templates` by default; -the `templatedir` setting can be used to make another directory be -searched first. Customized templates can also be placed inside the -"templates/" directory in your wiki's source. - -## Template syntax - -Ikiwiki uses the HTML::Template module as its template engine. This -supports things like conditionals and loops in templates and is pretty easy -to learn. All you really need to know are a few things: - -* To insert the value of a template variable, use `<TMPL_VAR variable>`. -* To make a block of text conditional on a variable being set use - `<TMPL_IF NAME="variable">text</TMPL_IF>`. -* To use one block of text if a variable is set and a second if it's not, - use `<TMPL_IF NAME="variable">text<TMPL_ELSE>other text</TMPL_IF>` - [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From c2656f08f3a3671b0ba7dc861d53347c7f695ec1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 16:11:33 -0400 Subject: template() - return params in list context I forgot CGI::Formbuilder's horrible interface that needs template parameters instead of a constructed object. --- IkiWiki.pm | 7 +- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 2 +- doc/plugins/write.mdwn | 8 +- po/bg.po | 236 ++++++++++++++++++++++--------------------- po/cs.po | 243 +++++++++++++++++++++++--------------------- po/da.po | 242 ++++++++++++++++++++++++-------------------- po/de.po | 242 ++++++++++++++++++++++++-------------------- po/es.po | 246 ++++++++++++++++++++++++--------------------- po/fr.po | 242 ++++++++++++++++++++++++-------------------- po/gu.po | 235 +++++++++++++++++++++++-------------------- po/ikiwiki.pot | 218 ++++++++++++++++++++------------------- po/it.po | 242 ++++++++++++++++++++++++-------------------- po/pl.po | 241 +++++++++++++++++++++++--------------------- po/sv.po | 236 ++++++++++++++++++++++--------------------- 15 files changed, 1416 insertions(+), 1226 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8bae6b72f..c218ed8ab 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1690,8 +1690,7 @@ sub template_depends ($$;@) { return unless defined $filename; - require HTML::Template; - return HTML::Template->new( + my @opts=( filter => sub { my $text_ref = shift; ${$text_ref} = decode_utf8(${$text_ref}); @@ -1702,6 +1701,10 @@ sub template_depends ($$;@) { @_, no_includes => 1, ); + return @opts if wantarray; + + require HTML::Template; + return HTML::Template->new(@opts); } sub template ($;@) { diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index ed75a6e46..f7dc99dca 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -274,7 +274,7 @@ sub editcomment ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => template('editcomment.tmpl'), + template => { template('editcomment.tmpl') }, ); IkiWiki::decode_form_utf8($form); diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 5c94ecbca..7bb6eb07c 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -78,7 +78,7 @@ sub cgi_editpage ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => template("editpage.tmpl"), + template => { template("editpage.tmpl") }, ); decode_form_utf8($form); diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9128c7f54..a9ea7db73 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -701,9 +701,11 @@ the entire wiki build and make the wiki unusable. ### `template($;@)` -Creates and returns a [[!cpan HTML::Template]] object. The first parameter -is the name of the template file. The optional remaining parameters are -passed to `HTML::Template->new`. +Creates and returns a [[!cpan HTML::Template]] object. (In a list context, +returns the parameters needed to construct the obhect.) + +The first parameter is the name of the template file. The optional remaining +parameters are passed to `HTML::Template->new`. Normally, the template file is first looked for in the templates/ subdirectory of the srcdir. Failing that, it is looked for in the templatedir. diff --git a/po/bg.po b/po/bg.po index 5585a10d6..f85323ea3 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-bg\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-12 01:19+0200\n" "Last-Translator: Damyan Ivanov <dam@modsodtsys.com>\n" "Language-Team: Bulgarian <dict@fsa-bg.org>\n" @@ -55,7 +55,7 @@ msgstr "Предпочитанията са запазени." msgid "You are banned." msgstr "Достъпът ви е забранен." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Грешка" @@ -137,7 +137,7 @@ msgstr "създаване на нова страницa „%s”" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "готово" @@ -178,7 +178,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -210,55 +210,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "създаване на %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -268,7 +268,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -298,14 +298,14 @@ msgstr "премахване на старата страница „%s”" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "създаване на %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "промяна на %s" @@ -325,9 +325,10 @@ msgstr "не е указан файл на обвивката" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "грешка при обработване на шаблона" #: ../IkiWiki/Plugin/format.pm:30 @@ -358,18 +359,18 @@ msgstr "грешка при четене на „%s”: %s" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -458,12 +459,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "" +msgid "template %s not found" +msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "модулът „RPC::XML::Client” не е намерен; източникът не е проверен" @@ -494,21 +495,25 @@ msgstr "" "грешка при зареждането на perl-модула „Markdown.pm” (%s) или „/usr/bin/" "markdown” (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "шаблонът „%s” не е намерен" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Огледала" @@ -525,10 +530,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "функцията „getctime” не е реализирана" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -546,39 +547,39 @@ msgstr "Всички страници имат връзки от други ст msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Акаунтът е създаден. Можете да влезете." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Грешка при създаване на акаунта." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Грешка при изпращане на поща" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -609,94 +610,94 @@ msgstr "модулът „RPC::XML::Client” не е намерен; източ msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "промяна на %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "приставката „linkmap”: грешка при изпълнение на „dot”" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -841,44 +842,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "не е указан файл на обвивката" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "обновяване на страницата „%s”" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "обновяване на страниците от уики „%s”: %s от потребител „%s”" @@ -983,21 +984,21 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "създаване на нова страницa „%s”" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "липсващ параметър „id” на шаблона" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" +#, fuzzy, perl-format +msgid "%s not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "грешка при обработване на шаблона" - #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" @@ -1056,54 +1057,59 @@ msgstr "" msgid "bad file name %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "сканиране на „%s”" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "премахване на старата страница „%s”" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "обновяване на страницата „%s”, съдържаща препратки към „%s”" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "премахване на „%s” понеже не се генерира от „%s”" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "обновяване на страницата „%s”, зависеща от „%s”" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "обновяване на „%s” и осъвременяване на обратните връзки" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: неуспех при обновяване на страницата „%s”" @@ -1176,64 +1182,65 @@ msgstr "формат: ikiwiki [опции] източник местоназна msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "генериране на обвивки..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "обновяване на уики..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "осъвременяване на уики..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Дискусия" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "При използване на пареметъра „--cgi” е необходимо да се укаже и " "местоположението на уикито чрез параметъра „--url”" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "грешка при четене на „%s”: %s" @@ -1258,6 +1265,13 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "грешка при обработване на шаблона" + +#~ msgid "getctime not implemented" +#~ msgstr "функцията „getctime” не е реализирана" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "грешка при запис на файла „%s”: %s" @@ -1316,10 +1330,6 @@ msgstr "" #~ "изпълнява като „svn post-commit hook”. Няма да бъдат разпратени " #~ "известявания" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "шаблонът „%s” не е намерен" - #~ msgid "What's this?" #~ msgstr "Какво е това?" diff --git a/po/cs.po b/po/cs.po index 0b45bb97a..71195bae2 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-09-11 20:23+0200\n" "Last-Translator: Miroslav Kure <kurem@debian.cz>\n" "Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n" @@ -55,7 +55,7 @@ msgstr "Nastavení uloženo." msgid "You are banned." msgstr "Jste vyhoštěni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Chyba" @@ -136,7 +136,7 @@ msgstr "vytvářím novou stránku %s" msgid "deleting bucket.." msgstr "mažu bucket..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "hotovo" @@ -174,7 +174,7 @@ msgstr "chybné jméno souboru s přílohou" msgid "attachment upload" msgstr "příloha nahrána" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatické vytváření indexu" @@ -208,55 +208,55 @@ msgstr "komentář musí mít obsah" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "chybný název stránky" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "komentář k %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "stránka „%s“ neexistuje, takže nemůžete komentovat" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "komentáře na stránce „%s“ jsou uzamčeny" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "komentář uložen pro schválení" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Váš komentář bude zobrazen po schválení moderátorem" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Přidán komentář" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Přidán komentář: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "nejste přihlášeni jako správce" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Schvalování komentářů" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "schvalování komentářů" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -266,7 +266,7 @@ msgstr[1] "Komentáře" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Komentáře" @@ -297,14 +297,14 @@ msgstr "odstraňuji starý náhled %s" msgid "%s is not an editable page" msgstr "%s není editovatelná stránka" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "vytvářím %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "upravuji %s" @@ -322,9 +322,11 @@ msgstr "nebyl zadán parametr match" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s byla zaregistrována pro %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "nepodařilo se zpracovat" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "nepodařilo se zpracovat:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -352,18 +354,18 @@ msgstr "není stránkou" msgid "%s is an attachment, not a page." msgstr "%s není ani příloha, ani stránka." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "nejste oprávněni měnit %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "nemůžete pracovat se souborem s přístupovým oprávněními %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "nejste oprávněni měnit přístupová oprávnění souborů" @@ -445,12 +447,12 @@ msgstr "parametry %s a %s nelze použít zároveň" msgid "Add a new post titled:" msgstr "Přidat nový příspěvek nazvaný:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "neexistující šablona %s" +msgid "template %s not found" +msgstr "šablona %s nebyla nalezena" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nebyl nalezen, nepinkám" @@ -478,18 +480,23 @@ msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" "selhalo nahrání perlového modulu Markdown.pm (%s) nebo /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "styl nebyl nalezen" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "stránka, na kterou vede přesměrování, nebyla nalezena" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "cykly nejsou v přesměrování povoleny" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "vyžaduje parametry „from“ a „to“" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Zrcadla" @@ -507,10 +514,6 @@ msgstr "schvalování komentářů" msgid "more" msgstr "více" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime není implementováno" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Přihlásit pomocí" @@ -527,39 +530,39 @@ msgstr "Na každou stránku vede odkaz z jiné stránky." msgid "bad or missing template" msgstr "chybná nebo chybějící šablona" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Vytvoření účtu bylo úspěšné. Nyní se můžete přihlásit." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Chyba při vytváření účtu." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "Bez e-mailové adresy nelze zaslat postup na resetování hesla." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Nepodařilo se odeslat email." -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Postup na resetování hesla vám byl odeslán na e-mail." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "chybné URL pro resetování hesla" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "resetování hesla bylo zamítnuto" @@ -589,40 +592,40 @@ msgstr "LWP nebyl nalezen, nepinkám" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "varování: rozpoznána stará verze po4a, doporučen přechod na 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s není platným kódem jazyka" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" "%s není platnou hodnotou parametru po_link_to, používám po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" "po_link_to=negotiated vyžaduje zapnuté usedirs, používám po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "znovusestavuji všechny stránky, aby se opravily meta nadpisy" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "sestavuji %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "aktualizovány PO soubory" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -630,7 +633,7 @@ msgstr "" "Nemohu odstranit překlad. Nicméně pokud bude odstraněna hlavní stránka, " "budou odstraněny také její překlady." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -638,50 +641,50 @@ msgstr "" "Nemohu přejmenovat překlad. Nicméně pokud bude přejmenována hlavní stránka, " "budou přejmenovány také její překlady." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT soubor (%s) neexistuje" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "nepodařilo se zkopírovat PO soubor na %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "nepodařilo se aktualizovat %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "nepodařilo se zkopírovat POT soubor na %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "nepodařilo se přeložit %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "odstraněny zastaralé PO soubory" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "nepodařilo se zapsat %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "překlad se nezdařil" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "neplatná gettext data, pro pokračování v úpravách se vraťte na předchozí " @@ -825,44 +828,44 @@ msgstr "%s není ve zdrojovém adresáři a proto nelze přejmenovat" msgid "no change to the file name was specified" msgstr "jméno souboru nebylo změněno" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "neplatné jméno" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s již existuje" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s již na disku existuje" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "přejmenování %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Také přejmenovat podstránky a přílohy" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Najednou lze přejmenovat pouze jednu přílohu." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Vyberte přílohu, kterou chcete přejmenovat." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "přejmenování %s na %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aktualizace pro přejmenování %s na %s" @@ -960,18 +963,19 @@ msgstr "Stáhnout zdrojová data" msgid "parse fail at line %d: %s" msgstr "zpracovávání selhalo na řádku %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "vytvářím novou stránku %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "chybí parametr id" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" -msgstr "šablona %s nebyla nalezena" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "nepodařilo se zpracovat:" +msgid "%s not found" +msgstr "%s nenalezen" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1034,12 +1038,12 @@ msgstr "nemohu určit identitu nedůvěryhodného uživatele %s" msgid "bad file name %s" msgstr "chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "prohledávám %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1048,42 +1052,47 @@ msgstr "" "v cestě ke zdrojovému adresáři (%s) byl nalezen symbolický odkaz -- chcete-" "li to povolit, nastavte proměnnou allow_symlinks_before_srcdir" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "přeskakuji chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s má několik možných zdrojových stránek" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "odstraňuji starou stránku %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "sestavuji %s, která odkazuje na %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "odstraňuji %s, již není sestavována pomocí %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "sestavuji %s, která závisí na %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "sestavuji %s, aby se aktualizovaly zpětné odkazy" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: nelze sestavit %s" @@ -1156,63 +1165,64 @@ msgstr "použití: ikiwiki [volby] zdroj cíl" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup konfigurační.soubor" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "použití: --set proměnná=hodnota" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "použití: --set proměnná=hodnota" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generuji obaly..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "znovusestavuji wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "obnovuji wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskuse" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Při použití --cgi musíte pomocí --url zadat url k wiki" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "nelze použít několik rcs modulů" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "nepodařilo se nahrát externí modul vyžadovaný modulem %s: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Byla rozpoznána smyčka na %s v hloubce %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ano" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Pro řazení pomocí title_natural je nutný modul Sort::Naturally" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "neznámý typ řazení %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "neznámý typ řazení %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "nelze vybrat stránky: %s" @@ -1237,6 +1247,18 @@ msgstr "Který uživatel (wiki účet nebo openid) bude správce?" msgid "What is the domain name of the web server?" msgstr "Jaké je doménové jméno webového serveru?" +#~ msgid "failed to process" +#~ msgstr "nepodařilo se zpracovat" + +#~ msgid "nonexistant template %s" +#~ msgstr "neexistující šablona %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime není implementováno" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Pro řazení pomocí title_natural je nutný modul Sort::Naturally" + #~ msgid "failed to read %s" #~ msgstr "nepodařilo se přečíst %s" @@ -1284,9 +1306,6 @@ msgstr "Jaké je doménové jméno webového serveru?" #~ "REV není nastavena, není spuštěna ze svn post-commit, nemohu zaslat " #~ "oznámení" -#~ msgid "%s not found" -#~ msgstr "%s nenalezen" - #~ msgid "What's this?" #~ msgstr "Co to je?" diff --git a/po/da.po b/po/da.po index be7a95e6a..f830d667d 100644 --- a/po/da.po +++ b/po/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-07-23 01:07+0200\n" "Last-Translator: Jonas Smedegaard <dr@jones.dk>\n" "Language-Team: None\n" @@ -59,7 +59,7 @@ msgstr "Indstillinger gemt" msgid "You are banned." msgstr "Du er banlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fejl" @@ -140,7 +140,7 @@ msgstr "opretter ny side %s" msgid "deleting bucket.." msgstr "sletter bundt.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "færdig" @@ -181,7 +181,7 @@ msgstr "dårligt vedhæftningsfilnavn" msgid "attachment upload" msgstr "vedhæftningsoplægning" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatisk indeks-dannelse" @@ -215,55 +215,55 @@ msgstr "kommentar skal have indhold" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "dårligt sidenavn" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "kommenterer på %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "siden '%s' eksisterer ikke, så du kan ikke kommentere" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "kommentarer på side '%s' er lukket" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "kommentar gemt for moderering" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Din kommentar vil blive tilføjet efter moderatorgenemsyn" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Tilføjede en kommentar" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Tilføjede en kommentar: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "du er ikke logget på som en administrator" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Kommentarmoderering" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "kommentarkoderering" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -273,7 +273,7 @@ msgstr[1] "Kommentarer" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Kommentarer" @@ -304,14 +304,14 @@ msgstr "fjerner gammelt smugkig %s" msgid "%s is not an editable page" msgstr "%s er ikke en redigérbar side" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "opretter %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "redigerer %s" @@ -329,9 +329,11 @@ msgstr "sammenligning ikke angivet" msgid "edittemplate %s registered for %s" msgstr "redigeringsskabelon %s registreret for %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "dannelsen mislykkedes" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "dannelsen mislykkedes:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -360,18 +362,18 @@ msgstr "kan ikke få sider til at passe sammen: %s" msgid "%s is an attachment, not a page." msgstr "%s er ikke en redigérbar side" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Du har ikke lov til at ændre %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "du kan ikke påvirke en fil med modus %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "du har ikke lov til at ændre modus for filer" @@ -456,12 +458,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Tilføj nyt indlæg med følgende titel:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "ikke-eksisterende skabelon: %s" +msgid "template %s not found" +msgstr "skabelon %s ikke fundet" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client ikke fundet, pinger ikke" @@ -491,18 +493,23 @@ msgstr "" "Indlæsning af perl-modulet Markdown.pm (%s) eller /usr/bin/markdown (%s) " "mislykkedes" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "stilsnit (stylesheet) ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "henvisningsside ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ring af henvisninger er ikke tilladt" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "kræver 'from'- og 'to'-parametre" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Spejle" @@ -520,10 +527,6 @@ msgstr "kommentarkoderering" msgid "more" msgstr "mere" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime ikke implementeret" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Log på med" @@ -540,40 +543,40 @@ msgstr "Alle sider har henvisninger fra andre sider." msgid "bad or missing template" msgstr "dårlig eller manglende skabelon" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Konto korrekt oprettet. Nu kan du logge på." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Fejl ved kontooprettelse." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Ingen emailadresse, så kan ikke sende adgangskodenulstillingsinstruktioner." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Afsendelse af mail mislykkedes" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Du har fået tilsendt adgangskodenulstillingsinstruktioner." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "Ukorrekt adgangskodenumstillings-URL" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "adgangskodenulstilling afvist" @@ -603,12 +606,12 @@ msgstr "LWP ikke fundet, pinger ikke" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s er ikke en gyldig sprogkode" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -616,7 +619,7 @@ msgstr "" "%s er ikke en gyldig værdi for po_link_to, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -624,21 +627,21 @@ msgstr "" "po_link_to=negotiated kræver at usedirs er aktiveret, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "gendanner alle sider for at korrigere meta titler" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "danner %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "opdaterer PO-filer" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -646,7 +649,7 @@ msgstr "" "Kan ikke fjerne en oversættelse. Fjern i stedet hovedsiden, så fjernes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -654,50 +657,50 @@ msgstr "" "Kan ikke omdøbe en oversættelse. Omdøb i stedet hovedsiden, så omdøbes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-filen %s eksisterer ikke" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "opdatering af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "oversættelse af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "forældede PO filer fjernet" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "skrivning af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "oversættelse mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "forkert gettext-data, gå tilbage til forrige side og fortsæt redigering" @@ -840,44 +843,44 @@ msgstr "%s er ikke i srcdir, så kan ikke blive omdøbt" msgid "no change to the file name was specified" msgstr "ingen ændring til filnavnet blev angivet" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "ugyldigt navn" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s eksisterer allerede" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s eksisterer allerede på disken" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "omdøb %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Omdøb også UnderSider og vedhæftninger" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Kun en vedhæftning kan blive omdøbt ad gangen." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Vælg vedhæftningen som skal omdøbes." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "omdøb %s til %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "opdatering til omdøbning af %s til %s" @@ -975,18 +978,19 @@ msgstr "Direkte datanedlastning" msgid "parse fail at line %d: %s" msgstr "afkodningsfejl på linje %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "opretter ny side %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "manglende id-parameter" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "skabelon %s ikke fundet" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "dannelsen mislykkedes:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "fødning ikke fundet" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1049,12 +1053,12 @@ msgstr "kan ikke afgøre id for ikke-tillidsfulde skribent %s" msgid "bad file name %s" msgstr "dårligt filnavn %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "gennemlæser %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1063,42 +1067,47 @@ msgstr "" "symbolsk lænke fundet i srcdir-sti (%s) -- sæt allow_symlinks_before_srcdir " "for at tillade dette" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "udelader forkert filnavn %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s har flere mulige kildesider" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "fjerner gammel side %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "danner %s, som henviser til %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "fjerner %s, ikke længere dannet af %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "danner %s, som afhænger af %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "danner %s, for at opdatere dens krydshenvisninger (backlinks)" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan ikke danne %s" @@ -1171,64 +1180,65 @@ msgstr "brug: ikiwiki [valg] kilde mål" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup opsætningsfil" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "brug: --set var=værdi" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "brug: --set var=værdi" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "bygger wrappers.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "genopbygger wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "genopfrisker wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Skal angive url til wiki med --url når der bruges --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "kan ikke bruge flere samtidige RCS-udvidelser" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" "indlæsning af ekstern udvidelse krævet af udvidelsen %s mislykkedes: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "forudberegningssløkke fundet på %s ved dybde %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally krævet for title_natural sortering" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "ukendt sorteringsform %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "ukendt sorteringsform %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "kan ikke få sider til at passe sammen: %s" @@ -1253,6 +1263,18 @@ msgstr "Hvilken bruger (wiki konto eller openid) skal være administrator?" msgid "What is the domain name of the web server?" msgstr "Hvad er webserverens domænenavn?" +#~ msgid "failed to process" +#~ msgstr "dannelsen mislykkedes" + +#~ msgid "nonexistant template %s" +#~ msgstr "ikke-eksisterende skabelon: %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime ikke implementeret" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally krævet for title_natural sortering" + #~ msgid "failed to read %s" #~ msgstr "læsning af %s mislykkedes" diff --git a/po/de.po b/po/de.po index e5a18d47b..2452c8d21 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2010-03-14 16:09+0530\n" "Last-Translator: Sebastian Kuhnert <mail@sebastian-kuhnert.de>\n" "Language-Team: German <debian-l10n-german@lists.debian.org>\n" @@ -56,7 +56,7 @@ msgstr "Einstellungen gespeichert." msgid "You are banned." msgstr "Sie sind ausgeschlossen worden." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fehler" @@ -137,7 +137,7 @@ msgstr "erstelle neue Seite %s" msgid "deleting bucket.." msgstr "lösche Behälter (bucket)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "fertig" @@ -176,7 +176,7 @@ msgstr "fehlerhafter Dateiname für Anhang" msgid "attachment upload" msgstr "Anhang hochladen" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatische Index-Erstellung" @@ -210,56 +210,56 @@ msgstr "ein Kommentar sollte Inhalt haben" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "fehlerhafter Seitenname" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "kommentiere %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" "Seite %s existiert nicht, Sie können sie deshalb auch nicht kommentieren" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "Kommentare zur Seite %s sind gesperrt" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "Der Kommentar wurde zur Moderation gespeichert" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Ihr Kommentar wird nach Moderation verschickt" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Kommentar hinzugefügt" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Kommentar hinzugefügt: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Sie sind nicht als Administrator angemeldet" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Kommentar-Moderation" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "Kommentar-Moderation" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -269,7 +269,7 @@ msgstr[1] "%i Kommentare" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "Kommentieren" @@ -299,14 +299,14 @@ msgstr "entferne alte Vorschau %s" msgid "%s is not an editable page" msgstr "Seite %s kann nicht bearbeitet werden" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "erstelle %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "bearbeite %s" @@ -324,9 +324,11 @@ msgstr "Übereinstimmung nicht angegeben" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s für %s registriert" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "Ablauf fehlgeschlagen" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "Fehler beim Ablauf:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -354,18 +356,18 @@ msgstr "Keine Seite" msgid "%s is an attachment, not a page." msgstr "Seite %s ist ein Anhang und keine Seite." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Sie dürfen %s nicht verändern" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "Sie können eine Datei mit den Zugriffsrechten %s nicht nutzen" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "Sie dürfen die Zugriffsrechte der Datei nicht ändern" @@ -451,12 +453,12 @@ msgstr "die Parameter %s und %s können nicht zusammen benutzt werden" msgid "Add a new post titled:" msgstr "Füge einen neuen Beitrag hinzu. Titel:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "nicht-vorhandene Vorlage %s" +msgid "template %s not found" +msgstr "Vorlage %s nicht gefunden" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nicht gefunden, führe Ping nicht aus" @@ -487,18 +489,23 @@ msgstr "" "laden des Perlmoduls Markdown.pm (%s) oder /usr/bin/markdown (%s) " "fehlgeschlagen" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "Stylesheet nicht gefunden" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "Umleitungsseite nicht gefunden" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "Zyklische Umleitungen sind nicht erlaubt" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "erfordert die Parameter 'from' und 'to'" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Spiegel" @@ -515,10 +522,6 @@ msgstr "Kommentar muss moderiert werden" msgid "more" msgstr "mehr" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime ist nicht implementiert" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Anmelden mit" @@ -535,41 +538,41 @@ msgstr "Alle Seiten haben mindestens einen Verweis von einer anderen Seite." msgid "bad or missing template" msgstr "fehlerhafte oder fehlende Vorlage" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "Ihre Benutzerseite: " -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "Benutzerseite erstellen" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Kontoerstellung erfolgreich. Sie können sich jetzt anmelden." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Konto konnte nicht erstellt werden." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "es gibt keine E-Mail Adresse, deshalb kann keine Anweisung zum Zurücksetzen " "des Passwortes zugeschickt werden." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Es konnte keine E-Mail versandt werden" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Ihnen wurden Anweisungen zum Zurücksetzen des Passworts zugesandt." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "fehlerhafte URL zum Zurücksetzen des Passworts" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "zurücksetzen des Passworts abgelehnt" @@ -599,12 +602,12 @@ msgstr "LWP nicht gefunden, führe Ping nicht aus" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "Warnung: Altes po4a erkannt! Empfehle Aktualisierung auf 0.35" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s ist keine gültige Sprachkodierung" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -612,7 +615,7 @@ msgstr "" "%s ist kein gültiger Wert für po_link_to, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -620,21 +623,21 @@ msgstr "" "po_link_to=negotiated benötigt usedirs eingeschaltet, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "um die meta-titeln zu reparieren werden alle Seiten neu erstellt" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "erzeuge %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "PO-Dateien aktualisiert" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -642,7 +645,7 @@ msgstr "" "Übersetzung kann nicht entfernt werden. Wenn die Master Seite entfernt wird, " "werden auch ihre Übersetzungen entfernt." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -650,50 +653,50 @@ msgstr "" "Eine Übersetzung kann nicht umbenannt werden. Wenn die Master Seite " "unbenannt wird, werden auch ihre Übersetzungen unbenannt." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-Datei (%s) existiert nicht" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "konnte die PO-Datei nicht aus dem Underlay nach %s kopieren" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "aktualisieren von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopieren der POT-Datei nach %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "übersetzen von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "überflüssige PO-Dateien wurden entfernt" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "schreiben von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "übersetzen fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "ungültige gettext Datei, gehe zurück zur vorherigen Seite um weiter zu " @@ -839,44 +842,44 @@ msgstr "%s ist nicht im srcdir und kann deshalb nicht umbenannt werden" msgid "no change to the file name was specified" msgstr "es wurde keine Änderung des Dateinamens angegeben" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "unzulässiger Name" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s existiert bereits" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s existiert bereits auf der Festplatte" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "benenne %s um" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Auch Unterseiten (SubPages) und Anhänge umbenennen" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Es kann immer nur ein Anhang gleichzeitig umbenannt werden." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Bitte wählen Sie den Anhang aus, der umbenannt werden soll." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "benenne %s in %s um" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aktualisiert zum Umbenennen von %s nach %s" @@ -974,18 +977,19 @@ msgstr "Direkter Daten-Download" msgid "parse fail at line %d: %s" msgstr "Auswertungsfehler in Zeile %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "erstelle neue Seite %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "fehlender Parameter id" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "Vorlage %s nicht gefunden" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "Fehler beim Ablauf:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "Vorlage (feed) nicht gefunden" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1051,12 +1055,12 @@ msgstr "" msgid "bad file name %s" msgstr "fehlerhafter Dateiname %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "durchsuche %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1065,42 +1069,47 @@ msgstr "" "symbolischer Verweis im srcdir Pfad (%s) gefunden -- setzen Sie " "allow_symlinks_before_srcdir, um dies zu erlauben" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "überspringe fehlerhaften Dateinamen %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s hat mehrere mögliche Quellseiten" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "entferne alte Seite %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "erzeuge %s, die auf %s verweist" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "entferne %s, wird nicht länger von %s erzeugt" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "erzeuge %s, die von %s abhängt" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "erzeuge %s, um dessen Rückverweise zu aktualisieren" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kann %s nicht erzeugen" @@ -1176,66 +1185,67 @@ msgstr "Aufruf: ikiwiki [Optionen] Quelle Ziel" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup Konfigurationsdatei" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "Aufruf: --set Variable=Wert" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "Aufruf: --set Variable=Wert" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "erzeuge Wrapper.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "erzeuge Wiki neu.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "aktualisiere Wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es muss eine URL zum Wiki mit --url angegeben werden, wenn --cgi verwandt " "wird" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" "Es können nicht mehrere Versionskontrollsystem-Erweiterungen verwandt werden" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Laden der für %s benötigten externen Erweiterung fehlgeschlagen: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Präprozessorschleife auf %s in Tiefe %i erkannt" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally wird benötigt für title_natural sort" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "Kann die Seiten nicht zuordnen: %s" @@ -1260,6 +1270,18 @@ msgstr "Wer (Wiki-Konto oder OpenID) soll Administrator sein?" msgid "What is the domain name of the web server?" msgstr "Wie lautet der Domainname des Webservers?" +#~ msgid "failed to process" +#~ msgstr "Ablauf fehlgeschlagen" + +#~ msgid "nonexistant template %s" +#~ msgstr "nicht-vorhandene Vorlage %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime ist nicht implementiert" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally wird benötigt für title_natural sort" + #~ msgid "failed to read %s" #~ msgstr "lesen von %s fehlgeschlagen" diff --git a/po/es.po b/po/es.po index 413572866..a6f3a2c6b 100644 --- a/po/es.po +++ b/po/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-06-14 12:32+0200\n" "Last-Translator: Victor Moral <victor@taquiones.net>\n" "Language-Team: <en@li.org>\n" @@ -60,7 +60,7 @@ msgstr "Las preferencias se han guardado." msgid "You are banned." msgstr "Ha sido expulsado." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Error" @@ -142,7 +142,7 @@ msgstr "creando nueva página %s" msgid "deleting bucket.." msgstr "borrando el directorio.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "completado" @@ -183,7 +183,7 @@ msgstr "nombre de archivo adjunto erróneo" msgid "attachment upload" msgstr "enviado el adjunto" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "creación de índice automática" @@ -217,55 +217,55 @@ msgstr "Un comentario debe tener algún contenido" msgid "Anonymous" msgstr "Anónimo" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "nombre de página erróneo" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "creando comentarios en la página %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "la página '%s' no existe, así que no se puede comentar sobre ella" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "los comentarios para la página '%s' están cerrados" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "comentario guardado a la espera de aprobación" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Su comentario será publicado después de que el moderador lo revise" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Añadir un comentario" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Comentario añadido: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "No está registrado como un administrador" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Aprobación de comentarios" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "aprobación de comentarios" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -275,7 +275,7 @@ msgstr[1] "Comentarios" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Comentarios" @@ -306,14 +306,14 @@ msgstr "eliminando la antigua previsualización %s" msgid "%s is not an editable page" msgstr "la página %s no es modificable" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "creando página %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "modificando página %s" @@ -331,9 +331,11 @@ msgstr "falta indicar la coincidencia de páginas (match)" msgid "edittemplate %s registered for %s" msgstr "plantilla de edición %s registrada para %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "fallo en el proceso" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "se ha producido un error fatal mientras procesaba la plantilla:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -362,18 +364,18 @@ msgstr "no encuentro páginas coincidentes: %s" msgid "%s is an attachment, not a page." msgstr "la página %s no es modificable" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "No puede cambiar %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "no puede actuar sobre un archivo con permisos %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "No puede cambiar los permisos de acceso de un archivo" @@ -460,12 +462,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Añadir una entrada nueva titulada:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "la plantilla %s no existe " +msgid "template %s not found" +msgstr "no he encontrado la plantilla %s" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "No he encontrado el componente RPC::XML::Client, no envío señal alguna" @@ -495,18 +497,23 @@ msgstr "" "no he podido cargar el módulo Perl Markdown.pm (%s) ó no he podido ejecutar " "el programa /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "hoja de estilo no encontrada " -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "falta la página a donde redirigir" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ciclo de redirección no permitido" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "los parámetros 'from' y 'to' son obligatorios" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Réplicas" @@ -524,10 +531,6 @@ msgstr "aprobación de comentarios" msgid "more" msgstr "ver más" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "la funcionalidad getctime no está incluida" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Identificarse mediante " @@ -545,43 +548,43 @@ msgstr "Todas las páginas están referenciadas entre sí." msgid "bad or missing template" msgstr "plantilla errónea ó no existente" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Cuenta de usuario creada con éxito. Ahora puede identificarse." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Error creando la cuenta de usuario." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "No tengo dirección de correo electrónica, así que no puedo enviar " "instrucciones para reiniciar la contraseña" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "No he podido enviar el mensaje de correo electrónico" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Las instrucciones para reiniciar la contraseña se le han enviado por correo " "electrónico" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "el url para reiniciar la contraseña es incorrecto" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "reinicio de contraseña denegado" @@ -611,94 +614,94 @@ msgstr "No he encontrado el componente LWP, no envío señal alguna" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s no es un archivo" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "Informaremos a %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, fuzzy, perl-format msgid "POT file (%s) does not exist" msgstr "No existe la página %s." -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "no he podido ejecutar el programa dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -840,44 +843,44 @@ msgstr "%s no está en el directorio fuente por lo que no puede ser renombrado" msgid "no change to the file name was specified" msgstr "no se ha indicado cambio alguno en el nombre del archivo" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "nombre no válido" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s ya existe" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s ya existe en el disco" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "cambiando de nombre %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "También cambia de nombre las subpáginas y los adjuntos" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Únicamente un adjunto puede ser renombrado a la vez." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Por favor, seleccione el adjunto al que cambiar el nombre." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "%s cambia de nombre a %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "actualizado el cambio de nombre de %s a %s" @@ -979,18 +982,19 @@ msgstr "Enlace directo para descarga" msgid "parse fail at line %d: %s" msgstr "error de análisis en la línea %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "creando nueva página %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "falta el parámetro \"id\"" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "no he encontrado la plantilla %s" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "se ha producido un error fatal mientras procesaba la plantilla:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "fuente de datos no encontrada" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1055,12 +1059,12 @@ msgstr "no puedo determinar el identificador de un usuario no fiable como %s" msgid "bad file name %s" msgstr "el nombre de archivo %s es erróneo" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "explorando %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1069,44 +1073,49 @@ msgstr "" "encontrado un enlace simbólico en la ruta del directorio fuente (%s) -- use " "la directiva allow_symlinks_before_srcdir para permitir la acción" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ignorando el archivo %s porque su nombre no es correcto" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s tiene mútiples páginas fuente posibles" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "eliminando la antigua página %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "convirtiendo la página %s, la cual referencia a %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "eliminando la página %s puesto que ya no se deriva de %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "convirtiendo la página %s, la cual depende de %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "" "convirtiendo la página %s para actualizar la lista de páginas que hacen " "referencia a ella." -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: no puedo convertir la página %s" @@ -1181,69 +1190,68 @@ msgstr "uso: ikiwiki [opciones] origen destino" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup archivo_de_configuración" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "uso: --set variable=valor" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "uso: --set variable=valor" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generando programas auxiliares.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "reconstruyendo el wiki.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "actualizando el wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Comentarios" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es obligatorio especificar un url al wiki con el parámetro --url si se " "utiliza el parámetro --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "no puedo emplear varios complementos rcs" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "no he podido cargar el complemento externo %s necesario para %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" "se ha detectado en la página %s un bucle de preprocesado en la iteración " "número %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "si" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" -"Se necesita el módulo Sort::Naturally para el tipo de ordenación " -"title_natural" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "no encuentro páginas coincidentes: %s" @@ -1271,6 +1279,20 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "¿ Cuál es el dominio para el servidor web ?" +#~ msgid "failed to process" +#~ msgstr "fallo en el proceso" + +#~ msgid "nonexistant template %s" +#~ msgstr "la plantilla %s no existe " + +#~ msgid "getctime not implemented" +#~ msgstr "la funcionalidad getctime no está incluida" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "" +#~ "Se necesita el módulo Sort::Naturally para el tipo de ordenación " +#~ "title_natural" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "no puedo leer de %s: %s " diff --git a/po/fr.po b/po/fr.po index 6be9482ce..b98a498c0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.141\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-08-17 10:06+0200\n" "Last-Translator: Philippe Batailler <philippe.batailler@free.fr>\n" "Language-Team: French <debian-l10n-french@lists.debian.org>\n" @@ -57,7 +57,7 @@ msgstr "Les préférences ont été enregistrées." msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Erreur" @@ -138,7 +138,7 @@ msgstr "Création de la nouvelle page %s" msgid "deleting bucket.." msgstr "Suppression du compartiment S3 (« bucket »)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "Terminé" @@ -176,7 +176,7 @@ msgstr "Nom de la pièce jointe incorrect" msgid "attachment upload" msgstr "Envoi de la pièce jointe" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "Génération de l'index automatique" @@ -210,55 +210,55 @@ msgstr "Un commentaire doit avoir un contenu." msgid "Anonymous" msgstr "Anonyme" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "Nom de page incorrect" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "Faire un commentaire sur %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "La page '%s' n'existe pas, commentaire impossible." -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "Le commentaire pour la page '%s' est terminé." -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "Le commentaire a été enregistré, en attente de « modération »" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Votre commentaire sera publié après vérification par le modérateur" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Commentaire ajouté" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Commentaire ajouté : %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Vous n'êtes pas authentifié comme administrateur" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Modération du commentaire" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "modération du commentaire" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -268,7 +268,7 @@ msgstr[1] "Commentaires" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Commentaires" @@ -299,14 +299,14 @@ msgstr "Suppression de l'ancienne prévisualisation %s" msgid "%s is not an editable page" msgstr "%s n'est pas une page éditable" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "Création de %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "Édition de %s" @@ -324,9 +324,11 @@ msgstr "correspondance non indiquée" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s enregistré pour %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "Échec du traitement" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "Échec du traitement :" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -354,18 +356,18 @@ msgstr "Ce n'est pas une page." msgid "%s is an attachment, not a page." msgstr "%s est une pièce jointe, pas une page." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Vous n'êtes pas autorisé à modifier %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "Vous ne pouvez pas modifier un fichier dont le mode est %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "Vous n'êtes pas autorisé à modifier le mode des fichiers" @@ -452,12 +454,12 @@ msgstr "Les paramètres %s et %s ne peuvent être utilisés ensemble." msgid "Add a new post titled:" msgstr "Ajouter un nouvel article dont le titre est :" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "Le modèle de page %s n'existe pas" +msgid "template %s not found" +msgstr "Modèle de page %s introuvable" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client introuvable, pas de réponse au ping" @@ -486,18 +488,23 @@ msgstr "" "Échec du chargement du module Perl Markdown.pm (%s) ou de /usr/bin/markdown " "(%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "Feuille de style introuvable " -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "Page de redirection introuvable" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "Redirection cyclique non autorisée" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "les paramètres « from » et « to » sont nécessaires." + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Miroirs" @@ -515,10 +522,6 @@ msgstr "modération du commentaire" msgid "more" msgstr "lire la suite" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime n'est pas implémenté" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "S'identifier en tant que" @@ -535,43 +538,43 @@ msgstr "Toutes les pages sont liées à d'autres pages." msgid "bad or missing template" msgstr "Modèle de page incorrect ou manquant" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Le compte a été créé. Vous pouvez maintenant vous identifier." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Erreur lors de la création du compte." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Aucune adresse indiquée. Impossible d'envoyer les instructions pour " "réinitialiser le mot de passe." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Impossible d'envoyer un courriel" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Vous avez reçu un message contenant les instructions pour réinitialiser le " "mot de passe" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "Adresse pour la réinitialisation du mot de passe incorrecte" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "réinitialisation du mot de passe refusée" @@ -603,12 +606,12 @@ msgstr "" "Note : ancienne version de po4a détectée. Il est recommandé d'installer la " "version 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s n'est pas un code de langue valable" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -616,7 +619,7 @@ msgstr "" "%s n'est pas une valeur correcte pour po_link_to, retour à la valeur par " "défaut." -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -624,23 +627,23 @@ msgstr "" "po_link_to=negotiated nécessite que usedirs soit activé, retour à " "po_link_to=default." -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" "Reconstruction de toutes les pages pour corriger les titres (greffon " "« meta »)." -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "construction de %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "Fichiers PO mis à jour." -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -648,7 +651,7 @@ msgstr "" "Impossible de supprimer cette traduction. Si la page maître est supprimée, " "alors ses traductions seront supprimées." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -656,50 +659,50 @@ msgstr "" "Impossible de renommer cette traduction. Si la page maître est renommée, " "alors ses traductions pourront être renommées." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "Le fichier POT %s n'existe pas." -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "Impossible de copier le fichier PO underlay dans %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "Impossible de mettre à jour %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "Impossible de copier le fichier POT dans %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "Impossible de traduire %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "Fichiers PO obsolètes supprimés." -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "Impossible de modifier %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "Impossible de traduire" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "Données gettext incorrectes, retour à la page précédente pour la poursuite " @@ -844,44 +847,44 @@ msgstr "%s n'est pas dans srcdir. Impossible de le renommer" msgid "no change to the file name was specified" msgstr "Aucun changement dans le nom du fichier n'a été spécifié" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "Appellation interdite" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s existe déjà" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s existe déjà sur le disque" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "%s renommé" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "« SubPages » et attachements renommés." -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Modification de pièce jointe : une seule à la fois" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Veuillez sélectionner la pièce jointe à renommer" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "Renomme %s en %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "mise à jour, suite au changement de %s en %s" @@ -979,18 +982,19 @@ msgstr "Téléchargement direct des données" msgid "parse fail at line %d: %s" msgstr "Erreur d'analyse à la ligne %d : %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "Création de la nouvelle page %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "Paramètre d'identification manquant" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "Modèle de page %s introuvable" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "Échec du traitement :" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "Flux introuvable " #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1054,12 +1058,12 @@ msgstr "" msgid "bad file name %s" msgstr "Nom de fichier incorrect %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "Examen de %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1068,42 +1072,47 @@ msgstr "" "Lien symbolique trouvé dans l'adresse de srcdir (%s) -- pour l'autoriser, " "activez le paramètre « allow_symlinks_before_srcdir »." -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "Omission du fichier au nom incorrect %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s peut être associé à plusieurs pages source." -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "Suppression de l'ancienne page %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "Reconstruction de %s, qui est lié à %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "Suppression de %s, qui n'est plus rendu par %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "Reconstruction de %s, qui dépend de %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "Reconstruction de %s, afin de mettre à jour ses rétroliens" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki : impossible de reconstruire %s" @@ -1181,64 +1190,65 @@ msgstr "Syntaxe : ikiwiki [options] source destination" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup fichier de configuration" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "Syntaxe : -- set var=valeur" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "Syntaxe : -- set var=valeur" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "Création des fichiers CGI..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "Reconstruction du wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "Rafraîchissement du wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Discussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Vous devez indiquer l'URL du wiki par --url lors de l'utilisation de --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "Impossible d'utiliser plusieurs systèmes de contrôle des versions" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de prétraitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "oui" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "Type de tri %s inconnu" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "Type de tri %s inconnu" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "Impossible de trouver les pages %s" @@ -1263,6 +1273,18 @@ msgstr "Identifiant de l'administrateur (utilisateur du wiki ou openid) :" msgid "What is the domain name of the web server?" msgstr "Nom de domaine du serveur HTTP :" +#~ msgid "failed to process" +#~ msgstr "Échec du traitement" + +#~ msgid "nonexistant template %s" +#~ msgstr "Le modèle de page %s n'existe pas" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime n'est pas implémenté" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" + #~ msgid "failed to read %s" #~ msgstr "Impossible de lire %s" diff --git a/po/gu.po b/po/gu.po index d4bfd42c0..4f652358d 100644 --- a/po/gu.po +++ b/po/gu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-gu\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-11 16:05+0530\n" "Last-Translator: Kartik Mistry <kartik.mistry@gmail.com>\n" "Language-Team: Gujarati <team@utkarsh.org>\n" @@ -54,7 +54,7 @@ msgstr "પ્રાથમિકતાઓ સંગ્રહાઇ." msgid "You are banned." msgstr "તમારા પર પ્રતિબંધ છે." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "ક્ષતિ" @@ -135,7 +135,7 @@ msgstr "નવું પાનું %s બનાવે છે" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "સંપૂર્ણ" @@ -176,7 +176,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -208,55 +208,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "%s બનાવે છે" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -266,7 +266,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -296,14 +296,14 @@ msgstr "જુનાં પાનાં દૂર કરે છે %s" msgid "%s is not an editable page" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "%s બનાવે છે" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "%s સુધારે છે" @@ -323,9 +323,10 @@ msgstr "આવરણ ફાઇલનામ સ્પષ્ટ કરેલ ન msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "ક્રિયા કરવામાં નિષ્ફળ:" #: ../IkiWiki/Plugin/format.pm:30 @@ -356,18 +357,18 @@ msgstr "વાંચી શકાતી નથી %s: %s" msgid "%s is an attachment, not a page." msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -453,12 +454,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "આ શિર્ષકથી નવું પોસ્ટ ઉમેરો:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "અસ્તિત્વમાં ન હોય તેવું ટેમ્પલેટ %s" +msgid "template %s not found" +msgstr "ટેમ્પલેટ %s મળ્યું નહી" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવામાં આવતું નથી" @@ -485,20 +486,24 @@ msgstr "" msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "Markdown.pm પર્લ મોડ્યુલ (%s) અથવા /usr/bin/markdown (%s) લાવવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "સ્ટાઇલશીટ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "ફીડ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "ફીડ મળ્યું નહી" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "મિરરો" @@ -515,10 +520,6 @@ msgstr "" msgid "more" msgstr "વધુ" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime અમલમાં મૂકાયેલ નથી" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -536,39 +537,39 @@ msgstr "બધા પાનાંઓ બીજા પાનાંઓ વડે msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "ખાતું બનાવવાનું સફળ. તમે હવે લોગઇન કરી શકો છો." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "ખાતું બનાવવામાં ક્ષતિ." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "મેઇલ મોકલવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -599,94 +600,94 @@ msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવા msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "%s સુધારે છે" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "માપ બદલવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "%s લખવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "ડોટ ચલાવવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -831,44 +832,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "આવરણ ફાઇલનામ સ્પષ્ટ કરેલ નથી" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "રેન્ડર કરે છે %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "%s નો સુધારો %s નાં %s વડે" @@ -970,19 +971,20 @@ msgstr "સીધી માહિતી ડાઉનલોડ" msgid "parse fail at line %d: %s" msgstr "ઉકેલવાનું લીટી %d પર નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "નવું પાનું %s બનાવે છે" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "ખોવાયેલ આઇડી વિકલ્પ" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" +msgid "%s not found" msgstr "ટેમ્પલેટ %s મળ્યું નહી" -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "ક્રિયા કરવામાં નિષ્ફળ:" - #: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy msgid "missing tex code" @@ -1042,54 +1044,59 @@ msgstr "" msgid "bad file name %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "%s શોધે છે" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "જુનાં પાનાં દૂર કરે છે %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "રેન્ડર કરે છે %s, જે %s સાથે જોડાણ ધરાવે છે" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "દૂર કરે છે %s, હવે %s વડે રેન્ડર કરાતું નથી" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "રેન્ડર કરે છે %s, જે %s પર આધારિત છે" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "રેન્ડર કરે છે %s, તેનાં પાછળનાં જોડાણો સુધારવા માટે" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: %s રેન્ડર કરી શકાતું નથી" @@ -1162,62 +1169,63 @@ msgstr "ઉપયોગ: ikiwiki [વિકલ્પો] source dest" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "આવરણ બનાવે છે.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "વીકી ફરીથી બનાવે છે.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "વીકીને તાજી કરે છે.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "ચર્ચા" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "જ્યારે --cgi ઉપયોગ કરતાં હોય ત્યારે વીકીનું યુઆરએલ સ્પષ્ટ કરવું જ પડશે" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "વાંચી શકાતી નથી %s: %s" @@ -1242,6 +1250,16 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "ક્રિયા કરવામાં નિષ્ફળ:" + +#~ msgid "nonexistant template %s" +#~ msgstr "અસ્તિત્વમાં ન હોય તેવું ટેમ્પલેટ %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime અમલમાં મૂકાયેલ નથી" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "%s વાંચવામાં નિષ્ફળ: %s" @@ -1295,9 +1313,6 @@ msgstr "" #~ msgstr "" #~ "REV ગોઠવેલ નથી, svn post-commit hook માંથી ચાલતું નથી, નોંધ મોકલી શકાશે નહી" -#~ msgid "%s not found" -#~ msgstr "ટેમ્પલેટ %s મળ્યું નહી" - #~ msgid "What's this?" #~ msgstr "આ શું છે?" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index c2f4e24a9..638e724d5 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -55,7 +55,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "" @@ -136,7 +136,7 @@ msgstr "" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "" @@ -174,7 +174,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -206,55 +206,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -264,7 +264,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -294,14 +294,14 @@ msgstr "" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "" @@ -319,8 +319,9 @@ msgstr "" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +msgid "failed to process template:" msgstr "" #: ../IkiWiki/Plugin/format.pm:30 @@ -349,18 +350,18 @@ msgstr "" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -442,12 +443,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" +msgid "template %s not found" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "" @@ -474,18 +475,22 @@ msgstr "" msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "" @@ -502,10 +507,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -522,39 +523,39 @@ msgstr "" msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -584,93 +585,93 @@ msgstr "" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -812,44 +813,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "" @@ -947,17 +948,18 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, perl-format +msgid "creating tag page %s" +msgstr "" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" -msgstr "" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" +msgid "%s not found" msgstr "" #: ../IkiWiki/Plugin/teximg.pm:72 @@ -1017,54 +1019,59 @@ msgstr "" msgid "bad file name %s" msgstr "" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." msgstr "" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:434 +#, perl-format +msgid "removing obsolete %s" +msgstr "" + +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "" @@ -1137,62 +1144,63 @@ msgstr "" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "" -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "" -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "" -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" +#: ../IkiWiki.pm:2009 +#, perl-format +msgid "invalid sort type %s" msgstr "" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "" diff --git a/po/it.po b/po/it.po index b1b3dbd55..45efc2d3f 100644 --- a/po/it.po +++ b/po/it.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-08-16 11:01+0100\n" "Last-Translator: Luca Bruno <lucab@debian.org>\n" "Language-Team: Italian TP <tp@lists.linux.it>\n" @@ -53,7 +53,7 @@ msgstr "Preferenze salvate." msgid "You are banned." msgstr "Avete ricevuto un ban." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Errore" @@ -135,7 +135,7 @@ msgstr "creazione nuova pagina %s" msgid "deleting bucket.." msgstr "eliminazione contenitore..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "fatto" @@ -173,7 +173,7 @@ msgstr "nome file dell'allegato non valido" msgid "attachment upload" msgstr "carica allegato" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "generazione automatica dell'indice" @@ -207,55 +207,55 @@ msgstr "i commenti devono avere un contenuto" msgid "Anonymous" msgstr "Anonimo" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "nome pagina non valido" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "commento su %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "la pagina «%s» non esiste, impossibile commentarla" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "i commenti per la pagina «%s» sono chiusi" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "commento trattenuto per moderazione" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Il commento sarà pubblicato dopo la verifica del moderatore" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Aggiunto commento" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Aggiunto commento: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "non siete autenticati come amministratore" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Moderazione commenti" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "moderazione commento" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -265,7 +265,7 @@ msgstr[1] "Commenti" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Commenti" @@ -296,14 +296,14 @@ msgstr "rimozione vecchia anteprima %s" msgid "%s is not an editable page" msgstr "%s non è una pagina modificabile" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "creazione %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "modifica %s" @@ -321,9 +321,11 @@ msgstr "corrispondenza non specificata" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s registrato per %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "errore nell'elaborazione" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "errore nell'elaborazione:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -351,18 +353,18 @@ msgstr "non è una pagina" msgid "%s is an attachment, not a page." msgstr "%s è un allegato, non una pagina." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "non è permesso modificare %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "non è permesso lavorare su un file in modalità %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "non è permesso cambiare la modalità del file" @@ -447,12 +449,12 @@ msgstr "i parametri %s e %s non possono essere usati insieme" msgid "Add a new post titled:" msgstr "Aggiungere un nuovo articolo dal titolo:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "modello %s non esistente" +msgid "template %s not found" +msgstr "modello %s non trovato" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client non trovato, impossibile inviare ping" @@ -481,18 +483,23 @@ msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" "impossibile caricare il modulo perl Markdown.pm (%s) o /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "foglio di stile non trovato" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "pagina di reindirizzamento non trovata" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ciclo di reindirizzamento non ammesso" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "sono richiesti i parametri \"to\" e \"from\"" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Mirror" @@ -510,10 +517,6 @@ msgstr "moderazione commento" msgid "more" msgstr "altro" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime non implementata" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Accedi tramite" @@ -530,42 +533,42 @@ msgstr "Tutte le pagine hanno collegamenti in entrata da altre pagine." msgid "bad or missing template" msgstr "modello errato o mancante" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Account creato con successo. È ora possibile effettuare l'accesso." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Errore nella creazione dell'account." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Nessun indirizzo email, impossibile inviare per email le istruzioni per " "reimpostare la password." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Impossibile spedire il messaggio" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Il messaggio con le istruzioni per reimpostare la password è stato inviato." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "url per il reset della password non corretto" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "reset della password non permesso" @@ -597,19 +600,19 @@ msgstr "" "attenzione: è presente un vecchio po4a. Si raccomanda di aggiornare almeno " "alla versione 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s non è una codifica di lingua valida" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" "%s non è un valore per po_link_to valido, verrà utilizzato po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -617,21 +620,21 @@ msgstr "" "po_link_to=negotiated richiede che venga abilitato usedirs, verrà utilizzato " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "rigenerazione di tutte le pagine per sistemare i meta-titoli" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "compilazione di %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "file PO aggiornati" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -639,7 +642,7 @@ msgstr "" "Impossibile eliminare una traduzione. Tuttavia, se la pagina principale è " "stata eliminata anche le traduzioni lo saranno." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -647,50 +650,50 @@ msgstr "" "Impossibile rinominare una traduzione. Tuttavia, se la pagina principale è " "stata rinominata anche le traduzioni lo saranno." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "Il file POT (%s) non esiste" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "impossibile copiare il file PO di underlay in %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "impossibile aggiornare %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "impossibile copiare il file POT in %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/D" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "impossibile tradurre %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "file PO obsoleti rimossi" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "impossibile scrivere %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "impossibile tradurre" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "dati gettext non validi, tornare alle pagina precedente per continuare le " @@ -836,44 +839,44 @@ msgstr "%s non è in src, quindi non può essere rinominato" msgid "no change to the file name was specified" msgstr "non è stata specificata nessuna modifica al nome del file" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "nome non valido" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s esiste già" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s già presente su disco" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "rinomina di %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Rinomina anche SottoPagine e allegati" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Si può rinominare un solo allegato alla volta." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Selezionare l'allegato da rinominare." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "rinomina %s in %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aggiornamento per rinomina di %s in %s" @@ -971,18 +974,19 @@ msgstr "Scaricamento diretto dei dati" msgid "parse fail at line %d: %s" msgstr "errore di interpretazione alla riga %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "creazione nuova pagina %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "parametro id mancante" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "modello %s non trovato" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "errore nell'elaborazione:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "notiziario non trovato" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1045,12 +1049,12 @@ msgstr "impossibile determinare l'id del committer non fidato %s" msgid "bad file name %s" msgstr "nome file %s scorretto" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "scansione %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1059,42 +1063,47 @@ msgstr "" "collegamento simbolico trovato nel percorso srcdir (%s) -- impostare " "allow_symlinks_before_srcdir per abilitare questa configurazione" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ignorato il file dal nome scorretto %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s ha diverse pagine sorgenti possibili" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "rimozione della vecchia pagina %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "compilazione di %s, che è collegato a %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "rimozione di %s, non più richiesto da %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "compilazione di %s, che dipende da %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "compilazione di %s, per aggiornare i collegamenti ai precedenti" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: impossibile compilare %s" @@ -1168,63 +1177,64 @@ msgstr "utilizzo: ikiwiki [opzioni] sorgente destinazione" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup configfile" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "utilizzo: --set var=valore" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "utilizzo: --set var=valore" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generazione contenitori..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "ricostruzione wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "aggiornamento wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Discussione" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Occorre specificare l'url del wiki tramite --url quando si usa --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "impossibile usare più plugin rcs" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "impossibile caricare il plugin esterno per il plugin %s: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "ciclo del preprocessore individuato su %s alla profondità %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "sì" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "impossibile trovare pagine corrispondenti: %s" @@ -1249,6 +1259,18 @@ msgstr "Quale utente (openid o del wiki) sarà l'amministratore?" msgid "What is the domain name of the web server?" msgstr "Qual è il nome del dominio del server web?" +#~ msgid "failed to process" +#~ msgstr "errore nell'elaborazione" + +#~ msgid "nonexistant template %s" +#~ msgstr "modello %s non esistente" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime non implementata" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" + #~ msgid "failed to read %s" #~ msgstr "impossibile leggere %s" diff --git a/po/pl.po b/po/pl.po index 9fb3cacc0..837c5acd2 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 1.51\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-04-27 22:05+0200\n" "Last-Translator: Pawel Tecza <ptecza@net.icm.edu.pl>\n" "Language-Team: Debian L10n Polish <debian-l10n-polish@lists.debian.org>\n" @@ -57,7 +57,7 @@ msgstr "Preferencje zapisane." msgid "You are banned." msgstr "Twój dostęp został zabroniony przez administratora." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Błąd" @@ -139,7 +139,7 @@ msgstr "tworzenie nowej strony %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "gotowe" @@ -180,7 +180,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -212,55 +212,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "tworzenie %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -270,7 +270,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -300,14 +300,14 @@ msgstr "usuwanie starej strony %s" msgid "%s is not an editable page" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "tworzenie %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "edycja %s" @@ -327,9 +327,10 @@ msgstr "nieokreślona nazwa pliku osłony" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "awaria w trakcie przetwarzania:" #: ../IkiWiki/Plugin/format.pm:30 @@ -360,18 +361,18 @@ msgstr "awaria w trakcie odczytu %s: %s" msgid "%s is an attachment, not a page." msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -460,12 +461,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Tytuł nowego wpisu" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "brakujący szablon %s" +msgid "template %s not found" +msgstr "nieznaleziony szablon %s" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" @@ -497,21 +498,25 @@ msgstr "" "Awaria w trakcie ładowania perlowego modułu Markdown.pm (%s) lub " "uruchamiania programu /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "nieznaleziony szablon ze stylami CSS" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "nieznaleziony kanał RSS" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "nieznaleziony kanał RSS" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Kopie lustrzane" @@ -528,10 +533,6 @@ msgstr "" msgid "more" msgstr "więcej" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "niedostępna funkcja getctime" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -549,39 +550,39 @@ msgstr "Dla każdej strony istnieje odnośnik z innej strony" msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Konto założone pomyślnie. Teraz można zalogować się." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Błąd w trakcie zakładania konta." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Awaria w trakcie wysyłania wiadomości" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -612,94 +613,94 @@ msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "edycja %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "awaria w trakcie zmiany rozmiaru: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "awaria w trakcie zapisu %s: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "awaria w trakcie uruchamiania dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -846,44 +847,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "nieokreślona nazwa pliku osłony" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "renderowanie %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "aktualizacja stron wiki %s: %s przez użytkownika %s" @@ -990,20 +991,20 @@ msgstr "Bezpośrednie pobieranie danych" msgid "parse fail at line %d: %s" msgstr "awaria w trakcie przetwarzania linii %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "tworzenie nowej strony %s" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "brakujący parametr id" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "nieznaleziony szablon %s" - -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "awaria w trakcie przetwarzania:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "nie znaleziono %s" #: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy @@ -1064,54 +1065,59 @@ msgstr "" msgid "bad file name %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "skanowanie %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "usuwanie starej strony %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "renderowanie %s z odnośnikiem do %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "usuwanie %s nie tworzonego już przez %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "renderowanie %s zależącego od %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "renderowanie %s w celu aktualizacji powrotnych odnośników" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: awaria w trakcie tworzenia %s" @@ -1184,64 +1190,65 @@ msgstr "użycie: ikiwiki [parametry] źródło cel" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "tworzenie osłon..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "przebudowywanie wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "odświeżanie wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Dyskusja" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Użycie parametru --cgi wymaga podania adresu URL do wiki za pomocą parametru " "--url" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "awaria w trakcie odczytu %s: %s" @@ -1266,6 +1273,16 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "awaria w trakcie przetwarzania:" + +#~ msgid "nonexistant template %s" +#~ msgstr "brakujący szablon %s" + +#~ msgid "getctime not implemented" +#~ msgstr "niedostępna funkcja getctime" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "awaria w trakcie odczytu %s: %s" @@ -1323,10 +1340,6 @@ msgstr "" #~ "Brak możliwości wysłania powiadomień od Subversion przez \"haczyk\" post-" #~ "commit z powodu nieustawionego parametru REV" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "nie znaleziono %s" - #~ msgid "What's this?" #~ msgstr "Więcej o OpenID" diff --git a/po/sv.po b/po/sv.po index 0d4c6202e..2cba1cc2e 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-10 23:47+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -54,7 +54,7 @@ msgstr "Inställningar sparades." msgid "You are banned." msgstr "Du är bannlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fel" @@ -136,7 +136,7 @@ msgstr "skapar nya sidan %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "klar" @@ -177,7 +177,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -209,55 +209,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "skapar %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -267,7 +267,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -297,14 +297,14 @@ msgstr "tar bort gammal sida %s" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "skapar %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "redigerar %s" @@ -324,9 +324,10 @@ msgstr "filnamn för wrapper har inte angivits" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "misslyckades med att behandla mall:" #: ../IkiWiki/Plugin/format.pm:30 @@ -357,18 +358,18 @@ msgstr "kan inte läsa %s: %s" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -455,12 +456,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "" +msgid "template %s not found" +msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client hittades inte, pingar inte" @@ -490,21 +491,25 @@ msgstr "" "misslyckades med att läsa in Perl-modulen Markdown.pm (%s) eller /usr/bin/" "markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "mallen %s hittades inte" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Speglar" @@ -521,10 +526,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime inte implementerad" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -542,39 +543,39 @@ msgstr "Alla sidor länkas till av andra sidor." msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Kontot har skapats. Du kan nu logga in." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Fel vid skapandet av konto." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Misslyckades med att skicka e-post" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -605,94 +606,94 @@ msgstr "RPC::XML::Client hittades inte, pingar inte" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "redigerar %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "linkmap misslyckades att köra dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -836,44 +837,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "filnamn för wrapper har inte angivits" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "ritar upp %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "uppdatering av %s, %s av %s" @@ -978,21 +979,21 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "skapar nya sidan %s" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "mall saknar id-parameter" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" +#, fuzzy, perl-format +msgid "%s not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "misslyckades med att behandla mall:" - #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" @@ -1051,54 +1052,59 @@ msgstr "" msgid "bad file name %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "söker av %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "tar bort gammal sida %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "ritar upp %s, vilken länkar till %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "tar bort %s, som inte längre ritas upp av %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "ritar upp %s, vilken är beroende av %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "ritar upp %s, för att uppdatera dess bakåtlänkar" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan inte rita upp %s" @@ -1171,62 +1177,63 @@ msgstr "användning: ikiwiki [flaggor] källa mål" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "genererar wrappers.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "bygger om wiki.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "uppdaterar wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Måste ange url till wiki med --url när --cgi används" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s förbehandlingsslinga detekterades på %s, djup %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "okänd sorteringstyp %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "okänd sorteringstyp %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "kan inte läsa %s: %s" @@ -1251,6 +1258,13 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "misslyckades med att behandla mall:" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime inte implementerad" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "misslyckades med att skriva %s: %s" @@ -1305,10 +1319,6 @@ msgstr "" #~ "REV är inte inställt, kör inte från svn post-commit-hook, kan inte skicka " #~ "notifieringar" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "mallen %s hittades inte" - #~ msgid "What's this?" #~ msgstr "Vad är det här?" -- cgit v1.2.3 From c6a473b8eea0ea015c44c3cd7a267f6325febac5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 20:30:05 -0400 Subject: update --- doc/templates.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 67e5517e4..892e36cd2 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -23,8 +23,8 @@ The template directive allows wiki pages to be used as templates, filled out and inserted into other pages in the wiki. """]] [[!if test="enabled(template) and enabled(inline)" then=""" -[[!inline pages="templates/* and !*/discussion" feeds=no archive=yes -sort=title template=titlepage +[[!inline pages="templates/* and !*.tmpl and !*/discussion" +feeds=no archive=yes sort=title template=titlepage rootpage=templates postformtext="Add a new template named:"]] """]] -- cgit v1.2.3 From 5afda336720dc83e0fd4c6e2f311ff6664c68211 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 24 Apr 2010 21:39:03 -0400 Subject: wording --- doc/templates.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 892e36cd2..9208db0eb 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -8,7 +8,7 @@ searched first. Customized templates can also be placed inside the Ikiwiki uses the HTML::Template module as its template engine. This supports things like conditionals and loops in templates and is pretty -easy to learn. All you really need to know are a few things: +easy to learn. All you really need to know to modify templates is this: * To insert the value of a template variable, use `<TMPL_VAR variable>`. * To make a block of text conditional on a variable being set use -- cgit v1.2.3 From f49b9e7411bf9748dc81389e14d70cafaa6ded02 Mon Sep 17 00:00:00 2001 From: "http://id.ertugkaramatli.com/" <http://id.ertugkaramatli.com/@web> Date: Sun, 25 Apr 2010 13:25:59 +0000 Subject: added my personal site --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index cb4213405..edf36b5c6 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -143,6 +143,7 @@ Personal sites and blogs * [Chris Dombroski's boring bliki](https://www.icanttype.org/) * [Josh Triplett's homepage](http://joshtriplett.org/) - Git backend with the CGI disabled, to publish a static site with the convenience of ikiwiki. * [Gustaf Thorslund's blog](http://blog.thorslund.org) +* [Ertug Karamatli](http://pages.karamatli.com) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 506075695f32a63bfc8b57cef1a601bd937b7a72 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sun, 25 Apr 2010 14:16:53 -0400 Subject: typo --- doc/usage.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 9cf61cc6c..2f87d60d5 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -330,7 +330,7 @@ also be configured using a setup file. * --set var=value This allows setting an arbitrary configuration variable, the same as if it - were set via a setup file. Since most options commonly used options can be + were set via a setup file. Since most commonly used options can be configured using command-line switches, you will rarely need to use this. * --set-yaml var=value -- cgit v1.2.3 From 86484c109d30c0062c5a5056f4adf41c0581b5e9 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 26 Apr 2010 15:14:08 +0000 Subject: table name for querying the mediawiki mysql db --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 9719d9a7e..db1a1745c 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -59,7 +59,13 @@ specific prefix: e.g. `Category:` will be stripped off. ### Querying the database If you have access to the relational database in which your mediawiki data is -stored, it is possible to derive a list of page names from this. +stored, it is possible to derive a list of page names from this. With mediawiki's +MySQL backend, the page table is, appropriately enough, called `table`: + + SELECT page_namespace, page_title FROM page; + +As with the previous method, you will need to do some filtering based on the +namespace. ## Step 2: fetching the page data -- cgit v1.2.3 From 60481cad90d61a4d1abe2dc5e69eee69ce938992 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 26 Apr 2010 15:19:04 +0000 Subject: move list of namespaces to its own section --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index db1a1745c..fe0fd46b0 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -48,10 +48,7 @@ in HTML, you may need to add further processing to the last line. Note that by default, `Special:Allpages` will only list pages in the main namespace. You need to add a `&namespace=XX` argument to get pages in a -different namespace. The following numbers correspond to common namespaces: - - * 10 - templates (`Template:foo`) - * 14 - categories (`Category:bar`) +different namespace. (See below for the default list of namespaces) Note that the page names obtained this way will not include any namespace specific prefix: e.g. `Category:` will be stripped off. @@ -67,6 +64,12 @@ MySQL backend, the page table is, appropriately enough, called `table`: As with the previous method, you will need to do some filtering based on the namespace. +### namespaces + +The list of default namespaces in mediawiki is available from <http://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces>, reproduced here for convenience: + +[[mediawiki_namespaces]] + ## Step 2: fetching the page data Once you have a list of page names, you can fetch the data for each page. -- cgit v1.2.3 From 76e8e4ea838516ebdb8e981fff47efa6af836079 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 26 Apr 2010 15:24:50 +0000 Subject: insert table of common namespaces --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index fe0fd46b0..3a266bc8b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -66,9 +66,18 @@ namespace. ### namespaces -The list of default namespaces in mediawiki is available from <http://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces>, reproduced here for convenience: - -[[mediawiki_namespaces]] +The list of default namespaces in mediawiki is available from <http://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces>. Here are reproduced the ones you are most likely to encounter if you are running a small mediawiki install for your own purposes: + +[[!table data=""" +Index | Name | Example +0 | Main | Foo +1 | Talk | Talk:Foo +2 | User | User:Jon +3 | User talk | User_talk:Jon +6 | File | File:Barack_Obama_signature.svg +10 | Template | Template:Prettytable +14 | Category | Category:Pages_needing_review +"""]] ## Step 2: fetching the page data -- cgit v1.2.3 From d3c994d980c2f52102c78c0157ce06140c639bc6 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Mon, 26 Apr 2010 15:29:04 +0000 Subject: fix indent --- doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn index 3a266bc8b..38de01109 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -59,7 +59,7 @@ If you have access to the relational database in which your mediawiki data is stored, it is possible to derive a list of page names from this. With mediawiki's MySQL backend, the page table is, appropriately enough, called `table`: - SELECT page_namespace, page_title FROM page; + SELECT page_namespace, page_title FROM page; As with the previous method, you will need to do some filtering based on the namespace. -- cgit v1.2.3 From 0689f2dbc5d4f80cd13f51055b24ff0506f638fb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Mon, 26 Apr 2010 13:43:24 -0400 Subject: add blipvert --- doc/git.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/git.mdwn b/doc/git.mdwn index a5fd742ca..a0b9c950f 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -63,6 +63,7 @@ think about merging them. This is recommended. :-) * [[GustafThorslund]] `http://gustaf.thorslund.org/src/ikiwiki.git` * [[peteg]] `git://git.hcoop.net/git/peteg/ikiwiki.git` * [[privat]] `git://github.com/privat/ikiwiki.git` +* [[blipvert]] `git://github.com/blipvert/ikiwiki.git` ## branches -- cgit v1.2.3 From 06d5a19370e07d39e3dcbd975fe479388104b0a5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Mon, 26 Apr 2010 13:47:40 -0400 Subject: document match_guid --- doc/ikiwiki/pagespec.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 5c191f23f..7810e790b 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -40,8 +40,8 @@ Some more elaborate limits can be added to what matches using these functions: * "`internal(glob)`" - like `glob()`, but matches even internal-use pages that globs do not usually match. * "`title(glob)`", "`author(glob)`", "`authorurl(glob)`", - "`license(glob)`", "`copyright(glob)`" - match pages that have the given - metadata, matching the specified glob. + "`license(glob)`", "`copyright(glob)`", "`guid(glob)`" + - match pages that have the given metadata, matching the specified glob. * "`user(username)`" - tests whether a modification is being made by a user with the specified username. If openid is enabled, an openid can also be put here. Glob patterns can be used in the username. For example, -- cgit v1.2.3 From a6bd053638c67e5410c4a0a3742ba3825320b344 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Mon, 26 Apr 2010 16:31:00 -0400 Subject: remove manual file remove instructions Since that was written, ikiwiki got fixed to track old rendered files across --rebuild and remove them. --- doc/tips/switching_to_usedirs.mdwn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/tips/switching_to_usedirs.mdwn b/doc/tips/switching_to_usedirs.mdwn index 183ce00ac..92871439f 100644 --- a/doc/tips/switching_to_usedirs.mdwn +++ b/doc/tips/switching_to_usedirs.mdwn @@ -8,9 +8,7 @@ to usedirs, or edit your setup file and turn usedirs back off. or manually. * Since usedirs is enabled, ikiwiki will have created a bunch of new html files. Where before ikiwiki generated a `dest/foo.html`, now it will - generate `dest/foo/index.html`. But, the old html files will still be - present too. Remove them: - find dest -name \*.html -not -name index.html -exec rm {} \; + generate `dest/foo/index.html`. The old html files will be removed. * If you have a blog that is aggregated on a Planet or similar, all the items in the RSS or atom feed will seem like new posts, since their URLs have changed. See [[howto_avoid_flooding_aggregators]] for a workaround. -- cgit v1.2.3 From 3ac2ae1f14952bd92038183d92b1eb618c9d0f55 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Mon, 26 Apr 2010 18:47:17 -0400 Subject: Add page() PageSpec, which is like glob() but matches only pages, not other files. --- IkiWiki.pm | 10 +++++++++- debian/changelog | 2 ++ doc/ikiwiki/pagespec.mdwn | 11 ++++++----- t/pagespec_match.t | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 944001d9b..623396c9c 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2299,7 +2299,11 @@ sub match_glob ($$;@) { my $regexp=IkiWiki::glob2re($glob); if ($page=~/^$regexp$/i) { - if (! IkiWiki::isinternal($page) || $params{internal}) { + if ($params{onlypage} && + ! defined IkiWiki::pagetype($IkiWiki::pagesources{$page})) { + return IkiWiki::FailReason->new("$page is not a page"); + } + elsif (! IkiWiki::isinternal($page) || $params{internal}) { return IkiWiki::SuccessReason->new("$glob matches $page"); } else { @@ -2315,6 +2319,10 @@ sub match_internal ($$;@) { return match_glob($_[0], $_[1], @_, internal => 1) } +sub match_page ($$;@) { + return match_glob($_[0], $_[1], @_, onlypage => 1) +} + sub match_link ($$;@) { my $page=shift; my $link=lc(shift); diff --git a/debian/changelog b/debian/changelog index 1229b1198..610d0c9cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -75,6 +75,8 @@ ikiwiki (3.20100424) UNRELEASED; urgency=low the top of the web root. This is another things that requires a wiki rebuild on upgrade to this version. * Fix removal of rendered files in rebuild mode. + * Add page() PageSpec, which is like glob() but matches only pages, + not other files. -- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 7810e790b..1c99aefac 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -24,19 +24,20 @@ match all pages except for Discussion pages and the SandBox: Some more elaborate limits can be added to what matches using these functions: +* "`glob(someglob)`" - matches pages and other files that match the given glob. + Just writing the glob by itself is actually a shorthand for this function. +* "`page(glob)`" - like `glob()`, but only matches pages, not other files * "`link(page)`" - matches only pages that link to a given page (or glob) * "`tagged(tag)`" - matches pages that are tagged or link to the given tag (or tags matched by a glob) * "`backlink(page)`" - matches only pages that a given page links to -* "`creation_month(month)`" - matches only pages created on the given month +* "`creation_month(month)`" - matches only files created on the given month * "`creation_day(mday)`" - or day of the month * "`creation_year(year)`" - or year -* "`created_after(page)`" - matches only pages created after the given page +* "`created_after(page)`" - matches only files created after the given page was created -* "`created_before(page)`" - matches only pages created before the given page +* "`created_before(page)`" - matches only files created before the given page was created -* "`glob(someglob)`" - matches pages that match the given glob. Just writing - the glob by itself is actually a shorthand for this function. * "`internal(glob)`" - like `glob()`, but matches even internal-use pages that globs do not usually match. * "`title(glob)`", "`author(glob)`", "`authorurl(glob)`", diff --git a/t/pagespec_match.t b/t/pagespec_match.t index ade9bca5a..97bcc969c 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 75; +use Test::More tests => 85; BEGIN { use_ok("IkiWiki"); } @@ -66,7 +66,21 @@ $links{"ook"}=[qw{/blog/tags/foo}]; foreach my $p (keys %links) { $pagesources{$p}="$p.mdwn"; } +$pagesources{"foo.png"}="foo.png"; +$pagesources{"foo"}="foo.mdwn"; +$IkiWiki::hooks{htmlize}{mdwn}={}; +ok(pagespec_match("foo", "foo"), "simple"); +ok(! pagespec_match("foo", "bar"), "simple fail"); +ok(pagespec_match("foo", "foo"), "simple glob"); +ok(pagespec_match("foo", "f*"), "simple glob fail"); +ok(pagespec_match("foo", "page(foo)"), "page()"); +print pagespec_match("foo", "page(foo)")."\n"; +ok(! pagespec_match("foo", "page(bar)"), "page() fail"); +ok(! pagespec_match("foo.png", "page(foo.png)"), "page() fails on non-page"); +ok(! pagespec_match("foo.png", "page(foo*)"), "page() fails on non-page glob"); +ok(pagespec_match("foo", "page(foo)"), "page() glob"); +ok(pagespec_match("foo", "page(f*)"), "page() glob fail"); ok(pagespec_match("foo", "link(bar)"), "link"); ok(pagespec_match("foo", "link(ba?)"), "glob link"); ok(! pagespec_match("foo", "link(quux)"), "failed link"); -- cgit v1.2.3 From 47dfa3b8b97c97532f4e49f9883b6a59a9036b40 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Tue, 27 Apr 2010 00:00:46 -0400 Subject: add news item for ikiwiki 3.20100427 --- doc/news/version_3.20100122.mdwn | 15 ------ doc/news/version_3.20100427.mdwn | 111 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 15 deletions(-) delete mode 100644 doc/news/version_3.20100122.mdwn create mode 100644 doc/news/version_3.20100427.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20100122.mdwn b/doc/news/version_3.20100122.mdwn deleted file mode 100644 index 11051fad8..000000000 --- a/doc/news/version_3.20100122.mdwn +++ /dev/null @@ -1,15 +0,0 @@ -ikiwiki 3.20100122 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * inline: Avoid showing edit links if page editing is disabled. - (Sjoerd) - * signinedit: Auto-disable the plugin when all authentication methods - are disabled. - * comments: Fix permalinks for comments using new conflict-free filenames. - * img: Support alignment of images with captions. (Giuseppe Bilotta) - * websetup: Fix utf-8 problems. - * websetup: Fix bug in array change detection. - * linkmap: Simplify and improve browser compatibility by using an img, - not object tag. - * git: The new git-notes feature in git 1.6.6 changes git log output - in a way that broke ikiwiki's parser if notes are added to commits. - * po: Avoid crash when a page is empty."""]] \ No newline at end of file diff --git a/doc/news/version_3.20100427.mdwn b/doc/news/version_3.20100427.mdwn new file mode 100644 index 000000000..5fe732f87 --- /dev/null +++ b/doc/news/version_3.20100427.mdwn @@ -0,0 +1,111 @@ +News for ikiwiki 3.20100427: + + This version of ikiwiki has a lot of changes that you need to know about. + Now you can include customised versions of templates in the source + of your wiki. (For example, templates/page.tmpl.) When these templates + are changed, ikiwiki will automatically rebuild pages that use them. + Allowing untrusted users to upload attachments with the ".tmpl" + extension is not recommended, as that allows anyone to change + a wiki's templates. + The --getctime switch is renamed to --gettimes, and it also gets the + file modification time. And it's a lot faster (when using git). But + the really important change is, you don't have to remember to use this + switch. Now ikiwiki will do it when it needs to. + At last, the "tagged()" pagespec only matches tags, not regular wikilinks. + If your wiki accidentially relied on the old, buggy behavior, you might + need to change its pagespecs to use "link()". + Many of your wishes have been answered: Now tag pages can automatically be + created when new tags are used. This feature is enabled by default if you + have configured a tagbase. It can be turned on or off using the + tag\_autocreate setting. + These changes may also affect some users: + * The title\_natural sort method (as used by the inline directive, etc) + has been moved to the new sortnaturally plugin, which is not enabled + by default since it requires the Sort::Naturally perl module. + * TMPL\_INCLUDE is no longer supported in any template used by ikiwiki. + It used to be allowed in certian templates, but not in others. + * The add\_templates option has been removed from the underlay plugin. + If you used this option, you can instead use templates/ subdirectories + inside underlay directories added by the add\_underlays option. + Due to the above and other changes, all wikis need to be rebuilt on + upgrade to this version. If you listed your wiki in /etc/ikiwiki/wikilist + this will be done automatically when the Debian package is upgraded. Or + use ikiwiki-mass-rebuild to force a rebuild. + +ikiwiki 3.20100427 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * [ Joey Hess ] + * tag: Automatic creation of tag pages can now be enabled using + the tag\_autocreate setting. (David Riebenbauer) + * Customised templates can now be included in the source of wikis + (and also in underlays), and dependencies on them are tracked. + * TMPL\_INCLUDE is no longer supported in any template. + * underlay: Removed the add\_templates option. + * Add template\_depends function to plugin API. + * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) + * comments: Fix missing entity encoding in title. + * txt: Add a special case for robots.txt. + * [ Simon McVittie ] + * Add support for link types, and make the the tagged() pagespec only + match tags, not regular links (a bugfix). + * Rebuild wikis on upgrade to this version to get tag link types recorded + correctly. + * Revamp sorting system; allow new sort methods to be added by plugins, + and add a "sortspec" syntax that can combine, reverse, etc sort methods. + * meta: Add `meta(author)`, `meta(title)` etc sortspecs to allow sorting + by metadata. + * meta: Add optional sortas parameter to author and title meta directives. + This can be used to get names sorted by last name without displaying + them last name first. + * sortnaturally: New plugin; the title\_natural sort method has moved here. + * meta: store fields consistently unescaped, and escape on use. + (A wiki rebuild is also needed due to this change.) + * [ Joey Hess ] + * Update dependency for git-core to git transition. + * po: Check that translated underlay directories exist before using them + for master language. + * po: Configuring the same language as master and slave confuses processing; + so filter out such a misconfiguration. + * calendar: Add archive\_pagespec, which is used by ikiwiki-calendar to + specify which pages to include on the calendar archive pages. + (The pagespec can still also be specified on the ikiwiki-calendar command + line.) + * pagestats: Class parameter can be used to override default class for + custom styling. + * pagestats: Use style=list to get a list of tags, scaled by use like + in a tag cloud. This is useful to put in a sidebar. + * Rework example blog front page. + * CSS and templates for sidebar changed to use a class, not an id. + * sidebar: Now a sidebar directive can be used to override the sidebar + shown on a page. + * Enable calendar and sidebar in auto-blog.setup. + * sidebar: Add global\_sidebars setting. + * conditional: Fix bug that forced "all" mode off by default. + * calendarmonth.tmpl: The month calendar is now put in a sidebar. + * calendar: Improved display of arrows. + * Rename --getctime to --gettime. (The old name still works for + backwards compatibility.) + * --gettime now also looks up last modification time. + * Automatically run --gettime the first time ikiwiki is run on + a given srcdir. (Use --no-gettime to disable.) + * Add rcs\_getmtime to plugin API; currently only implemented + for git and svn. + * Optimise --gettime for git, so it's appropriately screamingly + fast. (This could be done for most other backends too.) + * However, --gettime for git no longer follows renames. That would + be slow, and whether a renamed wiki page is the same page is really + an iffy thing. + * Use above to fix up timestamps on docwiki, as well as ensure that + timestamps on basewiki files shipped in the deb are sane. + * autoindex: Switch to using %wikistate instead of abusing + $pagestate{index}. + * bzr: Support rcs\_getmtime, and fix rcs\_getctime implementation + (Jelmer Vernooij) + * Quite a lot of new optimisations, and one major fix to a recent + performance regression. + * Moved javascript files under the ikiwiki/ directory, to avoid cluttering + the top of the web root. This is another things that requires a wiki + rebuild on upgrade to this version. + * Fix removal of rendered files in rebuild mode. + * Add page() PageSpec, which is like glob() but matches only pages, + not other files."""]] \ No newline at end of file -- cgit v1.2.3 From 9daf3db277c31d3ce434253af2dfb7e0e436b5f9 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Tue, 27 Apr 2010 00:02:49 -0400 Subject: format --- doc/news/version_3.20100427.mdwn | 74 ++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 33 deletions(-) (limited to 'doc') diff --git a/doc/news/version_3.20100427.mdwn b/doc/news/version_3.20100427.mdwn index 5fe732f87..1701fd670 100644 --- a/doc/news/version_3.20100427.mdwn +++ b/doc/news/version_3.20100427.mdwn @@ -1,36 +1,44 @@ -News for ikiwiki 3.20100427: +This version of ikiwiki has a lot of changes that you need to know about. - This version of ikiwiki has a lot of changes that you need to know about. - Now you can include customised versions of templates in the source - of your wiki. (For example, templates/page.tmpl.) When these templates - are changed, ikiwiki will automatically rebuild pages that use them. - Allowing untrusted users to upload attachments with the ".tmpl" - extension is not recommended, as that allows anyone to change - a wiki's templates. - The --getctime switch is renamed to --gettimes, and it also gets the - file modification time. And it's a lot faster (when using git). But - the really important change is, you don't have to remember to use this - switch. Now ikiwiki will do it when it needs to. - At last, the "tagged()" pagespec only matches tags, not regular wikilinks. - If your wiki accidentially relied on the old, buggy behavior, you might - need to change its pagespecs to use "link()". - Many of your wishes have been answered: Now tag pages can automatically be - created when new tags are used. This feature is enabled by default if you - have configured a tagbase. It can be turned on or off using the - tag\_autocreate setting. - These changes may also affect some users: - * The title\_natural sort method (as used by the inline directive, etc) - has been moved to the new sortnaturally plugin, which is not enabled - by default since it requires the Sort::Naturally perl module. - * TMPL\_INCLUDE is no longer supported in any template used by ikiwiki. - It used to be allowed in certian templates, but not in others. - * The add\_templates option has been removed from the underlay plugin. - If you used this option, you can instead use templates/ subdirectories - inside underlay directories added by the add\_underlays option. - Due to the above and other changes, all wikis need to be rebuilt on - upgrade to this version. If you listed your wiki in /etc/ikiwiki/wikilist - this will be done automatically when the Debian package is upgraded. Or - use ikiwiki-mass-rebuild to force a rebuild. +Now you can include customised versions of templates in the source +of your wiki. (For example, templates/page.tmpl.) When these templates +are changed, ikiwiki will automatically rebuild pages that use them. + +Allowing untrusted users to upload attachments with the ".tmpl" +extension is not recommended, as that allows anyone to change +a wiki's templates. + +The --getctime switch is renamed to --gettimes, and it also gets the +file modification time. And it's a lot faster (when using git). But +the really important change is, you don't have to remember to use this +switch. Now ikiwiki will do it when it needs to. + +At last, the "tagged()" pagespec only matches tags, not regular wikilinks. +If your wiki accidentially relied on the old, buggy behavior, you might +need to change its pagespecs to use "link()". + +Many of your wishes have been answered: Now tag pages can automatically be +created when new tags are used. This feature is enabled by default if you +have configured a tagbase. It can be turned on or off using the +`tag_autocreate` setting. + +These changes may also affect some users: + +* The `title_natural` sort method (as used by the inline directive, etc) + has been moved to the new sortnaturally plugin, which is not enabled + by default since it requires the Sort::Naturally perl module. + +* `TMPL_INCLUDE` is no longer supported in any template used by ikiwiki. + It used to be allowed in certian templates, but not in others. + +* The `add_templates` option has been removed from the underlay plugin. + If you used this option, you can instead use templates/ subdirectories + inside underlay directories added by the `add_underlays` option. + +Due to the above and other changes, all wikis need to be rebuilt on +upgrade to this version. If you listed your wiki in /etc/ikiwiki/wikilist +this will be done automatically when the Debian package is upgraded. Or +use ikiwiki-mass-rebuild to force a rebuild. ikiwiki 3.20100427 released with [[!toggle text="these changes"]] [[!toggleable text=""" @@ -108,4 +116,4 @@ ikiwiki 3.20100427 released with [[!toggle text="these changes"]] rebuild on upgrade to this version. * Fix removal of rendered files in rebuild mode. * Add page() PageSpec, which is like glob() but matches only pages, - not other files."""]] \ No newline at end of file + not other files."""]] -- cgit v1.2.3 From 67e8edc59712cfc3dbd24fd7f3aae0fa734983be Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Wed, 28 Apr 2010 03:22:37 +0000 Subject: question about TMPL_INCLUDE --- doc/news/version_3.20100427/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/news/version_3.20100427/discussion.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20100427/discussion.mdwn b/doc/news/version_3.20100427/discussion.mdwn new file mode 100644 index 000000000..4daf8085f --- /dev/null +++ b/doc/news/version_3.20100427/discussion.mdwn @@ -0,0 +1,3 @@ +*TMPL_INCLUDE is no longer supported in any template used by ikiwiki. It used to be allowed in certian templates, but not in others.* + +Would it be possible to make that a config option? Because I do use includes in my templates, and I don't allow users to edit templates, so it isn't a security loophole for me. --[[KathrynAndersen]] -- cgit v1.2.3 From a6e6f604bd8e9a8f90000163f8b00299829729d5 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Wed, 28 Apr 2010 12:39:13 -0400 Subject: TMPL_INCLUDE re-enabled for templates read from the templatedir. (But not in-wiki templates.) --- IkiWiki.pm | 18 +++++++++++------- debian/changelog | 2 ++ doc/news/version_3.20100427/discussion.mdwn | 4 ++++ 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 623396c9c..dcee376ee 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1661,7 +1661,11 @@ sub template_file ($) { } my $template=srcfile($tpage, 1); - if (! defined $template) { + if (defined $template) { + return $template, $tpage, 1 if wantarray; + return $template; + } + else { $name=~s:/::; # avoid path traversal foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { @@ -1670,12 +1674,12 @@ sub template_file ($) { last; } } + if (defined $template) { + return $template, $tpage if wantarray; + return $template; + } } - if (defined $template) { - return $template, $tpage if wantarray; - return $template; - } return; } @@ -1683,7 +1687,7 @@ sub template_depends ($$;@) { my $name=shift; my $page=shift; - my ($filename, $tpage)=template_file($name); + my ($filename, $tpage, $untrusted)=template_file($name); if (defined $page && defined $tpage) { add_depends($page, $tpage); } @@ -1699,7 +1703,7 @@ sub template_depends ($$;@) { die_on_bad_params => 0, filename => $filename, @_, - no_includes => 1, + ($untrusted ? (no_includes => 1) : ()), ); return @opts if wantarray; diff --git a/debian/changelog b/debian/changelog index b19840865..0a70dc6ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low * template: Fix typo. + * TMPL_INCLUDE re-enabled for templates read from the templatedir. + (But not in-wiki templates.) -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/news/version_3.20100427/discussion.mdwn b/doc/news/version_3.20100427/discussion.mdwn index 4daf8085f..726f9a0d2 100644 --- a/doc/news/version_3.20100427/discussion.mdwn +++ b/doc/news/version_3.20100427/discussion.mdwn @@ -1,3 +1,7 @@ *TMPL_INCLUDE is no longer supported in any template used by ikiwiki. It used to be allowed in certian templates, but not in others.* Would it be possible to make that a config option? Because I do use includes in my templates, and I don't allow users to edit templates, so it isn't a security loophole for me. --[[KathrynAndersen]] + +> I don't like config options that make wikis unsafe, but I should have +> revisted enabling includes for templates read from the templatedir -- +> it's easy to do, and I've done it now. --[[Joey]] -- cgit v1.2.3 From a5923e39995165bd75d4048d646a226a88be920b Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" <http://kerravonsen.dreamwidth.org/@web> Date: Thu, 29 Apr 2010 00:27:03 +0000 Subject: reply --- doc/news/version_3.20100427/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/news/version_3.20100427/discussion.mdwn b/doc/news/version_3.20100427/discussion.mdwn index 726f9a0d2..011f3d88f 100644 --- a/doc/news/version_3.20100427/discussion.mdwn +++ b/doc/news/version_3.20100427/discussion.mdwn @@ -5,3 +5,5 @@ Would it be possible to make that a config option? Because I do use includes in > I don't like config options that make wikis unsafe, but I should have > revisted enabling includes for templates read from the templatedir -- > it's easy to do, and I've done it now. --[[Joey]] + +>> Thank you! --[[KathrynAndersen]] -- cgit v1.2.3 From 0c7d2cf9b2773bd17c0ec549ed1ba833ff1913e1 Mon Sep 17 00:00:00 2001 From: albertlash <albertlash@web> Date: Thu, 29 Apr 2010 03:44:27 +0000 Subject: --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 683a3f8ac..31110f3c6 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -1,3 +1,11 @@ +20100428 - I just wrote a simple ruby script which will connect to a mysql server and then recreate the pages and their revision histories with Grit. It also does one simple conversion of equals titles to pounds. Enjoy! + +http://github.com/docunext/mediawiki2gitikiwiki + +-- [[users/Albert]] + +---- + The u32 page is excellent, but I wonder if documenting the procedure here would be worthwhile. Who knows, the remote site might disappear. But also there are some variations on the approach that might be useful: -- cgit v1.2.3 From ebde1ee2fd814e45e0e108bb1a9ba81499d86c87 Mon Sep 17 00:00:00 2001 From: albertlash <albertlash@web> Date: Thu, 29 Apr 2010 03:44:52 +0000 Subject: --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 31110f3c6..592a06a5b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -1,6 +1,6 @@ 20100428 - I just wrote a simple ruby script which will connect to a mysql server and then recreate the pages and their revision histories with Grit. It also does one simple conversion of equals titles to pounds. Enjoy! -http://github.com/docunext/mediawiki2gitikiwiki +<http://github.com/docunext/mediawiki2gitikiwiki> -- [[users/Albert]] -- cgit v1.2.3 From 8d7dba2fb274b024e7a8b5d8ce4414d3e5bf7420 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" <http://jmtd.livejournal.com/@web> Date: Thu, 29 Apr 2010 15:35:59 +0000 Subject: wl rcs --- doc/rcs/svn.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/rcs/svn.mdwn b/doc/rcs/svn.mdwn index f8c44b6eb..7aa682978 100644 --- a/doc/rcs/svn.mdwn +++ b/doc/rcs/svn.mdwn @@ -1,4 +1,4 @@ -[Subversion](http://subversion.tigris.org/) is a revision control system. While ikiwiki is relatively +[Subversion](http://subversion.tigris.org/) is a [[revision control system|rcs]]. While ikiwiki is relatively independent of the underlying revision control system, and can easily be used without one, using it with Subversion or another revision control system is recommended. -- cgit v1.2.3 From d57d2ecca722cb7c43d2b14ed31f38c3e204079c Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Thu, 29 Apr 2010 16:18:15 +0000 Subject: YA URI to another mediawiki to git project --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 592a06a5b..8a2261543 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -657,3 +657,6 @@ page.--[[users/Chadius]] > on mediawiki in general. It seems to produce output that could be > used by the [[plugins/contrib/mediawiki]] plugin, if the filenames > were fixed to use the right extension. --[[Joey]] + +>> Here's another I found while browsing around starting from the link you gave Joey<br /> +>> <http://github.com/scy/levitation> -- cgit v1.2.3 From f7f1dd3a3852ef158a577387faee2c34c4f9cfad Mon Sep 17 00:00:00 2001 From: simonraven <simonraven@web> Date: Thu, 29 Apr 2010 16:24:23 +0000 Subject: more to add on my comment --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn index 8a2261543..d67a9131b 100644 --- a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -659,4 +659,7 @@ page.--[[users/Chadius]] > were fixed to use the right extension. --[[Joey]] >> Here's another I found while browsing around starting from the link you gave Joey<br /> ->> <http://github.com/scy/levitation> +>> <http://github.com/scy/levitation><br /> +>> As I don't run mediawiki anymore, but I still have my xz/gzip-compressed XML dumps, +>> it's certainly easier for me to do it this way; also a file or a set of files is easier to lug +>> around on some medium than a full mysqld or postgres master and relevant databases. -- cgit v1.2.3 From 9fb15ec9fec8903776be0be01eaed0e7bb7d5009 Mon Sep 17 00:00:00 2001 From: Jon Dowland <jmtd@debian.org> Date: Fri, 30 Apr 2010 16:48:19 +0100 Subject: new bug: svn commit failures... --- ...vn_commit_failures_interpreted_as_merge_conflicts.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn (limited to 'doc') diff --git a/doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn b/doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn new file mode 100644 index 000000000..09753b4ee --- /dev/null +++ b/doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn @@ -0,0 +1,15 @@ +I'm attempting a merge with the SVN plugin via the web interface +with ikiwiki-3.20100403 and subversion 1.6.11. + +The web interface says + + Your changes conflict with other changes made to the page. + + Conflict markers have been inserted into the page content. Reconcile the conflict and commit again to save your changes. + +However there are no merge conflict markers in the page. My apache error log says: + + [Fri Apr 30 16:43:57 2010] [error] [client 10.64.64.42] svn: Commit failed (details follow):, referer: https://unixwiki.ncl.ac.uk/ikiwiki.cgi + [Fri Apr 30 16:43:57 2010] [error] [client 10.64.64.42] svn: Authorization failed, referer: https://unixwiki.ncl.ac.uk/ikiwiki.cgi + +-- [[Jon]] -- cgit v1.2.3 From dd75b61d9332e50364f97fc04179ab895bfc2ef8 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Fri, 30 Apr 2010 14:15:58 -0400 Subject: response --- doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn b/doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn index 09753b4ee..0c9bce4b9 100644 --- a/doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn +++ b/doc/bugs/svn_commit_failures_interpreted_as_merge_conflicts.mdwn @@ -13,3 +13,9 @@ However there are no merge conflict markers in the page. My apache error log say [Fri Apr 30 16:43:57 2010] [error] [client 10.64.64.42] svn: Authorization failed, referer: https://unixwiki.ncl.ac.uk/ikiwiki.cgi -- [[Jon]] + +> Only way for this to be improved would be for the svn plugin to +> explicitly check the file for conflict markers. I guess it could +> change the error message then, but the actual behavior of putting the +> changed file back in the editor so the user can recommit is about right +> as far as error recovery goes. --[[Joey]] -- cgit v1.2.3 From 3252df4aa8a35495bbaa8280ca13a545285e6192 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 15:27:32 -0400 Subject: comments, branch review, questions --- doc/bugs/html5_support.mdwn | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) (limited to 'doc') diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 239474275..5d2a41303 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -9,10 +9,67 @@ HTML5](http://www.w3.org/TR/html5-diff/). * [ikiwiki instance with HTML5 templates](http://natalian.org) * [HTML5 outliner tool](http://gsnedders.html5.org/outliner/) -- to check you have the structure of your markup correct +> Kai, thanks enormously for working on this. I switched a page to +> the html5 doctype today, and was rather pleasently suprised that it +> validated, except for the new Cache-Control meta tag. Now I see you're +> well ahead of me. --[[Joey]] +> +> So, how should ikiwiki support html5? There are basically 3 approaches: +> +> 1. Allow users to add html5 tags to their existing xhtml pages. +> What has been done so far, can be extended. Basically works +> in browsers, if you don't care about standards. A good prerequisite +> for anything else, anyway. +> 2. Switch to html5 in eg, ikiwiki 4; users have to deal with +> any custom markup on their pages/templates that breaks then. +> 3. Have both a html5 and a xhtml mode, allow user to select. +> +> The third option seems fairly tractable from what I see here and in +> your branch. You made only relatively minor changes to 10 templates. +> It would probably not be too dreadful to put them in ifdefs. +> +> Some of your changes are obvious, like using the new `time` and +> and `article` elements. Others less so, and I'm particularly +> puzzled by these: +> +> * Removing the value="Submit" from the button on the +> commentmoderation form. +> * Removing feedlink.tmpl. What?! +> * Using a `h2` for the header of inlinepage.tmpl and page.tmpl, rather +> than the styled span. Ikiwiki has +> [[a_reason|todo/Option_to_make_title_an_h1?]] for not +> using real `hN` for the header atop a page and here. +> AFAICS, html5 does not invalidate that. +> * Removing Editurl from inlinepage.tmpl actions. I assume +> this is your own preference, needs to be removed from branch +> before I can use it. +> * Removing the pageheader, content, and footer divs +> which are all used by style.css. +> Perhaps, the style sheet needs to be updated to use +> the new elements, like the `footer` and `header`. +> * Removal of the favicon from page.tmpl. Surely html5 supports? +> * Removal of BASEURL from page.tmpl, apparently a mistake. +> * Removal of the `/` between wiki title and page title. +> Personal preference. +> * Removal of `comments` div, which is there to be styled. +> * Why use a `p` rather than the `div` for `addcomments`? +> * Moving the action bar to the bottom of the page. +> Personal preference. +> * Clearly searchquery.tmpl has no business using bad old `center` +> tag, but something should still be done to replace it. +> +> (BTW, it would be helpful if you could re-merge master into your branch +> as it is a bit diverged now.) --[[Joey]] + # htmlscrubber.pm needs to not scrub new HTML5 elements * [new elements](http://www.w3.org/TR/html5-diff/#new-elements) +> Most of these can be supported trivially, since they are just semantic +> markup. Make a list of these, and their attributes (and which attributes +> can contain urls or other javascript injection mechanisms), and I can add +> them. Others, like `embed`, and `canvas` are *scary*. --[[Joey]] + # HTML5 Validation and t/html.t [validator.nu](http://validator.nu/) is the authorative HTML5 validator, @@ -25,6 +82,9 @@ In the future, hopefully ikiwiki can test for valid HTML5 using [Relax NG schema](http://syntax.whattf.org/) using a Debian package tool [rnv](http://packages.qa.debian.org/r/rnv.html). +> Validation in the test suite is nice, but I am willing to lose those +> tests for a while. --[[Joey]] + # HTML5 migration issues # [article](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-article-element) element @@ -45,3 +105,6 @@ As a workaround: au:~% grep timeformat natalian.setup timeformat => '%Y-%m-%d', + +> Also, the [[plugins/relativedate]] plugin needs to be updated to +> support relatatizing the contents of time elements. --[[Joey]] -- cgit v1.2.3 From a034716009e29b1ef4bd44e0cddb7f7cf2fd93a2 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 15:35:52 -0400 Subject: update example tag pages to match autotag.tmpl --- doc/examples/blog/tags/life.mdwn | 6 +++--- doc/examples/blog/tags/tech.mdwn | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/examples/blog/tags/life.mdwn b/doc/examples/blog/tags/life.mdwn index 719f2b192..e1614dbdc 100644 --- a/doc/examples/blog/tags/life.mdwn +++ b/doc/examples/blog/tags/life.mdwn @@ -1,4 +1,4 @@ -This feed contains pages in the "life" category. +[[!meta title="tag life"]] -[[!inline pages="link(tags/life) and !*/Discussion" -show="10" actions=yes]] +[[!inline pages="tagged(tags/life)" actions="no" archive="yes" +feedshow=10]] diff --git a/doc/examples/blog/tags/tech.mdwn b/doc/examples/blog/tags/tech.mdwn index e811cac34..398146cdb 100644 --- a/doc/examples/blog/tags/tech.mdwn +++ b/doc/examples/blog/tags/tech.mdwn @@ -1,3 +1,4 @@ -This feed contains pages in the "tech" category. +[[!meta title="tag tech"]] -[[!inline pages="link(tags/tech) and !*/Discussion" show=10 actions=yes]] +[[!inline pages="tagged(tags/tech)" actions="no" archive="yes" +feedshow=10]] -- cgit v1.2.3 From 80f2042464f9d14bcaed999e9769c71618bf5252 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 16:34:47 -0400 Subject: htmlscrubber: Allow html5 semantic tags: section nav article aside hgroup header footer time mark --- IkiWiki/Plugin/htmlscrubber.pm | 9 ++++++--- debian/changelog | 2 ++ doc/bugs/html5_support.mdwn | 10 ++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index 9f40c752f..1604d776a 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -72,7 +72,7 @@ sub scrubber { eval q{use HTML::Scrubber}; error($@) if $@; # Lists based on http://feedparser.org/docs/html-sanitization.html - # With html 5 video and audio tags added. + # With html5 tags added. $_scrubber = HTML::Scrubber->new( allow => [qw{ a abbr acronym address area b big blockquote br br/ @@ -82,7 +82,9 @@ sub scrubber { menu ol optgroup option p p/ pre q s samp select small span strike strong sub sup table tbody td textarea tfoot th thead tr tt u ul var - video audio + + video audio section nav article aside hgroup header + footer time mark }], default => [undef, { ( map { $_ => 1 } qw{ @@ -98,8 +100,9 @@ sub scrubber { selected shape size span start summary tabindex target title type valign value vspace width + autoplay loopstart loopend end - playcount controls + playcount controls pubdate } ), "/" => 1, # emit proper <hr /> XHTML href => $safe_url_regexp, diff --git a/debian/changelog b/debian/changelog index a1bd85bfa..9a6cf68e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low (But not in-wiki templates.) * Version dependency on liburi-perl to >= 1.36; previous versions did not support building urls from utf-8 strings. Closes: #579713 + * htmlscrubber: Allow html5 semantic tags: section nav article aside hgroup + header footer time mark -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 5d2a41303..a330d3ae6 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -59,7 +59,13 @@ HTML5](http://www.w3.org/TR/html5-diff/). > tag, but something should still be done to replace it. > > (BTW, it would be helpful if you could re-merge master into your branch -> as it is a bit diverged now.) --[[Joey]] +> as it is a bit diverged now.) +> +> Other ideas: +> +> * Add pubdate attribute to time elements as appropriate. +> * Use aside for the sidebar? Or for the [[templates/note]] template? +> --[[Joey]] # htmlscrubber.pm needs to not scrub new HTML5 elements @@ -68,7 +74,7 @@ HTML5](http://www.w3.org/TR/html5-diff/). > Most of these can be supported trivially, since they are just semantic > markup. Make a list of these, and their attributes (and which attributes > can contain urls or other javascript injection mechanisms), and I can add -> them. Others, like `embed`, and `canvas` are *scary*. --[[Joey]] +> them. (Added several now.) Others, like `embed`, and `canvas` are *scary*. --[[Joey]] # HTML5 Validation and t/html.t -- cgit v1.2.3 From 73c8209484ac730c82f7c7b749d08a1b3d895ee0 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 17:56:35 -0400 Subject: more html5 * htmlscrubber: Also allow html5 canvas tags. * htmlscrubber: Round out html5 video support with the preload attribute and the source tag. --- IkiWiki/Plugin/htmlscrubber.pm | 6 +++--- debian/changelog | 3 +++ doc/bugs/html5_support.mdwn | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index 1604d776a..cc00fd5ff 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -83,8 +83,8 @@ sub scrubber { span strike strong sub sup table tbody td textarea tfoot th thead tr tt u ul var - video audio section nav article aside hgroup header - footer time mark + video audio source section nav article aside hgroup + header footer time mark canvas }], default => [undef, { ( map { $_ => 1 } qw{ @@ -101,7 +101,7 @@ sub scrubber { tabindex target title type valign value vspace width - autoplay loopstart loopend end + autoplay preload loopstart loopend end playcount controls pubdate } ), "/" => 1, # emit proper <hr /> XHTML diff --git a/debian/changelog b/debian/changelog index 9a6cf68e3..9613d8b6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,9 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low did not support building urls from utf-8 strings. Closes: #579713 * htmlscrubber: Allow html5 semantic tags: section nav article aside hgroup header footer time mark + * htmlscrubber: Also allow html5 canvas tags. + * htmlscrubber: Round out html5 video support with the preload + attribute and the source tag. -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index a330d3ae6..c05208fbf 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -65,6 +65,7 @@ HTML5](http://www.w3.org/TR/html5-diff/). > > * Add pubdate attribute to time elements as appropriate. > * Use aside for the sidebar? Or for the [[templates/note]] template? +> * Use nav for the actionbar > --[[Joey]] # htmlscrubber.pm needs to not scrub new HTML5 elements @@ -74,7 +75,7 @@ HTML5](http://www.w3.org/TR/html5-diff/). > Most of these can be supported trivially, since they are just semantic > markup. Make a list of these, and their attributes (and which attributes > can contain urls or other javascript injection mechanisms), and I can add -> them. (Added several now.) Others, like `embed`, and `canvas` are *scary*. --[[Joey]] +> them. (Added several now.) Others, like `embed` are *scary*. --[[Joey]] # HTML5 Validation and t/html.t -- cgit v1.2.3 From 442bc59a15301941613d62f4b1d846c57557ca8f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 18:14:50 -0400 Subject: htmlscrubber: Allow the placeholder attribute. --- IkiWiki/Plugin/htmlscrubber.pm | 2 +- debian/changelog | 1 + doc/bugs/html5_support.mdwn | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index cc00fd5ff..b3f659f73 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -102,7 +102,7 @@ sub scrubber { value vspace width autoplay preload loopstart loopend end - playcount controls pubdate + playcount controls pubdate placeholder } ), "/" => 1, # emit proper <hr /> XHTML href => $safe_url_regexp, diff --git a/debian/changelog b/debian/changelog index 9613d8b6d..951caab9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low * htmlscrubber: Also allow html5 canvas tags. * htmlscrubber: Round out html5 video support with the preload attribute and the source tag. + * htmlscrubber: Allow the placeholder attribute. -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index c05208fbf..9c077a2d3 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -66,6 +66,8 @@ HTML5](http://www.w3.org/TR/html5-diff/). > * Add pubdate attribute to time elements as appropriate. > * Use aside for the sidebar? Or for the [[templates/note]] template? > * Use nav for the actionbar +> * Use placeholder in the search box. Allows closing +> [[this_todo|Add_label_to_search_form_input_field]] > --[[Joey]] # htmlscrubber.pm needs to not scrub new HTML5 elements -- cgit v1.2.3 From 0a139aba823ece3166d29ff2daee0b5c9507b52f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 18:27:53 -0400 Subject: htmlscrubber: Allow the html5 form attributes: placeholder autofocus, min, max, step. --- IkiWiki/Plugin/htmlscrubber.pm | 5 +++-- debian/changelog | 3 ++- doc/todo/Add_label_to_search_form_input_field.mdwn | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index b3f659f73..479e10e74 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -101,8 +101,9 @@ sub scrubber { tabindex target title type valign value vspace width - autoplay preload loopstart loopend end - playcount controls pubdate placeholder + autofocus autoplay preload loopstart + loopend end playcount controls pubdate + placeholder min max step } ), "/" => 1, # emit proper <hr /> XHTML href => $safe_url_regexp, diff --git a/debian/changelog b/debian/changelog index 951caab9e..12ef08a91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,8 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low * htmlscrubber: Also allow html5 canvas tags. * htmlscrubber: Round out html5 video support with the preload attribute and the source tag. - * htmlscrubber: Allow the placeholder attribute. + * htmlscrubber: Allow the html5 form attributes: placeholder autofocus, + min, max, step. -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/todo/Add_label_to_search_form_input_field.mdwn b/doc/todo/Add_label_to_search_form_input_field.mdwn index 51b34927d..281ab48e2 100644 --- a/doc/todo/Add_label_to_search_form_input_field.mdwn +++ b/doc/todo/Add_label_to_search_form_input_field.mdwn @@ -51,4 +51,4 @@ The patch below adds a label for the field to improve usability: > element. already works in eg, chromium. However, ikiwiki does not use > html5 yet. --[[Joey]] -[[!tag wishlist html5]] +[[!tag wishlist bugs/html5_support]] -- cgit v1.2.3 From 78cee5140ac37f93cd2e87d8a03d71420303eb13 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 18:44:37 -0400 Subject: add rest of html5 form attributes It's easy to imagine pattern being used to freeze or crash browsers, if they implement it stupidly. Let's hope not.. --- IkiWiki/Plugin/htmlscrubber.pm | 2 +- debian/changelog | 2 +- doc/bugs/html5_support.mdwn | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index 0090b67b9..7517c82c6 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -103,7 +103,7 @@ sub scrubber { autofocus autoplay preload loopstart loopend end playcount controls pubdate - placeholder min max step + placeholder min max step form required } ), "/" => 1, # emit proper <hr /> XHTML href => $safe_url_regexp, diff --git a/debian/changelog b/debian/changelog index 108764c39..cdc79ae78 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,7 +11,7 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low * htmlscrubber: Round out html5 video support with the preload attribute and the source tag. * htmlscrubber: Allow the html5 form attributes: placeholder autofocus, - min, max, step. + min, max, step, required, autocomplete, novalidate, pattern, and form. -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 9c077a2d3..7d9dc9f79 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -79,6 +79,10 @@ HTML5](http://www.w3.org/TR/html5-diff/). > can contain urls or other javascript injection mechanisms), and I can add > them. (Added several now.) Others, like `embed` are *scary*. --[[Joey]] +> I have not added the new `ping` attribute, because parsing a +> space-separeated list of urls to avoid javascript injection is annoying, +> and the attribute seems generally dubious. --[[Joey]] + # HTML5 Validation and t/html.t [validator.nu](http://validator.nu/) is the authorative HTML5 validator, -- cgit v1.2.3 From f1e2d0af123352b692e8e4efdb208e370a00d3c1 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 19:11:03 -0400 Subject: more html5 attributes --- IkiWiki/Plugin/htmlscrubber.pm | 5 +++++ debian/changelog | 4 ++++ doc/bugs/html5_support.mdwn | 5 ++++- 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index 7517c82c6..d52614a4d 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -85,6 +85,7 @@ sub scrubber { video audio source section nav article aside hgroup header footer figure figcaption time mark canvas + datalist }], default => [undef, { ( map { $_ => 1 } qw{ @@ -104,11 +105,15 @@ sub scrubber { autofocus autoplay preload loopstart loopend end playcount controls pubdate placeholder min max step form required + autocomplete novalidate pattern list + formenctype formmethod formnovalidate + formtarget reversed } ), "/" => 1, # emit proper <hr /> XHTML href => $safe_url_regexp, src => $safe_url_regexp, action => $safe_url_regexp, + formaction => $safe_url_regexp, cite => $safe_url_regexp, longdesc => $safe_url_regexp, poster => $safe_url_regexp, diff --git a/debian/changelog b/debian/changelog index cdc79ae78..e0f506f29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,10 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low attribute and the source tag. * htmlscrubber: Allow the html5 form attributes: placeholder autofocus, min, max, step, required, autocomplete, novalidate, pattern, and form. + (Also the form* override attributes for input and buttons.) + * htmlscrubber: Allow the html5 datalist element, and the form list + attribute. + * htmlscrubber: Allow the html5 reversed and spellcheck attributes. -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 7d9dc9f79..1ca45f46d 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -81,7 +81,10 @@ HTML5](http://www.w3.org/TR/html5-diff/). > I have not added the new `ping` attribute, because parsing a > space-separeated list of urls to avoid javascript injection is annoying, -> and the attribute seems generally dubious. --[[Joey]] +> and the attribute seems generally dubious. +> +> Need to understand better the attributes contenteditabl, contextmenu, +> data-*, draggable, hidden, role, aria-*. Have not added those. --[[Joey]] # HTML5 Validation and t/html.t -- cgit v1.2.3 From 790a339db18f1c697052446728641c9e6ef06bdb Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 19:28:28 -0400 Subject: htmlscrubber: Also allow some other html5 tags: canvas, progress, meter, ruby, rt, rp, details, summary. --- IkiWiki/Plugin/htmlscrubber.pm | 10 +++++----- debian/changelog | 3 ++- doc/bugs/html5_support.mdwn | 22 ++++++++++++++-------- 3 files changed, 21 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index d52614a4d..505a6f142 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -85,7 +85,7 @@ sub scrubber { video audio source section nav article aside hgroup header footer figure figcaption time mark canvas - datalist + datalist progress meter ruby rt rp details summary }], default => [undef, { ( map { $_ => 1 } qw{ @@ -104,10 +104,10 @@ sub scrubber { autofocus autoplay preload loopstart loopend end playcount controls pubdate - placeholder min max step form required - autocomplete novalidate pattern list - formenctype formmethod formnovalidate - formtarget reversed + placeholder min max step low high optimum + form required autocomplete novalidate pattern + list formenctype formmethod formnovalidate + formtarget reversed spellcheck open } ), "/" => 1, # emit proper <hr /> XHTML href => $safe_url_regexp, diff --git a/debian/changelog b/debian/changelog index e0f506f29..3d33f3bfc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,8 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low did not support building urls from utf-8 strings. Closes: #579713 * htmlscrubber: Allow html5 semantic tags: section nav article aside hgroup header footer figure figcaption time mark - * htmlscrubber: Also allow html5 canvas tags. + * htmlscrubber: Also allow some other html5 tags: canvas, progress, meter, + ruby, rt, rp, details, summary. * htmlscrubber: Round out html5 video support with the preload attribute and the source tag. * htmlscrubber: Allow the html5 form attributes: placeholder autofocus, diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 1ca45f46d..48b63b29a 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -68,23 +68,29 @@ HTML5](http://www.w3.org/TR/html5-diff/). > * Use nav for the actionbar > * Use placeholder in the search box. Allows closing > [[this_todo|Add_label_to_search_form_input_field]] +> * Use details tag instead of the javascript in the toggle plugin. +> (Need to wait on browser support probably.) > --[[Joey]] # htmlscrubber.pm needs to not scrub new HTML5 elements * [new elements](http://www.w3.org/TR/html5-diff/#new-elements) -> Most of these can be supported trivially, since they are just semantic -> markup. Make a list of these, and their attributes (and which attributes -> can contain urls or other javascript injection mechanisms), and I can add -> them. (Added several now.) Others, like `embed` are *scary*. --[[Joey]] - +> Many added now. +> +> Things I left out, too hard to understand today: +> Attributes contenteditabl, contextmenu, +> data-*, draggable, hidden, role, aria-*. Tags command, keygen, +> output. +> +> Clearly unsafe: embed. +> +> Apparently cannot be used w/o javascript: menu. +> > I have not added the new `ping` attribute, because parsing a > space-separeated list of urls to avoid javascript injection is annoying, > and the attribute seems generally dubious. -> -> Need to understand better the attributes contenteditabl, contextmenu, -> data-*, draggable, hidden, role, aria-*. Have not added those. --[[Joey]] +> --[[Joey]] # HTML5 Validation and t/html.t -- cgit v1.2.3 From ccafb10007731d04e0ff6aa36978690e6dfa6dec Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 19:59:16 -0400 Subject: enable hidden attribute --- IkiWiki/Plugin/htmlscrubber.pm | 2 +- debian/changelog | 17 ++++++++--------- doc/bugs/html5_support.mdwn | 6 +++--- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index 505a6f142..847518178 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -107,7 +107,7 @@ sub scrubber { placeholder min max step low high optimum form required autocomplete novalidate pattern list formenctype formmethod formnovalidate - formtarget reversed spellcheck open + formtarget reversed spellcheck open hidden } ), "/" => 1, # emit proper <hr /> XHTML href => $safe_url_regexp, diff --git a/debian/changelog b/debian/changelog index 3d33f3bfc..8bf6f89b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,18 +5,17 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low (But not in-wiki templates.) * Version dependency on liburi-perl to >= 1.36; previous versions did not support building urls from utf-8 strings. Closes: #579713 - * htmlscrubber: Allow html5 semantic tags: section nav article aside hgroup - header footer figure figcaption time mark + * htmlscrubber: Allow html5 semantic tags: section, nav, article, aside + hgroup, header, footer, figure, figcaption, time, mark * htmlscrubber: Also allow some other html5 tags: canvas, progress, meter, - ruby, rt, rp, details, summary. + ruby, rt, rp, details, summary, datalist. * htmlscrubber: Round out html5 video support with the preload attribute and the source tag. - * htmlscrubber: Allow the html5 form attributes: placeholder autofocus, - min, max, step, required, autocomplete, novalidate, pattern, and form. - (Also the form* override attributes for input and buttons.) - * htmlscrubber: Allow the html5 datalist element, and the form list - attribute. - * htmlscrubber: Allow the html5 reversed and spellcheck attributes. + * htmlscrubber: Allow the html5 form attributes: placeholder, autofocus, + min, max, step, required, autocomplete, novalidate, pattern, list, + and form. (Also the form* override attributes for input and buttons.) + * htmlscrubber: Allow additional misc html5 attributes: reversed, + spellcheck, and hidden. -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 48b63b29a..2d27ac803 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -79,9 +79,9 @@ HTML5](http://www.w3.org/TR/html5-diff/). > Many added now. > > Things I left out, too hard to understand today: -> Attributes contenteditabl, contextmenu, -> data-*, draggable, hidden, role, aria-*. Tags command, keygen, -> output. +> Attributes contenteditable, +> data-\*, draggable, role, aria-\*. +> Tags command, keygen, output. > > Clearly unsafe: embed. > -- cgit v1.2.3 From a547d2685866898665fad221939b0b820a42a088 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 20:40:31 -0400 Subject: html5 option * Ikiwiki can be configured to generate html5 instead of the default xhtml 1.0. The html5 output mode is experimental, not yet fully standards compliant, and will be subject to rapid change. --- IkiWiki.pm | 8 ++++++++ IkiWiki/Render.pm | 1 + debian/changelog | 5 ++++- doc/bugs/html5_support.mdwn | 12 +++++++----- doc/roadmap.mdwn | 1 + templates/misc.tmpl | 5 ++++- templates/page.tmpl | 5 ++++- 7 files changed, 29 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index 5ff1a5ae6..1e11d34e2 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -234,6 +234,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + html5 => { + type => "boolean", + default => 0, + description => "generate HTML5? (experimental)", + safe => 1, + rebuild => 1, + }, sslcookie => { type => "boolean", default => 0, @@ -1725,6 +1732,7 @@ sub misctemplate ($$;@) { wikiname => $config{wikiname}, pagebody => $pagebody, baseurl => baseurl(), + html5 => $config{html5}, @_, ); run_hooks(pagetemplate => sub { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 7e3d78861..5923f5e74 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -138,6 +138,7 @@ sub genpage ($$) { mtime => displaytime($pagemtime{$page}), ctime => displaytime($pagectime{$page}), baseurl => baseurl($page), + html5 => $config{html5}, ); run_hooks(pagetemplate => sub { diff --git a/debian/changelog b/debian/changelog index 8bf6f89b6..fc5a6124b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,12 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low - * template: Fix typo. * TMPL_INCLUDE re-enabled for templates read from the templatedir. (But not in-wiki templates.) * Version dependency on liburi-perl to >= 1.36; previous versions did not support building urls from utf-8 strings. Closes: #579713 + * Ikiwiki can be configured to generate html5 instead of the default xhtml + 1.0. The html5 output mode is experimental, not yet fully standards + compliant, and will be subject to rapid change. * htmlscrubber: Allow html5 semantic tags: section, nav, article, aside hgroup, header, footer, figure, figcaption, time, mark * htmlscrubber: Also allow some other html5 tags: canvas, progress, meter, @@ -16,6 +18,7 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low and form. (Also the form* override attributes for input and buttons.) * htmlscrubber: Allow additional misc html5 attributes: reversed, spellcheck, and hidden. + * template: Fix typo. -- Joey Hess <joeyh@debian.org> Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 2d27ac803..bf782a3bf 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -20,13 +20,14 @@ HTML5](http://www.w3.org/TR/html5-diff/). > What has been done so far, can be extended. Basically works > in browsers, if you don't care about standards. A good prerequisite > for anything else, anyway. -> 2. Switch to html5 in eg, ikiwiki 4; users have to deal with +> 2. Have both a html5 and a xhtml mode, allow user to select. +> 3. Switch to html5 in eg, ikiwiki 4; users have to deal with > any custom markup on their pages/templates that breaks then. -> 3. Have both a html5 and a xhtml mode, allow user to select. -> -> The third option seems fairly tractable from what I see here and in +> +> The second option seems fairly tractable from what I see here and in > your branch. You made only relatively minor changes to 10 templates. -> It would probably not be too dreadful to put them in ifdefs. +> It would probably not be too dreadful to put them in ifdefs. I've made a +> small start at doing that. > > Some of your changes are obvious, like using the new `time` and > and `article` elements. Others less so, and I'm particularly @@ -70,6 +71,7 @@ HTML5](http://www.w3.org/TR/html5-diff/). > [[this_todo|Add_label_to_search_form_input_field]] > * Use details tag instead of the javascript in the toggle plugin. > (Need to wait on browser support probably.) +> > --[[Joey]] # htmlscrubber.pm needs to not scrub new HTML5 elements diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index c126fd585..4b5f01c45 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -80,6 +80,7 @@ Probably incomplete list: * YADA format setup files per default? * Enable tagbase by default (so that tag autocreation will work by default). Note that this is already done for wikis created by `auto-blog.setup`. +* html5 on by default (some day..) In general, we try to use [[ikiwiki-transition]] or forced rebuilds on upgrade to deal with changes that break compatability. Some things that diff --git a/templates/misc.tmpl b/templates/misc.tmpl index 535a6f06b..0b7fefa08 100644 --- a/templates/misc.tmpl +++ b/templates/misc.tmpl @@ -1,6 +1,9 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" +<TMPL_IF HTML5><!DOCTYPE html> +<html> +<TMPL_ELSE><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> +</TMPL_IF> <head> <TMPL_IF NAME="FORCEBASEURL"> <base href="<TMPL_VAR FORCEBASEURL>" /> diff --git a/templates/page.tmpl b/templates/page.tmpl index 7e850a56b..661d4a515 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -1,6 +1,9 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" +<TMPL_IF HTML5><!DOCTYPE html> +<html> +<TMPL_ELSE><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> +</TMPL_IF> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Cache-Control" content="must-revalidate" /> -- cgit v1.2.3 From 8e4af6a8e2a8e8d9b7d9f4312c4216261ebd5a28 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 20:57:54 -0400 Subject: tidy plugin issue --- doc/bugs/html5_support.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index bf782a3bf..dca60d57e 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -132,3 +132,7 @@ As a workaround: > Also, the [[plugins/relativedate]] plugin needs to be updated to > support relatatizing the contents of time elements. --[[Joey]] + +## tidy plugin + +Will reformat html5 to html4. -- cgit v1.2.3 From 1226269f683bce6bf3a0539f0374ee1844687b02 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 21:00:06 -0400 Subject: mention html5 --- doc/features.mdwn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/features.mdwn b/doc/features.mdwn index 07ce648ea..215c1cecd 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -71,8 +71,10 @@ you would care to syndicate. ## Valid html and [[css]] Ikiwiki aims to produce -[valid XHTML 1.0](http://validator.w3.org/check?url=referer). Ikiwiki -generates html using [[templates]], and uses [[css]], so you +[valid XHTML 1.0](http://validator.w3.org/check?url=referer). +(Experimental HTML5 support is also available.) + +Ikiwiki generates html using [[templates]], and uses [[css]], so you can change the look and layout of all pages in any way you would like. ## [[Plugins]] -- cgit v1.2.3 From f9e41d19b77f677a58bb22e1db47627cf9faa57f Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sat, 1 May 2010 21:42:48 -0400 Subject: add news item for ikiwiki 3.20100501 --- doc/news/version_3.20100212.mdwn | 26 -------------------------- doc/news/version_3.20100302.mdwn | 12 ------------ doc/news/version_3.20100501.mdwn | 21 +++++++++++++++++++++ 3 files changed, 21 insertions(+), 38 deletions(-) delete mode 100644 doc/news/version_3.20100212.mdwn delete mode 100644 doc/news/version_3.20100302.mdwn create mode 100644 doc/news/version_3.20100501.mdwn (limited to 'doc') diff --git a/doc/news/version_3.20100212.mdwn b/doc/news/version_3.20100212.mdwn deleted file mode 100644 index 3dcfe5f84..000000000 --- a/doc/news/version_3.20100212.mdwn +++ /dev/null @@ -1,26 +0,0 @@ -ikiwiki 3.20100212 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * template: Preprocess parameters before htmlizing. - * img: Fix a bug that could taint @links with undef values. - * setup automator: Configure Term::Readline to use bold for prompt, rather - than default underline. Closes: #[517656](http://bugs.debian.org/517656) - * Allow jumping directly into account registration process by going to - ikiwiki.cgi?do=register - * Improve display of openid in preferences page. - * Add link to userpage (or creation link) to top of preferences page. - * opendiscussion: This plugin will also now allow posting comments - to otherwise locked-down sites. - * auto-blog.setup: Lock all pages, so only admin can post to the blog - by default, and enable opendiscussion so others can comment. - * Fix color and format plugins to appear in the websetup interface. - * amazon\_s3: Fix to support the EU S3 datacenter, which is more picky - about attempts to create already existing buckets. - * httpauth: When cgiauthurl is configured, httpauth can now be used - alongside other authentication methods (like openid or anonok). Rather - than always redirect to the cgiauthurl for authentication, there is now - a button on the login form to use it. - * httpauth: Add httpauth\_pagespec setting that can be used to limit - pages to only being edited via users authed with httpauth. - * Allow globs to be used in user() pagespecs. - * Group related plugins into sections in the setup file, and drop - unused rcs plugins from the setup file."""]] \ No newline at end of file diff --git a/doc/news/version_3.20100302.mdwn b/doc/news/version_3.20100302.mdwn deleted file mode 100644 index f439b1b23..000000000 --- a/doc/news/version_3.20100302.mdwn +++ /dev/null @@ -1,12 +0,0 @@ -ikiwiki 3.20100302 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * comments: Display number of comments in comment action link. - * Rebuild wikis on upgrade to this version to get the comment counts - added to existing pages. - * Loosen regexp, to allow empty quoted parameters in directives. - * Add force\_overwrite setting to make setup automator overwrite existing - files/directories. - * Fix admin openid detection in setup automator, and avoid prompting - for a password. - * Add new --clean option; this makes ikiwiki remove all built - files in the destdir, as well as wrappers and the .ikiwiki directory."""]] \ No newline at end of file diff --git a/doc/news/version_3.20100501.mdwn b/doc/news/version_3.20100501.mdwn new file mode 100644 index 000000000..0cf5e38be --- /dev/null +++ b/doc/news/version_3.20100501.mdwn @@ -0,0 +1,21 @@ +ikiwiki 3.20100501 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * TMPL\_INCLUDE re-enabled for templates read from the templatedir. + (But not in-wiki templates.) + * Version dependency on liburi-perl to >= 1.36; previous versions + did not support building urls from utf-8 strings. Closes: #[579713](http://bugs.debian.org/579713) + * Ikiwiki can be configured to generate html5 instead of the default xhtml + 1.0. The html5 output mode is experimental, not yet fully standards + compliant, and will be subject to rapid change. + * htmlscrubber: Allow html5 semantic tags: section, nav, article, aside + hgroup, header, footer, figure, figcaption, time, mark + * htmlscrubber: Also allow some other html5 tags: canvas, progress, meter, + ruby, rt, rp, details, summary, datalist. + * htmlscrubber: Round out html5 video support with the preload + attribute and the source tag. + * htmlscrubber: Allow the html5 form attributes: placeholder, autofocus, + min, max, step, required, autocomplete, novalidate, pattern, list, + and form. (Also the form* override attributes for input and buttons.) + * htmlscrubber: Allow additional misc html5 attributes: reversed, + spellcheck, and hidden. + * template: Fix typo."""]] \ No newline at end of file -- cgit v1.2.3 From 970373548fda77223ebbeb6aadbdbe4884b67cef Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sun, 2 May 2010 13:44:13 -0400 Subject: Add parameter to displaytime to specify that it is a pubdate, and in html5 mode, use time tag. --- IkiWiki.pm | 22 ++++++++++++++++++++-- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/inline.pm | 12 +----------- IkiWiki/Plugin/relativedate.pm | 15 ++++++++++++--- IkiWiki/Render.pm | 2 +- debian/changelog | 7 +++++++ doc/bugs/html5_support.mdwn | 3 +++ doc/plugins/write.mdwn | 5 ++++- 8 files changed, 49 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index ed57710bb..c428de77f 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -998,10 +998,18 @@ sub abs2rel ($$) { return $ret; } -sub displaytime ($;$) { +sub displaytime ($;$$) { # Plugins can override this function to mark up the time to # display. - return '<span class="date">'.formattime(@_).'</span>'; + my $time=formattime($_[0], $_[1]); + if ($config{html5}) { + return '<time datetime="'.date_3339($_[0]).'"'. + ($_[2] ? ' pubdate' : ''). + '>'.$time.'</time>'; + } + else { + return '<span class="date">'.$time.'</span>'; + } } sub formattime ($;$) { @@ -1017,6 +1025,16 @@ sub formattime ($;$) { return decode_utf8(POSIX::strftime($format, localtime($time))); } +sub date_3339 ($) { + my $time=shift; + + my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); + POSIX::setlocale(&POSIX::LC_TIME, "C"); + my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time)); + POSIX::setlocale(&POSIX::LC_TIME, $lc_time); + return $ret; +} + sub beautify_urlpath ($) { my $url=shift; diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index f7dc99dca..02f1d9301 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -672,7 +672,7 @@ sub previewcomment ($$$) { my $template = template("comment.tmpl"); $template->param(content => $preview); - $template->param(ctime => displaytime($time)); + $template->param(ctime => displaytime($time, undef, 1)); IkiWiki::run_hooks(pagetemplate => sub { shift->(page => $location, diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 95fe90312..2df59f414 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -358,7 +358,7 @@ sub preprocess_inline (@) { $template->param(pageurl => urlto($page, $params{destpage})); $template->param(inlinepage => $page); $template->param(title => pagetitle(basename($page))); - $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat})); + $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}, 1)); $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat})); $template->param(first => 1) if $page eq $list[0]; $template->param(last => 1) if $page eq $list[$#list]; @@ -500,16 +500,6 @@ sub date_822 ($) { return $ret; } -sub date_3339 ($) { - my $time=shift; - - my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); - POSIX::setlocale(&POSIX::LC_TIME, "C"); - my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time)); - POSIX::setlocale(&POSIX::LC_TIME, $lc_time); - return $ret; -} - sub absolute_urls ($$) { # sucky sub because rss sucks my $content=shift; diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index 7e615f7f1..fe8ef0901 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -43,9 +43,10 @@ sub include_javascript ($;$) { '" type="text/javascript" charset="utf-8"></script>'; } -sub mydisplaytime ($;$) { +sub mydisplaytime ($;$$) { my $time=shift; my $format=shift; + my $pubdate=shift; # This needs to be in a form that can be parsed by javascript. # Being fairly human readable is also nice, as it will be exposed @@ -53,8 +54,16 @@ sub mydisplaytime ($;$) { my $gmtime=decode_utf8(POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time))); - return '<span class="relativedate" title="'.$gmtime.'">'. - IkiWiki::formattime($time, $format).'</span>'; + my $mid=' class="relativedate" title="'.$gmtime.'">'. + IkiWiki::formattime($time, $format); + + if ($config{html5}) { + return '<time datetime="'.IkiWiki::date_3339($time).'"'. + ($pubdate ? ' pubdate' : '').$mid.'</time>'; + } + else { + return '<span'.$mid.'</span>'; + } } 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 5923f5e74..cf6943e7d 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -136,7 +136,7 @@ sub genpage ($$) { backlinks => $backlinks, more_backlinks => $more_backlinks, mtime => displaytime($pagemtime{$page}), - ctime => displaytime($pagectime{$page}), + ctime => displaytime($pagectime{$page}, undef, 1), baseurl => baseurl($page), html5 => $config{html5}, ); diff --git a/debian/changelog b/debian/changelog index 6962e5171..8158429a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20100502) UNRELEASED; urgency=low + + * Add parameter to displaytime to specify that it is a pubdate, + and in html5 mode, use time tag. + + -- Joey Hess <joeyh@debian.org> Sun, 02 May 2010 13:22:50 -0400 + ikiwiki (3.20100501) unstable; urgency=low * TMPL_INCLUDE re-enabled for templates read from the templatedir. diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index dca60d57e..386a3094a 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -133,6 +133,9 @@ As a workaround: > Also, the [[plugins/relativedate]] plugin needs to be updated to > support relatatizing the contents of time elements. --[[Joey]] +> Done and done; in html5 mode it uses the time tag, and even +> adds pubdate when displaying ctimes. --[[Joey]] + ## tidy plugin Will reformat html5 to html4. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index a9ea7db73..5e7042c3b 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -938,13 +938,16 @@ search for files. If the directory name is not absolute, ikiwiki will assume it is in the parent directory of the configured underlaydir. -### `displaytime($;$)` +### `displaytime($;$$)` Given a time, formats it for display. The optional second parameter is a strftime format to use to format the time. +If the third parameter is true, this is the publication time of a page. +(Ie, set the html5 pubdate attribute.) + ### `gettext` This is the standard gettext function, although slightly optimised. -- cgit v1.2.3 From b21df5029b94c5680d8a3e5f0c1ed40a660a1594 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sun, 2 May 2010 13:49:56 -0400 Subject: Add placeholder text in search form (in html5 mode only). --- IkiWiki/Plugin/google.pm | 1 + IkiWiki/Plugin/search.pm | 1 + debian/changelog | 1 + doc/bugs/html5_support.mdwn | 3 --- doc/todo/Add_label_to_search_form_input_field.mdwn | 2 ++ templates/googleform.tmpl | 3 ++- templates/searchform.tmpl | 3 ++- 7 files changed, 9 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 85467fa0b..68cde261c 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -42,6 +42,7 @@ sub pagetemplate (@) { if (! defined $form) { my $searchform = template("googleform.tmpl", blind_cache => 1); $searchform->param(url => $config{url}); + $searchform->param(html5 => $config{html5}); $form=$searchform->output; } diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index be39fdf1e..9e875c79c 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -58,6 +58,7 @@ sub pagetemplate (@) { if (! defined $form) { my $searchform = template("searchform.tmpl", blind_cache => 1); $searchform->param(searchaction => $config{cgiurl}); + $searchform->param(html5 => $config{html5}); $form=$searchform->output; } diff --git a/debian/changelog b/debian/changelog index 8158429a0..c9fc2e657 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low * Add parameter to displaytime to specify that it is a pubdate, and in html5 mode, use time tag. + * Add placeholder text in search form (in html5 mode only). -- Joey Hess <joeyh@debian.org> Sun, 02 May 2010 13:22:50 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 386a3094a..5530b29db 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -64,11 +64,8 @@ HTML5](http://www.w3.org/TR/html5-diff/). > > Other ideas: > -> * Add pubdate attribute to time elements as appropriate. > * Use aside for the sidebar? Or for the [[templates/note]] template? > * Use nav for the actionbar -> * Use placeholder in the search box. Allows closing -> [[this_todo|Add_label_to_search_form_input_field]] > * Use details tag instead of the javascript in the toggle plugin. > (Need to wait on browser support probably.) > diff --git a/doc/todo/Add_label_to_search_form_input_field.mdwn b/doc/todo/Add_label_to_search_form_input_field.mdwn index 281ab48e2..514108fba 100644 --- a/doc/todo/Add_label_to_search_form_input_field.mdwn +++ b/doc/todo/Add_label_to_search_form_input_field.mdwn @@ -51,4 +51,6 @@ The patch below adds a label for the field to improve usability: > element. already works in eg, chromium. However, ikiwiki does not use > html5 yet. --[[Joey]] +>> [[Done]], placeholder added, in html5 mode only. + [[!tag wishlist bugs/html5_support]] diff --git a/templates/googleform.tmpl b/templates/googleform.tmpl index bcf1004a4..f39b46540 100644 --- a/templates/googleform.tmpl +++ b/templates/googleform.tmpl @@ -1,6 +1,7 @@ <form method="get" action="http://www.google.com/search" id="searchform"> <div> <input name="sitesearch" value="<TMPL_VAR URL>" type="hidden" /> - <input name="q" value="" id="searchbox" size="16" maxlength="255" type="text" /> + <input name="q" value="" id="searchbox" size="16" maxlength="255" type="text" + <TMPL_IF HTML5>placeholder="search"</TMPL_IF> /> </div> </form> diff --git a/templates/searchform.tmpl b/templates/searchform.tmpl index afae2ebf5..cb65d124c 100644 --- a/templates/searchform.tmpl +++ b/templates/searchform.tmpl @@ -1,5 +1,6 @@ <form method="get" action="<TMPL_VAR SEARCHACTION>" id="searchform"> <div> -<input type="text" id="searchbox" name="P" value="" size="16" /> +<input type="text" id="searchbox" name="P" value="" size="16" +<TMPL_IF HTML5>placeholder="search"</TMPL_IF> /> </div> </form> -- cgit v1.2.3 From 7517d34da928bb9612c65fcde87cc434b7b7d653 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sun, 2 May 2010 15:09:15 -0400 Subject: update --- doc/bugs/html5_support.mdwn | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) (limited to 'doc') diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 5530b29db..ef0ec1e70 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -30,40 +30,11 @@ HTML5](http://www.w3.org/TR/html5-diff/). > small start at doing that. > > Some of your changes are obvious, like using the new `time` and -> and `article` elements. Others less so, and I'm particularly -> puzzled by these: -> -> * Removing the value="Submit" from the button on the -> commentmoderation form. -> * Removing feedlink.tmpl. What?! -> * Using a `h2` for the header of inlinepage.tmpl and page.tmpl, rather -> than the styled span. Ikiwiki has -> [[a_reason|todo/Option_to_make_title_an_h1?]] for not -> using real `hN` for the header atop a page and here. -> AFAICS, html5 does not invalidate that. -> * Removing Editurl from inlinepage.tmpl actions. I assume -> this is your own preference, needs to be removed from branch -> before I can use it. -> * Removing the pageheader, content, and footer divs -> which are all used by style.css. -> Perhaps, the style sheet needs to be updated to use -> the new elements, like the `footer` and `header`. -> * Removal of the favicon from page.tmpl. Surely html5 supports? -> * Removal of BASEURL from page.tmpl, apparently a mistake. -> * Removal of the `/` between wiki title and page title. -> Personal preference. -> * Removal of `comments` div, which is there to be styled. -> * Why use a `p` rather than the `div` for `addcomments`? -> * Moving the action bar to the bottom of the page. -> Personal preference. -> * Clearly searchquery.tmpl has no business using bad old `center` -> tag, but something should still be done to replace it. -> -> (BTW, it would be helpful if you could re-merge master into your branch -> as it is a bit diverged now.) -> +> and `article` elements. Looks like I can't merge it as-is though +> due to other changes. +> > Other ideas: -> +> > * Use aside for the sidebar? Or for the [[templates/note]] template? > * Use nav for the actionbar > * Use details tag instead of the javascript in the toggle plugin. -- cgit v1.2.3 From d69f6057d1e1787fa3c19cc13c40eb3e9b822283 Mon Sep 17 00:00:00 2001 From: Joey Hess <joey@kitenet.net> Date: Sun, 2 May 2010 15:09:33 -0400 Subject: use html5 semantic markup in page.tmpl This is a first pass, it avoids needing to change style.css except where it refers to tag types. This goes a bit off the rails at the pageheader with its nested header. Semantically, there should be an article around the whole page header, content, and footer. Just as there will be an article around a whole comment or inlined page header, content, and footer. But that will mean changing the css that currently refers to pageheader to refer to the enclosing article instead. --- debian/changelog | 3 +++ doc/style.css | 5 +---- templates/page.tmpl | 49 +++++++++++++++++++++++++------------------------ 3 files changed, 29 insertions(+), 28 deletions(-) (limited to 'doc') diff --git a/debian/changelog b/debian/changelog index c9fc2e657..789fda1ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low * Add parameter to displaytime to specify that it is a pubdate, and in html5 mode, use time tag. * Add placeholder text in search form (in html5 mode only). + * In html5 mode, use all the nice new semantic tags. Care was taken + to not change the id/class named used in the CSS, so only CSS + that refers to tag types needed to be changed. -- Joey Hess <joeyh@debian.org> Sun, 02 May 2010 13:22:50 -0400 diff --git a/doc/style.css b/doc/style.css index 7ffcf9fe2..69c7f80d8 100644 --- a/doc/style.css +++ b/doc/style.css @@ -60,15 +60,12 @@ div.inlinecontent { clear: both; } -.tags { -} - #pageinfo { margin: 1em 0; border-top: 1px solid #000; } -div.tags { +.tags { margin-top: 1em; } diff --git a/templates/page.tmpl b/templates/page.tmpl index 661d4a515..0176b0116 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -5,7 +5,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> </TMPL_IF> <head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<TMPL_IF HTML5><meta charset="utf-8" /><TMPL_ELSE><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></TMPL_IF> <meta http-equiv="Cache-Control" content="must-revalidate" /> <title><TMPL_VAR TITLE> @@ -26,8 +26,8 @@ - - -
    +
    -
    -
    +
    -
    + +
    + - +
    -- cgit v1.2.3 From fa26c67b2a8842a57b551145d25c3719dcea2ccd Mon Sep 17 00:00:00 2001 From: raf Date: Sun, 2 May 2010 19:19:33 +0000 Subject: --- doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn (limited to 'doc') diff --git a/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn b/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn new file mode 100644 index 000000000..2bae57806 --- /dev/null +++ b/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn @@ -0,0 +1,12 @@ +Look at these two blogs: +1) http://ciffer.net/~svend/blog/ +2) http://upsilon.cc/~zack/blog/ + +Well, i set up successfully my blog /i am using inline function in a wiki page) but i have manually to insert blog pos titles and the result is that of blog #2. +Instead i would like to have blog post titles automatically inserted like blog #1 (and they are links too! I want them that way). +I looked in git repo of the two blogs but i couldn't find the answer. +Any help wuold be appreciated. + +Thanks + +Raf -- cgit v1.2.3 From 40aba87965a3d59f59ef2c6a0c6751036cd4a351 Mon Sep 17 00:00:00 2001 From: raf Date: Sun, 2 May 2010 19:20:37 +0000 Subject: --- doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn b/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn index 2bae57806..f5da168a5 100644 --- a/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn +++ b/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn @@ -1,5 +1,7 @@ Look at these two blogs: + 1) http://ciffer.net/~svend/blog/ + 2) http://upsilon.cc/~zack/blog/ Well, i set up successfully my blog /i am using inline function in a wiki page) but i have manually to insert blog pos titles and the result is that of blog #2. -- cgit v1.2.3 From 9480dc44277ad9301f1e1eba5b09990b459e7b26 Mon Sep 17 00:00:00 2001 From: raf Date: Sun, 2 May 2010 19:26:06 +0000 Subject: --- doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn b/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn index f5da168a5..4b5e21979 100644 --- a/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn +++ b/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn @@ -4,11 +4,11 @@ Look at these two blogs: 2) http://upsilon.cc/~zack/blog/ -Well, i set up successfully my blog /i am using inline function in a wiki page) but i have manually to insert blog pos titles and the result is that of blog #2. +Well, i set up successfully my blog (i am using inline function in a wiki page) but i have manually to insert blog pos titles and the result is that of blog #2. Instead i would like to have blog post titles automatically inserted like blog #1 (and they are links too! I want them that way). I looked in git repo of the two blogs but i couldn't find the answer. -Any help wuold be appreciated. +Any help would be really appreciated. -Thanks +Thanks! Raf -- cgit v1.2.3 From 154732dc4235b7b31191975da50d780a2765fa02 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 2 May 2010 16:12:08 -0400 Subject: adapt comment.tmpl to html5 Note that I put comment-header in a
    despite it being below the comment. Using a