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
@@ -21,7 +21,9 @@ function persist(): void {
}
function reflect(): void {
document.firstElementChild?.setAttribute("data-theme", themeValue);
const root = document.firstElementChild;
root?.setAttribute("data-theme", themeValue);
root?.classList.toggle("dark", themeValue === DARK);
document.querySelector("#theme-btn")?.setAttribute("aria-label", themeValue);
// Fill <meta name="theme-color"> with the computed background colour so