Skip to content

Commit dee553a

Browse files
TheMeinerLPclaude
andcommitted
fix(seo): align blog article canonical URL resolution order
Match baseUrl resolution order with useBlogContent composable to prevent divergent canonical URLs between head links and og:url meta. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ca0c6d2 commit dee553a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pages/blog/[...slug].vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ const previewSocial = computed(() =>
2727
})
2828
)
2929
30-
// Canonical URL for OG tags
31-
const baseUrl = computed(() => site.url || config.public.siteUrl || 'https://onelitefeather.net')
30+
// Canonical URL for OG tags — resolution order matches resolveBaseUrl() in useBlogContent.ts
31+
const baseUrl = computed(() => {
32+
const pub = config.public as { siteUrl?: string }
33+
return pub.siteUrl || site.url || 'https://onelitefeather.net'
34+
})
3235
const canonicalUrl = computed(() =>
3336
blog.value ? (blog.value.canonical || `${baseUrl.value}/${locale.value}/blog/${blog.value.slug}`) : baseUrl.value
3437
)

0 commit comments

Comments
 (0)