Lego2012
10/12/2016 - 10:45 PM

Erzeuge die Jekyll-Site - Development Modus

Erzeuge die Jekyll-Site - Development Modus

// Development: Jekyll: Erzeuge die Jekyll-Site
// http://blog.webbb.be/use-jekyll-with-gulp/

gulp.task('jekyll', function (gulpCallBack){
    var spawn = require('child_process').spawn;
    var jekyll = spawn('jekyll', ['build', '-q', '--source=' + config.development.src, '--destination=' + config.development.dest, '--config=' + config.development.config], {stdio: 'inherit'});

    jekyll.on('exit', function(code) {
        gulpCallBack(code === 0 ? null : 'ERROR: Jekyll process exited with code: '+code);
    });
});

gulp.task('jekyll-rebuild', ['jekyll'], function() {
  browserSync.reload();
});