Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor OG image selection and supporting bits #180

Merged
merged 4 commits into from
Sep 3, 2024
Merged

Conversation

haydngreatnews
Copy link
Member

@haydngreatnews haydngreatnews commented Sep 3, 2024

The logic has been moved to a page mixin (out of the template) and updated to use the assigned images, in the order:

  • feed image
  • image/hero image (in this order, but no page type has both)
  • default preview image -- the CDH logo, purpleified if set

There is also room for an image to be explicitly set in the template context (as preview_image), which could be used on plain, non-page-based views, if necessary

@haydngreatnews haydngreatnews merged commit dc9f6cb into main Sep 3, 2024
3 of 5 checks passed
@haydngreatnews haydngreatnews deleted the fix/og-images branch September 3, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants