{"id":15534315,"url":"https://github.com/gizmo-ds/afdian-connect","last_synced_at":"2025-07-22T18:34:12.494Z","repository":{"id":182923837,"uuid":"669326024","full_name":"gizmo-ds/afdian-connect","owner":"gizmo-ds","description":"一些爱发电缺少的功能","archived":false,"fork":false,"pushed_at":"2025-03-25T13:50:57.000Z","size":279,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-14T05:35:58.964Z","etag":null,"topics":["afdian","serverless","sponsors"],"latest_commit_sha":null,"homepage":"https://afdian-connect.deno.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gizmo-ds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"gizmo_","custom":["https://afdian.com/a/gizmo"]}},"created_at":"2023-07-21T23:49:53.000Z","updated_at":"2025-03-25T13:51:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"41eca63b-2518-4fb9-86eb-356dc530268f","html_url":"https://github.com/gizmo-ds/afdian-connect","commit_stats":null,"previous_names":["gizmo-ds/afdian-connect"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gizmo-ds/afdian-connect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2Fafdian-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2Fafdian-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2Fafdian-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2Fafdian-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gizmo-ds","download_url":"https://codeload.github.com/gizmo-ds/afdian-connect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gizmo-ds%2Fafdian-connect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266552683,"owners_count":23947183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["afdian","serverless","sponsors"],"created_at":"2024-10-02T11:41:57.142Z","updated_at":"2025-07-22T18:34:12.465Z","avatar_url":"https://github.com/gizmo-ds.png","language":"TypeScript","funding_links":["https://ko-fi.com/gizmo_","https://afdian.com/a/gizmo"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# afdian-connect\n\n[![爱发电](https://img.shields.io/badge/%E7%88%B1%E5%8F%91%E7%94%B5-Gizmo-%23946ce6)](https://afdian.com/a/gizmo)\n[![Ko-fi](https://img.shields.io/badge/Ko--fi-%E2%9D%A4%EF%B8%8F-blue?logo=kofi\u0026color=%23fff)](https://ko-fi.com/gizmo_)\n[![License](https://img.shields.io/github/license/gizmo-ds/afdian-connect)](./LICENSE)\n\n一些爱发电缺少的功能,\n\n\u003c/div\u003e\n\n## 特性\n\n- [ ] ~~赞助者展示页~~\n- [x] [赞助者展示 SVG](#赞助者展示-svg)\n- [x] [赞助宣传 SVG](#赞助宣传-svg)\n- [ ] Discord 集成\n  - [ ] Discord 用户绑定\n  - [ ] 自动分配身份组\n  - [x] [WebHook](#discord-webhook)\n\n## 自己部署 (免费)\n\n| Name        | Deploy                                                                                                                     |\n| ----------- | -------------------------------------------------------------------------------------------------------------------------- |\n| Vercel      | [![Deploy with Vercel](https://vercel.com/button)](http://gg.gg/15tho7)                                                    |\n| Deno Deploy | [Deploy to Deno Deploy](https://nitro.unjs.io/deploy/providers/deno-deploy) / [Example](.github/workflows/deno-deploy.yml) |\n| Cloudflare  | [Deploy to Cloudflare](https://nitro.unjs.io/deploy/providers/cloudflare)                                                  |\n| Netlify     | [Deploy to Netlify](https://nitro.unjs.io/deploy/providers/netlify)                                                        |\n\n环境变量:\n\n- `AFDIAN_TOKEN` - 在爱发电的 [开发者面板](https://afdian.com/dashboard/dev) 获得\n- `AFDIAN_USER_ID` - 在爱发电的 [开发者面板](https://afdian.com/dashboard/dev) 获得\n- `AFDIAN_USER` - 爱发电的 [创作设置](https://afdian.com/setting/creator) 的 `主页网址` 的能修改的部分\n- `AFDIAN_URL_BASE` - 可选, 爱发电的 API 地址, 默认为`https://afdian.com`\n- `SPONSOR_TIERS_UPDATE_URL` - 可选, 如果存在并且是可解析的 URL, 构建时会替换`afdian/sponsor-tiers.ts`文件. 写法可参考`afdian/sponsor-tiers-example.ts`\n- `WEBHOOK_SECRET` - 可选, 使用 WebHook 时需要的密钥, 所有没带此密钥的请求都会被拒绝.\n- `DISCORD_WEBHOOK_URL` - 可选, Discord WebHook 的 URL, 用于将赞助信息发送到 Discord 频道.\n\n## 赞助宣传 SVG\n\n```markdown\n[![Gizmo's Profile](https://afdian-connect.deno.dev/profile.svg?slug=gizmo)](https://afdian.com/a/gizmo)\n```\n\n或\n\n```html\n\u003ca href=\"https://afdian.com/a/gizmo\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://afdian-connect.deno.dev/profile.svg?slug=gizmo\u0026bg_color=%230d1117\u0026text_color=%23dedbd7\u0026border_color=%232e343d\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://afdian-connect.deno.dev/profile.svg?slug=gizmo\" /\u003e\n    \u003cimg alt=\"Gizmo's Profile\" src=\"https://afdian-connect.deno.dev/profile.svg?slug=gizmo\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n```\n\n官方网页嵌入功能的替代. 渲染为 SVG, 方便在 Markdown 等情况下使用.\n\n支持的选项:\n\n- `slug` / `username` - 查询的用户, 默认为从环境变量`AFDIAN_USER`获取\n- `bg_color` - 背景颜色, 默认`#fff`\n- `text_color` - 文字颜色, 默认`rgba(0,0,0,0.8)`\n- `hide_border` - 是否隐藏边框, 默认为`false`\n- `border_color` - 边框颜色, 默认为`#c0c0c0`\n- `hide_fans` - 是否隐藏月粉丝数, 默认为`false`\n- `width` - 宽度, 默认为`640`\n- `height` - 高度, 默认为`225`\n- `maxage` - 浏览器缓存时间, 单位为秒, 默认为`7200`\n- `button_text` - 赞助按钮的文字, 默认为`赞助`.\n\n\u003ca href=\"https://afdian.com/a/gizmo\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://afdian-connect.deno.dev/profile.svg?slug=gizmo\u0026bg_color=%230d1117\u0026text_color=%23dedbd7\u0026border_color=%232e343d\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://afdian-connect.deno.dev/profile.svg?slug=gizmo\" /\u003e\n    \u003cimg alt=\"Gizmo's Profile\" src=\"https://afdian-connect.deno.dev/profile.svg?slug=gizmo\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n## 赞助者展示 SVG\n\n```markdown\n![Sponsors](https://afdian-connect.deno.dev/sponsor.svg)\n```\n\n\u003e [!IMPORTANT]\n\u003e 仅能展示部署者的赞助信息, 需要展示自己的赞助信息请参考 [自己部署](#自己部署-免费) 部分.\n\n支持的选项:\n\n- `width` - 宽度, 默认为`800`\n- `maxage` - 浏览器缓存时间, 单位为秒, 默认为`7200`\n\n[![金主爸爸](https://afdian-connect.deno.dev/sponsor.svg)](https://afdian.com/a/gizmo)\n\n## Discord WebHook\n\n![Screenshot](./screenshots/discord_webhook_screenshot.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgizmo-ds%2Fafdian-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgizmo-ds%2Fafdian-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgizmo-ds%2Fafdian-connect/lists"}