Aman Mittal 2/12/2025

How to change light and dark Shiki themes when using Astro

Read Original

This technical tutorial explains how to implement dual light and dark theme syntax highlighting in Astro using the built-in Shiki highlighter. It details the necessary configuration changes in `astro.config.ts` and the required CSS styling in `base.css` to enable automatic theme switching for code blocks.

How to change light and dark Shiki themes when using Astro

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week