{"id":21534705,"url":"https://github.com/aerowang/theme-next","last_synced_at":"2026-03-03T22:01:59.062Z","repository":{"id":181804795,"uuid":"651895184","full_name":"AeroWang/theme-next","owner":"AeroWang","description":"一款简洁的 Halo 博客主题 Next，技术栈 Next.js。    预览地址：https://theme-next.vercel.app 或者下方链接","archived":false,"fork":false,"pushed_at":"2023-08-27T16:20:36.000Z","size":381,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T15:43:38.422Z","etag":null,"topics":["blog","halo","halo-theme","halo-theme-next","nextjs","react","server-rendering","ssg"],"latest_commit_sha":null,"homepage":"https://next.aerowang.cn","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AeroWang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-06-10T12:23:53.000Z","updated_at":"2024-12-17T06:28:47.000Z","dependencies_parsed_at":"2024-01-13T22:54:52.741Z","dependency_job_id":"d35a8353-e766-4aaf-ba91-3f81565ac210","html_url":"https://github.com/AeroWang/theme-next","commit_stats":null,"previous_names":["aerowang/theme-next"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AeroWang/theme-next","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeroWang%2Ftheme-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeroWang%2Ftheme-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeroWang%2Ftheme-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeroWang%2Ftheme-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AeroWang","download_url":"https://codeload.github.com/AeroWang/theme-next/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeroWang%2Ftheme-next/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30063360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["blog","halo","halo-theme","halo-theme-next","nextjs","react","server-rendering","ssg"],"created_at":"2024-11-24T03:12:28.586Z","updated_at":"2026-03-03T22:01:59.041Z","avatar_url":"https://github.com/AeroWang.png","language":"TypeScript","readme":"## Halo Theme Next\n\n一款使用了 [Halo](https://github.com/halo-dev/halo) v2.7.0 API接口服务的博客主题\n\nAPI接口你懂得吧👀\n\n预览图待定，可以先去 \u003ca href=\"https://theme-next-git-dev-gotoobe.vercel.app\" target=\"_blank\"\u003e开发预览地址\u003c/a\u003e 瞧一瞧\n\n## 说明\n\n该主题使用 [Next.js](https://nextjs.org/) 创建。\n\n**重要：** 该主题并不能直接在 [Halo](https://github.com/halo-dev/halo) 后台安装，需要单独部署。\n\n### API 接口说明\n\n接口好像暂时不太完善，一些功能着实不太好实现\n\n- 暂时没有归档接口，先搁置归档页面\n\n## 部署\n部署之前的必要工作详见[初始化说明](./config/Init.md)\n`.env.local` 文件存储了一些环境变量，并未上传到仓库中，请自行补充\n\n```text\n# ISR 重新验证 TOKEN\nHALO_REVALIDATE_TOKEN=xxxxx\n# 部分接口需要验证 Basic Auth\nHALO_AUTHORIZATION='Basic aaaa'\n# 静态资源存放基础域名（目前存放又拍云）\nSTATIC_URL=https://a.example.com\n```\n\n### 自行托管\n\n需要有服务器哦，运行起来占用内存好像也不是很大\n\n以下方式选其一，以支持所有功能的Next.js\n\n* `Node.js` 环境部署 `Node.js v18 +`\n  1. 将项目文件打包至服务器内解压。\n  2. 进入文件目录后顺序执行以下命令\n    之所以开发时用了 `pnpm` ，现在却用 `npm` ，是因为我在服务器上用 `pnpm install` 时出现问题，不过大家也可以试试\n\n    国内大陆服务器建议首先执行 `npm config set https://registry.npmmirror.com/` ，设置依赖国内镜像源。\n     - `npm install` （安装依赖）\n     - `npm run build` （构建）\n     - `npm run start`（项目启动）\n\n* `Docker` 部署\n\n   也可以先看看官方文档介绍，https://nextjs.org/docs/app/building-your-application/deploying#docker-image\n\n   使用此方式需修改配置文件\n  ```js\n  // next.config.js\n  module.exports = {\n    // ... 其它配置.\n    output: 'standalone',\n  }\n  ```\n\n   docker 构建部署时如果要使用内网 IP 仍存在问题，暂时解决办法是使用实际域名，`.env.production` 中的 `HALO_HOST` 替换为实际域名\n\n* 静态导出并部署\n  这种方式会缺失 Next.js 的许多功能及优化，目前不建议也不提供此方式的部署方案，感兴趣的可以自己去研究一下\n\n### vercel 托管\n\n应该也许有其它方式进行托管，欢迎补充。\n\n用过的人就不用多说了吧[手动滑稽]，开始`fork`或者`clone`后定制自己的配置进行部署吧\n\n\u003ca href=\"https://vercel.com/docs/getting-started-with-vercel\" target=\"_blank\"\u003evercel 部署开始的地方\u003c/a\u003e\n\n## 特性\n* 单页面顺滑地无刷新加载内容\n* 图片加载优化（blur, lazyload, Responsive images）\n* 图片加载成功前的占位符图像提供三种形式（`css`, `svg`, `base64`）渲染\n* 提供两种方式加载图片：\n  1. 直接加载远程图片\n  2. 本机中转远程图片\n* 更现代化？因人而异吧\n* SSG, SSR 页面，SEO 更好一些\n* ISR(增量静态生成)，基于上一条\n  ```\n  example:\n    http://localhost:3000 -\u003e host\n    验证首页 http://localhost:3000/api/revalidate?secret=\u003cHALO_REVALIDATE_TOKEN\u003e\u0026path=/\n    验证关于页 http://localhost:3000/api/revalidate?secret=\u003cHALO_REVALIDATE_TOKEN\u003e\u0026path=/about\n  ```\n\n## TODO\n1. [ ] Responsive images 待优化 （待考虑）\n2. [x] ISR 待补充\n3. [ ] 点赞功能\n4. [ ] 文章搜索\n5. [ ] 站点数据统计及相关区域展示","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerowang%2Ftheme-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faerowang%2Ftheme-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerowang%2Ftheme-next/lists"}