summaryrefslogtreecommitdiffstats
path: root/testscripts/commands/hugo_configdev_env.txt
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-24 15:53:49 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-24 16:39:31 +0200
commit231374a1fa0faf66ca3aa51368b97ea6e7317803 (patch)
treed82c02bbb9dc39e723e5f958c754c3f5a4fe211f /testscripts/commands/hugo_configdev_env.txt
parent5adc8379047a1894686c2ad282a8f2f7b150b450 (diff)
Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set
Fixes #11013
Diffstat (limited to 'testscripts/commands/hugo_configdev_env.txt')
-rw-r--r--testscripts/commands/hugo_configdev_env.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/testscripts/commands/hugo_configdev_env.txt b/testscripts/commands/hugo_configdev_env.txt
new file mode 100644
index 000000000..758f4fc96
--- /dev/null
+++ b/testscripts/commands/hugo_configdev_env.txt
@@ -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"
+---