update
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import siteConfig from "~/config";
|
||||
|
||||
// import type { BlogPost } from "@/types/blog";
|
||||
const route = useRoute();
|
||||
|
||||
@@ -39,11 +41,17 @@ const formattedData = computed(() => {
|
||||
});
|
||||
|
||||
useHead({
|
||||
title: `Category: ${category.value}`,
|
||||
title: `Category -${siteConfig} ${category.value}`,
|
||||
meta: [
|
||||
{
|
||||
name: "description",
|
||||
content: `You will find all the ${category.value} related post here`,
|
||||
content: `你可以在这里找到所有关于 ${category.value} 的文章。`,
|
||||
},
|
||||
],
|
||||
link: [
|
||||
{
|
||||
rel: "canonical",
|
||||
href: `${siteConfig.siteMeta.url}/${route.path}`,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import siteConfig from "~/config";
|
||||
const { path } = useRoute();
|
||||
|
||||
const { data } = await useAsyncData("all-blog-post-by-category", () =>
|
||||
queryCollection("content").select("path", "categories").where("published", "=", true).all(),
|
||||
);
|
||||
@@ -18,13 +21,19 @@ data.value?.forEach((blog) => {
|
||||
});
|
||||
|
||||
useHead({
|
||||
title: "Categories",
|
||||
title: `Categories - ${siteConfig.siteMeta.title}`,
|
||||
meta: [
|
||||
{
|
||||
name: "description",
|
||||
content: "以下列出了我撰写的文章主题。",
|
||||
},
|
||||
],
|
||||
link: [
|
||||
{
|
||||
rel: "canonical",
|
||||
href: `${siteConfig.siteMeta.url}/${path}`,
|
||||
},
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user