11# PythonIDE Link Site
22
3- This directory is the static GitHub Pages origin for:
3+ This directory is the static asset source for the ` pythonide-link ` Cloudflare
4+ Pages project:
45
56- ` https://link.pythonide.xin/s/{scriptID} ` community work shares
67- ` https://link.pythonide.xin/community/{postID} ` Community V2 post and comment shares
@@ -16,37 +17,46 @@ This directory is the static GitHub Pages origin for:
1617## Repository and deployment
1718
1819The canonical repository is
19- [ ` Python-IDE/pythonide-link ` ] ( https://github.com/Python-IDE/pythonide-link ) . GitHub
20- Pages deploys from the default branch root with the custom domain
21- ` link.pythonide.xin ` and enforced HTTPS.
20+ [ ` Python-IDE/pythonide-link ` ] ( https://github.com/Python-IDE/pythonide-link ) .
21+ Cloudflare Pages serves the custom domain ` link.pythonide.xin ` with enforced
22+ HTTPS. The repository is the reviewed source and rollback history; publishing a
23+ commit alone does not deploy the direct-upload Pages project.
2224
2325The companion ` ../link-edge/ ` renderer server-renders per-script Open Graph
2426metadata and creates a 1200×630 PNG card from the restricted public Community
25- V2 work-share projection. The GitHub Actions workflow in ` .github/workflows/ `
26- runs this renderer on every source publish and every six hours, committing
27- generated ` /s/*/ ` pages and ` /og/* ` cards to GitHub Pages. Dynamic edge
28- rendering remains immediate; the generated files are only a fallback for
29- crawlers such as WeChat that do not reliably execute page JavaScript. The six-
30- hour cadence avoids waking the Community database every five minutes .
27+ V2 work-share projection. ` _worker.js ` enables Cloudflare Pages advanced mode
28+ and re-exports that canonical renderer from the published ` edge/ ` directory.
29+ Dynamic rendering is immediate. The GitHub Actions workflow can generate
30+ reviewable ` /s/*/ ` pages and ` /og/* ` cards on a source change or a manual run,
31+ but it has no recurring schedule and therefore does not wake the Community
32+ database while nobody is using the site .
3133
32- To publish changes, copy the contents of this ` link-site/ ` directory to that
33- repository root and verify the Pages deployment. The DNS record is:
34+ Publish and deploy in this order:
35+
36+ ``` bash
37+ bash scripts/push_link_site.sh " Describe the link-site change"
38+ bash scripts/deploy_link_pages.sh
39+ ```
40+
41+ The first command updates the public source repository. The second tests and
42+ deploys that exact repository commit to the ` pythonide-link ` Cloudflare Pages
43+ project. The DNS record is:
3444
3545``` text
3646Type: CNAME
3747Host: link
38- Value: Python-IDE.github.io
39- TTL: 10 minutes
48+ Value: pythonide-link.pages.dev
4049```
4150
4251Do not change the root ` @ ` or ` www ` records used by the main website. Do not
4352recreate a repository named ` pythonide-link ` under the previous owner because
4453that would break GitHub's repository-transfer redirects.
4554
4655The publish script copies ` ../link-edge/ ` into the link repository as ` edge/ `
47- so the workflow and renderer always use the same tested implementation. Both
48- the browser fallback and edge renderer use ` community-api.pythonide.xin ` V2;
49- they must never restore a direct ` fcapp.run ` or ` /v1/scripts ` dependency.
56+ so Pages advanced mode and the generator always use the same tested
57+ implementation. Both the browser fallback and edge renderer use
58+ ` community-api.pythonide.xin ` V2; they must never restore a direct ` fcapp.run `
59+ or ` /v1/scripts ` dependency.
5060
5161Before either deployment, run:
5262
0 commit comments