{% extends "base.html" %} {% block og_title %}{{ title }}{% endblock %} {% block og_description %}{% if description %}{{ description[:160] }}{% else %}{{ content | striptags | truncate(160) }}{% endif %}{% endblock %} {% block og_type %}article{% endblock %} {% block og_url %}https://kennethreitz.org{{ request.path }}{% endblock %} {% block twitter_title %}{{ title }}{% endblock %} {% block twitter_description %}{% if description %}{{ description[:160] }}{% else %}{{ content | striptags | truncate(160) }}{% endif %}{% endblock %} {% block description %}{% if description %}{{ description }}{% else %}{{ content | striptags | truncate(200) }}{% endif %}{% endblock %} {% block schema_type %}Article{% endblock %} {% block schema_name %}{{ title }}{% endblock %} {% block schema_url %}{{ current_path }}{% endblock %} {% block schema_description %}{% if metadata.description %}{{ metadata.description }}{% else %}{{ title }} - An essay by Kenneth Reitz{% endif %}{% endblock %} {% block schema_extra %}, "headline": "{{ title }}", "articleSection": "{% if 'artificial-intelligence' in current_path %}AI & Consciousness{% elif 'essays' in current_path %}Essays{% else %}Writing{% endif %}", "wordCount": {{ (content | length / 5) | int }}, {% if metadata and metadata.date %} "datePublished": "{{ metadata.date[0] if metadata.date is iterable and metadata.date is not string else metadata.date }}", "dateModified": "{{ metadata.date[0] if metadata.date is iterable and metadata.date is not string else metadata.date }}", {% endif %} "keywords": [ "{% if 'artificial-intelligence' in current_path %}artificial intelligence, consciousness, philosophy{% elif 'mental-health' in current_path %}mental health, bipolar disorder, tech industry{% elif 'essays' in current_path %}technology, software development, python{% else %}writing, thoughts{% endif %}" ], "mainEntityOfPage": { "@type": "WebPage", "@id": "https://kennethreitz.org{{ current_path }}" }{% endblock %} {% block extra_head %} {% endblock %} {% block content %}