mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(blog) support og:image from different domain
This commit is contained in:
parent
614773630e
commit
d76a657d2d
@ -81,7 +81,10 @@ export const head = ({ title, description, banner, noindex = false, keywords }:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (banner) {
|
if (banner) {
|
||||||
banner = `${process.env.BASE_URL}/${banner.replace(/^\//, '')}`;
|
banner = banner.replace(/^\//, '');
|
||||||
|
if (!banner.startsWith('https://')) {
|
||||||
|
banner = `${process.env.BASE_URL}/${banner}`;
|
||||||
|
}
|
||||||
meta.meta.push({ hid: 'og:image', property: 'og:image', content: banner });
|
meta.meta.push({ hid: 'og:image', property: 'og:image', content: banner });
|
||||||
meta.meta.push({ hid: 'twitter:image', property: 'twitter:image', content: banner });
|
meta.meta.push({ hid: 'twitter:image', property: 'twitter:image', content: banner });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user