Merge pull request #127 from netz39/feat/events/skip

feat/skip events older than 365 days
This commit is contained in:
Max 2024-04-11 01:29:04 +02:00 committed by GitHub
commit ab9afb2569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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!(/\!\[.*?\]\((.*?)\)/, '')