Open navClose nav

Setup Your Site

This doc will walk you through:

  1. Setting up your site repository with Forestry
  2. Making your first commit by publishing some changes

Import Site from Repo

Sign up for a free account with then add a new site from your dashboard.

If you don’t have a static site, you can pick one of our starters

Select your Static Site Generator

Before choosing your repository, Forestry would like to know which static site generator is used to build your site. Forestry supports many static site generators and can provide default settings for Jekyll, Hugo, VuePress, or Gatsby. As Forestry is able to edit any content stored in Markdown, YAML and JSON, you can use it with all kinds of SSG: Eleventy, Gridsome, Hexo, Next, Nuxt, etc.

In the case of Hugo, you must also specify which version you use.,dpr_auto,f_auto,q_80,w_640/

Select your Git Provider

Forestry works by synchronizing content changes with a Git repository. In order to import your site, access to your Git provider is required. There are currently four Git providers supported by Forestry: GitHub, GitLab, Bitbucket, and Azure DevOps.,dpr_auto,f_auto,q_80,w_640/

Choose a Repository and Branch

Once the authorization is complete, you will be taken to the next screen where you can choose the repository you wish to import.

GitHub Repository Permissions

In order to watch for changes from GitHub, Forestry needs to be able to create a webhook for your repository. Because of this, you must have admin level permissions for any repository you wish to import. Repositories which you do not have admin access to will be visible in the dropdown, but cannot be selected.

If you use GitHub, you will see a button at the top of the modal with a lock. By default, Forestry only requests access to your public repositories. Click this button if you want to grant access to Forestry to import your private repositories. You will only have to do this once.,dpr_auto,f_auto,q_80,w_640/

Config path

If you are using Hugo or Jekyll, Forestry will look in the root of your repository for a configuration file. This will be a file named config.toml in Hugo, and _config.yml in Jekyll. If this file cannot be located, Forestry will prompt you to enter the path to this file. Enter the path from the root of your project to the directory containing this file. If you use config-based folders in Hugo, then add an empty config.toml file at root to bypass the check 😊 .

For example, if you have a repository containing a Hugo site in a subfolder named hugo/, your config.toml file will be located at hugo/config.toml. When you import your site into Forestry, it will prompt you to enter the config path, and you should enter hugo in this field.

Once you have chosen your repository and the config file for your site has been found, click the Import Site button. After a few moments you will be redirected into the Forestry CMS while the site finishes importing. Depending on the size of your site, the import process can take a few minutes. Stretch your legs, grab a glass of water, and it will be done before you know it.

Document State

Go into a post or page, edit some text and you will see “Unsaved Changes” at the top of your document.,dpr_auto,f_auto,q_80,w_640/

Preview Changes

Click preview to view your changes in a new tab.,dpr_auto,f_auto,q_80,w_640/

Having Trouble Previewing your Site?

Not all site work with previews out of the box. To learn more about how to configure previews for your site, visit the preview documentation

Make your first commit

Click the publish button to save changes and make a Git commit.,dpr_auto,f_auto,q_80,w_640/

The page should become up-to-date with your repository again.,dpr_auto,f_auto,q_80,w_640/

Go to your Git repo and look at your commit history. You should see your updates from Forestry there. Committing has never been easier!,dpr_auto,f_auto,q_80,w_640/

Last updated on March 23, 2017