Closed oxxostudio closed 8 years ago
Hmm the HTML output is kinda core, can you explain the use case a bit? Are you using this to generate an index / navigation of some sort, where the content isn't important?
Because my JSON files Only used as navigation, There may be more than 100 data ( markdown file ) And the contents of each is based on JSON (use AJAX) The flow like this: Edit Markdown-> JSON + HTML-> combine layout-> Web site Just wanted to know, can I use "body: true" or "body: false" function? ^^ ( Incidentally, your plugin is very helpful~ thank you!!! ^^ )
Ah ok I think I understand. Are you using the multiple file output for the content on each of the individual pages and looking to use the single file option for your navigation? That use case makes sense.. I'd perhaps rather expose another method to generate this nav index as I'd rather not mix the config for the Markdown parser with options for the plugin (or have a separate object for that).
If you're still using this plugin by chance I finally got around to a solution. #14 adds an optional transform function that you can use like this:
gulp.src('./content/**/*.md')
.pipe(gutil.buffer())
.pipe(markdownToJSON(marked, (data, file) => {
delete data.body;
return data;
}))
.pipe(gulp.dest('.'))
WOW, that's awesome! thank you very much. ;)
Can I hide "body" in json? If I can, how to do? Thank you very much. ^_^