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

Calling getCollection from a preview template should expose the slugs

Open fgnass opened this issue 9 months ago • 0 comments

Currently, when calling getCollection() inside a preview template, only the data of the items is returned. In order to be useful, the returned Map should also include the path & slug.

Since the function already returns a Map (with just a single data key), adding path and slug is trivial and would be a non-breaking change.

I'll submit a PR for this.

fgnass avatar Mar 24 '25 09:03 fgnass