From 6607c8b185be0ca86b0d34133a36c5327889d282 Mon Sep 17 00:00:00 2001 From: Joachim Date: Sat, 19 Jun 2021 11:54:19 +0200 Subject: [PATCH] Better handling of absolute URLs with domain + scheme --- bookwyrm/context_processors.py | 3 --- bookwyrm/templates/snippets/opengraph_images.html | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/bookwyrm/context_processors.py b/bookwyrm/context_processors.py index f2661a19..79a11383 100644 --- a/bookwyrm/context_processors.py +++ b/bookwyrm/context_processors.py @@ -11,9 +11,6 @@ def site_settings(request): # pylint: disable=unused-argument return { "site": models.SiteSettings.objects.get(), "active_announcements": models.Announcement.active_announcements(), - "static_url": settings.STATIC_URL, - "media_url": settings.MEDIA_URL, - "static_path": settings.STATIC_PATH, "media_path": settings.MEDIA_PATH, "preview_images_enabled": settings.ENABLE_PREVIEW_IMAGES, "request_protocol": request_protocol, diff --git a/bookwyrm/templates/snippets/opengraph_images.html b/bookwyrm/templates/snippets/opengraph_images.html index bb3fde3a..0c0f16a4 100644 --- a/bookwyrm/templates/snippets/opengraph_images.html +++ b/bookwyrm/templates/snippets/opengraph_images.html @@ -1,12 +1,12 @@ {% if preview_images_enabled is True %} {% if image %} - - + + {% else %} - - + + {% endif %} {% else %} - - + + {% endif %}