improve opengraph to video
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
{{ translations.entry_hreflang(article) }}
|
||||
{% endif %}
|
||||
<meta property="og:title" content="{{ article.title }}">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:type" content="video.movie">
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}">
|
||||
<meta property="article:published_time" content="{{ article.date.isoformat() }}">
|
||||
<meta property="video:release_date" content="{{ article.date.isoformat() }}">
|
||||
{% if article.modified %}
|
||||
<meta property="article:modified_time" content="{{ article.modified.isoformat() }}">
|
||||
{% endif %}
|
||||
@@ -35,13 +35,22 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<meta property="og:description" content="{{ article.summary|striptags|escape }}"/>
|
||||
{% if article.og_image %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.og_image }}"/>
|
||||
{% if article.image %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/../wp-content/uploads/article/poster/{{ article.image }}"/>
|
||||
{% elif OPEN_GRAPH_IMAGE %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}"/>
|
||||
{% endif %}
|
||||
<!-- videograph -->
|
||||
{% if article.og_video %}
|
||||
<meta property="og:video" content="{{ article.og_video }}">
|
||||
<meta property="og:video:secure_url" content="{{ article.og_video }}">
|
||||
<meta property="og:video:type" content="video/webm">
|
||||
<meta property="og:video:width" content="400">
|
||||
<meta property="og:video:height" content="300">
|
||||
{% endif %}
|
||||
<!-- /videograph -->
|
||||
{% for tag in article.tags %}
|
||||
<meta property="og:tag" content="{{ tag | escape }}">
|
||||
<meta property="og:video:tag" content="{{ tag | escape }}">
|
||||
{% endfor %}
|
||||
|
||||
{% if article.styles %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}">
|
||||
<head prefix="og: http://ogp.me/ns# {% if article %}article: http://ogp.me/ns/article#{% endif%}">
|
||||
<head prefix="og: http://ogp.me/ns# {% if article %}article: http://ogp.me/ns/video#{% endif%}">
|
||||
{% block head %}
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
Reference in New Issue
Block a user