diff options
author | Nicholas Johnson <> | 2025-07-24 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <> | 2025-07-24 00:00:00 +0000 |
commit | 1b2f3edfc6ad85c73cfa2c9b55aac8c1906f24f90377eb0c7b4e51cf3923a59f (patch) | |
tree | d9393b43d7c60fd55cce1d56bfb3a59ba76fa9cc4e803c9c333310f69d8e298a /archetypes | |
parent | 538b204a4d27d341c59989e37c2a61248f75347257fc82ad65986cefac5ebd1e (diff) | |
download | hugo-theme-journal-1b2f3edfc6ad85c73cfa2c9b55aac8c1906f24f90377eb0c7b4e51cf3923a59f.tar.gz hugo-theme-journal-1b2f3edfc6ad85c73cfa2c9b55aac8c1906f24f90377eb0c7b4e51cf3923a59f.zip |
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
Diffstat (limited to 'archetypes')
-rw-r--r-- | archetypes/default.md | 5 |
1 files changed, 4 insertions, 1 deletions
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 --- |