diff --git a/_includes/search-loader.html b/_includes/search-loader.html
index 7fd065d..db9a3c5 100644
--- a/_includes/search-loader.html
+++ b/_includes/search-loader.html
@@ -10,6 +10,8 @@
{categories}
{tags}
+ {date}
+ {datemodif}
{snippet}
@@ -40,9 +42,24 @@
if (value === '') {
return `${value}`;
} else {
- return `${value}
`;
+ return `${value}
`;
}
}
+ if (prop === 'date') {
+ if (value === '') {
+ return `${value}`;
+ } else {
+ return `${value}
`;
+ }
+ }
+ if (prop === 'datemodif') {
+ if (value === '') {
+ return `${value}`;
+ } else {
+ return `${value}
`;
+ }
+ }
+
}
});
});
diff --git a/_layouts/category.html b/_layouts/category.html
index b064f27..c46e2ba 100644
--- a/_layouts/category.html
+++ b/_layouts/category.html
@@ -16,8 +16,12 @@ layout: page
{% for post in page.posts %}
{{ post.title }}
-
+
+ {% if post.last_modified_at %}
+ {% include datetime.html date=post.last_modified_at class='text-muted small text-nowrap' lang=lang %}
+ {% endif %}
{% include datetime.html date=post.date class='text-muted small text-nowrap' lang=lang %}
+
{% endfor %}
diff --git a/_layouts/home.html b/_layouts/home.html
index 451e391..33fffa5 100644
--- a/_layouts/home.html
+++ b/_layouts/home.html
@@ -86,8 +86,13 @@ refactor: true
- {% include datetime.html date=post.date lang=lang %}
+ {% include datetime.html date=post.date lang=lang %}
+ {% if post.last_modified_at %}
+
+ {% include datetime.html date=post.last_modified_at lang=lang %}
+ {% endif %}
+
{% if post.categories.size > 0 %}
diff --git a/assets/js/data/search.json b/assets/js/data/search.json
index 0b27f2b..a8593a1 100644
--- a/assets/js/data/search.json
+++ b/assets/js/data/search.json
@@ -4,13 +4,19 @@ swcache: true
---
[
- {% for post in site.posts %}
+ {% assign posts = site.posts | sort: 'last_modified_at' | reverse %}
+ {% for post in posts %}
{
"title": {{ post.title | jsonify }},
"url": {{ post.url | relative_url | jsonify }},
"categories": {{ post.categories | join: ', ' | jsonify }},
"tags": {{ post.tags | join: ', ' | jsonify }},
- "date": "{{ post.date }}",
+ "date": "{{ post.date | date: '%d/%m/%Y' }}",
+ {% if post.last_modified_at %}
+ "datemodif": "{{ post.last_modified_at | date: '%d/%m/%Y' }}",
+ {% else %}
+ "datemodif": "",
+ {% endif %}
{% include no-linenos.html content=post.content %}
{% assign _content = content | strip_html | strip_newlines %}
"snippet": {{ _content | truncate: 200 | jsonify }}