简体   繁体   中英

GitHub pages not loading js or css

I know this has been asked many times , but I can't find an answer that works.

I'm making a site ( https://tallerthanshort.github.io/bottom.gg ) and it won't load any of the js (some reactjs) or css.

All the files can be found on the Github repo ( https://github.com/TallerThanShort/bottom.gg ) and all of it works when running the site locally (either by simply opening the html file or running a local server), but the GitHub pages site simply returns a 404 for every file.

I have changed all of my script tags so they have an opening and closing tag, and also removed the initial / from /_next/ so that Github pages doesn't look at the wrong repo, but it still hasn't fixed my issue.

Any help would be largely appreciated.

Edit: I found that having all the files in the same location as the root html file works, but I want to link separate folders and separate files to make things neater.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM