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
{{ message }}
Repository navigation
Feature request: expose an option to define custom render function for block/inline components #23
Add a render option to MarkdownItMdcOptions interface, allowing users to define a custom function to render block/inline components. The default render (turning them into custom HTML elements) can be exported as the fallback value.
For the function signature, something like render(content: string, md: MarkdownIt, state: , inline: boolean) might suffix. md can be used to render the slot content inside the component, while state is useful when the document's front-matter data is needed.
I'm requesting this feature for the use of markdown-it within Lume. The static site generator has its own component system (can be accessed from each page's data) and supports markdown-it to render documents.
Activity