diff options
Diffstat (limited to 'riki.md')
-rw-r--r-- | riki.md | 41 |
1 files changed, 36 insertions, 5 deletions
@@ -447,7 +447,7 @@ then file output/index.html contains "<img src="img.jpg"" ~~~ ~~~{#img .file .markdown} -[[!img img.jpg]]] +[[!img img.jpg]] ~~~ ~~~{#jpeg .file} @@ -477,9 +477,9 @@ then file output/index.html contains "<img src="c.jpg" height="200">" ~~~ ~~~{#img-size .file .markdown} -[[!img a.jpg size="100x200"]]] -[[!img b.jpg size="100x"]]] -[[!img c.jpg size="x200"]]] +[[!img a.jpg size="100x200"]] +[[!img b.jpg size="100x"]] +[[!img c.jpg size="x200"]] ~~~ #### Image attributes @@ -511,9 +511,40 @@ then file output/index.html contains "vspace="vspc"" ~~~{#img-attr .file .markdown} [[!img img.jpg alt="halt malt" title="tightle" class="klass" align="malign" - id="kid" hspace="hspc" vspace="vspc"]]] + id="kid" hspace="hspc" vspace="vspc"]] ~~~ +#### Image link generation + +_Requirement: the `img` directive can make an image be a link._ + +The [ikiwiki img +directive](http://ikiwiki.info/ikiwiki/directive/img/) allows +arguments: + +> The link parameter is used to control whether the scaled 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. + +~~~scenario +given an installed riki +given file site/index.mdwn from img-link +given file site/a.jpg from jpeg +given file site/b.jpg from jpeg +when I run riki build site output +when I run cat output/index.html +then file output/index.html contains "<a href="a.jpg"><img src="a.jpg"" +then file output/index.html doesn't contain "<a href="b.jpg"><img src="b.jpg"" +~~~ + +~~~{#img-link .file .markdown} +[[!img a.jpg]] +[[!img b.jpg link=no]] +~~~ + + + ### `meta title` _Requirement: the `meta title` directive sets page title._ |