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:
DanielDerefaka 2026-01-01 11:41:11 +01:00
parent 5e6982c500
commit c9381154a6

View File

@ -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), {