Skip to content

Commit

Permalink
DSRC-71: OG/Social Sharing (#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored Aug 8, 2024
1 parent 0967687 commit 8d108bb
Show file tree
Hide file tree
Showing 37 changed files with 1,513 additions and 466 deletions.
2 changes: 1 addition & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"wagtailmedia",
"wagtail.contrib.settings",
"generic_chooser",
"wagtailmetadata",
"wagtailmetadata", # TODO: Remove this package when we reset migrations and remove the dependency from the pyproject.toml
"modelcluster",
"taggit",
"django.contrib.admin",
Expand Down
74 changes: 38 additions & 36 deletions etna/api/tests/expected_results/article.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,48 @@
},
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/article_index/article/"
"url": "/article_index/article/",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 12,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 12,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"width": 100,
"height": 100
}
},
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null
},
"title": "article",
"global_alert": null,
"type_label": "The story of",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 12,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_HJzpFFv.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_HJzpFFv.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_q1PKELE.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_q1PKELE.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 12,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_dN8zZYf.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_dN8zZYf.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_8zcBeAq.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_8zcBeAq.webp",
"width": 100,
"height": 100
}
},
"facebook_og_image": null,
"twitter_og_image": null,
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
Expand Down
74 changes: 38 additions & 36 deletions etna/api/tests/expected_results/article_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,48 @@
},
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/article_index/"
"url": "/article_index/",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 11,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 11,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"width": 100,
"height": 100
}
},
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null
},
"title": "article_index",
"global_alert": null,
"type_label": "Article index",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 11,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_4ShM0BL.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_4ShM0BL.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_7hLyRgB.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_7hLyRgB.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 11,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_faOjnDM.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_faOjnDM.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_ppQbvU2.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_ppQbvU2.webp",
"width": 100,
"height": 100
}
},
"facebook_og_image": null,
"twitter_og_image": null,
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
Expand Down
74 changes: 38 additions & 36 deletions etna/api/tests/expected_results/arts.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,44 @@
},
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/arts/"
"url": "/arts/",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 2,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 2,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"width": 100,
"height": 100
}
},
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null
},
"title": "arts",
"hero_image_caption": "<p>Hero image caption</p>",
Expand Down Expand Up @@ -69,41 +106,6 @@
},
"global_alert": null,
"type_label": "Topic",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 2,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 2,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"width": 100,
"height": 100
}
},
"facebook_og_image": null,
"twitter_og_image": null,
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
Expand Down
74 changes: 38 additions & 36 deletions etna/api/tests/expected_results/author.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,44 @@
},
"privacy": "public",
"last_published_at": "2000-01-01T00:00:00Z",
"url": "/people/author/"
"url": "/people/author/",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 10,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_Qqqrhoo.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_EW7Ow5o.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 10,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_3mqgkw3.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_iIlAHIz.webp",
"width": 100,
"height": 100
}
},
"search_image": null,
"twitter_og_title": null,
"twitter_og_description": null,
"twitter_og_image": null
},
"title": "author",
"global_alert": {
Expand All @@ -32,41 +69,6 @@
"uid": ALERT_UID
},
"type_label": "Person",
"teaser_text": "Teaser text",
"teaser_image": {
"id": 10,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_bcFMPn8.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-600x400.format-jpeg.jpegquality-60_bcFMPn8.jpg",
"width": 100,
"height": 68
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_ljNBufq.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-600x400.format-webp.webpquality-60_ljNBufq.webp",
"width": 100,
"height": 68
}
},
"teaser_image_square": {
"id": 10,
"title": "An image",
"jpeg": {
"url": "/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_h0sQhSU.jpg",
"full_url": "https://nationalarchives.gov.uk/media/images/example.2e16d0ba.fill-512x512.format-jpeg.jpegquality-60_h0sQhSU.jpg",
"width": 100,
"height": 100
},
"webp": {
"url": "/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_g9tHw4i.webp",
"full_url": "https://nationalarchives.gov.uk/media/images/exampl.2e16d0ba.fill-512x512.format-webp.webpquality-60_g9tHw4i.webp",
"width": 100,
"height": 100
}
},
"facebook_og_image": null,
"twitter_og_image": null,
"mourning_notice": {
"title": "Test title",
"message": "<p>Test message</p>"
Expand Down
Loading

0 comments on commit 8d108bb

Please sign in to comment.