From 7a77f54e50146b05bea62934f417016bbd81b794 Mon Sep 17 00:00:00 2001
From: Amir Pourmand <pourmand1376@gmail.com>
Date: Wed, 17 Sep 2025 23:04:22 +0000
Subject: [PATCH] fix(i18n): Add RTL Detection based on Config Set Language (#2100)

---
 quartz/components/renderPage.tsx |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx
index e43189d..3ebfe48 100644
--- a/quartz/components/renderPage.tsx
+++ b/quartz/components/renderPage.tsx
@@ -231,8 +231,9 @@
   )
 
   const lang = componentData.fileData.frontmatter?.lang ?? cfg.locale?.split("-")[0] ?? "en"
+  const direction = i18n(cfg.locale).direction ?? "ltr"
   const doc = (
-    <html lang={lang}>
+    <html lang={lang} dir={direction}>
       <Head {...componentData} />
       <body data-slug={slug}>
         <div id="quartz-root" class="page">

--
Gitblit v1.10.0