1.1.0 • Published 5 months ago

hexo-asset-img v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 months ago

English | 中文

:cake: Hexo local image plugin: Convert the relative path of the image to asset_img

repo size LICENSE NPM version NPM downloads QQ Group

Intro

Use this plug-in to realize the preview of Markdown editors such as Typora and Hexo release preview, both of which can display pictures normally

Usage

npm install hexo-asset-img --save

Latest Dev

npm install git://github.com/yiyungent/hexo-asset-img.git#main
hexo-typora
├── apppicker.jpg
├── logo.png
└── rules.jpg
hexo-typora.md

Make sure post_asset_folder: true in your _config.yml.

hexo-typora.md: Just use ![logo](hexo-typora/logo.png) to insert logo.png.

Use with Typora

Origin

hexo-asset-image No longer valid, probably starting from Hexo 5, and this repository has been archived

Q: 为什么使用本地图片 而不是网络图片 (图床) ?
A: 1. 第三方图床不稳定, 容易丢失图片
2. 自行搭建图床, 随着上传错误图片, 删除文章而没有删除关联图片 次数的增多, 未引用图片越来越多, 图床中也越来越多的无用冗余图片, 还不方便删除, 也容易误删除
3. 本地图片 与 文章在一个文件夹, 易打包, 在无网络或网络较差时也能预览
4. 本地图片 放在与 文章文件名同名文件夹内 方便管理

补充:
很多 markdown编辑器 提供粘贴图片到本地图片文件夹, 这些图片文件名通常不易读, 较长, 如果每次删除文章中的图片引用, 都手动去删除相应图片, 以及删除文章, 手动删除关联图片文件夹, 比较麻烦, 但不删除, 未引用图片又会越来越多, 因此 删除未引用图片工具 应运而生!

Related Projects

Donate

hexo-asset-img is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

We accept donations through these channels:

  • 爱发电

Author

hexo-asset-img © yiyun, Released under the MIT License. Authored and maintained by yiyun with help from contributors (list).

GitHub @yiyungent Gitee @yiyungent