{{ $perm := .Permalink }} {{ $base := .Site.BaseURL }} {{- if .Title }} {{ .Title }} | {{ .Site.Title }} {{- else }} {{ .Site.Title }} {{ end }} {{- if .Description }} {{- else }} {{ end }} {{- if .Keywords }} {{- else if .Params.tags }} {{ end }} {{- $thumb := "img/favicon.png" | absURL }} {{- if .Params.image }} {{- $thumb = .Params.image | absURL }} {{- else if .Params.howlongtobeat_id }} {{- $thumb = printf "%s%s" $perm "cover.jpg" | absURL }} {{- else }} {{- $match := findRE `!\[(.*)\]\((.+).(jpg|png|gif)` .RawContent 1 }} {{- range $match }} {{- $relthumb := replaceRE `!\[(.*)\]\(` "" . }} {{- if hasPrefix $relthumb "/" }} {{- $thumb = printf "%s%s" $base $relthumb }} {{- else }} {{- $thumb = printf "%s%s" $perm $relthumb }} {{ end }} {{ end }} {{ end }} {{- $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "articles") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" $perm) }} {{- if $related }} {{- range $related }} {{ end }} {{ end }} {{- with .Params.tags }}{{ range first 6 . }} {{ end }}{{ end }} {{- $ISO8601 := "2006-01-02T15:04:05-07:00" }} {{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") -}} {{- $styles := resources.Get "sass/main.sass" | resources.ExecuteAsTemplate "main.sass" . | resources.ToCSS $options | resources.Fingerprint "sha512" }} {{ with .OutputFormats.Get "RSS" }} {{ end }}