{{ define "main" }} {{ $entry := "" }} {{ $data := $.Site.Data.news.items }} {{ $slug := lower .Title }} {{ $slug := replace $slug " " "-" }} {{ range where $data "fields.slug" $slug }} {{ $entry := . }} {{/* comment

ID = {{ $entry.sys.id }}

*/}}

{{ $entry.fields.title }}

{{ if ( isset $entry.fields "author" ) }} {{ $authorName := $entry.fields.author }} {{/* {{ $authorId := replace $authorName " " "-" }} {{ $author := index $.Site.Data.authors $authorId }} {{ $author.email }} */}}

By {{ $entry.fields.author }}

{{ end }} {{ $entry.fields.body | markdownify}}
{{ end }} {{ end }}