From 3bc56e9ecc2d5585761a6d25e2133d02f1ad1034 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Fri, 16 Mar 2018 14:36:29 -0400 Subject: [PATCH] Fix shortcode name in example: image -> img Fixes https://github.com/gohugoio/hugoDocs/issues/126. --- content/templates/shortcode-templates.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/templates/shortcode-templates.md b/content/templates/shortcode-templates.md index 08f1b4c80..67e54089f 100644 --- a/content/templates/shortcode-templates.md +++ b/content/templates/shortcode-templates.md @@ -301,9 +301,9 @@ The following example is contrived but demonstrates the concept. Assume you have {{< /code >}} -You also have an `image` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes so that the parent defines the context of each `image`: +You also have an `img` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes, so that the parent defines the context of each `img`: -{{< code file="layouts/shortcodes/image.html" >}} +{{< code file="layouts/shortcodes/img.html" >}} {{- $src := .Get "src" -}} {{- with .Parent -}} @@ -322,7 +322,7 @@ You can then call your shortcode in your content as follows: {{}} ``` -This will output the following HTML. Note how the first two `image` shortcodes inherit the `class` value of `content-gallery` set with the call to the parent `gallery`, whereas the third `image` only uses `src`: +This will output the following HTML. Note how the first two `img` shortcodes inherit the `class` value of `content-gallery` set with the call to the parent `gallery`, whereas the third `img` only uses `src`: ```