diff --git a/index.liquid b/index.liquid index f90a2a0..8eb6b05 100644 --- a/index.liquid +++ b/index.liquid @@ -8,12 +8,39 @@ data: {%- for post in collections.posts.pages -%} {%- if idx < 5 -%}
-

{{ post.title }}

-
-

{{ post.content | strip_html | truncatewords: 25, '...' }}

+

{{ post.title }}

+
+ {% assign reading_wpm = 200 %} + {% assign word_count = post.content | split: " " | size %} + {% assign reading_time = word_count | divided_by: 200 %} + {% case reading_time %} + {% when 0 %} + {% assign phrase = "less than a minute." %} + {% when 1 %} + {% assign phrase = "about a minute." %} + {% else %} + {% assign phrase = " minute read" | prepend: reading_time %} + {% endcase %} + + + {% if post.data and post.data.tags -%} + {%- for tag in post.data.tags %} + · {{ tag }} + {%- endfor %} + {%- endif -%} +
+ {%- if post.data and post.data.synopsis %} +

{{ post.data.synopsis | strip}}…

+ {%- else %} +

{{ post.content | strip_html | truncatewords: 50, '…' }}

+ {%- endif -%}
+ +
{%- endif -%} {% assign idx = idx | plus: 1 %} {%- endfor -%} +

Looking for more posts? Check out all posts! +