Skip to content

Index.html ends up inside a folder after deploying gh-pages branch #45267

Discussion options

You must be logged in to vote

The problem is that your index.html references the other files with an absolute path, starting with a slash (/assets/...). This tells the browser to request exactly that path from the hostname. You need to use a relative path instead, so the browser builds the path relative to the current file. E.g. if index.html and assets/ are in the same directory, you need to use ./assets/....

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sircoffee
Comment options

Answer selected by sircoffee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Question
2 participants