{"id":30330045,"url":"https://github.com/sonofmagic/static","last_synced_at":"2026-02-11T11:31:09.594Z","repository":{"id":280807223,"uuid":"943187042","full_name":"sonofmagic/static","owner":"sonofmagic","description":"icebreaker 的静态资源 hub","archived":false,"fork":false,"pushed_at":"2025-03-08T06:52:04.000Z","size":11209,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T02:22:36.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonofmagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-05T09:56:52.000Z","updated_at":"2025-03-08T06:52:07.000Z","dependencies_parsed_at":"2025-03-05T12:41:43.414Z","dependency_job_id":null,"html_url":"https://github.com/sonofmagic/static","commit_stats":null,"previous_names":["sonofmagic/static"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sonofmagic/static","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fstatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fstatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fstatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fstatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonofmagic","download_url":"https://codeload.github.com/sonofmagic/static/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fstatic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-08-18T02:08:09.083Z","updated_at":"2026-02-11T11:31:09.577Z","avatar_url":"https://github.com/sonofmagic.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 利用 Github 构建你自己的免费图床\n\n\u003e 本文用到了 Github + jsdelivr + Picgo 这些工具\n\n大体的流程非常简单，使用 `Picgo` 上传图片，利用 `Github` 的 `repo` 作为存储图床再通过 `jsdelivr` `cdn` 进行加速\n\n## 1. 安装 Picgo\n\n[`Picgo`](https://github.com/Molunerfinn/PicGo) 是一个图片上传客户端，支持许多平台的图片上传。\n\n首先我们去 [PicGo/releases](https://github.com/Molunerfinn/PicGo/releases) 下载最新版本的 `PicGo`，比如我下载的是 `2.4.0-beta.9` 版本。\n\n我是 `Mbp` 所以下载的 `PicGo-2.4.0-beta.9-arm64.dmg`, 其他平台自己看 `CPU` 指令集架构选择。\n\n然后安装`mac` 会显示安装安装包损坏，然后看 [FAQ](https://github.com/Molunerfinn/PicGo/blob/dev/FAQ.md) 发现是由于软件包没有签名，所以会被 macOS 的安全检查所拦下导致的。\n\n所以需要信任开发者，会要求输入密码, 执行:\n\n```sh\nsudo spctl --master-disable\n```\n\n然后放行 `PicGo` :\n\n```sh\nxattr -cr /Applications/PicGo.app\n```\n\n然后就能正常打开。\n\n## 2. 设置 Github\n\n流程也很简单，创建一个仓库，然后创建一个 `PAT` 给一下仓库权限，然后在客户端设置一下即可。\n\n详见 [`Picgo` Github图床文档](https://picgo.github.io/PicGo-Doc/zh/guide/config.html#github%E5%9B%BE%E5%BA%8A)\n\n## 3. jsdelivr\n\n默认情况下，国内访问 `Github` 资源会被墙，所以需要 `jsdelivr` `cdn` 进行分发。\n\n首先访问 [jsdelivr官网](https://www.jsdelivr.com/?docs=gh)，发现它有 `Github` 加速，路径下方所示:\n\n```sh\nhttps://cdn.jsdelivr.net/gh/user/repo@version/file\n```\n\n然后填充一下你自己的用户和 `repo` 名，比如这个仓库就是:\n\n```sh\nhttps://cdn.jsdelivr.net/gh/sonofmagic/static/{your_path}\n```\n\n然后把对应的配置，在 `Picgo` 填充即可。\n\n![](https://cdn.jsdelivr.net/gh/sonofmagic/static/v1/picgo-github-setting.png)\n\n## 例子\n\n![](https://cdn.jsdelivr.net/gh/sonofmagic/static/logo.png)\n\n```md\n![](https://cdn.jsdelivr.net/gh/sonofmagic/static/logo.png)\n```\n\n## 总结\n\n最后总结一下方案的优势和劣势\n\n### 优势\n\n1. 免费\n\n### 劣势\n\n1. 国内访问有可能被墙\n2. `Repo` 后期会很大，假如不小心上传敏感资源，不懂 `git` 的小白不会真正删除里面的资源。\n3. 仓库整个资源可以被一键打包带走","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fstatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonofmagic%2Fstatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fstatic/lists"}