summaryrefslogtreecommitdiff
path: root/riki.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-09-08 17:46:09 +0300
committerLars Wirzenius <liw@liw.fi>2022-09-08 17:46:09 +0300
commit2a52a50a70d49eac255c9e5c12f3036b3fc6bc2e (patch)
treeb7ca1b5189beee38403ff64cf4356dd16c4582af /riki.md
parent17bf42ac8c8cb1aeb145e6f8deeae62e5436e56f (diff)
downloadriki-2a52a50a70d49eac255c9e5c12f3036b3fc6bc2e.tar.gz
drop: img height, width
Not documented for ikiwiki. Sponsored-by: author
Diffstat (limited to 'riki.md')
-rw-r--r--riki.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/riki.md b/riki.md
index 9ec7d8e..4431cf0 100644
--- a/riki.md
+++ b/riki.md
@@ -428,6 +428,8 @@ then command fails
### `img`
+#### Simple image inclusion
+
_Requirement: the `img` directive embeds an image in the generated
HTML page._
@@ -447,6 +449,36 @@ then file output/index.html contains "<img src="img.jpg""
This is a dummy JPEG image.
~~~
+#### Image attributes
+
+_Requirement: the `img` directive allows useful attributes to be set._
+
+The [ikiwiki img
+directive](http://ikiwiki.info/ikiwiki/directive/img/) allows
+arguments:
+
+* `size`---The size parameter is optional, defaulting to full size.
+ You can specify only the width or the height, and the other value
+ will be calculated based on it: "200x", "x200".
+* `alt`, `title`, `class`, `align`, `id`, `hspace`, and
+ `vspace`---These are passed through unchanged to the html img tag.
+
+~~~scenario
+given an installed riki
+given file site/index.mdwn from img
+given file site/img.jpg from jpeg
+when I run riki build site output
+then file output/index.html contains "<img src="img.jpg""
+~~~
+
+~~~{#img .file .markdown}
+[[!img img.jpg]]]
+~~~
+
+~~~{#jpeg .file}
+This is a dummy JPEG image.
+~~~
+
### `meta title`
_Requirement: the `meta title` directive sets page title._