Replace portal title with entity name

Store a short entity name instead of the full home
heading so orgs can brand portals for sub-entities.
Restore hero i18n composition and keep the English
document title composed from the entity name.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-21 19:06:55 +02:00
parent 0fe814cfe4
commit 0d832508c9
46 changed files with 148 additions and 97 deletions

View File

@@ -9,7 +9,7 @@ type CompliancePortal implements Node {
websiteUrl: String
email: String
headquarterAddress: String
title: String!
entityName: String!
nonDisclosureAgreement: NonDisclosureAgreement @goField(forceResolver: true)

View File

@@ -134,7 +134,8 @@ func compliancePageHeadData() HeadDataFunc {
compliancePageBaseURL := complianceportal.CompliancePortalBaseURLFromContext(r.Context())
description := tc.Title
pageTitle := "Compliance at " + tc.EntityName + "."
description := pageTitle
if tc.Description != nil && *tc.Description != "" {
description = *tc.Description
}
@@ -142,7 +143,7 @@ func compliancePageHeadData() HeadDataFunc {
htmlLang, canonical, hreflang := SEOFromRequest(r)
headData := HeadData{
Title: tc.Title,
Title: pageTitle,
Description: description,
HTMLLang: htmlLang,
OGURL: canonical,

View File

@@ -29,7 +29,7 @@ func NewCompliancePortal(cp *coredata.CompliancePortal) *CompliancePortal {
ID: cp.ID,
Active: cp.Active,
Slug: cp.Slug,
Title: cp.Title,
EntityName: cp.EntityName,
Description: cp.Description,
WebsiteURL: cp.WebsiteURL,
Email: cp.Email,