diff --git a/umap/context_processors.py b/umap/context_processors.py index cd377af4..825d6943 100644 --- a/umap/context_processors.py +++ b/umap/context_processors.py @@ -7,6 +7,7 @@ def settings(request): return { "UMAP_FEEDBACK_LINK": djsettings.UMAP_FEEDBACK_LINK, "SITE_NAME": djsettings.SITE_NAME, + "SITE_URL": djsettings.SITE_URL, "ENABLE_ACCOUNT_LOGIN": djsettings.ENABLE_ACCOUNT_LOGIN, "UMAP_READONLY": djsettings.UMAP_READONLY, "UMAP_DEMO_SITE": djsettings.UMAP_DEMO_SITE, diff --git a/umap/templates/umap/map_detail.html b/umap/templates/umap/map_detail.html index 356a65cf..f854e4e7 100644 --- a/umap/templates/umap/map_detail.html +++ b/umap/templates/umap/map_detail.html @@ -18,6 +18,10 @@ type="application/json+oembed" href="{{ oembed_absolute_uri }}?url={{ quoted_absolute_uri }}&format=json" title="{{ map.name }} oEmbed URL" /> + + + + {% endblock extra_head %} {% block content %} {% block map_init %} diff --git a/umap/tests/test_map_views.py b/umap/tests/test_map_views.py index 7f9299a2..aeb65e5a 100644 --- a/umap/tests/test_map_views.py +++ b/umap/tests/test_map_views.py @@ -847,3 +847,16 @@ def test_oembed_link(client, map, datalayer): f'?url=http%3A%2F%2Ftestserver%2Fen%2Fmap%2Ftest-map_{map.id}&format=json"' ) in response.content.decode() assert 'title="test map oEmbed URL" />' in response.content.decode() + + +def test_ogp_links(client, map, datalayer): + response = client.get(map.get_absolute_url()) + assert response.status_code == 200 + content = response.content.decode() + assert ( + f'' + in content + ) + assert f'' in content + assert f'' in content + assert '' in content