Отображение предпросмотра

master
Антон Касимов 2019-08-02 17:39:12 +03:00
parent 412019d39f
commit 61ad931508
2 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{%- import 'macros.jinja2' as macros -%}
<!DOCTYPE html>
<html lang="{{request.locale_name.replace('_', '-')}}">
<html lang="{{request.locale_name.replace('_', '-')}}" prefix="og: http://ogp.me/ns#">
<head>
{%- block head %}
<title>{{title}}</title>
@ -10,8 +10,7 @@
<meta name="description" content="{{description}}">
<meta name="generator" content="flatfilecms">
<link rel="icon" type="image/png" href="/static/img/favicon.png">
{%- if amphtml is defined %}
<link rel="amphtml" href="{{amphtml}}">
{%- if amphtml is defined %} <link rel="amphtml" href="{{amphtml}}">
{%- endif %}
{%- if feed is defined %}
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="{{feed['links']['atom']}}">
@ -33,9 +32,9 @@
{%- if author and 'twitter' in author %}
<meta name="twitter:creator" content="@{{author['twitter']}}">
{%- endif %}
{%- if image %}
<meta name="twitter:image" content="{{image}}">
<meta property="og:image" content="{{image}}" />
{%- if preview or image %}
<meta name="twitter:image" content="{{preview|default(image)}}">
<meta property="og:image" content="{{preview|default(image)}}" />
<meta name="twitter:card" content="summary_large_image">
{%- else %}
<meta name="twitter:card" content="summary">

View File

@ -14,6 +14,9 @@
<main class="py-4">
<article class="container">
{% block content %}
{% if summary %}
<div class="alert alert-info" role="alert">{{summary}}</div>
{% endif %}
{% if content %}
{{content|markdown}}
{% endif %}