How to include an external css or js file?
I need to add a css and js file to the pages that does not reside in the forum's directory. This is how my folder structure looks like
/css/library.min.css /js/library.min.js /forums/ ** vanilla root directory ** /index.html ** rest of the site **
I've tried to create a custom function to include the file but the relative linking is not working write. For example from
mydomain.com/forums/ the link to css would be
../css/library.min.css and if I'm on a thread
mydomain.com/forums/discussion/2/test the correct link would be
../../../../css/library.min.css. I tried to put absolute paths but that doesn't work on localhost since chrome block local resources.
How do I do it?