Kramdown table of contents links when header is defined in table cell


#1

I defined headers inside a table on a new page on my new site on GitHub Pages that uses the Minimal Mistakes theme in Remote theme mode, and found that the auto_ids table of contents lists all entries correctly, but all of the ToC entries link to “/#”. I also created a simpler test page and duplicated the result when hosted from my Windows laptop with the gem version of that theme. Should this work? Is it a bug? Am I doing something wrong? ?

EXAMPLE

---
toc: true
---
<table>
  <tr>
    <td>
      <h2>
        Test
      </h2>
    </td>
  </tr>
</table>

#2

I would move the table to a layout and keep the content “clean / separated”.

Anyways, if you want to convert / process markdown inside html block (tags) you need to add the “magic” markdown=1 attribute to your tag. Try:

<table markdown=1>   or
<td markdown=1> 

All the best. Cheers. Prost.


#3

When writing HTML you need to give each of the headings a unique id. This would happen automatically if you were writing the content in Markdown. This is why you TOC links are all /# and not /#your-heading.


#4

Thanks much, @mmistakes !