Skip to content

Instantly share code, notes, and snippets.


Noah Spahn noah-de

View GitHub Profile
noah-de / list.html
Last active Mar 23, 2020
Hugo filter a groupby
View list.html
{{ 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">
View HugoMembers
mock up of the desired output:
image image image
name name name
<h2>Post Docs</h2>
image image image
name name name
noah-de /
Created Feb 27, 2020
An example of a Hugo member page
title: "Homer Simpson"
date: 2019-10-22T11:14:44-07:00
affiliation: ["PhD Student"]
sort_order: "6"
tags: []
draft: false
website: [""]
featured_image: "homer.png"