Class: Awestruct::Extensions::Indexifier
- Inherits:
-
Object
- Object
- Awestruct::Extensions::Indexifier
- Defined in:
- lib/awestruct/extensions/indexifier.rb
Instance Method Summary collapse
Instance Method Details
#execute(site) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/awestruct/extensions/indexifier.rb', line 5 def execute(site) site.pages.each do |page| if ( page.inhibit_indexifier || ( page.output_path =~ /^(.*\/)?index.html$/ ) ) # skip it! else page.output_path = page.output_path.gsub( /.html$/, '/index.html' ) end end end |