From b8b61bbcb42002b93a0298d4f744b4ebd200b192 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Tue, 13 Feb 2018 17:41:50 +0300 Subject: [PATCH] Add metatags to course page --- apps/course/templates/course/course.html | 11 ++++++++++- project/templates/lilcity/index.html | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index 1b927e5d..80b2993a 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.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 %}
diff --git a/project/templates/lilcity/index.html b/project/templates/lilcity/index.html index dd1fd9f7..d9adc061 100644 --- a/project/templates/lilcity/index.html +++ b/project/templates/lilcity/index.html @@ -19,10 +19,10 @@ - - + {% comment %} {% endcomment %} + {% comment %} {% endcomment %} {% comment %} {% endcomment %} - + {% comment %} {% endcomment %} {% comment %} {% endcomment %}