How do I access a front matter param in a .Site.Taxonomies loop.
Ex: My post front matter looks like this:
---
title: post title
categories: ["reviews"]
author: "author name"
score: 4
---
I can access title with .Page.Title, but how do I access author and score in the loop below:
{{ range first 5 .Site.Taxonomies.categories.reviewsl }}
{{ .Page.Title }}
{{ .Params.author }} // doesn't work
{{ .Params.score }} // doesn't work
{{ end }}
Are you getting an error or just a blank page? If the former, my first guess is that you might have front matter where author and score is not present. Have you tried checking for the presence of the aforementioned front matter first?
Unfortunately, I haven’t pushed by my changes to a repo yet because my code contains some API secret keys. I tried your code above and got the same error (line 14, col 47) ERROR: 2017/02/22 14:33:03 general.go:236: Error while rendering page : template: theme/index.html:14:47: executing "theme/index.htm