summaryrefslogtreecommitdiffstats
path: root/netlify.toml
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2024-09-27 20:23:26 +0200
committerGitHub <noreply@github.com>2024-09-27 20:23:26 +0200
commit628b3c2249db280ecb60ec0f8fd8053f88a265e4 (patch)
tree28b485882134deee3a6b1cb78b041c4fe4930f1a /netlify.toml
parent96fdcc50bde51af98c8ded2890f4c45c2c801b6e (diff)
downloadgohugo-theme-ed-628b3c2249db280ecb60ec0f8fd8053f88a265e4.tar.gz
Add Google Tag Manager support (#178)
Diffstat (limited to 'netlify.toml')
-rw-r--r--netlify.toml11
1 files changed, 7 insertions, 4 deletions
diff --git a/netlify.toml b/netlify.toml
index b7de027..bd57110 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -7,6 +7,7 @@
# a base has not been set. This sample publishes the directory
# located at the absolute path "root/project/build-output"
publish = 'public'
+ command = 'npm install'
[build.environment]
HUGO_VERSION = '0.121.0'
@@ -15,22 +16,24 @@
# Production context: all deploys from the Production branch
# set in your site’s Branches settings in the UI will inherit
# these settings. You can define environment variables
-# here but we recommend using the Netlify UI for sensitive
+# here, but we recommend using the Netlify UI for sensitive
# values to keep them out of your source repository.
[context.production]
command = 'hugo --source=exampleSite --baseURL ${URL} --destination ../public --minify'
[context.production.environment]
HUGO_ENV = 'production'
- HUGO_GOOGLEANALYTICS = 'G-DP9Q137C3X'
+ HUGO_ENABLEGITINFO = 'true'
# Deploy Preview context: all deploys generated from
# a pull/merge request will inherit these settings.
[context.deploy-preview]
- command = 'npm run netlify-preview; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public --minify'
+ # command = 'npm run netlify-preview; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public --minify'
+ command = 'npm run netlify-production; npm run netlify-preview; hugo --source=exampleSite --buildDrafts --buildFuture --baseURL ${DEPLOY_PRIME_URL} --destination ../public; cat ./public/index.html'
[context.deploy-preview.environment]
- HUGO_ENV = 'development'
+ # HUGO_ENV = 'development'
+ HUGO_ENV = 'production'
# Branch Deploy context: all deploys that are not from
# a pull/merge request or from the Production branch