使用Jekyll和Gulp [英] Use Jekyll with Gulp
问题描述
我读了关于Gulp的文章,颇受哲学的影响。我想为自己尝试一下,但我遇到了一个小问题。我习惯于使用Jekyll和Grunt,但我不知道如何让Jekyll和Gulp打好关系。
我遇到过这篇文章暗示在使用Gulp时不需要Jekyll插件。不幸的是,它并没有真正解释如何去做,它链接到的示例没有帮助我很多。有没有人知道如何去做这件事?
$ b $ pre $
require('child_process')。spawn('jekyll',['build'],{ stdio:'inherit'});
I read about Gulp and was quite taken by the philosophy. I want to try it out for myself but I am running into a little problem. I am used to using Jekyll with Grunt and I have no idea how to get Jekyll to play nice with Gulp.
I've come across this article which suggests there is no need for a Jekyll plugin when using Gulp. Unfortunately it doesn't really explain how to go about it and the example it links to doesn't help me much.
Is there anyone who knows how to go about this?
Read this blog post: Why you shouldn’t create a gulp plugin
Then realize you can easily trigger Jekyll in vanilla Node.js. No need for a plugin.
require('child_process').spawn('jekyll', ['build'], {stdio: 'inherit'});
这篇关于使用Jekyll和Gulp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!