hexojs / hexojs/hexo-renderer-marked

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

Open
#181 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
183
Forks
93
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the “Embedding an image using markdown” section of the linked asset-folders documentation and reproduce the behavior using the shown _config in a post under _drafts. Compare it with the working _posts case and the “Cannot GET” result; done means the draft post’s markdown image resolves with the prepended root and post asset folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.