From 1b2f3edfc6ad85c73cfa2c9b55aac8c1906f24f90377eb0c7b4e51cf3923a59f Mon Sep 17 00:00:00 2001 From: Nicholas Johnson <> Date: Thu, 24 Jul 2025 00:00:00 +0000 Subject: Replace deprecated front matter key "build" was effectively aliased to "_build" in Hugo version 0.123.0. So for backward compatibility, "_build" is used for Hugo versions prior to version 0.123.0. Reference: https://github.com/gohugoio/hugo/commit/d0ce94219049508e45c5a7c43a281ecde7778358 --- archetypes/default.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'archetypes/default.md') diff --git a/archetypes/default.md b/archetypes/default.md index 0951f88..b9c5ba2 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -3,7 +3,10 @@ title: "{{ replace .Name "-" " " | title }}" draft: true pageinfo: false makerefs: false -_build: +{{ $hugoVersionSlice := split hugo.Version "." -}} +{{ $majorVersion := int (index $hugoVersionSlice 0) -}} +{{ $minorVersion := int (index $hugoVersionSlice 1) -}} +{{ if and (eq $majorVersion 0) (lt $minorVersion 123) }}_{{ end }}build: list: never --- -- cgit v1.2.3