You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 thecontents
in a<div class="rich-text">${contents}</div>
whentrue
, but defaults tofalse
.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:
Readme must be updated, test added
The text was updated successfully, but these errors were encountered: