Merge pull request #1120 from TMaYaD/master
Allow path to be passed to page_classes
This commit is contained in:
commit
deb75a4c78
1 changed files with 4 additions and 2 deletions
|
@ -121,7 +121,9 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
|
||||||
# Generate body css classes based on the current path
|
# Generate body css classes based on the current path
|
||||||
#
|
#
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def page_classes(options={})
|
def page_classes(path = current_path.dup, options={})
|
||||||
|
if path.is_a? Hash
|
||||||
|
options = path
|
||||||
path = current_path.dup
|
path = current_path.dup
|
||||||
path << index_file if path.end_with?('/')
|
path << index_file if path.end_with?('/')
|
||||||
path = ::Middleman::Util.strip_leading_slash(path)
|
path = ::Middleman::Util.strip_leading_slash(path)
|
||||||
|
|
Loading…
Add table
Reference in a new issue