Sha256: bec9d180787de59ff2720d6a05676df8713b5fec072fefdd23239437bf293942

Contents?: true

Size: 289 Bytes

Versions: 6

Compression:

Stored size: 289 Bytes

Contents

class Hyde
module Helpers
  def partial(path, locals={})
    partial = Partial[path.to_s, page]  or return ''
    partial.to_html :page => self
  end

  def rel(path)
    depth = page.depth
    dotdot = depth > 1 ? ('../' * (page.depth-1)) : './'
    (dotdot[0...-1] + path)
  end
end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hydeweb-0.1.7 lib/hyde/helpers.rb
hydeweb-0.1.6 lib/hyde/helpers.rb
hydeweb-0.1.5 lib/hyde/helpers.rb
hydeweb-0.1.4 lib/hyde/helpers.rb
hydeweb-0.1.3 lib/hyde/helpers.rb
hydeweb-0.1.2 lib/hyde/helpers.rb