-
Notifications
You must be signed in to change notification settings - Fork 23
FIX: Ensure that canonical URLs don’t redirect elsewhere. #152
Conversation
FYI this is in support of swiftype search on docs. Should this be a 2.1 release or a 3.0? |
We use this module in cwp.govt.nz, which doesn't use SwiftType. I personally think that tailoring this module for a specific third party search provider is a mistake, but if the changes are semantically correct across the board then it's OK I suppose. I'll schedule some time to look at how this will affect the CWP website. |
It's not tailoring it for a specific third-party search provider — it's fixing things about it that violate HTTP that Google is a little more forgiving of. |
Cool, will Google continue to honour it after this change? |
The biggest difference is that the short URLs shown here will likely have a version number put in them, eg When a new major version comes out they'll migrate to those via permanent redirectly and newly assigned canonical URLs. |
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 pretty good, just a question about the deprecation
Thanks – is this ready for merge now from your perspective? |
I'm happy for you to merge on green, your change looks fine. |
Redirecting canonical URLs violate HTTP rules and break some search spiders including Swiftype. As part of this change, DocumentationPage loses responsibility for calculating canonical URLs. I’ve opted to leave the methods in there but they will throw warnings. Fixes silverstripe/doc.silverstripe.org#181
… deprecated and should not be used
Switched branch to 2 |
Yep, go for gold. I've also given @lexakami contributor access to merge this for something she's working on too. |
Redirecting canonical URLs violate HTTP rules and break some search
spiders including Swiftype.
As part of this change, DocumentationPage loses responsibility for
calculating canonical URLs. I’ve opted to leave the methods in there
but they will throw warnings.
Fixes silverstripe/doc.silverstripe.org#181
To do: