-
Notifications
You must be signed in to change notification settings - Fork 379
Environment variables unavailable #157
Comments
Also, in the previous version of victor-hugo (the last one using gulp) you were able to read all values from |
I'm seeing this issue also. It constantly thinks I'm in production. |
same issue here as well. |
Based on the recent failed build for this repo, it seems we're not setting a |
I tried setting the environment value again in the build:hugo script and it works.
|
I'm see this too and tried something similar to @AudiLiew, changed the following in order to get the snippet in the readme to work: I'm pretty new to this but it seems like an easy fix and I'm not sure why it hasn't been updated since 2019? |
- Do you want to request a feature or report a bug?
Bug
- What is the current behavior?
None of the environment variables are picked up from the project
.env
file nither from the flags added to the build script inpackage.json
- If the current behavior is a bug, please provide the steps to reproduce.
When adding the following code to one of the templates
It returns nothing even tho the .env is set to development or when running
npm build
- What is the expected behavior?
Be able to read environment variables within the templates
- Please mention your node.js, NPM, Hugo and operating system version.
Node: v10.13.0
NPM: v6.6.0
Hugo Static Site Generator v0.53/extended darwin/amd64 BuildDate: unknown
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.11.4"
The text was updated successfully, but these errors were encountered: