Skip to content

feat(content): files collections with their own fields per file - #58

Merged
ermos merged 3 commits into
mainfrom
feat/files-collections
Oct 15, 2026
Merged

ermos merged 3 commits into
mainfrom
feat/files-collections

Conversation

@ermos

@ermos ermos commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Decap "files" collections are now supported instead of ignored: a collection lists fixed files, each with its own fields.
  • Files are listed in config order under their label, read in one GraphQL call on GitHub with the drafts. A file missing from the repository opens empty and is created on save.
  • They are edited only: creating returns 403 (create is forced to false), deleting is refused except dropping a draft.
  • The API resolves the fields of the file from {slug} or ?slug= (AI assistant, autosave), so validation and rendering use the file's own fields.
  • i18n on a files collection is refused, seo and relations may use fields of any file.
  • UI: the editor uses the file fields and hides "Delete entry". The visual sumigo.yml form gets a Folder / Fixed files switch and a file list, and the YAML completion knows the new keys.
  • Docs: new "Files collections" section in the sumigo.yml reference, README and introduction, Decap differences table updated.

Tests

  • TestFilesCollectionsResolveTheirFiles: paths, per-file fields, invalid names and paths refused.
  • TestFilesCollectionsEditFixedFiles: list with labels, empty missing file, per-file required fields, no create nor delete, unknown file 404.

@ermos
ermos merged commit 30d9d88 into main Oct 15, 2026
6 checks passed
@ermos
ermos deleted the feat/files-collections branch October 15, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant