| 1 |
# Issue 14763 |
| 2 |
|
| 3 |
# The staging config should not apply. |
| 4 |
hugo config |
| 5 |
! stdout 'myparam' |
| 6 |
mkdir content |
| 7 |
hugo new content foo.md |
| 8 |
hugo -DF |
| 9 |
! grep 'foo' public/foo/index.html |
| 10 |
|
| 11 |
# The staging config should apply. |
| 12 |
hugo config -e staging |
| 13 |
stdout 'myparam' |
| 14 |
hugo new content bar.md -e staging |
| 15 |
hugo -DF -e staging |
| 16 |
grep 'myparam: foo|' public/bar/index.html |
| 17 |
|
| 18 |
-- config/_default/hugo.toml -- |
| 19 |
baseURL = "https://example.com" |
| 20 |
-- config/staging/params.toml -- |
| 21 |
myparam = "foo" |
| 22 |
-- layouts/single.html -- |
| 23 |
myparam: {{ site.Params.myparam }}| |