diff --git a/example/config.yml b/example/config.yml index 3a2a746fca0d..6aa1d8f8b18a 100644 --- a/example/config.yml +++ b/example/config.yml @@ -6,7 +6,8 @@ media_folder: "assets/uploads" collections: # A list of collections the CMS should be able to edit - name: "posts" # Used in routes, ie.: /admin/collections/:slug/edit - label: "Post" # Used in the UI, ie.: "New Post" + label: "Posts" # Used in the UI + label_singular: "Post" # USed in the UI, ie: "New Post" description: > The description is a great place for tone setting, high level information, and editing guidelines that are specific to a collection. @@ -22,7 +23,7 @@ collections: # A list of collections the CMS should be able to edit - {label: "SEO Description", name: "description", widget: "text"} - name: "faq" # Used in routes, ie.: /admin/collections/:slug/edit - label: "FAQ" # Used in the UI, ie.: "New Post" + label: "FAQ" # Used in the UI folder: "_faqs" create: true # Allow users to create new documents in this collection fields: # The fields each document in this collection have diff --git a/src/components/App/Header.js b/src/components/App/Header.js index 1d770fab4fde..4c439c0e33a2 100644 --- a/src/components/App/Header.js +++ b/src/components/App/Header.js @@ -73,7 +73,7 @@ export default class Header extends React.Component { collections.filter(collection => collection.get('create')).toList().map(collection => this.handleCreatePostClick(collection.get('name'))} /> ) diff --git a/src/components/Collection/Collection.js b/src/components/Collection/Collection.js index 8f3294c73b07..3a4ac7d95ba6 100644 --- a/src/components/Collection/Collection.js +++ b/src/components/Collection/Collection.js @@ -46,6 +46,7 @@ class Collection extends React.Component { ? null : - {`New ${collectionLabel}`} + {`New ${collectionLabelSingular || collectionLabel}`} : null } diff --git a/website/site/content/docs/configuration-options.md b/website/site/content/docs/configuration-options.md index 1784d9cffc73..385e6301106e 100644 --- a/website/site/content/docs/configuration-options.md +++ b/website/site/content/docs/configuration-options.md @@ -71,6 +71,7 @@ The `collections` setting is the heart of your Netlify CMS configuration, as it - `name` (required): unique identifier for the collection, used as the key when referenced in other contexts (like the [relation widget](https://www.netlifycms.org/docs/widgets/#relation)) - `Label`: label for the collection in the editor UI; defaults to the value of `name` +- `label_singular`: singular label for certain elements in the editor; defaults to the value of `label` - `file` or `folder` (requires one of these): specifies the collection type and location; details in [Collection Types](https://www.netlifycms.org/docs/collection-types) - `filter`: optional filter for `folder` collections; details in [Collection Types](https://www.netlifycms.org/docs/collection-types) - `create`: for `folder` collections only; `true` allows users to create new items in the collection; defaults to `false`