Class: Sitepress::BuildPaths::IndexPath

Inherits:
RootPath
  • Object
show all
Defined in:
lib/sitepress/build_paths/index_path.rb

Overview

Compiles pages directly from ‘/pages/blah.html.haml` to `/blah.html`. Handles root `index` pages too, mainly grabbing the root, which doesn’t have a name in the node, to the default_name of the node, which is usually ‘index`.

Direct Known Subclasses

DirectoryIndexPath

Instance Attribute Summary

Attributes inherited from RootPath

#resource

Instance Method Summary collapse

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



15
16
17
# File 'lib/sitepress/build_paths/index_path.rb', line 15

def filename_with_default_format
  filename_with_format
end

#filename_with_formatObject



11
12
13
# File 'lib/sitepress/build_paths/index_path.rb', line 11

def filename_with_format
  "#{node.name}.#{format}"
end

#filename_without_formatObject



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

def filename_without_format
  node.name
end