Skip to content

docs: reuse readmes for documentation homepages. - #2475

Merged
XuZhang99 merged 3 commits into
xLLM-AI:mainfrom
XuZhang99:docs/readme-homepage
Oct 12, 2026
Merged

XuZhang99 merged 3 commits into
xLLM-AI:mainfrom
XuZhang99:docs/readme-homepage

Conversation

@XuZhang99

@XuZhang99 XuZhang99 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The documentation homepages duplicate the repository READMEs and can drift when the project overview changes. Replace the English and Chinese index.md files with relative symlinks to README.md and README_zh.md, so editing a README updates the corresponding homepage.

The docs loader supplies homepage metadata and disables the last-updated footer on the English and Chinese homepages. A Markdown plugin adapts image paths and language links. Keep badges in a centered row with wrapping. Both root READMEs use the same Shields DeepWiki badge, preserving its destination and fixing the image in GitHub README rendering, documentation homepages, and copied Markdown. Include root README and asset changes in documentation build and deployment triggers, and document the editing workflow.

Remove the English and Chinese Multimodal Support pages and clean up the links from the vision API guides. Promote the README News headings to match the other homepage sections.

Related Issues

None.

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor
  • Documentation
  • Test
  • Build or CI

Pull Request Checklist

PR Title and Commit Messages

  • The PR title and each commit message follow the xLLM commit format: <type>: <subject>.

Pre-commit Checks

  • I have installed pre-commit by running pip install pre-commit or an equivalent command.
  • I have installed the hooks with pre-commit install.
  • I have run pre-commit checks on all changed files and fixed any reported issues.

Self Review

  • I have self-reviewed the code according to .agents/skills/code-review/references/custom-code-style.md, especially code written or assisted by AI.
  • I have rebased this PR onto the latest main branch.

Build and Test Coverage

  • Documentation checks and production build have passed locally.

Reviewer Notes

Validation:

  • npm run check: 0 errors, 0 warnings, 0 hints.
  • npm run build -- --force: 148 pages built.
  • python3 -m pre_commit run: passed for the staged changes.
  • git diff --cached --check: passed.
  • Verified homepage symlink targets, README sections, local image assets and widths, language links, Copy page content, and removal of the multimodal routes and links.
  • Verified README changes refresh the corresponding homepage in the local dev server.
  • Inspected both /en/ and /zh/ in Safari and confirmed all five badges display in one centered row.

Summary by CodeRabbit

  • Documentation
    • Documentation homepages now use content from the English and Chinese READMEs, with localized descriptions, improved link and image handling, and update dates based on the corresponding README’s history.
    • Updated README badges and news headings.
    • Removed the dedicated multimodal support pages in English and Chinese.
  • Chores
    • Documentation builds and deployments now run on pushes to main when either README or assets change.
    • Documentation builds now run tests before building.
  • Verified the DeepWiki badge through GitHub Markdown rendering and the GitHub image proxy: HTTP 200, valid SVG.
  • Verified that the last-updated footer is hidden on both homepages while ordinary documentation pages retain their update dates.

- Link the English and Chinese homepages to the root READMEs.
- Adapt homepage metadata, image paths, language links, and badges.
- Remove the multimodal support pages and their incoming links.
- Rebuild documentation when root READMEs or assets change.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T06:42:57.766386Z 669641e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a380406e-d90b-4b74-9f25-d53ba1cce82b




📥 Commits

Reviewing files that changed from the base of the PR and between 180e020 and 669641e.





📒 Files selected for processing (7)
  • .github/workflows/build_docs.yaml
  • docs/README.md
  • docs/README_zh.md
  • docs/package.json
  • docs/src/content.config.ts
  • docs/src/utils/readmeLastUpdated.mjs
  • docs/tests/readmeLastUpdated.test.mjs




🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/README_zh.md
  • docs/README.md




Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.






📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The documentation site now uses repository README files as its English and Chinese homepages. The docs loader sets localized homepage metadata and README-derived update dates. A remark plugin adapts README links, images, and badges. Documentation workflows now watch README and asset changes.

Changes

Documentation homepage integration

Layer / File(s) Summary
Homepage content and metadata
docs/src/content.config.ts, docs/src/utils/readmeLastUpdated.mjs, docs/tests/readmeLastUpdated.test.mjs, docs/src/content/docs/{en,zh}/index.md, README*.md, docs/src/content/docs/{en,zh}/features/multimodal.md, docs/src/content/docs/{en,zh}/getting_started/openai_api_vision.md, docs/README*.md
The English index becomes a README symlink, and the former Chinese homepage content is removed. The docs loader sets localized homepage metadata and refreshes README-derived update dates. Tests cover README-specific Git dates and cases with no Git history. README badges and News headings change. The multimodal pages and links from vision setup text are removed. The docs READMEs describe homepage maintenance.
README rendering in documentation
docs/astro.config.mjs, docs/src/plugins/remarkReadmeHomepage.mjs, docs/src/styles/theme.css
Astro registers a plugin that rewrites README links and asset paths, converts matching HTML images, and marks badge paragraphs. CSS styles the badge layout and images.
Documentation workflow triggers and validation
.github/workflows/build_docs.yaml, .github/workflows/deploy_docs.yaml, docs/package.json
The build workflow watches README and asset paths on pull requests and pushes to main, and runs the docs tests before building. The deployment workflow watches those paths on pushes to main. The package adds a test command.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other








Merge Risk: ⚪ Minimal · up to 66964

No confirmed issue blocks the documentation homepage change; it is ready for normal merge checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 66964

The changes are confined to documentation generation and publishing. The apparent public entrypoints are test-local helpers, and deployment permissions and branch restrictions are unchanged. No introduced security vulnerability was established, but cache recovery and effective hosting controls were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated changed exposure is repository-controlled README and asset content flowing into documentation build workers and public homepages. The inspected path does not introduce tenant identities, application request handling, or data-store authority.

Security Findings and Attack Paths

  • observed — The routed Git mutation occurs in uniquely created temporary test repositories with registered cleanup and disabled commit hooks. It does not mutate the checked-out deployment repository or expose a remotely callable commit operation.

Trust Boundaries and Controls

  • observed — Validation continues to use pull_request and main-branch push events, not pull_request_target. Publishing remains triggered by main-branch pushes or manual dispatch, with unchanged contents-read, Pages-write, and identity-token permissions. Effective repository defaults and environment protection rules were not supplied.





Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. (4 skipped: 4… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: reusing README files for documentation homepages. It is concise, specific, and follows the repository title format.
Description check Passed The description follows the required structure and clearly explains the homepage symlinks, metadata handling, Markdown transformations, workflow changes, removed pages, tests, and validation results.

Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. (4 skipped: 4 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR







  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

if (!/\/src\/content\/docs\/(en|zh)\/index\.md$/.test(file.path || '')) return;

P2 Badge Normalize the homepage path before matching

On native Windows with Git symlink support enabled, Node supplies file.path with \ separators, so this slash-only guard returns before any image or language-link rewrites run. The /en/ and /zh/ pages can therefore emit route-relative assets/... and ./README*.md URLs that do not exist even though the build succeeds; normalize the path separators (or match using path utilities) before this test.


../../../../../README.md

P2 Badge Track README commits in homepage update dates

After a later README-only edit—the update workflow documented by this change—the page body follows this symlink, but Starlight's enabled lastUpdated feature (docs/astro.config.mjs:18) derives its date from the content entry's Git path. Git does not attribute target-file commits to docs/src/content/docs/en/index.md or its Chinese counterpart, so both homepages will keep reporting the symlink-introduction date; supply a homepage date from the target README's history or disable that footer for these entries.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

../../../../../README.md

P2 Badge Derive homepage timestamps from the README history

When a later commit edits only either README (a case both .github/workflows/build_docs.yaml and deploy_docs.yaml now trigger), Starlight's existing lastUpdated: true lookup (docs/astro.config.mjs:18) still uses the content entry's tracked filePath, i.e. this symlink path. Git records only creation or changes of the link itself, not commits to README.md, so /en/ and /zh/ will continue to show this commit's date while their content changes; override lastUpdated for these entries from the target README history or disable it on the homepages.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 669641e328

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/src/plugins/remarkReadmeHomepage.mjs
@XuZhang99
XuZhang99 force-pushed the docs/readme-homepage branch from 669641e to 7aea22b Compare October 12, 2026 06:44
@XuZhang99
XuZhang99 merged commit b63bbc3 into xLLM-AI:main Oct 12, 2026
8 of 18 checks passed
@XuZhang99
XuZhang99 deleted the docs/readme-homepage branch October 12, 2026 12:13
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