Can't tabulate data from CSV (SOLVED)

I am trying to add a table to a page EITHER with JQuery DataTables or via the CSV method here:

Neither is working (either locally served or on my website) however, because it seems the site isn’t properly taking the dynamic bits of the code in either example (i.e. the I need for DataTables to run, or any of the filters/table rendering here

For example, if I drop a csv into ‘_data’ folder, and use:

{% assign row =[0] %}
{{ row | inspect }}

…then nothing happens, it gives “nil”

Is there some sort of setting I am missing that will let these dynamic aspects run? Either for to call the stuff for JQuery datatables, or for the csv table example as per link…

And, in the JQuery example, it will add my table in markup, but isn’t styling it. Again, as if it is failing to run some dynamic aspect of rendering the actual table or data, depending on the example.

I am sure it must be something obvious here for either method that I need to enable? Like a setting somewhere?

First of all, you must understand that corresponds to _data/authors.csv
The key should correspond your data filename.

If all that is correct, then you could paste the contents of the data file here along with the filename.

Ah yes, I have managed to get it to pull the CSV content :slight_smile:

However, it would still be good to know why I can’t get the DataTables to work with the default styling. My tables are coming out as plain text.

SOLVED - I was making some obvious mistakes that after the third time checking I found them :slight_smile: