diff --git a/assets/images/icons.png b/assets/images/icons.png
index f26641e6..1c2d9539 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 407590bf..39ab5aa7 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 72ebbb9f..f6a2a6ab 100644
--- a/assets/javascripts/news.json
+++ b/assets/javascripts/news.json
@@ -1,7 +1,7 @@
[
[
"2015-11-22",
- "New documentations: Dojo, Relay and Flow"
+ "New documentations: Phoenix, 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 72a6163f..362f9e66 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -299,6 +299,11 @@ credits = [
'2015 Richard Davey, Photon Storm Ltd.',
'MIT',
'https://raw.githubusercontent.com/photonstorm/phaser/master/license.txt'
+ ], [
+ 'Phoenix',
+ '2014 Chris McCord',
+ 'MIT',
+ 'https://raw.githubusercontent.com/phoenixframework/phoenix/master/LICENSE.md'
], [
'PHP',
'1997-2015 The PHP Documentation Group',
diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss
index 274f8129..360bc0cf 100644
--- a/assets/stylesheets/global/_icons.scss
+++ b/assets/stylesheets/global/_icons.scss
@@ -121,3 +121,4 @@
._icon-dojo:before { background-position: -6rem -9rem; }
._icon-flow:before { background-position: -7rem -9rem; }
._icon-relay:before { background-position: -8rem -9rem; }
+._icon-phoenix:before { background-position: -9rem -9rem; }
diff --git a/lib/docs/filters/elixir/entries.rb b/lib/docs/filters/elixir/entries.rb
index aac7481e..70f81940 100644
--- a/lib/docs/filters/elixir/entries.rb
+++ b/lib/docs/filters/elixir/entries.rb
@@ -12,7 +12,11 @@ module Docs
when 'protocol'
'Protocols'
else
- name.split('.').first
+ if name.start_with?('Phoenix')
+ name.split('.')[0..2].join('.')
+ else
+ name.split('.').first
+ end
end
end
@@ -29,12 +33,17 @@ module Docs
unless node.parent['class'].end_with?('macro') || self.name.start_with?('Kernel')
name.prepend "#{self.name}."
- name << " (#{id.split('/').last})"
end
+ name << " (#{id.split('/').last})" if id =~ /\/\d+\z/
+
[name, id]
end
end
+
+ def include_default_entry?
+ !slug.end_with?('extra-api-reference')
+ end
end
end
end
diff --git a/lib/docs/scrapers/phoenix.rb b/lib/docs/scrapers/phoenix.rb
new file mode 100644
index 00000000..1ae76b45
--- /dev/null
+++ b/lib/docs/scrapers/phoenix.rb
@@ -0,0 +1,46 @@
+module Docs
+ class Phoenix < Elixir
+ self.type = 'elixir'
+ self.version = '1.0.3'
+ self.base_url = 'http://hexdocs.pm/'
+ self.root_path = 'phoenix/Phoenix.html'
+ self.initial_paths = %w(
+ phoenix/extra-api-reference.html
+ ecto/extra-api-reference.html
+ phoenix_html/extra-api-reference.html
+ plug/extra-api-reference.html)
+ self.links = {
+ home: 'http://www.phoenixframework.org',
+ code: 'https://github.com/phoenixframework/phoenix'
+ }
+
+ options[:root_title] = false
+
+ options[:skip_patterns] = [/extra-api-reference/]
+ options[:only_patterns] = [
+ /\Aphoenix\//,
+ /\Aecto\//,
+ /\Aphoenix_html\//,
+ /\Aplug\//
+ ]
+
+ options[:attribution] = -> (filter) {
+ if filter.slug.start_with?('ecto')
+ <<-HTML
+ © 2012 Plataformatec
+ Licensed under the Apache License, Version 2.0.
+ HTML
+ elsif filter.slug.start_with?('plug')
+ <<-HTML
+ © 2013 Plataformatec
+ Licensed under the Apache License, Version 2.0.
+ HTML
+ else
+ <<-HTML
+ © 2014 Chris McCord
+ Licensed under the MIT License.
+ HTML
+ end
+ }
+ end
+end
diff --git a/public/icons/docs/phoenix/16.png b/public/icons/docs/phoenix/16.png
new file mode 100644
index 00000000..25ff250f
Binary files /dev/null and b/public/icons/docs/phoenix/16.png differ
diff --git a/public/icons/docs/phoenix/16@2x.png b/public/icons/docs/phoenix/16@2x.png
new file mode 100644
index 00000000..474ed1d2
Binary files /dev/null and b/public/icons/docs/phoenix/16@2x.png differ
diff --git a/public/icons/docs/phoenix/SOURCE b/public/icons/docs/phoenix/SOURCE
new file mode 100644
index 00000000..39095334
--- /dev/null
+++ b/public/icons/docs/phoenix/SOURCE
@@ -0,0 +1 @@
+https://github.com/phoenixframework/phoenix/blob/master/logo.png