mirror of https://github.com/freeCodeCamp/devdocs
parent
0ed83b2a33
commit
03e42df10e
@ -0,0 +1,10 @@
|
|||||||
|
module Docs
|
||||||
|
class Axios
|
||||||
|
class CleanHtmlFilter < Filter
|
||||||
|
def call
|
||||||
|
css('.links').remove
|
||||||
|
doc
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,13 @@
|
|||||||
|
module Docs
|
||||||
|
class Axios
|
||||||
|
class EntriesFilter < Docs::EntriesFilter
|
||||||
|
def get_name
|
||||||
|
at_css('h1').content
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_type
|
||||||
|
'axios'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,26 @@
|
|||||||
|
module Docs
|
||||||
|
class Axios < UrlScraper
|
||||||
|
self.type = 'simple'
|
||||||
|
self.links = {
|
||||||
|
home: 'hthttps://axios-http.com/',
|
||||||
|
code: 'https://github.com/axios/axios'
|
||||||
|
}
|
||||||
|
self.release = '0.27.2'
|
||||||
|
self.base_url = "https://axios-http.com/docs/"
|
||||||
|
self.initial_paths = %w(intro)
|
||||||
|
|
||||||
|
html_filters.push 'axios/entries', 'axios/clean_html'
|
||||||
|
|
||||||
|
options[:container] = 'main > .body'
|
||||||
|
|
||||||
|
# https://github.com/axios/axios-docs/blob/master/LICENSE
|
||||||
|
options[:attribution] = <<-HTML
|
||||||
|
© 2020-present John Jakob "Jake" Sarjeant<br>
|
||||||
|
Licensed under the MIT License.
|
||||||
|
HTML
|
||||||
|
|
||||||
|
def get_latest_version(opts)
|
||||||
|
get_latest_github_release('axios', 'axios', opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
After Width: | Height: | Size: 473 B |
After Width: | Height: | Size: 683 B |
@ -0,0 +1 @@
|
|||||||
|
https://raw.githubusercontent.com/axios/axios-docs/master/assets/favicon.png
|
Loading…
Reference in new issue