From 017395fea820ad2d172d53fa6a05880c759ed87c Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:55:02 +0530 Subject: [PATCH] chore: minor tweaks --- src/client/app/data.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/client/app/data.ts b/src/client/app/data.ts index 7e802956..c75f79e7 100644 --- a/src/client/app/data.ts +++ b/src/client/app/data.ts @@ -45,8 +45,8 @@ export interface VitePressData { description: Ref lang: Ref dir: Ref - isDark: Ref localeIndex: Ref + isDark: Ref } // site data is a singleton @@ -89,14 +89,12 @@ export function initData(route: Route): VitePressData { frontmatter: computed(() => route.data.frontmatter), params: computed(() => route.data.params), lang: computed(() => site.value.lang), - dir: computed(() => route.data.frontmatter.dir || site.value.dir || 'ltr'), + dir: computed(() => route.data.frontmatter.dir || site.value.dir), localeIndex: computed(() => site.value.localeIndex || 'root'), - title: computed(() => { - return createTitle(site.value, route.data) - }), - description: computed(() => { - return route.data.description || site.value.description - }), + title: computed(() => createTitle(site.value, route.data)), + description: computed( + () => route.data.description || site.value.description + ), isDark } }