Skip to content

Commit

Permalink
feat: [RGOeX-26106] added correct image for FB sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislavkeblysh authored and ihor-romaniuk committed Aug 13, 2024
1 parent 3ec40ea commit 28a940c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lms/templates/courseware/course_about.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<meta property="og:title" content="${course.display_name_with_default}" />
<meta property="og:image" content="${og_img_url}" />
<meta property="og:description" content="${get_course_about_section(request, course, 'short_description')}" />
</%block>

Expand Down

0 comments on commit 28a940c

Please sign in to comment.