Improve description tag generation

This commit is contained in:
rubenwardy
2023-04-30 00:53:55 +01:00
parent c2ab4ac308
commit 9fa42df385
8 changed files with 50 additions and 34 deletions

View File

@@ -7,14 +7,14 @@
{{ package.title }}
{% endblock %}
{% block description -%}
{{ package.short_desc }}
{% endblock %}
{% block headextra %}
<meta name="og:title" content="{{ package.title }}"/>
<meta name="og:description" content="{{ package.short_desc }}"/>
<meta name="description" content="{{ package.short_desc }}"/>
<meta name="og:url" content="{{ package.getURL("packages.view", absolute=True) }}"/>
{% if package.getThumbnailURL(3, True) %}
<meta name="og:image" content="{{ package.getThumbnailURL(3, True) }}"/>
{% endif %}
{% if package.getThumbnailURL(3, True) -%}
<meta name="og:image" content="{{ package.getThumbnailURL(3, True) }}"/>
{%- endif %}
{% endblock %}
{% block scriptextra %}