CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers

Home Page:https://stack.jimmycai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

content/page/links.image 在非站点默认语言下无法加载本地图片

HumXC opened this issue · comments

What happened?

在 content/page/links 中 创建非默认语言的 index.***.md,并在其中声明 image。在页面中切换到那个语言后,links 页面声明的图片无法被加载,查看控制台输出 GET http://localhost:1313/zh-cn/links/image-name.jpg 404 (Not Found)

image

复现步骤

假设当前在一个空文件夹下

git clone --branch v3.24.2 https://github.com/CaiJimmy/hugo-theme-stack.git
mkdir themes
mv hugo-theme-stack themes/
# 使用 exampleSite 运行站点
cp -r themes/hugo-theme-stack/exampleSite/* ./
cp content/page/links/index.md content/page/links/index.zh-cn.md
hugo server

访问页面,点击 'Links',在 links 页面切换为中文,即可看到 TS 的本地图片无法加载,如上图所示

Hugo version

v0.123.8

Theme version

v3

What browsers are you seeing the problem on?

Chrome

More information about the browser

Chromium: 122.0.6261.111(正式版本) (64 位)

Relevant log output

No response

Fixed, thanks for your feedback!