# File lib/nanoc/base/router.rb, line 38
38:     def web_path_for(obj)
39:       # Get actual path
40:       path ||= obj.attribute_named(:custom_path)
41:       if obj.is_a?(Nanoc::PageRep) # Page rep
42:         path ||= path_for_page_rep(obj)
43:       else # Asset rep
44:         path ||= path_for_asset_rep(obj)
45:       end
46: 
47:       # Try stripping each index filename
48:       @site.config[:index_filenames].each do |index_filename|
49:         if path[-index_filename.length..-1] == index_filename
50:           # Strip and stop
51:           path = path[0..-index_filename.length-1]
52:           break
53:         end
54:       end
55: 
56:       # Return possibly stripped path
57:       path
58:     end