Markdown not being rendered within HTML block

@Richard_West: I’d bet that md files simply weren’t meant to contain a mix of md and html? But yeah, it’s useful to be able to use both. Whenever md doesn’t parse, you just need to use a shortcode to process markdown inside of html. For simple markdown processing, just create a shortcode with the following code (called md.html in my case) :

{{ .Inner }}

And then, in your content, you just need to wrap your markdown within those:

{{% md %}}
Your content
{{% /md %}}

I noticed that the cases where you feel like you need html, most of the time a shortcode can do the job pretty well. I haven’t made one for bootstrap’s media just yet, but something like {{< media src=“imgSource” align=“left” content="" >}} could work.

Note that creating html block openings with a shortcode doesn’t prevent markdown from being parsed. Also, the indentation of your markdown can prevent it from being parsed. This example won’t work here:

<div>
   <div>
       **markdown**
   </div>
</div>

But this will:

<div>
<div>

some **markdown**

</div>
</div>
3 Likes