diff --git a/_includes/archive-single.html b/_includes/archive-single.html index 4164e3f6..258db9ff 100644 --- a/_includes/archive-single.html +++ b/_includes/archive-single.html @@ -23,6 +23,7 @@ {% endif %}

{% if post.id %}{{ post.title | markdownify | remove: "

" | remove: "

" }}{% else %}{{ post.title }}{% endif %}

+ {% if site.read_time and post.read_time %}

{% include read-time.html %}

{% endif %} {% if post.excerpt %}

{{ post.excerpt | markdownify | strip_html | truncate: 160 }}

{% endif %} diff --git a/_includes/read-time.html b/_includes/read-time.html index 407c3a2b..86e7db84 100644 --- a/_includes/read-time.html +++ b/_includes/read-time.html @@ -1,4 +1,8 @@ -{% assign words = page.content | strip_html | number_of_words %} +{% if post.read_time %} + {% assign words = post.content | strip_html | number_of_words %} +{% elsif page.read_time %} + {% assign words = page.content | strip_html | number_of_words %} +{% endif %} {% if words < 180 %} {{ site.data.ui-text[site.locale].less_than }} 1 {{ site.data.ui-text[site.locale].minute_read }} diff --git a/_layouts/single.html b/_layouts/single.html index 77ef7d5b..45929f7c 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -12,7 +12,7 @@ layout: default

{{ page.title | markdownify | remove: "

" | remove: "

" }}

- {% if site.read_time and page.read_time %}

{{ page.date | date: "%b %d, %Y" }} ยท {% include read-time.html %}

{% endif %} + {% if site.read_time and page.read_time %}

{% include read-time.html %}

{% endif %}
diff --git a/assets/_scss/_archive.scss b/assets/_scss/_archive.scss index e9cd3556..464e9ccd 100644 --- a/assets/_scss/_archive.scss +++ b/assets/_scss/_archive.scss @@ -71,6 +71,10 @@ a:hover { @include breakpoint($x-large) { padding-right: $right-sidebar-width-wide; } + + .page__meta { + margin: 0 0 4px; + } } @@ -81,6 +85,10 @@ a:hover { .grid__item { margin-bottom: 2em; + .page__meta { + margin: 0 0 4px; + } + .archive__item-excerpt { display: none; }