update
This commit is contained in:
@@ -1,15 +1,23 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import Fuse from "fuse.js";
|
import Fuse from "fuse.js";
|
||||||
import { formatDate } from "~/utils/helper";
|
import { formatDate } from "~/utils/helper";
|
||||||
|
import siteConfig from "~/config";
|
||||||
|
const { path } = useRoute();
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: "Archive",
|
title: `Archive - ${siteConfig.siteMeta.title}`,
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "浏览所有已发布的文章,轻松找到您感兴趣的内容。",
|
content: "浏览所有已发布的文章,轻松找到您感兴趣的内容。",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
link: [
|
||||||
|
{
|
||||||
|
rel: "canonical",
|
||||||
|
href: `${siteConfig.siteMeta.url}/${path}`,
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data } = await useAsyncData("all-archive-post", () =>
|
const { data } = await useAsyncData("all-archive-post", () =>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import siteConfig from "~/config";
|
||||||
|
|
||||||
// import type { BlogPost } from "@/types/blog";
|
// import type { BlogPost } from "@/types/blog";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
@@ -39,11 +41,17 @@ const formattedData = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `Category: ${category.value}`,
|
title: `Category -${siteConfig} ${category.value}`,
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
name: "description",
|
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>
|
<script lang="ts" setup>
|
||||||
|
import siteConfig from "~/config";
|
||||||
|
const { path } = useRoute();
|
||||||
|
|
||||||
const { data } = await useAsyncData("all-blog-post-by-category", () =>
|
const { data } = await useAsyncData("all-blog-post-by-category", () =>
|
||||||
queryCollection("content").select("path", "categories").where("published", "=", true).all(),
|
queryCollection("content").select("path", "categories").where("published", "=", true).all(),
|
||||||
);
|
);
|
||||||
@@ -18,13 +21,19 @@ data.value?.forEach((blog) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: "Categories",
|
title: `Categories - ${siteConfig.siteMeta.title}`,
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "以下列出了我撰写的文章主题。",
|
content: "以下列出了我撰写的文章主题。",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
link: [
|
||||||
|
{
|
||||||
|
rel: "canonical",
|
||||||
|
href: `${siteConfig.siteMeta.url}/${path}`,
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<MainHero />
|
<MainHero />
|
||||||
|
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<div class="container max-w-7xl mx-auto text-zinc-600 px-4 py-8 relative z-10">
|
<div class="container flex max-w-7xl mx-auto text-zinc-600 px-4 py-8 relative z-10">
|
||||||
<MainRecent />
|
<MainRecent />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import siteConfig from "~/config";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const tag = computed(() => {
|
const tag = computed(() => {
|
||||||
@@ -40,11 +41,17 @@ const formattedData = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `Tag: ${tag.value}`,
|
title: `Tag - ${siteConfig.siteMeta.title}: ${tag.value}`,
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: `Explore all posts tagged with ${tag.value}`,
|
content: `你可以在这里找到所有关于 ${tag.value} 的文章。`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
link: [
|
||||||
|
{
|
||||||
|
rel: "canonical",
|
||||||
|
href: `${siteConfig.siteMeta.url}/${route.path}`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import siteConfig from "~/config";
|
||||||
|
const { path } = useRoute();
|
||||||
|
|
||||||
const { data } = await useAsyncData("all-blog-post-by-tags", () =>
|
const { data } = await useAsyncData("all-blog-post-by-tags", () =>
|
||||||
queryCollection("content").select("path", "tags").where("published", "=", true).all(),
|
queryCollection("content").select("path", "tags").where("published", "=", true).all(),
|
||||||
);
|
);
|
||||||
@@ -18,13 +21,19 @@ data.value?.forEach((blog) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: "Tags",
|
title: `Tags - ${siteConfig.siteMeta.title}`,
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
name: "description",
|
name: "description",
|
||||||
content: "浏览所有我写过的文章的标签。",
|
content: "浏览所有我写过的文章的标签。",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
link: [
|
||||||
|
{
|
||||||
|
rel: "canonical",
|
||||||
|
href: `${siteConfig.siteMeta.url}/${path}`,
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user