diff --git a/CHANGELOG.md b/CHANGELOG.md index bc2e7d2..2cab279 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# v1.9.5 +## 04/27/2020 + +1. [](#improved) + * Add admin toggle for `ignore` [#68](https://github.com/getgrav/grav-plugin-sitemap/pull/68) + * Omit empty `` [#70](https://github.com/getgrav/grav-plugin-sitemap/pull/70) + * Added Chinese language [#73](https://github.com/getgrav/grav-plugin-sitemap/pull/73) + * Added German language [#66](https://github.com/getgrav/grav-plugin-sitemap/pull/66) + # v1.9.4 ## 10/19/2019 diff --git a/blueprints.yaml b/blueprints.yaml index e195b45..f0dfeba 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,7 @@ name: Sitemap -version: 1.9.4 +slug: sitemap +type: plugin +version: 1.9.5 description: "Provide automatically generated **XML sitemaps** with this very useful, but simple to configure, Grav plugin." icon: map-marker author: diff --git a/blueprints/sitemap.yaml b/blueprints/sitemap.yaml index ddbf180..b414ac6 100644 --- a/blueprints/sitemap.yaml +++ b/blueprints/sitemap.yaml @@ -13,6 +13,18 @@ form: underline: true fields: + header.sitemap.ignore: + type: toggle + toggleable: true + label: PLUGIN_SITEMAP.HEADER_IGNORE + highlight: 0 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + required: false + header.sitemap.changefreq: type: select label: PLUGIN_SITEMAP.HEADER_CHANGEFREQ diff --git a/languages.yaml b/languages.yaml index 7f71116..dc300b7 100644 --- a/languages.yaml +++ b/languages.yaml @@ -1,6 +1,7 @@ en: PLUGIN_SITEMAP: SITEMAP: 'Sitemap' + HEADER_IGNORE: 'Sitemap ignore page' HEADER_CHANGEFREQ: 'Sitemap change frequency' HEADER_PRIORITY: 'Sitemap priority' CHANGEFREQ: 'Global - sitemap change frequency' @@ -69,3 +70,52 @@ uk: ADDITIONS_HELP: 'Додати зовнішні URL-адреси до карти сайту' LOCATION: 'Розташування URL-адреси' LASTMOD: 'Остання модифікація, напр. 2017-04-06' + +de: + PLUGIN_SITEMAP: + SITEMAP: 'Sitemap' + HEADER_CHANGEFREQ: 'Sitemap Änderungsfrequenz' + HEADER_PRIORITY: 'Sitemap Priorität' + CHANGEFREQ: 'Global - Sitemap Änderungsfrequenz' + CHANGEFREQ_DEFAULT: 'Benutze Global (Täglich)' + CHANGEFREQ_ALWAYS: 'Immer' + CHANGEFREQ_HOURLY: 'Stündlich' + CHANGEFREQ_DAILY: 'Täglich' + CHANGEFREQ_WEEKLY: 'Wöchentlich' + CHANGEFREQ_MONTHLY: 'Monatlich' + CHANGEFREQ_YEARLY: 'Jährlich' + CHANGEFREQ_NEVER: 'Nie' + PRIORITY: 'Global - Sitemap Priorität' + PRIORITY_USE_GLOBAL: 'Benutze Global (1)' + ROUTE: 'Pfad zur Sitemap' + IGNORES: 'Ignorieren' + IGNORES_HELP: 'Zu ignorierende URLs' + ADDITIONS: 'Zusätzliche URLs' + ADDITIONS_HELP: 'Füge externe URLs zur Sitemap hinzu' + LOCATION: 'Seiten Pfad' + LASTMOD: 'Letzte Änderung e.g. 2017-04-06' + +zh: + PLUGIN_SITEMAP: + SITEMAP: '网站地图' + HEADER_CHANGEFREQ: '网站地图变更频率' + HEADER_PRIORITY: '网站地图优先级' + CHANGEFREQ: '全局 - 网站地图变更频率' + CHANGEFREQ_DEFAULT: '使用全局 (每日)' + CHANGEFREQ_ALWAYS: '总是' + CHANGEFREQ_HOURLY: '每小时' + CHANGEFREQ_DAILY: '每天' + CHANGEFREQ_WEEKLY: '每周' + CHANGEFREQ_MONTHLY: '每月' + CHANGEFREQ_YEARLY: '每年' + CHANGEFREQ_NEVER: '永不' + PRIORITY: '全局 - 网站地图优先级' + PRIORITY_USE_GLOBAL: '使用全局 (1)' + ROUTE: '网站地图路径' + IGNORES: '忽略' + IGNORES_HELP: '忽略的 URL' + ADDITIONS: '附加 URL' + ADDITIONS_HELP: '添加外部 URL 到网站地图' + LOCATION: 'URL 地址' + LASTMOD: '上次修改 例如 2017-04-06' + diff --git a/templates/sitemap.xml.twig b/templates/sitemap.xml.twig index 3e9df4b..14c9bc7 100644 --- a/templates/sitemap.xml.twig +++ b/templates/sitemap.xml.twig @@ -9,7 +9,9 @@ {% endfor %} {% endif %} +{% if entry.lastmod %} {{ entry.lastmod }} +{% endif %} {% if entry.changefreq %} {{ entry.changefreq }} {% endif %}