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

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

问题描述

我读过 Gulp 并被其哲学所吸引.我想自己尝试一下,但我遇到了一个小问题.我习惯于将 Jekyll 与 Grunt 一起使用,但我不知道如何让 Jekyll 与 Gulp 配合得很好.

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.

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

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.

有没有人知道怎么做?

推荐答案

阅读这篇博文:为什么你不应该创建一个 gulp 插件

然后意识到您可以轻松地在 vanilla Node.js 中触发 Jekyll.不需要插件.

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天全站免登陆