Image gallery from markdown using shortcode

my mistake, it still isn’t working. function "gallery" not defined

I think you have to post a more complete example: The full shortcode and an example of using it.

The markdown file

{{< gallery html >}}
<img src="http://demosthenes.info/assets/images/austin-fireworks.jpg" alt="">
<img src="http://demosthenes.info/assets/images/taj-mahal.jpg" alt="">
<img src="http://demosthenes.info/assets/images/ibiza.jpg" alt="">
<img src="http://demosthenes.info/assets/images/ankor-wat.jpg" alt="">
<img src="http://demosthenes.info/assets/images/austin-fireworks.jpg" alt="">
 {{< /gallery >}}

I just want to take this chunk of code and move it to the html layout single.html

I thought it was working with with a file called /shortcodes/gallery

within that I have a single line: {{ index .Inner }}

I was then calling it in the single.html file with {{ template "shortcodes/gallery.html" . }}

Shortcodes doesn’t work from template files. Content (md) files only.

I don’t understand. What do I put in the md file, the /shortcode/gallery.html and the single.html?

You asked about “image gallery from markdown using shortcode” then using it from the template.

The shortcodes are built for the markdown files (md) with {{< and {{% syntax.

Please read the documentation in

as I have said above, I am using it in the markdown files. the documentation does not explain how to set up the code in layouts/shortcodes or how to call it into the html page. if it does, please tell me where it says.

This and the function “gallery” not defined tells me that you try to use it from a template.

If that is NOT the case, I have no clue - and would have to see the complete project (or a similar breaking sample) to figure it out.

I think I was trying to do the opposite of what the shortcodes do. apologies.