How to edit Hugo content files directly in content root folder

248 Views Asked by At

I am new to netlify and netlifyCMS. Did upload a Hugo site which is working well. Now trying to implement CMS. It is a very simple site with only a few *.md content files located directly in the root of the /content folder. How do I need to configure the config.yml so that I can edit them? I did only find how to edit collections in subfolders of /content or single files.

Thank you Best regards

1

There are 1 best solutions below

0
On

I think I did find a solution. Did add every content-file as a single file.

collections: # A list of collections the CMS should be able to edit
  - label: "Inhalt"
    name: "inhalt"
    files: 
      - label: "Home"
        name: "home"
        file: "/content/home.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
      - label: "TCM"
        name: "tcm"
        file: "/content/tcm.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}
      - label: "Psycho"
        name: "psycho"
        file: "/content/psycho.md"
        fields: # The fields each document in this collection have
          - {label: "Title", name: "title", widget: "string"}
          - {label: "Body", name: "body", widget: "markdown"}