metalsmith / in-place

A metalsmith plugin for in-place templating
MIT License
57 stars 27 forks source link

Passing Options to marked #162

Closed jcrawford closed 5 years ago

jcrawford commented 5 years ago

I am not seeing a way to pass options down to the actual transformers. Is there a way I could pass options to marked through metalsmith-in-place? I need to tell marked to use language-js rather than lang-js which is available through the configuration of marked when I view the source code.

marked.options =
marked.setOptions = function(opt) {
  merge(marked.defaults, opt);
  return marked;
};

marked.defaults = {
...
langPrefix: 'lang-',
...
}
ismay commented 5 years ago

Yes definitely, you can use https://github.com/metalsmith/metalsmith-in-place/blob/master/README.md#engineoptions for that.