From 6f82a1beceef4c5cce3722c1313cdac9ec109760 Mon Sep 17 00:00:00 2001 From: userquin Date: Sat, 7 Mar 2026 19:56:16 +0100 Subject: [PATCH 01/19] fix: remove `getKey` from `bluesky-author-profiles.get.ts` endpoint --- nuxt.config.ts | 2 ++ server/api/atproto/bluesky-author-profiles.get.ts | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index 3a4c167ece..4c6aaca5c3 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -205,6 +205,8 @@ export default defineNuxtConfig({ compatibilityDate: '2026-01-31', nitro: { + debug: true, + logLevel: 999, externals: { inline: [ 'shiki', diff --git a/server/api/atproto/bluesky-author-profiles.get.ts b/server/api/atproto/bluesky-author-profiles.get.ts index 1122376d82..6c78413242 100644 --- a/server/api/atproto/bluesky-author-profiles.get.ts +++ b/server/api/atproto/bluesky-author-profiles.get.ts @@ -73,9 +73,9 @@ export default defineCachedEventHandler( { name: 'author-profiles', maxAge: CACHE_MAX_AGE_ONE_DAY, - getKey: event => { - const { authors } = getQuery(event) - return `author-profiles:${authors ?? 'npmx.dev'}` - }, + // getKey: event => { + // const { authors } = getQuery(event) + // return `author-profiles:${authors ?? 'npmx.dev'}` + // }, }, ) From a55191203c9c48c01786710ca9c28ff622c1b317 Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sat, 7 Mar 2026 20:26:59 +0000 Subject: [PATCH 02/19] chore: check logs in og image --- app/components/OgImage/BlogPost.vue | 8 ++++++++ app/components/global/BlogPostFederatedArticles.vue | 2 ++ server/api/atproto/bluesky-author-profiles.get.ts | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 01965a1abf..c169543851 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -1,6 +1,8 @@ From 2025d0f56f6e78ee39e5f3327c60db0db548058e Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sat, 7 Mar 2026 20:36:31 +0000 Subject: [PATCH 04/19] chore: check names in og --- app/components/OgImage/BlogPost.vue | 96 ++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index f2e23722bc..82edefac82 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -17,8 +17,102 @@ const props = withDefaults( }, ) console.log('blog post 2', props) + +const formattedDate = computed(() => { + console.log('blog post 3', props.date) + if (!props.date) return '' + try { + return new Date(props.date).toLocaleDateString('en-US', { + year: 'numeric', + month: 'short', + day: 'numeric', + }) + } catch { + console.log('blog post 4', props.date) + return props.date + } +}) + +const MAX_VISIBLE_AUTHORS = 2 + +const extraCount = computed(() => { + console.log('blog post 6', props.authors) + if (props.authors.length <= 3) return 0 + return props.authors.length - MAX_VISIBLE_AUTHORS +}) + +const formattedAuthorNames = computed(() => { + console.log('blog post 7', props.authors) + const allNames = props.authors.map(a => a.name) + if (allNames.length === 0) return '' + if (allNames.length === 1) return allNames[0] + if (allNames.length === 2) return `${allNames[0]} and ${allNames[1]}` + if (allNames.length === 3) return `${allNames[0]}, ${allNames[1]}, and ${allNames[2]}` + // More than 3: show first 2 + others + const shown = allNames.slice(0, MAX_VISIBLE_AUTHORS) + const remaining = allNames.length - MAX_VISIBLE_AUTHORS + return `${shown.join(', ')} and ${remaining} others` +}) From 94e77e1a90e614a2f8728851421796083277b070 Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sat, 7 Mar 2026 20:40:54 +0000 Subject: [PATCH 05/19] chore: restore names in og --- app/components/OgImage/BlogPost.vue | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 82edefac82..c169543851 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -35,6 +35,20 @@ const formattedDate = computed(() => { const MAX_VISIBLE_AUTHORS = 2 +const getInitials = (name: string) => + name + .split(' ') + .map(n => n[0]) + .join('') + .toUpperCase() + .slice(0, 2) + +const visibleAuthors = computed(() => { + console.log('blog post 5', props.authors) + if (props.authors.length <= 3) return props.authors + return props.authors.slice(0, MAX_VISIBLE_AUTHORS) +}) + const extraCount = computed(() => { console.log('blog post 6', props.authors) if (props.authors.length <= 3) return 0 @@ -94,6 +108,22 @@ const formattedAuthorNames = computed(() => { > + + + + {{ getInitials(author.name) }} + + Date: Sat, 7 Mar 2026 20:45:25 +0000 Subject: [PATCH 06/19] chore: remove initials logic --- app/components/OgImage/BlogPost.vue | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index c169543851..24e430524d 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -35,14 +35,6 @@ const formattedDate = computed(() => { const MAX_VISIBLE_AUTHORS = 2 -const getInitials = (name: string) => - name - .split(' ') - .map(n => n[0]) - .join('') - .toUpperCase() - .slice(0, 2) - const visibleAuthors = computed(() => { console.log('blog post 5', props.authors) if (props.authors.length <= 3) return props.authors @@ -114,7 +106,7 @@ const formattedAuthorNames = computed(() => { class="flex items-center justify-center rounded-full border border-[#050505] bg-[#1a1a1a] overflow-hidden w-12 h-12" :style="{ marginLeft: index > 0 ? '-20px' : '0' }" > - { /> {{ getInitials(author.name) }} - + --> Date: Sat, 7 Mar 2026 20:49:44 +0000 Subject: [PATCH 07/19] chore: check avatars types --- app/components/OgImage/BlogPost.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 24e430524d..0749c87fbd 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -36,7 +36,16 @@ const formattedDate = computed(() => { const MAX_VISIBLE_AUTHORS = 2 const visibleAuthors = computed(() => { - console.log('blog post 5', props.authors) + console.log('blog post 5') + props.authors.map(author => { + console.log( + 'blog post 5.1', + author.avatar, + author.name, + typeof author.avatar, + typeof author.name, + ) + }) if (props.authors.length <= 3) return props.authors return props.authors.slice(0, MAX_VISIBLE_AUTHORS) }) @@ -106,13 +115,13 @@ const formattedAuthorNames = computed(() => { class="flex items-center justify-center rounded-full border border-[#050505] bg-[#1a1a1a] overflow-hidden w-12 h-12" :style="{ marginLeft: index > 0 ? '-20px' : '0' }" > - From 785e70305d08e12caeee6ea1fe68205fdadf321b Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sat, 7 Mar 2026 20:58:34 +0000 Subject: [PATCH 08/19] chore: test img src bypass in blog og --- app/components/OgImage/BlogPost.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 0749c87fbd..3d61595c64 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -35,6 +35,14 @@ const formattedDate = computed(() => { const MAX_VISIBLE_AUTHORS = 2 +const getInitials = (name: string) => + name + .split(' ') + .map(n => n[0]) + .join('') + .toUpperCase() + .slice(0, 2) + const visibleAuthors = computed(() => { console.log('blog post 5') props.authors.map(author => { @@ -117,13 +125,13 @@ const formattedAuthorNames = computed(() => { > - + Date: Sat, 7 Mar 2026 21:01:29 +0000 Subject: [PATCH 09/19] chore: check placeholder img --- app/components/OgImage/BlogPost.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 3d61595c64..395acbbca3 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -125,7 +125,7 @@ const formattedAuthorNames = computed(() => { > From 2673649dc54d7f5739f17b07b7de2eea1d4b6881 Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sat, 7 Mar 2026 21:11:31 +0000 Subject: [PATCH 10/19] chore: check more specified path for avatars in og --- app/components/OgImage/BlogPost.vue | 2 +- app/components/global/BlogPostFederatedArticles.vue | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 395acbbca3..d8721220c7 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -125,7 +125,7 @@ const formattedAuthorNames = computed(() => { > diff --git a/app/components/global/BlogPostFederatedArticles.vue b/app/components/global/BlogPostFederatedArticles.vue index 97d7ad9f5d..82d99c3f7d 100644 --- a/app/components/global/BlogPostFederatedArticles.vue +++ b/app/components/global/BlogPostFederatedArticles.vue @@ -22,9 +22,7 @@ const { resolvedAuthors } = useBlueskyAuthorProfiles(authors.value) // Merge the input data with the fetched avatars const federatedArticles = computed(() => { return props.articles.map((article, index) => { - console.log('blog post federated articles 1') const profile = resolvedAuthors.value[index] - console.log('blog post federated articles 2', profile) return { url: article.url, From 8fd99842e52471886bebe3d92c6a7f1556a592e2 Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sat, 7 Mar 2026 21:20:32 +0000 Subject: [PATCH 11/19] chore: check operations order --- app/components/OgImage/BlogPost.vue | 10 ++-------- modules/blog.ts | 5 +++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index d8721220c7..69b77384a7 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -46,13 +46,7 @@ const getInitials = (name: string) => const visibleAuthors = computed(() => { console.log('blog post 5') props.authors.map(author => { - console.log( - 'blog post 5.1', - author.avatar, - author.name, - typeof author.avatar, - typeof author.name, - ) + console.log('blog post 5', author.avatar, author.name, typeof author.avatar, typeof author.name) }) if (props.authors.length <= 3) return props.authors return props.authors.slice(0, MAX_VISIBLE_AUTHORS) @@ -125,7 +119,7 @@ const formattedAuthorNames = computed(() => { > diff --git a/modules/blog.ts b/modules/blog.ts index cbfa5424ec..bb69ee7f22 100644 --- a/modules/blog.ts +++ b/modules/blog.ts @@ -53,11 +53,15 @@ async function fetchBlueskyAvatars( const hash = crypto.createHash('sha256').update(profile.avatar).digest('hex') const dest = join(imagesDir, `${hash}.jpg`) + console.log('fetch bluesky avatars 1', dest) if (!existsSync(dest)) { const res = await fetch(profile.avatar) + console.log('fetch bluesky avatars 2', profile.avatar) await writeFile(join(imagesDir, `${hash}.jpg`), res.body!) + console.log('fetch bluesky avatars 3', join(imagesDir, `${hash}.jpg`)) } + console.log('fetch bluesky avatars 4', `/blog/avatar/${hash}.jpg`) avatarMap.set(profile.handle, `/blog/avatar/${hash}.jpg`) } } @@ -119,6 +123,7 @@ async function loadBlogPosts(blogDir: string, imagesDir: string): Promise Date: Sat, 7 Mar 2026 21:28:21 +0000 Subject: [PATCH 12/19] chore: check baseurl --- app/components/OgImage/BlogPost.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 69b77384a7..614ddb871e 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -119,7 +119,7 @@ const formattedAuthorNames = computed(() => { > From 8381129153e6c9755c2d16c257b3a219899db8a7 Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sat, 7 Mar 2026 21:39:20 +0000 Subject: [PATCH 13/19] chore: check baseurl on images generation time --- app/components/OgImage/BlogPost.vue | 13 +----------- modules/blog.ts | 21 +++++++++++-------- .../atproto/bluesky-author-profiles.get.ts | 7 ------- 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/app/components/OgImage/BlogPost.vue b/app/components/OgImage/BlogPost.vue index 614ddb871e..01965a1abf 100644 --- a/app/components/OgImage/BlogPost.vue +++ b/app/components/OgImage/BlogPost.vue @@ -1,8 +1,6 @@