Prepare build-time static asset syncing without touching page templates

Constraint: Static images need to come from remote sources before log sync and build
Rejected: Per-file source mapping | directory-grouped manifests are easier to maintain
Confidence: high
Scope-risk: narrow
Directive: Prefer grouped target_dir manifests and keep page-facing paths stable
Tested: npm run assets:sync; npm run build; bash -n scripts/deploy-homepage.sh; npx tsc --noEmit --pretty false --project tsconfig.json
Not-tested: Real Seafile download against production URLs
This commit is contained in:
SepComet
2026-05-07 14:38:44 +08:00
parent 187686c94c
commit 9ad73276e4
7 changed files with 416 additions and 3 deletions
+3
View File
@@ -34,6 +34,7 @@ SEAFILE_TOKEN=
# Relative paths are resolved from the repo root.
# -----------------------------------------------------------------------------
SYNC_OUTPUT_DIR=src/data/generated
STATIC_ASSET_MANIFEST=src/content/static-assets/index.json
# -----------------------------------------------------------------------------
# Optional behavior
@@ -41,6 +42,7 @@ SYNC_OUTPUT_DIR=src/data/generated
# falling back to cached/seed data.
# -----------------------------------------------------------------------------
STRICT_SYNC=false
STATIC_ASSET_SYNC_STRICT=false
# -----------------------------------------------------------------------------
# Optional future behavior
@@ -57,3 +59,4 @@ GITEA_REQUEST_TIMEOUT_MS=15000
GITEA_REQUEST_CONCURRENCY=5
SEAFILE_REQUEST_TIMEOUT_MS=15000
STATIC_ASSET_REQUEST_TIMEOUT_MS=15000