Manage events in a single file

This commit is contained in:
Saivann 2014-11-15 18:41:02 -05:00
parent b154db2c94
commit 1db1455703
22 changed files with 155 additions and 180 deletions

View file

@ -92,12 +92,8 @@ module Jekyll
def conferences
conferences = []
# Loop in _events/ files
Dir.foreach('_events') do |file|
# Skip events with malformed name
next if file == '.' or file == '..'
# Assign variables
data = YAML.load_file('_events/'+file)
# Loop in _events.yml
YAML.load_file('_events.yml').each do |data|
# Skip event if it has started more than five days ago
date = data['date'].to_s.split('-')
next if Time.new.to_i > (Time.new(date[0].to_i,date[1].to_i,date[2].to_i).to_i + 432000)