iissnan / iissnan/theme-next-docs

图片路径问题

Open
#201 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
165
Forks
55
PR merge metrics
No merged PRs in 30d

Description

我的版本是5.1.3,新建一篇文章的时候,不是会在md文件同级位置,生成一个同名的文件夹嘛,把图片资源放里面。但是编译后,图片会在public里和文章生成的html页面在同级。问题是,图片路径怎么引用呢?如果是直接用相对路径,就是直接写图片名字,那么再文章页面里是显示正常的,因为编译后他俩在同一个目录下。可是,首页里如果文章预览有图片,首页的html文件和文章的html文件不在同一级啊,在首页上预览的文章图片就是显示不出来。怎么解决呢?我现在只能让他不在首页显示图片才可以

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is identified in the issue. Start by reproducing the image-path behavior described for version 5.1.3, then compare the generated article and home-page HTML; done means the article image renders correctly in both locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.