mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set
Fixes #11013
This commit is contained in:
19
testscripts/commands/hugo_configdev_env.txt
Normal file
19
testscripts/commands/hugo_configdev_env.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
# Test the hugo command.
|
||||
env HUGO_ENV=development
|
||||
|
||||
hugo
|
||||
grep 'myparam: dev§' public/index.html
|
||||
|
||||
-- hugo.toml --
|
||||
baseURL = "http://example.org/"
|
||||
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
|
||||
-- layouts/index.html --
|
||||
myparam: {{ site.Params.myparam }}§
|
||||
-- layouts/_default/single.html --
|
||||
Title: {{ .Title }}
|
||||
-- config/development/params.toml --
|
||||
myparam = "dev"
|
||||
-- content/p1.md --
|
||||
---
|
||||
title: "P1"
|
||||
---
|
Reference in New Issue
Block a user