Browse Source

changes to the way OG tags are generated. Looks for article.description rather than article.summary. Also no more double tags

pull/1/head
RRA 7 years ago
parent
commit
ec02bf973a
  1. 2
      pelican/themes/homebrewserver.club/templates/article.html
  2. 6
      pelican/themes/homebrewserver.club/templates/syndication.html

2
pelican/themes/homebrewserver.club/templates/article.html

@ -9,8 +9,6 @@
<meta name="keywords" content="{{ [article.tags|join(', '), article.category, article.keywords]|join(', ') }}" />
{% endif %}
{% from 'syndication.html' import syndication with context %}
{{ syndication(article) }}
{% endblock %}
<div class="file type_folder">

6
pelican/themes/homebrewserver.club/templates/syndication.html

@ -5,7 +5,7 @@
{# Thumbnail image to show when homepage is shared on social media. It also
serves as the default image for posts whose featured_image is not set. #}
{% if not FEATURED_IMAGE %}
{% set FEATURED_IMAGE = 'http://homebrewserver.club/images/conv_2.png' %}
{% set FEATURED_IMAGE = 'http://homebrewserver.club/extra/featured_image_black.gif' %}
{% else %}
{% set FEATURED_IMAGE = FEATURED_IMAGE %}
{% endif %}
@ -15,7 +15,7 @@ serves as the default image for posts whose featured_image is not set. #}
{% if article %}
<meta property="og:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}"/>
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
<meta property="og:description" content="{{article.summary|striptags|e}}" />
<meta property="og:description" content="{{article.description|striptags|e}}" />
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ article.author }}" />
{% if article.date %}
@ -26,7 +26,7 @@ serves as the default image for posts whose featured_image is not set. #}
{% endif %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}">
<meta name="twitter:description" content="{{article.summary|striptags|e}}">
<meta name="twitter:description" content="{{article.description|striptags|e}}">
{% if article.featured_image %}
<meta property="og:image" content="{{article.featured_image}}" />
<meta name="twitter:image" content="{{article.featured_image}}" >

Loading…
Cancel
Save