{{ define "main" }} {{ if not (eq .Type "response" "bookmarkof")}}
{{ .Content }} {{ if eq .Type "photo"}}
{{ range .Page.Params.Photo }} {{ if isset . "value" }} {{ .alt }} {{ else }}  Trying to fix {{end}} {{end}}
{{end}} {{ if eq .Type "article" }} {{ end }}
{{ if not (eq .Type "article") }}{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}{{ end }}
{{ else if eq .Type "bookmarkof" }}
{{ $cats := slice }} {{ range .Site.Data.bookmarks }} {{ $cats = $cats | append .category }} {{ end }} {{ $cats = uniq $cats | sort }} {{ range $cats }} {{ $cat := . }}

{{ $cat }}

{{ range $.Site.Data.bookmarks }} {{ if eq .category $cat }} {{ end }} {{ end }}
{{ end }}
{{ else}}

{{ .Site.Params.Firstname }} {{ if eq .Params.posttype "in-reply-to" }} replied to {{ index .Params "in-reply-to" }}{{ end }} {{ if eq .Params.posttype "like-of" }} liked {{ index .Params "like-of" }}{{ end }} {{ if eq .Params.posttype "repost-of" }} shared {{ index .Params "repost-of" }}{{ end }}

{{ if .Content }}

{{ .Content }}

{{end}} {{ if not (eq .Type "article") }}
{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}
{{ end }} {{ end }} {{end}}