Add React Router documentation (6.2.1)

pull/1692/head
Simon Legner 3 years ago
parent bd6ca4b31a
commit c12b8e4797

@ -1,4 +1,8 @@
[ [
[
"2021-01-12",
"New documentation: <a href=\"/react_router/\">React Router</a>"
],
[ [
"2022-01-09", "2022-01-09",
"New documentation: <a href=\"/deno/\">Deno</a>" "New documentation: <a href=\"/deno/\">Deno</a>"

@ -732,6 +732,11 @@ credits = [
'2014-present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff', '2014-present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff',
'MIT', 'MIT',
'https://raw.githubusercontent.com/react-bootstrap/react-bootstrap/master/LICENSE' 'https://raw.githubusercontent.com/react-bootstrap/react-bootstrap/master/LICENSE'
], [
'React Router',
'React Training 2015-2019<br>Remix Software 2020-2021',
'MIT',
'https://raw.githubusercontent.com/remix-run/react-router/main/LICENSE.md'
], [ ], [
'ReactiveX', 'ReactiveX',
'ReactiveX contributors', 'ReactiveX contributors',

@ -0,0 +1,14 @@
module Docs
class ReactRouter
class CleanHtmlFilter < Filter
def call
@doc = at_css('.md-prose')
css('pre').each do |node|
node.content = node.css('.codeblock-line').map(&:content).join("")
node['data-language'] = 'javascript'
end
doc
end
end
end
end

@ -0,0 +1,13 @@
module Docs
class ReactRouter
class EntriesFilter < Docs::EntriesFilter
def additional_entries
entries = []
css('h2[id], h3[id]').each do |node|
entries << [node.content, node['id'], 'API Reference']
end
entries
end
end
end
end

@ -0,0 +1,26 @@
module Docs
class ReactRouter < UrlScraper
self.name = 'React Router'
self.slug = 'react_router'
self.type = 'simple'
self.release = '6.2.1'
self.base_url = 'https://reactrouterdotcom.fly.dev/docs/en/v6/api'
self.links = {
home: 'https://reactrouterdotcom.fly.dev/',
code: 'https://github.com/remix-run/react-router'
}
html_filters.push 'react_router/entries', 'react_router/clean_html', 'title'
options[:attribution] = <<-HTML
&copy; React Training 2015-2019<br>
&copy; Remix Software 2020-2021<br>
Licensed under the MIT License (MIT).
HTML
def get_latest_version(opts)
get_npm_version('react-router', opts)
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1 @@
https://reactrouterdotcom.fly.dev/favicon.ico
Loading…
Cancel
Save