YunYouJun / hexo-theme-yun

☁️ A fast & light & lovely theme for Hexo. 一个对可爱自以为是的 Hexo 主题。
https://yun.yunyoujun.cn
MIT License
1.39k stars 168 forks source link

[Bug Report]hexo s预览时无法正确加载本地资源 #289

Closed 1357310795 closed 2 years ago

1357310795 commented 2 years ago

用的是 npm 包方式进行安装 _config.yml里面设置了url是在一个子目录下

url: http://47.xxx.xx.xxx/tech

某图片放在\source\img\Akebi-Kao-chan.png 配置文档里使用:

sidebar:
  bg_image: source/img/Akebi-Kao-chan.png
  bg_position: bottom 1rem center
  tagcloud:
    enable: false
    amount: 20

部署到服务器 http://47.xxx.xx.xxx/tech 后一切正常,但是在本地使用hexo s命令预览,此图片无法加载 (已经执行了hexo g命令)

image

Desktop (please complete the following information):

主题版本: hexo-theme-yun@1.8.11

YunYouJun commented 2 years ago

请检查你的执行目录是否正确。

1357310795 commented 2 years ago

抱歉,又测试了一下,发现这应该是Hexo本身的问题,别的主题也是一样的错误

执行目录肯定是没错的,只有博客根文件夹下才能执行hexo s