I am working on looping through a data file that will contain references to two pages on my site.
And I am wondering how to best reference these pages in a range or loop?
As filenames?
I will need to be able to pull data from the front-matter of each of these pages, but will also want to mix in new data.
For example, with the following data file, how would I get the permalink for the file mentioned?
Here is the data file:
top2:
- file : "2018-03-13-thinking-about-going-agile-consider-mass-training-facilitate-change.md"
title : 'Thinking About Going Agile? 5 Benefits Your Office Will Reap With Agile Methods'
summary : 'Five benefits of using agile methodologies that can help federal employees improve the quality of their work.'
- file : "2018-04-02-marketing-government-through-agency-partnerships.md"
title : 'Another Headline'
summary : 'summary'
Here is the range code that I am playing with:
{{ range .Site.Data.top2.top2 }}
<a href="{{ .url }}" title="{{ .title }}">{{ .title }}</a>
{{ end }}