electron.rb 789 B

1234567891011121314151617181920212223242526
  1. module Docs
  2. class Electron < UrlScraper
  3. self.type = 'electron'
  4. self.base_url = 'https://electronjs.org/docs'
  5. self.release = '1.8.4'
  6. self.links = {
  7. home: 'https://electronjs.org/',
  8. code: 'https://github.com/electron/electron'
  9. }
  10. html_filters.push 'electron/clean_html', 'electron/entries'
  11. options[:trailing_slash] = false
  12. options[:container] = '.page-section > .container, .page-section > .container-narrow'
  13. options[:skip] = %w(guides development tutorial versions all)
  14. options[:skip_patterns] = [/\/history\z/]
  15. options[:replace_paths] = {
  16. 'api/web-view-tag' => 'api/webview-tag'
  17. }
  18. options[:attribution] = <<-HTML
  19. &copy; 2013&ndash;2018 GitHub Inc.<br>
  20. Licensed under the MIT license.
  21. HTML
  22. end
  23. end