Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export authors into an array under entry.author_array #130

Merged
merged 1 commit into from
Feb 2, 2016

Conversation

IgnoredAmbience
Copy link
Collaborator

This permits easier iteration over an arbitrary number of authors.

For example, I have a collection of author pages and would like to link them with my publication author lists, I can use the following template to link the pair together:

{% for author in page.entry.author_array %}
{% assign matched = site.people | where:"lastname",author.last | first %}
{% if matched %}<a href="{{ matched.url }}">{% endif %}{{ author.first }} {{ author.last }}{% if matched %}</a>{% endif %}
{% endfor %}

This permits easier iteration over an arbitrary number of authors.
@inukshuk
Copy link
Owner

inukshuk commented Feb 2, 2016

Indeed it does, thanks!

inukshuk added a commit that referenced this pull request Feb 2, 2016
Export authors into an array under entry.author_array
@inukshuk inukshuk merged commit 4ef567d into inukshuk:master Feb 2, 2016
@inukshuk inukshuk mentioned this pull request Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants