Add metatags to course page

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent b20ebcb373
commit b8b61bbcb4
  1. 11
      apps/course/templates/course/course.html
  2. 6
      project/templates/lilcity/index.html

@ -3,7 +3,16 @@
{% load data_liked from data_liked %}
{% load rupluralize from plural %}
{% block title %}{{ course.title }} - {{ block.super }}{% endblock title %}
{% block description %}{{ course.title }} - {{ block.super }}{% endblock description%}
{% comment %} seo tags {% endcomment %}
{% block description %}{{ course.short_description }}{% endblock description%}
{% block twurl %}{{ request.build_absolute_uri }}{% endblock twurl %}
{% block ogtitle %}{{ course.title }} - {{ block.super }}{% endblock ogtitle %}
{% block ogurl %}{{ request.build_absolute_uri }}{% endblock ogurl %}
{% if course.cover %}
{% block ogimage %}{{ request.build_absolute_uri }}{{ course.cover.url }}{% endblock ogimage %}
{% endif %}
{% block ogdescription %}{{ course.short_description }}{% endblock ogdescription %}
{% block content %}
<div class="section section_border">
<div class="section__center center center_sm">

@ -19,10 +19,10 @@
<!--Twitter Card data-->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{% block twurl %}{{ request.build_absolute_uri }}{% endblock twurl %}">
<meta name="twitter:title" content="{% block twtitle %}Онлайн-курсы LilCity{% endblock twtitle %}">
<meta name="twitter:description" content="{% block twdescription %}Онлайн-курсы LilCity{% endblock twdescription %}">
{% comment %} <meta name="twitter:title" content="{% block twtitle %}Онлайн-курсы LilCity{% endblock twtitle %}"> {% endcomment %}
{% comment %} <meta name="twitter:description" content="{% block twdescription %}Онлайн-курсы LilCity{% endblock twdescription %}"> {% endcomment %}
{% comment %} <meta name="twitter:creator" content="@author_handle"> {% endcomment %}
<meta name="twitter:image" content="{% block twimage %}{{ request.build_absolute_uri }}{% static 'img/video-1.jpg' %}{% endblock twimage %}">
{% comment %} <meta name="twitter:image" content="{% block twimage %}{{ request.build_absolute_uri }}{% static 'img/video-1.jpg' %}{% endblock twimage %}"> {% endcomment %}
<!--Open Graph data-->
<meta property="og:title" content="{% block ogtitle %}Онлайн-курсы LilCity{% endblock ogtitle %}">
{% comment %} <meta property="og:type" content="article"> {% endcomment %}

Loading…
Cancel
Save