Closed ycherniavskyi closed 7 years ago
I have tried to call metalsmith-jstransformer
plugin two times (first with specified pattern
for blog posts and with empty layoutPattern
, and second with general pattern
and layoutPattern
), but it does not work as I understand because of jstransformerDone
property assigned to file after first plugin execution.
Per use? Change the process in which jstransformers are taken place?
Have word-count process on content before it's passed into the layouts? Seems like you'd want work-count to process before jstransformers.
Sorry for intricate terminology - by use
I mean Metalsmith API .use(plugin)
method.
From my review all plugins which get some information about/from text stick with HTML format (metalsmith-word-count, metalsmith-better-excerpts etc), so they couldn't be applied to Markdown.
Current implementation of
metalsmith-jstransformer
plugin process all necessary transformation from extensions and apply layout (if passed) at the end in one run.But what if I need apply only one transformation on first use. Then execute some other plugins. And finally apply all remained transformation with layout. Example use case:
some-blog-post.html.md
some-blog-post.html
content and word count data calculated by previous pluginMay be someone could suggest some already existed solution for this use case.