Jekyll allows you to work on your site in a local environment on your computer. It requires you to have
For detailed instructions on installing Ruby for your operating system, see the Ruby Docs.
RubyGems are installed, you can install
Bundler by running:
$ gem install bundler
Working with Git
If you set up and imported your site with Git, local development becomes much easier. We recommend you do this.
To get started, clone your repository to your desktop. For example:
git clone https://github.com/forestryio/jekyll-demo.git
Now you can begin working on your site. Any changes made to your site can be committed in Git, and will automatically be synced with your Forestry CMS.
Working with a Zip-based site
If you set up and imported your site with a zip file, local development becomes more challenging.
Any changes made to your site must be rezipped and reimported into your Forestry CMS.
You can do this from your Forestry Dashboard, by choosing “Re-upload Project” from the site’s dropdown menu (…).
IF YOU ONLY UPDATED LAYOUTS/THEMES
If you didn’t change any of your content files, then you can choose “Update project files” which will only update the source code we use to deploy your site.
IF YOU UPDATED CONTENT FILES
If you did change your content files, then you can choose
Update project files & content files which will update the source code and all of the content in Forestry.
Serving your site locally
Jekyll comes with a local development server built into its binary. This will allow you to develop locally on your machine, and will automatically rebuild your site and refresh the browser as you make changes.
To run Jekyll with the server, run the command:
$ jekyll serve
This will spin up a local development server with live reload at the port
4000, which is accessible from
For information on how to handle deployment of your site to your production or staging environment, see our Deployment doc
Caught a mistake or want to contribute to the docs? Edit this page on Github!