Last active
March 23, 2020 23:58
-
-
Save noah-de/0d2ef76090628592bf90908bf9964ec3 to your computer and use it in GitHub Desktop.
Hugo filter a groupby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "title" }}People{{ end }} | |
{{- range .Pages.GroupByParam "rank_id" }} | |
{{/* Need to Substr the Key because we have numerical prefix for sorting */}} | |
<h3>{{ substr .Key 2 }}</h3> | |
<div class="container"> | |
{{- range .Pages.ByParam "affiliation" }} | |
{{ if eq .Params.current 1 }} | |
<div class="col-md-3" style="text-align: center;"> | |
<div class="caption"> | |
{{ .Title }} | |
</div><!-- end caption --> | |
</div><!-- end col ---> | |
{{ end }} | |
{{- end }} | |
</div> | |
{{- end }} | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment