decaporg / decaporg/decap-cms

New document in a subfolder with existing docs creating index.md

Open
#7,606 1 comment 0 reactions 0 assignees View on GitHub
area: nested-collections type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**

New document in a subfolder is creating an index.md instead of non-index markdown.

**To Reproduce**

1. Go to a sub folder in Decap CMS
2. Click on New document
3. Enter, title, body and save
4. It creates an index.md file and messing up the sub directory name.

**Expected behavior**

It should create a new markdown with a slug.md ( from title)

**Screenshots**

**Applicable Versions:**

- Decap CMS version: 3.8.4
- Git provider: Azure
- OS: Ubuntu 24
- Browser version: Chrome Version 141.0.7390.108 (Official Build) (arm64)

**CMS configuration**

```yaml
collections:
- name: "docs"
label: "docs"
folder: docs-site
create: true
extension: 'md'
editor:
visualEditing: true
summary: "{{dirname}}/{{filename}}.{{extension}}"
fields:
- { label: "Title", name: "title", widget: "string", required: false }
- { label: "Body", name: "body", widget: "markdown", required: false }
- { label: "Tags", name: "tags", widget: "list", required: false }
nested:
depth: 10
subfolders: false
summary: '{{slug}}'
meta: { path: { label: 'Path', widget: string, index_file: 'index.md' } }
```

**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.