{"id":20668730,"url":"https://github.com/caleorourke/grunt-jekyll-pages","last_synced_at":"2025-04-19T18:09:12.306Z","repository":{"id":20003634,"uuid":"23271106","full_name":"caleorourke/grunt-jekyll-pages","owner":"caleorourke","description":"Serve GitHub-flavored sites natively using Jekyll.","archived":false,"fork":false,"pushed_at":"2018-03-23T13:05:04.000Z","size":81,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T21:05:33.984Z","etag":null,"topics":["github-page","grunt","grunt-plugins","javascript","jekyll"],"latest_commit_sha":null,"homepage":"http://caleorourke.github.io/grunt-jekyll-pages","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caleorourke.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-24T02:23:35.000Z","updated_at":"2018-10-01T00:39:19.000Z","dependencies_parsed_at":"2022-08-27T03:40:32.882Z","dependency_job_id":null,"html_url":"https://github.com/caleorourke/grunt-jekyll-pages","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caleorourke%2Fgrunt-jekyll-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caleorourke%2Fgrunt-jekyll-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caleorourke%2Fgrunt-jekyll-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caleorourke%2Fgrunt-jekyll-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caleorourke","download_url":"https://codeload.github.com/caleorourke/grunt-jekyll-pages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249758713,"owners_count":21321583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-page","grunt","grunt-plugins","javascript","jekyll"],"created_at":"2024-11-16T20:11:06.931Z","updated_at":"2025-04-19T18:09:12.290Z","avatar_url":"https://github.com/caleorourke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://travis-ci.org/caleorourke/grunt-jekyll-pages\" target=\"_blank\"\u003e\u003cimg src=\"https://travis-ci.org/caleorourke/grunt-jekyll-pages.svg?branch=master\"\u003e\u003c/a\u003e\n\u003ca href=\"https://david-dm.org/caleorourke/grunt-jekyll-pages\" target=\"_blank\"\u003e\u003cimg src=\"https://david-dm.org/caleorourke/grunt-jekyll-pages.svg?theme=shields.io\"\u003e\u003c/a\u003e\n\u003ca href=\"https://david-dm.org/caleorourke/grunt-jekyll-pages#info=devDependencies\" target=\"_blank\"\u003e\u003cimg src=\"https://david-dm.org/caleorourke/grunt-jekyll-pages/dev-status.svg?theme=shields.io\"\u003e\u003c/a\u003e\n\u003ca href=\"http://github.com/caleorourke/grunt-jekyll-pages/blob/master/MIT-LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"http://img.shields.io/badge/License-MIT-blue.svg\" alt=\"MIT-license badge\"\u003e\u003c/a\u003e\n\n# grunt-jekyll-pages\n\u003e Serve GitHub-flavored sites natively using Jekyll.\n\n[grunt-jekyll-pages](https://github.com/caleorourke/grunt-jekyll-pages) is for anyone working with GitHub Pages. This plugin emulates how Github Pages runs Jekyll in safe mode on Linux or Mac OS. It also provides a number of options (build, serve, watch, etc.) for dev and testing purposes.\n\nThe [npm package](https://www.npmjs.com/package/grunt-jekyll-pages) is available publicly.\n\n## Getting Started\nThis plugin requires Node `\u003e=0.10` and Grunt `\u003e=0.4.0`.\n\nJekyll and GitHub Pages ([pages-gem](https://github.com/github/pages-gem)) must also be installed. Refer to the [Jekyll Installation](https://jekyllrb.com/docs/installation) guide for instructions.\n\nIf you haven't used [Grunt](http://gruntjs.com) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide. It explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile), as well as how to install and use Grunt plugins. Once you are familiar with that, install this plugin with this command:\n\n```shell\nnpm i grunt-jekyll-pages --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-jekyll-pages');\n```\n\n## Overview\nSetup your `Gruntfile.js` to use any of the options below by adding a section named `pages` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  pages: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    },\n  },\n});\n```\n\nUse this method to add or append configuration options, targets, etc., to the `pages` task.\n\n```js\ngrunt.initConfig({\n  pages: {                        // Task\n    options: {                    // Universal options\n      bundleExec: true,\n      src: '\u003c%= app %\u003e'\n    },\n    dist: {                       // Target\n      options: {                  // Target options\n        dest: '\u003c%= dist %\u003e',\n        config: '_config.yml,_config.build.yml'\n      }\n    },\n    serve: {                      // Another target\n      options: {\n        dest: '.jekyll',\n        drafts: true\n      }\n    }\n  }\n});\n\ngrunt.loadNpmTasks('grunt-jekyll-pages');\n\ngrunt.registerTask('default', ['pages']);\n```\n\n## Options\nYou can use the [configuration options](https://github.com/caleorourke/grunt-jekyll-pages/blob/master/OPTIONS.md) available for this plugin. Refer to the [Jekyll Documentation](http://jekyllrb.com/docs/configuration) for additional options.\n\n## Usage Examples\nFollow these Grunt examples to get started with grunt-jekyll-pages quickly.\n\n### Single Task\nThis example includes one registered task. `grunt verify` generates the site locally and makes it available at [10.0.0.1:8080](10.0.0.1:8080).\n\n```js\ngrunt.initConfig({\n  pages: {\n    preview: {\n      options: {\n        serve: true,\n        host: '10.0.0.1'\n        port: '8080'\n      }\n    }\n  }\n});\n\ngrunt.loadNpmTasks(\"grunt-jekyll-pages\");\n\ngrunt.registerTask(\"verify\", [\"pages:preview\"]);\n```\n\n### Multiple Tasks\nThis example includes two registered tasks. `grunt serve` generates the site locally, watches for changes, and makes it available at [localhost:4000](localhost:4000). `grunt test` generates the site and displays on-screen warnings for symlink errors.\n\n```js\ngrunt.initConfig({\n  pages: {\n    test: {},\n    serve: {\n      options: {\n        watch: true,\n        serve: true,\n        baseurl: ['\\\"\\\"']\n      }\n    }\n  }\n});\n\ngrunt.loadNpmTasks('grunt-jekyll-pages');\n\ngrunt.registerTask('serve', ['pages:serve']);\ngrunt.registerTask('test',  ['pages:test']);\n```\n\n### No Tasks (Raw)\nThis example has no specific task defined. `grunt pages:a` builds Jekyll's `_config.yml` file with a set of specific options, while `grunt pages:b` builds the same file with different options.\n\n```js\ngrunt.initConfig({\n  pages: {\n    a: {\n      options: {\n        config: '_config.yml',\n        // Construct a string with JavaScript\n        // Remember line breaks and indentation matter in YAML\n        raw: 'highlighter: pygments\\n' +\n        'exclude: [\\'development\\']\\n' +\n        'author:\\n' +\n        '  name: ' + fetchAuthor() + '\\n' +\n        '  email: ' + fetchEmail()\n      }\n    }\n    b: {\n      options: {\n        config: '_config.yml',\n        // Construct a string with JavaScript\n        // Remember line breaks and indentation matter in YAML\n        raw: 'highlighter: rouge\\n' +\n        'exclude: [\\'production\\']\\n' +\n        'author:\\n' +\n        '  name: ' + fetchAuthor() + '\\n' +\n        '  email: ' + fetchEmail()\n      }\n    }\n  }\n});\n\ngrunt.loadNpmTasks('grunt-jekyll-pages');\n```\n\n## Testing\nRun the following command to test this plugin.\n\n```shell\n$ grunt test-plugin\n```\n\n## Contributing\nPlease read the [Contributing Guidelines](http://github.com/caleorourke/grunt-jekyll-pages/blob/master/CONTRIBUTING.md) before submitting code. In lieu of a formal styleguide, take care to maintain the existing coding style. Add tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com).\n\n## Release History\nSee the [Release History](http://github.com/caleorourke/grunt-jekyll-pages/blob/master/HISTORY.md) for enhancements and changes applied to each version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaleorourke%2Fgrunt-jekyll-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaleorourke%2Fgrunt-jekyll-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaleorourke%2Fgrunt-jekyll-pages/lists"}