Skip to content

Commit 7f0692d

Browse files
vladislavkeblyshihor-romaniuk
authored andcommitted
feat: [RGOeX-26106] added correct image for FB sharing
1 parent ee30f1b commit 7f0692d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lms/templates/courseware/course_about.html

+12-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,20 @@
1414

1515
<%inherit file="../main.html" />
1616
<%block name="headextra">
17-
## OG (Open Graph) title and description added below to give social media info to display
17+
<%
18+
site_domain = static.get_value('site_domain', settings.SITE_NAME)
19+
site_protocol = 'https' if settings.HTTPS == 'on' else 'http'
20+
21+
og_img_url = "{protocol}://{domain}{path}".format(
22+
protocol=site_protocol,
23+
domain=site_domain,
24+
path=course_image_urls['large']
25+
)
26+
%>
27+
## OG (Open Graph) title, image and description added below to give social media info to display
1828
## (https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content#tags)
1929
<meta property="og:title" content="${course.display_name_with_default}" />
30+
<meta property="og:image" content="${og_img_url}" />
2031
<meta property="og:description" content="${get_course_about_section(request, course, 'short_description')}" />
2132
</%block>
2233

0 commit comments

Comments
 (0)