Hey Team,
I just got started with Digital Ocean and I’m using it to host my portfolio website. I used the ‘Apps’ feature to deploy my GitHub repo and it deployed everything successfully, however I have my CSS files in a CSS folder, for some reason it’s not loading that folder or the css files. When I move the style.css file into the root folder it loads it.
Is there something I am missing or is there a way to fix this that anyone is aware of?
You can see my portfolio site here https://danagnew.co.nz
Cheers, Dan A
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the 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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hey Dan,
First off, congrats on getting your portfolio website up and running with DigitalOcean’s App Platform! It’s great that you’ve successfully deployed your site! Let’s try and troubleshoot the CSS issue, here are the first things that I would recommend checking:
Double-check the path to your CSS files in your HTML. If your CSS files are in a
CSS
folder, the link in your HTML should look something like this:Make sure the path correctly reflects the folder structure in your GitHub repo.
Paths on servers are often case-sensitive. If your folder is named
CSS
but your HTML is referencingcss
, it won’t find the files. Ensure that the case matches exactly.Use your browser’s developer tools to check the network requests for your CSS files. This can give you clues as to whether the files are not found (404 errors) or if there’s another issue.
In the DigitalOcean App Platform, check your build and publish settings. Make sure that the publish directory is set correctly to include your CSS folder. Sometimes, if the publish directory is set to the root, it may not include subdirectories by default.
Verify that your GitHub repository’s structure is as you expect and that the CSS folder is not in a .gitignore file or excluded in some other way.
If you’re using relative paths, try switching to absolute paths (or vice versa) to see if that resolves the issue. Sometimes path resolution can behave differently in a deployed environment versus a local environment.
After making changes, re-deploy your app. Sometimes, a simple re-deployment can fix path issues.
Best of luck, Dan! Let me know how it goes!
Best,
Bobby