blob: 18ae1d22de512d6495551616c08a784506edd0c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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!');
|