diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0dff557f..0c10bb48 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -258,7 +258,7 @@ credits = [ 'https://api.drupal.org/api/drupal/LICENSE.txt' ], [ 'Electron', - '2013-2018 GitHub Inc.', + 'GitHub Inc.', 'MIT', 'https://raw.githubusercontent.com/electron/electron/master/LICENSE' ], [ diff --git a/lib/docs/filters/electron/clean_html.rb b/lib/docs/filters/electron/clean_html.rb index 820cc87f..4459f913 100644 --- a/lib/docs/filters/electron/clean_html.rb +++ b/lib/docs/filters/electron/clean_html.rb @@ -11,9 +11,13 @@ module Docs if root_page? doc.child.before('

Electron Documentation

') + css("div.subtron, div.py-6").remove + css('h2 > a').each do |node| node.before(node.children).remove end + else + @doc = doc.at_css('div.docs > div.markdown-body') end at_css('h2').name = 'h1' if !at_css('h1') && at_css('h2') diff --git a/lib/docs/scrapers/electron.rb b/lib/docs/scrapers/electron.rb index 8e635f49..49fb5193 100644 --- a/lib/docs/scrapers/electron.rb +++ b/lib/docs/scrapers/electron.rb @@ -1,17 +1,17 @@ module Docs class Electron < UrlScraper self.type = 'simple' - self.base_url = 'https://electronjs.org/docs' - self.release = '2.0.2' + self.base_url = 'https://www.electronjs.org/docs' + self.release = '11.0.1' self.links = { - home: 'https://electronjs.org/', + home: 'https://www.electronjs.org/', code: 'https://github.com/electron/electron' } html_filters.push 'electron/clean_html', 'electron/entries' options[:trailing_slash] = false - options[:container] = '.page-section > .container, .page-section > .container-narrow' + options[:container] = 'main' options[:skip] = %w(guides development tutorial versions all) options[:skip_patterns] = [/\/history\z/] options[:replace_paths] = { @@ -19,12 +19,12 @@ module Docs } options[:attribution] = <<-HTML - © 2013–2018 GitHub Inc.
+ © GitHub Inc.
Licensed under the MIT license. HTML def get_latest_version(opts) - doc = fetch_doc('https://electronjs.org/docs', opts) + doc = fetch_doc('https://www.electronjs.org/docs', opts) doc.at_css('.docs-version').content end end