feat(test): add docs linter to PR workflow actions (#4321)

This commit is contained in:
silverwebb925
2020-10-11 07:02:47 -07:00
committed by GitHub
parent 277a1519be
commit 2146b3605f
37 changed files with 23405 additions and 286 deletions

View File

@ -3,7 +3,6 @@ group: Intro
weight: 3
title: Add to Your Site
---
You can adapt Netlify CMS to a wide variety of projects. It works with any content written in markdown, JSON, YAML, or TOML files, stored in a repo on [GitHub](https://github.com/), [GitLab](https://about.gitlab.com/), or [Bitbucket](https://bitbucket.org). You can also create your own custom backend.
This tutorial guides you through the steps for adding Netlify CMS to a site that's built with a common [static site generator](https://www.staticgen.com/), like Jekyll, Hugo, Hexo, or Gatsby. Alternatively, you can [start from a template](../start-with-a-template) or dive right into [configuration options](../configuration-options).
@ -12,8 +11,8 @@ This tutorial guides you through the steps for adding Netlify CMS to a site that
A static `admin` folder contains all Netlify CMS files, stored at the root of your published site. Where you store this folder in the source files depends on your static site generator. Here's the static file location for a few of the most popular static site generators:
| These generators ... | store static files in |
| -------------------------------------------| --------------------- |
| These generators | store static files in |
| ------------------------------------------ | --------------------- |
| Jekyll, GitBook | `/` (project root) |
| Hugo, Gatsby, Nuxt, Gridsome, Zola, Sapper | `/static` |
| Next | `/public` |
@ -52,6 +51,7 @@ The first file, `admin/index.html`, is the entry point for the Netlify CMS admin
</body>
</html>
```
In the code above the `script` is loaded from the `unpkg` CDN. Should there be any issue, `jsDelivr` can be used as an alternative source. Simply set the `src` to `https://cdn.jsdelivr.net/npm/netlify-cms@^2.0.0/dist/netlify-cms.js`
The second file, `admin/config.yml`, is the heart of your Netlify CMS installation, and a bit more complex. The [Configuration](#configuration) section covers the details.
@ -90,7 +90,7 @@ backend:
branch: master # Branch to update (optional; defaults to master)
```
_(For Bitbucket repositories, use the [Bitbucket backend](/docs/bitbucket-backend) instructions instead.)_
*(For Bitbucket repositories, use the [Bitbucket backend](/docs/bitbucket-backend) instructions instead.)*
The configuration above specifies your backend protocol and your publication branch. Git Gateway is an open source API that acts as a proxy between authenticated users of your site and your site repo. (We'll get to the details of that in the [Authentication section](#authentication) below.) If you leave out the `branch` declaration, it defaults to `master`.
@ -277,4 +277,4 @@ If you left your site registration open, or for return visits after confirming a
**Note:** No matter where you access Netlify CMS — whether running locally, in a staging environment, or in your published site — it always fetches and commits files in your hosted repository (for example, on GitHub), on the branch you configured in your Netlify CMS config.yml file. This means that content fetched in the admin UI matches the content in the repository, which may be different from your locally running site. It also means that content saved using the admin UI saves directly to the hosted repository, even if you're running the UI locally or in staging.
Happy posting!
Happy posting!