This is the keys.csv
file that I am using to display on our Jekyll site, Meshery Docs.
Reference - Tabulate CSV Data | Jekyll • Simple, blog-aware, static sites
First I started with
<table>
{% for row in site.data.keys %}
{% if forloop.first %}
<tr>
{% for pair in row %}
<th>{{ pair[0] }}</th>
{% endfor %}
</tr>
{% endif %}
{% tablerow pair in row %}
{{ pair[1] }}
{% endtablerow %}
{% endfor %}
</table>
The problem is that we don’t need the first row
So here is how i exclude it
<table>
{% for row in site.data.keys %}
{% if forloop.index == 2 %}
<tr>
{% for pair in row %}
<th>{{ pair[1] }}</th>
{% endfor %}
</tr>
{% endif %}
<tr>
{% for pair in row %}
<td>{{ pair[1] }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
Here is the main problem, even though i skip the first row, the no. of column being displayed are based on the first row
I have been looking for a solution and wasn’t able to find one