jiayuasu opened a new pull request, #2951:
URL: https://github.com/apache/sedona/pull/2951

   ## Did you read the Contributor Guide?
   
   - Yes, I have read the [Contributor 
Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor 
Development Guide](https://sedona.apache.org/latest/community/develop/)
   
   ## Is this PR related to a ticket?
   
   - Yes, and the PR name follows the format `[GH-XXX] my subject`. References 
#2867.
   
   ## What changes were proposed in this PR?
   
   The blog index at `/latest/blog/` currently renders with no posts and no 
per-post pages get built. The mkdocs-material blog plugin generates its archive 
and pagination views as virtual files inside a `tempfile.mkdtemp()` directory, 
but `mkdocs-static-i18n`'s `reconfigure_files` only handles files that either 
live under `docs_dir` or are non-documentation pages — these generated markdown 
views fall through both buckets and are silently dropped with `WARNING - 
mkdocs_static_i18n: Unhandled file case - blog/archive/2026.md` (and similar). 
This is a known upstream incompatibility tracked in 
[ultrabug/mkdocs-static-i18n#283](https://github.com/ultrabug/mkdocs-static-i18n/issues/283);
 it was introduced when i18n was wired up in #2920.
   
   This PR:
   
   - Adds `docs-overrides/hooks/i18n_blog_passthrough.py`, an mkdocs hook 
(based on the workaround in ultrabug/mkdocs-static-i18n#283) that disconnects 
blog files from the Files collection between the blog plugin's `on_files` 
(priority -50) and the i18n plugin's `on_files` (priority -100), then 
reconnects them after. Net effect: the blog renders once in the default 
language and is served identically under every language version.
   - Registers the hook via a top-level `hooks:` entry in `mkdocs.yml`.
   - Removes the `.zh.md` blog files added in #2950. The current i18n + blog 
setup cannot serve translated blog posts alongside this workaround, and leaving 
the files in place causes the blog plugin to treat them as additional posts 
(breaking pagination — page 1 was rendering empty with the duplicates spilling 
to page 2). They can be re-added if upstream i18n + blog compatibility ships.
   
   ## How was this patch tested?
   
   - Local `uv run mkdocs build`:
     - Before: 0 posts on `/blog/`, 0 per-post pages generated, multiple 
`Unhandled file case` warnings for `blog/archive/*.md` and 
`blog/page/2/index.md`.
     - After: 9 posts on `/blog/`, 9 posts on `/zh/blog/`, 9 per-post pages 
under both language roots, no `Unhandled file case` warnings.
   - Verified by serving the built `site/` locally and browsing `/blog/`, 
`/blog/2025/09/05/should-you-use-h3-...`, and `/zh/blog/`.
   
   ## Did this PR include necessary documentation updates?
   
   - No, this PR does not affect any public API so no need to change the 
documentation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to