I am trying to build a slideshow that would iterate over all the files contained in a “thumbs” folder next to my foo.md
content file. It seems that the golang template are not analysed and outputted as is. Could you please be kind enough to let me know what I am missing ?
Hugo version
Hugo Static Site Generator v0.15-DEV BuildDate: 2015-11-02T18:05:51+01:00
My markup file
+++
author = "yann"
date = "2015-11-02T15:33:59+01:00"
draft = true
gallery = "content/gallery/foo/thumbs"
slug = "foo"
tags = ["nature",]
title = "foo"
+++
<ul>
{{ $files := readDir .Params.gallery }}
{{ range $files }}<li>{{ .Name }}</li>{{ end }}
</ul>
<div class="slider slider-for">
<div><img src="thumbs/dsc04022.jpg"></div>
<div><img src="thumbs/dsc04023.jpg"></div>
<div><img src="thumbs/dsc04026.jpg"></div>
<div><img src="thumbs/dsc04035.jpg"></div>
</div>
Thank you for you help.