Skip to content

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

@pranaysahith

Description

@pranaysahith

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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions