Skip to content

fix(docs): deploy on blog changes, correct GitHub repo, stop cross-locale homepage caching#13

Merged
xuyushun441-sys merged 1 commit into
mainfrom
fix/docs-deploy-locale-github
May 30, 2026
Merged

fix(docs): deploy on blog changes, correct GitHub repo, stop cross-locale homepage caching#13
xuyushun441-sys merged 1 commit into
mainfrom
fix/docs-deploy-locale-github

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Three fixes prompted by issues seen on the live site (objectos.ai).

1. Blog changes never deployed

deploy-docs.yml only triggered on content/docs/**. The expanded blog post (#12) only touched content/blog/**, so no deploy fired — the live blog still shows the old short version. Added content/blog/** to the path filter.

2. Wrong GitHub repo

gitConfig.repo was 'spec', so the navbar GitHub link and the docs edit this page link pointed at github.com/objectstack-ai/spec. Corrected to objectos, where this content actually lives.

3. Chinese (and other) browsers not redirected from the homepage

The redirect logic is actually correct — a cache-miss request proves it:

$ curl -sD- -o/dev/null -H 'Accept-Language: zh-CN,zh;q=0.9' https://www.objectos.ai/
HTTP/2 307
location: /zh-Hans
set-cookie: FD_LOCALE=zh-Hans; Path=/; SameSite=lax

The bug is caching: the prefix-less / (default/English) is served with cache-control: s-maxage=31536000 and no Vary: Accept-Language. A shared cache stores that English homepage at / and serves it to everyone, so non-English visitors never hit the middleware redirect. Fix: mark the default-locale rewrite response private, no-cache, must-revalidate so the edge never shares it and middleware re-runs language detection on every request.

After merge

This PR touches apps/docs/** and .github/workflows/deploy-docs.yml, so merging will trigger a docs deploy that also publishes the already-merged expanded blog post. Verification post-deploy: hit / with a zh-CN Accept-Language and confirm the 307, and confirm the navbar GitHub link resolves to /objectos.

Build: pnpm --filter docs build → green (509 static pages).

…cale homepage caching

Three fixes prompted by live-site issues:

1. deploy-docs.yml only triggered on content/docs/** — blog-only changes
   (like the expanded 'extend existing systems' post in #12) never deployed.
   Add content/blog/** to the path filter.

2. gitConfig.repo was 'spec' → the navbar GitHub link and the docs
   'edit this page' link pointed at objectstack-ai/spec. Correct to
   objectstack-ai/objectos (where this content actually lives).

3. The prefix-less homepage ('/') is statically cached with
   s-maxage=31536000 and no Vary on Accept-Language. Its body, however,
   is language-negotiated by middleware — so a shared cache stored the
   English homepage at '/' and served it to every visitor, and non-English
   browsers stopped being redirected to their localized path. Mark the
   default-locale rewrite response 'private, no-cache' so the edge never
   shares it and middleware re-runs language detection per request.
   (Verified the redirect logic itself is correct: a cache-miss request
   with Accept-Language: zh-CN already 307s to /zh-Hans.)
@xuyushun441-sys xuyushun441-sys merged commit c8efca2 into main May 30, 2026
1 check passed
@xuyushun441-sys xuyushun441-sys deleted the fix/docs-deploy-locale-github branch May 30, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants