mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-25 01:34:51 +01:00
Truncate titles and descriptions when they exceed limits
This commit is contained in:
parent
b08d493823
commit
7a29631a19
@ -1,13 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block headtitle %}{{media_object.title}} - {{PORTAL_NAME}}{% endblock headtitle %}
|
||||
{% block headtitle %}{{media_object.title|add:" - "|add:PORTAL_NAME|truncatechars:64}}{% endblock headtitle %}
|
||||
|
||||
{% block headermeta %}
|
||||
|
||||
<link rel="canonical" href="{{FRONTEND_HOST}}{{media_object.get_absolute_url}}">
|
||||
|
||||
<meta name="description" content="{% if media_object.summary %}{{media_object.summary}}{% else %}{{media_object.description}}{% endif %}">
|
||||
<meta name="description" content="{% if media_object.summary %}{{media_object.summary|truncatechars:160}}{% else %}{{media_object.description|truncatechars:160}}{% endif %}">
|
||||
|
||||
<meta property="og:title" content="{{media_object.title}} - {{PORTAL_NAME}}">
|
||||
<meta property="og:url" content="{{FRONTEND_HOST}}{{media_object.get_absolute_url}}">
|
||||
|
Loading…
Reference in New Issue
Block a user