202 lines
8.4 KiB
Markdown
202 lines
8.4 KiB
Markdown
|
|
# GFIL_BLOG 记忆文档
|
|||
|
|
|
|||
|
|
> 最后更新: 2026-06-29
|
|||
|
|
|
|||
|
|
## 项目概述
|
|||
|
|
|
|||
|
|
blog.quant-view.xyz 的内容引擎 — 多语言交易教育站点,80+ 免费计算器,专业市场分析,SEO/GEO 优化文章。
|
|||
|
|
|
|||
|
|
## 架构
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
blog_content/ → build_blog.py → output/ → RackNerd /var/www/blog/
|
|||
|
|
tools/ → → (static HTML served by Nginx)
|
|||
|
|
deploy_scripts/ → daily cron jobs on server
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## 服务器部署
|
|||
|
|
|
|||
|
|
### SSH 链路(中国国内无法直连海外服务器)
|
|||
|
|
- **本地 PC** → **JD Cloud 跳板机** (111.228.37.165, root/Liudecai110) → **RackNerd 服务器** (107.174.186.162, root/liudapao2026, /var/www/blog/)
|
|||
|
|
- 部署脚本: `deploy_via_jdcloud.py`(通过 paramiko 双跳)
|
|||
|
|
- JD Cloud 连接不稳定,需要 `banner_timeout=60` 并重试
|
|||
|
|
|
|||
|
|
### Blog 服务器 (RackNerd)
|
|||
|
|
- IP: 107.174.186.162
|
|||
|
|
- SSH: root / liudapao2026
|
|||
|
|
- 文档根: /var/www/blog/
|
|||
|
|
- Nginx 配置: 默认
|
|||
|
|
- robots.txt: 由 build_blog.py 生成(653 chars,含 GPTBot/ClaudeBot/PerplexityBot 等 AI 爬虫许可)
|
|||
|
|
|
|||
|
|
### 主站服务器 (gfil-lab.com)
|
|||
|
|
- IP: 216.144.233.14
|
|||
|
|
- SSH: root / Kt9V72Tx2c48ChikKU(密码在 D:\GFIL\.env)
|
|||
|
|
- 文档根: /GFIL/
|
|||
|
|
- Nginx: 两个 server block — `default`(gfil-lab.com :5000) + `gfil`(quant-node.com :8000)
|
|||
|
|
- robots.txt: /var/www/gfil-lab/robots.txt (580 chars),Nginx location block 提供服务
|
|||
|
|
- **Nginx 配置备份**: `default.bak.before-robots`, `gfil.bak.before-robots`
|
|||
|
|
|
|||
|
|
### gfil-intel.xyz
|
|||
|
|
- 部署在 RackNerd 服务器
|
|||
|
|
- Nginx: /etc/nginx/sites-available/gfil-mask
|
|||
|
|
- 反向代理到 gfil-lab.com,sub_filter 替换域名
|
|||
|
|
- robots.txt 继承自 gfil-lab.com 代理
|
|||
|
|
- Cloudflare 代理(与 blog 不同的 CF zone/account)
|
|||
|
|
|
|||
|
|
## 域名 & DNS
|
|||
|
|
|
|||
|
|
| 域名 | Cloudflare | DNS 模式 |
|
|||
|
|
|-------|-----------|---------|
|
|||
|
|
| blog.quant-view.xyz | CF 代理 | DNS-only (grey cloud) |
|
|||
|
|
| gfil-lab.com | CF 代理 | Proxied (orange cloud) |
|
|||
|
|
| gfil-intel.xyz | CF 代理 | Proxied (orange cloud) |
|
|||
|
|
|
|||
|
|
## Cloudflare
|
|||
|
|
|
|||
|
|
- **blog.quant-view.xyz**: CF_TOKEN=`cfut_xRDcVVOTE9hLWxe8fFUG1Xgv7aQVtV0ytWFYZKimffcc10e3`,zone 在 blog 的 CF 账户
|
|||
|
|
- **gfil-lab.com**: CF_PURGE_TOKEN=`cfut_Qe696Mw2HIWZ9KtJnmTJ8Gl1RIr9OroFYesb4aDk30346a1a`,CF_ZONE_ID=`5ab2b548b8e4d5a1cb0e7a43c074a871`,zone 在 D:\GFIL\.env(不同 CF 账户)
|
|||
|
|
- **gfil-intel.xyz**: 独立 CF zone,token 在 blog CF 账户,zone ID=`a107f45f3d82e7209447cec396504d0b`
|
|||
|
|
- Bot Fight Mode: OFF(所有站点)
|
|||
|
|
- Browser Integrity Check: OFF(所有站点)
|
|||
|
|
- managed robots.txt: OFF(所有站点)
|
|||
|
|
- AI training block: OFF(所有站点)
|
|||
|
|
|
|||
|
|
## 开源平台全景
|
|||
|
|
|
|||
|
|
### ⚠️ GitHub 状态:双双公开 404
|
|||
|
|
|
|||
|
|
**两个 GitHub 账号对外全部 404。git push 仍可用,但外部访客看不到任何仓库。**
|
|||
|
|
|
|||
|
|
| 账号 | Web 状态 | Git 状态 | 说明 |
|
|||
|
|
|------|---------|---------|------|
|
|||
|
|
| **liudecai-one** | ❌ 公开 404 | ✅ git push 可用 | 2026-06-29 起公开仓库全部 404 |
|
|||
|
|
| **liudapao880807-arch** | ❌ 已被 FLAG | ✅ git push 可用 | 长期 FLAG,公开仓库 404,Actions 禁用 |
|
|||
|
|
|
|||
|
|
**因此:全站不得出现任何 github.com 外链。所有开源引用走 GitLab。**
|
|||
|
|
|
|||
|
|
**Git push 需代理**: `git -c http.proxy=http://127.0.0.1:7890 push`
|
|||
|
|
|
|||
|
|
### Gitea(自建,主力)🆕
|
|||
|
|
|
|||
|
|
- 地址: [code.quant-view.xyz](https://code.quant-view.xyz)(RackNerd 107.174.186.162)
|
|||
|
|
- 管理员: liudecai / Liudapao2026
|
|||
|
|
- 配置: SQLite, Nginx + Let's Encrypt, systemd 自动启动
|
|||
|
|
- 内存: ~100MB
|
|||
|
|
- **谁也封不了,自己说了算。**
|
|||
|
|
|
|||
|
|
### GitLab(镜像备份)
|
|||
|
|
|
|||
|
|
- 账号: **liudecai110**
|
|||
|
|
- 仓库: [gfil-trading-calculators](https://gitlab.com/liudecai110/gfil-trading-calculators) — 开源计算器库
|
|||
|
|
- 仓库: awesome-trading-resources — 资源索引镜像
|
|||
|
|
- Token: 在 `.env` 中
|
|||
|
|
|
|||
|
|
### PyPI
|
|||
|
|
|
|||
|
|
- 包名: [gfil-calculators](https://pypi.org/project/gfil-calculators/)(v1.1.1)
|
|||
|
|
- 内容: 22个交易计算器(Position Size, Pip Value, Fibonacci, ATR, Kelly, Risk of Ruin, Margin, Compound Growth, Drawdown, Profit Factor, Risk/Reward, Pivot Points, Correlation Matrix 等)
|
|||
|
|
- 双语言实现: Python + JavaScript
|
|||
|
|
- 许可: MIT
|
|||
|
|
- Token: 在 `.env` 中
|
|||
|
|
|
|||
|
|
### npm
|
|||
|
|
|
|||
|
|
- ❌ 已 404(`@liudecai-one` scope 随 GitHub org 一起消失)
|
|||
|
|
- npm_package/ 目录保留源码(index.js),待重新发布到其他 registry
|
|||
|
|
|
|||
|
|
### 平台链接汇总
|
|||
|
|
|
|||
|
|
| 平台 | URL | 用途 |
|
|||
|
|
|------|-----|------|
|
|||
|
|
| Gitea | code.quant-view.xyz | 自建 Git — 仓库 + Issue + MR + Packages |
|
|||
|
|
| GitLab | gitlab.com/liudecai110/gfil-trading-calculators | 镜像备份 |
|
|||
|
|
| PyPI | pypi.org/project/gfil-calculators/ | Python 包分发 |
|
|||
|
|
|
|||
|
|
### GitHub 历史记录(仅供参考,勿用)
|
|||
|
|
|
|||
|
|
liudecai-one 曾有 15+ 个公开仓库(7个核心 + 8个SEO引流),liudapao880807-arch 曾有 GFIL 主站 + Cannon Studio 私有仓库。git push 仍可用但 web 访问全部 404。github_blast.py 等脚本保留不动(内部工具)。
|
|||
|
|
|
|||
|
|
### 计划中(未开始)
|
|||
|
|
|
|||
|
|
- Codeberg 镜像
|
|||
|
|
- self-hosted Gitea at code.gfil-lab.com
|
|||
|
|
- docs.gfil-lab.com 独立文档站
|
|||
|
|
|
|||
|
|
## 内容统计
|
|||
|
|
|
|||
|
|
- **文章**: 20 篇 EN 文章 (article_1 ~ article_20),每篇 4 语言 (EN/ZH/ES/AR) = 80 篇
|
|||
|
|
- art-12: Bloomberg Terminal Alternative
|
|||
|
|
- art-16: Position Size Guide (9.1KB)
|
|||
|
|
- art-17: XAUUSD Trading Guide (12.7KB)
|
|||
|
|
- art-18: SSH Chain Engineering
|
|||
|
|
- art-19: GitHub SEO (de-GitHub 叙事完整版)
|
|||
|
|
- art-20: Gold Calculator Pitfalls
|
|||
|
|
- **工具页**: 199+ HTML 文件,含 54 变体 SEO 页
|
|||
|
|
- 10 公式页 + 6 黄金 + 5 外汇 + 3 交易对 + 5 加密 + 9 pip 变体 + 4 索引 + 6 教育 + 3 对比 + 3 账户规模
|
|||
|
|
- **Sitemap**: 405 URLs (289 tools + 81 posts + 35 geo)
|
|||
|
|
- **Schema**: FAQPage + SoftwareApplication JSON-LD on 109 tool pages
|
|||
|
|
|
|||
|
|
## SEO/GEO
|
|||
|
|
|
|||
|
|
- **IndexNow key**: `72aa77b68704abcfada4020ba81f7c5a`
|
|||
|
|
- **已提交 URL**: ~411 URLs across sessions (Bing 200, Yandex 202, Seznam 200)
|
|||
|
|
- **Bing Webmaster**: BingSiteAuth.xml 已上线
|
|||
|
|
- **Google**: GA_ID=G-D33M8PWQDP,验证码=d53ir9M-igK014y6QqLbDG8q_qKotQi70TGGxQwHas4
|
|||
|
|
|
|||
|
|
## De-GitHub-ification 状态
|
|||
|
|
|
|||
|
|
- ✅ 所有 GitHub + npm 死链已清除,替换为 PyPI/GitLab/TG/Discord
|
|||
|
|
- ✅ 三个核心页面零 github.com 引用: entity.html, media.html, gfil-faq.html
|
|||
|
|
- ✅ article_19 已更新完整 de-GitHub 叙事
|
|||
|
|
- ✅ build_blog.py footer: EN/ES/AR→Telegram/Discord; ZH→微信/QQ
|
|||
|
|
- ✅ research.html: PyPI 链接标签改为"PyPI"
|
|||
|
|
- ✅ gfil-faq.html: "merge requests" 而非 "pull requests"
|
|||
|
|
- ✅ PyPI v1.1.1 发布,所有 URL→blog/PyPI/Telegram/GitLab
|
|||
|
|
|
|||
|
|
## 已知问题
|
|||
|
|
|
|||
|
|
- **GitHub Actions CI**: 账号级禁用,仅 GitHub Support 可修复
|
|||
|
|
- **GitHub 账号 flagging**: +86 不被接受,虚拟号风险更高
|
|||
|
|
- **gfil-intel.xyz robots.txt**: CF 缓存仍返回旧版 (64 chars),需从 gfil-intel.xyz 的 CF 面板手动清缓存
|
|||
|
|
- **npm**: 无 authenticator app,仅 4 个恢复码
|
|||
|
|
|
|||
|
|
## 构建命令
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
# 本地构建(不部署)
|
|||
|
|
python build_blog.py --no-upload
|
|||
|
|
|
|||
|
|
# 构建并部署(需 .env 含 SSH 凭据)
|
|||
|
|
python build_blog.py
|
|||
|
|
|
|||
|
|
# 本地预览
|
|||
|
|
python build_blog.py --no-upload --serve
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
## 关键约束
|
|||
|
|
|
|||
|
|
- **D:\GFIL 主站**: READ-ONLY,除非用户明确说改
|
|||
|
|
- **Nginx 配置编辑**: 必须用 Python 脚本精确插入,**绝不用 sed** — sed 曾删除闭合花括号导致配置损坏
|
|||
|
|
- **PowerShell**: `curl` 是 Invoke-WebRequest 别名(有问题),用 Python 做 HTTP 调用
|
|||
|
|
- **Python f-string**: `%{var}` 和 `{result[...]}` 在 f-string 内必须转义为 `{{result[...]}}`
|
|||
|
|
- **95/5 规则**: 95% 精力在自有网站,5% 在第三方平台
|
|||
|
|
- **上传方式**: tar.gz 经 JD Cloud → scp 到目标 → 解压;关键文件用 sed 在服务器直接改(但 Nginx 配置除外)
|
|||
|
|
|
|||
|
|
## Token/密钥清单
|
|||
|
|
|
|||
|
|
所有密钥在 `.env` 文件中,.gitignore 已排除。关键 token:
|
|||
|
|
- GitHub: `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`(主账号,push 可用但 repos 404)
|
|||
|
|
- GitHub (blog repo): 见 .env GITHUB_TOKEN
|
|||
|
|
- GitLab: `glpat-i1Elj2OD2CltzT1XSbOTvGM6MQpvOjEKdTpucDA2Yg8.01.171bazl46`
|
|||
|
|
- PyPI: `pypi-AgEIcHlwaS5vcmcCJGE4NWRkYjJkLWEyYjItNDNkNS04NjI2LTgxMmViYmFmMDE5OAACKlszLCI4OTY3MDNmZS0xOGE3LTQyNjEtYTUwOC1jNTZjYzBmNDU1MjQiXQAABiClm87Doks-uv0hxnNjvFYZPxIwElp7kCaTlHS8NcLwAQ`
|
|||
|
|
- npm: `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`(4 recovery codes)
|
|||
|
|
- IndexNow: `72aa77b68704abcfada4020ba81f7c5a`
|
|||
|
|
|
|||
|
|
## 下一步
|
|||
|
|
|
|||
|
|
- 注册 Trustpilot, G2, Capterra(用户任务)
|
|||
|
|
- 清 gfil-intel.xyz CF 缓存(用户从 CF 面板操作)
|
|||
|
|
- 考虑给 gfil-intel.xyz 独立 robots.txt(修改 gfil-mask Nginx 配置)
|
|||
|
|
- Codeberg 镜像,self-hosted Gitea at code.gfil-lab.com
|
|||
|
|
- docs.gfil-lab.com 文档站
|