Yeoman generators and Grunt tasks to work with Jekyll sites
Pull request Compare This branch is 10 commits behind mklabs:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Grab dev dependencies (yeoman generators & grunt tasks). In the Jekyll website root.

npm install

Install Jekyll locally

gem install jekyll rdiscount


To enable below commans, project gruntfile should load the plugin tasks:


Run the build script

yeoman build

This will compile the Jekyll website in the intermediate directory _temp/, go through yeoman build script, and finally copy the result over _site/

preview server

yeoman server

This will run Jekyll with the default configuration setup in _config.yml. Both auto and server options should be turned on. Jekyll will watch for modifications and rebuilt automatically in _site.

Yeoman / Grunt are configured to watch any files with _site directory, and will start a LiveReload compatible server on port 35729.

Install the LiveReload extensions, visit http://localhost:4000 (default hostname / port, you change it in the _config.yml), click the LR icon, connection should establish and you can then enjoy the live reloading of your Jekyll website.


yeoman-jekyll defines the following generators:

  • gruntfile:jekyll
  • jekyll

yeoman init jekyll -h

Generator based on @necolas' jekyll-boilerplate, with some ability to wire up some of the GitHub Page theme.

  yeoman init jekyll LOCATION [options]

  -h, --help       # Print generator's options and usage
                   # Default: false
      --theme      # Choose a theme from the following GitHub page templates:
                     - orderedlist/modernist
                     - orderedlist/minimal
                     - mattgraham/Midnight
                     - jsncostello/slate
                     - mattgraham/Leap-Day
                     - jonrohan/time-machine-theme
                     - cameronmcefee/merlot
                     - broccolini/dinky
                     - tactile
                   # Default: tactile
      --gruntfile  # Gruntfile to be invoked
                   # Default:

    Yeoman generator based on @necolas' Jekyll Boilerplate.

    This generator will simply fetch the latest state of jekyll-boilerplate's
    master branch (unless the content is already cached by yeoman at
    `~/.yeoman/cache/necolas/jekyll-boilerplate)` in the `location` argument


    - location: Defaults to current working directory. Base directory to copy
                the content of the remote template.


    This generator will also generate:

      - a basic Gruntfile if none were found
      - a tasks/ directory with:
        - server: Override the built-in server command to run Jekyll instead.


    yeoman init jekyll

    This will create:
        |-- .gitignore
        |-- README
        |-- _config.yml
        |-- _layouts
        |   |-- default.html
        |   |-- post.html
        |-- _includes
        |-- _posts
        |   |--
        |-- index.html

yeoman init gruntfile:jekyll -h

Invoked by jekyll generator as hook, but can be triggered directly to generate only the grunt configuration, or update an existing one.

  yeoman init gruntfile:jekyll  [options]

  -h, --help  # Print generator's options and usage
              # Default: false

    This generator is here to help with the setup of grunt / yeoman
    configuration on Jekyll based websites.

    It'll scan the current working directory for key-directories and known file
    patterns. You'll then be asked for confirmation on each of these directory,
    with sensitive defaults, or suggestion based on the current file structure.

    ex. A lookup is performed on the current working directory for CSS (and
    scss/sass files). Each result is then reduced into a list of unique
    directory paths. If the scanned directories consists in a single result,
    then the system suggest to use that path as "styles" value.

    The result is then persisted as a local `.yeomanrc` JSON file, along the
    generation of a Yeoman Gruntfile.

    yeoman init gruntfile:jekyll

    This will create: