Add Phoenix documentation

pull/304/head
Thibaut 9 years ago
parent 9e6420be6a
commit 5de8c37258

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 95 KiB

@ -1,7 +1,7 @@
[
[
"2015-11-22",
"New documentations: <a href=\"/dojo/\">Dojo</a>, <a href=\"/relay/\">Relay</a> and <a href=\"/flow/\">Flow</a>"
"New documentations: <a href=\"/phoenix/\">Phoenix</a>, <a href=\"/dojo/\">Dojo</a>, <a href=\"/relay/\">Relay</a> and <a href=\"/flow/\">Flow</a>"
], [
"2015-11-08",
"New documentations: <a href=\"/elixir/\">Elixir</a> and <a href=\"/vagrant/\">Vagrant</a>"

@ -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',

@ -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; }

@ -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

@ -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
&copy; 2012 Plataformatec<br>
Licensed under the Apache License, Version 2.0.
HTML
elsif filter.slug.start_with?('plug')
<<-HTML
&copy; 2013 Plataformatec<br>
Licensed under the Apache License, Version 2.0.
HTML
else
<<-HTML
&copy; 2014 Chris McCord<br>
Licensed under the MIT License.
HTML
end
}
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

@ -0,0 +1 @@
https://github.com/phoenixframework/phoenix/blob/master/logo.png
Loading…
Cancel
Save