Move more logic into Twig filter
This commit is contained in:
parent
dca8b1afb4
commit
97050c7f29
4 changed files with 24 additions and 35 deletions
|
@ -10,18 +10,9 @@ use: [talks]
|
|||
|
||||
<h2>Last 5 Talks</h2>
|
||||
|
||||
{% set talks = [] %}
|
||||
{% for talk in data.talks %}
|
||||
{% for event in talk.events %}
|
||||
{% set talks = talks|merge([{
|
||||
event: event|merge(site.events[event.event]),
|
||||
talk: talk,
|
||||
}]) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% set data = { talks: data.talks, events: site.events } %}
|
||||
{% include "talks-table" with {
|
||||
talks: talks|format_talks|slice(0,5)
|
||||
talks: data|format_talks|slice(0,5)
|
||||
} %}
|
||||
|
||||
<p>Upcoming talks can be found in the <a href="{{ site.url }}/talks/archive">talks archive</a>.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue