diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index dd76fc752f..7b05b1674e 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,7 +1,7 @@
{{- partialCached "relearn-meta.gotmpl" . .Path -}}
{{- block "storeOutputFormat" . }}{{ end }}
-{{- if eq . .Site.Sites.First.Home }}
+{{- if .IsHome }}
{{- $hugoVersion := "0.126.0" }}
{{- if lt hugo.Version $hugoVersion }}
{{- errorf "The Relearn theme requires Hugo %s or later" $hugoVersion }}