Skip to content

Instantly share code, notes, and snippets.

@dannygarcia
Created September 20, 2012 02:39
Show Gist options
  • Select an option

  • Save dannygarcia/3753650 to your computer and use it in GitHub Desktop.

Select an option

Save dannygarcia/3753650 to your computer and use it in GitHub Desktop.

Revisions

  1. dannygarcia revised this gist Sep 21, 2012. 2 changed files with 3 additions and 3 deletions.
    2 changes: 1 addition & 1 deletion grunt.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    // Sample grunt-jekyll grunt.js file
    // https://github.com/dannyx0/grunt-jekyll
    // https://github.com/dannygarcia/grunt-jekyll

    /*global module:false*/
    module.exports = function(grunt) {
    4 changes: 2 additions & 2 deletions readme.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Sample [grunt-jekyll](https://github.com/dannyx0/grunt-jekyll) grunt.js
    # Sample [grunt-jekyll](https://github.com/dannygarcia/grunt-jekyll) grunt.js

    1. Use the following folder structure

    @@ -13,7 +13,7 @@

    1. Add the `grunt.js` file below at the root of your project.

    2. Install the [grunt-jekyll](https://github.com/dannyx0/grunt-jekyll) gruntmodule next to your project's grunt.js gruntfile with: `npm install grunt-jekyll`.
    2. Install the [grunt-jekyll](https://github.com/dannygarcia/grunt-jekyll) gruntmodule next to your project's grunt.js gruntfile with: `npm install grunt-jekyll`.

    3. Run the grunt jekyll commands:

  2. dannygarcia revised this gist Sep 20, 2012. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions readme.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Sample grunt-jekyll grunt.js
    # Sample [grunt-jekyll](https://github.com/dannyx0/grunt-jekyll) grunt.js

    1. Use the following folder structure

    @@ -24,4 +24,3 @@
    * `grunt jekyll:prod` to process files to the `prod` directory.

    Of course, everything here is fully configurable to your liking.

  3. dannygarcia revised this gist Sep 20, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions grunt.js
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@ module.exports = function(grunt) {
    jekyll: {
    server : {
    src : 'templates',
    dest: 'dev',
    server : true,
    server_port : 8000,
    auto : true
  4. dannygarcia revised this gist Sep 20, 2012. 2 changed files with 1 addition and 2 deletions.
    2 changes: 1 addition & 1 deletion grunt.js
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ module.exports = function(grunt) {
    }
    });

    // Default task. Prepare for deploy. Use before commit.
    // Default task. Run standard jekyll server.
    grunt.registerTask('default', 'jekyll:server');

    // plugin tasks
    1 change: 0 additions & 1 deletion readme.markdown
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    # Sample grunt-jekyll grunt.js

    1. Use the following folder structure
  5. dannygarcia created this gist Sep 20, 2012.
    40 changes: 40 additions & 0 deletions grunt.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    // Sample grunt-jekyll grunt.js file
    // https://github.com/dannyx0/grunt-jekyll

    /*global module:false*/
    module.exports = function(grunt) {

    // Project configuration.
    grunt.initConfig({

    jekyll: {
    server : {
    src : 'templates',
    server : true,
    server_port : 8000,
    auto : true
    },
    dev: {
    src: 'templates',
    dest: 'dev'
    },
    prod: {
    src: 'templates',
    dest: 'prod'
    }
    },

    watch: { // for development run 'grunt watch'
    jekyll: {
    files: ['templates/*.html'],
    tasks: ['jekyll:dev']
    }
    }
    });

    // Default task. Prepare for deploy. Use before commit.
    grunt.registerTask('default', 'jekyll:server');

    // plugin tasks
    grunt.loadNpmTasks('grunt-jekyll');
    };
    28 changes: 28 additions & 0 deletions readme.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@

    # Sample grunt-jekyll grunt.js

    1. Use the following folder structure

    ````
    [root]
    |-- templates/
    |-- index.html (Jekyll templates)
    |-- prod/
    |-- dev/
    |-- _config.yml (optional)
    ````

    1. Add the `grunt.js` file below at the root of your project.

    2. Install the [grunt-jekyll](https://github.com/dannyx0/grunt-jekyll) gruntmodule next to your project's grunt.js gruntfile with: `npm install grunt-jekyll`.

    3. Run the grunt jekyll commands:

    * `grunt jekyll` or `grunt jekyll:server` to start a server that watches the `templates` directory.

    * `grunt jekyll:dev` to process files to the `dev` directory.

    * `grunt jekyll:prod` to process files to the `prod` directory.

    Of course, everything here is fully configurable to your liking.