Render Blocking Javascript in R Markdown files

I have a site hosted in GitHub Pages, where I write some data analysis in the Rmd format. Problem is, in the final html generated, the js files of the libraries used in R, are in the beginning of the body section, causing render blocking issues (Google’s Page Speed Insights gives 47/100 and the first suggestion is render blocking js). Particularly the file plotly-latest.min.js is taking too long to load.

Is there a way to fix this? I am new to Hugo, migrating from Jekyll.
Thanks in advance

Do you know what “render blocking js” means? :slight_smile:

When you go to your PageSpeed report, and click on Show how to fix, you will see more details. In those details, you will see a link to this. Go through that and do what’s needed.

1 Like