My theme switcher script; which is in <head> section and working
Working perfectly fine with Tailwind and Astro ;
Now added ExpressiveCode within Astro . Here is my astro config
import { defineConfig } from 'astro/config'; import tailwind from "@astrojs/tailwind"; import sitemap from "@astrojs/sitemap"; import mdx from "@astrojs/mdx"; import icon from "astro-icon"; import astroExpressiveCode from 'astro-expressive-code'; export default defineConfig({ site: 'https://santm.com', integrations: [ astroExpressiveCode({ themes: ['dracula', 'solarized-light'], }), tailwind(), sitemap(), mdx(), icon() ] });
When I switch my system theme from dark to light or vice versa the theme changes from dracula to solarized-light in locallStorage but not with the button click for theme switcher which is setting the variable darkMode true / false ; how I solve this ? Attched my theme switcher JS as well.
