diff --git a/packages/core/src/node/constants.ts b/packages/core/src/node/constants.ts index dfc33516e..d9f41490e 100644 --- a/packages/core/src/node/constants.ts +++ b/packages/core/src/node/constants.ts @@ -17,6 +17,7 @@ export const inlineThemeScript = `{ const preferDark = window.matchMedia('(prefers-color-scheme: dark)').matches const isDark = !saved || saved === 'auto' ? preferDark : saved === 'dark' document.documentElement.classList.toggle('dark', isDark) + document.documentElement.classList.toggle('rp-dark', isDark) document.documentElement.style.colorScheme = isDark ? 'dark' : 'light' }` .replace(/\n/g, ';') diff --git a/packages/theme-default/src/components/Aside/index.tsx b/packages/theme-default/src/components/Aside/index.tsx index 36fb82071..cce2c2814 100644 --- a/packages/theme-default/src/components/Aside/index.tsx +++ b/packages/theme-default/src/components/Aside/index.tsx @@ -22,7 +22,7 @@ const TocItem = ({ - + {renderInlineMarkdown(header.text)} @@ -79,13 +79,16 @@ export function Aside(props: { headers: Header[]; outlineTitle: string }) { }, [decodedHash, headers, pathname]); return ( -