diff --git a/_plugins/events_to_ics.rb b/_plugins/events_to_ics.rb index 9757b60..9d4c3cf 100644 --- a/_plugins/events_to_ics.rb +++ b/_plugins/events_to_ics.rb @@ -21,6 +21,9 @@ def generate(site) 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!(/\!\[.*?\]\((.*?)\)/, '')