Last active
February 27, 2020 01:10
-
-
Save noah-de/a97786c8884f2c82ad7559be73824319 to your computer and use it in GitHub Desktop.
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
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 | |
<h2>PhD Candidates</h2> | |
image image image | |
name name name | |
<h2>Emeriti</h2> | |
image image image | |
name name name | |
**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" | |
**layout/members/list.html** | |
{{ define "title" }}Members{{ end }} | |
{{ define "content" }} | |
{{ range .Pages.ByParam "sort_order" }} | |
<div> | |
{{ if .Params.featured_image }} | |
{{ with .Resources.GetMatch (.Params.featured_image) }} | |
{{ $image := .Fill "200x200" }} | |
{{ $image := $image.Filter (images.Grayscale)}} | |
<img src="{{ $image.Permalink }}" alt="no image"> | |
{{ else }} | |
<img src="/img/alias.png" alt='img' width=200 height=200/> | |
{{ end }} | |
{{ end }} | |
<div class="caption"> | |
{{ .Title }} | |
{{ .Params.affiliation }} | |
</div> | |
{{/* <a href="{{ .RelPermalink }}">{{ .Title }}</a> */}} | |
</div><!-- end col ---> | |
{{ end }} | |
{{ end }} | |
**Proposed ugly solution (that seems like it should work, but does not)** | |
{{ if eq .Params.affiliation "Faculty" }} | |
<h2>Faculty</h2> | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment