Module: Awestruct::Extensions::Assets

Includes:
Relative
Defined in:
lib/awestruct/extensions/assets.rb

Defined Under Namespace

Classes: Extension

Instance Method Summary collapse

Methods included from Relative

#relative

Instance Method Details

#asset(href) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/awestruct/extensions/assets.rb', line 9

def asset(href)
  if site.assets_url
    File.join(site.assets_url, href)
  else
    relative(File.join("/#{site.assets_path || 'assets'}", href))
  end
end