Setup Your Site
This doc will walk you through:
- Setting up your site repository with Forestry
- Making your first commit by publishing some changes
Import Site from Repo
If you don’t have a Jekyll, Hugo or VuePress site already, click the link in the bottom of the setup window to launch the demo site.
Select your Static Site Generator
Before choosing your repository, Forestry needs to know which static site generator is used to build your site. Forestry supports Jekyll, Hugo, and [VuePress](). In the case of Hugo, you must also specify which version you use.
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 three Git providers supported by Forestry: GitHub, GitLab, and Bitbucket.
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.
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.
For example, if you have a repository containing a Hugo site in a subfolder named
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.
Go into a post or page, edit some text and you will see “Unsaved Changes” at the top of your document.
Click preview to view your changes in a new tab.
Make your first commit
Click the publish button to save changes and make a Git commit.
The page should become up-to-date with your repository again.
Go to your Git repo and look at your commit history. You should see your updates from Forestry there. Committing has never been easier!
Caught a mistake or want to contribute to the docs? Edit this page on Github!