From fc296d49a01377704443280d9ba2c04e6aff3de0 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" Date: Thu, 23 Sep 2010 10:15:19 +0000 Subject: b00g --- doc/ikiwiki/directive/table/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/ikiwiki/directive/table/discussion.mdwn (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/table/discussion.mdwn b/doc/ikiwiki/directive/table/discussion.mdwn new file mode 100644 index 000000000..87d2e0cd1 --- /dev/null +++ b/doc/ikiwiki/directive/table/discussion.mdwn @@ -0,0 +1 @@ +The problem I have in my tables, is that some fields contain example HTML that needs to be escaped. -- cgit v1.2.3 From 5448a9324e98a8aff32c68bf00ea8093aeb99167 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" Date: Fri, 8 Oct 2010 10:05:07 +0000 Subject: --- doc/ikiwiki/directive/aggregate/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/ikiwiki/directive/aggregate/discussion.mdwn (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/aggregate/discussion.mdwn b/doc/ikiwiki/directive/aggregate/discussion.mdwn new file mode 100644 index 000000000..cf3d2022f --- /dev/null +++ b/doc/ikiwiki/directive/aggregate/discussion.mdwn @@ -0,0 +1,3 @@ +It would be awesome if table could aggregrate remote CSVs too. I want something like: + + !table file="http://cyclehireapp.com/cyclehirelive/cyclehire.csv" -- cgit v1.2.3 From d567c8b209e6643f603d04f8f62f2ca67e9154c6 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Sat, 23 Oct 2010 17:35:42 +0000 Subject: expand on using templates outside the wiki source directory --- doc/ikiwiki/directive/template.mdwn | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index 6c50fa32e..9e3ae54df 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -34,11 +34,15 @@ large chunks of marked up text to be embedded into a template: The template is a regular wiki page, located in the `templates/` subdirectory inside the source directory of the wiki. -(Alternatively, templates can be stored in a directory outside the wiki, +Alternatively, templates can be stored in a directory outside the wiki, as files with the extension ".tmpl". -By default, these are searched for in `/usr/share/ikiwiki/templates`; +By default, these are searched for in `/usr/share/ikiwiki/templates`, the `templatedir` setting can be used to make another directory be searched -first.) +first. When referring to templates outside the wiki source directory, the "id" +parameter is not interpreted as a pagespec, and you must include the full filename +of the template page, including the ".tmpl" extension. E.g.: + + \[[!template id=blogpost.tmpl]] The template uses the syntax used by the [[!cpan HTML::Template]] perl module, which allows for some fairly complex things to be done. Consult its -- cgit v1.2.3 From da9e1ea667f82d5fca9168dbed19be08040570ff Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 15 Nov 2010 14:28:05 +0000 Subject: guard templates with the if directive where necessary --- doc/ikiwiki/directive/template.mdwn | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index 9e3ae54df..df391f99e 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -60,22 +60,30 @@ few things: `text`. * To use one block of text if a variable is set and a second if it's not, use `textother text` +* Each template file included in the wiki's source will also generate a regular + wiki page. In many cases you might want to prevent some of your template + being interpreted for the regular page. Use the [[if]] directive with the + `included()` test to guard the template code. Here's a sample template: - - Name: \[[]]
- Age:
- - Favorite color:
- - No favorite color.
-
- -
- -
-
+ \[[!if test="included()" then=""" + + Name: \[[]]
+ Age:
+ + Favorite color:
+ + No favorite color.
+
+ +
+ +
+
+ """ else=""" + This is a template page. + """]] The filled out template will be formatted the same as the rest of the page that contains it, so you can include WikiLinks and all other forms of wiki -- cgit v1.2.3 From 62fc5d0c3cfdde0ae87c5364db6f6ebfa6794b14 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 15 Nov 2010 14:41:40 +0000 Subject: I totally misinterpreted what included() is supposed to be for. This reverts commit da9e1ea667f82d5fca9168dbed19be08040570ff --- doc/ikiwiki/directive/template.mdwn | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index df391f99e..9e3ae54df 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -60,30 +60,22 @@ few things: `text`. * To use one block of text if a variable is set and a second if it's not, use `textother text` -* Each template file included in the wiki's source will also generate a regular - wiki page. In many cases you might want to prevent some of your template - being interpreted for the regular page. Use the [[if]] directive with the - `included()` test to guard the template code. Here's a sample template: - \[[!if test="included()" then=""" - - Name: \[[]]
- Age:
- - Favorite color:
- - No favorite color.
-
- -
- -
-
- """ else=""" - This is a template page. - """]] + + Name: \[[]]
+ Age:
+ + Favorite color:
+ + No favorite color.
+
+ +
+ +
+
The filled out template will be formatted the same as the rest of the page that contains it, so you can include WikiLinks and all other forms of wiki -- cgit v1.2.3 From 84fff62948ad7c7aef664585e8afed86398e7fd4 Mon Sep 17 00:00:00 2001 From: "http://jmtd.livejournal.com/" Date: Mon, 15 Nov 2010 14:46:13 +0000 Subject: note about template inclusion --- doc/ikiwiki/directive/if.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/if.mdwn b/doc/ikiwiki/directive/if.mdwn index 2cbf70cdf..492adf499 100644 --- a/doc/ikiwiki/directive/if.mdwn +++ b/doc/ikiwiki/directive/if.mdwn @@ -43,6 +43,8 @@ with the following additional tests: * included() - Tests whether the page is being included onto another page. + Tests whether the page is being included onto another page, for example + via [[inline]] or [[map]]. Note that pages inserted into other pages + via [[template]] are not matched here. [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From ec6c1269d251c78d2eef68cb789de6cfc6272464 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Nov 2010 15:00:04 -0400 Subject: more: Add pages parameter to limit where the more is displayed. (thanks, dark) --- IkiWiki/Plugin/more.pm | 5 ++++- debian/changelog | 2 ++ doc/ikiwiki/directive/more.mdwn | 5 +++++ doc/todo/selective_more_directive.mdwn | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) (limited to 'doc/ikiwiki/directive') diff --git a/IkiWiki/Plugin/more.pm b/IkiWiki/Plugin/more.pm index 80e339a1b..6880e366d 100644 --- a/IkiWiki/Plugin/more.pm +++ b/IkiWiki/Plugin/more.pm @@ -26,7 +26,10 @@ sub preprocess (@) { $params{linktext} = $linktext unless defined $params{linktext}; - if ($params{page} ne $params{destpage}) { + if ($params{page} ne $params{destpage} && + (! exists $params{pages} || + pagespec_match($params{destpage}, $params{pages}, + location => $params{page}))) { return "\n". htmllink($params{page}, $params{destpage}, $params{page}, linktext => $params{linktext}, diff --git a/debian/changelog b/debian/changelog index 91ff0964b..faabf1993 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ikiwiki (3.20101113) UNRELEASED; urgency=low * websetup: Fix encoding problem when restoring old setup file. + * more: Add pages parameter to limit where the more is displayed. + (thanks, dark) -- Joey Hess Tue, 16 Nov 2010 14:23:47 -0400 diff --git a/doc/ikiwiki/directive/more.mdwn b/doc/ikiwiki/directive/more.mdwn index 506551910..bda1427f3 100644 --- a/doc/ikiwiki/directive/more.mdwn +++ b/doc/ikiwiki/directive/more.mdwn @@ -11,6 +11,11 @@ leads to the full version of the page. Use it like this: If the `linktext` parameter is omitted it defaults to just "more". +An optional `pages` parameter can be used to specify a +[[ikiwiki/PageSpec]], and then the "more" link will only be displayed +when the page is inlined into a page matching that PageSpec, and otherwise +the full content shown. + Note that you can accomplish something similar using a [[toggle]] instead. [[!meta robots="noindex, follow"]] diff --git a/doc/todo/selective_more_directive.mdwn b/doc/todo/selective_more_directive.mdwn index 24e6ab568..2a9998205 100644 --- a/doc/todo/selective_more_directive.mdwn +++ b/doc/todo/selective_more_directive.mdwn @@ -24,3 +24,5 @@ I can now call it as I'm not entirely happy with the design, since I would rather put this information in the inline directive instead of in every story post. Unfortunately I found no way to pass parameters from the inline directive to the inlined page. -- [[dark]] + +> Me neither, but nor do I see a better way, so [[applied|done]]. --[[Joey]] -- cgit v1.2.3 From 937c0629bf3d4629088171d182ada03edad46304 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 16 Dec 2010 14:15:55 -0400 Subject: response --- doc/ikiwiki/directive/aggregate/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/aggregate/discussion.mdwn b/doc/ikiwiki/directive/aggregate/discussion.mdwn index cf3d2022f..ddece9746 100644 --- a/doc/ikiwiki/directive/aggregate/discussion.mdwn +++ b/doc/ikiwiki/directive/aggregate/discussion.mdwn @@ -1,3 +1,10 @@ It would be awesome if table could aggregrate remote CSVs too. I want something like: !table file="http://cyclehireapp.com/cyclehirelive/cyclehire.csv" + +> Ok, but that has nothing to do with the aggregate plugin. File a +> [[todo]]? +> +> Anyway, it seems difficult, how would it know when the remote content +> had changed? Aggregate has its cron job support and has time stamps +> in rss feeds to rely on. --[[Joey]] -- cgit v1.2.3