A Gulp Task for integrating Jekyll into a Gulp workflow
This is just the simple, but highly effective, task to use Jekyll without having to be chained to how its development server, preprocessing, and so on.
npm install gulp --save-dev
npm install yargs --save-dev
How to Use
DEPLOY constant is used with
yargs to allow the use of a
--production flag on the default gulp task. If the flag is used, then
true. This allows all kinds of conditional task actions in the gulpfile, but in this case, it allows leveraging Jekyll's own environment variable options. Using the
child_process module native to Node.js, this is all possible.
See the documentation on the module to learn more about the methods used in this task.