lib/octopress-ink/helpers/path.rb in octopress-ink-1.0.0.alpha.44 vs lib/octopress-ink/helpers/path.rb in octopress-ink-1.0.0.alpha.45
- old
+ new
@@ -25,11 +25,11 @@
# If relative path, e.g. ./somefile, ../somefile
if file =~ /^\.+\//
page = context['page']
if local_dir = page['dir']
- File.expand_path(File.join(local_dir, file))
+ File.expand_path(File.join(Ink.site.source, local_dir, file))
else
local_dir = File.dirname page['path']
File.expand_path(File.join(root, local_dir, file))
end
@@ -42,11 +42,11 @@
File.join root, file
end
end
def self.site_dir
- File.expand_path(Plugins.site.config['destination'])
+ File.expand_path(Ink.site.config['destination'])
end
def self.page_destination(page)
page.destination(site_dir)
end
@@ -54,17 +54,17 @@
def self.find_page(page)
find_page_by_dest page_destination(page)
end
def self.find_page_by_dest(dest)
- Plugins.site.pages.clone.each do |p|
+ Ink.site.pages.clone.each do |p|
return p if page_destination(p) == dest
end
return false
end
def self.remove_page(dest)
- Plugins.site.pages.reject! do |p|
+ Ink.site.pages.reject! do |p|
page_destination(p) == dest
end
end
end
end