Merge branch 'enh_pages_in_payload'
This commit is contained in:
commit
ad4a80a653
|
@ -119,8 +119,6 @@ module Jekyll
|
|||
"#<Jekyll:Page @name=#{self.name.inspect}>"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def html?
|
||||
output_ext == '.html'
|
||||
end
|
||||
|
|
|
@ -237,6 +237,7 @@ module Jekyll
|
|||
"time" => self.time,
|
||||
"posts" => self.posts.sort { |a,b| b <=> a },
|
||||
"pages" => self.pages,
|
||||
"html_pages" => self.pages.reject { |page| !page.html? },
|
||||
"categories" => post_attr_hash('categories'),
|
||||
"tags" => post_attr_hash('tags')})}
|
||||
end
|
||||
|
|
|
@ -14,10 +14,19 @@ layout: nil
|
|||
|
||||
{% for post in site.posts %}
|
||||
<url>
|
||||
<loc>http://example.com/{{ post.url }}/</loc>
|
||||
<loc>http://example.com{{ post.url }}/</loc>
|
||||
<lastmod>{{ post.date | date: "%Y-%m-%d" }}</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.2</priority>
|
||||
</url>
|
||||
{% endfor %}
|
||||
|
||||
{% for page in site.html_pages %}
|
||||
<url>
|
||||
<loc>http://example.com{{ page.url }}</loc>
|
||||
<lastmod>{{ site.time | date: "%Y-%m-%d" }}</lastmod>
|
||||
{% if page.changefreq %}<changefreq>{{ page.changefreq }}</changefreq>{% endif %}
|
||||
{% if page.priority %}<priority>{{ page.priority }}</priority>{% endif %}
|
||||
</url>
|
||||
{% endfor %}
|
||||
</urlset>
|
||||
|
|
Loading…
Reference in New Issue