Environment variables for Hugo static site.

ba1e7341.vtr-4eh.pages.dev 96833aa0fdf8cb11ca7cf31ad5633d48 The environment variables are set in Pages setting for below: GOOGLE_ANALYTICS_API_KEY GOOGLE_MAPS_API_KEY GOOGLE_RECAPTCHA_KEY In my hugo.toml I have set them as below: [security] [security.funcs] getenv = ["^.*$"] googleRecaptchaKey = "{{ getenv 'GOOGLE_RECAPTCHA_KEY' }}" googleMapsApiKey = "{{ getenv 'GOOGLE_MAPS_API_KEY' }}" [services.googleAnalytics] id = "{{ getenv 'GOOGLE_ANALYTICS_API_KEY' }}" None of them seem to be passing to the live site. No build errors. Not sure where to look.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?