Skip to content

Commit

Permalink
Update speaker directory with year/city path
Browse files Browse the repository at this point in the history
This is refactored to be MUCH better. It is on the right track. This will change slightly when we refactor in issue devopsdays#133.
  • Loading branch information
mattstratton committed Apr 14, 2016
1 parent 4c2899d commit cd8be63
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 2 deletions.
File renamed without changes.
11 changes: 9 additions & 2 deletions themes/devopsdays-legacy/layouts/talk/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ <h3>


<!-- speaker code begin -->

{{ range $fname, $s := index .Site.Data.speakers (printf "%s%s" $e.year (lower $e.city) ) }}
{{/*
For future reference, this range listed below is going to be a key element for when we refactor the data directory
Notice how you pass the variables, etc. So the new code would probably be something like this:
.Site.Data.events $e.year "speakers" (printf "%s" (lower $e.city))
and to get at the meta.yml for the city it will be
.Site.Data.events $e.year (printf "%s" (lower $e.city))
- mattstratton
*/}}
{{ range $fname, $s := index .Site.Data.speakers $e.year (printf "%s" (lower $e.city)) }}
{{ if eq $fname ($.Title | urlize) }}
<h2>Speaker</h2>
<h3>{{ $s.name }}</h3>
Expand Down

0 comments on commit cd8be63

Please sign in to comment.