I made the FB login page clone using Tailwind CSS and it works fine on my local machine, but when I deploy it to GitHub pages it shows me errors.
It worked well on Netlify but it’s giving errors on GitHub pages
here is the link
[
I made the FB login page clone using Tailwind CSS and it works fine on my local machine, but when I deploy it to GitHub pages it shows me errors.
It worked well on Netlify but it’s giving errors on GitHub pages
here is the link
[
2
Answers
Your GitHub Pages site is at the URL
https://gayatri-tech.github.io/FbLoginPage
, in a subpath from the main host name,https://gayatri-tech.github.io/
.In
index.html
, the CSS is referenced with the value/src/output.css
which resolve tohttps://gayatri-tech.github.io/src/output.css
. However, the file from your repository would be located athttps://gayatri-tech.github.io/FbLoginPage/src/output.css
, hence the 404 not found error.To resolve this, you could consider making the path reference relative by removing the first slash (
/
):The same resolution for the favicon reference:
Can you try changing your pathing for these lines?
index.html file
TO
package.json
TO