Fixed posts' base-url on cache list.

This commit is contained in:
Cotes Chung 2020-07-17 16:27:11 +08:00
parent 22115f3797
commit 562fcd4fd8

View file

@ -42,14 +42,10 @@ const include = [
/* The posts of first Home page and recent update list */ /* The posts of first Home page and recent update list */
{% assign post_list = "" | split: "" %} {% assign post_list = "" | split: "" %}
{% assign sum = 0 %}
{% for post in site.posts %} {% for post in site.posts limit: site.paginate %}
{% assign post_list = post_list | push: post.url %} {% capture post_url %}{{ post.url | relative_url }}{% endcapture %}
{% assign sum = sum | plus: 1 %} {% assign post_list = post_list | push: post_url %}
{% if sum >= site.paginate %}
{% break %}
{% endif %}
{% endfor %} {% endfor %}
{% include update-list.html %} {% include update-list.html %}