{% extends "base.html" %}

{% block breadcrumbs %}
    / <a href="/">home</a> / <a>blog</a>
{% endblock breadcrumbs %}

{% block title %}
    {{ page.title }}
{% endblock title %}

{% block head %}
    {% set words = page.content | wordcount %}
    {% set desc = page.description ~ " (" ~ words ~ " words)" %}
    <meta name="description" content="{{ desc }}">

    {# embeds (Open Graph Protocol): https://ogp.me #}
    <meta property="og:url" content="{{ page.permalink | safe }}">
    <meta property="og:title" content="{{ page.title }}">
    <meta property="og:description" content="{{ desc }}">
    <meta property="og:type" content="article">
    {# <meta property="article:section" content="Blog"> #}
    <meta property="article:published_time" content="{{ page.date }}">
    <meta property="og:site_name" content="Uninsane">
{% endblock head %}


{% block content %}
    <h1>
        {{ page.title }}
    </h1>
    {% if page.date %}
        <p class="date">{{ page.date | date(format="%Y/%m/%d") }}</p>
    {% else %}
        <p class="date">draft</p>
    {% endif %}

    {{ page.content | safe }}
{% endblock content %}
