Suggestion for adding Gatsby JS

This commit is contained in:
Kalin Chernev
2017-08-15 09:54:45 -07:00
committed by GitHub
parent 2d344ef4ca
commit 22ca155b7c

View File

@ -8,7 +8,7 @@ Netlify CMS relies on the GitHub API for managing files, so you'll need to have
### Hosting with Netlify ### Hosting with Netlify
In order to use Netlify's authentication provider service, you'll need to connect your site repo with Netlify. Netlify has published a general [Step-by-Step Guide](https://www.netlify.com/blog/2016/10/27/a-step-by-step-guide-deploying-a-static-site-or-single-page-app/) for this, along with detailed guides for many popular static site generators, including [Jekyll](https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/), [Hugo](https://www.netlify.com/blog/2016/09/21/a-step-by-step-guide-victor-hugo-on-netlify/), [Hexo](https://www.netlify.com/blog/2015/10/26/a-step-by-step-guide-hexo-on-netlify/), [Middleman](https://www.netlify.com/blog/2015/10/01/a-step-by-step-guide-middleman-on-netlify/), and more. In order to use Netlify's authentication provider service, you'll need to connect your site repo with Netlify. Netlify has published a general [Step-by-Step Guide](https://www.netlify.com/blog/2016/10/27/a-step-by-step-guide-deploying-a-static-site-or-single-page-app/) for this, along with detailed guides for many popular static site generators, including [Jekyll](https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/), [Hugo](https://www.netlify.com/blog/2016/09/21/a-step-by-step-guide-victor-hugo-on-netlify/), [Hexo](https://www.netlify.com/blog/2015/10/26/a-step-by-step-guide-hexo-on-netlify/), [Middleman](https://www.netlify.com/blog/2015/10/01/a-step-by-step-guide-middleman-on-netlify/), [Gatsby](https://www.netlify.com/blog/2016/02/24/a-step-by-step-guide-gatsby-on-netlify/) and more.
### Authenticating with GitHub ### Authenticating with GitHub
@ -33,10 +33,13 @@ All Netlify CMS files are contained in a static `admin` folder, stored at the ro
These generators ... | store static files in These generators ... | store static files in
--- | --- --- | ---
Jekyll, GitBook | `/` (project root) Jekyll, GitBook | `/` (project root)
Hugo | `/static` Hugo, Gatsby* | `/static`
Hexo, Middleman | `/source` Hexo, Middleman | `/source`
Spike | `/views` Spike | `/views`
Notes:
- Gatsby treats `static` folder more strictly and will not render the admin page as the others. You will have to make a [page component](https://www.gatsbyjs.org/docs/building-with-components/) contining the necessary contents of the admin page. However, the `config.yml` is to be placed in the `static` folder in the same way.
If your generator isn't listed here, you can check its documentation, or as a shortcut, look in your project for a `CSS` or `images` folder. They're usually processed as static files, so it's likely you can store your `admin` folder next to those. (When you've found the location, feel free to add it to these docs by [filing a pull request](https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md)!). If your generator isn't listed here, you can check its documentation, or as a shortcut, look in your project for a `CSS` or `images` folder. They're usually processed as static files, so it's likely you can store your `admin` folder next to those. (When you've found the location, feel free to add it to these docs by [filing a pull request](https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md)!).
Inside the `admin` folder, you'll create two files: Inside the `admin` folder, you'll create two files:
@ -212,4 +215,4 @@ collections:
With your configuration complete, it's time to try it out! Go to `yoursite.com/admin` and complete the login prompt to access the admin interface. To add users, simply add them as collaborators on the GitHub repo. With your configuration complete, it's time to try it out! Go to `yoursite.com/admin` and complete the login prompt to access the admin interface. To add users, simply add them as collaborators on the GitHub repo.
Happy posting! Happy posting!