diff --git a/templates/article.html b/templates/article.html index ce8cd75..8900367 100644 --- a/templates/article.html +++ b/templates/article.html @@ -24,68 +24,9 @@ {% for tag in article.tags %} {% endfor %} -{% endblock %} -{% block twitter_card %} - {% for name,link in SOCIAL if name.lower() in ['twitter'] %} - - - - - - {% if article.twitter_image %} - {% if article.twitter_image|lower|truncate(4, True, '') == "http" %} - - {% else %} - - {% endif %} - {% elif article.header_cover %} - - {% elif HEADER_COVER %} - - {% else %} - - {% endif %} - - {% if description %} - - {% elif article.headline %} - - {% else %} - - {% endif %} - {% endfor %} -{% endblock %} -{% block opengraph %} - {{ super() }} - - {% for author in article.authors %} - - {% endfor %} - - - - {% if description %} - - {% elif article.headline %} - - {% elif article.summary %} - - {% endif %} - - {% if article.og_image %} - {% if article.og_image|lower|truncate(4, True, '') == "http" %} - - {% else %} - - {% endif %} - {% elif article.header_cover %} - - {% elif HEADER_COVER %} - - {% else %} - - {% endif %} + {% include 'partials/og_article.html' %} + {% include 'partials/jsonld_article.html' %} {% endblock %} {% block header %} diff --git a/templates/base.html b/templates/base.html index 9c38693..4d691b9 100644 --- a/templates/base.html +++ b/templates/base.html @@ -80,42 +80,6 @@ {% endblock head %} - - {% block opengraph %} - {% for admin in FACEBOOK_ADMINS %} - - {% endfor %} - {% for LOC in LOCALE %} - - {% endfor %} - - - - - - {% if HEADER_COVER %} - - {% else %} - - {% endif %} - {% for name,link in SOCIAL if name.lower() in ['facebook'] %} - - {% endfor %} - {% endblock opengraph %} - {% block twitter_card %} - {% for name,link in SOCIAL if name.lower() in ['twitter'] %} - - - - - - {% if HEADER_COVER %} - - {% else %} - - {% endif %} - {% endfor %} - {% endblock twitter_card %}
diff --git a/templates/index.html b/templates/index.html index 70a51d4..ea10a4f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,11 @@ {% extends "base.html" %} +{% block head %} + {{ super() }} + {% include 'partials/og.html' %} + {% include 'partials/jsonld.html' %} +{% endblock %} + {% block header %} diff --git a/templates/page.html b/templates/page.html index f813681..408739f 100644 --- a/templates/page.html +++ b/templates/page.html @@ -21,11 +21,11 @@ Menu -