hexo-renderer-marked icon indicating copy to clipboard operation
hexo-renderer-marked copied to clipboard

images in _draft post asset folder can't be accessed using markdown

Open SeriesOfUnlikelyExplanations opened this issue 4 years ago • 2 comments

looking at https://hexo.io/docs/asset-folders.html section "Embedding an image using markdown". When I use the markdown syntax for a post in my _posts folder it works fine, but when I try to do the same in _drafts it doesn't work. It looks like the referenced image doesn't get any prepended root "localhost:4000/trail-and-sunset.jpg" and it throws an error "Cannot GET".

Is there a way to enable using prepend root and post asset folder for posts in my _draft folder?

My _config: post_asset_folder: true marked: gfm: true prependRoot: true postAsset: true

好像是不能修改 permalink 配置,改了路径就出问题了

sandianyiyuan avatar Jun 05 '21 02:06 sandianyiyuan

Can't you check if the file exists in _posts folder and if it doesn't, then use the _drafts folder?