diff --git a/build-docs.rb b/build-docs.rb index e8b5b77..5b95494 100755 --- a/build-docs.rb +++ b/build-docs.rb @@ -66,14 +66,14 @@ def get_events(git, source_dir, categories) cleanup_and_clone('events', clone_target, git, 'master') event_categories.each do |category| category_events = YAML::load_file(clone_target + '/' + category + '.yml') - category_events_sorted = category_events.sort_by { |k| k['start_date'] } + category_events_sorted = category_events.sort_by { |k| k['date'] } events << category_events_sorted[0] end - events_sorted = events.sort_by { |k| k['start_date']} + events_sorted = events.sort_by { |k| k['date']} events_sorted.each do |k| - k['start_date'] = Date::ABBR_MONTHNAMES[k['start_date'].month] + k['date'] = Date::ABBR_MONTHNAMES[k['date'].month] end return events_sorted @@ -146,4 +146,4 @@ mkdocs['extra']['events'] = get_events(config['events']['git'], File.write('mkdocs.yml', mkdocs.to_yaml) -%x( mkdocs build ) \ No newline at end of file +%x( mkdocs build )