Add support for blocks outside of Markdown documents
Opened this issue · 0 comments
MaximeKjaer commented
It may be nice to support embedding blocks in HTML pages, too. In this case, the plugin should be responsible for parsing the Markdown content (which it does not do in the context of a Markdown file, it just generates Markdown that is parsed with the rest of the document).
The plugin can act differently in a Markdown page and in HTML by checking the context
object in the render
function:
def render(context)
is_markdown = context.registers[:page]["path"].end_with?(".md")
# etc...