Ajout des blocs og_description dans les templates pour améliorer le SEO.

This commit is contained in:
mrtoine 2025-12-15 07:29:09 +01:00
parent f1ce9cd218
commit 11dcc6eaa9
3 changed files with 3 additions and 1 deletions

View file

@ -2,6 +2,7 @@
{% block title %}{{ course.name }} : {{ lesson.name }}{% endblock %}
{% block og_title %}{{ course.name }} : {{ lesson.name }}{% endblock %}
{% block description %}{{ lesson.content|truncatewords:20 }}{% endblock %}
{% block og_description %}{{ lesson.content|truncatewords:20 }}{% endblock %}
{% block og_image %}{{ course.thumbnail.url }}{% endblock %}
{% block content %}

View file

@ -2,6 +2,7 @@
{% block title %}{{ course.name }}{% endblock %}
{% block og_title %}{{ course.name }}{% endblock %}
{% block description %}{{ course.description|truncatewords:20 }}{% endblock %}
{% block og_description %}{{ course.description|truncatewords:20 }}{% endblock %}
{% block og_image %}{{ course.thumbnail.url }}{% endblock %}
{% block content %}

View file

@ -15,7 +15,7 @@
<link rel="canonical" href="{% block canonical %}{{ request.build_absolute_uri }}{% endblock %}">
<meta property="og:title" content="{% block og_title %}{{ self.title }}{% endblock %}">
<meta property="og:description" content="{% block description %}Apprendre le développement web et la programmation.{% endblock %}">
<meta property="og:description" content="{% block og_description %}Apprendre le développement web et la programmation.{% endblock %}">
<meta property="og:image" content="{% block og_image %}{% endblock %}">
<meta property="og:url" content="{{ request.build_absolute_uri }}">
<meta property="og:type" content="website">