使用Jekyll和Gulp [英] Use Jekyll with Gulp

查看:115
本文介绍了使用Jekyll和Gulp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了关于Gulp的文章,颇受哲学的影响。我想为自己尝试一下,但我遇到了一个小问题。我习惯于使用Jekyll和Grunt,但我不知道如何让Jekyll和Gulp打好关系。

我遇到过这篇文章暗示在使用Gulp时不需要Jekyll插件。不幸的是,它并没有真正解释如何去做,它链接到的示例没有帮助我很多。



有没有人知道如何去做这件事?

解决方案阅读此博客文章:为什么你不应该创建一个gulp插件

然后意识到你可以很容易地在vanilla Node.js中触发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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆