SEO: long title on landing page (skosmos:serviceNameLong configuration setting)#1644
SEO: long title on landing page (skosmos:serviceNameLong configuration setting)#1644
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1644 +/- ##
============================================
+ Coverage 70.59% 70.62% +0.02%
- Complexity 1643 1645 +2
============================================
Files 32 32
Lines 4316 4320 +4
============================================
+ Hits 3047 3051 +4
Misses 1269 1269 ☔ View full report in Codecov by Sentry. |
|
| <meta name="title" content="{{ block('title') }}"> | ||
| <meta property="og:title" content="{{ block('title') }}"> | ||
| <meta name="twitter:title" content="{{ block('title') }}"> | ||
| <meta name="twitter:card" content="summary"> |
There was a problem hiding this comment.
Now that we're getting rid of twitter:title in favour of og:title, we could also change twitter:card to og:type. I reckon the domain of og:type fits skosmos pages better than the domain of twitter:card.
joelit
left a comment
There was a problem hiding this comment.
Looks good to me!
I would use this PR (or make a new one) to also change twitter:card to og:type to make sure the SE crawler can parse the metadata in the future.
I think it's out of scope for this PR, which is about titles/names. But I added this to the checklist in the main issue: #1533 (comment) Merging this as-is. |



Reasons for creating this PR
This PR makes it possible to set a long name for the service using a new setting
skosmos:serviceNameLong. This name will be used as the<title>(and related metadata elements important for SEO) on the landing page. The setting is multilingual, so it is possible to set different names for different UI languages. If not set, the value of theskosmos:serviceNamesetting is used as a fallback.I also adjusted the
BaseConfig.getLiteral()fallback mechanism in case there is no configuration value in the requested language. In that case it picked an arbitrary value that could be in any other language. I adjusted the mechanism so it only falls back to a value without a language tag, but not to another language which could be surprising.There's also a small change to drop
twitter:titlemetadata because it turns out it's completely redundant according to Twitter/X developer docs when we already haveog:title.Link to relevant issue(s), if any
Description of the changes in this PR
twitter:titlebecause it's redundantKnown problems or uncertainties in this PR
Checklist
.sr-onlyclass, color contrast)