Problems with upgrade (redcarpet) from Jekyll 3.7 to 4.2

Hi, I’ve been using Jekyll for a few years. Now I want to upgrade to 4.2 and I have problems with the MD-HTML parser from Jekyll code to HTML. I have been using redcarpet and the code does not work with other markdown renderers like kramdown. Is there any way to use redcarpet or another better markdown parser? I think the main problem is that I am using csv-database in some FOR loops!
Is there anyone who has the same problems or a solution?

Kind regards Norbert

Is “csv-database” a particular feature of Redcarpet? Certainly Kramdown can be used in a Liquid loop that accesses CSV data from Jekyll’s _data directory.

Here’s an older topic that discusses the removal of alternate Markdown engines:

Hi chuckhoupt, thank you very much for your reply. Sorry, but I don’t understand this decision, because I read that redcarpet is a long term project in Git. Well i want a long term solution though! Can I ask you what you mean: Is it a possibility that I try to convert my csv data to xml format data to use in kramdown or would a csv usage somehow still be possible? Do you have any idea? Thanks Norbert

CSV data works the same in Jekyll 3 and 4, irrespective of Markdown processor used. To be clear, here’s an example (untested code):

File _data/contacts.csv:

name, phone
Alice, 555-1111
Bob, 555-2222
...

Example Liquid loop to create Markdown list:

# Contact List

{% for contact in site.data.contacts -%}
- Name: {{ contact.name }} Phone: {{ contact.phone }}
{%- endfor %}

Is this how you are using CSV data in Jekyll? Or some other mechanism?

Hi Chuck, yes I do the same mechanism (but without “-%” ?) with redcarped, but with kramdown it doesn’t work :-(!
I will test the code and answer you afterwards! Thanks Norbert

{% for pictdb2 in site.data.pictdb2s %}
{% if pictdb2.status contains “whng” %}

<figure id="gallery">
<figure> <img align=bottom width=80% height=auto border=0 src="../publ/pict/{{ pictdb2.picturl }}">
<figcaption>{{ pictdb2.pictname }}<div class="d">|{{ pictdb2.pictinx }}|</figcaption>
</figure>
</figure>

{% endif %}

{% endfor %}

I added a tutorial to the Jekyll docs site on how to load a CSV and render it as HTML

Hope that helps

<table>
  {% for row in site.data.authors %}
    {% if forloop.first %}
    <tr>
      {% for pair in row %}
        <th>{{ pair[0] }}</th>
      {% endfor %}
    </tr>
    {% endif %}
  {% endfor %}
</table>

And if you want a table you could use ul and each row is li. And then add ul and li inside that for each value in a row

Inside this <figcaption>, there’s an unclosed <div>. Possibly that might cause output differences between Redcarpet and Kramdown?