Make wiki.page directory aware.
Remove scoped_page.
This commit is contained in:
+4
-14
@@ -189,26 +189,16 @@ module Gollum
|
||||
@access.exist?
|
||||
end
|
||||
|
||||
# Public: Get the formatted page for a given page name.
|
||||
# Public: Get the formatted page for a given page name, version, and dir.
|
||||
#
|
||||
# name - The human or canonical String page name of the wiki page.
|
||||
# version - The String version ID to find (default: @ref).
|
||||
#
|
||||
# Returns a Gollum::Page or nil if no matching page was found.
|
||||
def page(name, version = @ref)
|
||||
@page_class.new(self).find(name, version)
|
||||
end
|
||||
|
||||
# Public: Get the formatted page for a given page name scoped to a
|
||||
# directory.
|
||||
#
|
||||
# name - The human or canonical String page name of the wiki page.
|
||||
# dir - The directory String relative to the repo.
|
||||
# version - The String version ID to find (default: @ref).
|
||||
#
|
||||
# Returns a Gollum::Page or nil if no matching page was found.
|
||||
def scoped_page(name, dir, version = @ref)
|
||||
@page_class.new(self).find(name, version || @ref, dir)
|
||||
def page(name, version = @ref, dir = nil)
|
||||
version = @ref if version.nil?
|
||||
@page_class.new(self).find(name, version, dir)
|
||||
end
|
||||
|
||||
# Public: Get the static file for a given name.
|
||||
|
||||
Reference in New Issue
Block a user