Please thumbs up 👍 this comment if you would like to use this feature, or thumbs down 👎 if you don't think it should be added . Your feedback is valued
scoped option wraps the contents in a <div class="rich-text">${contents}</div> when true, but defaults to false. scoped also accepts a string that will be used as the class for the wrapping div (rich-text by default).
This can already be accomplished by using a @metalsmith/layouts layout but it's a nice extra to have it as a built-in plugin option. CSS rules can be easily scoped to .rich-text * { ... }
Usage example:
metalsmith.use(markdown({ scoped: true }))
metalsmith.use(markdown({ scoped: 'rich-text' }))
// both render a file '*Hello _world_*' as '<div class="rich-text"><strong>Hello <em>world</em></strong></div>'
Readme must be updated, test added
Please thumbs up 👍 this comment if you would like to use this feature, or thumbs down 👎 if you don't think it should be added . Your feedback is valued
scopedoption wraps thecontentsin a<div class="rich-text">${contents}</div>whentrue, but defaults tofalse.scopedalso accepts a string that will be used as the class for the wrapping div (rich-textby default).This can already be accomplished by using a
@metalsmith/layoutslayout but it's a nice extra to have it as a built-in plugin option. CSS rules can be easily scoped to.rich-text * { ... }Usage example:
Readme must be updated, test added