feat: add callout support (#655)

* feat: toggle .dark class on theme change

* feat: add callouts with rehype-callouts plugin

* docs: update blog posts with callouts
This commit is contained in:
Sat Naing
2026-06-06 09:09:08 +07:00
committed by GitHub
parent 98f15ee3bc
commit e0506cb41e
10 changed files with 106 additions and 25 deletions
+3 -1
View File
@@ -106,7 +106,9 @@ const rssHref = getRelativeLocaleUrl(
"(prefers-color-scheme: dark)"
).matches;
const theme = stored ?? (prefersDark ? "dark" : "light");
document.firstElementChild?.setAttribute("data-theme", theme);
const root = document.firstElementChild;
root?.setAttribute("data-theme", theme);
root?.classList.toggle("dark", theme === "dark");
// Expose value so theme.ts can skip re-detection.
window.__theme = { value: theme };
})();