Refactor by removing temporary variables

This commit is contained in:
Oliver Davies 2017-10-28 14:24:33 +01:00
parent 168272a147
commit c65f94e4bc
3 changed files with 6 additions and 8 deletions

View file

@ -8,11 +8,9 @@ use: [talks]
{% block content %}
<p>I regularly speak at conferences and user groups about a range of subjects including Drupal, Sculpin and Git. If you would like to me to speak at your group or conference, please <a href="{{ site.url }}/contact">get in touch</a>.</p>
{% set data = { talks: data.talks, events: site.events } %}
<h2>Upcoming Talks</h2>
{% set upcoming_talks = data|format_talks(true) %}
{% set upcoming_talks = { talks: data.talks, events: site.events }|format_talks(true) %}
{% if upcoming_talks %}
{% include "talks-table" with { talks: upcoming_talks } %}
{% else %}
@ -22,7 +20,7 @@ use: [talks]
<h2>Last 5 Talks</h2>
{% include "talks-table" with {
talks: data|format_talks(false, true)|slice(0,5)
talks: { talks: data.talks, events: site.events }|format_talks(false, true)|slice(0,5)
} %}
<p>All previous talks can be found in the <a href="{{ site.url }}/talks/archive">talks archive</a>.</p>