skip to Main Content

i have a project on my laptop using tailwindcss cli, it goes right on my laptop, but when i upload it to github pages it wont work like it never have css or anything, i allraedy reupload it but still have the same result.
photos on Github pages
photos on my laptop

link github :
https://github.com/dimas-web-dotcom/cloning-web-streaming/

how can i fix it, it almost 2 days now

2

Answers


  1. The repo you included seems to be missing a lot of things that could help us help you. For instance the package.json file is missing all the scripts that could point us into the direction of how you are building things for prod vs development. Also, we usually don’t commit our node_modules.

    In any case, the issue seems to be related to the URL of your CSS.
    Your HTML file points to the CSS like this <link href="/dist/output.css" rel="stylesheet" /> but your site is located in a subfolder example.com/mysite/index.html and that makes the lookup for the CSS to be made in the root of the domain (example.com/dist/output.css) instead of the subfolder (example.com/mysite/dist/output.css).

    So, changing it to a relative path should do the trick:

    <link href="./dist/output.css" rel="stylesheet" />
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search