You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING CHANGE: the cms config file should be placed in the "netlify-cms" folder and named "config.yml" along with the extensions js files
BREAKING CHANGE: remove `extensionsDir` option
closes#21
Copy file name to clipboardExpand all lines: README.md
+21-16
Original file line number
Diff line number
Diff line change
@@ -47,16 +47,34 @@
47
47
48
48
## Usage
49
49
50
-
### Netlify CMS `config.yml`
50
+
### Netlify CMS module config folder
51
+
52
+
This module will look for the Netlify CMS config file and extensions in the following folder: `[nuxt.js srcDir]/netlify-cms`.
53
+
54
+
:information_source: The nuxt.js [srcDir](https://nuxtjs.org/api/configuration-srcdir/) is set to the project root folder by default. If you don't change this value in nuxt config, you'll just have to create the "netlify-cms" directory at your project root folder.
55
+
56
+
:information_source: If you don't use any of the following two features, there's no need to create this folder.
57
+
58
+
#### Netlify CMS `config.yml`
51
59
52
60
You can specify a [custom configuration](https://www.netlifycms.org/docs/#configuration), that will be parsed and merged with the module's [netlify CMS options](#cmsconfig).
53
61
54
-
You have to place the file in your [project root](https://nuxtjs.org/api/configuration-rootdir/)and name it `netlify-cms.yml` instead of `config.yml`, for clarity.
62
+
You have to place the file in your Netlify CMS module config folder and name it `config.yml`.
55
63
56
-
:information_source: Note that each path in the file (`media_folder`and collections `folder` fields) will be rewritten to prepend nuxt.js [srcDir](https://nuxtjs.org/api/configuration-srcdir/), so please specify each path relative to this folder.
64
+
:information_source: Note that each path in the file (`media_folder`, collections `folder` fields and collections `file` fields) will be rewritten to prepend nuxt.js [srcDir](https://nuxtjs.org/api/configuration-srcdir/), so please specify each path relative to this folder.
57
65
58
66
This file can be changed while `nuxt dev` is running, and Netlify CMS will be updated automatically.
59
67
68
+
#### Netlify CMS extensions
69
+
70
+
This module will look for [Netlify CMS extensions](https://github.com/netlify/netlify-cms/blob/master/docs/intro.md#customization) in \*.js files contained in Netlify CMS module config folder and subfolders, and include them in the CMS build.
71
+
72
+
These are of two kinds, [Custom Previews](https://www.netlifycms.org/docs/customization/) and [Widgets](https://www.netlifycms.org/docs/extending/).
73
+
74
+
:information_source: The global variable `CMS` is available to these javascript files to reference the CMS object.
75
+
76
+
:information_source: The contents of this directory and subdirectories can be changed while `nuxt dev` is running, and Netlify CMS will be updated automatically.
77
+
60
78
## Options
61
79
You can pass options using module options or `netlifyCms` section in `nuxt.config.js`.
:information_source: The paths are also rewritten according to nuxt.js [srcDir](https://nuxtjs.org/api/configuration-srcdir/)
85
103
86
-
### `extensionsDir`:
87
-
- Default: `"netlify-cms"`
88
-
89
-
extensionsDir defines the directory where this module will look for [Netlify CMS extensions](https://github.com/netlify/netlify-cms/blob/master/docs/intro.md#customization) in *.js files to include in the build.
90
-
91
-
These are of two kinds, [Custom Previews](https://www.netlifycms.org/docs/customization/) and [Widgets](https://www.netlifycms.org/docs/extending/).
92
-
93
-
:information_source: This path will be rewritten to prepend nuxt.js [srcDir](https://nuxtjs.org/api/configuration-srcdir/), so please specify it relative to this folder.
94
-
95
-
:information_source: The global variable `CMS` is available to these javascript files to reference the CMS object.
96
-
97
-
This directory can be changed while `nuxt dev` is running, and Netlify CMS will be updated automatically.
0 commit comments