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: [e.g. 2.0.4]
  • Git provider: [e.g. GitHub, BitBucket]
  • OS: [e.g. Windows 7]
  • Browser version [e.g. chrome 22, safari 11]
  • Node.JS version: v20.15.1
  • Decap CMS: 3.8.3
  • Git provider: Azure

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 } }

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions