-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
now title tags get generated in the normalizer. not perfect, but should work.
#436 should now be closed. Needs asset update (meta_serlo_mathe.png, meta_serlo_nachhaltigkeit.png, meta_serlo_bio.png). @inyono or @arekkas I created the function getCanonicalLink in the `Normalizer.php` and added a `rel=‘canonical’` link to prevent duplicate content. Could one of you rewrite the function to use the IDs of the object to create short unique links?
@inyono I've structured the code as discussed and rebased it onto the current development branch. There's still an issue though: The Meta-Description field is ignored now. Didn't get it to work atm, and probably won't look at it again until monday. Feel free to take a look, if you want. |
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.
Thanks 👍 Will look over that in detail in the next days, I only noted the thing with images so that I don't forget that ;)
Edit: And the CI works, yay, needs yarn format
|
||
switch ($subject) { | ||
case 'mathematik': | ||
case 'math': |
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.
IMHO: either we add English versions of the images or remove the behaviour for en.serlo.org
for now.
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.
@Knorrke: I removed the handling for subjects on en.serlo.org for now (i.e. the fallback image is used instead). Are you fine with that?
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.
Yeah, that's fine I guess
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.
Refactored some stuff and handled meta images. Regarding the thing we discussed yesterday: IMHO we should make metaDescription
vs. description
explicit, i.e. getDescription
returns the descriptions while (a newly added) getMetaDescription
returns the description for the meta tags. @Knorrke could you add that?
src/module/Normalizer/src/Normalizer/Adapter/AbstractAdapter.php
Outdated
Show resolved
Hide resolved
src/module/Normalizer/src/Normalizer/Adapter/AdapterInterface.php
Outdated
Show resolved
Hide resolved
@@ -38,7 +38,10 @@ public function createService(ServiceLocatorInterface $serviceLocator) | |||
{ | |||
$normalize = new Normalize(); | |||
$normalizer = $serviceLocator->getServiceLocator()->get('Normalizer\Normalizer'); | |||
$instanceManager = $serviceLocator->getServiceLocator()->get('Instance\Manager\InstanceManager'); |
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.
added by @inyono: pass InstanceManager
to Normalizer
so we get a tenant-aware open search
{ | ||
$lang = $this->getSubdomain(); | ||
|
||
if ($lang === 'de' || $lang === 'en') { |
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.
added by @inyono: tenant-aware open search
So like |
Ok, I just don't know how this should work... The meta description is only text, but the fallback is markdown and needs to be rendered. So I probably want to use |
It's done now from my side, thanks again for the help 👍 |
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.
Thanks, awesome 👍 Also thanks for @elbotho for the initial work :)
Changelog
Added
Changed
For #436, #650 and #654 and also adding canonical link tag.
@inyono needs assets and new images in assets (see question in commits)