This commit is contained in:
2026-01-16 14:32:54 +08:00
parent e8f4e7880a
commit 58fc5b8936
6 changed files with 49 additions and 8 deletions

View File

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