wellcomecollection / wellcomecollection.org

🪟 Wellcome Collection's website and services that support it
https://wellcomecollection.org
MIT License
39 stars 5 forks source link

Use predefined values for site-sections in Prismic rather than tags #11271

Open davidpmccormick opened 1 month ago

davidpmccormick commented 1 month ago

What?

We're in the process of replacing /pages/ with whichever site-section a page has been tagged with in Prismic (#11248).

In the future, if we change our site-sections, this would require a migration to also update the associated tags.

A more future-proof to consider moving towards might be updating Prismic document content models to include a linked SiteSection where the vocabulary is controlled, and if an item is edited, that edit will automatically propagate to all necessary pages without requiring a migration.

Why?

Maintainability

rcantin-w commented 1 month ago

I'm still into this idea but we'll have to see if we can still use a filter here to get the correct page Route: https://github.com/wellcomecollection/wellcomecollection.org/pull/11283