diff --git a/content/blog/_index.md b/content/blog/_index.md
new file mode 100644
index 0000000..9bff67d
--- /dev/null
+++ b/content/blog/_index.md
@@ -0,0 +1,3 @@
+---
+title: Blog
+---
diff --git a/themes/hugo-sustain/layouts/partials/head.html b/themes/hugo-sustain/layouts/partials/head.html
index 57bda9c..95fa156 100644
--- a/themes/hugo-sustain/layouts/partials/head.html
+++ b/themes/hugo-sustain/layouts/partials/head.html
@@ -12,8 +12,6 @@
{{- $title = print .Site.Title " | " .Title -}}
{{- end -}}
{{- end -}}
- {{- $image := path.Join "/img" .Site.Params.avatar -}}
- {{- if isset .Params "headerimage" }} {{ $image = print "img/" .Params.headerimage }} {{ end -}}
@@ -29,18 +27,32 @@
{{- partialCached "head/css.html" . }}
- {{ "" | safeHTML }}
-
-
-
-
+
+ {{- $image := "" -}}
+ {{- $imagesrc := (.Page.Params.headerimage.src | default .Site.Params.avatar) -}}
+ {{- if eq .Page.BundleType "leaf" }}
+ {{- with .Page.Resources.GetMatch $imagesrc }}
+ {{- $image = . -}}
+ {{- end }}
+ {{- else }}
+ {{- with resources.GetMatch (printf "**/%s" $imagesrc) }}
+ {{- $image = . -}}
+ {{- end }}
+ {{- end }}
+ {{- if $image }}
+ {{- $image = $image.Fill "1200x630 jpg" -}}
+ {{- end }}
- {{ "" | safeHTML }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{- with $image }}
+
+
+
+
+ {{- end }}