History

Improve React scraper

Thibaut committed 11 years ago

Commit d96ce261 parent e096acc2 files · +13 −11Browse files

Unified · Split

2 files
  1. lib/docs/filters/react/entries.rb +3 −3
  2. lib/docs/scrapers/react.rb +10 −8
lib/docs/filters/react/entries.rb+3−3
@@ -2,9 +2,9 @@ module Docs · 1 unmodified line
2 class React2 class React
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 API_SLUGS = %w(4 API_SLUGS = %w(
5 top-level-api5 docs/top-level-api
6 component-api6 docs/component-api
7 component-specs7 docs/component-specs
8 )8 )
9 9
10 def get_name10 def get_name
lib/docs/scrapers/react.rb+10−8
@@ -3,22 +3,24 @@ module Docs · 2 unmodified lines
3 self.name = 'React'3 self.name = 'React'
4 self.type = 'react'4 self.type = 'react'
5 self.version = '0.13.3'5 self.version = '0.13.3'
6 self.base_url = 'http://facebook.github.io/react/docs/'6 self.base_url = 'https://facebook.github.io/react/'
7 self.root_path = 'getting-started.html'7 self.root_path = 'docs/getting-started.html'
8 self.links = {8 self.links = {
9 home: 'http://facebook.github.io/react/',9 home: 'https://facebook.github.io/react/',
10 code: 'https://github.com/facebook/react'10 code: 'https://github.com/facebook/react'
11 }11 }
12 12
13 html_filters.push 'react/entries', 'react/clean_html'13 html_filters.push 'react/entries', 'react/clean_html'
14 14
15 options[:container] = '.documentationContent'15 options[:container] = '.documentationContent'
16 16 options[:only_patterns] = [/\Adocs\//, /\Atips\//]
17 options[:skip] = %w(17 options[:skip] = %w(
18 videos.html18 docs/
19 complementary-tools.html19 docs/videos.html
20 examples.html20 docs/complementary-tools.html
21 conferences.html)21 docs/examples.html
22 docs/conferences.html
23 tips/introduction.html)
22 24
23 options[:attribution] = <<-HTML25 options[:attribution] = <<-HTML
24 &copy; 2013&ndash;2015 Facebook Inc.<br>26 &copy; 2013&ndash;2015 Facebook Inc.<br>