Allow setting config URL with <link> (#1146)
* fix: allows for valid config types expansion * feat: config url can now come through link tag * fix: lints added coded * fix: slims down code per review * fix: expands query to find supported type * fix: removes typo in test copy * fix: changes validTypes to object * fix: groups config functions into one getConfig func * adds console message for config url * adds to docs * update docs * fix test * fix merge conflicts contributor addition moved to #1241 * avoids empty path with link without href. changes link console message * removes additional console * fixes link path in console * fix: remove superfluous .allcontributorsrc change
This commit is contained in:
committed by
Benaiah Mischenko
parent
7b58f2f32b
commit
6b77aee214
@ -7,6 +7,14 @@ position: 23
|
||||
|
||||
All configuration options for Netlify CMS are specified in the `config.yml` file, in the folder where you access the editor UI (usually in the `/admin` folder).
|
||||
|
||||
Alternatively, you can specify a custom config file using a link tag:
|
||||
|
||||
```html
|
||||
<!-- Note the "type" and "rel" attribute values, which are required. -->
|
||||
|
||||
<link href="path/to/config.yml" type="text/yaml" rel="cms-config-url">
|
||||
```
|
||||
|
||||
To see working configuration examples, you can [start from a template](https://www.netlifycms.org/docs/start-with-a-template) or check out the [CMS demo site](https://cms-demo.netlify.com). (No login required: click the login button and the CMS will open.) You can refer to the demo [configuration code](https://github.com/netlify/netlify-cms/blob/master/example/config.yml) to see how each option was configured.
|
||||
|
||||
You can find details about all configuration options below. Note that [YAML syntax](https://en.wikipedia.org/wiki/YAML#Basic_components) allows lists and objects to be written in block or inline style, and the code samples below include a mix of both.
|
||||
|
Reference in New Issue
Block a user