mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Manage events in a single file
This commit is contained in:
parent
b154db2c94
commit
1db1455703
22 changed files with 155 additions and 180 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue