chore: minor tweaks

pull/3404/head
Divyansh Singh 6 months ago
parent c2b4c66e79
commit 017395fea8

@ -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
@ -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
}
}

Loading…
Cancel
Save