Sha256: 6fe0f2dd57fc921bd1bd65f9997151248aed830f49602a438a8c0bbd32512904
Contents?: true
Size: 557 Bytes
Versions: 36
Compression:
Stored size: 557 Bytes
Contents
module Awestruct module Extensions class Indexifier def initialize(exclude_regex_paths = []) @exclude_regex_paths = exclude_regex_paths @exclude_regex_paths << /^(.*\/)?index.html$/ end def execute(site) site.pages.each do |page| if ( page.inhibit_indexifier || Regexp.union(@exclude_regex_paths).match(page.output_path) ) # skip it! else page.output_path = page.output_path.gsub( /.html$/, '/index.html' ) end end end end end end
Version data entries
36 entries across 36 versions & 1 rubygems