Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
class default
import { default } from "https://deno.land/x/netlify_cms_config@v0.3.2/collections/collection.ts";

Constructors

new
default(label: string, config: Options)

Type Parameters

optional
Options extends BaseOptions = BaseOptions

Properties

config: Options
label: string

Methods

delete(del?): this

false prevents users from deleting items in a collection

description(description: string): this

Optional text, displayed below the label when viewing a collection

getName(): string

Get the current name

hide(hide?): this

To hides a collection in the CMS UI. Useful when using the relation widget to hide referenced

labelSingular(label: string): this

Singular label for certain elements in the editor; defaults to the value of label

name(name: string): this

Change the collection name

preview(preview?): this

Set to false to disable the preview pane for this collection or file.

publish(publish?): this

For publish_mode: editorial_workflow only: false hides UI publishing controls for a collection. defaults to true

sortableFields(...fields: string[]): this

list of sort fields to show in the UI. Defaults to inferring title, date, author and description fields and will also show Update On sort field in git based backends. When author field can't be inferred commit author will be used.

toJSON(): Record<string, any>

Return the collection as JSON

viewFilter(
label: string,
field: string,
pattern: string | boolean,
): this

Add a predefined view filters to show in the UI.

viewGroup(
label: string,
field: string,
pattern: string | boolean,
): this

Add a predefined group filters to show in the UI.