Convert Markdown style asset links to HTML style ones.
In Hexo blog instance directory:
$ npm i -s hexo-asset-link
or if you prefer yarn:
$ yarn add hexo-asset-link
Find (not add) and enable Post Asset Folders
feature in _config.yml
:
# Writing
...
post_asset_folder: true
...
For example, if you have these files in source/_post/
:
+-- _posts/
| +-- 2019-02-14-Test-Post.md
| +-- 2019-02-14-Test-Post/
| +-- Test-Image.png
| +-- Test-Other-File.pdf
Then in 2019-02-14-Test-Post.md
:
![Alt Text](./2019-02-14-Test-Post/Test-Image.png "Title Text")
![Alt Text](2019-02-14-Test-Post/Test-Image.png "Title Text")
[Text](./2019-02-14-Test-Post/Test-Other-File.pdf)
[Text](2019-02-14-Test-Post/Test-Other-File.pdf)
After this we'll get the right asset path result in:
hexo server
preview;hexo server
preview;Now shall we just have fun writing!