diff --git a/layouts/404.html b/layouts/404.html
index 234ac358..9bcd9cce 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,4 +1,4 @@
-{{- define "title" }}
+{{- define "title" -}}
{{- T "pageNotFound" | printf "404 %v" }} - {{ .Site.Title -}}
{{- end -}}
diff --git a/layouts/offline/single.html b/layouts/offline/single.html
index 354796d1..bd7a0d0f 100644
--- a/layouts/offline/single.html
+++ b/layouts/offline/single.html
@@ -1,4 +1,4 @@
-{{- define "title" }}
+{{- define "title" -}}
{{- T "offlineTitle" }} - {{ .Site.Title -}}
{{- end -}}