使用 CloudFlare ImgBed 集成 Waline 评论系统图片上传功能本文档将指导你如何将 CloudFlare ImgBed 的上传 API 集成到 Waline 评论系统中,实现评论中图片上传的功能。
前置条件
已搭建并配置好 Hexo 博客和 Waline 评论系统。
已获取 CloudFlare ImgBed 的 API Token。
确保 CloudFlare ImgBed 的服务端已正确配置 CORS(跨域资源共享)。
图床 API 简介
上传 API:/upload
方法:POST
认证方式:Authorization: Bearer YOUR_API_TOKEN
内容类型:multipart/form-data
响应格式:12345[ { "src": "/file/abc123_image.jpg" }]
其中 src 是图片的路径,需要拼接图床域名生成完整的图片 URL。
配置步骤1. 修改 _config.anzhiyu.yml在 Hexo 的主题配置文件 _config ...
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment




