Put locale in compliance portal URLs
Path-segment locales make each language crawlable with self canonical and hreflang, while identity.locale persists an explicit choice without client storage or cookie banners. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -134,16 +134,21 @@ func compliancePageHeadData() HeadDataFunc {
|
||||
}
|
||||
|
||||
compliancePageBaseURL := complianceportal.CompliancePortalBaseURLFromContext(r.Context())
|
||||
pageBase := ref.UnrefOrZero(compliancePageBaseURL)
|
||||
htmlLang, canonical, hreflang := SEOFromRequest(r, pageBase)
|
||||
|
||||
description := tc.Title + " Compliance Page"
|
||||
description := tc.Title
|
||||
if tc.Description != nil && *tc.Description != "" {
|
||||
description = *tc.Description
|
||||
}
|
||||
|
||||
headData := HeadData{
|
||||
Title: tc.Title,
|
||||
Description: description,
|
||||
OGURL: ref.UnrefOrZero(compliancePageBaseURL),
|
||||
Title: tc.Title,
|
||||
Description: description,
|
||||
OGURL: pageBase,
|
||||
HtmlLang: htmlLang,
|
||||
CanonicalURL: canonical,
|
||||
Hreflang: hreflang,
|
||||
}
|
||||
|
||||
if tc.LogoFileID != nil && compliancePageBaseURL != nil {
|
||||
|
||||
Reference in New Issue
Block a user