Skip to content

Commit 1a60514

Browse files
fix: set blog page title
1 parent 898f89a commit 1a60514

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/pages/blogs/[...slugs].vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ function getWordCount(nodesList: MinimarkNode[]): number {
3030
}
3131
3232
const route = useRoute()
33-
3433
const { data: blog } = await useAsyncData(`blog-${route.path}`, () => queryCollection('blogs').path(route.path).first())
34+
35+
if (blog.value) {
36+
useSeoMeta({ title: blog.value.title })
37+
}
3538
</script>
3639

3740
<template>

0 commit comments

Comments
 (0)