summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2011-06-15 12:33:54 +0200
committerJonas Smedegaard <dr@jones.dk>2011-06-15 12:33:54 +0200
commit57bccb327efdb9fff0ff55ff07be3aed5b31e63f (patch)
treec2dc64fefad6b5301832f09244582f406e5f4b4b
parent90896aac9fcd3ce4b44643a3bc2773a831c0c3cf (diff)
Sync with ikiwiki 3.20110608.
-rw-r--r--ikiwiki/directive/calendar.mdwn2
-rw-r--r--ikiwiki/directive/commentmoderation.mdwn9
-rw-r--r--ikiwiki/directive/flattr.mdwn45
-rw-r--r--ikiwiki/directive/if.mdwn4
-rw-r--r--ikiwiki/directive/inline.mdwn6
-rw-r--r--ikiwiki/directive/meta.mdwn29
-rw-r--r--ikiwiki/directive/more.mdwn5
-rw-r--r--ikiwiki/directive/pagestats.mdwn2
-rw-r--r--ikiwiki/directive/template.mdwn10
9 files changed, 101 insertions, 11 deletions
diff --git a/ikiwiki/directive/calendar.mdwn b/ikiwiki/directive/calendar.mdwn
index e9216e1..cb40f88 100644
--- a/ikiwiki/directive/calendar.mdwn
+++ b/ikiwiki/directive/calendar.mdwn
@@ -28,7 +28,7 @@ to display or list pages created in the given time frame.
The `ikiwiki-calendar` command can be used to automatically generate the
archive pages. It also refreshes the wiki, updating the calendars to
highlight the current day. This command is typically run at midnight from
-cron. An example crontab:
+cron.
An example crontab:
diff --git a/ikiwiki/directive/commentmoderation.mdwn b/ikiwiki/directive/commentmoderation.mdwn
new file mode 100644
index 0000000..8553b5b
--- /dev/null
+++ b/ikiwiki/directive/commentmoderation.mdwn
@@ -0,0 +1,9 @@
+The `commentmoderation` directive is supplied by the
+[[!iki plugins/comments desc=comments]] plugin, and is used to link
+to the comment moderation queue.
+
+Example:
+
+ \[[!commentmoderation desc="here is the comment moderation queue"]]
+
+[[!meta robots="noindex, follow"]]
diff --git a/ikiwiki/directive/flattr.mdwn b/ikiwiki/directive/flattr.mdwn
new file mode 100644
index 0000000..5083005
--- /dev/null
+++ b/ikiwiki/directive/flattr.mdwn
@@ -0,0 +1,45 @@
+The `flattr` directive is supplied by the [[!iki plugins/flattr desc=flattr]] plugin.
+
+This directive allows easily inserting Flattr buttons onto wiki pages.
+
+Flattr supports both static buttons and javascript buttons. This directive
+only creates dynamic javascript buttons. If you want to insert a static
+Flattr button, you can simply copy the html code for it from Flattr, instead.
+Note that this directive inserts javascript code into the page, that
+loads more javascript code from Flattr.com. So only use it if you feel
+comfortable with that.
+
+The directive can be used to display a button for a thing you have already
+manually submitted to Flattr. In this mode, the only parameter you need to
+include is the exact url to the thing that was submitted to Flattr.
+(If the button is for the current page, you can leave that out.) For
+example, this is the Flattr button for ikiwiki. Feel free to add it to all
+your pages. ;)
+
+ \[[!flattr url="http://ikiwiki.info/" button=compact]]
+
+The directive can also be used to create a button that automatically
+submits a page to Flattr when a user clicks on it. In this mode you
+need to include parameters to specify your uid, and a title, category, tags,
+and description for the page. For example, this is a Flattr button for
+a blog post:
+
+ \[[!flattr uid=25634 title="my new blog post" category=text
+ tags="blog,example" description="This is a post on my blog."]]
+
+Here are all possible parameters you can pass to the Flattr directive.
+
+* `button` - Set to "compact" for a small button.
+* `url` - The url to the thing to be Flattr'd. If omitted, defaults
+ to the url of the current page.
+* `uid` - Your numeric Flattr userid. Not needed if the flattr plugin
+ has been configured with a global `flattr_userid`.
+* `title` - A short title for the thing, to show on its Flattr page.
+* `description` - A description of the thing, to show on its Flattr
+ page.
+* `category` - One of: text, images, video, audio, software, rest.
+* `tags` - A list of tags separated by a comma.
+* `language` - A language code.
+* `hidden` - Set to 1 to hide the button from listings on Flattr.com.
+
+[[!meta robots="noindex, follow"]]
diff --git a/ikiwiki/directive/if.mdwn b/ikiwiki/directive/if.mdwn
index 2cbf70c..492adf4 100644
--- a/ikiwiki/directive/if.mdwn
+++ b/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"]]
diff --git a/ikiwiki/directive/inline.mdwn b/ikiwiki/directive/inline.mdwn
index c6a23ce..22c18d9 100644
--- a/ikiwiki/directive/inline.mdwn
+++ b/ikiwiki/directive/inline.mdwn
@@ -75,6 +75,9 @@ Here are some less often needed parameters:
disable generating any feeds.
* `emptyfeeds` - Set to "no" to disable generation of empty feeds.
Has no effect if `rootpage` or `postform` is set.
+* `id` - Set to specify the value of the HTML `id` attribute for the
+ feed links or the post form. Useful if you have multiple forms in the
+ same page.
* `template` - Specifies the template to fill out to display each inlined
page. By default the `inlinepage` template is used, while
the `archivepage` template is used for archives. Set this parameter to
@@ -116,6 +119,3 @@ Here are some less often needed parameters:
in conjunction with this one.
[[!meta robots="noindex, follow"]]
-
-A related directive is the [[ikiwiki/directive/edittemplate]] directive, which allows
-default text for a new page to be specified.
diff --git a/ikiwiki/directive/meta.mdwn b/ikiwiki/directive/meta.mdwn
index 5a3919d..6b381f1 100644
--- a/ikiwiki/directive/meta.mdwn
+++ b/ikiwiki/directive/meta.mdwn
@@ -7,7 +7,8 @@ Enter the metadata as follows:
\[[!meta field="value" param="value" param="value"]]
The first form sets a given field to a given value, while the second form
-also specifies some additional sub-parameters.
+also specifies some additional sub-parameters. You can have only one field
+per `meta` directive, use more directives if you want to specify more fields.
The field values are treated as HTML entity-escaped text, so you can include
a quote in the text by writing `&quot;` and so on.
@@ -76,6 +77,21 @@ Supported fields:
\[[!meta stylesheet=somestyle rel="alternate stylesheet"
title="somestyle"]]
+
+ However, this will be scrubbed away if the
+ [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,
+ since it can be used to insert unsafe content.
+
+* script
+
+ Adds a script to a page. The script is treated as a wiki link to
+ a `.js` file in the wiki, so it cannot be used to add links to external
+ scripts. The optional `defer` and `async` keywords can be used to set
+ the corresponding HTML4 and HTML5 script options. Example:
+
+ \[[!meta script=somescript defer async]]
+
+ The tag is subject to scrubbing as with the stylesheet and link fields.
* openid
@@ -91,7 +107,7 @@ Supported fields:
Example:
- \\[[!meta openid="http://joeyh.myopenid.com/"
+ \[[!meta openid="http://joeyh.myopenid.com/"
server="http://www.myopenid.com/server"
xrds-location="http://www.myopenid.com/xrds?username=joeyh.myopenid.com""]]
@@ -165,6 +181,15 @@ Supported fields:
value. The date/time can be given in any format that
[[!cpan TimeDate]] can understand, just like the `date` field.
+* foaf
+
+ Adds a Friend of a Friend ([FOAF](http://wiki.foaf-project.org/w/Autodiscovery))
+ reference to a page.
+
+ Example:
+
+ \[[!meta foaf=foaf.rdf]]
+
If the field is not one of the above predefined fields, the metadata will be
written to the generated html page as a &lt;meta&gt; header. However, this
won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,
diff --git a/ikiwiki/directive/more.mdwn b/ikiwiki/directive/more.mdwn
index 5065519..bda1427 100644
--- a/ikiwiki/directive/more.mdwn
+++ b/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/ikiwiki/directive/pagestats.mdwn b/ikiwiki/directive/pagestats.mdwn
index d0e0e7b..8d904f5 100644
--- a/ikiwiki/directive/pagestats.mdwn
+++ b/ikiwiki/directive/pagestats.mdwn
@@ -26,7 +26,7 @@ entries, while ignoring other pages that use those tags, you could use:
Or to display a cloud of tags related to Linux, you could use:
- \[[!pagestats pages="tags/* and not tags/linux" among="tagged(linux)"]]
+ \[[!pagestats pages="tags/* and !tags/linux" among="tagged(linux)"]]
The optional `show` parameter limits display to the specified number of
pages. For instance, to show a table of the top ten pages with the most
diff --git a/ikiwiki/directive/template.mdwn b/ikiwiki/directive/template.mdwn
index 6c50fa3..9e3ae54 100644
--- a/ikiwiki/directive/template.mdwn
+++ b/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