This PR only handles the titles, not descriptions. The descriptions will have to be implemented in a subsequent PR.
Link to relevant issue(s), if any
Part of #1533
Description of the changes in this PR
refactor: pass the GlobalConfig instance to the Twig templates, instead of individual configuration settings in separate variables
adapt the Twig templates to use the GlobalConfig instance, and set their title metadata to match the specification
add Cypress tests to verify the title values
Known problems or uncertainties in this PR
this PR doesn't implement long titles (skosmos:serviceNameLong setting) for the landing page, but just uses regular serviceName for the landing page title; implementing long titles is left to another PR
Checklist
[x] phpUnit tests pass locally with my changes
[x] I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
[x] The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
[x] The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)
Reasons for creating this PR
Improve search engine optimization in Skosmos 3 by making the
<title>
values and related metadata (title
,twitter:title
,og:title
) conform to the specification in https://github.com/NatLibFi/Skosmos/issues/1533#issuecomment-2063290242 .This PR only handles the titles, not descriptions. The descriptions will have to be implemented in a subsequent PR.
Link to relevant issue(s), if any
Description of the changes in this PR
Known problems or uncertainties in this PR
Checklist
.sr-only
class, color contrast)