Skip to content

Commit

Permalink
chore: minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Jan 3, 2024
1 parent c2b4c66 commit 017395f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/client/app/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export interface VitePressData<T = any> {
description: Ref<string>
lang: Ref<string>
dir: Ref<string>
isDark: Ref<boolean>
localeIndex: Ref<string>
isDark: Ref<boolean>
}

// site data is a singleton
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 017395f

Please sign in to comment.