decaporg / decaporg/decap-cms

In summary, {{ year }}, {{ month }}, {{ day }} tags are empty, whereas in the slug, they are the actual year, month, and date, even though summary is supposed to have the same template tags as slug

Open
#7,753 0 comments 0 reactions 0 assignees View on GitHub
area: ui/collection type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**

[Documentation](https://decapcms.org/docs/configuration-options/) states that the "summary" setting has:

> Template tags are the same as those for [slug](https://decapcms.org/docs/configuration-options/#slug)

I would therefore expect the following to be possible:

```
collections:
- name: 'articles'
create: true
label: 'Articles'
folder: 'docs/_articles/_posts/'
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
summary: '{{year}}-{{month}}-{{day}} - {{title}}'
fields:
- label: 'Title'
name: 'title'
```

If on March 16, 2026, I create a new article with the title "test", the resulting filename is, as expected:

> ./docs/_articles/_posts/2026-03-16-test.md

Because "summary" has the same tags as "slug", I would expect the title to be:

> 2026-03-16 test

However in reality it is

> -- - test

So my articles look like this:

![Image](https://github.com/user-attachments/assets/93770f84-b29d-40f9-b8be-3033561316ff)

**To Reproduce**

Step 1: In your config.yml add:

```
collections:
- name: 'articles'
create: true
label: 'Articles'
folder: 'docs/_articles/_posts/'
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
summary: '{{year}}-{{month}}-{{day}} - {{title}}'
fields:
- label: 'Title'
name: 'title'
```

Step 2: create an article "test"

Step 3: go to the article listing

Step 4: observe that the article is "-- - test", not "2026-03-16 - test" (but with the actual date you used).

**Expected behavior**

Either at step 4 above, we will see "2026-03-16 - test", _or_, in https://decapcms.org/docs/configuration-options/, under "summary", the sentence "Template tags are the same as those for [slug](https://decapcms.org/docs/configuration-options/#slug)" is removed.

**Screenshots**

**Applicable Versions:**

- Decap CMS version: 3.10.1
- Git provider: GitHub
- OS: using Dockerfile jekyll/minimal:3.8
- Browser version: safari 26.3.1 (21623.2.7.11.7)

- Node.JS version: n/a

**CMS configuration**

```
locale: 'fr'
slug:
encoding: "ascii"
clean_accents: true
sanitize_replacement: "_"

backend:
name: github
repo: biothermica/biothermica-2026
branch: master
base_url: https://app.staticauth.com
auth_endpoint: /auth/github/repo/69a8ca192824f5bdecb860ee

media_folder: "docs/media"
public_folder: "/media"

collections:
- name: 'articles'
create: true
label: 'Articles'
folder: 'docs/_articles/_posts/'
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
summary: '{{year}}-{{month}}-{{day}} - {{title}}'
fields:
- label: 'Titre en français'
name: 'title'
widget: 'string'
- label: 'Titre en anglais'
name: 'title_en'
widget: 'string'
required: false
- label: 'Contenu en français'
name: 'body'
widget: 'markdown'
required: false
- label: 'Contenu en anglais'
name: 'body_en'
widget: 'markdown'
required: false
- label: 'Documents en français'
name: 'documents'
widget: 'list'
required: false
field: {label: Document, name: document, widget: file, required: false}
- label: 'Documents en anglais'
name: 'documents_en'
widget: 'list'
required: false
field: {label: Document, name: document, widget: file, required: false}
- label: 'Redirects en français'
description: "Ajouter des redirections pour les anciennes URL de cet article. Par exemple: /fr/ancien-article"
name: 'redirects'
widget: 'list'
required: false
field: {label: Redirect, name: redirect, widget: string, required: false}
- label: 'Redirects en anglais'
description: "Ajouter des redirections pour les anciennes URL de cet article. Par exemple: /en/old-article"
name: 'redirects_en'
widget: 'list'
required: false
field: {label: Redirect, name: redirect, widget: string, required: false}

```

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.