Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adding authors to a Jekyll blog
---
# Layout.
layout: post
# Author.
author: robert_rawlins
---
# Author details.
robert_rawlins:
name: Robert Rawlins
web: http://twitter.com/sirrawlins
robin_geall:
name: Robin Geall
web: http://twitter.com/robingeall
<!-- Look the author details up from the site config. -->
{% assign author = site.data.authors[page.author] %}
<!-- Output author details if some exist. -->
{% if author %}
<span>
<!-- Personal Info. -->
Written by <a href="{{ author.web }}" target="_blank">{{ author.name }}</a>
</span>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.