Renamed official_url to home_url

pull/170/head
Thu Trang Pham 10 years ago
parent 0dc8cfd5d3
commit 610e49119f

@ -34,7 +34,7 @@ module Docs
self.text_filters = FilterStack.new
html_filters.push 'container', 'clean_html', 'normalize_urls', 'internal_urls', 'normalize_paths'
text_filters.push 'official_url', 'inner_html', 'clean_text', 'attribution'
text_filters.push 'home_url', 'inner_html', 'clean_text', 'attribution'
def build_page(path)
response = request_one url_for(path)

@ -0,0 +1,16 @@
module Docs
class HomeUrlFilter < Filter
def call
html.prepend(home_url_html) if home_url
html
end
def home_url_html
<<-HTML.strip_heredoc
<div class="_official">
Official Documentation: <a href="#{home_url}" class="_official-link">#{home_url}</a>
</div>
HTML
end
end
end

@ -1,15 +0,0 @@
module Docs
class OfficialUrlFilter < Filter
def call
official_url_html << html if base_url
end
def official_url_html
<<-HTML.strip_heredoc
<div class="_official">
Official Documentation: <a href="#{base_url}" class="_official-link">#{base_url}</a>
</div>
HTML
end
end
end
Loading…
Cancel
Save