diff --git a/app/app.vue b/app/app.vue index 34fc1d5c01..03fc939fb5 100644 --- a/app/app.vue +++ b/app/app.vue @@ -128,9 +128,17 @@ if (import.meta.client) { } } -// title and description will be inferred -// this will be overridden by upstream pages that use different templates -defineOgImage('Page.takumi', {}, { alt: 'npmx — a fast, modern browser for the npm registry' }) +const isBlogPostRoute = computed(() => { + return route.path.startsWith('/blog/') && route.path !== '/blog/' +}) + +// This is a priority bug that when we set og:image at the component level via useSeoMeta, +// it is ignored and the image from app.vue is written over it. +if (!isBlogPostRoute.value) { + // title and description will be inferred + // this will be overridden by upstream pages that use different templates + defineOgImage('Page.takumi', {}, { alt: 'npmx — a fast, modern browser for the npm registry' }) +}