2023-05-18 20:50:45 +03:00
|
|
|
<!-- Get the last 5 posts from lastmod list. -->
|
2020-05-09 19:28:18 +03:00
|
|
|
|
|
|
|
{% assign MAX_SIZE = 5 %}
|
2020-07-15 11:49:02 +03:00
|
|
|
|
2023-05-06 02:22:29 +03:00
|
|
|
{% assign all_list = '' | split: '' %}
|
2020-05-09 19:28:18 +03:00
|
|
|
|
2020-11-18 20:58:35 +03:00
|
|
|
{% for post in site.posts %}
|
2023-05-06 05:35:01 +03:00
|
|
|
{% if post.last_modified_at and post.last_modified_at != post.date %}
|
2020-11-18 20:58:35 +03:00
|
|
|
{% capture elem %}
|
2020-11-26 18:52:59 +03:00
|
|
|
{{- post.last_modified_at | date: "%Y%m%d%H%M%S" -}}::{{- forloop.index0 -}}
|
2020-11-18 20:58:35 +03:00
|
|
|
{% endcapture %}
|
|
|
|
{% assign all_list = all_list | push: elem %}
|
|
|
|
{% endif %}
|
2020-05-09 19:28:18 +03:00
|
|
|
{% endfor %}
|
|
|
|
|
2020-07-15 11:49:02 +03:00
|
|
|
{% assign all_list = all_list | sort | reverse %}
|
|
|
|
|
2023-05-06 02:22:29 +03:00
|
|
|
{% assign update_list = '' | split: '' %}
|
2020-07-15 11:49:02 +03:00
|
|
|
|
2023-05-06 02:22:29 +03:00
|
|
|
{% for entry in all_list limit: MAX_SIZE %}
|
2020-07-15 11:49:02 +03:00
|
|
|
{% assign update_list = update_list | push: entry %}
|
|
|
|
{% endfor %}
|
2021-12-01 16:48:57 +03:00
|
|
|
|
|
|
|
{% if update_list.size > 0 %}
|
|
|
|
<div id="access-lastmod" class="post">
|
2023-05-06 02:22:29 +03:00
|
|
|
<div class="panel-heading">{{- site.data.locales[include.lang].panel.lastmod -}}</div>
|
2023-05-18 20:50:45 +03:00
|
|
|
<ul class="post-content list-unstyled ps-0 pb-1 ms-1 mt-2">
|
2021-12-01 16:48:57 +03:00
|
|
|
{% for item in update_list %}
|
2023-05-06 02:22:29 +03:00
|
|
|
{% assign index = item | split: '::' | last | plus: 0 %}
|
2021-12-01 16:48:57 +03:00
|
|
|
{% assign post = site.posts[index] %}
|
|
|
|
{% assign url = post.url | relative_url %}
|
2023-05-18 20:50:45 +03:00
|
|
|
<li class="text-truncate lh-lg">
|
2023-05-06 02:22:29 +03:00
|
|
|
<a href="{{ url }}">{{ post.title }}</a>
|
|
|
|
</li>
|
2021-12-01 16:48:57 +03:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2023-05-06 02:22:29 +03:00
|
|
|
</div>
|
|
|
|
<!-- #access-lastmod -->
|
2021-12-01 16:48:57 +03:00
|
|
|
{% endif %}
|