Skip to content
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

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

Open
SeriesOfUnlikelyExplanations opened this issue Jan 1, 2021 · 2 comments

Comments

@SeriesOfUnlikelyExplanations

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

@sandianyiyuan
Copy link

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

@SeriesOfUnlikelyExplanations
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants