From 219e7e29a49a55a02e5ec6213a41aa82afdad5a0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 10:14:13 -0400 Subject: web commit by intrigeri: initial pedigree plugin proposal --- doc/todo/pedigree_plugin.mdwn | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 doc/todo/pedigree_plugin.mdwn (limited to 'doc/todo') diff --git a/doc/todo/pedigree_plugin.mdwn b/doc/todo/pedigree_plugin.mdwn new file mode 100644 index 000000000..2ff9487f1 --- /dev/null +++ b/doc/todo/pedigree_plugin.mdwn @@ -0,0 +1,30 @@ +After realizing (thanks to +[[Allow_TITLE_to_include_part_of_the_path_in_addition_to_the_basename]]) +that I needed some kind of "parentlinks on steroids", I wrote a new +plugin, called pedigree. + +This plugin provides a bunch of loops that one can use in his/her +`HTML::Template`'s to iterate over all or a subset of a page's +parents. Inside these loops, half a dozen variables are made +available, in addition to `PAGE` and `URL` that are already provided +by parentlinks. + +Amongst many possibilities, one can e.g. simply use this plugin to +give every parent link a different `class=` attribute, depending +either on its depth in the path leading to the current page, or on its +distance to it. + +The code and documentation (including simple and complex usage +examples) are in the 'pedigree' Git branch in this repo: + + git://repo.or.cz/ikiwiki/intrigeri.git + +Seems there is also a [gitweb](http://repo.or.cz/w/ikiwiki/intrigeri.git). + +Any opinions on the idea/design/implementation? + +What needs to be changed so that it's possible to include it in +mainline ikiwiki? + +(I'll try never to rebase this branch, but writing this plugin has +been a pretext for me to start learning Git, so...) -- cgit v1.2.3 From 59ad1a440aa71be06f2db8fdd1edb98f3f0bd39b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 10:15:53 -0400 Subject: web commit by intrigeri: added link to pedigree_plugin --- ...w_TITLE_to_include_part_of_the_path_in_addition_to_the_basename.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/todo') diff --git a/doc/todo/Allow_TITLE_to_include_part_of_the_path_in_addition_to_the_basename.mdwn b/doc/todo/Allow_TITLE_to_include_part_of_the_path_in_addition_to_the_basename.mdwn index 27d238ecd..b97c81efa 100644 --- a/doc/todo/Allow_TITLE_to_include_part_of_the_path_in_addition_to_the_basename.mdwn +++ b/doc/todo/Allow_TITLE_to_include_part_of_the_path_in_addition_to_the_basename.mdwn @@ -75,5 +75,5 @@ a dedicated plugin, called `genealogictitle` or whatever, and : >> Well, it seems I once more designed a solution before clearly >> defining my problem... What I really need is more generic, can be ->> done as a plugin, and deserves its own todo item (yet to come), so +>> done as a plugin, and deserves its own [[todo|pedigree_plugin]], so >> I'm tagging this one wontfix^W [[done]]. I'm sorry. -- intrigeri -- cgit v1.2.3 From 5f4c424f3b549571330f43109eb022ddd16f35ba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 10:18:50 -0400 Subject: web commit by intrigeri: added suggestion to move functionnality from the core to pedigree plugin --- doc/todo/pedigree_plugin.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/todo') diff --git a/doc/todo/pedigree_plugin.mdwn b/doc/todo/pedigree_plugin.mdwn index 2ff9487f1..fb1e2a4e5 100644 --- a/doc/todo/pedigree_plugin.mdwn +++ b/doc/todo/pedigree_plugin.mdwn @@ -28,3 +28,5 @@ mainline ikiwiki? (I'll try never to rebase this branch, but writing this plugin has been a pretext for me to start learning Git, so...) + +To finish with, it seems no plugin bundled with ikiwiki uses the current parentlinks implementation, so one could event think of moving it from the core to this plugin (which should then be enabled by default, since the default templates do use parentlinks ;). -- cgit v1.2.3 From f8de860a44eabe5f954641d48d0bdf2e804519d7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 11:29:19 -0400 Subject: web commit by http://ptecza.myopenid.com/: * Request for color plugin --- doc/todo/color_plugin.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/todo/color_plugin.mdwn (limited to 'doc/todo') diff --git a/doc/todo/color_plugin.mdwn b/doc/todo/color_plugin.mdwn new file mode 100644 index 000000000..f8fd11091 --- /dev/null +++ b/doc/todo/color_plugin.mdwn @@ -0,0 +1,16 @@ +Recently I've wanted to colour some piece of text on my Ikiwiki page. +It seems that Markdown can do it only using HTML tags, so I used +<span class="color">foo bar baz</span>. + +However, in my opinion mixing Markdown syntax and HTML tags is rather ugly, +so maybe we should create a new color plugin to add more color to Ikiwiki ;) +I know that another Wikis have similar plugin, for example +[WikiDot](http://www.wikidot.com/). + +I've noticed that htmlscrubber plugin strips `style` attribute, because of +security, so probably we need to use `class` attribute of HTML. But then +we have to customize our `local.css` file to add all color we want to use. +It's not as easy in usage like color name or definition as plugin argument, +but I don't have a better idea right now. + +What do you think about it? --[[Paweł|ptecza]] -- cgit v1.2.3 From d0d9ae5f8c548f87ba3ad3bdb2271b69920cf7cc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 14:07:36 -0400 Subject: response --- doc/todo/pedigree_plugin.mdwn | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'doc/todo') diff --git a/doc/todo/pedigree_plugin.mdwn b/doc/todo/pedigree_plugin.mdwn index fb1e2a4e5..100d94b83 100644 --- a/doc/todo/pedigree_plugin.mdwn +++ b/doc/todo/pedigree_plugin.mdwn @@ -21,12 +21,45 @@ examples) are in the 'pedigree' Git branch in this repo: Seems there is also a [gitweb](http://repo.or.cz/w/ikiwiki/intrigeri.git). +> Ok, I'll take a look. BTW, could you allow user joey on repo.or.cz +> push access to the main ikiwiki repo you set up there? --[[Joey]] + Any opinions on the idea/design/implementation? -What needs to be changed so that it's possible to include it in -mainline ikiwiki? +> Seems that there should be a more generic way to do `PEDIGREE_BUT_ROOT` +> and `PEDIGREE_BUT_TWO_OLDEST` (also `is_second_ancestor`, +> `is_grand_mother` etc). One way would be to include in `PEDIGREE` +> a set of values like `depth_1`, `depth_2`, etc. The one corresponding +> to the `absdepth` would be true. This would allow a template like this: + + + + + + + /* only showing pages 2 levels deep */ + + + + +> The only missing information would be `reldepth`, but in the above +> example the author of that template knows that it's `absdepth - 1` +> (Things would be a lot nicer if `HTML::Template` had equality tests!) +> +> Since this would make it more generic and also fix your one documented +> bug, I can see no reason not to do it. ;-) --[[Joey]] (I'll try never to rebase this branch, but writing this plugin has been a pretext for me to start learning Git, so...) -To finish with, it seems no plugin bundled with ikiwiki uses the current parentlinks implementation, so one could event think of moving it from the core to this plugin (which should then be enabled by default, since the default templates do use parentlinks ;). +To finish with, it seems no plugin bundled with ikiwiki uses the current +parentlinks implementation, so one could event think of moving it from the +core to this plugin (which should then be enabled by default, since the +default templates do use parentlinks ;). + +> I think that moving parentlinks out to a plugin is a good idea. +> However, if it's done, I think the plugin should be named parentlinks, +> and should continue to use the same template variables as are used now, +> to avoid needing to change custom templates. Pedigree is a quite nice +> name, but renaming it to parentlinks seems to be the way to go to me. +> --[[Joey]] -- cgit v1.2.3 From 901487df5ed213c7e82bf176d369617fdd1fbda3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 16:10:47 -0400 Subject: web commit by XTaran: post-commit hooks work fine here at least with recent ikwiki versions and hg 1.0.x -> remove it from todo list --- doc/todo/mercurial.mdwn | 2 -- 1 file changed, 2 deletions(-) (limited to 'doc/todo') diff --git a/doc/todo/mercurial.mdwn b/doc/todo/mercurial.mdwn index 0a1098f70..77b538c02 100644 --- a/doc/todo/mercurial.mdwn +++ b/doc/todo/mercurial.mdwn @@ -1,5 +1,3 @@ -* Need to get post commit hook working (or an example of how to use it.) - * See below. --[[bma]] * rcs_notify is not implemented (not needed in this branch --[[Joey]]) * Is the code sufficiently robust? It just warns when mercurial fails. * When rcs_commit is called with a $user that is an openid, it will be -- cgit v1.2.3 From aecfebc26d000ab228cd406f5ac51df69352fbae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 16:08:54 -0400 Subject: response --- doc/todo/color_plugin.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/todo') diff --git a/doc/todo/color_plugin.mdwn b/doc/todo/color_plugin.mdwn index f8fd11091..ac6eb8c51 100644 --- a/doc/todo/color_plugin.mdwn +++ b/doc/todo/color_plugin.mdwn @@ -14,3 +14,15 @@ It's not as easy in usage like color name or definition as plugin argument, but I don't have a better idea right now. What do you think about it? --[[Paweł|ptecza]] + +> Making a plugin preserve style attributes can be done, it just has to add +> them after the sanitize step, which strips them. The general method is +> adding placeholders first, and replacing them with the real html later. +> +> The hard thing to me seems to be finding a syntax that is better than a +> ``. A preprocessor directive is not really any less ugly than html +> tags, though at least it could play nicely with nested markdown: --[[Joey]] +> +> \[[color red,green """ +> Xmas-colored markdown here +> """]] -- cgit v1.2.3 From 66053f6fc7b300c9b49a5c69d2c7a1eeec841743 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Jul 2008 17:22:06 -0400 Subject: web commit by intrigeri: pedigree: (begining of) answer --- doc/todo/pedigree_plugin.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/todo') diff --git a/doc/todo/pedigree_plugin.mdwn b/doc/todo/pedigree_plugin.mdwn index 100d94b83..8214385d2 100644 --- a/doc/todo/pedigree_plugin.mdwn +++ b/doc/todo/pedigree_plugin.mdwn @@ -24,6 +24,10 @@ Seems there is also a [gitweb](http://repo.or.cz/w/ikiwiki/intrigeri.git). > Ok, I'll take a look. BTW, could you allow user joey on repo.or.cz > push access to the main ikiwiki repo you set up there? --[[Joey]] +>> I did not. The main ikiwiki repo on repo.or.cz seems to have been +>> been setup by johannes.schindelin@gmx.de ; mine is what they call +>> a "fork" (but it's not, obviously). + Any opinions on the idea/design/implementation? > Seems that there should be a more generic way to do `PEDIGREE_BUT_ROOT` @@ -49,6 +53,11 @@ Any opinions on the idea/design/implementation? > Since this would make it more generic and also fix your one documented > bug, I can see no reason not to do it. ;-) --[[Joey]] +>> Thanks for your comments. I'll answer soon. (Grrr, I really +>> need to find a way to edit this wiki offline, every minute +>> online costs bucks to me, my old modem gently weeps, +>> and I hate webbrowsers.) -- intrigeri + (I'll try never to rebase this branch, but writing this plugin has been a pretext for me to start learning Git, so...) @@ -63,3 +72,5 @@ default templates do use parentlinks ;). > to avoid needing to change custom templates. Pedigree is a quite nice > name, but renaming it to parentlinks seems to be the way to go to me. > --[[Joey]] + +>> Agreed. -- intrigeri -- cgit v1.2.3