Skip to content

fix: standardize doctype declaration to uppercase in default template#6853

Merged
chenjiahan merged 1 commit intomainfrom
doc_type_uppercase_1228
Dec 28, 2025
Merged

fix: standardize doctype declaration to uppercase in default template#6853
chenjiahan merged 1 commit intomainfrom
doc_type_uppercase_1228

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Dec 28, 2025

Summary

Updated the default HTML template to use <!DOCTYPE html> instead of <!doctype html>.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 28, 2025 13:59
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 28, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit cbc930d
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/695137db6717670008102648
😎 Deploy Preview https://deploy-preview-6853--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 69 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

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 standardizes the HTML DOCTYPE declaration from lowercase <!doctype html> to uppercase <!DOCTYPE html> across the default template, documentation, and tests. The change aligns with Prettier's formatting conventions and improves consistency across the codebase.

Key changes:

  • Updated the default template generator to use uppercase DOCTYPE
  • Synchronized all documentation examples with the new format
  • Updated test snapshots and expectations to reflect the change

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/src/plugins/html.ts Updated the default template generator to use uppercase <!DOCTYPE html>
packages/core/tests/__snapshots__/html.test.ts.snap Updated test snapshots to reflect the new DOCTYPE format
packages/core/tests/__snapshots__/default.test.ts.snap Updated test snapshots to reflect the new DOCTYPE format
packages/core/tests/__snapshots__/builder.test.ts.snap Updated test snapshots to reflect the new DOCTYPE format
e2e/cases/html/inject/index.test.ts Updated test expectations to match the new DOCTYPE format
e2e/cases/html/html-tags/function-usage/index.test.ts Updated test expectations to match the new DOCTYPE format
e2e/cases/assets/asset-prefix/src/template.html Updated template file to use uppercase DOCTYPE
website/docs/zh/guide/basic/html-template.mdx Updated Chinese documentation example to show uppercase DOCTYPE
website/docs/zh/config/output/filename.mdx Updated Chinese documentation example to show uppercase DOCTYPE
website/docs/zh/config/html/template.mdx Updated Chinese documentation example to show uppercase DOCTYPE
website/docs/en/guide/basic/html-template.mdx Updated English documentation example to show uppercase DOCTYPE
website/docs/en/config/output/filename.mdx Updated English documentation example to show uppercase DOCTYPE
website/docs/en/config/html/template.mdx Updated English documentation example to show uppercase DOCTYPE

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

@chenjiahan chenjiahan merged commit 8e94883 into main Dec 28, 2025
19 checks passed
@chenjiahan chenjiahan deleted the doc_type_uppercase_1228 branch December 28, 2025 14:09
@ghost
Copy link
Copy Markdown

ghost commented Dec 28, 2025

Thanks, same as <meta charset="utf-8">, awesome!

@chenjiahan
Copy link
Copy Markdown
Member Author

Thanks for the suggestion! The default charset has been updated in #6856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants