Selaa lähdekoodia

Rename SOCIAL_MEDIA_IMAGE to FEATURED_IMAGE

Update #15
Talha Mansoor 11 vuotta sitten
vanhempi
commit
b36c986325

+ 4 - 4
templates/_includes/_defaults.html

@@ -69,11 +69,11 @@
 {% endif %}
 
 {# Thumbnail image to show when homepage is shared on social media. It also
-serves as the default image for posts whose social_media_image is not set. #}
-{% if not SOCIAL_MEDIA_IMAGE %}
-{% set SOCIAL_MEDIA_IMAGE = '' %}
+serves as the default image for posts whose featured_image is not set. #}
+{% if not FEATURED_IMAGE %}
+{% set FEATURED_IMAGE = '' %}
 {% else %}
-{% set SOCIAL_MEDIA_IMAGE = SOCIAL_MEDIA_IMAGE %}
+{% set FEATURED_IMAGE = FEATURED_IMAGE %}
 {% endif %}
 
 {# License of your site that appears in the footer of every page #}

+ 7 - 7
templates/_includes/seo_metadata.html

@@ -18,14 +18,14 @@
 {% endif %}
 <meta name="twitter:title" content="{{ article.title|striptags }} {%if article.subtitle %} - {{ article.subtitle }} {% endif %}">
 <meta name="twitter:description" content="{{article.summary|striptags}}">
-{% if article.social_media_image %}
-<meta property="og:image" content="{{article.social_media_image}}" />
-<meta name="twitter:image" content="{{article.social_media_image}}" >
+{% if article.featured_image %}
+<meta property="og:image" content="{{article.featured_image}}" />
+<meta name="twitter:image" content="{{article.featured_image}}" >
 {% else %}
-{% from '_includes/_defaults.html' import SOCIAL_MEDIA_IMAGE with context %}
-    {% if SOCIAL_MEDIA_IMAGE %}
-<meta property="og:image" content="{{SOCIAL_MEDIA_IMAGE}}" />
-<meta name="twitter:image" content="{{SOCIAL_MEDIA_IMAGE}}" >
+{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
+    {% if FEATURED_IMAGE %}
+<meta property="og:image" content="{{FEATURED_IMAGE}}" />
+<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
     {% endif %}
 {% endif %}
 {% endmacro %}

+ 4 - 4
templates/index.html

@@ -28,10 +28,10 @@
 {%if TWITTER_USERNAME %}
 <meta name="twitter:creator" content="@{{TWITTER_USERNAME}}">
 {% endif %}
-{% from '_includes/_defaults.html' import SOCIAL_MEDIA_IMAGE with context %}
-{% if SOCIAL_MEDIA_IMAGE %}
-<meta property="og:image" content="{{SOCIAL_MEDIA_IMAGE}}" />
-<meta name="twitter:image" content="{{SOCIAL_MEDIA_IMAGE}}" >
+{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
+{% if FEATURED_IMAGE %}
+<meta property="og:image" content="{{FEATURED_IMAGE}}" />
+<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
 {% endif %}
 {% endblock meta_tags_in_head %}