Closed ghost closed 7 years ago
@justfunk should not be a problem.
Metalsmith reads all files in the directory.
As for this plugin, you can set the pattern to only read from json
pattern: **/*.json
Contents of the file will still be in the content prop.
@justfunk Closing this. Please reopen if needed. Thanks!
Hi @yeojz , I'm also want to use json instead of markdown for the data I'll pass into the React template, when I've added a json file although it is being read and used it's just interpreted as one big string. Is there something I need to do so that it's being treated as a proper json object?
Thanks
@ablackledge you'll probably need to use JSON.parse()
on the value.
Oh damn sorry, so simple should have come to that conclusion myself! 😳 Thanks for the quick reply
Hi. Thanks a lot for this nice plugin! Is it possible to store my data into json files instead of markdown files in the /src/ directory?