{{ define "head"}} {{ .Title }} {{ end }} {{ define "main" }}

{{.Title}}

{{ dateFormat "Jan 2, 2006" .Date }} {{ if .Params.author }} {{ .Params.author }} {{ end }} {{ if .Params.github_link }} {{ end}}
{{ if .Site.Params.showdescription }}
{{ .Params.description }}
{{ end }}
{{ $siteUrl := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $.Scratch.Add "sitePath" .Site.BaseURL }} {{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }} {{ range $index, $element := split $siteUrl "/" }} {{ $.Scratch.Add "sitePath" $element }} {{ $.Scratch.Add "sitePath" "/" }} {{ if ne $element "" }} {{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" ($.Scratch.Get "sitePath") "name" . "position" (add $index 2))) }} {{ end }} {{ end }}
{{ with .Params.bg_image }} {{ end }}
{{.Content}}
Tags
{{ if .Params.tags }} {{ range .Params.tags }} {{ . }} {{ end }} {{ end }}
{{ template "_internal/disqus.html" . }}
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $.Scratch.Add "path" .Site.BaseURL }} {{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }} {{ range $index, $element := split $url "/" }} {{ $.Scratch.Add "path" $element }} {{ $.Scratch.Add "path" "/" }} {{ if ne $element "" }} {{ $.Scratch.Add "breadcrumb" (slice (dict "url" ($.Scratch.Get "path") "name" . "position" (add $index 2))) }} {{ end }} {{ end }}
{{ end }}