跳到主要内容

sota video gen

文档

本地预览、上线托管与子域映射。

本地预览

将 HTTP 服务器的文档根目录指向本仓库的 public 文件夹。示例(Python 内置服务器):

cd public && python3 -m http.server 8080

在浏览器打开 http://127.0.0.1:8080/。生成后的页面使用带 base_path 的链接(如部署在 /repo/ 下),需要 Web 服务器,不要直接双击打开 HTML。

工具路由生成

路由与页面元数据的单一来源site/routes.yaml;页面骨架由 site/templates/ 下的 Jinja2 渲染。

依赖安装(首次):pip install -r requirements.txt

生成静态页:python3 scripts/generate_pages.py

CI 中可设置环境变量 SITE_BASE_URL(例如 https://owner.github.io/repo)覆盖 sitemap.base_url,以便 canonical 与站内链接与 GitHub Pages 路径一致。

新增工具或模型见 site/ADDING_MODELS.md

GitHub Pages

使用 Actions 部署 时,工作流会设置 SITE_BASE_URLhttps://<owner>.github.io/<repo>/(项目页)。用户页 username.github.io(根路径无子目录)时 base_path 为空。

将仓库 Settings → Pages → Build and deployment 设为 GitHub Actions,推送后由 pages.yml 上传 public/ 产物。

子域映射

若用自有域名,把 site/routes.yamlsitemap.base_url 改为 https://yourdomain.com(无路径前缀),重新生成即可。

服务条款(占位)

上线前请由法务审阅并替换为正式条款。

隐私说明(占位)

说明收集哪些数据、保存多久、用户如何删除账户等。