Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We show the whole of a guide's FAQ schema on each of its chapters. I think this is OK, as long as the URLs that refer to the questions and answers are correct. (We might change this at some point though) The FAQ schema was appending the part slugs to the canonical URL of the page that it was displayed on. This works well for the default page in a guide, but less well for other chapters in the guide. The canonical URL is set (correctly) to [the URL of the chapter](https://tools.ietf.org/html/rfc6596). This means we were generating incorrect URLs. Correct example when viewing default page in a guide: When you view https://www.gov.uk/christmas-bonus you get links in the structured data like: - https://www.gov.uk/christmas-bonus/eligibility - https://www.gov.uk/christmas-bonus/how-to-claim Incorrect example when viewing sub chapter in a guide: When you view https://www.gov.uk/christmas-bonus/eligibility you get links in the structured data like: - https://www.gov.uk/christmas-bonus/eligibility/eligibility - https://www.gov.uk/christmas-bonus/eligibility/how-to-claim This fix should get us links like: - https://www.gov.uk/christmas-bonus/eligibility - https://www.gov.uk/christmas-bonus/how-to-claim
- Loading branch information