Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This function helps to build a relative path from the page to the output root.
- #
- # Usage: <img src="<%= page_depth @page.path %>images/hardon.png" alt="wadus" />
- def page_depth path
- depth = ""
- (path.split("/").size-1).times do
- depth = depth + "../"
- end
- depth
- end
Add Comment
Please, Sign In to add comment