feat(status-page): add og:type and og:image Open Graph meta tags
Added additional Open Graph meta tags to status pages for better social media sharing: - og:type (set to "website") - og:image (uses the status page icon if configured) This complements the existing og:title and og:description tags. Fixes #6514
This commit is contained in:
parent
5e6982c500
commit
c9381154a6
@ -132,6 +132,14 @@ class StatusPage extends BeanModel {
|
||||
let ogDescription = $("<meta property=\"og:description\" content=\"\" />").attr("content", description155);
|
||||
head.append(ogDescription);
|
||||
|
||||
let ogType = $("<meta property=\"og:type\" content=\"website\" />");
|
||||
head.append(ogType);
|
||||
|
||||
if (statusPage.icon) {
|
||||
let ogImage = $("<meta property=\"og:image\" content=\"\" />").attr("content", statusPage.icon);
|
||||
head.append(ogImage);
|
||||
}
|
||||
|
||||
// Preload data
|
||||
// Add jsesc, fix https://github.com/louislam/uptime-kuma/issues/2186
|
||||
const escapedJSONObject = jsesc(await StatusPage.getStatusPageData(statusPage), {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user