构建期静态生成:Go 程序读取简历内容与 GitHub 统计,渲染 html/template 模板输出静态 HTML
whoami — HTML 作品集模板
作者 prorochestvo
whoami 是 Seilbek Skindirov 的个人 CV / 作品集站点,由 Go 编写的构建期静态站点生成器把简历内容与 GitHub 统计渲染成静态 HTML,并部署到 Cloudflare Pages。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
无运行时服务器,build/ 目录直接发布到 Cloudflare Pages
GitHub 统计通过定时任务触发部署钩子重新构建来刷新,而非常驻后端
前端为原生 HTML/CSS/JS,无框架、无打包器、无 npm 依赖、无 WASM
JetBrains Mono 字体自托管,页面不加载运行时 CDN 资源
按 DDD 分层组织代码,简历内容、GitHub 客户端、渲染用例与模板相互分离
模板详细介绍
whoami 是一个个人简历 / 作品集网站模板,仓库同时包含站点内容和生成它的 Go 程序。它没有运行时服务器:cmd/whoami 读取简历内容、通过 GitHub API 获取统计数据,再用 html/template 把模板渲染成静态 HTML,连同 web/ 下的 CSS、JS、字体、图片等静态资源一起写入 build/ 目录,最后把 build/ 发布到 Cloudflare Pages。GitHub 统计的更新依靠定时任务触发 Cloudflare 部署钩子重新构建,而不是常驻后端。
项目按 DDD 风格分层:internal/domain 存放纯简历值对象,internal/repository/resume 是简历内容的内存数据源,internal/infrastructure/github 是构建期 GitHub 客户端,internal/application/site 包含 Builder 用例与 Renderer,internal/dto 定义传给模板的 Page 视图模型,templates/ 存放 layout 与 content 模板。前端刻意保持精简:原生 HTML/CSS/JS,不使用框架、打包器、npm 依赖或 WASM,字体 JetBrains Mono 自托管在 web/fonts/,不依赖运行时 CDN。
README 明确说明仓库仍在搭建中,部分描述的内容尚未落地。GitHub 客户端在缺少 token 或构建时无网络的情况下会降级处理,保证构建始终有输出;GitHub token 只作为 Cloudflare Pages 的环境密钥存在,不写入生成结果。
适合你的项目吗?
适用场景
- 搭建个人简历或作品集静态站点,并部署到 Cloudflare Pages
- 用 Go 与 html/template 在构建期生成 SEO 友好的静态页面
- 在静态站点中展示 GitHub 统计数据,并通过定时重建保持更新
- 作为学习构建期静态站点生成器分层结构的参考项目
适合人群
- 希望用 Go 生成静态简历 / 作品集站点的开发者
- 需要把站点部署到 Cloudflare Pages 并接受定时重建刷新数据的用户
- 偏好原生 HTML/CSS/JS、不引入前端框架与打包工具的开发者
- 能自行准备简历内容、GitHub token 与托管配置的使用者
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
克隆仓库后执行 make build 运行生成器,输出写入 build/;make run 会构建并在本地预览 build/
- 2
可选设置 WHOAMI_GITHUB_TOKEN 以提高构建时 GitHub API 速率限制,该 token 不应出现在生成结果中,也不要提交 .env 文件
- 3
部署到 Cloudflare Pages 时构建命令为 make build,输出目录为 build/,并在项目设置中配置 WHOAMI_GITHUB_TOKEN 环境密钥
- 4
GitHub 统计刷新依赖定时任务触发 Cloudflare 部署钩子,需要自行配置该定时任务
- 5
README 说明仓库仍在搭建中,部分描述的内容尚未实现,使用前需核对当前代码状态
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 构建期获取的 GitHub 统计数据固定来自 prorochestvo 这一账号,使用者若想展示自己的统计需修改代码中的用户名。
- 部署到 Cloudflare Pages 时需在项目设置中配置 WHOAMI_GITHUB_TOKEN 环境密钥,否则构建时 GitHub API 速率受限。
- GitHub 统计的刷新依赖自行配置定时任务触发 Cloudflare 部署钩子重建站点,不配置则数据不会自动更新。
- GitHub token 不得出现在生成结果中,且禁止提交 .env 文件,使用者需自行确保密钥不泄露。
- 仓库仍处于搭建阶段,README 中部分描述的功能尚未落地,使用前需核对当前代码实现状态。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
The GitHub user whose stats are fetched is `prorochestvo`.
README 原文
**Environment secret:** `WHOAMI_GITHUB_TOKEN` set in the Pages project settings.
README 原文
a scheduled job (cron) triggers a Cloudflare **deploy hook** to rebuild the site, pulling fresh GitHub stats — no always-on server required.
README 原文
The token must **never** appear in generated output. - Never commit a `.env` file.
README 原文
https://github.com/prorochestvo/whoami/blob/main/LICENSEhttps://github.com/prorochestvo/whoami/blob/main/README.mdThe repository is currently being scaffolded — some of the pieces described below > are still landing. Anything not yet implemented is called out explicitly.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-10。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- HTML
- 网站类型
- 作品集 · 工具站
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-10-10
- 截图检查日期
- 2026-10-10
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 HTML。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-10
查看当时使用的来源资料
SHA-256: 14838f992deda1eef9d0d8f6019554011569b652185d6ae2e8bf113efe70c4cd
2026-10-10T04:31:56.849Z
来源文件 / 仓库# whoami Personal portfolio / CV site for Seilbek Skindirov ([github.com/prorochestvo](https://github.com/prorochestvo)), built as a static site by a Go generator and deployed to Cloudflare Pages. > The repository is currently being scaffolded — some of the pieces described below > are still landing. Anything not yet implemented is called out explicitly. ## How it works There is no live server. `whoami` is a **build-time static-site generator**: 1. `cmd/whoami` reads the CV content, fetches GitHub stats over the API, and renders `html/template` sources into static HTML. 2. The HTML plus all static assets are written into `build/`. 3. `build/` is published to Cloudflare Pages. GitHub stats are kept fresh by a **scheduled rebuild** (cron → Cloudflare deploy hook), not by an always-on backend. Why static instead of a live server: - **Free & simple** — no runtime, no database, nothing to keep alive. - **Fast** — everything is pre-rendered static files served from the edge. - **Crawlable / good SEO** — content is server-rendered into HTML at build time, so crawlers see the real content, not a client-side render. - **Fresh enough** — a scheduled rebuild refreshes GitHub stats (~daily) without paying for an always-on process. - **Token stays in CI** — the GitHub token lives only as a Cloudflare Pages env secret and is never emitted into the generated output. The GitHub client degrades gracefully: if there is no token or no network at build time, it falls back rather than failing, so the build always produces output. ## Quick start ```bash git clone https://github.com/prorochestvo/whoami.git cd whoami make build # run the generator → build/ make run # build, then serve build/ locally for preview ``` Then open the local preview URL printed by `make run` (e.g. http://localhost:8080). ### Make targets | Target | What it does | |---------------|--------------------------------------------------------| | `make build` | Runs the generator, writing output into `build/`. | | `make run` | Builds, then serves `build/` locally for preview. | | `make test` | `go fmt` + `go vet` + `go test ./...`. | | `make format` | `go fmt ./...`. | | `make clean` | Removes build artifacts. | ## Project structure The layout is a DDD-style split (mirroring the `beacon` project): | Path | Role | |-------------------------------------|---------------------------------------------------------------------------| | `cmd/whoami/main.go` | Generator entry point / composition root. | | `internal/domain/` | Pure CV value objects (no dependencies). | | `internal/repository/resume/` | In-memory source of truth for the CV content (`Load()`). | | `internal/infrastructure/github/` | Build-time GitHub API client (degrades gracefully when offline / no token).| | `internal/application/site/` | `Builder` use-case + `Renderer` (templates → `build/`, copies `web/*`). | | `internal/dto/` | `Page` view model passed to templates. | | `templates/*.tmpl` | `html/template` sources (`layout` + `content`). | | `web/` | Static source assets: `css/`, `js/`, `fonts/`, `img/`, `robots.txt`, `_headers`. | | `build/` | Generated output (gitignored); Cloudflare Pages output directory. | | `.agents/plans/` | Markdown task plans (active → `completed/` → `history/`). | - Module: `github.com/prorochestvo/whoami` - Go: 1.26 ## Configuration | Variable | Required | Purpose | |------------------------|----------|-------------------------------------------------------------------------| | `WHOAMI_GITHUB_TOKEN` | No | Raises the GitHub API rate limit at build time. Injected as a Cloudflare Pages env secret in CI. | - The GitHub user whose stats are fetched is `prorochestvo`. - The token must **never** appear in generated output. - Never commit a `.env` file. ## Deployment Deployed via **Cloudflare Pages**: - **Build command:** `make build` - **Output directory:** `build/` - **Environment secret:** `WHOAMI_GITHUB_TOKEN` set in the Pages project settings. - **Stats refresh:** a scheduled job (cron) triggers a Cloudflare **deploy hook** to rebuild the site, pulling fresh GitHub stats — no always-on server required. ## Design A code-editor / terminal aesthetic: - **JetBrains Mono**, self-hosted in `web/fonts/` — no runtime CDN. - Dark theme, near-monochrome with a single accent color. ## Front-end constraints The generated front-end is intentionally minimal: - Vanilla HTML / CSS / JS — no framework, no bundler, no npm dependencies, no WASM. - Fonts are self-hosted; nothing is loaded from a runtime CDN. - Content is server-rendered into HTML at build time, so the site is fast and crawlable. - GitHub data injected into templates is auto-escaped by `html/template`.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

simplefolio
⚡️ A minimal portfolio template for Developers
HTML · 作品集

Freelancer
Freelancer 是 Start Bootstrap 出品的单页作品集模板,专为自由职业者、设计师和小型工作室设计。 页面结构清晰,包含多个内容区块、响应式作品集网格,每个作品项目配有模态窗口展示详情。
HTML · 作品集

Resume
Resume 是 Start Bootstrap 推出的简历与 CV 主题,基于 Bootstrap 构建,采用固定侧边栏加内容区块的结构。
HTML · 作品集

Creative
Creative 是 Start Bootstrap 团队维护的一款单页营销模板,定位明确:为创意机构或产品服务提供一个以作品展示和行动号召为核心的落地页。
HTML · 企业官网

Grayscale
Grayscale 是 Start Bootstrap 出品的深色系单页 HTML 模板,基于 Bootstrap 构建。 它的视觉重心放在大尺寸首屏和清晰的内容分区上,整体氛围偏暗,适合摄影、活动或品牌叙事类网站。
HTML · 企业官网

markdown live preview
markdown live preview 是一个开源的 Markdown 实时预览工具,核心功能是在浏览器中即时渲染 Markdown 文本。
HTML · 工具站
