---
title: Entry Listings
description: Customize how entries appear in the Sveltia CMS entry listing view with summaries, thumbnails, index files and filters.
---

After creating an entry collection, you might want to customize how entries are displayed in the Sveltia CMS interface. The following options allow you to control various aspects of entry listings.

## Summaries

By default, Sveltia CMS uses the `title` field (or a field defined with the [`identifier_field` option](/docs/collections/entries/slugs#specifying-an-identifier-field)) as the summary for each entry in the listing view. If the field is empty or missing, the `title`, `name` or `label` field is used instead, whichever has a value first.

Sometimes entries might only have a `body` field without a `title` field. In such cases, Sveltia CMS will look for a header in the Markdown body field, if it exists, or use the entry slug as a fallback to ensure that the summary is never empty. This behavior supports typical Markdown-based setups like [VitePress](/docs/frameworks/vitepress) and [Docusaurus](/docs/frameworks/docusaurus).

You can customize the summary displayed for each entry using the `summary` option. This option accepts a string with template tags that will be replaced with entry-specific values when generating the summary. For example, to display both the title and date of each entry in the summary, you can use the following configuration:

```yaml YAML
summary: '{{title}} ({{date}})'
```

```toml TOML
summary = "{{title}} ({{date}})"
```

```json JSON
{
  "summary": "{{title}} ({{date}})"
}
```

```js JavaScript
{
  summary: "{{title}} ({{date}})",
}
```

Basic Markdown syntax is supported in the `summary` option, including bold, italics and inline code. The `<strong>`, `<em>` and `<code>` HTML tags work as well. Any other tag is shown as text, so a title like `Vec<T> in Rust` shows in full. For example:

```yaml YAML
summary: '**{{title}}** - _{{date}}_ `{{status}}`'
```

```toml TOML
summary = "**{{title}}** - _{{date}}_ `{{status}}`"
```

```json JSON
{
  "summary": "**{{title}}** - _{{date}}_ `{{status}}`"
}
```

```js JavaScript
{
  summary: "**{{title}}** - _{{date}}_ `{{status}}`",
}
```

You can use [string transformations](/docs/string-transformations) with these template tags as well. For example:

```yaml YAML
summary: "{{title}} - {{date | date('DD MMM YYYY')}} {{published | ternary('', '(draft)')}}"
```

```toml TOML
summary = "{{title}} - {{date | date('DD MMM YYYY')}} {{published | ternary('', '(draft)')}}"
```

```json JSON
{
  "summary": "{{title}} - {{date | date('DD MMM YYYY')}} {{published | ternary('', '(draft)')}}"
}
```

```js JavaScript
{
  summary: "{{title}} - {{date | date('DD MMM YYYY')}} {{published | ternary('', '(draft)')}}",
}
```

The following template tags are supported in the `summary` option, in addition to [slug template tags](/docs/collections/entries/slugs#slug-template-tags) except date-related ones:

- `{{dirname}}`: The name of the directory containing the entry file, relative to the collection `folder`. It never includes the locale folder of an [i18n structure](/docs/i18n/structures) with a folder per locale, so it’s the same in every locale.
- `{{filename}}`: The entry filename without the extension.
- `{{extension}}`: The entry file extension.
- `{{commit_author}}`: The last commit author of the entry file from Git history (if available).
- `{{commit_date}}`: The last commit date of the entry file from Git history (if available).
- `{{locales}}`: The enabled locales for the entry when using [i18n support](/docs/i18n).

Each file in a [file collection](/docs/collections/files#summaries) can have a `summary` option of its own, and so can an entry collection’s [special index file](#managing-hugo-s-special-index-file).

:::info[Known issue]

Git commit information is not available with the GitLab backend due to API limitations.

:::

## Thumbnails

By default, Sveltia CMS automatically looks for any non-nested, non-empty Image or File field in the entry to use as a thumbnail in the entry listing view. However, you can customize this behavior using the `thumbnail` option.

```yaml YAML {5}
collections:
  - name: posts
    label: Blog Posts
    folder: /content/posts
    thumbnail: featuredImage
    fields:
      - { name: title, label: Title }
      - { name: featuredImage, label: Featured Image, widget: image }
      - { name: body, label: Body, widget: richtext }
```

```toml TOML {5}
[[collections]]
name = "posts"
label = "Blog Posts"
folder = "/content/posts"
thumbnail = "featuredImage"

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

[[collections.fields]]
name = "featuredImage"
label = "Featured Image"
widget = "image"

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

```json JSON {7}
{
  "collections": [
    {
      "name": "posts",
      "label": "Blog Posts",
      "folder": "/content/posts",
      "thumbnail": "featuredImage",
      "fields": [
        { "name": "title", "label": "Title" },
        { "name": "featuredImage", "label": "Featured Image", "widget": "image" },
        { "name": "body", "label": "Body", "widget": "richtext" }
      ]
    }
  ]
}
```

```js JavaScript {7}
{
  collections: [
    {
      name: "posts",
      label: "Blog Posts",
      folder: "/content/posts",
      thumbnail: "featuredImage",
      fields: [
        { name: "title", label: "Title" },
        { name: "featuredImage", label: "Featured Image", widget: "image" },
        { name: "body", label: "Body", widget: "richtext" },
      ],
    },
  ],
}
```

The `thumbnail` option can take a string or an array of strings representing the field names to be used as thumbnails. The first field that contains a valid image will be used as the thumbnail. For example:

```yaml YAML
thumbnail: [thumbnailImage, coverImage]
```

```toml TOML
thumbnail = ["thumbnailImage", "coverImage"]
```

```json JSON
{
  "thumbnail": ["thumbnailImage", "coverImage"]
}
```

```js JavaScript
{
  thumbnail: ["thumbnailImage", "coverImage"],
}
```

A nested field can be specified using dot notation, e.g. `heroImage.src`. A wildcard in the field name is also supported, e.g. `images.*.src`, to target images in a list field.

### Thumbnail Paths

If your thumbnails are stored at predictable locations rather than referenced by a field, you can specify a file path instead of a field name. A value starting with a slash is treated as a path. It’s resolved in the same way as an Image field value, so it’s typically a path under your [`public_folder`](/docs/media/internal).

This avoids adding an extra field to every entry just to hold a thumbnail path that can be derived from the entry itself.

The path can contain the same template tags as the [`preview_path` option](/docs/collections/entries/previews#preview-paths), including `{{slug}}`, `{{dirname}}`, `{{filename}}`, date and time tags, and field values. The date and time tags are based on the field specified with the `preview_path_date_field` option, or the first DateTime field in the collection. [String transformations](/docs/string-transformations) can be used as well. For example:

```yaml YAML
thumbnail: '/images/thumbnails/{{slug}}.webp'
```

```toml TOML
thumbnail = "/images/thumbnails/{{slug}}.webp"
```

```json JSON
{
  "thumbnail": "/images/thumbnails/{{slug}}.webp"
}
```

```js JavaScript
{
  thumbnail: "/images/thumbnails/{{slug}}.webp",
}
```

Paths and field names can be combined in an array. They are tried in order, so the example below uses the `coverImage` field when no file exists at the given path:

```yaml YAML
thumbnail: ['/images/thumbnails/{{slug}}.webp', coverImage]
```

```toml TOML
thumbnail = ["/images/thumbnails/{{slug}}.webp", "coverImage"]
```

```json JSON
{
  "thumbnail": ["/images/thumbnails/{{slug}}.webp", "coverImage"]
}
```

```js JavaScript
{
  thumbnail: ["/images/thumbnails/{{slug}}.webp", "coverImage"],
}
```

The template tags are filled with the values of the default locale. If a tag cannot be resolved, for example because the field it refers to is empty, the path is skipped and the next candidate is tried. A relative path is not supported, because a value without a leading slash is treated as a field name.

### Disabling Thumbnails

Occasionally, you may not have suitable images for thumbnails. For example, your images may have subtle differences or varied aspect ratios. In that case, you can disable the thumbnail feature by setting the `thumbnail` option to `false` or an empty array:

```yaml YAML
thumbnail: false
```

```toml TOML
thumbnail = false
```

```json JSON
{
  "thumbnail": false
}
```

```js JavaScript
{
  thumbnail: false,
}
```

## Including and Excluding Entries

Sometimes, you may want to include or exclude specific entries from being displayed in the Sveltia CMS interface. Sveltia CMS provides options to manage this.

### Managing Hugo’s Special Index File [#managing-hugo-s-special-index-file]

By default, Hugo’s [special `_index.md` files](https://gohugo.io/content-management/organization/#index-pages-_indexmd) are hidden in a folder collection unless the `path` option is configured to end with `_index` and the `extension` is set to `md`. You have to create a [file collection](/docs/collections/files) to manage the file, since it usually comes with a different set of fields than regular entry fields.

The `index_file` option allows you to include and manage the special index file within the same folder collection. This way, editors can easily access and edit the index file alongside regular entries.

```yaml YAML {10-13}
collections:
  - name: posts
    label: Blog posts
    folder: /content/posts
    fields: # Fields for regular entries
      - { name: title, label: Title }
      - { name: date, label: Published Date, widget: datetime }
      - { name: description, label: Description }
      - { name: body, label: Body, widget: richtext }
    index_file:
      fields: # Fields for the index file
        - { name: title, label: Title }
        - { name: body, label: Body, widget: richtext }
```

```toml TOML {24-33}
[[collections]]
name = "posts"
label = "Blog posts"
folder = "/content/posts"

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

[[collections.fields]]
name = "date"
label = "Published Date"
widget = "datetime"

[[collections.fields]]
name = "description"
label = "Description"

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

[collections.index_file]

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

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

```json JSON {13-18}
{
  "collections": [
    {
      "name": "posts",
      "label": "Blog posts",
      "folder": "/content/posts",
      "fields": [
        { "name": "title", "label": "Title" },
        { "name": "date", "label": "Published Date", "widget": "datetime" },
        { "name": "description", "label": "Description" },
        { "name": "body", "label": "Body", "widget": "richtext" }
      ],
      "index_file": {
        "fields": [
          { "name": "title", "label": "Title" },
          { "name": "body", "label": "Body", "widget": "richtext" }
        ]
      }
    }
  ]
}
```

```js JavaScript {13-18}
{
  collections: [
    {
      name: "posts",
      label: "Blog posts",
      folder: "/content/posts",
      fields: [
        { name: "title", label: "Title" },
        { name: "date", label: "Published Date", widget: "datetime" },
        { name: "description", label: "Description" },
        { name: "body", label: "Body", widget: "richtext" },
      ],
      index_file: {
        fields: [
          { name: "title", label: "Title" },
          { name: "body", label: "Body", widget: "richtext" },
        ],
      },
    },
  ],
}
```

Here is an example of full customization. All options are optional.

```yaml YAML
index_file:
  name: _index # Filename without a locale or extension. Default: _index
  extension: md # File extension. Default: the collection’s extension
  format: frontmatter # File format. Default: detected from the extension, or the collection’s format
  label: Index File # Human-readable file label. Default: Index File
  icon: home # Material Symbols icon name. Default: home
  summary: '{{title}} ({{locales}})' # Summary template. Default: the label
  fields: # Fields for the index file. If omitted, regular entry fields are used
    ...
  editor:
    preview: false # Hide the preview pane if needed. Default: true
```

```toml TOML
[index_file]
name = "_index"
extension = "md"
format = "frontmatter"
label = "Index File"
icon = "home"
summary = "{{title}} ({{locales}})"
# fields would be defined as [[index_file.fields]] elements
# editor configuration
[index_file.editor]
preview = false
```

```json JSON
{
  "index_file": {
    "name": "_index",
    "extension": "md",
    "format": "frontmatter",
    "label": "Index File",
    "icon": "home",
    "summary": "{{title}} ({{locales}})",
    "fields": [],
    "editor": {
      "preview": false
    }
  }
}
```

```js JavaScript
{
  index_file: {
    name: "_index",
    extension: "md",
    format: "frontmatter",
    label: "Index File",
    icon: "home",
    summary: "{{title}} ({{locales}})",
    fields: [],
    editor: {
      preview: false,
    },
  },
}
```

The index file is listed with its `label` by default. To show something about its content instead, set the `summary` option. It works like the collection’s [`summary` option](#summaries), with two differences: it uses the index file’s own `fields`, and if no `title`, `name` or `label` field or header in the Markdown body has a value, `{{title}}` falls back to the label instead of the slug. The index file’s template replaces the collection’s wherever the collection’s would be used, such as in the entry list and search results.

If your regular entry fields and index file fields are identical and you don’t need any options, simply write:

```yaml YAML
index_file: true
```

```toml TOML
index_file = true
```

```json JSON
{
  "index_file": true
}
```

```js JavaScript
{
  index_file: true,
}
```

Note that the special index file is placed right under the `folder`, regardless of the collection’s [`path` option](/docs/collections/entries/slugs#using-subfolders). For example, if the `path` is `{{year}}/{{slug}}`, a regular entry would be saved as `content/posts/2025/title.md`, but the index file remains at `content/posts/_index.md`.

For a multilingual Hugo site using [translation by content directory](https://gohugo.io/content-management/multilingual/#translation-by-content-directory), where the section folders sit below the locale folders, put the [`{{locale}}` placeholder](/docs/i18n/structures#custom-locale-folder-placement) in the `folder` option, e.g. `content/{{locale}}/posts`. The index file then lands in each locale’s section folder, e.g. `content/en/posts/_index.md`, rather than under the `content` folder.

The index file is listed beside the regular entries, but it isn’t counted as one of them, because it stands for the collection’s own page rather than for something in it. It’s left out of the entry count shown next to the collection in the [collection list](/docs/ui/content-library#collection-list). It also doesn’t take up a slot in the collection’s [`limit`](/docs/collections/entries/operations#limiting-entry-count). A collection holding nothing but its index file therefore shows a count of `0`.

Only the collection’s own index file is treated this way. One collection’s `folder` may contain another’s, such as a `pages` collection on `content` with a `posts` collection on `content/posts`. In that case, the inner collection’s `content/posts/_index.md` is an ordinary entry as far as the outer collection is concerned. The outer collection’s [`filter`](#filtering-entries) applies to it, and it’s counted like any other entry the filter lets through.

#### Managing Eleventy’s Directory Data File [#managing-eleventy-s-directory-data-file]

The index file doesn’t have to be a Hugo `_index.md`. Any file with a fixed name right under the collection folder can be one, in a format of its own.

For example, Eleventy’s [directory data file](https://www.11ty.dev/docs/data-template-dir/) is a JSON (or YAML, if configured) file named after the folder, like `posts/posts.json`. It holds the data every Markdown entry in the folder inherits. Set the `name` and `extension` (or `format`) options to manage it beside the entries:

```yaml YAML {9-10}
collections:
  - name: posts
    label: Blog posts
    folder: content/posts
    fields:
      - { name: title, label: Title }
      - { name: body, label: Body, widget: richtext }
    index_file:
      name: posts
      extension: json
      label: Posts Data
      icon: description
      fields:
        - { name: layout, label: Layout }
        - { name: tags, label: Tags, widget: list }
```

```toml TOML {16-17}
[[collections]]
name = "posts"
label = "Blog posts"
folder = "content/posts"

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

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

[collections.index_file]
name = "posts"
extension = "json"
label = "Posts Data"
icon = "description"

[[collections.index_file.fields]]
name = "layout"
label = "Layout"

[[collections.index_file.fields]]
name = "tags"
label = "Tags"
widget = "list"
```

```json JSON {12-13}
{
  "collections": [
    {
      "name": "posts",
      "label": "Blog posts",
      "folder": "content/posts",
      "fields": [
        { "name": "title", "label": "Title" },
        { "name": "body", "label": "Body", "widget": "richtext" }
      ],
      "index_file": {
        "name": "posts",
        "extension": "json",
        "label": "Posts Data",
        "icon": "description",
        "fields": [
          { "name": "layout", "label": "Layout" },
          { "name": "tags", "label": "Tags", "widget": "list" }
        ]
      }
    }
  ]
}
```

```js JavaScript {12-13}
{
  collections: [
    {
      name: "posts",
      label: "Blog posts",
      folder: "content/posts",
      fields: [
        { name: "title", label: "Title" },
        { name: "body", label: "Body", widget: "richtext" },
      ],
      index_file: {
        name: "posts",
        extension: "json",
        label: "Posts Data",
        icon: "description",
        fields: [
          { name: "layout", label: "Layout" },
          { name: "tags", label: "Tags", widget: "list" },
        ],
      },
    },
  ],
}
```

With this configuration, `content/posts/posts.json` is listed and edited as the collection’s index file, read and written as JSON, while `content/posts/*.md` are the regular entries. Other `.json` files in the folder are left alone.

The `format` option works as it does for [the collection](/docs/collections/entries/formats). Give it alone to have the extension follow, or give both when they don’t go together, e.g. `extension: md` with `format: toml-frontmatter`. The [front matter delimiters](/docs/collections/entries/formats#front-matter-delimiter), body field and other file options are shared with the entries.

:::info[Reserved Name]

An index file with an extension of its own could sit beside an entry of the same name, like `posts/posts.md` next to `posts/posts.json`, but the two would be addressed the same way in the CMS. The index file’s name is therefore reserved. Such an entry is left out of the collection, and a new entry whose slug would clash with it is renamed like any duplicate.

:::

### Filtering Entries

With the `filter` option, you can limit the entries displayed in the Sveltia CMS interface based on specific criteria. This is useful for collections where you want to show only a subset of entries, such as a specific language or category.

This option takes an object with two properties:

- `field`: The name of the field to filter by.
- `value` or `pattern`: The value that the field must match for an entry to be included.
  - The `value` property checks for exact matches, while the `pattern` property allows for regular expression matching.
  - The `value` can be a single value or an array of values. If an array is provided, entries matching any of the values will be included. If `null` is provided as a value, entries where the field is not set will be included.
  - The `pattern` property should be a string representing a valid regular expression. An entry where the field is not set never matches a pattern.

The example below shows how to create two separate collections for English and French blog posts, filtering entries based on the `lang` field:

```yaml YAML {5,13}
collections:
  - name: english-posts
    label: English Posts
    folder: /content/posts
    filter: { field: lang, value: en }
    fields:
      - { name: lang, label: Language, widget: select, options: [en, fr] }
      - { name: title, label: Title }
      - { name: body, label: Body, widget: richtext }
  - name: french-posts
    label: French Posts
    folder: /content/posts
    filter: { field: lang, value: fr }
    fields:
      - { name: lang, label: Language, widget: select, options: [en, fr] }
      - { name: title, label: Title }
      - { name: body, label: Body, widget: richtext }
```

```toml TOML {5,26}
[[collections]]
name = "english-posts"
label = "English Posts"
folder = "/content/posts"
filter = { field = "lang", value = "en" }

[[collections.fields]]
name = "lang"
label = "Language"
widget = "select"
options = ["en", "fr"]

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

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

[[collections]]
name = "french-posts"
label = "French Posts"
folder = "/content/posts"
filter = { field = "lang", value = "fr" }

[[collections.fields]]
name = "lang"
label = "Language"
widget = "select"
options = ["en", "fr"]

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

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

```json JSON {7,18}
{
  "collections": [
    {
      "name": "english-posts",
      "label": "English Posts",
      "folder": "/content/posts",
      "filter": { "field": "lang", "value": "en" },
      "fields": [
        { "name": "lang", "label": "Language", "widget": "select", "options": ["en", "fr"] },
        { "name": "title", "label": "Title" },
        { "name": "body", "label": "Body", "widget": "richtext" }
      ]
    },
    {
      "name": "french-posts",
      "label": "French Posts",
      "folder": "/content/posts",
      "filter": { "field": "lang", "value": "fr" },
      "fields": [
        { "name": "lang", "label": "Language", "widget": "select", "options": ["en", "fr"] },
        { "name": "title", "label": "Title" },
        { "name": "body", "label": "Body", "widget": "richtext" }
      ]
    }
  ]
}
```

```js JavaScript {7,18}
{
  collections: [
    {
      name: "english-posts",
      label: "English Posts",
      folder: "/content/posts",
      filter: { field: "lang", value: "en" },
      fields: [
        { name: "lang", label: "Language", widget: "select", options: ["en", "fr"] },
        { name: "title", label: "Title" },
        { name: "body", label: "Body", widget: "richtext" },
      ],
    },
    {
      name: "french-posts",
      label: "French Posts",
      folder: "/content/posts",
      filter: { field: "lang", value: "fr" },
      fields: [
        { name: "lang", label: "Language", widget: "select", options: ["en", "fr"] },
        { name: "title", label: "Title" },
        { name: "body", label: "Body", widget: "richtext" },
      ],
    },
  ],
}
```
