Closed pssguy closed 7 years ago
Similar to issue 20
Pending a long-term solution, it would be helpful to know which widgets and themes this issue occurs with
the issue occurs with hugo-tranquilpeak theme and DT as well
@ThierryO FYI, I switched to Icarus - with no problems so far
Sorry I don't have time to investigate this issue in hugo-tranquilpeak or hugo-future-imperfect. If I were to do it, I'd first look at the JavaScript console of my browser to see if there are any errors.
For reference, the JavaScript console error is:
Uncaught TypeError: $table.DataTable is not a function
at Object.renderValue (datatables.js:269)
at htmlwidgets.js:625
at Array.forEach (<anonymous>)
at forEach (htmlwidgets.js:55)
at htmlwidgets.js:551
at Array.forEach (<anonymous>)
at forEach (htmlwidgets.js:55)
at Object.window.HTMLWidgets.staticRender (htmlwidgets.js:549)
at HTMLDocument.<anonymous> (htmlwidgets.js:638)
The StackOverflow question is related, and it seems the most likely underlying root cause is that jQuery
should be loaded before jQuery datatables
.
Appendix D.6 might be helpful: https://bookdown.org/yihui/blogdown/html-widgets.html
I switched to use the Icarus theme.
Can anyone please tell me if there is a good fix for this? Aside from switching themes? I have the same problem in Hugo-Academic & Tranquilpeak. This Stackoverflow solution sort of works but the datatable doesn't look good and the container is not responsive.
I have a blogdown site based on the hugo-future-imperfect theme where a DT output is created correctly in the rmd but the data is not shown (although the headings are) when applying serve_site/build_site
I have created two brand new sites ( so with no other complications) to illustrate the issue. This is the code and outputs
a) default theme
b) hugo-imperfect
The problem also occurs with the plotly package and hugo-imperfect