jekyll new my-awesome-site
create a package.json
and Gruntfile.js
Add this to the package.json file
{
“name”: “my-site-name”,
“description”: “My new Jekyll site.”,
“version”: “0.1.0”,
“devDependencies”: {
“grunt”: “~0.4.5”,
“grunt-contrib-watch”: “~0.6.1”,
“grunt-shell”: “^1.1.2”,
“load-grunt-tasks”: “~0.6.0”,
“time-grunt”: “~0.4.0”
}
}
Run npm install
in the CLI. Grunt plugins get added to the node_modules folder.
Add exclude: [‘node_modules’]
to the _config.yml so that node_modules does not get added to the site build.
Stop Jekyll from building the css as Grunt will take over the task instead
exclude: [‘css’, ‘_scss’]
tell Jekyll not to erase the CSS directory in the _site output folder each time it rebuilds
keep_files: [‘_site/css’]
Out of the box, Jekyll has a separate CSS directory in the root of the project that contains the main.scss file. For simplicity sake, and because Jekyll no longer has to worry about the Sass files, I’ve moved main.scss into the _sass directory and gotten rid of the empty CSS directory. I recommend you do this as well so the upcoming Sass config path examples are consistent with your own.
grunt-concurrent, to allow tasks to run simultaneously, and grunt-sass, to run the node-sass compiler
$ bower install bootstrap-sass