Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/funkydan2/hugo-kiera.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Saunders <10623666+funkydan2@users.noreply.github.com>2020-11-12 04:58:34 +0300
committerGitHub <noreply@github.com>2020-11-12 04:58:34 +0300
commite0f1e6f2d8a67db7107029ff63c8aa1b9e1482f4 (patch)
tree1c2b6c2dfabdb748b8b00104c333e6aabc354fad
parent343f342e9fef9306f4e3fa3a021b0d9399e21847 (diff)
parentcb763864ca634eda41fdd0edb670855330b03c87 (diff)
Merge pull request #56 from swflint/enable-modified-on
Show modified date in posts
-rw-r--r--README.md4
-rw-r--r--i18n/en.toml3
-rw-r--r--i18n/fa.toml3
-rw-r--r--layouts/partials/aside.html5
4 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9b55ca9..62eab95 100644
--- a/README.md
+++ b/README.md
@@ -200,6 +200,10 @@ Set `Params.mathjax` to true to enable support of mathematics display using [Mat
Comments can be disabled for a single page by setting `disableComments = true` in the page frontmatter.
+### Last Modified Date
+
+If the `lastmod` option is set on a page/post, either manually or because `enableGitInfo` is set to true, a line including the page's last modification will be shown after the post date.
+
## Support and Pull Requests
Please use GitHub issues to file bugs. If you can help fixing bugs, optimize the theme or adding features, please do pull requests, I really love to see what others can come up with.
diff --git a/i18n/en.toml b/i18n/en.toml
index c29c00c..d3ca306 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -19,3 +19,6 @@ other = "Rendered by"
[comments]
other = "Add/View Comments"
+
+[modifiedOn]
+other = "modified on"
diff --git a/i18n/fa.toml b/i18n/fa.toml
index 7ed1120..d1c1666 100644
--- a/i18n/fa.toml
+++ b/i18n/fa.toml
@@ -19,3 +19,6 @@ other = "Rendered by"
[comments]
other = "Add/View Comments"
+
+[modifiedOn]
+other = "modified on"
diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html
index d1f39fa..f24a605 100644
--- a/layouts/partials/aside.html
+++ b/layouts/partials/aside.html
@@ -3,6 +3,11 @@
<li>
<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">{{ .Date.Format "Jan 2, 2006" }}</time>
</li>
+ {{ if ne .Date .Lastmod }}
+ <li>
+ {{ T "modifiedOn" }} <time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">{{ .Lastmod.Format "Jan 2, 2006" }}</time>
+ </li>
+ {{ end }}
{{ if .Params.categories }}
<li>
{{ T "categories" }}