cordova.rb 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. code: 'https://git-wip-us.apache.org/repos/asf/cordova-cli.git'
  9. }
  10. html_filters.push 'cordova/entries', 'cordova/clean_html'
  11. options[:container] = '.docs'
  12. options[:skip] = %w(index.html)
  13. options[:fix_urls] = ->(url) do
  14. if url.include?('https://cordova.apache.org/docs') && !url.end_with?('.html')
  15. if url.end_with?('/')
  16. url << 'index.html'
  17. else
  18. url << '/index.html'
  19. end
  20. end
  21. end
  22. options[:attribution] = <<-HTML
  23. &copy; 2012&ndash;2017 The Apache Software Foundation<br>
  24. Licensed under the Apache License 2.0.
  25. HTML
  26. version '7' do
  27. self.release = '7.1.0'
  28. self.base_url = 'https://cordova.apache.org/docs/en/7.x/'
  29. end
  30. version '6' do
  31. self.release = '6.5.0'
  32. self.base_url = 'https://cordova.apache.org/docs/en/6.x/'
  33. end
  34. end
  35. end