Ich followin die Anweisungen auf Google, dieWas ist der richtige Weg, um Microdata (für Schema.org VideoObject) zu einer Seite in meiner Django App hinzuzufügen?
Markup direkt an den HTML-Code Ihrer Videoseite hinzufügen schema.org sagt. Das Markup wird für Benutzer nicht sichtbar sein und wirken sich nicht auf, wie Ihre Seite
sieht
Also ich folgendes an die Spitze meines Video html
<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
<h2>Video: <span itemprop="name">Title</span></h2>
<meta itemprop="duration" content="T1M33S" />
<meta itemprop="thumbnailUrl" content="thumbnail.jpg" />
<meta itemprop="contentURL" content="http://www.example.com/video123.flv" />
<meta itemprop="embedURL" content="http://www.example.com/videoplayer.swf?video=123" />
<meta itemprop="uploadDate" content="2011-07-05T08:00:00+08:00" />
<meta itemprop="expires" content="2012-01-30T19:00:00+08:00" />
<meta itemprop="height" content="400" />
<meta itemprop="width" content="400" />
<object ...>
<param ...>
<embed type="application/x-shockwave-flash" ...>
</object>
<span itemprop="description">Video description</span>
</div>
bald hinzugefügt, wie ich habe ich sah einen weißen Block mit dem Worttitel oben drauf. Ich sah es und die Anweisungen sagten, ich würde es nicht tun. Fehle ich etwas? Was ist der richtige Weg, dies zu tun?
EDIT: Ich bin mit Django und her meinen Code
{% block content %}
<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
<meta itemprop="duration" content="T1M33S" />
<meta itemprop="thumbnailUrl" content="thumbnail.jpg" />
<meta itemprop="contentURL" content="http://www.example.com/video123.flv" />
<meta itemprop="embedURL" content="http://www.example.com/videoplayer.swf?video=123" />
<meta itemprop="uploadDate" content="2011-07-05T08:00:00+08:00" />
<meta itemprop="expires" content="2012-01-30T19:00:00+08:00" />
<!--<meta itemprop="height" content="400" />-->
<!--<meta itemprop="width" content="400" />-->
<object ...>
<param ...>
<embed type="application/x-shockwave-flash" ...>
</object>
<span itemprop="description">Video description</span>
</div>
<h2 id="detail-h1">
{{ post.title }}
</h2>
{% if post.video %}
<div class="embed-responsive embed-responsive-16by9">
<iframe src="{{post.video_path}}?autoplay=1&autohide=1" class="embed-responsive-item"
frameborder="0" controls="0" allowfullscreen>
</iframe>
</div>
{% else %}
{% if post.image %}
<img src='{{ post.image.url }}' class="img-responsive" width="730px" height="500"/>
{% elif post.image_url %}
<img src="{{post.image_url}}" class="img-responsive">
{% else %}
<p>upload an image</p>
{% endif %}
{% endif %}
<div style="margin-top: 10px; background: white; padding: 10px 10px 10px 10px;">
<span>
<p style="float: left">
{% if post.author %}
Author: {{post.author}}
{% endif %}
</p>
<p style="float: right" id="pub">
{%if post.draft %}<span id="draft">Draft </span>{% endif %} Publicado: {{ post.publish|date }}
</p>
</span>
<p class="tags" style="clear: both">Tags:
{% for tag in post.tags.all %}
<a href="{% url 'blog:post_list_by_tag' tag.slug %}">
{{ tag.name }}
</a>
{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
Schuldzuweisung ' Titel'. Fügen Sie dem Text, in dem Sie Ihren Titel schreiben, das Attribut itemprop hinzu. – bugwheels94
@ user1533609 Ich sehe immer noch das div. Nehme ich alle Meta-Tags und die Titel und die Video Beschreibung. Selbst wenn das nicht in den Anweisungen steht? – nothingness