一个将 markdown 文件中的网络图片替换为本地图片
中文文档
load-markdown-imageIntroductionAn npm package that replaces web images in markdown files with local images.
Create a folder named images in the same directory as the MD file, download the web images from the MD file, and save them in that folder.
This npm package will modify the contents of the MD file, so be careful to back it up!
Installationnpm install -g load-markdwon-image # or yarn global add load-markdown-image Usage
# Download the images in the test.md file
load-markdown-image test.md
# or
load-markdown-image "hello world.md"
# Download images of all MD files in the test folder
load-markdown-image test
# Change the name of the folder where the images are saved
load-markdown-image test.md --fileName=myImg
Features
Support for download images of a single MD file.
Support for download images of all MD files under a folder.
Support for absolute paths, relative paths.
Automatic recognition of image formats.
Path name contains spaces, please add double quotes, like load-markdown-image "hello world.md"
.
Preview
npm run build npm link npm publish
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。