skip events older than 356 days

This commit is contained in:
teuserer 2024-04-01 22:28:35 +02:00
parent ab7f4841d0
commit 734dc1798f

View file

@ -21,6 +21,9 @@ module Jekyll
organizer = event.data.dig('event', 'organizer') || default_organizer
location = event.data.dig('event', 'location') || default_location
# Skip events older than 365 days
next if start_date.to_date < (Date.today - 365)
# Remove image URLs from description
content = event.content
content.gsub!(/\!\[.*?\]\((.*?)\)/, '')