- {% assign MAX_SIZE = 5 %} - {% assign sum = 0 %} - {% assign lastmod_list = lastmod_list | sort | reverse %} - {% for item in lastmod_list %} - {% assign index = item | split: "::" | last | plus: 0 %} - {% assign post = site.posts[index] %} -
  • {{ post.title }}
  • - {% assign sum = sum | plus: 1 %} - {% if sum >= MAX_SIZE %} - {% break %} - {% endif %} - {% endfor %} + + {% for item in sort_list %} + {% assign post_url = item | split: "::" | last | prepend: "/posts/" | append: "/" %} + {% assign post = site.posts | where: "url", post_url | first %} + + {% if post %} + {% assign url = post.url | prepend: site.baseurl %} + +
  • {{ post.title }}
  • + + {% assign sum = sum | plus: 1 %} + {% if sum >= MAX_SIZE %} {% break %} {% endif %} + + {% endif %} + + {% endfor %} +