refactor: Remove the sortable_date for talks

Automatically calculate the sortable date for a talk using the event
dates. This means that the `sortable_date` in the YAML front matter can
be removed.

Fixes #4
This commit is contained in:
Oliver Davies 2021-09-08 23:47:14 +01:00
parent 42e0ae1297
commit efbd099515
36 changed files with 30 additions and 34 deletions

View file

@ -8,7 +8,7 @@ use:
<div class="mt-10">
<div class="space-y-8">
{% for talk in data.talks|sort((a,b) => a.sortable_date < b.sortable_date) %}
{% for talk in data.talks|sort((a, b) => get_last_event_date_for_talk(a) < get_last_event_date_for_talk(b)) %}
<article>
<h2>
<a class="text-blue-primary dark:text-blue-400" href="{{ talk.url }}">