Class: Sitepress::BuildPaths::DirectoryIndexPath

Inherits:
IndexPath show all
Defined in:
lib/sitepress/build_paths/directory_index_path.rb

Overview

In many cases, you’ll want to serve up ‘pages/blah.html.haml` as `/blah` on hosts like S3. To achieve this effect, we have to compile `pages/blah.html.haml` to a folder with the filename `index.html`, so the final path would be `/blah/index.html`

Instance Attribute Summary

Attributes inherited from RootPath

#resource

Instance Method Summary collapse

Methods inherited from IndexPath

#filename_with_format, #filename_without_format

Methods inherited from RootPath

#filename, #initialize, #path

Constructor Details

This class inherits a constructor from Sitepress::BuildPaths::RootPath

Instance Method Details

#filename_with_default_formatObject



7
8
9
# File 'lib/sitepress/build_paths/directory_index_path.rb', line 7

def filename_with_default_format
  File.join(node.name, "#{node.default_name}.#{format}")
end