feat(pages): edit.chaxus.com 跳转器(带参数,草稿·CF 上线后再合)#101
Merged
Conversation
…ving)
Prepares the old-site redirector for the edit.chaxus.com migration. Publishes
only redirect/{index,404}.html via GitHub Pages; a client-side location.replace
(+ canonical, which Google treats as a soft 301) sends ranuts.github.io/document/*
to edit.chaxus.com/*, stripping the /document base and preserving path + query
+ hash. Query preservation is mandatory — the editor is driven by ?embed= /
?agent=1 / ?url= / ?embedOrigin=.
- redirect/index.html + redirect/404.html
- pages-build-site.yml: drop the app build, upload ./redirect; add
workflow_dispatch for manual first deploy once Cloudflare is live
Also confirmed document is already base-agnostic (vite base './' + runtime
getBasePath + relative manifest/SW), so no /document -> / rootification is
needed — that planned task collapses to zero.
Verified: 6 node cases + Playwright real-browser interception confirm the
destination URL strips /document and keeps the query across embed/agent/url.
DO NOT MERGE until edit.chaxus.com is confirmed live — activating early would
redirect users to a site that does not yet exist.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CF Pages now serves the app from main, so the GitHub Pages redirector is main-based too — merging #101 to main activates it (guarded by draft status until edit.chaxus.com is live).
Deploying document with
|
| Latest commit: |
5452254
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bc5f4748.document-7hm.pages.dev |
| Branch Preview URL: | https://feat-redirect-edit-chaxus.document-7hm.pages.dev |
chaxus
added a commit
that referenced
this pull request
Jul 5, 2026
CF Pages now serves the app from main, so the GitHub Pages redirector is main-based too — merging #101 to main activates it (guarded by draft status until edit.chaxus.com is live).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这是什么
document 迁
edit.chaxus.com后,旧地址ranuts.github.io/document/*的跳转器(准备件)。github.io 只能客户端跳转(JSlocation.replace+ canonical,Google 视同 301)。内容
redirect/index.html+redirect/404.html(内容一致;GH Pages 对未匹配路径回 404.html)pages-build-site.yml:去掉 app 构建,只 upload./redirect;加workflow_dispatch便于 CF 上线后手动首发跳转核心:剥掉
/document前缀,保留 path + query + hash——编辑器靠?embed=/?agent=1/?url=/?embedOrigin=驱动,query 不能丢。附带结论:document 已经 base 无关
核实发现 ran 那套「base
/document/→/」根路径化对 document 不需要:vite base'./'+ 运行时getBasePath()(根域 pathname/自动返回/)+ manifest/SW 全相对。→ planning 决策 6 的"必做代码工"整条勾销。验证
ranuts.github.io/document/*,捕获实际跳转目标 —— embed / agent&url / 深层路径+hash 全部正确激活顺序(合并前先做 CF)
edit.chaxus.com(CF*.pages.dev验证 OK)workflow_dispatch手动首发,验证旧链接跳转待你确认:workflow 触发分支现为
release/v0.0.4,激活时需确认改动落到该分支或调整。详见
docs/explorations/2026-07-05-github-pages-redirector.md。🤖 Generated with Claude Code