v0.4.1: OSS skill videos, site version footer, and mail contact.

Host ability demos on Aliyun OSS instead of Pages bundles; add patches-page version label and top-right mailto link; improve spirit bear portrait export.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
voson
2026-07-27 20:26:30 +08:00
co-authored by Cursor
parent adb8f303c2
commit 124bdbb7c7
11 changed files with 289 additions and 22 deletions
+20 -7
View File
@@ -148,14 +148,21 @@ def ensure_project(email: str, api_key: str, account_id: str, project: str) -> N
raise SystemExit(f"create project failed: {d.get('errors')}")
def run_export() -> None:
def run_export(ability_video_base: str | None = None) -> None:
"""Re-run export_relations_site.py to refresh dist/relations."""
print("exporting static site ...")
subprocess.run(
[sys.executable, str(ROOT / "export_relations_site.py")],
cwd=str(ROOT),
check=True,
)
cmd = [sys.executable, str(ROOT / "export_relations_site.py")]
# Production Pages should load ability demos from OSS, not bundle GB of video.
base = ability_video_base
if base is None:
base = os.environ.get(
"ABILITY_VIDEO_BASE",
"https://climperor.oss-cn-shanghai.aliyuncs.com",
)
if base:
cmd.extend(["--ability-video-base", base])
print(f"ABILITY_VIDEO_BASE={base}")
subprocess.run(cmd, cwd=str(ROOT), check=True)
def check_integrity(dist: Path) -> None:
@@ -309,6 +316,12 @@ def main() -> None:
ap.add_argument("--project-name", default=DEFAULT_PROJECT)
ap.add_argument("--domain", default=DEFAULT_DOMAIN)
ap.add_argument("--dist", default=str(DEFAULT_DIST))
ap.add_argument(
"--ability-video-base",
default=None,
help="passed to export as --ability-video-base (default: OSS climperor endpoint "
"or ABILITY_VIDEO_BASE env)",
)
args = ap.parse_args()
dist = Path(args.dist).resolve()
@@ -320,7 +333,7 @@ def main() -> None:
ensure_project(email, api_key, account_id, args.project_name)
if not args.no_export:
run_export()
run_export(args.ability_video_base)
else:
print("--no-export: using existing dist")