Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of referring to authors using Jekyll's _data structures. You can reference the data in a collection in a variety of ways. Line 13 of post.html shows you can: 1. look up a value in the "author" collection relative to a variable defined in the YAML of a page using the layout 2. explicitly naming the data item in code 3. a combination of th…
layout title date author
My New Post
2014-01-16 23:05

This is my great post with the correct poster.

name: David Hutchison
bio: I am a Software Developer
layout: main
<article class="post">
{% assign post=page %}
{% if %}<span class="meta">
<time datetime="{{ | date_to_xmlschema }}" pubdate="" data-updated="true" title="{{ | date_to_string }}">{{ | date_to_string }}</time>
</span>{% endif%}
<a href="{{ post.url }}" class="title">{{ post.title }}</a>
{% if %}<p>By {{[]['name'] }} / {{ }} / {{[].name }}</p>{% endif %}
{{ content }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment