We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bbcae8 commit cff2493Copy full SHA for cff2493
1 file changed
src/pages/posts/[...slug]/index.astro
@@ -81,7 +81,11 @@ if (typeof initOgImage === "string") {
81
}
82
83
if (!ogImageUrl && config.features.dynamicOgImage) {
84
- ogImageUrl = `${getPostUrl(post.id, post.filePath, locale)}/index.png`;
+ const postUrl = getPostUrl(post.id, post.filePath, locale).replace(
85
+ /\/+$/,
86
+ ""
87
+ );
88
+ ogImageUrl = `${postUrl}/index.png`;
89
90
91
const ogImage = ogImageUrl
0 commit comments