diff --git a/_includes/post-description.html b/_includes/post-description.html index a96e0c1a8af..73fced87c39 100644 --- a/_includes/post-description.html +++ b/_includes/post-description.html @@ -3,8 +3,9 @@ {% endcomment %} {% assign max_length = include.max_length | default: 200 %} + {% if post.description %} - {{ post.description | strip | truncate: max_length | escape }} + {{ post.description | strip | truncate: max_length }} {% else %} {% include no-linenos.html content=post.content %} {{ content | markdownify | strip_html | truncate: max_length | escape }} diff --git a/_includes/related-posts.html b/_includes/related-posts.html index 5dcb44abbf4..ae39da41f17 100644 --- a/_includes/related-posts.html +++ b/_includes/related-posts.html @@ -81,9 +81,7 @@

{{ post.title }}

-

- {% include post-description.html max_length=200 %} -

+

{% include post-description.html %}

diff --git a/_layouts/home.html b/_layouts/home.html index 1f572939a06..a9f5bd366a7 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -2,6 +2,7 @@ layout: default refactor: true --- + {% include lang.html %} {% assign pinned = site.posts | where: 'pin', 'true' %} @@ -71,9 +72,7 @@

{{ post.title }}

-

- {% include post-description.html max_length=300 %} -

+

{% include post-description.html %}

diff --git a/_layouts/post.html b/_layouts/post.html index f666d71642c..3f859f8dd48 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -14,6 +14,9 @@

{{ page.title }}

+ {% if page.description %} +

{{ page.description }}

+ {% endif %}