找不到Gh页的相对路径 [英] Gh-pages relative path not found
本文介绍了找不到Gh页的相对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我尝试在gh-pages上部署我的第二个项目网站,这似乎可行,但我的所有图像均未显示,我尝试了不同的路径,但仍无法正常工作.我是GitHub上的新手,希望尽快修复它,谢谢.
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.
这是我的网站回购 https://github.com/rcode321/rafaelmendozasite
推荐答案
请首先检查使用相对路径是否足够您的 gh页
index.html
文件
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="">