Method: Middleman::Sitemap::Extensions::Traversal#eponymous_directory_path

Defined in:
middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb

#eponymous_directory_pathString

The path for this resource if it were a directory, and not a file (e.g., for 'gallery.html' this would return 'gallery/')

Returns:

  • (String)

150
151
152
# File 'middleman-core/lib/middleman-core/sitemap/extensions/traversal.rb', line 150

def eponymous_directory_path
  "#{path.sub(ext, '/').sub(%r{/$}, '')}/"
end