Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions layouts/partials/events/event_metadata.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{/* site data query copypasta from event/single.html, per mattstratton's note - esigler */}}
{{ $path := split $.Source.File.Path .Site.Params.pathseperator }}
{{ $event_slug := index $path 1 }}
{{ $e := (index $.Site.Data.events $event_slug) }}
{{/* end site data query */}}

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ExhibitionEvent",
"description": "The conference that brings development and operations together.",
"name": "DevOpsDays {{ $e.city }} {{ $e.year }}",
"startDate": "{{ $e.startdate }}",
"endDate": "{{ $e.enddate }}",
"url": {{ .Permalink }},
"image": {{ string ( delimit ( slice "/events/" $event_slug "/logo.png") "" ) | absURL }},
"location": {
"@type": "Place",
{{ if eq $e.city $e.location }}
"name": "{{ $e.city }}",
{{ else }}
"name": "{{ $e.location }}, {{ $e.city }}",
{{ end }}
"address": "{{ $e.coordinates }}"
}
}
</script>
8 changes: 8 additions & 0 deletions layouts/partials/footer_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
{{ $.Scratch.Set "twitter_handle" "devopsdays" }}
{{ $.Scratch.Set "sharing_title" "DevOpsDays" }}
{{ end }}

<!-- set strutured metadata -->
{{ if .IsPage }}
{{ if or (eq .Type "welcome") (eq .Type "event") }}
{{ partial "events/event_metadata.html" . }}
{{ end }}
{{ end }}
<!-- end metadata -->
<script src="/js/devopsdays-min.js"></script>
<!-- <script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC1bvNK9qFJGEhoWNbQuojmJJ1Tg0DoOew&callback=initMap">
Expand Down