themes/nifi/layouts/shortcodes/project-members.html (30 lines of code) (raw):

{{ $resourceGroups := resources.GetRemote .Site.Params.apacheFoundationGroupsUrl }} {{ $groups := $resourceGroups | transform.Unmarshal }} {{ $resourcePeople := resources.GetRemote .Site.Params.apacheFoundationPeopleNameUrl }} {{ $people := $resourcePeople | transform.Unmarshal }} {{- $project := "nifi" -}} {{- with .Get "project" -}} {{- $project = . -}} {{- end -}} {{ $members := index $groups $project }} {{- with .Get "exclude-project" -}} {{ $excluded := index $groups . }} {{ $members = complement $excluded $members }} {{- end -}} <table class="project-members"> <thead> <tr> <th>Apache Username</th> <th>Name</th> </tr> </thead> <tbody> {{- range $username := $members -}} {{ $name := index $people $username }} <tr> <td>{{ $username }}</td> <td>{{ $name }}</td> </tr> {{- end }} </tbody> </table>