function runHugo()

in src/main/assets/gulp/hugo.js [24:42]


function runHugo(publish) {
    const src = global.hugoConfig.srcDir;
    const dst = global.hugoConfig.publicDir;
    const conf = global.hugoConfig.srcDir + 'config.yaml';
    const argv = require('yargs').argv;

    let cmd = hugo + ' --config=' + conf + ' -s ' + src + ' -d ' + dst;

    if (publish) {
        cmd += ' --baseUrl="' + argv.prod_host + '" ';
    } else {
        cmd += ' --baseUrl="http://' + argv.host + ':' + argv.port + '/" '
            + ' --buildDrafts=true --verbose=true --buildFuture';
    }

    console.log("Running " + cmd);
    const result = childProcess.execSync(cmd, {encoding: 'utf-8'});
    console.log('hugo out: \n' + result);
}