Skip to content

Commit

Permalink
* **core:** add new setting date_format
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Jul 10, 2020
1 parent 5508031 commit 05640a9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v2.1.0, 2020-07-10

### Features

* **core:** add new setting `date_format`

# v2.0.0, 2020-07-03

### Features
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Sitemap
version: 2.0.0
version: 2.1.0
description: Provide automatically generated XML sitemap.
author:
name: Sergey Romanenko
Expand Down
3 changes: 3 additions & 0 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ additions:
default:
changefreq: daily
priority: !!float 1

# Date format
date_format: Y-m-d
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<url>
<loc>{{ url() }}/{{ entry.loc|e }}</loc>
{% if entry.lastmod %}
<lastmod>{{ entry.lastmod|date(registry.get('flextype.settings.date_display_format')) }}</lastmod>
<lastmod>{{ entry.lastmod|date(registry.get('plugins.sitemap.settings.date_format')) }}</lastmod>
{% endif %}
{% if entry.changefreq %}
<changefreq>{{ entry.changefreq }}</changefreq>
Expand Down

0 comments on commit 05640a9

Please sign in to comment.