Skip to content

Instantly share code, notes, and snippets.

Avatar

Noah Spahn noah-de

View GitHub Profile
@noah-de
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:
<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 Feb 27, 2020
An example of a Hugo member page
View index.md-metadata
(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"