diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2024-09-27 20:23:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-27 20:23:26 +0200 |
| commit | 628b3c2249db280ecb60ec0f8fd8053f88a265e4 (patch) | |
| tree | 28b485882134deee3a6b1cb78b041c4fe4930f1a /netlify-production.js | |
| parent | 96fdcc50bde51af98c8ded2890f4c45c2c801b6e (diff) | |
| download | gohugo-theme-ed-628b3c2249db280ecb60ec0f8fd8053f88a265e4.tar.gz | |
Add Google Tag Manager support (#178)
Diffstat (limited to 'netlify-production.js')
| -rw-r--r-- | netlify-production.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/netlify-production.js b/netlify-production.js new file mode 100644 index 0000000..18ae1d2 --- /dev/null +++ b/netlify-production.js @@ -0,0 +1,15 @@ +const fs = require('fs'); +const yaml = require('yaml'); + +const filePath = 'exampleSite/config/_default/params.yaml'; +const file = fs.readFileSync(filePath, 'utf8'); +const config = yaml.parse(file); + +config.privacy.googleTagManager.disable = false; +config.services.googleTagManager.id = 'GTM-W8D5W642'; + +const newYaml = yaml.stringify(config); + +fs.writeFileSync(filePath, newYaml, 'utf8'); + +console.log('Updated config.yaml successfully!'); |
