Add hardcoded FAQPage schema for voting-in-the-uk #1527
Merged
+190
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We think that the search intents around this page mean that users will benefit from a more curated schema. This is intended to be a one of a kind for now, and is obviously time sensitive, hence the somewhat blunt approach.
The content for the FAQPage schema is loaded from a local config file, and presented. It's hard to do this programmatically from the content in the content item because the sections we want don't necessarily map to an h2 and the following paragraphs (for example).
We'll be looking into how to structure our content/apis to make things like this easier in the near future.
I've added a couple of light touch tests to ensure that they aren't broken inadvertently.
We'll be keeping the content in the yaml file in step with the published content until we find a better approach.
https://government-frontend-pr-1527.herokuapp.com/voting-in-the-uk