{% extends "base.html" %}

{% block page_title %}
    <title>{{ meta.title}} - {{ blog.title }}</title>
{% endblock page_title %}

{% block page_meta %}
    <meta name="title" content="{{ meta.title}} | {{ blog.title }}" >
    {% if meta.abstract %}
    <meta name="description" content="{{ meta.abstract|trim }}" >
    {% else %}
    <meta name="description" content="{{ body|striptags|truncate(300,True)|e }}" >
    {% endif %}

    <meta name="author" content="{{ blog.author }}" >
    <meta name="Copyright" content="{{ blog.copyright }}" >

    <meta property="og:site_name" content="{{ blog.title }}">
    <meta property="og:title" content="{{ meta.title}}">
    <meta property="og:type" content="article">
    <meta property="og:url" content="{{meta.url}}">
    <meta property="og:image" content="">
    {% if meta.abstract %}
    <meta property="og:description" content="{{ meta.abstract|trim }}">
    {% else %}
    <meta property="og:description" content="{{ body|striptags|truncate(300, True)|e }}">
    {% endif %}
{% endblock page_meta %}


{% block content %}
    <div class="h-entry">
        <p class="meta">
            <time class="dt-published" datetime="{{ meta.date.strftime("%Y-%m-%dT%H:%M") }}">{{ meta.date.strftime("%a, %d %B %Y %H:%M")  }}</time>
            &mdash; <a href="{{ blog.url }}" class="h-card p-author u-url">{{ blog.author }}</a>
            {% if meta.tags %} &mdash;
                {% for t in meta.tags %}<a href="{{ blog.url }}tag/{{ t }}/">#{{ t }}</a> {% endfor %}
            {% endif %}
        </p>
        <h1 class="p-name"><a href="{{meta.url}}" class="u-url">{% if meta.title %}{{ meta.title }}{% else %}#{% endif %}</a></h1>
	{% if meta.abstract %}<p class="lead">{{ meta.abstract }}</p>{% endif %}
        <div class="e-content">{{ body|safe() }}</div>
    </div>
{% endblock %}
