json-ld fix
All checks were successful
Deploy / build-deploy (push) Successful in 4m6s

This commit is contained in:
Jorijn van der Graaf 2026-08-30 22:18:24 +02:00
commit eb655b24b6

View file

@ -1808,6 +1808,12 @@ export RenderedPage RenderAbout(const LegalPage& about) {
page.meta.canonical = "/about"; page.meta.canonical = "/about";
// dateModified is real metadata, not decoration: profile-page consumers // dateModified is real metadata, not decoration: profile-page consumers
// read it to judge freshness, and the content already tracks the date. // read it to judge freshness, and the content already tracks the date.
// Google's ProfilePage validator wants a full ISO 8601 datetime, not a
// bare date, so the date-only field gets a time appended here rather
// than storing one it doesn't have. Midnight UTC, because the site's
// dates are Dutch-local (UTC+1/+2, always ahead): midnight UTC falls on
// the same local calendar day year-round, where a fixed +02:00 would
// land winter dates on the previous local day.
page.meta.jsonLd = std::format( page.meta.jsonLd = std::format(
R"({{"@context":"https://schema.org","@type":"ProfilePage","dateModified":{},)" R"({{"@context":"https://schema.org","@type":"ProfilePage","dateModified":{},)"
R"("mainEntity":{{)" R"("mainEntity":{{)"
@ -1839,7 +1845,7 @@ export RenderedPage RenderAbout(const LegalPage& about) {
R"("sameAs":["https://invent.kde.org/themightycat",)" R"("sameAs":["https://invent.kde.org/themightycat",)"
R"("https://forgejo.catcrafts.net/jorijnvdgraaf",)" R"("https://forgejo.catcrafts.net/jorijnvdgraaf",)"
R"("https://ani.social/u/TheMightyCat"]}}}})", R"("https://ani.social/u/TheMightyCat"]}}}})",
JsonStr(about.updated)); JsonStr(about.updated + "T00:00:00Z"));
page.main = Format( page.main = Format(
R"(<header class="page-header">)" R"(<header class="page-header">)"
R"(<h1 class="page-header__title">{}</h1>)" R"(<h1 class="page-header__title">{}</h1>)"