lib/octopress-ink/assets/page.rb in octopress-ink-1.0.0.alpha.31 vs lib/octopress-ink/assets/page.rb in octopress-ink-1.0.0.alpha.32
- old
+ new
@@ -1,40 +1,42 @@
# These are files which need to be in added to the root of the site directory
# Use root assets for files like robots.text or favicon.ico
module Octopress
- module Assets
- class PageAsset < Asset
+ module Ink
+ module Assets
+ class PageAsset < Asset
- def initialize(plugin, type, file)
- @root = plugin.assets_path
- @plugin = plugin
- @type = type
- @dir = File.dirname(file)
- @file = File.basename(file)
- @exists = {}
- file_check
- end
+ def initialize(plugin, type, file)
+ @root = plugin.assets_path
+ @plugin = plugin
+ @type = type
+ @dir = File.dirname(file)
+ @file = File.basename(file)
+ @exists = {}
+ file_check
+ end
- def page_dir
- @dir == '.' ? '' : @dir
- end
+ def page_dir
+ @dir == '.' ? '' : @dir
+ end
- def plugin_path
- File.join(plugin_dir, @dir, @file)
- end
+ def plugin_path
+ File.join(plugin_dir, @dir, @file)
+ end
- def page
- @page ||= Page.new(Plugins.site, plugin_dir, page_dir, @file, @plugin.config)
- end
+ def page
+ @page ||= Page.new(Plugins.site, plugin_dir, page_dir, @file, @plugin.config)
+ end
- # Add page to Jekyll pages if no other page has a conflicting destination
- #
- def copy
- return unless page.url
- Plugins.site.pages << page unless Helpers::Path.find_page(page)
- end
+ # Add page to Jekyll pages if no other page has a conflicting destination
+ #
+ def copy
+ return unless page.url
+ Plugins.site.pages << page unless Helpers::Path.find_page(page)
+ end
+ end
end
end
end