11# PythonIDE Link Site
22
3- This directory is a zero-cost GitHub Pages site for:
3+ This directory is the static GitHub Pages origin for:
44
55- ` https://link.pythonide.xin/s/{scriptID} ` community work shares
66- ` https://link.pythonide.xin/l/{code} ` reserved short links
@@ -16,6 +16,14 @@ The canonical repository is
1616Pages deploys from the default branch root with the custom domain
1717` link.pythonide.xin ` and enforced HTTPS.
1818
19+ The companion ` ../link-edge/ ` Cloudflare Worker intercepts only ` /s/* ` and
20+ ` /og/* ` . It server-renders per-script Open Graph metadata for crawlers and
21+ creates a 1200×630 PNG card from the existing public community API. All other
22+ routes, including AASA and MCP OAuth, continue to come directly from GitHub
23+ Pages. This split is required because GitHub Pages cannot generate a different
24+ HTML ` <head> ` for each script and WeChat does not reliably execute page
25+ JavaScript when building a link preview.
26+
1927To publish changes, copy the contents of this ` link-site/ ` directory to that
2028repository root and verify the Pages deployment. The DNS record is:
2129
@@ -30,6 +38,17 @@ Do not change the root `@` or `www` records used by the main website. Do not
3038recreate a repository named ` pythonide-link ` under the previous owner because
3139that would break GitHub's repository-transfer redirects.
3240
41+ After publishing the static site, deploy ` ../link-edge/worker.js ` with the
42+ routes declared in ` ../link-edge/wrangler.jsonc ` . The Cloudflare zone must keep
43+ the ` link ` record proxied for Worker routes to run. The Worker does not replace
44+ or proxy the AASA and OAuth paths.
45+
46+ Before either deployment, run:
47+
48+ ``` bash
49+ node --test link-site/tests/share-page.test.js link-edge/tests/worker.test.js
50+ ```
51+
3352## iOS Requirement
3453
3554The app entitlements must include:
0 commit comments