decap-cms
decap-cms copied to clipboard
Calling getCollection from a preview template should expose the slugs
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.