Hi all, I’m having trouble with looping through data files. I want to “group” data files within a row div, but I can’t seem to figure out how to limit the range iteration to do so.
Below is my index.html file. This currently just loops through all data files and places them in the same row:
<!DOCTYPE html>
<html lang="en">
{{ partial "header.html" . }}
<body>
<div class="container">
{{ partial "profile.html" . }}
<div class="row">
{{ range $.Site.Data.projects }}
{{ partial "project.html" . }}
{{ end }}
</div>
</div>
</body>
</html>
In psuedo code, I want something similar to this:
{{ range SELECT NEXT THREE FROM $.Site.Data.projects }}
<div class="row">
{{ range THE THREE FROM ABOVE }}
{{ partial "project.html" . }}
{{ end }}
</div>
{{ end }}