From ac6287d98519c7972fa8316abd9cf98304a4aa9e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 11 Aug 2024 15:36:56 +0800 Subject: [PATCH] :bug: Fix sitemap isn't use minimal endpoint --- components/{post/Item.vue => PostItem.vue} | 0 pages/posts/[id].vue | 4 +++- pages/users/[...name].vue | 7 +++++++ server/api/sitemap/posts.ts | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) rename components/{post/Item.vue => PostItem.vue} (100%) create mode 100644 pages/users/[...name].vue diff --git a/components/post/Item.vue b/components/PostItem.vue similarity index 100% rename from components/post/Item.vue rename to components/PostItem.vue diff --git a/pages/posts/[id].vue b/pages/posts/[id].vue index 7ee6f96..da9277a 100644 --- a/pages/posts/[id].vue +++ b/pages/posts/[id].vue @@ -97,7 +97,6 @@ useHead({ useSeoMeta({ author: post.value.author.nick, title: title, - publisher: "Solar Network", articlePublishedTime: post.value.publishedAt, description: description, ogTitle: title, @@ -105,6 +104,9 @@ useSeoMeta({ ogUrl: `${useRuntimeConfig().public.siteUrl}${route.fullPath}`, ogImage: firstImage, ogVideo: firstVideo, + ogType: "article", + publisher: "Solar Network", + ogSiteName: "Solsynth Capital", }) const externalOpenLink = computed(() => `${config.public.solianUrl}/posts/view/${route.params.id}`) diff --git a/pages/users/[...name].vue b/pages/users/[...name].vue new file mode 100644 index 0000000..ae2cf42 --- /dev/null +++ b/pages/users/[...name].vue @@ -0,0 +1,7 @@ + + + diff --git a/server/api/sitemap/posts.ts b/server/api/sitemap/posts.ts index 157ca18..2407e13 100644 --- a/server/api/sitemap/posts.ts +++ b/server/api/sitemap/posts.ts @@ -1,7 +1,7 @@ export default defineSitemapEventHandler(async () => { const config = useRuntimeConfig(); - const res = await fetch(`${config.public.solarNetworkApi}/cgi/interactive/posts?take=500`) + const res = await fetch(`${config.public.solarNetworkApi}/cgi/interactive/posts/minimal?take=500`) const result = await res.json() return result.data.map((item: any) => asSitemapUrl({