| @@ -34,7 +34,7 @@ module Docs · 33 unmodified lines |
| 34 | self.text_filters = FilterStack.new | 34 | self.text_filters = FilterStack.new |
| 35 | | 35 | |
| 36 | html_filters.push 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths' | 36 | html_filters.push 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths' |
| 37 | text_filters.push 'inner_html', 'clean_text', 'attribution' | 37 | text_filters.push 'inner_html', 'clean_text', 'home_url', 'attribution' |
| 38 | | 38 | |
| 39 | def build_page(path) | 39 | def build_page(path) |
| 40 | response = request_one url_for(path) | 40 | response = request_one url_for(path) |
| @@ -65,6 +65,10 @@ module Docs · 24 unmodified lines |
| 65 | @root_url ||= root_path? ? URL.parse(File.join(base_url.to_s, root_path)) : base_url.normalize | 65 | @root_url ||= root_path? ? URL.parse(File.join(base_url.to_s, root_path)) : base_url.normalize |
| 66 | end | 66 | end |
| 67 | | 67 | |
| | 68 | def home_url |
| | 69 | @home_url ||= self.class.home_url |
| | 70 | end |
| | 71 | |
| 68 | def root_path | 72 | def root_path |
| 69 | self.class.root_path | 73 | self.class.root_path |
| 70 | end | 74 | end |
| @@ -89,7 +93,7 @@ module Docs · 18 unmodified lines |
| 89 | | 93 | |
| 90 | def options | 94 | def options |
| 91 | @options ||= self.class.options.deep_dup.tap do |options| | 95 | @options ||= self.class.options.deep_dup.tap do |options| |
| 92 | options.merge! base_url: base_url, root_url: root_url, | 96 | options.merge! base_url: base_url, root_url: root_url, home_url: home_url, |
| 93 | root_path: root_path, initial_paths: initial_paths | 97 | root_path: root_path, initial_paths: initial_paths |
| 94 | | 98 | |
| 95 | if root_path? | 99 | if root_path? |