Gh-pages relative path not found

喜夏-厌秋 提交于 2021-02-08 08:54:35

问题


Hello i try to deploy my second project website on gh-pages it's seems working but all of my images are not showing, i try different path but still not working i'm new on GitHub hope to fixed it soon thank you.

here is my website repo https://github.com/rcode321/rafaelmendozasite


回答1:


Check first if using relative path is enough in your gh-pages index.html file

<img class="my-image main" src="img/mypix2.jpg" alt="">
instead of
<img class="my-image main" src="/dist/img/mypix2.jpg" alt="">

The OP raffy mentions in the comments:

<img class="my-image main" src="./img/mypix2.jpg" alt="">


来源:https://stackoverflow.com/questions/63047259/gh-pages-relative-path-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!