-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image cannot be load by relative path using markdown syntax #4454
Comments
I'm guessing the cause is |
For themes like NexT it not only shows contents at the post page about also at the index. Thus, the same |
@curbengh A solution is that we could modify the behavior of But with |
I see, many themes also show post's excerpt at the index and excerpt might contain a image.
It's already utilised to prepend root. But I agree A possible way is to integrate
instead of ![](hello.png) https://hexo.io/docs/asset-folders#Tag-Plugins-For-Relative-Path-Referencing |
https://liolok.github.io/How-to-Add-Image-to-Hexo-Blog-Post/ https://liolok.github.io/How-to-Add-Image-to-Hexo-Blog-Post/zh-Hans/ https://github.com/liolok/hexo-asset-link Hexo still needs a plugin to get the relative links to assets work properly, what a pity. |
I managed to port asset_img tag plugin to hexo-renderer-marked, see hexojs/hexo-renderer-marked#159. How to test:
#_config.yml
post_asset_folder: true
marked:
prependRoot: true
postAsset: true |
No, the tag plugin syntax was never what users want. |
Sorry to say that, but wrong direction. |
If so, personally I will have to blame the theme, and start removing Stop asking serving different version of HTML at different pages. It just won't work. If you say Hexo shall be shame, we will take it. Looking forward to your PR then. @curbengh I am thinking removing |
Hugo has no Okay I checked and the links in Hugo stay the same, so pictures in home page summary will not correctly rendered. But at least the links that work in markdown source do the same in post page; in Hexo with Introducing a tag plugin syntax didn't make all the users happy, in fact I saw pretty few people settled down with that, after all they came for markdown syntax. However I advise that deprecate the For new users Hexo does the same as Hugo about page resources, which is simply copy and paste them to |
hexojs/hexo-renderer-marked#159 introduces an option to automatically prepends the post path to image path: #_config.yml
post_asset_folder: true
marked:
prependRoot: true
postAsset: true
No tag plugin syntax required, Please help test hexojs/hexo-renderer-marked#159, I tested in Ubuntu and non-WSL Windows 10. |
Check List
Please check followings before submitting a new issue.
hexo version
to check)Question
Environment & Settings
Node.js & npm version
Hexo and Plugin version(
npm ls --depth 0
)Your package.json
package.json
Others
when using markdown syntax involved image
![Hello](hello.png)
, the render link ishttps://xxxx/.io//hello.png
, so weird there contains a .io/ in the link.Already enabled
post_asset_folder: true
and had put the images under correspond asset folder。https://v-tawe.github.io/2020/07/31/fluid-guide-1/#%E6%96%87%E7%AB%A0%E5%86%85%E5%AE%B9%E5%9B%BE%E7%89%87
The text was updated successfully, but these errors were encountered: