diff --git a/assets/images/icons.png b/assets/images/icons.png
index 8b054317..f26641e6 100644
Binary files a/assets/images/icons.png and b/assets/images/icons.png differ
diff --git a/assets/images/icons@2x.png b/assets/images/icons@2x.png
index df16b36d..407590bf 100644
Binary files a/assets/images/icons@2x.png and b/assets/images/icons@2x.png differ
diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json
index a9364fa3..72ebbb9f 100644
--- a/assets/javascripts/news.json
+++ b/assets/javascripts/news.json
@@ -1,7 +1,7 @@
[
[
"2015-11-22",
- "New documentations: Dojo and Flow"
+ "New documentations: Dojo, Relay and Flow"
], [
"2015-11-08",
"New documentations: Elixir and Vagrant"
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee
index c2c51db6..72a6163f 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -325,7 +325,7 @@ credits = [
'MIT',
'https://raw.githubusercontent.com/kriskowal/q/v1/LICENSE'
], [
- 'React, React Native, Flow',
+ 'React, React Native, Flow, Relay',
'2013-2015 Facebook Inc.',
'CC BY',
'https://raw.githubusercontent.com/facebook/react/master/LICENSE-docs'
diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss
index 5414aec4..274f8129 100644
--- a/assets/stylesheets/global/_icons.scss
+++ b/assets/stylesheets/global/_icons.scss
@@ -120,3 +120,4 @@
._icon-vagrant:before { background-position: -5rem -9rem; }
._icon-dojo:before { background-position: -6rem -9rem; }
._icon-flow:before { background-position: -7rem -9rem; }
+._icon-relay:before { background-position: -8rem -9rem; }
diff --git a/assets/stylesheets/pages/_react.scss b/assets/stylesheets/pages/_react.scss
index 22ca64e6..74a913a9 100644
--- a/assets/stylesheets/pages/_react.scss
+++ b/assets/stylesheets/pages/_react.scss
@@ -3,7 +3,7 @@
> h3 { @extend %block-label, %label-blue; }
> h4 { @extend %block-label; }
- p code { @extend %label; }
+ p code, li code { @extend %label; }
blockquote { @extend %note; }
span.platform { float: right; }
diff --git a/lib/docs/filters/react/clean_html.rb b/lib/docs/filters/react/clean_html.rb
index 40d8e93b..31280ccf 100644
--- a/lib/docs/filters/react/clean_html.rb
+++ b/lib/docs/filters/react/clean_html.rb
@@ -41,6 +41,14 @@ module Docs
node.before(node.children).remove
end
+ css('a pre').each do |node|
+ node.name = 'code'
+ end
+
+ css('a[target]').each do |node|
+ node.remove_attribute('target')
+ end
+
doc
end
end
diff --git a/lib/docs/filters/react/entries.rb b/lib/docs/filters/react/entries.rb
index 938bda5e..1904c286 100644
--- a/lib/docs/filters/react/entries.rb
+++ b/lib/docs/filters/react/entries.rb
@@ -37,7 +37,9 @@ module Docs
[name, id, type]
end
else
- css('.props > .prop > .propTitle').each_with_object([]) do |node, entries|
+ entries = []
+
+ css('.props > .prop > .propTitle').each do |node| # react-native
name = node.children.find(&:text?).try(:content)
next if name.blank?
sep = node.content.include?('static') ? '.' : '#'
@@ -46,6 +48,19 @@ module Docs
id = node.at_css('.anchor')['name']
entries << [name, id]
end
+
+ css('.apiIndex a pre').each do |node| # relay
+ next unless node.parent['href'].start_with?('#')
+ id = node.parent['href'].remove('#')
+ name = node.content.strip
+ sep = name.start_with?('static') ? '.' : '#'
+ name.remove! %r{(abstract|static) }
+ name.sub! %r{\(.*\)}, '()'
+ name.prepend(self.name + sep)
+ entries << [name, id]
+ end
+
+ entries
end
end
end
diff --git a/lib/docs/scrapers/relay.rb b/lib/docs/scrapers/relay.rb
new file mode 100644
index 00000000..12f1df76
--- /dev/null
+++ b/lib/docs/scrapers/relay.rb
@@ -0,0 +1,21 @@
+module Docs
+ class Relay < React
+ self.type = 'react'
+ self.version = '0.5'
+ self.base_url = 'https://facebook.github.io/relay/docs/'
+ self.root_path = 'getting-started.html'
+ self.links = {
+ home: 'https://facebook.github.io/relay/',
+ code: 'https://github.com/facebook/relay'
+ }
+
+ options[:root_title] = 'Relay Documentation'
+ options[:only_patterns] = nil
+ options[:skip] = %w(videos.html graphql-further-reading.html)
+
+ options[:attribution] = <<-HTML
+ © 2013–2015 Facebook Inc.
+ Licensed under the BSD License.
+ HTML
+ end
+end
diff --git a/public/icons/docs/relay/16.png b/public/icons/docs/relay/16.png
new file mode 100644
index 00000000..11c4ca21
Binary files /dev/null and b/public/icons/docs/relay/16.png differ
diff --git a/public/icons/docs/relay/16@2x.png b/public/icons/docs/relay/16@2x.png
new file mode 100644
index 00000000..01770ccd
Binary files /dev/null and b/public/icons/docs/relay/16@2x.png differ