4 ms·
Both the content collections and media can filter by file extension so you could very well have something like: media: input: posts output: /posts
by hunvreus 3y ago
Both the content collections and media can filter by file extension so you could very well have something like:
media:
input: posts
output: /posts
categories: [ image ]
content:
- name: posts
label: posts
type: collection
path: posts
fields:
- { name: title, label: Title, type: string }
- { name: body, label: Body, type: rich-text }
The collection of posts will only show the `md` files (that's the default, but you could change it by having a `filename` attribute on your content entry) and the media folder will only show images (`jpg`, `jpeg`, `png`, `gif`, `svg`, `bmp`, `tif`, `tiff`).
- flkiwi 3y agoInteresting. I need to dig into this because this looks like a good solution to my editing dilemma. Thank you for the work, and for the response.