|
@@ -34,7 +34,7 @@ module Docs
|
|
|
self.text_filters = FilterStack.new
|
|
self.text_filters = FilterStack.new
|
|
|
|
|
|
|
|
html_filters.push 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths'
|
|
html_filters.push 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths'
|
|
|
- text_filters.push 'inner_html', 'clean_text', 'attribution'
|
|
|
|
|
|
|
+ text_filters.push 'inner_html', 'clean_text', 'home_url', 'attribution'
|
|
|
|
|
|
|
|
def build_page(path)
|
|
def build_page(path)
|
|
|
response = request_one url_for(path)
|
|
response = request_one url_for(path)
|
|
@@ -65,6 +65,10 @@ module Docs
|
|
|
@root_url ||= root_path? ? URL.parse(File.join(base_url.to_s, root_path)) : base_url.normalize
|
|
@root_url ||= root_path? ? URL.parse(File.join(base_url.to_s, root_path)) : base_url.normalize
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
|
|
+ def home_url
|
|
|
|
|
+ @home_url ||= self.class.home_url
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
def root_path
|
|
def root_path
|
|
|
self.class.root_path
|
|
self.class.root_path
|
|
|
end
|
|
end
|
|
@@ -89,7 +93,7 @@ module Docs
|
|
|
|
|
|
|
|
def options
|
|
def options
|
|
|
@options ||= self.class.options.deep_dup.tap do |options|
|
|
@options ||= self.class.options.deep_dup.tap do |options|
|
|
|
- options.merge! base_url: base_url, root_url: root_url,
|
|
|
|
|
|
|
+ options.merge! base_url: base_url, root_url: root_url, home_url: home_url,
|
|
|
root_path: root_path, initial_paths: initial_paths
|
|
root_path: root_path, initial_paths: initial_paths
|
|
|
|
|
|
|
|
if root_path?
|
|
if root_path?
|