~xdavidwu/xdavidwu.link

981e2ee17c66f622c4e3d3bede121cc5df264fdc — Nicolas Cavigneaux 7 years ago a5216cc
Remove buggy conditional around related posts header (#901)

This removes a buggy conditional that checks if `related_label` is
available in translations before displaying the header for related
posts but this header already handle missing translation by using a
default string.

With this fix the header is displayed even if the translation for this
label isn't available.

Fix #900
1 files changed, 1 insertions(+), 3 deletions(-)

M _layouts/single.html
M _layouts/single.html => _layouts/single.html +1 -3
@@ 63,9 63,7 @@ layout: default
  {% comment %}<!-- only show related on a post page when not disabled -->{% endcomment %}
  {% if page.id and page.related and site.related_posts.size > 0 %}
    <div class="page__related">
      {% if site.data.ui-text[site.locale].related_label %}
        <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
      {% endif %}
      <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
      <div class="grid__wrapper">
        {% for post in site.related_posts limit:4 %}
          {% include archive-single.html type="grid" %}