axios: fix root_page

pull/1872/head
Simon Legner 2 years ago
parent 40ade81c60
commit 496225804b

@ -2,6 +2,10 @@ module Docs
class Axios class Axios
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call def call
if root_page?
return '<h1>Axios</h1><p>Promise based HTTP client for the browser and node.js</p><p>Axios is a simple promise based HTTP client for the browser and node.js. Axios provides a simple to use library in a small package with a very extensible interface.</p>'
end
@doc = at_css('main > .body')
css('.links').remove css('.links').remove
css('pre').each do |node| css('pre').each do |node|
node.content = node.content node.content = node.content

@ -7,12 +7,10 @@ module Docs
} }
self.release = '1.1.3' self.release = '1.1.3'
self.base_url = "https://axios-http.com/docs/" self.base_url = "https://axios-http.com/docs/"
self.initial_paths = %w(intro) self.initial_paths = %w(index intro)
html_filters.push 'axios/entries', 'axios/clean_html' html_filters.push 'axios/entries', 'axios/clean_html'
options[:container] = 'main > .body'
# https://github.com/axios/axios-docs/blob/master/LICENSE # https://github.com/axios/axios-docs/blob/master/LICENSE
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2020-present John Jakob "Jake" Sarjeant<br> &copy; 2020-present John Jakob "Jake" Sarjeant<br>
@ -22,5 +20,11 @@ module Docs
def get_latest_version(opts) def get_latest_version(opts)
get_latest_github_release('axios', 'axios', opts) get_latest_github_release('axios', 'axios', opts)
end end
private
def process_response?(response)
true
end
end end
end end

Loading…
Cancel
Save