{"id":15155189,"url":"https://github.com/ytlyy1773/open-api-blog","last_synced_at":"2026-01-04T20:04:35.389Z","repository":{"id":254619170,"uuid":"846172580","full_name":"ytlyy1773/open-api-blog","owner":"ytlyy1773","description":"开源api接口官网项目","archived":false,"fork":false,"pushed_at":"2024-09-17T11:31:34.000Z","size":5507,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T07:11:13.550Z","etag":null,"topics":["api","apis","development","free","nest","next","open-source","public","simple"],"latest_commit_sha":null,"homepage":"https://www.openapijs.com","language":"TypeScript","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/ytlyy1773.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":"2024-08-22T17:07:42.000Z","updated_at":"2024-09-17T11:31:39.000Z","dependencies_parsed_at":"2024-10-10T06:20:42.647Z","dependency_job_id":null,"html_url":"https://github.com/ytlyy1773/open-api-blog","commit_stats":{"total_commits":63,"total_committers":2,"mean_commits":31.5,"dds":"0.33333333333333337","last_synced_commit":"82ac3c849743b7807db92abf1d4f4ed220569ba3"},"previous_names":["ytlyy1773/open-api-blog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytlyy1773%2Fopen-api-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytlyy1773%2Fopen-api-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytlyy1773%2Fopen-api-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytlyy1773%2Fopen-api-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytlyy1773","download_url":"https://codeload.github.com/ytlyy1773/open-api-blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248431426,"owners_count":21102197,"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","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":["api","apis","development","free","nest","next","open-source","public","simple"],"created_at":"2024-09-26T18:02:46.525Z","updated_at":"2026-01-04T20:04:30.371Z","avatar_url":"https://github.com/ytlyy1773.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 开源接口\n\n提供简单、开源、免费的 api 接口\n\n供广大开发者学习使用\n\n## 技术架构\n\n- 前端使用 [nextjs](https://nextjs.org/) 开发\n\n- 后端使用 [nestjs](https://nestjs.com/) 开发\n\n## 网站链接\n\n- 🚗\u0026nbsp;\u0026nbsp;[官网](https://www.openapijs.com/)\n\n- 🚗\u0026nbsp;\u0026nbsp;[国际官网访问](https://openapijs.vercel.app/)\n\n## 源码链接\n\n- 🔰\u0026nbsp;\u0026nbsp;[github 仓库地址](https://github.com/ytlyy1773/open-api-blog.git)\n\n- 🔰\u0026nbsp;\u0026nbsp;[gitee 仓库地址](https://gitee.com/ytlyy1773/open-api-blog.git)\n\n## 系统要求\n\n- **Node.js 18.18** 或更高版本。\n\n## 运行\n\n\u003e 国内建议使用 `npm` 淘宝镜像地址下载\n\n```bash\npnpm i\n\npnpm dev\n```\n\n## 说明\n\n### 多 DevOps 构建问题\n\n- 私有服务器\n\n- vercel\n\n两个不同平台构建出来需要不同 `robots.txt` 和 `sitemap.xml` 文件\n\n自己平台可以控制打包构建的，但是 vercel 就不行了\n\n### 如何解决 vercel 打包和服务器打包不冲突\n\n因为多个域名 public 文件夹下没有 `robots.txt` 和 `sitemap.xml` 文件，需要动态生成\n\n**添加 build:vercel 打包命令**\n\n```json\n  \"scripts\": {\n    \"dev\": \"next dev\",\n    \"build\": \"next build \u0026\u0026 next-sitemap\",\n    \"build:vercel\": \"next build \u0026\u0026 next-sitemap \u0026\u0026 next build\",\n    \"start\": \"next start\",\n    \"build:map\": \"next-sitemap\"\n  },\n```\n\n- 第一次执行 `next build` 保证 `next-sitemap` 可以正常执行\n\n- 执行 `next-sitemap` 可以根据 vercel 配置的**环境变量域名**动态生成 `robots.txt` 和 `sitemap.xml` 文件\n\n- 第二次执行 `next build`，此时 `next-sitemap` 已经帮我们在 public 文件夹下生成了所需要的 `robots.txt` 和 `sitemap.xml` 文件。构建成功就可以正常访问 `robots.txt` 和 `sitemap.xml` 文件了\n\n## 赞助\n\n\u003cdiv style=\"display: flex; justify-content: space-between;\"\u003e\n    \u003cimg src=\"./public/images/wechat.png\" alt=\"微信赞助\" width=\"300\" height=\"450\" /\u003e\n    \u003cimg src=\"./public/images/zhifubao.png\" alt=\"支付宝赞助\" width=\"300\" height=\"450\" /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytlyy1773%2Fopen-api-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytlyy1773%2Fopen-api-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytlyy1773%2Fopen-api-blog/lists"}