在hexo博客中插入图片(方案汇总)
放弃的方案:
原生的 hexo add on: hexo-asset
post_asset_folder: false #true
- 语法格式恶心,既不是 md 也不是 HTML,自带的一种渲染格式
- 尝试多次未成功
能使用的方案:
PicX GitHub作图床
简介
- gitbub 有一个叫做 picx 的项目, 是一个网站,你可以往它的官网上传(本机的)图,会自动生成一个链接赋值到剪切板上。
- 特点:手动在 blog md file 里放 html img 标签; 支持使用 GitHub 图床(own repo,free)等其他图床
优缺点
- 优点: PicX 自动生成图片 url, 完全免费(薅微软 Github 服务器的羊毛)
- 不足:无法在写博客粘贴图片的时候自动生成链接。需要手动写 HTML img 标签。图多了有些麻烦,容易找不到链接。
Links:PicX 在线服务; 官方使用教程;GitHub 仓库地址
e.g. url generate by pix
https://github.com/OptimusHimself/picx-images-hosting/raw/master/彗星轨迹.esnsejhpw.webp
e.g. <img> tag
<img src=”https://github.com/OptimusHimself/picx-images-hosting/raw/master/彗星轨迹.esnsejhpw.webp“ alt=”sorry about that”>
img alt 参数:Specifies an alternate text for an image
外国图床
在hexo博客中插入图片(方案汇总)
https://optimushimself.github.io/2025/03/09/在hexo博客中插入图片【方案汇总】/