CSS and Imeges not showing on deployed site

Hey Everyone! Please help

I recently deployed my first website and it is not showing my CSS file or images only html. The website is https://chic-tarsier-00cd10.netlify.app/ . I have been trying different things all day and I’m still stuck. Any suggestions?
My repo in Github is GitHub - Weector/Vintage: https://weector.github.io/Vintage/

Thanks

The reason is evident in think <link> element

<link rel="stylesheet" href="/Vintage/index.28003385.css">

As you see, it (and all other href and src attributes) begins with /Vintage. This is because of the public-url value set in the in the build command

"build": "parcel build src/*.html --public-url /Vintage/"

The site is deploying to the root of the domain, unlike when deploying on GitHub Pages. If you remove this value, all should proceed correctly i.e.

"build": "parcel build src/*.html"

Do also not that as you have a homepage key/value set in the package.json

"homepage": "https://Weector.github.io/Vintage",

this can result in the same issue with other tools such as React, so unless you know you need it and it isn’t an issue, I suggest removing the key and value entirely.

And remember, local testing of builds by using the appropriate build command and browsing the build output with a tool such as serve or http-server will help detect issues like this prior to deploying to Netlify.

1 Like

Hi @Weector please let us know if you are still experiencing this problem.

Hello, very grateful for the help and detailed description of the solution. Everything works!

Problem is fixe! Thanks

1 Like

i’m glad you found a solution within our community!