极简、现代、克制的技术博客。内容基于 Markdown/MDX + Astro Content Collections,构建为纯静态站点。新增「每日收益快照」栏目,用于自动同步并展示策略日报。
npm install
npm run dev在 src/content/posts/ 新建 Markdown 文件,Frontmatter 结构如下:
---
title: 文章标题
description: 简短摘要
pubDate: 2025-02-18
tags: [astro, engineering]
---提交并推送即可触发部署与同步:
git add .
git commit -m "feat: new post"
git push报告内容存放在 src/content/reports/,使用 MDX 渲染,可包含表格与图表。
手动拉取某天报告:
node scripts/import-report.mjs --date 20260114脚本会读取:
- 单日报告:
https://logs.gleaftex.com/runs/fa888/martingale/reports/report_{YYYYMMDD}.txt - 历史净值:
https://logs.gleaftex.com/runs/fa888/martingale/reports/history.json
如果日报文件不存在(404),脚本会跳过而不中断。
GitHub Actions 每天定时拉取并提交(UTC 01:20),见 .github/workflows/report-sync.yml。
- 在 Vercel 中导入仓库
- Framework 选择 Astro
- Build Command:
npm run build - Output Directory:
dist
GitHub Actions 在 main 分支 push 时会同步:
src/content->s3://$R2_BUCKET/contentpublic/images->s3://$R2_BUCKET/images
在 GitHub 仓库设置 Secrets:
R2_ACCESS_KEY_IDR2_SECRET_ACCESS_KEYR2_ENDPOINT(例如https://<accountid>.r2.cloudflarestorage.com)R2_BUCKET
src/
content/
posts/
reports/
components/
layouts/
pages/