Skip to content

Commit 203446d

Browse files
Jinjiangbrc-dd
andauthored
feat: support dir in frontmatter (#3353)
Co-authored-by: Divyansh Singh <[email protected]>
1 parent 50c9758 commit 203446d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/client/app/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function initData(route: Route): VitePressData {
8989
frontmatter: computed(() => route.data.frontmatter),
9090
params: computed(() => route.data.params),
9191
lang: computed(() => site.value.lang),
92-
dir: computed(() => site.value.dir),
92+
dir: computed(() => route.data.frontmatter.dir || site.value.dir || 'ltr'),
9393
localeIndex: computed(() => site.value.localeIndex || 'root'),
9494
title: computed(() => {
9595
return createTitle(site.value, route.data)

src/client/theme-default/styles/base.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ body {
3939
font-weight: 400;
4040
color: var(--vp-c-text-1);
4141
background-color: var(--vp-c-bg);
42-
direction: ltr;
4342
font-synthesis: style;
4443
text-rendering: optimizeLegibility;
4544
-webkit-font-smoothing: antialiased;

0 commit comments

Comments
 (0)