Class: Juli::Command::Sitemap
- Inherits:
-
Object
- Object
- Juli::Command::Sitemap
- Includes:
- Util, Visitor::Html::TagHelper
- Defined in:
- lib/juli/command/sitemap.rb
Overview
generate sitemap.html and sitemap_order_by_mtime_DESC.html under $JULI_REPO
Instance Method Summary collapse
-
#initialize ⇒ Sitemap
constructor
cache File info.
- #run(opts) ⇒ Object
Methods included from Visitor::Html::TagHelper
Methods included from Util
#camelize, conf, find_template, in_filename, juli_repo, mkdir, out_filename, str_limit, str_trim, to_wikiname, underscore, usage, visitor, visitor_list
Constructor Details
Instance Method Details
#run(opts) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/juli/command/sitemap.rb', line 18 def run(opts) sitemap_sub('sitemap.html'){|files| files.sort} sitemap_sub('sitemap_order_by_mtime_DESC.html'){|files| files.sort{|a,b| File.stat(a).mtime <=> File.stat(b).mtime}.reverse } end |