static-cms icon indicating copy to clipboard operation
static-cms copied to clipboard

Use of Folder Collections Path feature image bug

Open kdelalic opened this issue 3 years ago • 0 comments

When I publish a new entry with asd as the title and an image, the following is created: content/markdown/recipes/asd/index.md content/markdown/recipes/asdcontent/markdown/recipes/DRAFT_MEDIA_FILES/board-361516__340.webp

The image destination is not a typo, this is the actual path.

I migrated over from NetlifyCMS and it worked correctly before I migrated to StaticCMS.

Here is the config:

collections:
  - name: 'recipes'
    label: 'Recipes'
    label_singular: 'Recipe'
    folder: content/markdown/recipes
    create: true
    slug: 'index'
    media_folder: ''
    public_folder: ''
    path: '{{title}}/index'
    editor:
      preview: false
    fields:
      - { label: 'Title', name: 'title', widget: 'string' }
      - { label: 'Source', name: 'source', widget: 'string' }
      - { label: 'Tags', name: 'tags', widget: 'list', fields: [{label: "Tag", name: "tag", widget: "string"}]}
      - { label: 'Image', name: 'image', widget: 'image' }
      - { label: 'Type', name: 'type', widget: 'hidden', default: 'recipe' }

kdelalic avatar May 15 '23 02:05 kdelalic