compass/doc-src/lib/default.rb
Chris Eppstein 4afca420c3 - Some helpers for the body attributes
- Move the blueprint reference content to the blueprint tutorial
- Made new blueprint reference content that is actually reference
  content.
- Some basic helpers for accessing a sass stylesheet and extracting info
  from it.
2010-01-21 11:54:47 -08:00

19 lines
346 B
Ruby

# All files in the 'lib' directory will be loaded
# before nanoc starts compiling.
include Nanoc3::Helpers::LinkTo
def body_class(item)
(item[:classnames] || []).join(" ")
end
def body_id(item)
item.identifier.chop[1..-1].gsub(/\/|_/, "-")
end
def body_attributes(item)
{
:id => body_id(item),
:class => body_class(item)
}
end