mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 13:44:15 +00:00
Fixed the template of Sitemap and Feed.
This commit is contained in:
18
sitemap.xml
18
sitemap.xml
@@ -10,22 +10,11 @@ layout: compress
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
|
||||
{% for post in site.posts %}
|
||||
{% unless post.published == false %}
|
||||
|
||||
{% capture lastmod %}
|
||||
{% if post.seo.date_modified %}
|
||||
{{ post.seo.date_modified }}
|
||||
{% elsif post.date %}
|
||||
{{ post.date }}
|
||||
{% else %}
|
||||
{{ site.time }}
|
||||
{% endif %}
|
||||
{% endcapture %}
|
||||
|
||||
<url>
|
||||
<loc>{{ site.url | append: site.baseurl | append: post.url }}</loc>
|
||||
<lastmod>{{ lastmod | date_to_xmlschema }}</lastmod>
|
||||
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
|
||||
|
||||
{% if post.sitemap.changefreq %}
|
||||
<changefreq>{{ post.sitemap.changefreq }}</changefreq>
|
||||
@@ -39,9 +28,6 @@ layout: compress
|
||||
<priority>0.5</priority>
|
||||
{% endif %}
|
||||
</url>
|
||||
|
||||
{% endunless %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% for page in site.pages %}
|
||||
|
||||
Reference in New Issue
Block a user