Use an event's category image for OpenGraph image when available

This commit is contained in:
Michael Hall 2018-04-02 22:51:19 -04:00
parent 2840c3445d
commit 4ba3376d19

View file

@ -8,7 +8,11 @@
<meta property="og:type" content="website" />
<meta property="og:title" content="{{event.name}}" />
<meta property="og:description" content="{{event.summary|jsencode}}" />
{% if event.team.category %}
<meta property="og:image" content="{{event.team.category.img_url}}" />
{% else %}
<meta property="og:image" content="https://gettogether.community{% static 'img/team_placeholder.png' %}" />
{% endif %}
<link rel="canonical" href="{{event.get_full_url}}">
{% endblock %}