cordova.rb 884 B

1234567891011121314151617181920212223242526272829303132333435
  1. module Docs
  2. class Cordova < UrlScraper
  3. self.name = 'Cordova'
  4. self.type = 'cordova'
  5. self.root_path = 'guide/overview/index.html'
  6. self.links = {
  7. home: 'https://cordova.apache.org/'
  8. }
  9. html_filters.push 'cordova/entries', 'cordova/clean_html'
  10. options[:container] = '.docs'
  11. options[:skip] = %w(index.html)
  12. options[:fix_urls] = ->(url) do
  13. if url.include?('https://cordova.apache.org/docs') && !url.end_with?('.html')
  14. if url.end_with?('/')
  15. url << 'index.html'
  16. else
  17. url << '/index.html'
  18. end
  19. end
  20. end
  21. options[:attribution] = <<-HTML
  22. &copy; 2012&ndash;2016 The Apache Software Foundation<br>
  23. Licensed under the Apache License 2.0.
  24. HTML
  25. version '6' do
  26. self.release = '6.4.0'
  27. self.base_url = 'https://cordova.apache.org/docs/en/6.x/'
  28. end
  29. end
  30. end