Add React Router documentation (6.2.1)
Unified · Split
| @@ -1,4 +1,8 @@ | ||
| 1 | 1 | [ |
| 2 | + [ | |
| 3 | + "2021-01-12", | |
| 4 | + "New documentation: <a href=\"/react_router/\">React Router</a>" | |
| 5 | + ], | |
| 2 | 6 | [ |
| 3 | 7 | "2022-01-09", |
| 4 | 8 | "New documentation: <a href=\"/deno/\">Deno</a>" |
| @@ -732,6 +732,11 @@ credits = [ · 731 unmodified lines | ||
| 732 | 732 | '2014-present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff', |
| 733 | 733 | 'MIT', |
| 734 | 734 | 'https://raw.githubusercontent.com/react-bootstrap/react-bootstrap/master/LICENSE' |
| 735 | + ], [ | |
| 736 | + 'React Router', | |
| 737 | + 'React Training 2015-2019<br>Remix Software 2020-2021', | |
| 738 | + 'MIT', | |
| 739 | + 'https://raw.githubusercontent.com/remix-run/react-router/main/LICENSE.md' | |
| 735 | 740 | ], [ |
| 736 | 741 | 'ReactiveX', |
| 737 | 742 | 'ReactiveX contributors', |
| @@ -0,0 +1,14 @@ | ||
| 1 | +module Docs | |
| 2 | + class ReactRouter | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + @doc = at_css('.md-prose') | |
| 6 | + css('pre').each do |node| | |
| 7 | + node.content = node.css('.codeblock-line').map(&:content).join("") | |
| 8 | + node['data-language'] = 'javascript' | |
| 9 | + end | |
| 10 | + doc | |
| 11 | + end | |
| 12 | + end | |
| 13 | + end | |
| 14 | +end | |
| @@ -0,0 +1,13 @@ | ||
| 1 | +module Docs | |
| 2 | + class ReactRouter | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def additional_entries | |
| 5 | + entries = [] | |
| 6 | + css('h2[id], h3[id]').each do |node| | |
| 7 | + entries << [node.content, node['id'], 'API Reference'] | |
| 8 | + end | |
| 9 | + entries | |
| 10 | + end | |
| 11 | + end | |
| 12 | + end | |
| 13 | +end | |
| @@ -0,0 +1,26 @@ | ||
| 1 | +module Docs | |
| 2 | + class ReactRouter < UrlScraper | |
| 3 | + self.name = 'React Router' | |
| 4 | + self.slug = 'react_router' | |
| 5 | + self.type = 'simple' | |
| 6 | + self.release = '6.2.1' | |
| 7 | + self.base_url = 'https://reactrouterdotcom.fly.dev/docs/en/v6/api' | |
| 8 | + | |
| 9 | + self.links = { | |
| 10 | + home: 'https://reactrouterdotcom.fly.dev/', | |
| 11 | + code: 'https://github.com/remix-run/react-router' | |
| 12 | + } | |
| 13 | + | |
| 14 | + html_filters.push 'react_router/entries', 'react_router/clean_html', 'title' | |
| 15 | + | |
| 16 | + options[:attribution] = <<-HTML | |
| 17 | + © React Training 2015-2019<br> | |
| 18 | + © Remix Software 2020-2021<br> | |
| 19 | + Licensed under the MIT License (MIT). | |
| 20 | + HTML | |
| 21 | + | |
| 22 | + def get_latest_version(opts) | |
| 23 | + get_npm_version('react-router', opts) | |
| 24 | + end | |
| 25 | + end | |
| 26 | +end | |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +https://reactrouterdotcom.fly.dev/favicon.ico | |