Skip to content

Instantly share code, notes, and snippets.

@jimjam-slam
Last active September 21, 2017 06:55
Show Gist options
  • Save jimjam-slam/0db0a1efa40d12209eeb02cd9a2b18f8 to your computer and use it in GitHub Desktop.
Save jimjam-slam/0db0a1efa40d12209eeb02cd9a2b18f8 to your computer and use it in GitHub Desktop.
Add an academic publication list to your academic blog.
<div class="publist">
<ul>
{% for post in site.categories.science %}
{% if post.work-type == 'Paper' %}
<li>
<a href="{% if post.ref-doi %}http://dx.doi.org/{{ post.ref-doi }}{% else %}{{ post.url | prepend: site.baseurl }}{% endif %}"><h2>{{ post.ref-authors }} ({{ post.ref-year }}).</h2></a>
<p>{{ post.ref-title }}. <em>{{ post.ref-journal}}</em>{% if post.ref-vol %}, {{ post.ref-vol }}{% endif %}. <a href="http://dx.doi.org/{{ post.ref-doi }}">doi: {{ post.ref-doi }}</a></p>
</li>
{% endif %}
{% endfor %}
<ul>
</div>
@jimjam-slam
Copy link
Author

jimjam-slam commented Sep 21, 2017

Here's the YAML (front matter) block for an example paper (I didn't add it to the gist because Github formats it poorly):

---
title: A novel method of fortifying mineral-based structures against attack by artificial intelligences
layout: post
category: science
date: 2015-08-21
mast: false
img: full-2015-08-21-hogwarts-decepticons.png
thumbnail: thumb-2015-08-21-hogwarts-decepticons.png

# tags i made up to format this as a paper
work-type: Paper
ref-authors: Goldie J, Sherwood S C, Green D & Alexander L
ref-year: 2015
ref-title: Temperature and humidity effects on hospital morbidity in Darwin, Australia
ref-journal: Annals of Global Health
ref-vol: 81(3):333-341
ref-doi: 10.1016/j.aogh.2015.07.003
---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment