Skip to content

Instantly share code, notes, and snippets.

@noah-de
noah-de / list.html
Last active March 23, 2020 23:58
Hugo filter a groupby
{{ 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">
mock up of the desired output:
<h2>Faculty</h2>
image image image
name name name
<h2>Post Docs</h2>
image image image
name name name
@noah-de
noah-de / index.md-metadata
Created February 27, 2020 00:47
An example of a Hugo member page
(website/content/members/homer/index.md)
title: "Homer Simpson"
date: 2019-10-22T11:14:44-07:00
affiliation: ["PhD Student"]
sort_order: "6"
tags: []
draft: false
website: ["http://hsimpson.info/"]
featured_image: "homer.png"