Add Axios documentation (0.27.2)

pull/1804/head
Simon Legner 2 years ago
parent 0ed83b2a33
commit 03e42df10e

@ -1,7 +1,7 @@
[
[
"2022-08-27",
"New documentations: <a href=\"/sanctuary/\">Sanctuary</a>, <a href=\"/requests/\">Requests</a>"
"New documentations: <a href=\"/sanctuary/\">Sanctuary</a>, <a href=\"/requests/\">Requests</a>, <a href=\"/axios/\">Axios</a>"
],
[
"2022-05-03",

@ -106,6 +106,11 @@ credits = [
'2010-2018 Caolan McMahon',
'MIT',
'https://raw.githubusercontent.com/caolan/async/master/LICENSE'
], [
'Axios',
'2014-present Matt Zabriskie',
'MIT',
'https://raw.githubusercontent.com/axios/axios/main/LICENSE'
], [
'Babel',
'2014-present Sebastian McKenzie',

@ -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
&copy; 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

@ -0,0 +1 @@
https://raw.githubusercontent.com/axios/axios-docs/master/assets/favicon.png
Loading…
Cancel
Save