Fix the logic which locates the social image and description. It was broken because the template tag {% wagtail_site %} was being misused, and the lookup logic was also fragile.
For all page types that inherit from PromoteMixin, and additionally have an introduction field (which is to say, most pages), the social description now uses introduction as a fallback.
I've been able to do limited testing locally because social metadata validators need a live website to query. Please let me know when this code is deployed to staging and I'll do some more testing.
Fixes https://github.com/ietf-tools/wagtail_website/issues/191.
{% wagtail_site %}
was being misused, and the lookup logic was also fragile.main_image
field.PromoteMixin
, and additionally have anintroduction
field (which is to say, most pages), the social description now usesintroduction
as a fallback.I've been able to do limited testing locally because social metadata validators need a live website to query. Please let me know when this code is deployed to staging and I'll do some more testing.