Markdownify not rendering table

I’m trying to render a html table using the markdownify function, but for some reason it’s coming out as just a <p> with all of the “table content” in it.

My markdown is defined as:

    content: >
      # What's my Skill Set?

      I have extensive experience in Docker, K8s, Jenkins, Ansible, Terraform and more.  I has worked in a wide breadth of companies across a variety of industries ranging from small gaming companies to large financial institutions, and have experience at every level of the software development lifecycle.  I can help empower your team to succeed.
      ## test

      | Syntax | Description |
      | --- | ----------- |
      | Header | Title |
      | Paragraph | Text |

And it’s being rendered using markdownify here as:

    <div class="skill__progress_heading mb-5">
        <span class="top-title pre-line">{{ .topTitle }}</span>
        {{ .content | markdownify }}

However, if you look at the deployed site:

You’ll notice all the other markdown is rendered correctly, but the table just doesn’t seem to work.

Links to actual code (in a code block, since I’m a new user):

Link where markdown if defined:

Link to where the markdown is rendered

Lastly, if it’s helpful you can see my config.toml here.

Try putting the following into your config.toml:

[ markup.goldmark ]
[ markup.goldmark.extensions]
    table = true

Tables are actually not part of Markdown itself, but they can be enabled by this parameter. I am not sure if that is the default setting, I thought it’s always enabled.

Maybe it’s an issue with the space in front of the | linestart.

1 Like

You are removing new lines that should not be removed. Use | instead of >.


1 Like

You both hit on the issue! Using | instead of > solved the problem!

Now to refactor my entire theme, since I used > everywhere.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.