ember.rb 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. module Docs
  2. class Ember < UrlScraper
  3. include MultipleBaseUrls
  4. self.name = 'Ember.js'
  5. self.slug = 'ember'
  6. self.type = 'ember'
  7. self.release = '2.10.0'
  8. self.base_urls = ['http://emberjs.com/api/', 'https://guides.emberjs.com/v2.10.0/']
  9. self.links = {
  10. home: 'http://emberjs.com/',
  11. code: 'https://github.com/emberjs/ember.js'
  12. }
  13. html_filters.push 'ember/entries', 'ember/clean_html', 'title'
  14. options[:trailing_slash] = false
  15. options[:title] = false
  16. options[:root_title] = 'Ember.js'
  17. options[:container] = ->(filter) do
  18. if filter.base_url.path.start_with?('/api')
  19. filter.root_page? ? '#toc-list' : '#content'
  20. else
  21. 'main'
  22. end
  23. end
  24. # Duplicates
  25. options[:skip] = %w(classes/String.html data/classes/DS.html)
  26. options[:skip_patterns] = [/\._/, /contributing/]
  27. options[:attribution] = <<-HTML
  28. &copy; 2016 Yehuda Katz, Tom Dale and Ember.js contributors<br>
  29. Licensed under the MIT License.
  30. HTML
  31. end
  32. end