From 200d0fca370e113ecd31c38a31ba51c5532c94b6 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Sun, 8 Mar 2009 19:40:47 -0400 Subject: Dump untested updates so that others can have a look (I wont have time for a few weeks). --- doc/todo/mdwn_preview.mdwn | 215 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 215 insertions(+) diff --git a/doc/todo/mdwn_preview.mdwn b/doc/todo/mdwn_preview.mdwn index 3008eb529..bbb105041 100644 --- a/doc/todo/mdwn_preview.mdwn +++ b/doc/todo/mdwn_preview.mdwn @@ -87,3 +87,218 @@ remains. Some CSS to clean up the display of the live WMD preview would be good > I assume that is designed for websites that do not use markdown > internally. Doesn't it have a setting to leave it as markdown? >> Found setting, fixed. --[[Joey]] + +>>> As I noted above, I've been working on the non-markdown page issue. +>>> Below is my a new javascript file that I'm using, and below that a patch +>>> to enable it. This patch makes the normal usage prettier - you get +>>> a side panel with the live preview in it. It also adds a new config +>>> option, `wmd_use101api`, which turns on code that tries to use the +>>> wmd api. At the moment this code doesn't seem to work - moreover the +>>> code that uses the new API dies early, so any code after that point is +>>> completely untested. I will not +>>> get a chance to look at this again soon though, so I thought I'd post +>>> my progress so far. -- [[Will]] + + +Place the following file in `underlays/wmd/wmd-ikiwiki.js`. + +---- + + // This is some code to interface the WMD interface 1.0.1 with IkiWiki + // The WMD interface is planned to change, so this file will likely need + // updating in future. + + if (useWMDinterface) { + wmd_options = { autostart: false, output: "Markdown" }; + var instance = null; + + hook("onload", initwmd); + } else { + var typeSelector = document.getElementById("type"); + + var currentType = getType(typeSelector); + + if (currentType == "mdwn") { + wmd_options = { output: "Markdown" }; + document.getElementById("wmd-preview-container").style.hidden = false; + } else { + wmd_options = { autostart: false }; + document.getElementById("wmd-preview-container").style.hidden = true; + } + } + + function initwmd() { + if (!Attacklab || !Attacklab.wmd) { + alert("WMD hasn't finished loading!"); + return; + } + + var typeSelector = document.getElementById("type"); + + var currentType = getType(typeSelector); + + if (currentType == "mdwn") { + enableWMD(); + } + + typeSelector.onchange=function() { + var docType=getType(this); + + if (docType=="mdwn") { + enableWMD(); + } else { + disableWMD(); + } + } + } + + function getType(typeSelector) + { + if (typeSelector.nodeName.toLowerCase() == 'input') { + return typeSelector.getAttribute('value'); + } else if (typeSelector.nodeName.toLowerCase() == 'selector') { + return typeSelector.options[typeSelector.selectedIndex]; + } + return ""; + } + + function enableWMD() + { + var editContent = document.getElementById("editcontent"); + var previewDiv = document.getElementById("wmd-preview"); + var previewDivContainer = document.getElementById("wmd-preview-container"); + + previewDivContainer.style.hidden = false; + // editContent.style.width = previewDivContainer.style.width; + + /***** build the preview manager *****/ + var panes = {input:editContent, preview:previewDiv, output:null}; + var previewManager = new Attacklab.wmd.previewManager(panes); + + /***** build the editor and tell it to refresh the preview after commands *****/ + var editor = new Attacklab.wmd.editor(editContent,previewManager.refresh); + + // save everything so we can destroy it all later + instance = {ta:textarea, div:previewDiv, ed:editor, pm:previewManager}; + } + + function disableWMD() + { + document.getElementById("wmd-preview-container").style.hidden = true; + + if (instance != null) { + instance.pm.destroy(); + instance.ed.destroy(); + //inst.ta.style.width='100%' + } + instance = null; + } + + +---- + + diff --git a/IkiWiki/Plugin/wmd.pm b/IkiWiki/Plugin/wmd.pm + index 9ddd237..743a0b8 100644 + --- a/IkiWiki/Plugin/wmd.pm + +++ b/IkiWiki/Plugin/wmd.pm + @@ -17,6 +17,13 @@ sub getsetup () { + return + plugin => { + safe => 1, + + rebuild => 1, + + }, + + wmd_use101api => { + + type => "boolean", + + description => "Use the advanced, but unstable, WMD api for markdown preview.", + + safe => 0, + + rebuild => 0, + }, + } + + @@ -24,29 +31,25 @@ sub formbuilder_setup (@) { + my %params=@_; + my $form=$params{form}; + + - return if ! defined $form->field("do"); + + return unless defined $form->field("do"); + + return unless $form->field("do") eq "edit" || + - $form->field("do") eq "create" || + - $form->field("do") eq "comment"; + - + - $form->tmpl_param("wmd_preview", "
\n". + - include_javascript(undef, 1)); + -} + - + -sub include_javascript ($;$) { + - my $page=shift; + - my $absolute=shift; + - + - my $wmdjs=urlto("wmd/wmd.js", $page, $absolute); + - return <<"EOF" + - + - + -EOF + + $form->field("do") eq "create" || + + $form->field("do") eq "comment"; + + + + my $useAPI = $config{wmd_use101api}?'true':'false'; + + my $ikiwikijs = urlto("ikiwiki.js", undef, 1); + + my $wmdIkiwikijs = urlto("wmd-ikiwiki.js", undef, 1); + + my $wmdjs = urlto("wmd.js", undef, 1); + + + + my $previewScripts = <<"EOS"; + + + + + + + + + +EOS + + + + $form->tmpl_param("wmd_preview", $previewScripts); + } + + 1 + diff --git a/doc/style.css b/doc/style.css + index a6e6734..36c2b13 + --- a/doc/style.css + +++ b/doc/style.css + @@ -76,9 +76,16 @@ div.tags { + float: right; + } + + +/* + #editcontent { + width: 100%; + } + +*/ + + + +#wmd-preview-container { + + width: 49%; + + float: right; + +} + + img { + border-style: none; + diff --git a/templates/editpage.tmpl b/templates/editpage.tmpl + index b1cf015..1d2f080 100644 + --- a/templates/editpage.tmpl + +++ b/templates/editpage.tmpl + @@ -15,6 +15,14 @@ Page type: + + + + + + +
+ +
+ +Live preview: + +
+ +
+ +
+ +
+
+ + Optional comment about this change:
-- cgit v1.2.3 From a948f6d275668236a2c005f14fcf713f9933d9d7 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Mon, 9 Mar 2009 08:39:42 -0400 Subject: Update the javascript - this now turns things on and off based on the type. It still has some display issues. --- doc/todo/mdwn_preview.mdwn | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/todo/mdwn_preview.mdwn b/doc/todo/mdwn_preview.mdwn index bbb105041..c20314c28 100644 --- a/doc/todo/mdwn_preview.mdwn +++ b/doc/todo/mdwn_preview.mdwn @@ -120,10 +120,10 @@ Place the following file in `underlays/wmd/wmd-ikiwiki.js`. if (currentType == "mdwn") { wmd_options = { output: "Markdown" }; - document.getElementById("wmd-preview-container").style.hidden = false; + document.getElementById("wmd-preview-container").style.display = 'none'; } else { wmd_options = { autostart: false }; - document.getElementById("wmd-preview-container").style.hidden = true; + document.getElementById("wmd-preview-container").style.display = 'block'; } } @@ -138,7 +138,7 @@ Place the following file in `underlays/wmd/wmd-ikiwiki.js`. var currentType = getType(typeSelector); if (currentType == "mdwn") { - enableWMD(); + window.setTimeout(enableWMD,10); } typeSelector.onchange=function() { @@ -156,8 +156,9 @@ Place the following file in `underlays/wmd/wmd-ikiwiki.js`. { if (typeSelector.nodeName.toLowerCase() == 'input') { return typeSelector.getAttribute('value'); - } else if (typeSelector.nodeName.toLowerCase() == 'selector') { - return typeSelector.options[typeSelector.selectedIndex]; + } else if (typeSelector.nodeName.toLowerCase() == 'select') { + return typeSelector.value; + // return typeSelector.options[typeSelector.selectedIndex].innerText; } return ""; } @@ -168,7 +169,7 @@ Place the following file in `underlays/wmd/wmd-ikiwiki.js`. var previewDiv = document.getElementById("wmd-preview"); var previewDivContainer = document.getElementById("wmd-preview-container"); - previewDivContainer.style.hidden = false; + previewDivContainer.style.display = 'block'; // editContent.style.width = previewDivContainer.style.width; /***** build the preview manager *****/ @@ -179,17 +180,17 @@ Place the following file in `underlays/wmd/wmd-ikiwiki.js`. var editor = new Attacklab.wmd.editor(editContent,previewManager.refresh); // save everything so we can destroy it all later - instance = {ta:textarea, div:previewDiv, ed:editor, pm:previewManager}; + instance = {ta:editContent, div:previewDiv, ed:editor, pm:previewManager}; } function disableWMD() { - document.getElementById("wmd-preview-container").style.hidden = true; + document.getElementById("wmd-preview-container").style.display = 'none'; if (instance != null) { instance.pm.destroy(); instance.ed.destroy(); - //inst.ta.style.width='100%' + // inst.ta.style.width='100%' } instance = null; } -- cgit v1.2.3 From 7de791ad8e5f4e9aeacdadc77be56e46cfae2bf8 Mon Sep 17 00:00:00 2001 From: "http://madduck.net/" Date: Mon, 9 Mar 2009 11:21:36 -0400 Subject: --- doc/bugs/Git:_web_commit_message_not_utf-8.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/bugs/Git:_web_commit_message_not_utf-8.mdwn diff --git a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn new file mode 100644 index 000000000..71ccff3a3 --- /dev/null +++ b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn @@ -0,0 +1,13 @@ +The message generated for web commits: + +> web commit by madduck + +is not utf-8 encoded before passed to Git (which uses utf-8 as default encoding for commit messages). This causes a wrongly-encoded log entry, and makes ikiwiki spew warnings as it creates `recentchanges`: + + utf8 "\xF6" does not map to Unicode at /usr/share/perl5/IkiWiki/Rcs/git.pm line 36, <$OUT> line 57. + Malformed UTF-8 character (unexpected non-continuation byte 0x6e, immediately after start byte 0xf6) in pattern match (m//) at /usr/share/perl5/IkiWiki/Rcs/git.pm line 393. + utf8 "\xF6" does not map to Unicode at /usr/share/perl5/IkiWiki/Rcs/git.pm line 36, <$OUT> line 5. + +(This is version 2.53.3~bpo40+1 for lack of a newer backport for sarge) + +Please make sure that commit messages for Git are always utf-8. -- cgit v1.2.3 From 0158ab41dae373f9c8a687602516887ae4761292 Mon Sep 17 00:00:00 2001 From: "http://madduck.net/" Date: Mon, 9 Mar 2009 11:22:26 -0400 Subject: actually use utf-8 --- doc/bugs/Git:_web_commit_message_not_utf-8.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn index 71ccff3a3..e0a756f93 100644 --- a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn +++ b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn @@ -1,6 +1,6 @@ The message generated for web commits: -> web commit by madduck +> web commit by mädduck is not utf-8 encoded before passed to Git (which uses utf-8 as default encoding for commit messages). This causes a wrongly-encoded log entry, and makes ikiwiki spew warnings as it creates `recentchanges`: -- cgit v1.2.3 From b978a5773ea7a363d9588f6825ac5e47e32d4453 Mon Sep 17 00:00:00 2001 From: mädduck Date: Mon, 9 Mar 2009 13:50:49 -0400 Subject: --- doc/bugs/Git:_web_commit_message_not_utf-8.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn index e0a756f93..25a94711c 100644 --- a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn +++ b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn @@ -11,3 +11,5 @@ is not utf-8 encoded before passed to Git (which uses utf-8 as default encoding (This is version 2.53.3~bpo40+1 for lack of a newer backport for sarge) Please make sure that commit messages for Git are always utf-8. + +This is a change by user `mädduck` to trigger the error. -- cgit v1.2.3 From 793e9332c3fc6db6733dce6783d6ac9c8058bb8d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Mar 2009 13:52:51 -0400 Subject: avoid uninitialized value warnings --- IkiWiki/Plugin/404.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/404.pm b/IkiWiki/Plugin/404.pm index 5550ea7d1..bae9e15d1 100644 --- a/IkiWiki/Plugin/404.pm +++ b/IkiWiki/Plugin/404.pm @@ -67,7 +67,8 @@ sub cgi_page_from_404 ($$$) { sub cgi ($) { my $cgi=shift; - if ($ENV{REDIRECT_STATUS} eq '404') { + if (exists $ENV{REDIRECT_STATUS} && + $ENV{REDIRECT_STATUS} eq '404') { my $page = cgi_page_from_404($ENV{REDIRECT_URL}, $config{url}, $config{usedirs}); IkiWiki::Plugin::goto::cgi_goto($cgi, $page); -- cgit v1.2.3 From 7bd0d536442493a8898981a8a784bf16126085c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Mar 2009 14:01:40 -0400 Subject: git: Fix utf-8 encoding of author names. I guess what's happening here is that since the name is passed to git via an environment variable, perl's normal utf-8 IO layer stuff doesn't work. So we have to explicitly decode the string from perl's internal representation into utf-8. --- IkiWiki/Plugin/git.pm | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 042c69f5a..12f3a74cb 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -447,7 +447,7 @@ sub rcs_commit_staged ($$$) { # Set the commit author and email to the web committer. my %env=%ENV; if (defined $user || defined $ipaddr) { - my $u=defined $user ? $user : $ipaddr; + my $u=encode_utf8(defined $user ? $user : $ipaddr); $ENV{GIT_AUTHOR_NAME}=$u; $ENV{GIT_AUTHOR_EMAIL}="$u\@web"; } diff --git a/debian/changelog b/debian/changelog index c66db85a2..a7e7544c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ikiwiki (3.08) UNRELEASED; urgency=low + + * git: Fix utf-8 encoding of author names. + + -- Joey Hess Mon, 09 Mar 2009 14:00:21 -0400 + ikiwiki (3.07) unstable; urgency=low * Updated German translation (Kai Wasserbäch). Closes: #518377 -- cgit v1.2.3 From 4ac0b2953131d7a53562ab8918c8e5a49952d8ac Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Mar 2009 14:18:55 -0400 Subject: git: Manually decode git output from utf-8, avoids warning messages on invalidly encoded output. --- IkiWiki/Plugin/git.pm | 12 +++++++----- debian/changelog | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 12f3a74cb..b386ab71b 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -136,14 +136,16 @@ sub safe_git (&@) { } # In parent. + # git output is probably utf-8 encoded, but may contain + # other encodings or invalidly encoded stuff. So do not rely + # on the normal utf-8 IO layer, decode it by hand. + binmode($OUT); + my @lines; while (<$OUT>) { + $_=decode_utf8($_, 0); + chomp; - - # check for invalid utf-8, and toss it back to avoid crashes - if (! utf8::valid($_)) { - $_=encode_utf8($_); - } push @lines, $_; } diff --git a/debian/changelog b/debian/changelog index a7e7544c6..77b5d9fa6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ikiwiki (3.08) UNRELEASED; urgency=low * git: Fix utf-8 encoding of author names. + * git: Manually decode git output from utf-8, avoids + warning messages on invalidly encoded output. -- Joey Hess Mon, 09 Mar 2009 14:00:21 -0400 -- cgit v1.2.3 From e62b30c32168e9cabd72b27bafdf5554d581a2f7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Mar 2009 14:30:27 -0400 Subject: fixed --- doc/bugs/Git:_web_commit_message_not_utf-8.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn index 25a94711c..08247dded 100644 --- a/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn +++ b/doc/bugs/Git:_web_commit_message_not_utf-8.mdwn @@ -13,3 +13,5 @@ is not utf-8 encoded before passed to Git (which uses utf-8 as default encoding Please make sure that commit messages for Git are always utf-8. This is a change by user `mädduck` to trigger the error. + +> [[Fixed|done]] both on the commit and log sides. --[[Joey]] -- cgit v1.2.3 From 50871cf4bd151d2d271128e70a89ebf012f80779 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 11 Mar 2009 06:26:25 -0400 Subject: apache vs. passwordauth: done a bit more research --- doc/plugins/passwordauth/discussion.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/plugins/passwordauth/discussion.mdwn b/doc/plugins/passwordauth/discussion.mdwn index 3362ae7d2..e5ea1b922 100644 --- a/doc/plugins/passwordauth/discussion.mdwn +++ b/doc/plugins/passwordauth/discussion.mdwn @@ -65,3 +65,15 @@ actually be the way to go. IMHO, the Perl sections idea is the easiest to setup, but on the long run, I'd prefer ikiwiki to optionnally use a userdb storage backend supported at least by Apache and lighttpd. --[[intrigeri]] + +Tons of CPAN modules may help, but most of them are specific to =mod_perl=, +and AFAIK, ikiwiki is generally not run with =mod_perl=. It's not clear to me +wether these modules depend on the webapp to be run with =mod_perl= set +as the script handler, or only on =mod_perl= to be installed and loaded. + +* CPAN's =Apache::AuthenHook= allows to plug arbitrary Perl handlers as + Apache authentication providers. +* CPAN's =Apache::Authen::Program= (=mod_perl=) +* [http://www.openfusion.com.au/labs/mod_auth_tkt/](mod_auth_tkt) along with CPAN's + =Apache::AuthTkt= +--[[intrigeri]] -- cgit v1.2.3 From 12432198a68c9fb391c3ec6d284fb152f0fc3d17 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 11 Mar 2009 06:27:41 -0400 Subject: formatting --- doc/plugins/passwordauth/discussion.mdwn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/plugins/passwordauth/discussion.mdwn b/doc/plugins/passwordauth/discussion.mdwn index e5ea1b922..672970c21 100644 --- a/doc/plugins/passwordauth/discussion.mdwn +++ b/doc/plugins/passwordauth/discussion.mdwn @@ -66,14 +66,14 @@ easiest to setup, but on the long run, I'd prefer ikiwiki to optionnally use a userdb storage backend supported at least by Apache and lighttpd. --[[intrigeri]] -Tons of CPAN modules may help, but most of them are specific to =mod_perl=, -and AFAIK, ikiwiki is generally not run with =mod_perl=. It's not clear to me -wether these modules depend on the webapp to be run with =mod_perl= set -as the script handler, or only on =mod_perl= to be installed and loaded. +Tons of CPAN modules may help, but most of them are specific to `mod_perl`, +and AFAIK, ikiwiki is generally not run with `mod_perl`. It's not clear to me +wether these modules depend on the webapp to be run with `mod_perl` set +as the script handler, or only on `mod_perl` to be installed and loaded. -* CPAN's =Apache::AuthenHook= allows to plug arbitrary Perl handlers as +* CPAN's `Apache::AuthenHook` allows to plug arbitrary Perl handlers as Apache authentication providers. -* CPAN's =Apache::Authen::Program= (=mod_perl=) +* CPAN's `Apache::Authen::Program` (`mod_perl`) * [http://www.openfusion.com.au/labs/mod_auth_tkt/](mod_auth_tkt) along with CPAN's - =Apache::AuthTkt= + `Apache::AuthTkt` --[[intrigeri]] -- cgit v1.2.3 From 5f40c62359d839f89cb251d3daea32daf60965ba Mon Sep 17 00:00:00 2001 From: "http://people.ee.ethz.ch/~andrmuel/openid/" Date: Fri, 13 Mar 2009 09:00:41 -0400 Subject: added biometrische-ausweise.ch --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 8dea61f6a..cf454f8d2 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -44,6 +44,7 @@ Projects & Organizations * [St Hugh of Lincoln Primary School in Surrey](http://hugh.vm.bytemark.co.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. +* [A webpage about biometric travel documents (in german)](http://biometrische-ausweise.ch), which uses an Ikiwiki with a subversion repository. Personal sites and blogs ======================== -- cgit v1.2.3 From f10f9e6f73f07f991c21c321b6b8c870fc501fe2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 13 Mar 2009 16:27:24 -0400 Subject: unknown option wording tweak Because getopt::long is used in passthrough mode, if a known option like --wikiname that needs a parameter is specified w/o the parameter, it will not be processed, and passed on through. So in this case the "unknown option" message is innaccurate. Make it slightly better by noting that the problem can be a missing parameter. --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index f580d1f0d..a876bbb44 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -533,7 +533,7 @@ sub loadplugins () { run_hooks(getopt => sub { shift->() }); if (grep /^-/, @ARGV) { - print STDERR "Unknown option: $_\n" + print STDERR "Unknown option (or missing parameter): $_\n" foreach grep /^-/, @ARGV; usage(); } -- cgit v1.2.3 From e95cee757a67c55eb15a1d4a3a323a4052a7c30b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 13 Mar 2009 16:31:27 -0400 Subject: add missing parameters --- doc/usage.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 55ff17e94..e2fe85ff6 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -106,11 +106,11 @@ These options configure the wiki. Note that [[plugins]] can add additional configuration options of their own. All of these options and more besides can also be configured using a setup file. -* --wikiname +* --wikiname name The name of the wiki, default is "wiki". -* --templatedir +* --templatedir dir Specify the directory that the page [[templates|wikitemplates]] are stored in. Default is `/usr/share/ikiwiki/templates`, or another location as configured at @@ -122,7 +122,7 @@ also be configured using a setup file. ikiwiki. Old versions of templates do not always work with new ikiwiki versions. -* --underlaydir +* --underlaydir dir Specify the directory that is used to underlay the source directory. Source files will be taken from here unless overridden by a file in the -- cgit v1.2.3 From 0612e5a6031b16eb0f70830a9830be9f318ae375 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Sun, 15 Mar 2009 19:33:16 +0000 Subject: managing todo lists: useful? --- doc/forum/managing_todo_lists.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/forum/managing_todo_lists.mdwn diff --git a/doc/forum/managing_todo_lists.mdwn b/doc/forum/managing_todo_lists.mdwn new file mode 100644 index 000000000..238b000f1 --- /dev/null +++ b/doc/forum/managing_todo_lists.mdwn @@ -0,0 +1,4 @@ +I keep some TODO lists on ikiwiki pages. I'm half-tempted to write a plugin +to make ticking items off and adding items easier via the web interface. I'm +aware though that this is not really what ikiwiki is designed for. Would +anyone else find this useful? -- [[users/jon]] -- cgit v1.2.3 From c176dcde982dfa3095cf7c2d05db4cb71c1713e5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 Mar 2009 17:39:14 -0400 Subject: Fix bug that caused weird things to appear as page types. The problem was introduced by the recent noextension patches. Object autovivification caused junk to get into %htmlize, and all keys of that showed up as page types. --- IkiWiki.pm | 6 ++++-- debian/changelog | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index a876bbb44..ee07258ec 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -639,8 +639,10 @@ sub pagetype ($) { if ($file =~ /\.([^.]+)$/) { return $1 if exists $hooks{htmlize}{$1}; } - elsif ($hooks{htmlize}{basename($file)}{noextension}) { - return basename($file); + my $base=basename($file); + if (exists $hooks{htmlize}{$base} && + $hooks{htmlize}{$base}{noextension}) { + return $base; } return; } diff --git a/debian/changelog b/debian/changelog index 77b5d9fa6..2c9d1a75a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ikiwiki (3.08) UNRELEASED; urgency=low * git: Fix utf-8 encoding of author names. * git: Manually decode git output from utf-8, avoids warning messages on invalidly encoded output. + * Fix bug that caused weird things to appear as page types. -- Joey Hess Mon, 09 Mar 2009 14:00:21 -0400 -- cgit v1.2.3 From 42dddf6a3f0c548d25add20634b3c19895821094 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 Mar 2009 18:24:57 -0400 Subject: releasing version 3.08 --- debian/changelog | 4 ++-- po/ikiwiki.pot | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2c9d1a75a..a8f47bfc7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -ikiwiki (3.08) UNRELEASED; urgency=low +ikiwiki (3.08) unstable; urgency=low * git: Fix utf-8 encoding of author names. * git: Manually decode git output from utf-8, avoids warning messages on invalidly encoded output. * Fix bug that caused weird things to appear as page types. - -- Joey Hess Mon, 09 Mar 2009 14:00:21 -0400 + -- Joey Hess Sun, 15 Mar 2009 17:54:47 -0400 ikiwiki (3.07) unstable; urgency=low diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index ffe2d09e3..94ea19f66 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-03-08 19:02-0400\n" +"POT-Creation-Date: 2009-03-15 17:56-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:1209 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1211 msgid "Error" msgstr "" @@ -327,18 +327,18 @@ msgstr "" msgid "fortune failed" msgstr "" -#: ../IkiWiki/Plugin/git.pm:624 ../IkiWiki/Plugin/git.pm:642 +#: ../IkiWiki/Plugin/git.pm:626 ../IkiWiki/Plugin/git.pm:644 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:664 +#: ../IkiWiki/Plugin/git.pm:666 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:668 +#: ../IkiWiki/Plugin/git.pm:670 msgid "you are not allowed to change file modes" msgstr "" @@ -1018,12 +1018,12 @@ msgstr "" msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1192 +#: ../IkiWiki.pm:1194 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1730 +#: ../IkiWiki.pm:1732 msgid "yes" msgstr "" -- cgit v1.2.3 From 287be196b4f3168003e3274a7bcaea9081f61623 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 Mar 2009 18:25:52 -0400 Subject: add news item for ikiwiki 3.08 --- doc/news/version_3.07.mdwn | 10 ---------- doc/news/version_3.08.mdwn | 6 ++++++ 2 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 doc/news/version_3.07.mdwn create mode 100644 doc/news/version_3.08.mdwn diff --git a/doc/news/version_3.07.mdwn b/doc/news/version_3.07.mdwn deleted file mode 100644 index fbd448ddc..000000000 --- a/doc/news/version_3.07.mdwn +++ /dev/null @@ -1,10 +0,0 @@ -ikiwiki 3.07 released with [[!toggle text="these changes"]] -[[!toggleable text=""" - * Updated German translation (Kai Wasserbäch). Closes: #[518377](http://bugs.debian.org/518377) - * Updated French translation (Jean-Luc Coulon). Closes: #[518510](http://bugs.debian.org/518510) - * wmd: New plugin contributed by William Uther to support the WMD - Wysiwym markdown editor. - * smiley: Avoid infinite loop in smiley expansion triggered - by the template scan mode change in version 3.05. Closes: #[518805](http://bugs.debian.org/518805) - * template: When loading a template in scan mode, let preprocess - know it only needs to scan."""]] \ No newline at end of file diff --git a/doc/news/version_3.08.mdwn b/doc/news/version_3.08.mdwn new file mode 100644 index 000000000..06d795c23 --- /dev/null +++ b/doc/news/version_3.08.mdwn @@ -0,0 +1,6 @@ +ikiwiki 3.08 released with [[!toggle text="these changes"]] +[[!toggleable text=""" + * git: Fix utf-8 encoding of author names. + * git: Manually decode git output from utf-8, avoids + warning messages on invalidly encoded output. + * Fix bug that caused weird things to appear as page types."""]] \ No newline at end of file -- cgit v1.2.3 From ccf422e9904110f564f75ae6dac7813d2fbebeea Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 16 Mar 2009 11:05:56 +0000 Subject: further thoughts --- doc/forum/managing_todo_lists.mdwn | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/forum/managing_todo_lists.mdwn b/doc/forum/managing_todo_lists.mdwn index 238b000f1..b55420aca 100644 --- a/doc/forum/managing_todo_lists.mdwn +++ b/doc/forum/managing_todo_lists.mdwn @@ -2,3 +2,32 @@ I keep some TODO lists on ikiwiki pages. I'm half-tempted to write a plugin to make ticking items off and adding items easier via the web interface. I'm aware though that this is not really what ikiwiki is designed for. Would anyone else find this useful? -- [[users/jon]] + +---- + +My subsequent thoughts about how to approach this are two-fold. + +Firstly, a filetype for todo lists, probably OPML, but I haven't looked to see +if there is something more suitable. A plugin that converts this source into a +traditional page output, i.e. a DOM tree of ul or ol and li elements. + +Secondly, some magic javascript to make editing the list via the web page +more interactive: add items, strike items out, reorder items etc., without +round-tripping to the cgi for each operation. + +Finally, a mechanism whereby the changes made to the page live can be +committed back to the repository: + + * ...perhaps the input → output conversion is reversible, and the HTML DOM + representing the list can be transformed back into the source and submitted + to the cgi like a regular edit: issues include the result of other + postprocessing: templates, wikilinks, etc. + * perhaps an embedded copy of the source is included in the output and the + javascript operates on that in tandem with the static copy + * perhaps the "output" is generated live by the JS at view time (with maybe + a plugin-generated rendered output for non JS environments) + +I envisage a button called "commit changes" appearing once some changes are +made that submits the changes to the CGI, perhaps via a back channel. I'm not +sure how to handle embeds or challenges from the CGI such as a login challenge +(maybe the back channel would not be necessary in the first cut). -- cgit v1.2.3 From 57402750bf2530b0a31f2ef04e187dfd013c55b3 Mon Sep 17 00:00:00 2001 From: IanRomanick Date: Tue, 17 Mar 2009 04:13:36 -0400 Subject: --- doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn diff --git a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn new file mode 100644 index 000000000..c7a3f9b8b --- /dev/null +++ b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn @@ -0,0 +1,3 @@ +When I put the following !inline in my index.mdwn, it generate a file called index/graphics.rss. However, the link in the RSS button is to graphics.rss (i.e., not in the index/ directory). + +[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]] -- cgit v1.2.3 From f2958327eca0a90f4741b742a1c253024b3c2ef0 Mon Sep 17 00:00:00 2001 From: IanRomanick Date: Tue, 17 Mar 2009 04:15:35 -0400 Subject: --- doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn diff --git a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn new file mode 100644 index 000000000..7ab76f1c0 --- /dev/null +++ b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn @@ -0,0 +1,3 @@ +When I put the following !inline in my index.mdwn, it generate a file called index/graphics.rss. However, the link in the RSS button is to graphics.rss (i.e., not in the index/ directory). + +\[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]] -- cgit v1.2.3 From 05647b5df9eab33b0380daf574a804b87f229070 Mon Sep 17 00:00:00 2001 From: IanRomanick Date: Tue, 17 Mar 2009 04:16:13 -0400 Subject: removed --- doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn diff --git a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn deleted file mode 100644 index c7a3f9b8b..000000000 --- a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -When I put the following !inline in my index.mdwn, it generate a file called index/graphics.rss. However, the link in the RSS button is to graphics.rss (i.e., not in the index/ directory). - -[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]] -- cgit v1.2.3 From 5dd0993f644f49ae7f4d9b20a6a6a8ed9ba2adc4 Mon Sep 17 00:00:00 2001 From: IanRomanick Date: Tue, 17 Mar 2009 04:17:44 -0400 Subject: --- doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn index 7ab76f1c0..1653e0b02 100644 --- a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn +++ b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn @@ -1,3 +1,5 @@ +[[!meta title="feedfile does the wrong thing from index"]] + When I put the following !inline in my index.mdwn, it generate a file called index/graphics.rss. However, the link in the RSS button is to graphics.rss (i.e., not in the index/ directory). -\[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]] +`\[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]]` -- cgit v1.2.3 From 35460e3153286381a6019e5afd46b2880a95cb88 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 17 Mar 2009 21:22:26 +0100 Subject: new wishlist item, patch included --- doc/todo/natural_sorting.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/todo/natural_sorting.mdwn diff --git a/doc/todo/natural_sorting.mdwn b/doc/todo/natural_sorting.mdwn new file mode 100644 index 000000000..84f35c5da --- /dev/null +++ b/doc/todo/natural_sorting.mdwn @@ -0,0 +1,16 @@ +[[!tag wishlist]] +[[!tag patch]] + +the inline plugin's sorting is plain lexical, thich may not be appropriate for +page titles if they have numeric components. the +[Sort::Naturally](http://search.cpan.org/dist/Sort-Naturally/) perl module +provides an algorithm for that. + +there is a +[patch](http://github.com/github076986099/ikiwiki/commit/25617577746dc1e4ab5ab69aa70d633daddcc01b) +attached that makes the [[plugins/inline]] plugin use Sort::Naturally if sort +is set to "title_natural". + +the current patch uses `require Sort::Naturally`, so +[libsort-naturally-perl](http://packages.debian.org/libsort-naturally-perl) +does not become a dependency; it might be worth suggesting, though. -- cgit v1.2.3 From 6736664672f5de51b2d1b0da04e7298a76740b89 Mon Sep 17 00:00:00 2001 From: "http://realid.csie.org/adam" Date: Wed, 18 Mar 2009 01:55:10 -0400 Subject: --- doc/sandbox.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 14f72f4ad..52f5f082a 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -90,3 +90,5 @@ But, of course, rsync is better. ---- Let's see what happens... ~~ + +測試的啦 -- cgit v1.2.3 From e8c4f72a24d56ab5080985c91894e972e03f3458 Mon Sep 17 00:00:00 2001 From: "http://realid.csie.org/adam" Date: Wed, 18 Mar 2009 02:17:30 -0400 Subject: poll vote (Accept both) --- doc/news/openid.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index 45414142c..f5c41582b 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 60 "Accept only OpenID for logins" 18 "Accept only password logins" 35 "Accept both"]] +[[!poll 60 "Accept only OpenID for logins" 18 "Accept only password logins" 36 "Accept both"]] -- cgit v1.2.3 From 69ca373e75aa290b283a3151ed00b3e6187a519d Mon Sep 17 00:00:00 2001 From: "134.226.112.43" <134.226.112.43@web> Date: Thu, 19 Mar 2009 06:50:28 -0400 Subject: poll vote (Accept only OpenID for logins) --- doc/news/openid.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index f5c41582b..c2a871f0a 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 60 "Accept only OpenID for logins" 18 "Accept only password logins" 36 "Accept both"]] +[[!poll 61 "Accept only OpenID for logins" 18 "Accept only password logins" 36 "Accept both"]] -- cgit v1.2.3 From 888e67bf4e44b66dcecde07395a50135e19b911d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 14:03:38 -0400 Subject: github error and comment --- doc/todo/natural_sorting.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/todo/natural_sorting.mdwn b/doc/todo/natural_sorting.mdwn index 84f35c5da..2215d533e 100644 --- a/doc/todo/natural_sorting.mdwn +++ b/doc/todo/natural_sorting.mdwn @@ -14,3 +14,9 @@ is set to "title_natural". the current patch uses `require Sort::Naturally`, so [libsort-naturally-perl](http://packages.debian.org/libsort-naturally-perl) does not become a dependency; it might be worth suggesting, though. + +> Great, but all I get from the github link is a server error page, so I +> have not figured out how to merge the patch. --[[Joey]] +> +> See also: [[inline:_numerical_ordering_by_title]] (I probably prefer your +> approach..) --[[Joey]] -- cgit v1.2.3 From 55b83cb7bd1cd7c60bb45dc22c3745dd80a63fed Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 17 Mar 2009 20:19:11 +0100 Subject: implement sort=title_natural for inline adds a new sorting order, title_natural, that uses Sort::Naturally's ncmp function to provide better sorting for inlines --- IkiWiki/Plugin/inline.pm | 4 ++++ doc/ikiwiki/directive/inline.mdwn | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 2205ebffc..a89e827c1 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -194,6 +194,10 @@ sub preprocess_inline (@) { if (exists $params{sort} && $params{sort} eq 'title') { @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list; } + elsif (exists $params{sort} && $params{sort} eq 'title_natural') { + require Sort::Naturally; + @list=sort { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) } @list; + } elsif (exists $params{sort} && $params{sort} eq 'mtime') { @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list; } diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index 40670e1e7..3f9a9ede5 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -87,7 +87,10 @@ Here are some less often needed parameters: 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. + title, and "mtime" sorts most recently modified pages first. If + [Sort::Naturally](http://search.cpan.org/dist/Sort-Naturally/lib/Sort/Naturally.pm) + 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"). * `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. -- cgit v1.2.3 From bb258b56b29cb01f27bdc0dfd0bced55a88574ed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 15:35:57 -0400 Subject: avoid crashing if Sort::Naturally is not installed --- IkiWiki/Plugin/inline.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index a89e827c1..218fd7515 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -195,7 +195,10 @@ sub preprocess_inline (@) { @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list; } elsif (exists $params{sort} && $params{sort} eq 'title_natural') { - require Sort::Naturally; + 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; } elsif (exists $params{sort} && $params{sort} eq 'mtime') { -- cgit v1.2.3 From 86956b3392f7e768fa8f527a0b3a4b7d1a080aef Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 15:36:31 -0400 Subject: title_natural patch merged --- debian/changelog | 7 +++++++ doc/todo/inline:_numerical_ordering_by_title.mdwn | 2 ++ doc/todo/natural_sorting.mdwn | 5 ++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index a8f47bfc7..8266afa09 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.09) UNRELEASED; urgency=low + + * inline: Add title_natural sort order, using Sort::Naturally + (chrysn) + + -- Joey Hess Thu, 19 Mar 2009 15:32:49 -0400 + ikiwiki (3.08) unstable; urgency=low * git: Fix utf-8 encoding of author names. diff --git a/doc/todo/inline:_numerical_ordering_by_title.mdwn b/doc/todo/inline:_numerical_ordering_by_title.mdwn index 3f6c8b598..3d7424b3f 100644 --- a/doc/todo/inline:_numerical_ordering_by_title.mdwn +++ b/doc/todo/inline:_numerical_ordering_by_title.mdwn @@ -1,6 +1,8 @@ Could you please add numerical ordering by title to [[inline|plugins/inline]] plugin? Now I can do only alphabetical order by title, but sometime it's not enough. +> Implemented, see [[natural_sorting]] [[!tag done]] --[[Joey]] + BTW, it seems that ordering by title is rather ordering by filename of page. For me "title" means title of page I can set using `title` parameter of [[meta|plugins/meta]] plugin :) diff --git a/doc/todo/natural_sorting.mdwn b/doc/todo/natural_sorting.mdwn index 2215d533e..faa523043 100644 --- a/doc/todo/natural_sorting.mdwn +++ b/doc/todo/natural_sorting.mdwn @@ -15,8 +15,7 @@ the current patch uses `require Sort::Naturally`, so [libsort-naturally-perl](http://packages.debian.org/libsort-naturally-perl) does not become a dependency; it might be worth suggesting, though. -> Great, but all I get from the github link is a server error page, so I -> have not figured out how to merge the patch. --[[Joey]] -> > See also: [[inline:_numerical_ordering_by_title]] (I probably prefer your > approach..) --[[Joey]] + +> [[applied|done]] -- cgit v1.2.3 From a1c8520ce8798dcd2d6b16a59da93afbd4bbf86b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 16:01:23 -0400 Subject: inline: Fix urls to feed when feedfile is used on an index page. It would be better to use urlto() here, but will_render has not yet been called on the feed files at this point, so it won't work. (And reorganizing so it can be is tricky.) --- IkiWiki/Plugin/inline.pm | 4 ++-- debian/changelog | 1 + doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 218fd7515..9d7d4b0fd 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -281,8 +281,8 @@ sub preprocess_inline (@) { } } - my $rssurl=basename($feedbase."rss".$feednum) if $feeds && $rss; - my $atomurl=basename($feedbase."atom".$feednum) if $feeds && $atom; + my $rssurl=abs2rel($feedbase."rss".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $rss; + my $atomurl=abs2rel($feedbase."atom".$feednum, dirname(htmlpage($params{destpage}))) if $feeds && $atom; my $ret=""; diff --git a/debian/changelog b/debian/changelog index 8266afa09..06707a83c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ikiwiki (3.09) UNRELEASED; urgency=low * inline: Add title_natural sort order, using Sort::Naturally (chrysn) + * inline: Fix urls to feed when feedfile is used on an index page. -- Joey Hess Thu, 19 Mar 2009 15:32:49 -0400 diff --git a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn index 1653e0b02..6b8781a8c 100644 --- a/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn +++ b/doc/bugs/feedfile_does_the_wrong_thing_from_index.mdwn2.mdwn @@ -3,3 +3,5 @@ When I put the following !inline in my index.mdwn, it generate a file called index/graphics.rss. However, the link in the RSS button is to graphics.rss (i.e., not in the index/ directory). `\[[!inline pages="link(tags/graphics) and ./posts/* and !*/Discussion" show="10" feedfile=graphics feedonly=yes]]` + +[[done]] --[[Joey]] -- cgit v1.2.3 From 0d456fee641e7022fa2842b0d4ac1235f62b23dc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 16:07:33 -0400 Subject: comment --- doc/forum/managing_todo_lists.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/forum/managing_todo_lists.mdwn b/doc/forum/managing_todo_lists.mdwn index b55420aca..b8360b253 100644 --- a/doc/forum/managing_todo_lists.mdwn +++ b/doc/forum/managing_todo_lists.mdwn @@ -31,3 +31,7 @@ I envisage a button called "commit changes" appearing once some changes are made that submits the changes to the CGI, perhaps via a back channel. I'm not sure how to handle embeds or challenges from the CGI such as a login challenge (maybe the back channel would not be necessary in the first cut). + +> You might look at the [[plugins/hnb]] plugin. HNB supports checklists. +> There's not a fancy web interface, but the hnb command-line program can +> be used to edit them. --[[Joey]] -- cgit v1.2.3 From 8340715068844c27bd0142c187796d0e20731eed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 16:11:19 -0400 Subject: remove biometrische-ausweise.ch, no evidence this site uses ikiwiki I apologize if I'm mistaken, but I can find no evidence this site uses ikiwiki at all. If you are using ikiwiki somehow, I'd be interested to know how. --- doc/ikiwikiusers.mdwn | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index cf454f8d2..8dea61f6a 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -44,7 +44,6 @@ Projects & Organizations * [St Hugh of Lincoln Primary School in Surrey](http://hugh.vm.bytemark.co.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. -* [A webpage about biometric travel documents (in german)](http://biometrische-ausweise.ch), which uses an Ikiwiki with a subversion repository. Personal sites and blogs ======================== -- cgit v1.2.3 From 78845566b537517948713b07938d0eeec9bb5e47 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 16:14:14 -0400 Subject: add Sort::Naturally to suggests and use cpan link --- Bundle/IkiWiki/Extras.pm | 1 + debian/control | 2 +- doc/ikiwiki/directive/inline.mdwn | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Bundle/IkiWiki/Extras.pm b/Bundle/IkiWiki/Extras.pm index 582d4a966..40b36e7c8 100644 --- a/Bundle/IkiWiki/Extras.pm +++ b/Bundle/IkiWiki/Extras.pm @@ -35,6 +35,7 @@ Text::WikiCreole Term::ReadLine::Gnu HTML::Tree Authen::Passphrase +Sort::Naturally =head1 AUTHOR diff --git a/debian/control b/debian/control index 65b80138b..8f48bf98a 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ Package: ikiwiki Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libtext-markdown-perl | markdown, libhtml-scrubber-perl, libhtml-template-perl, libhtml-parser-perl, liburi-perl Recommends: gcc | c-compiler, libc6-dev | libc-dev, subversion | git-core (>= 1:1.5.0) | tla | bzr (>= 0.91) | mercurial | monotone (>= 0.38), libxml-simple-perl, libnet-openid-consumer-perl, liblwpx-paranoidagent-perl, libtimedate-perl, libcgi-formbuilder-perl (>= 3.05), libcgi-session-perl (>= 4.14-1), libmail-sendmail-perl, libauthen-passphrase-perl, libterm-readline-gnu-perl -Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl, xapian-omega (>= 1.0.5), librpc-xml-perl, libtext-wikiformat-perl, python, python-docutils, polygen, tidy, libhtml-tree-perl, libxml-feed-perl, libmailtools-perl, perlmagick, libfile-mimeinfo-perl, libcrypt-ssleay-perl, liblocale-gettext-perl (>= 1.05-1), libtext-typography-perl, libtext-csv-perl, libdigest-sha1-perl, graphviz, libnet-amazon-s3-perl, sparkline-php, texlive, dvipng, libtext-wikicreole-perl +Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl, xapian-omega (>= 1.0.5), librpc-xml-perl, libtext-wikiformat-perl, python, python-docutils, polygen, tidy, libhtml-tree-perl, libxml-feed-perl, libmailtools-perl, perlmagick, libfile-mimeinfo-perl, libcrypt-ssleay-perl, liblocale-gettext-perl (>= 1.05-1), libtext-typography-perl, libtext-csv-perl, libdigest-sha1-perl, graphviz, libnet-amazon-s3-perl, sparkline-php, texlive, dvipng, libtext-wikicreole-perl, libsort-naturally-perl Conflicts: ikiwiki-plugin-table Replaces: ikiwiki-plugin-table Provides: ikiwiki-plugin-table diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn index 3f9a9ede5..f69d55de3 100644 --- a/doc/ikiwiki/directive/inline.mdwn +++ b/doc/ikiwiki/directive/inline.mdwn @@ -88,9 +88,9 @@ Here are some less often needed parameters: * `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 - [Sort::Naturally](http://search.cpan.org/dist/Sort-Naturally/lib/Sort/Naturally.pm) - 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"). + [[!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"). * `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. -- cgit v1.2.3 From deca107db5e8a0537c37cacce63cb1672155abaa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Mar 2009 16:17:09 -0400 Subject: response --- doc/forum/usedirs___38___indexpages_using_problem.mdwn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/forum/usedirs___38___indexpages_using_problem.mdwn b/doc/forum/usedirs___38___indexpages_using_problem.mdwn index 1ca95cc88..05c85e281 100644 --- a/doc/forum/usedirs___38___indexpages_using_problem.mdwn +++ b/doc/forum/usedirs___38___indexpages_using_problem.mdwn @@ -10,3 +10,8 @@ But in the page [OSS.html](http://atoz.org.cn/Whatis/OSS.html) , the auto genera to “Whatis” is /Whatis.html file , not to /Whatis/index.html. So the link to “Whatis” is fail . Is it a bug , and how can I do for that ? + +> I suggest that you name your page `Whatis.mdwn`, and not +> `Whatis/index.mdwn`. That will make ikiwiki's links work, +> and allows you to link to the `Whatis` page by that name. +> --[[Joey]] -- cgit v1.2.3 From 3534d524ab9108fde2a7be1864e6adb8550aa4f1 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Thu, 19 Mar 2009 17:31:53 -0400 Subject: ikiwiki's notion of time --- doc/forum/ikiwiki__39__s_notion_of_time.mdwn | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/forum/ikiwiki__39__s_notion_of_time.mdwn diff --git a/doc/forum/ikiwiki__39__s_notion_of_time.mdwn b/doc/forum/ikiwiki__39__s_notion_of_time.mdwn new file mode 100644 index 000000000..f52989026 --- /dev/null +++ b/doc/forum/ikiwiki__39__s_notion_of_time.mdwn @@ -0,0 +1,24 @@ +I'm having some difficulties with ikiwiki's notion of time. + +For (regular) pages, the *last edited* date is the one where the file +was indeed last modified according to the file system information. +The *created* date (commented out in the HTML) is, at least for +`--getctime` operation, the date, where the file was last registered +as changed with the VCS. + +Now, at least with git, the thing is that when you're checking out files, +they'll get the checkout-time's current time stamp. + +What I strive for is the following: *created* be the date when the file +(under its current name) was *first* registered with the VCS (which is +more logical in my opinion), and *last edited* be the date the file was +last registered as changed with the VCS, which is the current +`--getctime` *created* date. + +This means that I can build the HTML files from different checkouts of the +VCS and they won't differ in the time stamps they contain in the HTML. + +What is the rationale for ikiwiki's current behavior with respect to these +time stamps? + +--[[tschwinge]] -- cgit v1.2.3 From 1d9b58b0d4efe4ad4f752eeda7e52b263edaec87 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 20 Mar 2009 05:30:28 -0400 Subject: (replace github link with ikwiki gitweb link so that github branch can go away) --- doc/todo/natural_sorting.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/todo/natural_sorting.mdwn b/doc/todo/natural_sorting.mdwn index faa523043..5df17e95b 100644 --- a/doc/todo/natural_sorting.mdwn +++ b/doc/todo/natural_sorting.mdwn @@ -7,7 +7,7 @@ page titles if they have numeric components. the provides an algorithm for that. there is a -[patch](http://github.com/github076986099/ikiwiki/commit/25617577746dc1e4ab5ab69aa70d633daddcc01b) +[patch](http://git.ikiwiki.info/?p=ikiwiki;a=commit;h=55b83cb7bd1cd7c60bb45dc22c3745dd80a63fed) attached that makes the [[plugins/inline]] plugin use Sort::Naturally if sort is set to "title_natural". -- cgit v1.2.3 From 2c86616a6a10397e47017cbccf0cbfd7992a497b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 20 Mar 2009 16:24:19 -0400 Subject: fix rcs_getctime to return first, not last, change time This was being buggy and returning the file's last change time, not its creation time. --- IkiWiki/Plugin/mercurial.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index 6c4855e57..11fdec529 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -236,7 +236,7 @@ sub rcs_getctime ($) { # XXX filename passes through the shell here, should try to avoid # that just in case - my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v", "-l", '1', + my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v", "--style", "default", "$config{srcdir}/$file"); open (my $out, "@cmdline |"); @@ -249,7 +249,7 @@ sub rcs_getctime ($) { eval q{use Date::Parse}; error($@) if $@; - my $ctime = str2time($log[0]->{"date"}); + my $ctime = str2time($log[$#log]->{"date"}); return $ctime; } -- cgit v1.2.3 From a2c0423e541006f5d1c0c99f4bb07aadfb0cc733 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 20 Mar 2009 16:32:37 -0400 Subject: fix rcs_getctime to return first, not last, change time This was being buggy and returning the file's last change time, not its creation time. (I checked all the others (except tla) and they're ok.) --- IkiWiki/Plugin/git.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b386ab71b..68b114a73 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -594,8 +594,8 @@ sub rcs_getctime ($) { # Remove srcdir prefix $file =~ s/^\Q$config{srcdir}\E\/?//; - my $sha1 = git_sha1($file); - my $ci = git_commit_info($sha1, 1); + my @sha1s = run_or_non('git', 'rev-list', 'HEAD', '--', $file); + my $ci = git_commit_info($sha1s[$#sha1s], 1); my $ctime = $ci->{'author_epoch'}; debug("ctime for '$file': ". localtime($ctime)); -- cgit v1.2.3 From 10a9c00151d43fd26ba523806928b833d6d2aa62 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 20 Mar 2009 16:36:51 -0400 Subject: git, mercurial: Fix --getctime to return file creation time, not last commit time. --- debian/changelog | 2 ++ doc/forum/ikiwiki__39__s_notion_of_time.mdwn | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/debian/changelog b/debian/changelog index 06707a83c..a525df998 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ ikiwiki (3.09) UNRELEASED; urgency=low * inline: Add title_natural sort order, using Sort::Naturally (chrysn) * inline: Fix urls to feed when feedfile is used on an index page. + * git, mercurial: Fix --getctime to return file creation time, + not last commit time. -- Joey Hess Thu, 19 Mar 2009 15:32:49 -0400 diff --git a/doc/forum/ikiwiki__39__s_notion_of_time.mdwn b/doc/forum/ikiwiki__39__s_notion_of_time.mdwn index f52989026..ee564fcc9 100644 --- a/doc/forum/ikiwiki__39__s_notion_of_time.mdwn +++ b/doc/forum/ikiwiki__39__s_notion_of_time.mdwn @@ -22,3 +22,14 @@ What is the rationale for ikiwiki's current behavior with respect to these time stamps? --[[tschwinge]] + +> Presumably it's the authors of the git and mercurial backends +> not understanding the documentation for `rcs_getctime`, +> which states: +> +>>This is used to get the page creation time for a file from the RCS, by +>>looking it up in the history. +> +> I've fixed both broken implementations to correctly look +> up the first, not the last, commit. Other VCS do not seem +> to have the problem. --[[Joey]] -- cgit v1.2.3 From 4f9bb662e48f78169f0f4071200c0bf80d794b61 Mon Sep 17 00:00:00 2001 From: salamonv Date: Mon, 23 Mar 2009 14:53:45 -0400 Subject: --- doc/sandbox.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 52f5f082a..fecbd4bf1 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,5 +1,23 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). +Vick was here and had this to say: +1. my first point is blah +2. my second point is blahblah + - of course, dont forget about this + - and that + - and the other + - which has a subpoint +3. does this work? + * subone + * sub2 + * sub3 + +== and my heading is this == +some important stuff here + +==== less important heading ==== +blahblahblah + ---- misc test -- cgit v1.2.3 From 19d04c309bb39974fe760f4904922b00e3e51cfc Mon Sep 17 00:00:00 2001 From: salamonv Date: Mon, 23 Mar 2009 14:54:29 -0400 Subject: --- doc/sandbox.mdwn | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index fecbd4bf1..52f5f082a 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -1,23 +1,5 @@ This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version ]]). -Vick was here and had this to say: -1. my first point is blah -2. my second point is blahblah - - of course, dont forget about this - - and that - - and the other - - which has a subpoint -3. does this work? - * subone - * sub2 - * sub3 - -== and my heading is this == -some important stuff here - -==== less important heading ==== -blahblahblah - ---- misc test -- cgit v1.2.3 From 82281d1aef347080ff235ad18e92613012093f49 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 24 Mar 2009 08:21:22 +0100 Subject: wishlist, patch: inline autotitles --- doc/todo/inline_autotitles.mdwn | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 doc/todo/inline_autotitles.mdwn diff --git a/doc/todo/inline_autotitles.mdwn b/doc/todo/inline_autotitles.mdwn new file mode 100644 index 000000000..9846687e9 --- /dev/null +++ b/doc/todo/inline_autotitles.mdwn @@ -0,0 +1,45 @@ +[[!tag wishlist]] +[[!tag patch]] + +for inlines of pages which follow a certain scheme, it might not be required to +set the title for each individual post, but to automatically set the title. +this can either be based on timestamp formatting, or use the already existing +munging mechanism, which appends numbers to page titles in case that page +already exists. + +two [patches][1] set inline up for that, adding an additional `autotitle` +parameter. if that is given, the regular input of the inline postform will be +replaced with a hidden input of that text. in addition, the empty title is +permitted (both for autotitle and regular titles, as they go in the same GET +parameter, `title`). as the empty page title is illegal, munging is used, +resulting in ascending numeric page titles to be created. + +the second patch is actually a one-liner, filtering the title through sprintf. + +### potential user interaction issues + +this has two side effects which have to be considered: first, the empty page +title is accepted also in normal postforms (previously, this resulted in a "bad +page name" error); second, entering a percent sign in that field might result +in unexpexted sprintf substitution (sprintf might not even substitute for +common uses of percent as in "reach 10% market share", but might in others as +in "the 10%-rule"). + +both can be circumvented by using another GET parameter for autotexts, for +which i could provide a patch. (as of writing this, i think i'll do that.) + +### potential security issues + +* the autotitle's value is directly output through the template (but that's + done in other places as well, so i assume it's safe) +* i don't know if anything bad can happen if unfiltered content is passed to + POSIX::strftime. + +### further extension + +having a pre-filled input field instead of an unchangable hidden input might be +cool (eg for creating an entry with yesterday's date), but would be a bit of a +problem with static pages. javascript could help with the date part, but name +munging would be yet another thing. + +[1]: http://... -- cgit v1.2.3 From ce81e2e286ed5435eb114de21be73cd02da8a666 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 24 Mar 2009 08:25:35 +0100 Subject: (urls for inline autotitle) --- doc/todo/inline_autotitles.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/todo/inline_autotitles.mdwn b/doc/todo/inline_autotitles.mdwn index 9846687e9..afc726c48 100644 --- a/doc/todo/inline_autotitles.mdwn +++ b/doc/todo/inline_autotitles.mdwn @@ -7,7 +7,7 @@ this can either be based on timestamp formatting, or use the already existing munging mechanism, which appends numbers to page titles in case that page already exists. -two [patches][1] set inline up for that, adding an additional `autotitle` +two patches ([1], [2]) set inline up for that, adding an additional `autotitle` parameter. if that is given, the regular input of the inline postform will be replaced with a hidden input of that text. in addition, the empty title is permitted (both for autotitle and regular titles, as they go in the same GET @@ -42,4 +42,5 @@ cool (eg for creating an entry with yesterday's date), but would be a bit of a problem with static pages. javascript could help with the date part, but name munging would be yet another thing. -[1]: http://... +[1]: http://github.com/github076986099/ikiwiki/commit/b568eb257a3ef5ff49a84ac00a3a7465b643c1e1 +[2]: http://github.com/github076986099/ikiwiki/commit/34bc82f232be141edf036d35e8ef5aa289415072 -- cgit v1.2.3 From 16735bd194095306e4a8f6e2b8d771068e19e497 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 24 Mar 2009 09:20:18 +0100 Subject: (corrected bug in inline autotitle description) --- doc/todo/inline_autotitles.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/todo/inline_autotitles.mdwn b/doc/todo/inline_autotitles.mdwn index afc726c48..4c45ebf00 100644 --- a/doc/todo/inline_autotitles.mdwn +++ b/doc/todo/inline_autotitles.mdwn @@ -14,14 +14,14 @@ permitted (both for autotitle and regular titles, as they go in the same GET parameter, `title`). as the empty page title is illegal, munging is used, resulting in ascending numeric page titles to be created. -the second patch is actually a one-liner, filtering the title through sprintf. +the second patch is actually a one-liner, filtering the title through strftime. ### potential user interaction issues this has two side effects which have to be considered: first, the empty page title is accepted also in normal postforms (previously, this resulted in a "bad page name" error); second, entering a percent sign in that field might result -in unexpexted sprintf substitution (sprintf might not even substitute for +in unexpexted strftime substitution (strftime might not even substitute for common uses of percent as in "reach 10% market share", but might in others as in "the 10%-rule"). -- cgit v1.2.3 From fcf72069cb9c70a353f9fb8eca7d2a36fc883748 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 24 Mar 2009 10:55:27 +0100 Subject: inline autotitles: additional patch --- doc/todo/inline_autotitles.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/todo/inline_autotitles.mdwn b/doc/todo/inline_autotitles.mdwn index 4c45ebf00..9d3c986ed 100644 --- a/doc/todo/inline_autotitles.mdwn +++ b/doc/todo/inline_autotitles.mdwn @@ -25,8 +25,8 @@ in unexpexted strftime substitution (strftime might not even substitute for common uses of percent as in "reach 10% market share", but might in others as in "the 10%-rule"). -both can be circumvented by using another GET parameter for autotexts, for -which i could provide a patch. (as of writing this, i think i'll do that.) +both can be circumvented by using another GET parameter for autotexts, as +implemented in [3]. ### potential security issues @@ -44,3 +44,4 @@ munging would be yet another thing. [1]: http://github.com/github076986099/ikiwiki/commit/b568eb257a3ef5ff49a84ac00a3a7465b643c1e1 [2]: http://github.com/github076986099/ikiwiki/commit/34bc82f232be141edf036d35e8ef5aa289415072 +[3]: http://github.com/github076986099/ikiwiki/commit/40dc10a4ec7809e401b4497c2abccfba30f7a2af -- cgit v1.2.3 From 7455e8cea95bc03ca8702c6dc74bbde99c68ec4e Mon Sep 17 00:00:00 2001 From: "http://jmtd.net/" Date: Tue, 24 Mar 2009 12:34:00 -0400 Subject: +test --- doc/sandbox.mdwn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn index 52f5f082a..1e5fba304 100644 --- a/doc/sandbox.mdwn +++ b/doc/sandbox.mdwn @@ -92,3 +92,8 @@ But, of course, rsync is better. Let's see what happens... ~~ 測試的啦 + +---- + + +testing -- cgit v1.2.3 From 2c37e8915a7e88348b6c7c2d9c65fc6b747a7a63 Mon Sep 17 00:00:00 2001 From: "http://jmtd.net/" Date: Tue, 24 Mar 2009 13:00:34 -0400 Subject: thanks for the tip --- doc/forum/managing_todo_lists.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/forum/managing_todo_lists.mdwn b/doc/forum/managing_todo_lists.mdwn index b8360b253..5146da682 100644 --- a/doc/forum/managing_todo_lists.mdwn +++ b/doc/forum/managing_todo_lists.mdwn @@ -35,3 +35,5 @@ sure how to handle embeds or challenges from the CGI such as a login challenge > You might look at the [[plugins/hnb]] plugin. HNB supports checklists. > There's not a fancy web interface, but the hnb command-line program can > be used to edit them. --[[Joey]] + +>> thanks - I'll give it a look. I spent a few hours writing some javascript to manipulate a ul/li DOM tree in an outliner-fashion the other day. I might be able to join the puzzle pieces together sometime. [[Jon]] -- cgit v1.2.3 From be5d11338392c651f91c59d26c16f86573046945 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 24 Mar 2009 13:26:23 -0400 Subject: create link from todo lists to structured page data --- doc/forum/managing_todo_lists.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/forum/managing_todo_lists.mdwn b/doc/forum/managing_todo_lists.mdwn index 5146da682..b4bbac255 100644 --- a/doc/forum/managing_todo_lists.mdwn +++ b/doc/forum/managing_todo_lists.mdwn @@ -37,3 +37,5 @@ sure how to handle embeds or challenges from the CGI such as a login challenge > be used to edit them. --[[Joey]] >> thanks - I'll give it a look. I spent a few hours writing some javascript to manipulate a ul/li DOM tree in an outliner-fashion the other day. I might be able to join the puzzle pieces together sometime. [[Jon]] + +a solution for this could be similar to a solution for [[todo/structured page data]], as todo lists are definitely a form of structured data. (in both cases, the page's current content is rendered into a html form, whose result is then saved as the page's new contents) --[[chrysn]] -- cgit v1.2.3 From 4538747649bea96d5db91fb3d9cbc4161bf3f795 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 24 Mar 2009 15:52:37 -0400 Subject: Updated French translation (Jean-Luc Coulon). Closes: #521072 --- debian/changelog | 1 + po/fr.po | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a525df998..e54c08ba5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ ikiwiki (3.09) UNRELEASED; urgency=low * inline: Fix urls to feed when feedfile is used on an index page. * git, mercurial: Fix --getctime to return file creation time, not last commit time. + * Updated French translation (Jean-Luc Coulon). Closes: #521072 -- Joey Hess Thu, 19 Mar 2009 15:32:49 -0400 diff --git a/po/fr.po b/po/fr.po index eb2623fab..51cb5c7de 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.04\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-03-08 19:02-0400\n" -"PO-Revision-Date: 2009-02-26 21:28+0100\n" +"POT-Creation-Date: 2009-03-01 15:03-0500\n" +"PO-Revision-Date: 2009-03-15 16:10+0100\n" "Last-Translator: Philippe Batailler \n" "Language-Team: French \n" "MIME-Version: 1.0\n" @@ -26,6 +26,8 @@ msgid "" "probable misconfiguration: sslcookie is set, but you are attepting to login " "via http, not https" msgstr "" +"Erreur de configuration probable : sslcookie est positionnĂ© mais vous tentez " +"de vous connecter avec http et non https" #: ../IkiWiki/CGI.pm:149 msgid "login failed, perhaps you need to turn on cookies?" -- cgit v1.2.3 From ca862d5127192392cd4614ff60504ec5bb28d512 Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 24 Mar 2009 18:23:44 -0400 Subject: inline autotitles: open issue --- doc/todo/inline_autotitles.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/todo/inline_autotitles.mdwn b/doc/todo/inline_autotitles.mdwn index 9d3c986ed..8bf71deae 100644 --- a/doc/todo/inline_autotitles.mdwn +++ b/doc/todo/inline_autotitles.mdwn @@ -27,6 +27,10 @@ in "the 10%-rule"). both can be circumvented by using another GET parameter for autotexts, as implemented in [3]. +> this patch still does not work perfectly; especially, it should make a +> distinction between "autotitle is set but equal ''" (in which case it +> should create a page named `1.mdwn`, and "autotitle is not set, and title is +> equal ''" (in which case it should display the old error message) --[[chrysn]] ### potential security issues -- cgit v1.2.3 From 35a5ecb85d745b40c867d1e3bc4a831e3746ff93 Mon Sep 17 00:00:00 2001 From: "http://fredofromstart.myopenid.com/" Date: Wed, 25 Mar 2009 03:16:39 -0400 Subject: --- doc/freesoftware/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/freesoftware/discussion.mdwn diff --git a/doc/freesoftware/discussion.mdwn b/doc/freesoftware/discussion.mdwn new file mode 100644 index 000000000..75d4666a0 --- /dev/null +++ b/doc/freesoftware/discussion.mdwn @@ -0,0 +1 @@ +And where is the code, please ? -- cgit v1.2.3 From ba59ed5e6999060cad1a5b4e188529c2005faa92 Mon Sep 17 00:00:00 2001 From: simonraven Date: Wed, 25 Mar 2009 14:34:25 -0400 Subject: --- doc/index/openid/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/index/openid/discussion.mdwn diff --git a/doc/index/openid/discussion.mdwn b/doc/index/openid/discussion.mdwn new file mode 100644 index 000000000..d011df92a --- /dev/null +++ b/doc/index/openid/discussion.mdwn @@ -0,0 +1,5 @@ +# OpenID discussion + +## No return_to in OpenID server + +Hi, there's no return_to from a designated OpenID server page, specs requires (I think a "should" or "must", can't recall exact wording) that it redirects back to the RP, in order to complete the registration and authentication. Unless I'm missing something, and the doc is incomplete, I'd consider this a bug. I don't expect to be of much use WRT coming up with a patch, but I'm willing to test ;-) . -- cgit v1.2.3 From 5ec9c7af7579341a751de9ccbedc21438ea14be0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 25 Mar 2009 16:25:02 -0400 Subject: response --- doc/freesoftware/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/freesoftware/discussion.mdwn b/doc/freesoftware/discussion.mdwn index 75d4666a0..e71fd295d 100644 --- a/doc/freesoftware/discussion.mdwn +++ b/doc/freesoftware/discussion.mdwn @@ -1 +1,3 @@ And where is the code, please ? + +> [[download]] --[[Joey]] -- cgit v1.2.3 From 9e4adba63a769f164c2a6818e58070680c3e0eed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 25 Mar 2009 18:04:45 -0400 Subject: css: Add clear: both to inlinefooter. If an inlined page contains a floating element, this ensures that the footer appears beneath it, and prevents the floating element from possibly leaking down to the next inlined page. --- debian/changelog | 1 + doc/style.css | 3 +++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index e54c08ba5..01404a2b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ ikiwiki (3.09) UNRELEASED; urgency=low * git, mercurial: Fix --getctime to return file creation time, not last commit time. * Updated French translation (Jean-Luc Coulon). Closes: #521072 + * css: Add clear: both to inlinefooter. -- Joey Hess Thu, 19 Mar 2009 15:32:49 -0400 diff --git a/doc/style.css b/doc/style.css index a6e6734e3..98a28f347 100644 --- a/doc/style.css +++ b/doc/style.css @@ -44,6 +44,9 @@ div.inlinecontent { .pagefooter { clear: both; } +.inlinefooter { + clear: both; +} .tags { } -- cgit v1.2.3 From 102553d6a72847e8381cf50fe6b083c95b1ccbab Mon Sep 17 00:00:00 2001 From: simonraven Date: Thu, 26 Mar 2009 01:43:43 -0400 Subject: --- doc/users/simonraven.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/users/simonraven.mdwn diff --git a/doc/users/simonraven.mdwn b/doc/users/simonraven.mdwn new file mode 100644 index 000000000..0706859aa --- /dev/null +++ b/doc/users/simonraven.mdwn @@ -0,0 +1,3 @@ +New ikiwiki site at my personal site under /ikiwiki/ . This might move to /wiki/ or be on wiki.k.o depending on if I can import my MediaWiki stuff to it. + +Thought I'd try it out again and it grew on me. -- cgit v1.2.3 From 66c354ec27fa3542bae3d5c1de7682cce0c1c28f Mon Sep 17 00:00:00 2001 From: "http://haruschi.myopenid.com/" Date: Thu, 26 Mar 2009 11:55:47 -0400 Subject: --- doc/ikiwikiusers.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 8dea61f6a..7bd4f0582 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -44,6 +44,7 @@ Projects & Organizations * [St Hugh of Lincoln Primary School in Surrey](http://hugh.vm.bytemark.co.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) Personal sites and blogs ======================== @@ -116,6 +117,7 @@ Personal sites and blogs * [muammar's site](http://muammar.me) * [Per Bothner's blog](http://per.bothner.com/blog/) * [Bernd Zeimetz (bzed)](http://bzed.de/) +* [Gaudenz Steinlin](http://gaudenz.durcheinandertal.ch) Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From 5900c7f170a6b136ad80a97d8786d382b987fd46 Mon Sep 17 00:00:00 2001 From: "http://stefano.zacchiroli.myopenid.com/" Date: Thu, 26 Mar 2009 13:18:02 -0400 Subject: --- doc/css_market.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index 8b7e17585..15e147513 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -9,7 +9,7 @@ gnomes will convert them to css files..) * **[[css_market/zack.css]]**, contributed by [[StefanoZacchiroli]], customized mostly for *blogging purposes*, can be seen in action on - [zack's blog](http://www.bononia.it/~zack/blog/) + [zack's blog](http://upsilon.cc/~zack/blog/) [[!meta stylesheet="zack"]] * **[[css_market/kirkambar.css]]**, contributed by [[Roktas]]. This far from perfect -- cgit v1.2.3 From f11ba52564dd1a54ac86e504d399d036f8611824 Mon Sep 17 00:00:00 2001 From: simonraven Date: Thu, 26 Mar 2009 13:18:24 -0400 Subject: --- doc/ikiwikiusers.mdwn | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/ikiwikiusers.mdwn b/doc/ikiwikiusers.mdwn index 7bd4f0582..1a24ff322 100644 --- a/doc/ikiwikiusers.mdwn +++ b/doc/ikiwikiusers.mdwn @@ -118,6 +118,7 @@ Personal sites and blogs * [Per Bothner's blog](http://per.bothner.com/blog/) * [Bernd Zeimetz (bzed)](http://bzed.de/) * [Gaudenz Steinlin](http://gaudenz.durcheinandertal.ch) +* [Simon Kjika'qawej C.](http://simonraven.kisikew.org/ikiwiki/) Please note it might change location at any time (likely wiki.k.o or under /wiki/ at simonraven.k.o). Please feel free to add your own ikiwiki site! -- cgit v1.2.3 From f2a1c1bfb42213b1d4e7063d26b4a33973bd70dd Mon Sep 17 00:00:00 2001 From: "http://stefano.zacchiroli.myopenid.com/" Date: Thu, 26 Mar 2009 13:21:03 -0400 Subject: --- doc/css_market/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/css_market/discussion.mdwn b/doc/css_market/discussion.mdwn index cba13132e..aa9a19bf2 100644 --- a/doc/css_market/discussion.mdwn +++ b/doc/css_market/discussion.mdwn @@ -5,3 +5,10 @@ What is the correct way to install the .tmpl files? -- [[JosephTurian]] > ikiwiki's standard templates (in, eg `/usr/share/ikiwiki/templates`) > --[[Joey]] +---- + +How can I update a .css file uploaded to the CSS market? +My CSS has been updated to address comments (for the comments plugin), but I cannot find a way to update zack.css. +The most recent version is always available at: + +-- [[StefanoZacchiroli]] -- cgit v1.2.3 From 20071c39458b841ed9c1e4cb4e7844358e98016a Mon Sep 17 00:00:00 2001 From: "http://stefano.zacchiroli.myopenid.com/" Date: Thu, 26 Mar 2009 13:30:34 -0400 Subject: --- doc/css_market.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index 15e147513..3aa68e4d9 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -7,7 +7,7 @@ dir with a filename of `local.css`. Feel free to add your own stylesheets here. (Upload as wiki pages; wiki gnomes will convert them to css files..) -* **[[css_market/zack.css]]**, contributed by [[StefanoZacchiroli]], +* **[zack.css](http://git.upsilon.cc/cgi-bin/gitweb.cgi?p=zack-homepage.git;a=blob_plain;f=local.css;hb=HEAD)**, contributed by [[StefanoZacchiroli]], customized mostly for *blogging purposes*, can be seen in action on [zack's blog](http://upsilon.cc/~zack/blog/) [[!meta stylesheet="zack"]] @@ -69,5 +69,4 @@ Style. In Firefox or Iceweasel, use View -> Page Style. [2]: http://blankoworld.homelinux.com/demo/ikiwiki/blankoblues/htdocs/ (Take a tour on Blankoblues Demo) [3]: http://blankoworld.homelinux.com/demo/ikiwiki/blankoblues/blankoblues.tar.gz (Download local.css and templates for Blankoblues theme) [4]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/src/local.css (Download Contraste CSS) - [5]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/htdocs/ (Take a tour on Contraste Demo) - [6]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/contraste.tar.gz (Download local.css and templates for Contraste theme) + [5]: http://blankoworld.homelinu -- cgit v1.2.3 From 503d83ffbc358714ad84e46ce523b8702268edb6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 26 Mar 2009 14:04:28 -0400 Subject: comments: Fix too loose test for comments pages that matched normal pages with "comment_" in their name. Closes: #521322 --- IkiWiki/Plugin/comments.pm | 2 +- debian/changelog | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index ee53dbc91..5782d9083 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -672,7 +672,7 @@ sub previewcomment ($$$) { sub commentsshown ($) { my $page=shift; - return ! pagespec_match($page, "*/$config{comments_pagename}*", + return ! pagespec_match($page, "internal(*/$config{comments_pagename}*)", location => $page) && pagespec_match($page, $config{comments_pagespec}, location => $page); diff --git a/debian/changelog b/debian/changelog index 01404a2b4..4ba32c8d6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ ikiwiki (3.09) UNRELEASED; urgency=low not last commit time. * Updated French translation (Jean-Luc Coulon). Closes: #521072 * css: Add clear: both to inlinefooter. + * comments: Fix too loose test for comments pages that matched + normal pages with "comment_" in their name. Closes: #521322 -- Joey Hess Thu, 19 Mar 2009 15:32:49 -0400 -- cgit v1.2.3 From 014fbf266f2e4a63a4f2f574fbf001702911afad Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 26 Mar 2009 14:08:14 -0400 Subject: fix link truncation --- doc/css_market.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index 3aa68e4d9..e9409e55e 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -69,4 +69,5 @@ Style. In Firefox or Iceweasel, use View -> Page Style. [2]: http://blankoworld.homelinux.com/demo/ikiwiki/blankoblues/htdocs/ (Take a tour on Blankoblues Demo) [3]: http://blankoworld.homelinux.com/demo/ikiwiki/blankoblues/blankoblues.tar.gz (Download local.css and templates for Blankoblues theme) [4]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/src/local.css (Download Contraste CSS) - [5]: http://blankoworld.homelinu + [5]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/htdocs/ (Take a tour on Contraste Demo) + [6]: http://blankoworld.homelinux.com/demo/ikiwiki/contraste/contraste.tar.gz (Download local.css and templates for Contraste theme) -- cgit v1.2.3 From c46d3f8c79eac18d8aec6d658319f4aa6be13caf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 26 Mar 2009 14:11:51 -0400 Subject: update zack.css from gitweb and repoint link to it --- doc/css_market.mdwn | 2 +- doc/css_market/zack.css | 224 ++++++++++++++++++++++++++++++------------------ 2 files changed, 142 insertions(+), 84 deletions(-) diff --git a/doc/css_market.mdwn b/doc/css_market.mdwn index e9409e55e..15e147513 100644 --- a/doc/css_market.mdwn +++ b/doc/css_market.mdwn @@ -7,7 +7,7 @@ dir with a filename of `local.css`. Feel free to add your own stylesheets here. (Upload as wiki pages; wiki gnomes will convert them to css files..) -* **[zack.css](http://git.upsilon.cc/cgi-bin/gitweb.cgi?p=zack-homepage.git;a=blob_plain;f=local.css;hb=HEAD)**, contributed by [[StefanoZacchiroli]], +* **[[css_market/zack.css]]**, contributed by [[StefanoZacchiroli]], customized mostly for *blogging purposes*, can be seen in action on [zack's blog](http://upsilon.cc/~zack/blog/) [[!meta stylesheet="zack"]] diff --git a/doc/css_market/zack.css b/doc/css_market/zack.css index dbc2e5c44..5a0521d54 100644 --- a/doc/css_market/zack.css +++ b/doc/css_market/zack.css @@ -14,122 +14,180 @@ */ body { - font-family: sans; - width: 760px; - margin-left: 20px; + font-family: sans-serif; + font-size: medium; } +h1, h2, h3, h4 { + font-weight: normal; +} +h1 { font-size: 140%; } +h2 { font-size: 120%; } +h3 { font-size: 110%; } +h4 { font-size: 105% } -div#content { - font-size: 11pt; +a { text-decoration: none; } +a:hover { text-decoration: underline; } + +.flow { + float: right; + margin-left: 10px; + margin-bottom: 10px; + text-align: center; } -.header span { - font-size: 14pt; - font-weight: normal; +.attrib-caption { + font-size: xx-small; + font-style: italic; } -div.actions ul { - font-size: 10pt; +input { + border: solid 1px; + border-color: #aaa; } -h1 { - font-weight: normal; - font-size: 17pt; +.header { font-weight: normal; } + +.selflink { text-decoration: underline; } + +.pageheader .actions ul, +#sitemeta { + border-top: solid 1px; + border-bottom: solid 1px; + font-size: small; + border-color: #aaa; + background: #eee; } -h2 { - font-weight: normal; - font-size: 16pt; +.actions ul { + padding: 1px; + margin-top: 5px; } -h3 { - font-weight: normal; - font-size: 15pt; +#sitemeta { + padding: 0; + margin-bottom: 5px; } -h4 { - font-weight: normal; - font-size: 14pt; +#backlinks, +.tags { + margin-top: 0; + margin-bottom: 0; } -h5 { - font-weight: normal; - font-size: 13pt; + +#pageinfo { + border: none; } -h6 { - font-weight: normal; - font-size: 12pt; + +#searchform div:before { + font-size: small; + content: "search:"; +} +#searchform input { + border-top: none; + border-bottom: none; + vertical-align: bottom; + margin-right: 7px; } -div.inlinepage > span.header > a { - float: right; - display: block; - font-size: 11pt; - font-weight: normal; - margin: 0; +#sidebar { + border: solid; + border-width: 1px; padding: 0; + margin-top: 15px; + border: 1px solid; + border-color: #aaa; + background: #eee; + width: 16ex; } -div.inlinepage > span.header > a:before { - content: "permalink: "; - font-size: smaller; - text-decoration: none; - font-style: italic; +#sidebar ul { + margin: 0; + padding-left: 1em; + list-style-type: none; } - -div.inlinepage { - margin-bottom: 10px; +#sidebar ul ul { + padding-left: 1.5em; + font-size: 90%; } -div.inlinepage h1 { - font-weight: normal; - font-size: 14pt; +#pageinfo, +#footer { margin: 0; } -div.inlinepage h2 { - font-weight: normal; - font-size: 13pt; - margin: 0; +#pageinfo { + font-size: small; } -div.inlinepage h3 { - font-weight: normal; - font-size: 12pt; +.pagecopyright, +.pagelicense, +.pagedate { margin: 0; + display: inline; } -div.inlinepage h4 { - font-weight: normal; - font-size: 11pt; - margin: 0; +#backlinks { + margin-top: 5px; + margin-bottom: 10px; + font-size: larger; } -div.inlinepage h5 { - font-weight: normal; - font-size: 11pt; - margin: 0; +.validation { + display: inline; + float: right; } -div.inlinepage h6 { - font-weight: normal; - font-size: 11pt; - margin: 0; + +.pagecloud { + margin-left: 5px; } -div#blogform { - padding: 0px 5px; - margin-bottom: 10px; +table.identikit tr th { + text-align: right; + vertical-align: top; +} +table.identikit tr th:after { + content: ":"; +} +table.identikit tr td { + text-align: left; + vertical-align: top; } -pre { - width: 90%; - font-size: 10pt; - font-family: monospace; - background: #e1e1e1; - margin-left: 4%; - padding-top: 5px; - padding-bottom: 5px; +.doi_logo , .doi_logo a { + background: #3965bd; + color: white !important; + font-size: 80%; + text-decoration: none; + font-family: times; + font-weight: bold; + padding: 0px 1px 0px 2px; } -.pagecloud { - width: 25%; - border-top: 1px solid #aaa; - border-bottom: 1px solid #aaa; - background: #eee; - color: black !important; +#comments { + margin-top: 5ex; + border-top: solid 1px; + border-color: #aaa; + font-size: small; +} + +#comments #feedlink { + text-align: right; +} +#comments #feedlink:before { + content: "comment feeds: "; +} + +.addcomment { + padding: 5px; + font-style: italic; +} + +.comment { + border: none; + background-color: #eee; + margin: 5px; + margin-top: 10px; +} + +.comment-subject { + font-style: normal; } -.pagecloud a { - text-decoration: none; +.comment-header { + border-top: solid 1px; + border-color: #aaa; + text-align: right; + font-style: normal; } -- cgit v1.2.3 From 3481a35953c0f8e858b382829c239411b06889c4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 26 Mar 2009 14:12:55 -0400 Subject: response --- doc/css_market/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/css_market/discussion.mdwn b/doc/css_market/discussion.mdwn index aa9a19bf2..f80053e38 100644 --- a/doc/css_market/discussion.mdwn +++ b/doc/css_market/discussion.mdwn @@ -12,3 +12,5 @@ My CSS has been updated to address comments (for the comments plugin), but I can The most recent version is always available at: -- [[StefanoZacchiroli]] + +> Just letting me know about the change works -- updated. --[[Joey]] -- cgit v1.2.3 From 10822a22b3d8872afb31e1847ee7448af86c574d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 26 Mar 2009 16:45:53 -0400 Subject: comments: Fix anchor ids to be legal xhtml. Closes: #521339 Well, that was a PITA. Luckily, this doesn't break guids to comments in rss feeds, though it does change the links. I haven't put in a warning about needing to rebuild to get this fix. It's probably good enough for new comments to get the fix, without a lot of mass rebuilding. --- IkiWiki/Plugin/comments.pm | 24 ++++++++++++++++++++++-- debian/changelog | 1 + templates/comment.tmpl | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 5782d9083..2ad422f5f 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -224,7 +224,7 @@ sub preprocess { if ($params{page} =~ m/\/(\Q$config{comments_pagename}\E\d+)$/) { $pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page}), undef, 1). - "#".$params{page}; + "#".page_to_id($params{page}); } eval q{use Date::Parse}; @@ -490,7 +490,8 @@ sub editcomment ($$) { # Jump to the new comment on the page. # The trailing question mark tries to avoid broken # caches and get the most recent version of the page. - IkiWiki::redirect($cgi, urlto($page, undef, 1)."?updated#$location"); + IkiWiki::redirect($cgi, urlto($page, undef, 1). + "?updated#".page_to_id($location)); } else { @@ -759,6 +760,10 @@ sub pagetemplate (@) { if (!exists $commentstate{$page}) { return; } + + if ($template->query(name => 'commentid')) { + $template->param(commentid => page_to_id($page)); + } if ($template->query(name => 'commentuser')) { $template->param(commentuser => @@ -808,6 +813,21 @@ sub unique_comment_location ($) { return $location; } +sub page_to_id ($) { + # Converts a comment page name into a unique, legal html id + # addtibute value, that can be used as an anchor to link to the + # comment. + my $page=shift; + + # It needs to start with a letter. + $page="comment_".$page; + + # Encode any illegal characters. + $page=~s/([^A-Za-z0-9-_:.])/"__".ord($1)."__"/eg; + + return $page; +} + package IkiWiki::PageSpec; sub match_postcomment ($$;@) { diff --git a/debian/changelog b/debian/changelog index 4ba32c8d6..158db9a4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ ikiwiki (3.09) UNRELEASED; urgency=low * css: Add clear: both to inlinefooter. * comments: Fix too loose test for comments pages that matched normal pages with "comment_" in their name. Closes: #521322 + * comments: Fix anchor ids to be legal xhtml. Closes: #521339 -- Joey Hess Thu, 19 Mar 2009 15:32:49 -0400 diff --git a/templates/comment.tmpl b/templates/comment.tmpl index 1b9064ea0..fb76ea004 100644 --- a/templates/comment.tmpl +++ b/templates/comment.tmpl @@ -1,4 +1,4 @@ -
+
-- cgit v1.2.3 From 375b53c26e8819a740bb1429b50b1417e70ba998 Mon Sep 17 00:00:00 2001 From: simonraven Date: Thu, 26 Mar 2009 20:37:49 -0400 Subject: typo --- doc/ikiwiki/directive/linkmap.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ikiwiki/directive/linkmap.mdwn b/doc/ikiwiki/directive/linkmap.mdwn index 8fdf40c9f..db79a1491 100644 --- a/doc/ikiwiki/directive/linkmap.mdwn +++ b/doc/ikiwiki/directive/linkmap.mdwn @@ -9,7 +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, unweildy, and complicated. Also, the map is +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. -- cgit v1.2.3 From 260ee2a28368691a5f1a7dee918717a28d28ed2e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 27 Mar 2009 13:44:31 -0400 Subject: use md5sum for page_to_id The munged ids were looking pretty nasty, and were not completly guaranteed to be unique. So a md5sum seems like a better approach. (Would have used sha1, but md5 is in perl core.) --- IkiWiki/Plugin/comments.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 2ad422f5f..98f9f8b3d 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -819,13 +819,10 @@ sub page_to_id ($) { # comment. my $page=shift; - # It needs to start with a letter. - $page="comment_".$page; - - # Encode any illegal characters. - $page=~s/([^A-Za-z0-9-_:.])/"__".ord($1)."__"/eg; + eval q{use Digest::MD5 'md5_hex'}; + error($@) if $@; - return $page; + return "comment-".md5_hex($page); } package IkiWiki::PageSpec; -- cgit v1.2.3 From c8237b4351f6023b3d3a661df2568c6d7488b8cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 27 Mar 2009 14:54:36 -0400 Subject: response --- doc/index/openid/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/index/openid/discussion.mdwn b/doc/index/openid/discussion.mdwn index d011df92a..43575d4be 100644 --- a/doc/index/openid/discussion.mdwn +++ b/doc/index/openid/discussion.mdwn @@ -3,3 +3,10 @@ ## No return_to in OpenID server Hi, there's no return_to from a designated OpenID server page, specs requires (I think a "should" or "must", can't recall exact wording) that it redirects back to the RP, in order to complete the registration and authentication. Unless I'm missing something, and the doc is incomplete, I'd consider this a bug. I don't expect to be of much use WRT coming up with a patch, but I'm willing to test ;-) . + +> If this is a bug, could you please explain: +> +> * What happens when the bug occurs? +> * How can one reproduce the bug? +> +> PS, please file bugs under [[bugs]] in future. --[[Joey]] -- cgit v1.2.3