Running Jekyll


To run Jekyll on a site, we’ll navigate to the site’s directory in the command line, then run one of these commands.


jekyll serve

Does a build of the site to _site and runs a local development server at http://localhost:4000 by default. Any changes we make to a site (except edits to _config.yml) trigger the site to rebuild and the development server to refresh. This command is typically used while you’re developing a site as it automatically builds and serves your site locally after a change.


jekyll build

This builds the site to _site. From here we would typically copy the contents of _site to a hosting provider.

Runtime flags

There’s a number of runtime flags we can pass these commands to adjust how the site is built. For example if we wanted the build to include all of our draft blog posts we could run jekyll like this:

jekyll build --drafts

Below is a full list of the run time parameters available. Many of these can be added to your _config.yml if you want them to run every time, check the configuration documentation for more information.

Setting Flags

Site Source

Change the directory where Jekyll reads files.

-s, --source DIR

Site Destination

Change the directory where Jekyll writes files.

-d, --destination DIR


Disable custom plugins and ignore symbolic links.



Automatically regenerate the site when files are modified.

-w, --[no-]watch


Specify config files instead of using _config.yml automatically. Settings in later files override settings in earlier files.

--config FILE1[,FILE2,...]


Process and render draft posts.



Use a specific environment value in the build.



Publish posts or collection documents with a future date.



Produce an index for related posts.


Limit Posts

Limit the number of posts to parse and publish.

--limit_posts NUM

Force polling

Force watch to use polling.


Verbose output

Print verbose output.

-V, --verbose

Silence Output

Silence the normal output from Jekyll during a build.

-q, --quiet

Incremental build

Enable the experimental incremental build feature. Incremental build only re-builds posts and pages that have changed, resulting in significant performance improvements for large sites, but may also break site generation in certain cases.

-I, --incremental