summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--i18n/en.toml7
-rw-r--r--i18n/ru.toml5
-rw-r--r--layouts/partials/post-meta/date.html5
4 files changed, 17 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 354a1cc..81ecb76 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/sergeyklay/gohugo-theme-ed/compare/v0.3.0...HEAD)
+### Changed
+
+- Rework post dates format. Now they prefixes with "Published on" and "Updated on"
+
## [v0.3.0](https://github.com/sergeyklay/gohugo-theme-ed/compare/v0.2.0...v0.3.0)
### Added
diff --git a/i18n/en.toml b/i18n/en.toml
index 82cd7fa..0ee2188 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -7,8 +7,11 @@
[more]
other = 'Read more...'
-[updated_at]
- other = 'Updated at'
+[published_on]
+ other = 'Published on'
+
+[updated_on]
+ other = 'Updated on'
[latest_publications]
other = 'Latest publications'
diff --git a/i18n/ru.toml b/i18n/ru.toml
index 10c815a..f3d13d4 100644
--- a/i18n/ru.toml
+++ b/i18n/ru.toml
@@ -7,7 +7,10 @@
[more]
other = 'Читать далее...'
-[updated_at]
+[published_on]
+ other = 'Опубликовано'
+
+[updated_on]
other = 'Обновлено'
[latest_publications]
diff --git a/layouts/partials/post-meta/date.html b/layouts/partials/post-meta/date.html
index 42747f2..b2537b7 100644
--- a/layouts/partials/post-meta/date.html
+++ b/layouts/partials/post-meta/date.html
@@ -1,6 +1,7 @@
{{ $date := .Date | time.Format (site.Params.dateFormat | default "January 02, 2006") }}
{{ $lastmod := .Lastmod | time.Format (site.Params.dateFormat | default "January 02, 2006") }}
+{{ i18n "published_on" }}
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ $date }}
</time>
@@ -8,7 +9,9 @@
{{/* Check that lastmod exists and is greater than date
(i.e. the last modified date must be after the publish date) */}}
{{ if and (ne $lastmod $date) (gt .Lastmod .Date) }}
+ <span>•</span>
+ {{ i18n "updated_on" }}
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
- ({{ i18n "updated_at" }} {{ $lastmod }})
+ {{ $lastmod }}
</time>
{{ end }}