+
{{ template "footer.tmpl" .}}
\ No newline at end of file
diff --git a/template/header.tmpl b/template/header.tmpl
index 53ead5b..00b4b28 100644
--- a/template/header.tmpl
+++ b/template/header.tmpl
@@ -16,10 +16,20 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
*/ -}}
+{{- /*
+ NESTED TEMPLATE DECLARATIONS
+ If some if/else macro is used multiple times, declare it once here instead.
+ When invoking these nested templates, remember to pass in the values passed
+ to the executing template, ie., use '{{ template "example" . }}' not
+ '{{ template "example" }}', otherwise you'll end up with empty variables.
+*/ -}}
+{{ define "thumbnailType" }}{{ if .instance.ThumbnailType }}{{ .instance.ThumbnailType }}{{ else }}image/png{{ end }}{{ end }}
+{{ define "instanceTitle" }}{{ if .ogMeta }}{{ .ogMeta.Title }}{{ else }}{{ .instance.Title }} - GoToSocial{{ end }}{{ end }}
+{{- /*
+ BOILERPLATE GOES HERE
+*/ -}}
-
-
diff --git a/template/profile.tmpl b/template/profile.tmpl
index 6915e6b..2cb2ad1 100644
--- a/template/profile.tmpl
+++ b/template/profile.tmpl
@@ -66,15 +66,15 @@