summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKaushal Modi <kaushal.modi@gmail.com>2018-02-05 14:06:29 -0500
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-02-09 22:27:58 +0100
commit2e95ec6844bf65a25485bdc8e2638e45788f2dcf (patch)
tree977cee6771f6a45bb446fd40a12afe0453c50d8c /docs
parent76d38d5e5322fc6220fb9e74f9ca0668606ebb5d (diff)
Add "target" and "rel" parameters to figure shortcode
Also: - Remove unnecessary space from `figure` tag if no class is specified. - Update related tests. - Add test cases for the changes made to the figure shortcode. - Document the newly added target and rel parameters - Add more detail to the documentation of all figure shortcode parameters.
Diffstat (limited to 'docs')
-rw-r--r--docs/content/content-management/shortcodes.md44
-rw-r--r--docs/content/templates/shortcode-templates.md2
2 files changed, 36 insertions, 10 deletions
diff --git a/docs/content/content-management/shortcodes.md b/docs/content/content-management/shortcodes.md
index b6428f5a0..e5bc85265 100644
--- a/docs/content/content-management/shortcodes.md
+++ b/docs/content/content-management/shortcodes.md
@@ -80,15 +80,41 @@ Hugo ships with a set of predefined shortcodes that represent very common usage.
The `figure` shortcode can use the following named parameters:
-* `src`
-* `link`
-* `title`
-* `caption`
-* `class`
-* `attr` (i.e., attribution)
-* `attrlink`
-* `alt`
-* `width`
+src
+: URL of the image to be displayed.
+
+link
+: If the image needs to be hyperlinked, URL of the destination.
+
+target
+: Optional `target` attribute for the URL if `link` parameter is set.
+
+rel
+: Optional `rel` attribute for the URL if `link` parameter is set.
+
+alt
+: Alternate text for the image if the image cannot be displayed.
+
+title
+: Image title.
+
+caption
+: Image caption.
+
+class
+: `class` attribute of the HTML `figure` tag.
+
+height
+: `height` attribute of the image.
+
+width
+: `width` attribute of the image.
+
+attr
+: Image attribution text.
+
+attrlink
+: If the attribution text needs to be hyperlinked, URL of the destination.
#### Example `figure` Input
diff --git a/docs/content/templates/shortcode-templates.md b/docs/content/templates/shortcode-templates.md
index de1594281..08f1b4c80 100644
--- a/docs/content/templates/shortcode-templates.md
+++ b/docs/content/templates/shortcode-templates.md
@@ -218,7 +218,7 @@ You have created the shortcode at `/layouts/shortcodes/img.html`, which loads th
Would be rendered as:
{{< code file="img-output.html" copy="false" >}}
-<figure >
+<figure>
<img src="/media/spf13.jpg" />
<figcaption>
<h4>Steve Francia</h4>