Skip to content

Commit a924549

Browse files
committed
Fixed the template of Sitemap and Feed.
1 parent 1ce1455 commit a924549

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

feed.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ layout: compress
3030
<title>{{ post.title }}</title>
3131
<link href="{{ post_absolute_url }}" rel="alternate" type="text/html" title="{{ post.title }}" />
3232
<published>{{ post.date | date_to_xmlschema }}</published>
33-
{% if post.lastmod %}
34-
<updated>{{ post.lastmod | date_to_xmlschema }}</updated>
33+
{% if post.seo.date_modified %}
34+
<updated>{{ post.seo.date_modified | date_to_xmlschema }}</updated>
3535
{% else %}
3636
<updated>{{ site.time | date_to_xmlschema }}</updated>
3737
{% endif %}

sitemap.xml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,11 @@ layout: compress
1010

1111
<?xml version="1.0" encoding="UTF-8"?>
1212
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
13-
{% for post in site.posts %}
14-
{% unless post.published == false %}
15-
16-
{% capture lastmod %}
17-
{% if post.seo.date_modified %}
18-
{{ post.seo.date_modified }}
19-
{% elsif post.date %}
20-
{{ post.date }}
21-
{% else %}
22-
{{ site.time }}
23-
{% endif %}
24-
{% endcapture %}
2513

14+
{% for post in site.posts %}
2615
<url>
2716
<loc>{{ site.url | append: site.baseurl | append: post.url }}</loc>
28-
<lastmod>{{ lastmod | date_to_xmlschema }}</lastmod>
17+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
2918

3019
{% if post.sitemap.changefreq %}
3120
<changefreq>{{ post.sitemap.changefreq }}</changefreq>
@@ -39,9 +28,6 @@ layout: compress
3928
<priority>0.5</priority>
4029
{% endif %}
4130
</url>
42-
43-
{% endunless %}
44-
4531
{% endfor %}
4632

4733
{% for page in site.pages %}

0 commit comments

Comments
 (0)