phoenix.rb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module Docs
  2. class Phoenix < Elixir
  3. self.type = 'elixir'
  4. self.version = '1.0.3'
  5. self.base_url = 'http://hexdocs.pm/'
  6. self.root_path = 'phoenix/Phoenix.html'
  7. self.initial_paths = %w(
  8. phoenix/extra-api-reference.html
  9. ecto/extra-api-reference.html
  10. phoenix_html/extra-api-reference.html
  11. plug/extra-api-reference.html)
  12. self.links = {
  13. home: 'http://www.phoenixframework.org',
  14. code: 'https://github.com/phoenixframework/phoenix'
  15. }
  16. options[:root_title] = false
  17. options[:skip_patterns] = [/extra-api-reference/]
  18. options[:only_patterns] = [
  19. /\Aphoenix\//,
  20. /\Aecto\//,
  21. /\Aphoenix_html\//,
  22. /\Aplug\//
  23. ]
  24. options[:attribution] = -> (filter) {
  25. if filter.slug.start_with?('ecto')
  26. <<-HTML
  27. &copy; 2012 Plataformatec<br>
  28. Licensed under the Apache License, Version 2.0.
  29. HTML
  30. elsif filter.slug.start_with?('plug')
  31. <<-HTML
  32. &copy; 2013 Plataformatec<br>
  33. Licensed under the Apache License, Version 2.0.
  34. HTML
  35. else
  36. <<-HTML
  37. &copy; 2014 Chris McCord<br>
  38. Licensed under the MIT License.
  39. HTML
  40. end
  41. }
  42. end
  43. end