lib/octopress-ink/assets/doc_page.rb in octopress-ink-1.0.0.alpha.44 vs lib/octopress-ink/assets/doc_page.rb in octopress-ink-1.0.0.alpha.45
- old
+ new
@@ -16,45 +16,48 @@
@file = File.basename(file)
@exists = {}
file_check
end
- def page_dir
- dir == '.' ? '' : dir
- end
-
- def plugin_path
+ def path
File.join(plugin_dir, page_dir, file)
end
-
- def source_dir
- File.join root, base
+
+ # Add doc page to Jekyll pages
+ #
+ def add
+ if Ink.config['docs_mode']
+ Ink.site.pages << page
+ end
end
- def path
- File.join(plugin_dir, page_dir, file)
- end
+ private
def page
return @page if @page
- @page = Page.new(Plugins.site, source_dir, page_dir, file, {'path'=>plugin.docs_base_path})
+ @page = Page.new(Ink.site, source_dir, page_dir, file, {'path'=>plugin.docs_base_path})
@page.data['layout'] = 'docs'
@page.data['plugin'] = {
'name' => @plugin.name,
'slug' => @plugin.slug,
'docs_base_path' => plugin.docs_base_path,
}
@page.data['dir'] = File.dirname(plugin_path)
@page
end
- # Add doc page to Jekyll pages
- #
- def add
- if Ink.config['docs_mode']
- Plugins.site.pages << page
- end
+ def page_dir
+ dir == '.' ? '' : dir
end
+
+ def plugin_path
+ File.join(plugin_dir, page_dir, file)
+ end
+
+ def source_dir
+ File.join root, base
+ end
+
end
end
end
end