问题
I have a portfolio site deployed at github pages and I used jekyll to create it. The issues that I have : 1)The responsive design at mobile it's not right and I also can't see footer, 2) I have broken images that doesn't load i have changed the path several times but still doesn't work i guess I'm out of options?Any suggestions to fix these issues? My site : https://lazospap.github.io/LazPap/ and my repo : https://github.com/LazosPap/LazPap .
回答1:
To make sure that the image urls are found, you can tell Jekyll where the image is before processing using the link
tag. Jekyll will track the link of the image before and after processing, so you can rely on your repo's current structure instead of the structure after processing.
<img src="{% link images/CSS_3.png %}" class="background-image-right"/>
Docs on link tag
Another tip is to create a .gitignore
, add the following files to the .gitignore
and then delete them from being tracked by git. You don't need them in your source control.
// .gitignore
.jekyll-cache
_site/
When I run your repo locally and make the browser mobile responsive, the images are not shrinking down. But, I can see your footer. I'm not familiar with the framekworks you're using, though.
回答2:
Instead of using link
, you can also do this:
<img src="{{ '/images/CSS_3.png' | prepend: site.baseurl }}" class="background-image-right"/>
来源:https://stackoverflow.com/questions/58600579/how-to-fix-the-responsive-design-from-github-page-and-broken-images