phoenix.rb 1.2 KB

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