hexo-theme-yilia icon indicating copy to clipboard operation
hexo-theme-yilia copied to clipboard

主页头像不显示,但是所有文章头像显示,目测是根路径问题

Open hanhailong opened this issue 8 years ago • 8 comments

主页头像不显示,但是所有文章头像显示,目测是根路径问题,看下效果图:这是主页显示: image 这是所有文章显示: image

hanhailong avatar Sep 17 '15 01:09 hanhailong

还有一个就是,我在本地0.0.0.0:4000测试的时候头像可以正常显示,但是deploy发布后就会出现上面那种情况!

hanhailong avatar Sep 17 '15 02:09 hanhailong

此刻看到正常

iblogc avatar Sep 17 '15 09:09 iblogc

@Louchenyang 你的头像路径配置错了,应该写

avatar: "/img/headportrait.jpg"

而不是

avatar: "img/headportrait.jpg"

一个是相对根目录,一个是相对当前路径

iblogc avatar Sep 18 '15 13:09 iblogc

@korvin101 OK 我试试 非常感谢

bitslooper avatar Sep 19 '15 12:09 bitslooper

@hanhailong 我跟你一样的情况,之前图片路径没有加引号,加上之后显示正常了

newtype0092 avatar Sep 27 '15 18:09 newtype0092

放到哪个文件夹下面?

xgz123 avatar Jan 09 '16 02:01 xgz123

我在windows 的环境下配置 localhost 显示是一切正常,但是deploy 到github.io上 头像就不显示了,只能把动态效果改成false ,才能显示出头像,但是所有的动态效果就不见了

MarkHe1222 avatar Jul 27 '16 02:07 MarkHe1222

我的站点文件夹:blog,然后在这里面新建了images文件夹幷放了avatar.png头像图片。 在站点配置文件_config.yml里面,avatar: "/images/avatar.png"。 图片大小只有100k左右,我的环境是windows。 基与上述情况,我的侧栏头像连本地的各个页面都无法显示,麻烦能解决的朋友告知我方法,谢谢。 博客地址:www.machanghong.net.cn

ghost avatar May 24 '19 13:05 ghost