1
0

react_native.rb 952 B

12345678910111213141516171819202122232425262728293031323334
  1. module Docs
  2. class ReactNative < UrlScraper
  3. self.slug = 'react_native'
  4. self.type = 'react_native'
  5. self.release = '0.49'
  6. self.base_url = 'https://facebook.github.io/react-native/docs/'
  7. self.root_path = 'getting-started.html'
  8. self.links = {
  9. home: 'https://facebook.github.io/react-native/',
  10. code: 'https://github.com/facebook/react-native'
  11. }
  12. html_filters.push 'react_native/entries', 'react_native/clean_html'
  13. options[:container] = '.documentationContent'
  14. options[:skip_patterns] = [/\Asample\-/]
  15. options[:skip] = %w(
  16. videos.html
  17. transforms.html
  18. troubleshooting.html
  19. more-resources.html
  20. )
  21. options[:fix_urls] = ->(url) {
  22. url.sub! 'docs/docs', 'docs'
  23. url
  24. }
  25. options[:attribution] = <<-HTML
  26. &copy; 2015&ndash;2017 Facebook Inc.<br>
  27. Licensed under the Creative Commons Attribution 4.0 International Public License.
  28. HTML
  29. end
  30. end