Renders local images of relative paths, compatible with vscode and hexo preview display
npm i hexo-relatived-img --save
Use the markdown notation of the image using the vscode relative path, which will replace the relative path of the directory section when translating hexo.
|-- license
| |-- da68b98e404578126b87c5afd9ba9bc3.png
|-- license.md
![常见的开源许可证](./license/da68b98e404578126b87c5afd9ba9bc3.png)
<img src="https://isaaxite.github.io/blog/resources/da68b98e404578126b87c5afd9ba9bc3.png" alt="常见的开源许可证">
./license/
will be replaced with ''
, and then the markdown image will be handed over to hexo for compilation.
Add or modify the following section to your root _config.yml file
relatived_img: true
- relatived_img: Renders local images of relative paths.(default=
true
)
MIT @ isaaxite