---
url: /en/docs/collections/entries.md
description: >-
  Configure entry collections in Sveltia CMS for managing blog posts, products,
  and other content types.
---

# Entry Collections

An entry collection contains multiple entries of the same type. Editors can usually create, edit, and delete entries within the collection. Typical use cases for entry collections include blog posts, tags, products or events. Each entry in the collection is represented by a separate file, or all the entries can be stored in a [single JSON file](/en/docs/collections/entries/single-file).

::: tip Note for Netlify/Decap CMS users

In Sveltia CMS, what was previously referred to as a **folder collection** in Netlify/Decap CMS is now called an **entry collection**. This change was made to better reflect the purpose and functionality of these collections within the CMS.

:::

## Creating an Entry Collection

Here is an example configuration defining a simple blog posts collection:

::: code-group

```yaml [YAML]
collections:
  - name: blog
    label: Blog Posts
    label_singular: Blog Post
    folder: content/blog
    fields:
      - { name: title, label: Title }
      - { name: body, label: Body, widget: richtext }
```

```toml [TOML]
[[collections]]
name = "blog"
label = "Blog Posts"
label_singular = "Blog Post"
folder = "content/blog"

[[collections.fields]]
name = "title"
label = "Title"

[[collections.fields]]
name = "body"
label = "Body"
widget = "richtext"
```

```json [JSON]
{
  "collections": [
    {
      "name": "blog",
      "label": "Blog Posts",
      "label_singular": "Blog Post",
      "folder": "content/blog",
      "fields": [
        { "name": "title", "label": "Title" },
        { "name": "body", "label": "Body", "widget": "richtext" }
      ]
    }
  ]
}
```

```js [JavaScript]
{
  collections: [
    {
      name: "blog",
      label: "Blog Posts",
      label_singular: "Blog Post",
      folder: "content/blog",
      fields: [
        { name: "title", label: "Title" },
        { name: "body", label: "Body", widget: "richtext" },
      ],
    },
  ],
}
```

:::

### Options

The following options are commonly used when defining an entry collection:

* `name`: (required) A unique identifier for the collection. Should not contain spaces or special characters.
* `label`: A human-readable name for the collection. If omitted, the `name` value is used.
* `label_singular`: A human-readable singular name for the collection. If omitted, the `label` value is used. Used in some parts of the UI like the “Create new” button.
* `description`: A brief description of the collection, displayed in the UI. Basic Markdown formatting is supported, including bold, italic, strikethrough, code, and links.
* `folder`: (required unless `file` is used) The folder path where the entries are stored, relative to the repository’s root directory. It can be an empty string (or `.` or `/`) to store entries in the root folder. With i18n enabled, it can contain the `{{locale}}` placeholder as a folder name, e.g. `content/{{locale}}/posts`, to say where the locale folder goes. See [Custom Locale Folder Placement](/en/docs/i18n/structures#custom-locale-folder-placement).
* `file`: The path to a JSON file storing all the entries as an array of objects, used instead of `folder`. See [Single-File Collections](/en/docs/collections/entries/single-file).
* `fields`: (required) An array defining the [fields](/en/docs/fields) for each entry in the collection. Each field has a `name`, `label`, and optional `widget` type.

## Configuration Guides

The remaining entry collection options are documented on the following pages:

* [File Formats](/en/docs/collections/entries/formats): Choose between Markdown with front matter, YAML, JSON and TOML, and customize the file extension, front matter delimiter and body field.
* [Slugs and File Paths](/en/docs/collections/entries/slugs): Generate entry slugs from fields and template tags, make slugs editable, and organize entries into subfolders and page bundles.
* [Nested Collections](/en/docs/collections/entries/nested): Manage hierarchical content in a folder tree that editors can browse and organize.
* [Single-File Collections](/en/docs/collections/entries/single-file): Store all the entries in one JSON file, as an array of objects.
* [Preview Paths and Redirects](/en/docs/collections/entries/previews): Point the CMS at an entry’s URL on your site for previews, and record redirects when slugs change.
* [Entry Operations](/en/docs/collections/entries/operations): Disable creation, deletion or duplication, limit the entry count, hide the collection, and enable manual reordering.
* [Entry Listings](/en/docs/collections/entries/listings): Customize entry summaries and thumbnails, manage Hugo’s index file, and include or exclude entries.
* [Entry Views](/en/docs/collections/entries/views): Define sorting, grouping and filtering options for the listing view.
