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