mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-21 11:10:53 +00:00
Fixed last-mod display for non-English named posts.
This commit is contained in:
parent
5b0aaa5403
commit
9f3619e54a
@ -23,7 +23,7 @@
|
||||
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
||||
|
||||
{% for item in update_list %}
|
||||
{% assign post_url = item | split: "::" | last | prepend: "/posts/" | append: "/" %}
|
||||
{% assign post_url = item | split: "::" | last | url_encode | prepend: "/posts/" | append: "/" %}
|
||||
{% assign post = site.posts | where: "url", post_url | first %}
|
||||
|
||||
{% if post %}
|
||||
|
@ -39,16 +39,22 @@ layout: default
|
||||
{{ page.url | split: "/" | last }}
|
||||
{%- endcapture -%}
|
||||
|
||||
{% assign record = site.data.updates | where: "filename", filename | first %}
|
||||
{% for item in site.data.updates %}
|
||||
{% assign encode_filename = item.filename | url_encode %}
|
||||
{% if filename == encode_filename %}
|
||||
{% assign lastmod = item.lastmod %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if record %}
|
||||
{% if lastmod %}
|
||||
<div>
|
||||
Updated
|
||||
<span class="timeago lastmod"
|
||||
data-toggle="tooltip" data-placement="bottom"
|
||||
title="{{ record.lastmod | date: site.data.date_format.tooltip }}">
|
||||
{{ record.lastmod | date: site.data.date_format.post }}
|
||||
<i class="unloaded">{{ record.lastmod | date_to_xmlschema}}</i>
|
||||
title="{{ lastmod | date: site.data.date_format.tooltip }}">
|
||||
{{ lastmod | date: site.data.date_format.post }}
|
||||
<i class="unloaded">{{ lastmod | date_to_xmlschema}}</i>
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user