Created
March 28, 2017 08:55
-
-
Save DinisCruz/52b37ca0cb54584f4791e00edfccdd30 to your computer and use it in GitHub Desktop.
Simple gulp file to serve and watch Jekyll pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browserSync = require('browser-sync').create(); | |
gulp = require('gulp'); | |
shell = require('gulp-shell'); | |
gulp.task 'build', shell.task(['jekyll build --incremental']) | |
gulp.task 'reload-page', ['build'], -> browserSync.reload() | |
gulp.task 'default' , ['build'],-> | |
browserSync.init | |
port : 9000 # site will be available at http://localhost:9000/ | |
open : false # use to not open a new browser window every time we start gulp | |
logConnections : true | |
logLevel : 'debug' | |
startPath : '/new/about.html' # first page that loads up | |
server : baseDir: '_site/' | |
gulp.watch 'new/**/*.md' , ['reload-page'] | |
gulp.watch 'website/**/*.*' , ['reload-page'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment