summaryrefslogtreecommitdiff
path: root/underlays/basewiki/directive/img.mdwn
diff options
context:
space:
mode:
authorWilliam Uther <willu@cse.unsw.edu.au>2008-09-11 17:04:23 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-09-11 17:05:19 -0400
commit4f0ac7fe59c196a602e07cc6c4abfc248999ec6b (patch)
tree725f523faeb8e8db0efd81be4024257799c93ef8 /underlays/basewiki/directive/img.mdwn
parent595b0359157d1f57ee5a87c63e665dfa1d2130ec (diff)
add underlay files for listdirectives
As was noted, 'listdirectives' didn't include the underlay files that make it really worthwhile. I've just gone through all the plugin documentation, modified it to remove installation information and renamed the files to match the directives rather than the plugins. This can now serve as useful underlay. I've only gone through plugins in the 'plugins' dir. I did not go through the 'contrib' dir.
Diffstat (limited to 'underlays/basewiki/directive/img.mdwn')
-rw-r--r--underlays/basewiki/directive/img.mdwn36
1 files changed, 36 insertions, 0 deletions
diff --git a/underlays/basewiki/directive/img.mdwn b/underlays/basewiki/directive/img.mdwn
new file mode 100644
index 000000000..d8c9f359f
--- /dev/null
+++ b/underlays/basewiki/directive/img.mdwn
@@ -0,0 +1,36 @@
+The `img` directive is supplied by the [[!iki plugins/img]] plugin.
+
+This is an image handling directive. While ikiwiki supports inlining full-size
+images by making a [[ikiwiki/WikiLink]] that points to the image, using
+this plugin you can easily scale down an image for inclusion onto a page,
+providing a link to a full-size version.
+
+## usage
+
+ \[[!img image1.jpg size="200x200" alt="clouds"]]
+
+The image file will be searched for using the same rules as used to find
+the file pointed to by a [[ikiwiki/WikiLink]].
+
+The `size` parameter is optional, defaulting to full size. Note that the
+original image's aspect ratio is always preserved, even if this means
+making the image smaller than the specified size. You can also specify only
+the width or the height, and the other value will be calculated based on
+it: "200x", "x200".
+
+You can also pass `alt`, `title`, `class` and `id` parameters. These are
+passed through unchanged to the html img tag. If you include a `caption`
+parameter, the caption will be displayed centered beneath the image.
+
+The `link` parameter is used to control whether the scaled down image links
+to the full size version. By default it does; set "link=somepage" to link
+to another page instead, or "link=no" to disable the link, or
+"link=http://url" to link to a given url.
+
+You can also set default values that will be applied to all later images on
+the page, unless overridden. Useful when including many images on a page.
+
+ \[[!img defaults size=200x200 alt="wedding photo"]]
+ \[[!img photo1.jpg]]
+ \[[!img photo2.jpg]]
+ \[[!img photo3.jpg size=200x600]]