Skip to content

doc: hide Zhihu link from English docs - #5008

Merged
qinxuye merged 1 commit into
xorbitsai:mainfrom
qinxuye:docs/remove-zhihu-from-en-docs
Jun 9, 2026
Merged

qinxuye merged 1 commit into
xorbitsai:mainfrom
qinxuye:docs/remove-zhihu-from-en-docs

Conversation

@qinxuye

@qinxuye qinxuye commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • hide the Zhihu blog card from the English docs index page
  • keep the Zhihu card visible in zh-cn docs builds
  • preserve the existing zh-cn navbar Zhihu icon behavior

Validation

  • git diff --check
  • python -m py_compile doc/source/conf.py
  • python -m sphinx -b html -q doc/source /tmp/xinference-doc-en-zhihu-check2
  • READTHEDOCS_LANGUAGE=zh-cn python -m sphinx -b html -q -D language=zh_CN doc/source /tmp/xinference-doc-zh-zhihu-check
  • verified English index.html has no zhihu.com/org/xorbits or "Read our blogs"
  • verified zh-cn index.html keeps zhihu.com/org/xorbits and "阅读知乎博客"

@XprobeBot XprobeBot added this to the v2.x milestone Jun 9, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a mechanism to conditionally filter out Chinese-specific documentation elements (marked with the class zh-cn-only) when building the documentation for non-Chinese languages. This is implemented via a custom Sphinx extension hook in doc/source/conf.py and applied to a Zhihu link in doc/source/index.rst. The review feedback suggests a safer way to remove nodes from the docutils tree to avoid potential ValueError exceptions if a node is already removed.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread doc/source/conf.py Outdated
@qinxuye
qinxuye force-pushed the docs/remove-zhihu-from-en-docs branch from a44a3c5 to 99161b1 Compare June 9, 2026 04:22
@qinxuye qinxuye changed the title docs: hide Zhihu link from English docs doc: hide Zhihu link from English docs Jun 9, 2026
@XprobeBot XprobeBot added the documentation Improvements or additions to documentation label Jun 9, 2026

@OliverBryant OliverBryant left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinxuye
qinxuye merged commit d798af4 into xorbitsai:main Jun 9, 2026
7 of 13 checks passed
@qinxuye
qinxuye deleted the docs/remove-zhihu-from-en-docs branch June 9, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants