lib/ruby_slippers/site.rb in ruby-slippers-0.1.2 vs lib/ruby_slippers/site.rb in ruby-slippers-0.1.7
- old
+ new
@@ -10,9 +10,16 @@
end
def []= key, value
@config.set key, value
end
+
+ def sitemap type = :xml
+ articles = type == :html ? self.articles.reverse : self.articles
+ {:articles => articles.map do |article|
+ Article.new article, @config
+ end}.merge archives
+ end
def index type = :html
articles = type == :html ? self.articles.reverse : self.articles
{:articles => articles.map do |article|
Article.new article, @config