Code Monkey home page Code Monkey logo

gulp-jekyll-stream's Introduction

gulp-jekyll-stream Build Status

Stream a compiled Jekyll site with Gulp

Forked from gulp-jekyll

Example

Example gulpfile.js, shown with defaults:

const gulp = require('gulp');
const jekyll = require('gulp-jekyll');

gulp.task('default', () => {
  // in addition, ANY COMMAND-LINE FLAG OR OPTION to the `jekyll` executable
  // can be specified in the `options` object!
  const options = {
    bundleExec: false,             // exec jekyll w/ "bundle exec"
    quiet: true,                   // suppress jekyll output; implies "--trace"
    safe: false,                   // run Jekyll in "safe" mode     
    cwd: process.cwd(),            // below paths will be relative to this
    layouts: '_layouts',           // where your layouts live
    plugins: '_plugins'            // where your plugins live
    // source: '/path/to/source'   // overrides gulp.src() above
    // destination: '_site'        // can be used instead of gulp.dest()
  };
  
  return gulp.src(process.cwd())     // where your site source lives; this is
    .pipe(jekyll(options))
    .pipe(gulp.dest('_site'));
});

If you are using GitHub Pages with the recommended method, then you'll want bundleExec: true.

vs. gulp-jekyll

You'd want to use this package instead of gulp-jekyll if you want to pipe Jekyll's output somewhere.

The main differences are:

  • You must provide a directory path using gulp.src() (or the source property) to the plugin; Jekyll operates on entire directories; not files!
  • The output of this stream is all the files which Jekyll generated
  • If you neglect to pipe this plugin's output, and do not specify the destination property, the generated site disappears into the ether

Installation

Prerequisites

  • Some version of Ruby
  • Some version of Bundler
  • Some version of Jekyll
  • Node.js v6 or newer
npm install gulp-jekyll-stream gulp -D

History

  • v1.0.1: Update README.md ๐Ÿ˜‰
  • v1.0.0:
    • New features:
      • Support any and all jekyll command-line options
    • Bug fixes?
    • Breaking changes:
      • Update dependencies
      • Update dev depenedncies
      • Require Node.js v6 or newer
  • v0.1.0: Initial Release

Author

Christopher Hiller, based on code by Danny Garcia.

License

MIT

gulp-jekyll-stream's People

Contributors

boneskull avatar dannygarcia avatar greenkeeperio-bot avatar lanzarin avatar robinboehm avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lanzarin dqmmpb

gulp-jekyll-stream's Issues

Not work with win7 platform

Under linux platform, it works fine!
But, when I use cygwin+ruby in win7 platform, it throw error

events.js:154
throw er; // Unhandled 'error' event
^

Error: spawn jekyll ENOENT
at exports._errnoException (util.js:856:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at _combinedTickCallback (node.js:377:13)
at process._tickCallback (node.js:401:11)

I think maybe the command not find jekyll. So I change the lib/index.js

done(null, (options.bundleExec ? ['bundle', 'exec'] : [])
.concat([process.platform === 'win32' ? 'jekyll.bat' : 'jekyll', 'build'])
.concat(dargs(options, {
includes: includes
})), options);

it works.
I want to know why? Is it the error of ruby? or jekyll? or others?

Error: get unique tmp filename

Hi,

I get this error when using the plugin:

Error in plugin 'gulp-jekyll-stream'
Message:
    Error: Could not get a unique tmp filename, max tries reached /var/folders/p4/1zgggfqx63qfx8mhg8q5czgw0000gn/T/gulp-jekyll-stream-temp

Do you have any idea ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.