Folder tree layout:
In my shortcode I’ve tried:
<script src="MarkersInFile/scripts/config_xml.js"></script> <script src="07_test/MarkersInFile/scripts/config_xml.js"></script> <script src="Redacted/rpa-bot-documentation/07_test/MarkersInFile/scripts/config_xml.js"></script> <script src="http://http://localhost:1313/Redacted/rpa-bot-documentation/07_test/MarkersInFile/scripts/config_xml.js"></script
We’ve been using Hugo at my job for a bit to make a training site. In this site we had some learning material and videos. Recently we’ve been trying to embed videos output from Camtasia which allow for us to have quizzes, a chapters, captions, etc. defined in Camtasia and built into the video through their player. Camtasia creates a number of files as output for this which can be used in your site including some xml and js files. I wrote a shortcode to load their video player and all it’s chapters, quizes and stuff. It seems to work fine if all these files are in the same folder as the index.md file. We however want to have multiple videos per page and these output files are not uniquely named. So I decided that I would just put these files into subfolders, one for each video, below the folder containing the md and adjust the shortcode to ask for the subfolder as an input parameter. However whenever I try to call the js files in the shortcode file it fails out saying the js file doesn’t exist. I’ve tried all sorts of things but had no luck and I’m not sure what I’m doing wrong. Any help you could give me would be much appreciated. I’m calling the shortcode from
/Content/07_test/_index.md and the shortcode should be referencing the files in
/Content/07_test/MarkersInFile/ which is the folder with all the relevant files output by Camtasia.
Chrome Console Output:
GET http://localhost:1313/Redacted/rpa-bot-documentation/07_test/MarkersInFile/scripts/config_xml.js net::ERR_ABORTED 404 (Not Found)
It’s worth noting if I do fileExists from the root of the site it to see if that JS file exists it comes back true.