-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
Quality Gate passedIssues Measures |
@@ -11,7 +11,6 @@ | |||
<meta name="generator" content="Skosmos {{ request.version }}"> | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:serviceName
setting 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:title
metadata 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:title
because it's redundantKnown problems or uncertainties in this PR
Checklist
.sr-only
class, color contrast)