From 9585968861d551fc43379053f8556a2fe44de7b8 Mon Sep 17 00:00:00 2001 From: privat Date: Fri, 17 Sep 2010 01:42:46 +0000 Subject: patch proposal: add option to capitalize pagetitles --- doc/todo/capitalize_title.mdwn | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/todo/capitalize_title.mdwn diff --git a/doc/todo/capitalize_title.mdwn b/doc/todo/capitalize_title.mdwn new file mode 100644 index 000000000..3e8366dd3 --- /dev/null +++ b/doc/todo/capitalize_title.mdwn @@ -0,0 +1,31 @@ +Here I propose an option (with a [[patch]]) to capitalize the first letter (ucfirst) of default titles : filenames and urls can be lowercase but title are displayed with a capital first character (filename = "foo.mdwn", pagetitle = "Foo"). Note that \[[!meta title]] are unaffected (no automatic capitalization). Comments please :) --[[JeanPrivat]] +

+diff --git a/IkiWiki.pm b/IkiWiki.pm
+index 6da2819..fd36ec4 100644
+--- a/IkiWiki.pm
++++ b/IkiWiki.pm
+@@ -281,6 +281,13 @@ sub getsetup () {
+                safe => 0,
+                rebuild => 1,
+        },
++       capitalize => {
++               type => "boolean",
++               default => undef,
++               description => "capitalize the first letter of page titles",
++               safe => 1,
++               rebuild => 1,
++       },
+        userdir => {
+                type => "string",
+                default => "",
+@@ -989,6 +996,10 @@ sub pagetitle ($;$) {
+                $page=~s/(__(\d+)__|_)/$1 eq '_' ? ' ' : "&#$2;"/eg;
+        }
+ 
++       if ($config{capitalize}) {
++               $page = ucfirst $page;
++       }
++
+        return $page;
+ }
+
-- cgit v1.2.3 From 3f8ba63a9968b6fc670ea2b49b86ba62571ef15b Mon Sep 17 00:00:00 2001 From: tschwinge Date: Fri, 17 Sep 2010 11:48:29 +0000 Subject: Report. --- doc/bugs/cutpaste.pm:_missing_filter_call.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/bugs/cutpaste.pm:_missing_filter_call.mdwn diff --git a/doc/bugs/cutpaste.pm:_missing_filter_call.mdwn b/doc/bugs/cutpaste.pm:_missing_filter_call.mdwn new file mode 100644 index 000000000..30bd52996 --- /dev/null +++ b/doc/bugs/cutpaste.pm:_missing_filter_call.mdwn @@ -0,0 +1,23 @@ +Consider this: + + $ wget http://www.thomas.schwinge.homeip.net/tmp/cutpaste_filter.tar.bz2 + $ wget http://www.thomas.schwinge.homeip.net/tmp/cutpaste_filter.patch + + $ tar -xj < cutpaste_filter.tar.bz2 + $ cd cutpaste_filter/ + $ ./render_locally + $ find "$PWD".rendered/ -type f -print0 | xargs -0 grep -H -E 'FOO|BAR' + [notice one FOO in there] + $ rm -rf .ikiwiki "$PWD".rendered + + $ cp /usr/share/perl5/IkiWiki/Plugin/cutpaste.pm .library/IkiWiki/Plugin/ + $ patch -p0 < ../cutpaste_filter.patch + $ ./render_locally + $ find "$PWD".rendered/ -type f -print0 | xargs -0 grep -H -E 'FOO|BAR' + [correct; notice no more FOO] + +I guess this needs a general audit -- there are other places where `preprocess` +is being doing without `filter`ing first, for example in the same file, `copy` +function. + +--[[tschwinge]] -- cgit v1.2.3 From 65c5e24d364f491ace462beb06e2e3adb721b1e0 Mon Sep 17 00:00:00 2001 From: Javier Rojas Date: Fri, 17 Sep 2010 20:08:49 -0500 Subject: idea about 'dynamic' forms --- doc/forum/field_and_forms.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/forum/field_and_forms.mdwn diff --git a/doc/forum/field_and_forms.mdwn b/doc/forum/field_and_forms.mdwn new file mode 100644 index 000000000..97fda1856 --- /dev/null +++ b/doc/forum/field_and_forms.mdwn @@ -0,0 +1,13 @@ +Dear ikiwiki users, and specially [[users/KathrynAndersen]] ([[users/rubykat]]): +have you considered some way of extending ikiwiki to allow some kind of +on-the-fly generation of web forms to create new pages? these web forms should +offer as many fields as one has defined in some [[page +template|plugins/contrib/ftemplate]], and, once POSTed, should create a page +using that template, with those fields already filled with the values the user +provided. + +I see this a a generalization of the `postform` option of the +[[ikiwiki/directive/inline]] directive. That option tells ikiwiki to create a +form with one field already filled (title). + +What are your ideas about this? -- cgit v1.2.3