diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-09-08 17:46:09 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-09-08 17:46:09 +0300 |
commit | 2a52a50a70d49eac255c9e5c12f3036b3fc6bc2e (patch) | |
tree | b7ca1b5189beee38403ff64cf4356dd16c4582af /riki.md | |
parent | 17bf42ac8c8cb1aeb145e6f8deeae62e5436e56f (diff) | |
download | riki-2a52a50a70d49eac255c9e5c12f3036b3fc6bc2e.tar.gz |
drop: img height, width
Not documented for ikiwiki.
Sponsored-by: author
Diffstat (limited to 'riki.md')
-rw-r--r-- | riki.md | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -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._ |