title: Using Netlify CMS with Hugo - creating posts with galleries
body: <p>I'm new to both Hugo and Netlify, so it's possible I'm simply doing this wrong.</p>
  
  <p>I've successfully built and deployed a site with galleries, using <a href="https://hugodocs.info/" rel="nofollow noreferrer">Hugo</a>, the <a href="https://galleria.io/" rel="nofollow noreferrer">Galleria</a> plugin, and deploying to <a href="https://www.netlify.com/" rel="nofollow noreferrer">Netlify</a> This has all worked. However, I want to try using the <a href="https://www.netlifycms.org/" rel="nofollow noreferrer">Netlify CMS</a>, and am struggling to set it up to handle the gallery feature (it's doing fine for just writing a text post)</p>
  
  <p>I'm not sure if this is a limitation of Netlify CMS, or if I'm doing galleries in a way that isn't suited to static sites.</p>
  
  <p>To implement the gallery in Hugo, I am doing the following in the front matter of each post:</p>
  
  <pre><code>+++
  date = "2017-02-13T23:17:09+01:00"
  summary = "In which I fail to RTFM, visit a Lamasery, and eat a lot of fruit."
  tags = []
  title = "China 2017: Day 11"
  
  [[galleria]]
  imgSrc = "../images/china/11/Lama-Temple.JPG"
  imgTitle = "Hall In The Lama Temple"
  imgDesc = "One of the main halls of the Lama Temple."
  
  [[galleria]]
  imgSrc = "../images/china/11/Octagonal-Hall.JPG"
  imgTitle = "Octagonal Hall"
  imgDesc = "An octagonal building just inside the entrance of the Lama Temple"
  
  .
  .
  .
  +++
  </code></pre>
  
  <p>Then in the layout page:</p>
  
  <pre><code>  {{ if isset .Params "galleria" }}
    &lt;div class="galleria"&gt;
    {{ range .Params.galleria}}
    &lt;img src="{{ .imgSrc }}" alt="{{ .imgTitle }}" data-title="{{ .imgTitle }}" data-description="{{ .imgDesc }}"&gt;
    {{ end }}
    &lt;/div&gt;
    {{ end }}
  </code></pre>
  
  <p>The on the Netlify CMS setup I tried adding an Object widget:</p>
  
  <pre><code> -  name: "galleria"
           label: "Gallery" 
           widget: "object"
           optional: true
           fields:
            - {label: "Title", name: "imgTitle", widget: "string"}
            - {label: "Gallery Image", name: "imgSrc", widget: "image"}
            - {label: "Description", name: "imgDesc", widget: "string"}
  </code></pre>
  
  <p>I'm left with two problems:</p>
  
  <p>(i) The object shows up, but of course only once. How would I set it up to allow me to enter as many images as I want?</p>
  
  <p>(ii) On build, I'm getting an error: <code>ERROR 2017/05/28 22:37:20 Error while rendering "page": template: _default/single.html:23:15: executing "_default/single.html" at &lt;.imgSrc&gt;: can't evaluate field imgSrc in type interface {}</code></p>
  
  <p>So it seems I'm doing something wrong even trying to get one image (and associated data) in to a post.</p>