Use Twig functions rather than filters
This commit is contained in:
parent
ae2bc2a36f
commit
c4700f7d66
5 changed files with 44 additions and 56 deletions
source
|
@ -2,7 +2,7 @@
|
|||
<h2>Events</h2>
|
||||
|
||||
{% include "talks-table" with {
|
||||
talks: { talks: [page], event_data: site.events }|all_talks,
|
||||
talks: getAllTalks([page], site.events),
|
||||
talk_page: true
|
||||
} %}
|
||||
</div>
|
||||
|
|
|
@ -13,8 +13,6 @@ talks:
|
|||
---
|
||||
<p>Here are a list of my previous conference and user group talks:</p>
|
||||
|
||||
{% include "talks-table" with {
|
||||
talks: { talks: data.talks|merge(page.talks), event_data: site.events }|past_talks
|
||||
} %}
|
||||
{% include "talks-table" with { talks: getPastTalks(data.talks, site.events) } %}
|
||||
|
||||
<p>Upcoming talks can be found on the <a href="{{ site.url }}/talks">talks page</a>.</p>
|
||||
|
|
|
@ -10,7 +10,7 @@ use: [talks]
|
|||
|
||||
<h2>Upcoming Talks</h2>
|
||||
|
||||
{% set upcoming_talks = { talks: data.talks, event_data: site.events }|upcoming_talks %}
|
||||
{% set upcoming_talks = getUpcomingTalks(data.talks, site.events) %}
|
||||
{% if upcoming_talks %}
|
||||
{% include "talks-table" with { talks: upcoming_talks, upcoming: true } %}
|
||||
{% else %}
|
||||
|
@ -19,9 +19,7 @@ use: [talks]
|
|||
|
||||
<h2>Last 5 Talks</h2>
|
||||
|
||||
{% include "talks-table" with {
|
||||
talks: { talks: data.talks, event_data: site.events }|past_talks|slice(0,5)
|
||||
} %}
|
||||
{% include "talks-table" with { talks: getPastTalks(data.talks, site.events)|slice(0,5) } %}
|
||||
|
||||
<p>All previous talks can be found in the <a href="{{ site.url }}/talks/archive">talks archive</a>.</p>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue