decaporg / decaporg/decap-cms

Collections summary does not accept file creation date tags from slug

Open
#6,683 5 comments 0 reactions 0 assignees View on GitHub
area: configuration pinned type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**
`collections` `summary` does not accept file creation date tags from slug as mentioned in the [docs](https://www.netlifycms.org/docs/configuration-options/#summary)

**To Reproduce / CMS Configuration**
Use `{{year}}/{{month}}/{{day}} {{hour}}:{{minute}}:{{second}}` in `summary` to see it not work. Also added `commit_date` for reference to make the problem more obvious.

```
collections:
- name: 'page'
label: 'Page'
folder: 'out'
create: true
format: json
extension: 'json'
slug: '{{slug}}_{{year}}{{month}}{{day}}{{hour}}{{minute}}{{second}}'
summary: "{{title}} – by {{commit_author}} on {{year}}/{{month}}/{{day}} {{hour}}:{{minute}}:{{second}} {{commit_date | date('MM/DD/YYYY h:mm:ssA')}}"
fields: ...
```

**Expected behavior**
it displays the values that correspond to the file creation tag.

**Screenshots**
![Screenshot 2023-02-04 at 6 03 05 PM](https://user-images.githubusercontent.com/1115706/216797769-9bc5933c-41dc-4488-9592-423bfa1a9f84.png)

**Applicable Versions:**
- Netlify CMS version: 2.10.192
- Git provider: BitBucket

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.