From b5527a588b04f942c2c024d8eaa7c8400ae377e3 Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Mon, 7 Mar 2016 15:29:21 -0600 Subject: [PATCH] Refactor for event path --- .../conduct.md | 0 .../contact.md | 0 .../location.md | 0 .../program.md | 0 .../proposals.md | 0 .../propose.md | 0 .../registration.md | 0 .../sponsor.md | 0 .../welcome.md | 4 +-- .../{2016amsterdam.yml => 2016-amsterdam.yml} | 0 .../{2016atlanta.yml => 2016-atlanta.yml} | 0 .../{2016austin.yml => 2016-austin.yml} | 0 data/events/2016-chicago.yml | 35 +++++++++++++++++++ .../{2016dallas.yml => 2016-dallas.yml} | 0 .../{2016denver.yml => 2016-denver.yml} | 0 .../{2016detroit.yml => 2016-detroit.yml} | 0 .../{2016istanbul.yml => 2016-istanbul.yml} | 0 data/events/2016-kiel.yml | 33 +++++++++++++++++ .../{2016london.yml => 2016-london.yml} | 0 ...16minneapolis.yml => 2016-minneapolis.yml} | 0 .../{2016newyork.yml => 2016-newyork.yml} | 0 ...philadelphia.yml => 2016-philadelphia.yml} | 0 .../{2016portland.yml => 2016-portland.yml} | 0 ...saltlakecity.yml => 2016-saltlakecity.yml} | 0 .../{2016seattle.yml => 2016-seattle.yml} | 0 .../{2016singapore.yml => 2016-singapore.yml} | 0 .../{2016toronto.yml => 2016-toronto.yml} | 0 .../{2016vancouver.yml => 2016-vancouver.yml} | 0 ...ashingtondc.yml => 2016-washington-dc.yml} | 2 +- layouts/shortcodes/cfp_dates.html | 7 ++-- layouts/shortcodes/email_organizers.html | 8 ++--- layouts/shortcodes/email_proposals.html | 7 ++-- layouts/shortcodes/event_end.html | 12 +++++-- layouts/shortcodes/event_link.html | 5 ++- layouts/shortcodes/event_location.html | 7 ++-- layouts/shortcodes/event_logo.html | 6 +++- layouts/shortcodes/event_start.html | 13 +++++-- layouts/shortcodes/list_organizers.html | 5 +-- .../layouts/event/single.html | 14 ++++++-- .../layouts/partials/get-slug.html | 3 ++ 40 files changed, 132 insertions(+), 29 deletions(-) rename content/events/{2016-washingtondc => 2016-washington-dc}/conduct.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/contact.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/location.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/program.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/proposals.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/propose.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/registration.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/sponsor.md (100%) rename content/events/{2016-washingtondc => 2016-washington-dc}/welcome.md (95%) rename data/events/{2016amsterdam.yml => 2016-amsterdam.yml} (100%) rename data/events/{2016atlanta.yml => 2016-atlanta.yml} (100%) rename data/events/{2016austin.yml => 2016-austin.yml} (100%) create mode 100644 data/events/2016-chicago.yml rename data/events/{2016dallas.yml => 2016-dallas.yml} (100%) rename data/events/{2016denver.yml => 2016-denver.yml} (100%) rename data/events/{2016detroit.yml => 2016-detroit.yml} (100%) rename data/events/{2016istanbul.yml => 2016-istanbul.yml} (100%) create mode 100644 data/events/2016-kiel.yml rename data/events/{2016london.yml => 2016-london.yml} (100%) rename data/events/{2016minneapolis.yml => 2016-minneapolis.yml} (100%) rename data/events/{2016newyork.yml => 2016-newyork.yml} (100%) rename data/events/{2016philadelphia.yml => 2016-philadelphia.yml} (100%) rename data/events/{2016portland.yml => 2016-portland.yml} (100%) rename data/events/{2016saltlakecity.yml => 2016-saltlakecity.yml} (100%) rename data/events/{2016seattle.yml => 2016-seattle.yml} (100%) rename data/events/{2016singapore.yml => 2016-singapore.yml} (100%) rename data/events/{2016toronto.yml => 2016-toronto.yml} (100%) rename data/events/{2016vancouver.yml => 2016-vancouver.yml} (100%) rename data/events/{2016washingtondc.yml => 2016-washington-dc.yml} (94%) create mode 100644 themes/devopsdays-legacy/layouts/partials/get-slug.html diff --git a/content/events/2016-washingtondc/conduct.md b/content/events/2016-washington-dc/conduct.md similarity index 100% rename from content/events/2016-washingtondc/conduct.md rename to content/events/2016-washington-dc/conduct.md diff --git a/content/events/2016-washingtondc/contact.md b/content/events/2016-washington-dc/contact.md similarity index 100% rename from content/events/2016-washingtondc/contact.md rename to content/events/2016-washington-dc/contact.md diff --git a/content/events/2016-washingtondc/location.md b/content/events/2016-washington-dc/location.md similarity index 100% rename from content/events/2016-washingtondc/location.md rename to content/events/2016-washington-dc/location.md diff --git a/content/events/2016-washingtondc/program.md b/content/events/2016-washington-dc/program.md similarity index 100% rename from content/events/2016-washingtondc/program.md rename to content/events/2016-washington-dc/program.md diff --git a/content/events/2016-washingtondc/proposals.md b/content/events/2016-washington-dc/proposals.md similarity index 100% rename from content/events/2016-washingtondc/proposals.md rename to content/events/2016-washington-dc/proposals.md diff --git a/content/events/2016-washingtondc/propose.md b/content/events/2016-washington-dc/propose.md similarity index 100% rename from content/events/2016-washingtondc/propose.md rename to content/events/2016-washington-dc/propose.md diff --git a/content/events/2016-washingtondc/registration.md b/content/events/2016-washington-dc/registration.md similarity index 100% rename from content/events/2016-washingtondc/registration.md rename to content/events/2016-washington-dc/registration.md diff --git a/content/events/2016-washingtondc/sponsor.md b/content/events/2016-washington-dc/sponsor.md similarity index 100% rename from content/events/2016-washingtondc/sponsor.md rename to content/events/2016-washington-dc/sponsor.md diff --git a/content/events/2016-washingtondc/welcome.md b/content/events/2016-washington-dc/welcome.md similarity index 95% rename from content/events/2016-washingtondc/welcome.md rename to content/events/2016-washington-dc/welcome.md index 2460a8580e7..786c69624dc 100644 --- a/content/events/2016-washingtondc/welcome.md +++ b/content/events/2016-washington-dc/welcome.md @@ -1,10 +1,10 @@ +++ -City = "WashingtonDC" +City = "Washington D.C." Year ="2016" date = "2016-03-06T21:15:25-06:00" title = "welcome" type = "event" -aliases = ["/events/2016-detroit"] +aliases = ["/events/2016-washington-dc"] +++ diff --git a/data/events/2016amsterdam.yml b/data/events/2016-amsterdam.yml similarity index 100% rename from data/events/2016amsterdam.yml rename to data/events/2016-amsterdam.yml diff --git a/data/events/2016atlanta.yml b/data/events/2016-atlanta.yml similarity index 100% rename from data/events/2016atlanta.yml rename to data/events/2016-atlanta.yml diff --git a/data/events/2016austin.yml b/data/events/2016-austin.yml similarity index 100% rename from data/events/2016austin.yml rename to data/events/2016-austin.yml diff --git a/data/events/2016-chicago.yml b/data/events/2016-chicago.yml new file mode 100644 index 00000000000..edb93ba53fe --- /dev/null +++ b/data/events/2016-chicago.yml @@ -0,0 +1,35 @@ +name: 2016chicago +year: "2016" +city: "Chicago" +friendly: "2016-chicago" +status: "current" +startdate: 2016-08-30 +enddate: 2016-08-31 +cfp_date_start: 2016-04-01 +cfp_date_end: 2016-06-01 +cfp_date_announce: 2016-07-01 +coordinates: "41.882219, -87.640530" +location: "Summit West" +navigationelements: ["welcome", "contact", "location", "program", "propose", "proposals", "conduct", "sponsor"] +team: ["Jerry Cattell", "Brian Devlin", "Michael Lanyon", "Aaron Lindstrom", "Chris Read", "Kevin Reedy", "Sasha Rosenbaum", "Matt Stratton"] +organizer_email: "organizers-chicago-2016@devopsdays.org" +proposal_email: "proposals-chicago-2016@devopsdays.org" +ga_tracking_id: "UA-74738648-1" + +sponsors: + - id: chef + level: gold + - id: arresteddevops + level: community + - id: softwaredefinedtalk + level: community + +sponsor_levels: + - id: gold + label: Gold + - id: silver + label: Silver + - id: bronze + label: Bronze + - id: community + label: Community diff --git a/data/events/2016dallas.yml b/data/events/2016-dallas.yml similarity index 100% rename from data/events/2016dallas.yml rename to data/events/2016-dallas.yml diff --git a/data/events/2016denver.yml b/data/events/2016-denver.yml similarity index 100% rename from data/events/2016denver.yml rename to data/events/2016-denver.yml diff --git a/data/events/2016detroit.yml b/data/events/2016-detroit.yml similarity index 100% rename from data/events/2016detroit.yml rename to data/events/2016-detroit.yml diff --git a/data/events/2016istanbul.yml b/data/events/2016-istanbul.yml similarity index 100% rename from data/events/2016istanbul.yml rename to data/events/2016-istanbul.yml diff --git a/data/events/2016-kiel.yml b/data/events/2016-kiel.yml new file mode 100644 index 00000000000..3afba2c1a61 --- /dev/null +++ b/data/events/2016-kiel.yml @@ -0,0 +1,33 @@ +name: 2016kiel +year: "2016" +city: "Kiel" +friendly: "2016-kiel" +status: "current" +startdate: 2016-05-12 +enddate: 2016-05-13 +coordinates: "54.3233, 10.1228" +navigationelements: ["welcome", "contact", "location", "program", "propose", "proposals", "registration", "conduct", "sponsor"] +team: ["Jerry Cattell", "Brian Devlin", "Michael Lanyon", "Aaron Lindstrom", "Chris Read", "Kevin Reedy", "Sasha Rosenbaum", "Matt Stratton"] +organizer_email: "organizers-kiel-2016@devopsdays.org" +proposal_email: "proposals-kiel-2016@devopsdays.org" +sponsors: + - id: kiwi + level: host + - id: wobe + level: special + override: + url: www.microsoft.co.il + - id: puppet + level: special + +sponsor_levels: + - id: gold + label: Gold + - id: host + label: Host + - id: special + label: Special + - id: silver + label: Silver + - id: media + label: Media diff --git a/data/events/2016london.yml b/data/events/2016-london.yml similarity index 100% rename from data/events/2016london.yml rename to data/events/2016-london.yml diff --git a/data/events/2016minneapolis.yml b/data/events/2016-minneapolis.yml similarity index 100% rename from data/events/2016minneapolis.yml rename to data/events/2016-minneapolis.yml diff --git a/data/events/2016newyork.yml b/data/events/2016-newyork.yml similarity index 100% rename from data/events/2016newyork.yml rename to data/events/2016-newyork.yml diff --git a/data/events/2016philadelphia.yml b/data/events/2016-philadelphia.yml similarity index 100% rename from data/events/2016philadelphia.yml rename to data/events/2016-philadelphia.yml diff --git a/data/events/2016portland.yml b/data/events/2016-portland.yml similarity index 100% rename from data/events/2016portland.yml rename to data/events/2016-portland.yml diff --git a/data/events/2016saltlakecity.yml b/data/events/2016-saltlakecity.yml similarity index 100% rename from data/events/2016saltlakecity.yml rename to data/events/2016-saltlakecity.yml diff --git a/data/events/2016seattle.yml b/data/events/2016-seattle.yml similarity index 100% rename from data/events/2016seattle.yml rename to data/events/2016-seattle.yml diff --git a/data/events/2016singapore.yml b/data/events/2016-singapore.yml similarity index 100% rename from data/events/2016singapore.yml rename to data/events/2016-singapore.yml diff --git a/data/events/2016toronto.yml b/data/events/2016-toronto.yml similarity index 100% rename from data/events/2016toronto.yml rename to data/events/2016-toronto.yml diff --git a/data/events/2016vancouver.yml b/data/events/2016-vancouver.yml similarity index 100% rename from data/events/2016vancouver.yml rename to data/events/2016-vancouver.yml diff --git a/data/events/2016washingtondc.yml b/data/events/2016-washington-dc.yml similarity index 94% rename from data/events/2016washingtondc.yml rename to data/events/2016-washington-dc.yml index 243a55efc56..3c299dc63c8 100644 --- a/data/events/2016washingtondc.yml +++ b/data/events/2016-washington-dc.yml @@ -1,7 +1,7 @@ name: 2016washingtondc # The name of the event. Four digit year with the city name in lower-case, with no spaces. year: "2016" # The year of the event. Make sure it is in quotes. city: "Washington, D.C. " # The city name of the event. Capitalize it. -friendly: "2016-washingtondc" # Four digit year and the city name in lower-case. Don't forget the dash! +friendly: "2016-washington-dc" # Four digit year and the city name in lower-case. Don't forget the dash! status: "current" # Options are "past" or "current". startdate: 2016-06-08 # The start date of your event, in YYYY-MM-DD format. Leave blank if you don't have a date yet. enddate: 2016-06-09 # The end date of your event, in YYYY-MM-DD format. Leave blank if you don't have a date yet. diff --git a/layouts/shortcodes/cfp_dates.html b/layouts/shortcodes/cfp_dates.html index b90144de670..2480a634fb7 100644 --- a/layouts/shortcodes/cfp_dates.html +++ b/layouts/shortcodes/cfp_dates.html @@ -1,5 +1,6 @@ -{{ $event := (print .Page.Params.year (lower .Page.Params.city)) }} -{{ $e := (index $.Page.Site.Data.events $event) }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }} {{ if isset $e "cfp_date_start" }} @@ -7,6 +8,8 @@ {{ $cfp_date_end := $e.cfp_date_end }} {{ $cfp_date_announce := $e.cfp_date_announce }} + +
Call for proposals opens {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_start }}.
Call for proposals closes {{ dateFormat "Monday, Jan 2, 2006" $cfp_date_end }}.
diff --git a/layouts/shortcodes/email_organizers.html b/layouts/shortcodes/email_organizers.html index 6440365b173..22511a23d5a 100644 --- a/layouts/shortcodes/email_organizers.html +++ b/layouts/shortcodes/email_organizers.html @@ -1,6 +1,4 @@ -{{ $event := (print .Page.Params.year (lower .Page.Params.city)) }} -{{ $e := (index $.Page.Site.Data.events $event) }} - -{{ $cfp_date_start := $e.organizer_email }} - +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }} {{ $e.organizer_email }} diff --git a/layouts/shortcodes/email_proposals.html b/layouts/shortcodes/email_proposals.html index ad03190d286..22788f7d86b 100644 --- a/layouts/shortcodes/email_proposals.html +++ b/layouts/shortcodes/email_proposals.html @@ -1,6 +1,5 @@ -{{ $event := (print .Page.Params.year (lower .Page.Params.city)) }} -{{ $e := (index $.Page.Site.Data.events $event) }} - -{{ $cfp_date_start := $e.proposal_email }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }} {{ $e.proposal_email }} diff --git a/layouts/shortcodes/event_end.html b/layouts/shortcodes/event_end.html index 26230692c23..659f1f092a6 100644 --- a/layouts/shortcodes/event_end.html +++ b/layouts/shortcodes/event_end.html @@ -1,4 +1,10 @@ -{{ $event := (print .Page.Params.year (lower .Page.Params.city)) }} -{{ $e := (index $.Page.Site.Data.events $event) }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }} {{ $enddate := $e.enddate}} -{{ dateFormat "Monday, Jan 2, 2006" $enddate }} + +{{ if isset $e "enddate" }} + {{ dateFormat "Monday, Jan 2, 2006" $enddate }} +{{ else }} + TBD +{{ end }} diff --git a/layouts/shortcodes/event_link.html b/layouts/shortcodes/event_link.html index bd0661d8cb4..cf24c2edf22 100644 --- a/layouts/shortcodes/event_link.html +++ b/layouts/shortcodes/event_link.html @@ -1 +1,4 @@ -{{ .Get "text" }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} + +{{ .Get "text" }} diff --git a/layouts/shortcodes/event_location.html b/layouts/shortcodes/event_location.html index f9919a833bd..6c9a5fb47e3 100644 --- a/layouts/shortcodes/event_location.html +++ b/layouts/shortcodes/event_location.html @@ -1,3 +1,4 @@ -{{ $event := (print .Page.Params.year (lower .Page.Params.city)) }} -{{ $e := (index $.Page.Site.Data.events $event) }} -{{ $e.location }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }} +{{ $e.location }} diff --git a/layouts/shortcodes/event_logo.html b/layouts/shortcodes/event_logo.html index cc793425a3d..83774334a68 100644 --- a/layouts/shortcodes/event_logo.html +++ b/layouts/shortcodes/event_logo.html @@ -1 +1,5 @@ -DevOpsDays {{ .Page.Params.city }} {{ .Page.Params.year }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }} + +DevOpsDays {{ $e.city }} {{ $e.year }} diff --git a/layouts/shortcodes/event_start.html b/layouts/shortcodes/event_start.html index 4166193d38d..35a56e56b4b 100644 --- a/layouts/shortcodes/event_start.html +++ b/layouts/shortcodes/event_start.html @@ -1,4 +1,11 @@ -{{ $event := (print .Page.Params.year (lower .Page.Params.city)) }} -{{ $e := (index $.Page.Site.Data.events $event) }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }} + {{ $startdate := $e.startdate}} -{{ dateFormat "Monday, Jan 2, 2006" $startdate }} + +{{ if isset $e "startdate" }} + {{ dateFormat "Monday, Jan 2, 2006" $startdate }} +{{ else }} + TBD +{{ end }} diff --git a/layouts/shortcodes/list_organizers.html b/layouts/shortcodes/list_organizers.html index 611176f30b3..b19a73190d7 100644 --- a/layouts/shortcodes/list_organizers.html +++ b/layouts/shortcodes/list_organizers.html @@ -1,5 +1,6 @@ -{{ $event := (print .Page.Params.year (lower .Page.Params.city)) }} -{{ $e := (index $.Page.Site.Data.events $event) }} +{{ $path := split .Page.Source.File.Path "/" }} +{{ $event_slug := index $path 1 }} +{{ $e := (index .Page.Site.Data.events $event_slug) }}