How to link stylesheet and js files to App Platform static site

Posted February 10, 2021 532 views
JavaScriptCSSHTMLDigitalOcean App Platform

I’ve setup a static site on app platform using Github. It recognises my html file but not the css or js files I have. My css file is under resources/css/style.css and the href=“resources/css/style.css”. I don’t why it won’t link.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

My guess is that path to the file needs to be adsjusted.

I could suggest checking your browser’s web console to see the exact error that is showing there. Also if you access the http://app_url/resources/css/style.css do you see the file as normal?

Another thing that I could suggest is using the App platform interactive console to connect to the app and check if the files are actually there.