Kramdown `parse_block_html` renders block HTML as codeblocks

I recently found the TOC functionality that Kramdown offers. Some of my blog posts get lengthy, so having something grab my headers is a nice feature:

<nav>
  <b>Contents</b>
  - this unordered seed list will be replaced by toc as unordered list
  {:toc}
</nav>

The problem is that when I build the site, any block HTML in my post gets rendered as a codeblock instead of being transformed. For example, any <figure> ends up looking like some of the contents of my image include:

<img class="docimage" src="images/tgp_pubs.png" alt="A partial list of journals & the poems they published that will appear in the author's manuscript"
  style="max-width: 500px" />

—instead of the image itself. And then, all the content that follows in the file is offset as though it were part of the <figure> tag.

The files are all .md, if that matters. I tried making draft with a .html file, but that causes a different issue (figure renders, but image can’t be located).

link to repo and page with the issue?

Well it’s not in the repo. I didn’t commit anything with the errors because once I turned on

kramdown:
  parse_block_html: true

in my config file, all my block-level HTML gets decimated, and I don’t want my website to look worse than it already does :laughing:

Your issue is likely the indentation of your HTML that you’re adding to a Markdown file.

Markdown (Kramdown) will parse it as a codeblock which is why you see the unrendered HTML.

Remove the indents and it should work.