Skip to content

Commit 017395f

Browse files
committed
chore: minor tweaks
1 parent c2b4c66 commit 017395f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Diff for: src/client/app/data.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export interface VitePressData<T = any> {
4545
description: Ref<string>
4646
lang: Ref<string>
4747
dir: Ref<string>
48-
isDark: Ref<boolean>
4948
localeIndex: Ref<string>
49+
isDark: Ref<boolean>
5050
}
5151

5252
// site data is a singleton
@@ -89,14 +89,12 @@ 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(() => route.data.frontmatter.dir || site.value.dir || 'ltr'),
92+
dir: computed(() => route.data.frontmatter.dir || site.value.dir),
9393
localeIndex: computed(() => site.value.localeIndex || 'root'),
94-
title: computed(() => {
95-
return createTitle(site.value, route.data)
96-
}),
97-
description: computed(() => {
98-
return route.data.description || site.value.description
99-
}),
94+
title: computed(() => createTitle(site.value, route.data)),
95+
description: computed(
96+
() => route.data.description || site.value.description
97+
),
10098
isDark
10199
}
102100
}

0 commit comments

Comments
 (0)