Equation Studio (方程工坊) 的 GitHub Pages 静态官网。
该结构用于避免未来新增隐私政策、服务条款、文档、博客页时反复调整。
.
├── index.html # 官网首页(Landing)
├── robots.txt # 搜索引擎抓取规则
├── sitemap.xml # 站点地图
├── assets/
│ ├── css/
│ │ ├── styles.css # 首页样式
│ │ └── page.css # 子页面通用样式(法律、文档等)
│ ├── js/
│ │ └── main.js # 首页交互与中英切换
│ └── img/
│ └── logo.png # 品牌资源
├── scripts/
│ ├── sitemap.config.json # 页面清单与优先级配置
│ └── generate-sitemap.ps1 # sitemap 自动生成脚本
└── pages/
├── legal/
│ ├── privacy-policy.html
│ └── terms-of-service.html
├── docs/
│ └── index.html
├── blog/
│ └── index.html
└── changelog/
└── index.html
- 新增法律页:统一放到
pages/legal/ - 新增文档页:统一放到
pages/docs/ - 新增营销专题页:建议放到
pages/marketing/ - 资源文件不要放根目录,统一放到
assets/ - 每次新增公开页面后,同步更新
sitemap.xml
推荐:不直接手改 sitemap.xml,而是更新 scripts/sitemap.config.json 后执行脚本自动生成。
- 在
pages/<category>/新建.html - 引用样式:
../../assets/css/page.css - 顶部返回链接统一指向:
../../index.html - 在首页 footer 增加入口(如有必要)
- 在
sitemap.xml添加对应<url>节点
如果使用自动化方式:
- 在
scripts/sitemap.config.json的pages数组中新增一条 - 运行下面命令生成
sitemap.xml
powershell -ExecutionPolicy Bypass -File .\scripts\generate-sitemap.ps1
推荐使用本地静态服务器:
python -m http.server 8080
打开:http://localhost:8080
- 推送仓库到 GitHub
- 仓库 Settings -> Pages
- Source 选择
Deploy from a branch - Branch 选择
main,Folder 选择/ (root) - 保存并等待部署完成
已配置为组织站点地址:
- 首页: https://equation-studio.github.io/EquationStudio/
- 文档: https://equation-studio.github.io/EquationStudio/pages/docs/index.html
- 隐私政策: https://equation-studio.github.io/EquationStudio/pages/legal/privacy-policy.html
- 服务条款: https://equation-studio.github.io/EquationStudio/pages/legal/terms-of-service.html
- 博客: https://equation-studio.github.io/EquationStudio/pages/blog/index.html
- 更新日志: https://equation-studio.github.io/EquationStudio/pages/changelog/index.html
后续如果仓库名或域名变化,只改一个地方:
- 更新
scripts/sitemap.config.json里的baseUrl - 重新生成
sitemap.xml
powershell -ExecutionPolicy Bypass -File .\scripts\generate-sitemap.ps1
首页中的 canonical 和 og:url 也需要同步为新地址。