diff --git a/themes/jefklak-creative-portfolio/layouts/partials/head.html b/themes/jefklak-creative-portfolio/layouts/partials/head.html index e99039f..09403e5 100644 --- a/themes/jefklak-creative-portfolio/layouts/partials/head.html +++ b/themes/jefklak-creative-portfolio/layouts/partials/head.html @@ -2,9 +2,9 @@ {{ $base := .Site.BaseURL }} -{{ if .Title }} +{{- if .Title }} {{ .Title }} | {{ .Site.Title }} -{{ else }} +{{- else }} {{ .Site.Title }} {{ end }} @@ -17,61 +17,56 @@ - -{{ if .Description }} +{{- if .Description }} -{{ else }} +{{- else }} {{ end }} - -{{ if .Keywords }} +{{- if .Keywords }} -{{ else if .Params.tags }} +{{- 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%d%s" "img/hltb/" .Params.howlongtobeat_id ".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 }} +{{- $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) }} +{{- $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "articles") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" $perm) }} -{{ if $related }} - {{ range $related }} +{{- if $related }} + {{- range $related }} {{ end }} {{ end }} -{{ with .Params.tags }}{{ range first 6 . }} +{{- with .Params.tags }}{{ range first 6 . }} {{ end }}{{ end }} - -{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }} +{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}