Docs about Docs logo Docs about Docs

Instructions for using Jekyll and working locally on the Stitch Docs.


Prerequisites


Step 1: Build a local version of Stitch Docs

Run the following command in the Stitch Docs repository to build the site locally:

jekyll build

If you encounter issues with jekyll build, try:

bundle exec jekyll build

Step 2: Spin up a local Jekyll server

After you’ve built the site (jekyll build), you can spin up a local Jekyll server to preview your changes as you make them.

In the command line, run the following:

jekyll serve

If you encounter issues with jekyll server, try:

bundle exec jekyll serve

Enable incremental regeneration

You can also enable incremental regeneration to help shorten build times. This will significantly reduce the amount of time it takes for Jekyll to refresh the local server when changes are made.

Because the Stitch Docs is quite a large site, using this configuration option is the most efficient way to work locally.

To enable it, add the --incremental flag when spinning up the server::

bundle exec jekyll serve --incremental

Note: Incremental regeneration will only regenerate files where direct changes are made - that is, directly to a page file or an include. Changes to data files will only be detected when the file using them is also saved.


After the server is finished generating (indicated by Server running... press ctrl-c to stop.), open up a browser and browse to localhost:4005/docs.

Note: To see your changes, you’ll need to refresh the page in the browser.


Back to top

Last updated: 22 February 2022