[devdocsgjs/main: 38/69] Add Axios documentation (0.27.2)
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 38/69] Add Axios documentation (0.27.2)
- Date: Mon, 12 Sep 2022 18:46:54 +0000 (UTC)
commit 03e42df10e03222b63f989f321f71d706b5812c5
Author: Simon Legner <Simon Legner gmail com>
Date: Sat Aug 27 21:01:10 2022 +0200
Add Axios documentation (0.27.2)
assets/javascripts/news.json | 2 +-
.../javascripts/templates/pages/about_tmpl.coffee | 5 ++++
lib/docs/filters/axios/clean_html.rb | 10 ++++++++
lib/docs/filters/axios/entries.rb | 13 +++++++++++
lib/docs/scrapers/axios.rb | 26 +++++++++++++++++++++
public/icons/docs/axios/16.png | Bin 0 -> 473 bytes
public/icons/docs/axios/16 2x png | Bin 0 -> 683 bytes
public/icons/docs/axios/SOURCE | 1 +
8 files changed, 56 insertions(+), 1 deletion(-)
---
diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json
index 077180c9..d76b8b3f 100644
--- a/assets/javascripts/news.json
+++ b/assets/javascripts/news.json
@@ -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",
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee
b/assets/javascripts/templates/pages/about_tmpl.coffee
index b3b7136c..f72b00a0 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -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',
diff --git a/lib/docs/filters/axios/clean_html.rb b/lib/docs/filters/axios/clean_html.rb
new file mode 100644
index 00000000..7a1aa8cc
--- /dev/null
+++ b/lib/docs/filters/axios/clean_html.rb
@@ -0,0 +1,10 @@
+module Docs
+ class Axios
+ class CleanHtmlFilter < Filter
+ def call
+ css('.links').remove
+ doc
+ end
+ end
+ end
+end
diff --git a/lib/docs/filters/axios/entries.rb b/lib/docs/filters/axios/entries.rb
new file mode 100644
index 00000000..a23a223b
--- /dev/null
+++ b/lib/docs/filters/axios/entries.rb
@@ -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
diff --git a/lib/docs/scrapers/axios.rb b/lib/docs/scrapers/axios.rb
new file mode 100755
index 00000000..96314eb7
--- /dev/null
+++ b/lib/docs/scrapers/axios.rb
@@ -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
diff --git a/public/icons/docs/axios/16.png b/public/icons/docs/axios/16.png
new file mode 100644
index 00000000..8cbd5d49
Binary files /dev/null and b/public/icons/docs/axios/16.png differ
diff --git a/public/icons/docs/axios/16 2x png b/public/icons/docs/axios/16 2x png
new file mode 100644
index 00000000..a80982e6
Binary files /dev/null and b/public/icons/docs/axios/16 2x png differ
diff --git a/public/icons/docs/axios/SOURCE b/public/icons/docs/axios/SOURCE
new file mode 100644
index 00000000..fcf8b034
--- /dev/null
+++ b/public/icons/docs/axios/SOURCE
@@ -0,0 +1 @@
+https://raw.githubusercontent.com/axios/axios-docs/master/assets/favicon.png
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]