Skip to content

docs: improve html option references#7661

Merged
chenjiahan merged 2 commits into
mainfrom
chenjiahan/docs-html-option-references
May 17, 2026
Merged

docs: improve html option references#7661
chenjiahan merged 2 commits into
mainfrom
chenjiahan/docs-html-option-references

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

This PR updates the HTML option references in the English and Chinese docs to use valid TypeScript function signatures. It also clarifies the html.inject return type and fixes a few wording issues in the favicon, inject, template, title, and prefetch pages.

Copilot AI review requested due to automatic review settings May 17, 2026 05:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refines the HTML-related configuration documentation (English + Chinese) by fixing invalid TypeScript function type signatures, clarifying html.inject’s function return type, and tightening wording in a few option reference pages.

Changes:

  • Update several “Function” option type examples to valid TypeScript signatures ((context: { ... }) => ...).
  • Clarify that html.inject function form returns ScriptInject | void (not string | void).
  • Fix small wording/grammar issues in prefetch, inject, template, and favicon docs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/docs/zh/config/html/title.mdx Fixes type formatting and updates TitleFunction signature to valid TS.
website/docs/zh/config/html/template.mdx Updates TemplateFunction signature and fixes a wording typo (“路径”).
website/docs/zh/config/html/inject.mdx Corrects InjectFunction signature and return type to `ScriptInject
website/docs/zh/config/html/favicon.mdx Fixes type formatting and updates FaviconFunction signature to valid TS.
website/docs/en/config/performance/prefetch.mdx Fixes English wording (“An extra filter…”) and clarifies exclude sentence structure.
website/docs/en/config/html/title.mdx Fixes type formatting and updates TitleFunction signature to valid TS.
website/docs/en/config/html/template.mdx Updates TemplateFunction signature to valid TS.
website/docs/en/config/html/inject.mdx Improves wording/grammar and corrects InjectFunction return type to `ScriptInject
website/docs/en/config/html/favicon.mdx Fixes type formatting, improves wording, and updates FaviconFunction signature to valid TS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread website/docs/en/config/html/favicon.mdx Outdated
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 17, 2026

Deploying rsbuild with  Cloudflare Pages  Cloudflare Pages

Latest commit: fed49b9
Status: ✅  Deploy successful!
Preview URL: https://690c0b86.rsbuild-v2.pages.dev
Branch Preview URL: https://chenjiahan-docs-html-option.rsbuild-v2.pages.dev

View logs

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

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

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 improves the documentation for Rsbuild's HTML and performance configurations in both English and Chinese. The changes include fixing typos (such as replacing full-width pipe characters and correcting grammar), clarifying descriptions for script injection, and updating function type signatures to include a named 'context' parameter. The reviewer suggested replacing the internal 'ScriptInject' type with explicit literal types in the documentation to make it more self-contained and easier for users to understand.

Comment thread website/docs/en/config/html/inject.mdx
Comment thread website/docs/zh/config/html/inject.mdx
Copilot AI review requested due to automatic review settings May 17, 2026 05:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread website/docs/en/config/html/favicon.mdx
@chenjiahan chenjiahan merged commit 00da106 into main May 17, 2026
7 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/docs-html-option-references branch May 17, 2026 13:14
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