I have a website that I created using the R package blogdown, which in turn is built on the Hugo framework. This website allows me to post R markdown files. The issue is the following: I need the interactive graph I created in R using the highcharter package to be displayed in my post. When I execute the R markdown file, it is displayed normally, but when I ask blogdown to serve the site at localhost:1234, the space where the graph should be displayed is blank. However, I asked blogdown to build the folder with the corresponding files, and when I check those folders, I see that the javascript files and others are created so that the highchart interactive graph can be displayed correctly. I uploaded it to the server, and checking in the developer option, I can see the errors that the javascript throws, which you can find at https://leonelmoreno.netlify.app/portfolio/2023-04-01-prueba-de-highchart/
and the blank space corresponds to where the interactive graph should be. I have tried creating the interactive graph separately, exporting it, and then including it in the R markdown file, but it didn't work. Also, after blogdown serves the site and builds my website with files and folders, I went to the root html file and added , but it didn't work either. I appreciate any comments or suggestions that can help me render the highcharter package graph correctly.
This is the solution: