From c373d0c1e4f1e8869d52da3efb4c1b2493e85ff9 Mon Sep 17 00:00:00 2001 From: Akshay Bhalotia Date: Fri, 20 Jul 2018 19:38:03 +0530 Subject: [PATCH] Filter featured talks away from speakers --- _fifthelephant_events/2018.md | 3 +++ _includes/all_speakers.html | 10 +++++++++- _includes/featured_speakers_section.html | 2 +- _layouts/event.html | 4 +++- tests/before_build/steps/events.py | 14 ++++++++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/_fifthelephant_events/2018.md b/_fifthelephant_events/2018.md index f0f8fe235..a0f40b365 100644 --- a/_fifthelephant_events/2018.md +++ b/_fifthelephant_events/2018.md @@ -65,6 +65,7 @@ featured_speakers: talk_title: "Building analytics application with Streaming Expressions in Apache Solr" image_url: https://images.hasgeek.com/embed/file/017e81ca82314a509919b1b01e42e3b0?size=200x200 name: Amrit Sarkar + featured: true - funnel_url: https://fifthelephant.talkfunnel.com/2018/66-operating-data-pipeline-using-airflow-slack designation: Senior data engineer at Slack talk_title: "Operating data pipeline using Airflow @ Slack" @@ -116,6 +117,8 @@ featured_speakers: image_url: https://images.hasgeek.com/embed/file/4ea776dcbefd4030ba2365f55aca2943?size=200x200 name: Vikram Vij +all_speakers: true + related_events: - title: "Anthill Inside 2018" datelocation: 25 July 2018, Bangalore diff --git a/_includes/all_speakers.html b/_includes/all_speakers.html index cb5167408..fe4720960 100644 --- a/_includes/all_speakers.html +++ b/_includes/all_speakers.html @@ -6,7 +6,15 @@

Who's speaking?

{% if include.instructors %} {% assign speakers = include.instructors %} {% else %} - {% assign speakers = include.speakers %} + {% assign speakers = "" | split: ',' %} + {% assign all_speakers = include.speakers %} + {% assign featured_speakers = include.speakers | where:'featured', 'true' %} + {% for speaker in all_speakers %} + {% if featured_speakers contains speaker %} + {% else %} + {% assign speakers = speakers | push: speaker %} + {% endif %} + {% endfor %} {% endif %} {% for speaker in speakers %}
diff --git a/_includes/featured_speakers_section.html b/_includes/featured_speakers_section.html index 838f0719a..03f17226d 100644 --- a/_includes/featured_speakers_section.html +++ b/_includes/featured_speakers_section.html @@ -7,7 +7,7 @@

Featured Talks

{% if include.instructors %} {% assign speakers = include.instructors %} {% else %} - {% assign speakers = include.speakers %} + {% assign speakers = include.speakers | where:'featured', 'true' %} {% endif %} {% for speaker in speakers %}
diff --git a/_layouts/event.html b/_layouts/event.html index f9aa9899b..b74ae38e0 100644 --- a/_layouts/event.html +++ b/_layouts/event.html @@ -154,18 +154,20 @@ {% endif %} {% if page.featured_speakers %} -