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
{{ message }}
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.
Currently, one needs to create a file for each piece of content they want to render.
Create files based on the files defined in your source folder
This somewhat defeats the purpose of using Contentful to store content. There still remains a dependency on local files within a Metalsmith project src. I think this could be handled easier by eliminating the need for src files completely and specifying key and layout properties that get transformed into files. For example, by specifying a {"useKey": "_key"} a user could create a _key property within their contentful backend with the path to the file. { "_key": "projects/my-project.md" }, this could then be transformed into a file, remove the _key property and add all data onto that file object using the key as the filename and adding the other properties to the object with contents being transformed to a buffer.
Currently, one needs to create a file for each piece of content they want to render.
This somewhat defeats the purpose of using Contentful to store content. There still remains a dependency on local files within a Metalsmith project
src
. I think this could be handled easier by eliminating the need forsrc
files completely and specifying key and layout properties that get transformed into files. For example, by specifying a{"useKey": "_key"}
a user could create a_key
property within their contentful backend with the path to the file.{ "_key": "projects/my-project.md" }
, this could then be transformed into a file, remove the_key
property and add all data onto that file object using the key as the filename and adding the other properties to the object with contents being transformed to a buffer.This way files can be used in other plugins like
metalsmith-layouts
andmetalsmith-permalinks
. It would all be part of the pipeline at that point.The text was updated successfully, but these errors were encountered: