From 3f24a8f551d51b6e51be52c20f1774c5a15b3efe Mon Sep 17 00:00:00 2001 From: vladislavkeblysh Date: Wed, 4 Oct 2023 17:48:26 +0300 Subject: [PATCH] feat: [RGOeX-26106] added correct image for FB sharing --- lms/templates/courseware/course_about.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index 91d7a2a28e57..aff26debd792 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -14,9 +14,20 @@ <%inherit file="../main.html" /> <%block name="headextra"> - ## OG (Open Graph) title and description added below to give social media info to display + <% + site_domain = static.get_value('site_domain', settings.SITE_NAME) + site_protocol = 'https' if settings.HTTPS == 'on' else 'http' + + og_img_url = "{protocol}://{domain}{path}".format( + protocol=site_protocol, + domain=site_domain, + path=course_image_urls['large'] + ) + %> + ## OG (Open Graph) title, image and description added below to give social media info to display ## (https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content#tags) +