Content in a specific section (“batches”) all have specific frontmatter data (“stock”), like this:
---
date: "2016-01-27T01:00:00"
title: "Red and white"
batch:
stock: "~2"
---
...
In the index.html
template, I have this loop:
{{ range .Data.Pages }}
{{ if eq "batches" .Type }}
<p>Stock level: <strong>{{ THIS_IS_WHAT_I_DONT_KNOW }}</strong></p>
{{ end }}
{{ end }}
My question is what must go into that THIS_IS_WHAT_I_DONT_KNOW
so that I can get the value of the stock
variable?