wellcomecollection.org
wellcomecollection.org copied to clipboard
Update link resolver
What does this change?
For #11074
- Updates the link resolver function to use the uid instead of id
- Replaces hardcoded urls with the linkResolver function where is wasn't being used
- Tries to fetch pages by uid first rather than id, as these are now more likely to be successful
- Updates relevant tests
How to test
- Click on links on the website site (breadcrumbs, cards etc.). The links should contain the human readable uid instead of the id.
- Preview pages from Prismic, the urls should contain the human readable uid instead of the id.
How can we measure success?
Human readable uid is present in the url of a page rather than the id of the document
Have we considered potential risks?
- I may have missed some hardcoded urls (If so they will still work until we stop fetching pages by id).