From 203446d69193483a46e1082bba5fbad0e35966fb Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Sat, 30 Dec 2023 21:02:22 +0800 Subject: [PATCH] feat: support dir in frontmatter (#3353) Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> --- src/client/app/data.ts | 2 +- src/client/theme-default/styles/base.css | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/app/data.ts b/src/client/app/data.ts index 77cc80d34989..ccca8123d332 100644 --- a/src/client/app/data.ts +++ b/src/client/app/data.ts @@ -89,7 +89,7 @@ export function initData(route: Route): VitePressData { frontmatter: computed(() => route.data.frontmatter), params: computed(() => route.data.params), lang: computed(() => site.value.lang), - dir: computed(() => site.value.dir), + dir: computed(() => route.data.frontmatter.dir || site.value.dir || 'ltr'), localeIndex: computed(() => site.value.localeIndex || 'root'), title: computed(() => { return createTitle(site.value, route.data) diff --git a/src/client/theme-default/styles/base.css b/src/client/theme-default/styles/base.css index 5fb3a3cc0219..af2ed98a0524 100644 --- a/src/client/theme-default/styles/base.css +++ b/src/client/theme-default/styles/base.css @@ -39,7 +39,6 @@ body { font-weight: 400; color: var(--vp-c-text-1); background-color: var(--vp-c-bg); - direction: ltr; font-synthesis: style; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;