jaredly / hexo-admin

An Admin Interface for Hexo
http://jaredly.github.io/hexo-admin/
1.77k stars 299 forks source link

support post_asset_folder config #168

Open myoss opened 6 years ago

myoss commented 6 years ago

hexo config

https://hexo.io/docs/configuration.htmll#Writing

post_asset_folder: true

New Post create same name asset folder, thanks.

pirtleshell commented 6 years ago

interesting, this config option never existed when most of the development for this package was done. i have no intention of building it out, but we'd welcome a PR that maintains backwards-compatibility when its set to false.

bejondshao commented 4 years ago

@myoss @pirtleshell at the time now 2019-12-29, "hexo-admin": "^2.3.0". I find that the function has already been implemented.

When create a post with hexo-admin, it creates a draft in _draft folder and creates the same folder beside xx.md file. You can copy image into the folder and use {% asset_img abc.png ABC title %}. When you click Publish, the post and the folder with the same name will be moved to _source folder. It works as a charm.