add embed info
This commit is contained in:
parent
4ca97aac04
commit
7a37be546c
2 changed files with 13 additions and 0 deletions
|
@ -59,6 +59,7 @@ def item(request, id):
|
||||||
):
|
):
|
||||||
raise Http404
|
raise Http404
|
||||||
context['item'] = item
|
context['item'] = item
|
||||||
|
context['url'] = request.build_absolute_uri(item.get_absolute_url())
|
||||||
qs = item.comments.order_by('created')
|
qs = item.comments.order_by('created')
|
||||||
if not request.user.is_staff:
|
if not request.user.is_staff:
|
||||||
q = ~Q(published=None)
|
q = ~Q(published=None)
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load static sass_tags compress %}
|
{% load static sass_tags compress %}
|
||||||
{% block head %}
|
{% 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 %}
|
{% endblock %}
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
Loading…
Reference in a new issue