Kratos-Rebirth icon indicating copy to clipboard operation
Kratos-Rebirth copied to clipboard

Bug 回报:当relative_link设置为true时,无法显示随机略缩图

Open GOKORURI007 opened this issue 3 years ago • 1 comments

  1. 报告前须知
  • [x] 我确认该Bug是可复现的,我会根据下面的模板提供完整详尽的复现步骤
  • [x] 我确认已认真阅读 ReadMe.md 和文档,确认描述的内容有误或是不能解决我的问题
  • [x] 我已知晓如果没有认真阅读且勾选这里所有的条目,或是没有使用此模板认真详细地描述问题,是对彼此时间的浪费,我的 issue 可能会被无解释关闭
  1. 对Bug的描述:

将hexo全局设置文件_config.ym中的relative_link项设置为true时,文章随机略缩图功能失效(背景及banner图片正常显示)。 2. 复现Bug的方法:

可以使用如下的方案进行复现:

  1. 将hexo项目根目录'_config.yml'文件中的relative_link项设置为true;

  2. 主体使用默认设置;

  3. 运行 'hexo server' 并进入localhost:4000

  4. 看,出错了吧!

  5. 期望的行为: 略缩图正常显示。

  6. 相关的截图:

image 6. 运行环境(如果该Bug的产生和环境有关,例如浏览器不兼容导致):

  1. 您的配置文件:
  • _config.yml

filename_case: 0 render_drafts: false post_asset_folder: false relative_link: false future: true

  • _config_kratos-rebirth.yml

jsconfig: main: --cover: ----randomAmount: 20 # 表示从1~20 ----baseUrl: # 使用默认值(不单独配置),将跟随 vendors 中的相关设定选择是否使用 cdn ----filenameTemplate: "thumb_{no}.webp"

  1. 补充内容:

GOKORURI007 avatar Oct 10 '22 12:10 GOKORURI007

Also, relative_link 将导致 PJAX 下很多路径出错

ArcticLampyrid avatar Oct 10 '22 12:10 ArcticLampyrid

v3 版本中随机缩略图功能将不再集成于主题中,我们会提供一个简单的自定义脚本作为参考样例,应该就能解决这个问题。

Candinya avatar Jun 21 '24 13:06 Candinya