You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble getting the file collection to work. I want to make my static files editable in Decap so I started by adding my index file in the config:
backend:
name: git-gateway
branch: main # Branch to update (optional; defaults to master)
media_folder: "assets/uploads"
#public_folder: "/assets/uploads"
collections:
- name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "_posts" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
fields: # The fields for each document, usually in front matter
- {label: "Layout", name: "layout", widget: "hidden", default: "blog"}
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Featured Image", name: "thumbnail", widget: "image"}
- {label: "Body", name: "body", widget: "markdown"}
- label: "Pages"
name: "pages"
files:
- label: "Forside"
name: "index"
file: "index.html"
format: html
frontmatter: yaml
fields:
- {label: Title, name: title, widget: string}
- {label: Metadescription, name: metadescription, widget: text}
- {label: Body, name: body, widget: code}
- label: Bullets
name: bullets
widget: list
fields:
- {label: Title, name: title, widget: string}
- {label: Text, name: text, widget: text}
When I open up Decap. I can see the index file in a Pages collection. But when I open it up, the fields are all empty. It kind of feels like it can't find the file. If I change the file parameter in the config file, nothing changes. The file is still in Decap but empty.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Everybody,
I'm having trouble getting the file collection to work. I want to make my static files editable in Decap so I started by adding my index file in the config:
When I open up Decap. I can see the index file in a Pages collection. But when I open it up, the fields are all empty. It kind of feels like it can't find the file. If I change the file parameter in the config file, nothing changes. The file is still in Decap but empty.
Any help will be highly appreciated.
Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions