add embed info

This commit is contained in:
j 2023-08-17 12:27:49 +02:00
parent 4ca97aac04
commit 7a37be546c
2 changed files with 13 additions and 0 deletions

View file

@ -59,6 +59,7 @@ def item(request, id):
):
raise Http404
context['item'] = item
context['url'] = request.build_absolute_uri(item.get_absolute_url())
qs = item.comments.order_by('created')
if not request.user.is_staff:
q = ~Q(published=None)

View file

@ -1,6 +1,18 @@
{% extends "base.html" %}
{% load static sass_tags compress %}
{% block head %}
<title>{{ item.title }} - {{ settings.SITENAME }}</title>
<meta name="title" content="{{ item.title }}"/>
<meta property="og:title" content="{{ item.title }}"/>
{% if item.data.thumbnail %}
<meta content="{{ item.data.thumbnail }}" name="thumbnail"/>
<meta content="{{ item.data.thumbnail }}" name="image_src"/>
<meta property="og:image" content="{{ item.data.thumbnail }}"/>
{% endif %}
{% if url %}
<meta property="og:url" content="{{ url }}"/>
{% endif %}
<meta property="og:site_name" content="{{ settings.SITENAME }}"/>
{% endblock %}
{% block main %}
<div class="content">