Skip to content

Conversation

@chvmvd
Copy link
Contributor

@chvmvd chvmvd commented Nov 29, 2025

コードブロックにダークテーマの設定を追加しました。Docusaurusのテンプレートを参考にしました。
cf. ライトテーマのみを設定した過去のコミット 6eae8d1
cf. コードブロックのテーマのドキュメント https://docusaurus.io/docs/markdown-features/code-blocks#theming
cf. Docusaurusのテンプレートの該当箇所 https://github.com/facebook/docusaurus/blob/c6c0f636a86dfb255ff3b114a29cd86eb165424f/packages/create-docusaurus/templates/classic-typescript/docusaurus.config.ts#L144-L145

変更前

before.mp4

変更後

after.mp4

@chvmvd chvmvd marked this pull request as ready for review November 29, 2025 05:53
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 29, 2025

Deploying utcode-learn with  Cloudflare Pages  Cloudflare Pages

Latest commit: b9c642e
Status: ✅  Deploy successful!
Preview URL: https://3105942b.utcode-learn.pages.dev
Branch Preview URL: https://add-codeblock-dark-theme.utcode-learn.pages.dev

View logs

Copy link

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 adds dark theme support for code blocks in the Docusaurus configuration, following the official Docusaurus documentation and template examples. The change enables automatic theme switching for code syntax highlighting based on the user's selected theme (light/dark mode).

  • Adds darkTheme: prismThemes.dracula configuration to the Prism settings in docusaurus.config.js

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

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@chvmvd chvmvd requested a review from chelproc December 6, 2025 13:04
@chvmvd chvmvd merged commit 4ad2be6 into main Dec 14, 2025
3 checks passed
@chvmvd chvmvd deleted the add-codeblock-dark-theme branch December 14, 2025 12:55
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.

4 participants