Fix portal SEO, Korean copy, and favicon
Custom-domain base URLs included the request path, so canonical/hreflang doubled routes; emit SEO links only with an absolute origin. Rewrite Korean mismatch strings to avoid literal particle parentheses, rename HtmlLang to HTMLLang, and ship public favicons so Vite no longer 404s the fallback icon. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -134,8 +134,6 @@ func compliancePageHeadData() HeadDataFunc {
|
||||
}
|
||||
|
||||
compliancePageBaseURL := complianceportal.CompliancePortalBaseURLFromContext(r.Context())
|
||||
pageBase := ref.UnrefOrZero(compliancePageBaseURL)
|
||||
htmlLang, canonical, hreflang := SEOFromRequest(r, pageBase)
|
||||
|
||||
description := tc.Title
|
||||
if tc.Description != nil && *tc.Description != "" {
|
||||
@@ -143,12 +141,18 @@ func compliancePageHeadData() HeadDataFunc {
|
||||
}
|
||||
|
||||
headData := HeadData{
|
||||
Title: tc.Title,
|
||||
Description: description,
|
||||
OGURL: pageBase,
|
||||
HtmlLang: htmlLang,
|
||||
CanonicalURL: canonical,
|
||||
Hreflang: hreflang,
|
||||
Title: tc.Title,
|
||||
Description: description,
|
||||
}
|
||||
|
||||
// Canonical / hreflang / og:url must be absolute. Without a portal
|
||||
// origin in context, skip them rather than emit relative paths.
|
||||
if pageBase := ref.UnrefOrZero(compliancePageBaseURL); pageBase != "" {
|
||||
htmlLang, canonical, hreflang := SEOFromRequest(r, pageBase)
|
||||
headData.HTMLLang = htmlLang
|
||||
headData.OGURL = canonical
|
||||
headData.CanonicalURL = canonical
|
||||
headData.Hreflang = hreflang
|
||||
}
|
||||
|
||||
if tc.LogoFileID != nil && compliancePageBaseURL != nil {
|
||||
|
||||
Reference in New Issue
Block a user